git →
1:2.23.0~rc1-1 →
armhf → 2019-08-14 07:50:28
sbuild (Debian sbuild) 0.72.0 (25 Oct 2016) on mb-lxc-01
+==============================================================================+
| git 1:2.23.0~rc1-1 (armhf) Wed, 14 Aug 2019 07:15:58 +0000 |
+==============================================================================+
Package: git
Version: 1:2.23.0~rc1-1
Source Version: 1:2.23.0~rc1-1
Distribution: bullseye-staging
Machine Architecture: armhf
Host Architecture: armhf
Build Architecture: armhf
I: NOTICE: Log filtering will replace 'var/lib/schroot/mount/bullseye-staging-armhf-sbuild-3678b372-ef0d-4882-961a-7c6c420da23a' with '<<CHROOT>>'
+------------------------------------------------------------------------------+
| Update chroot |
+------------------------------------------------------------------------------+
Get:1 http://172.17.0.1/private bullseye-staging InRelease [11.3 kB]
Get:2 http://172.17.0.1/private bullseye-staging/main Sources [11.4 MB]
Get:3 http://172.17.0.1/private bullseye-staging/main armhf Packages [13.0 MB]
Fetched 24.5 MB in 9s (2633 kB/s)
Reading package lists...
W: No sandbox user '_apt' on the system, can not drop privileges
+------------------------------------------------------------------------------+
| Fetch source files |
+------------------------------------------------------------------------------+
Check APT
---------
Checking available source versions...
Download source files with APT
------------------------------
Reading package lists...
NOTICE: 'git' packaging is maintained in the 'Git' version control system at:
https://repo.or.cz/r/git/debian.git/
Please use:
git clone https://repo.or.cz/r/git/debian.git/
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 6301 kB of source archives.
Get:1 http://172.17.0.1/private bullseye-staging/main git 1:2.23.0~rc1-1 (dsc) [2919 B]
Get:2 http://172.17.0.1/private bullseye-staging/main git 1:2.23.0~rc1-1 (tar) [5677 kB]
Get:3 http://172.17.0.1/private bullseye-staging/main git 1:2.23.0~rc1-1 (diff) [621 kB]
Fetched 6301 kB in 1s (5525 kB/s)
Download complete and in download only mode
I: NOTICE: Log filtering will replace 'build/git-DYxrEL/git-2.23.0~rc1' with '<<PKGBUILDDIR>>'
I: NOTICE: Log filtering will replace 'build/git-DYxrEL' with '<<BUILDDIR>>'
+------------------------------------------------------------------------------+
| Install build-essential |
+------------------------------------------------------------------------------+
Setup apt archive
-----------------
Merged Build-Depends: build-essential, fakeroot
Filtered Build-Depends: build-essential, fakeroot
dpkg-deb: building package 'sbuild-build-depends-core-dummy' in '/<<BUILDDIR>>/resolver-y3BSZT/apt_archive/sbuild-build-depends-core-dummy.deb'.
dpkg-scanpackages: warning: Packages in archive but missing from override file:
dpkg-scanpackages: warning: sbuild-build-depends-core-dummy
dpkg-scanpackages: info: Wrote 1 entries to output Packages file.
gpg: keybox '/<<BUILDDIR>>/resolver-y3BSZT/gpg/pubring.kbx' created
gpg: /<<BUILDDIR>>/resolver-y3BSZT/gpg/trustdb.gpg: trustdb created
gpg: key 37145E60F90AF620: public key "Sbuild Signer (Sbuild Build Dependency Archive Key) <buildd-tools-devel@lists.alioth.debian.org>" imported
gpg: Total number processed: 1
gpg: imported: 1
gpg: key 37145E60F90AF620: "Sbuild Signer (Sbuild Build Dependency Archive Key) <buildd-tools-devel@lists.alioth.debian.org>" not changed
gpg: key 37145E60F90AF620: secret key imported
gpg: Total number processed: 1
gpg: unchanged: 1
gpg: secret keys read: 1
gpg: secret keys imported: 1
gpg: using "Sbuild Signer" as default secret key for signing
Ign:1 copy:/<<BUILDDIR>>/resolver-y3BSZT/apt_archive ./ InRelease
Get:2 copy:/<<BUILDDIR>>/resolver-y3BSZT/apt_archive ./ Release [957 B]
Get:3 copy:/<<BUILDDIR>>/resolver-y3BSZT/apt_archive ./ Release.gpg [370 B]
Get:4 copy:/<<BUILDDIR>>/resolver-y3BSZT/apt_archive ./ Sources [349 B]
Get:5 copy:/<<BUILDDIR>>/resolver-y3BSZT/apt_archive ./ Packages [433 B]
Fetched 2109 B in 0s (4361 B/s)
Reading package lists...
W: No sandbox user '_apt' on the system, can not drop privileges
Reading package lists...
Install core build dependencies (apt-based resolver)
----------------------------------------------------
Installing build dependencies
Reading package lists...
Building dependency tree...
Reading state information...
The following package was automatically installed and is no longer required:
netbase
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
sbuild-build-depends-core-dummy
0 upgraded, 1 newly installed, 0 to remove and 87 not upgraded.
Need to get 852 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 copy:/<<BUILDDIR>>/resolver-y3BSZT/apt_archive ./ sbuild-build-depends-core-dummy 0.invalid.0 [852 B]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 852 B in 0s (0 B/s)
Selecting previously unselected package sbuild-build-depends-core-dummy.
(Reading database ... 12050 files and directories currently installed.)
Preparing to unpack .../sbuild-build-depends-core-dummy_0.invalid.0_armhf.deb ...
Unpacking sbuild-build-depends-core-dummy (0.invalid.0) ...
Setting up sbuild-build-depends-core-dummy (0.invalid.0) ...
W: No sandbox user '_apt' on the system, can not drop privileges
+------------------------------------------------------------------------------+
| Check architectures |
+------------------------------------------------------------------------------+
Arch check ok (armhf included in any all)
+------------------------------------------------------------------------------+
| Install package build dependencies |
+------------------------------------------------------------------------------+
Setup apt archive
-----------------
Merged Build-Depends: libz-dev, gettext, libpcre2-dev | libpcre3-dev, libcurl4-gnutls-dev, libexpat1-dev, subversion, libsvn-perl, libyaml-perl, tcl, python, libhttp-date-perl | libtime-parsedate-perl, libcgi-pm-perl, liberror-perl, libmailtools-perl, cvs, cvsps, libdbd-sqlite3-perl, unzip, libio-pty-perl, debhelper (>= 9), dh-exec (>= 0.7), dh-apache2, dpkg-dev (>= 1.16.2~)
Filtered Build-Depends: libz-dev, gettext, libpcre2-dev, libcurl4-gnutls-dev, libexpat1-dev, subversion, libsvn-perl, libyaml-perl, tcl, python, libhttp-date-perl, libcgi-pm-perl, liberror-perl, libmailtools-perl, cvs, cvsps, libdbd-sqlite3-perl, unzip, libio-pty-perl, debhelper (>= 9), dh-exec (>= 0.7), dh-apache2, dpkg-dev (>= 1.16.2~)
dpkg-deb: building package 'sbuild-build-depends-git-dummy' in '/<<BUILDDIR>>/resolver-y3BSZT/apt_archive/sbuild-build-depends-git-dummy.deb'.
dpkg-scanpackages: warning: Packages in archive but missing from override file:
dpkg-scanpackages: warning: sbuild-build-depends-core-dummy sbuild-build-depends-git-dummy
dpkg-scanpackages: info: Wrote 2 entries to output Packages file.
gpg: using "Sbuild Signer" as default secret key for signing
Ign:1 copy:/<<BUILDDIR>>/resolver-y3BSZT/apt_archive ./ InRelease
Get:2 copy:/<<BUILDDIR>>/resolver-y3BSZT/apt_archive ./ Release [963 B]
Get:3 copy:/<<BUILDDIR>>/resolver-y3BSZT/apt_archive ./ Release.gpg [370 B]
Get:4 copy:/<<BUILDDIR>>/resolver-y3BSZT/apt_archive ./ Sources [651 B]
Get:5 copy:/<<BUILDDIR>>/resolver-y3BSZT/apt_archive ./ Packages [718 B]
Fetched 2702 B in 0s (5920 B/s)
Reading package lists...
W: No sandbox user '_apt' on the system, can not drop privileges
Reading package lists...
Install git build dependencies (apt-based resolver)
---------------------------------------------------
Installing build dependencies
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
apache2-dev autoconf automake autopoint autotools-dev bsdmainutils cvs cvsps
debhelper dh-autoreconf dh-exec dh-strip-nondeterminism dwz file gettext
gettext-base groff-base intltool-debian libapr1 libapr1-dev libaprutil1
libaprutil1-dev libarchive-zip-perl libbsd0 libcgi-pm-perl libcroco3
libcurl3-gnutls libcurl4-gnutls-dev libdbd-sqlite3-perl libdbi-perl libelf1
liberror-perl libexpat1 libexpat1-dev libfile-stripnondeterminism-perl
libglib2.0-0 libgnutls30 libgssapi-krb5-2 libhtml-parser-perl
libhtml-tagset-perl libhttp-date-perl libicu63 libio-pty-perl
libio-socket-ssl-perl libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0
libldap-2.4-2 libldap2-dev libmagic-mgc libmagic1 libmailtools-perl
libncurses6 libncursesw6 libnet-smtp-ssl-perl libnet-ssleay-perl
libnghttp2-14 libpcre2-16-0 libpcre2-32-0 libpcre2-8-0 libpcre2-dev
libpcre2-posix0 libpipeline1 libpsl5 libpython-stdlib libpython2-stdlib
libpython2.7-minimal libpython2.7-stdlib libreadline8 librtmp1 libsctp-dev
libsctp1 libserf-1-1 libsigsegv2 libssh2-1 libssl1.1 libsub-override-perl
libsvn-perl libsvn1 libtcl8.6 libtimedate-perl libtinfo5 libtinfo6 libtool
libuchardet0 liburi-perl libutf8proc2 libuuid1 libxml2 libyaml-perl m4
man-db mime-support openssl perl-openssl-defaults po-debconf python
python-minimal python2 python2-minimal python2.7 python2.7-minimal
sensible-utils subversion tcl tcl8.6 unzip uuid-dev zlib1g-dev
Suggested packages:
autoconf-archive gnu-standards autoconf-doc wamerican | wordlist whois
vacation mksh rcs dh-make gettext-doc libasprintf-dev libgettextpo-dev groff
libcurl4-doc libgnutls28-dev libidn11-dev libkrb5-dev librtmp-dev
libssh2-1-dev pkg-config libclone-perl libmldbm-perl libnet-daemon-perl
libsql-statement-perl gnutls-bin krb5-doc krb5-user libdata-dump-perl
ca-certificates lksctp-tools libtool-doc gfortran | fortran95-compiler
gcj-jdk libwww-perl libyaml-shell-perl m4-doc apparmor less www-browser
libmail-box-perl python-doc python-tk python2-doc python2.7-doc
binfmt-support db5.3-util libapache2-mod-svn subversion-tools
tcl-tclreadline zip
Recommended packages:
openssh-client curl | wget | lynx libcgi-fast-perl ca-certificates
libarchive-cpio-perl libglib2.0-data shared-mime-info xdg-user-dirs
libhttp-message-perl krb5-locales libgpm2 libauthen-sasl-perl publicsuffix
libltdl-dev uuid-runtime libyaml-libyaml-perl | libyaml-syck-perl
libmail-sendmail-perl
The following NEW packages will be installed:
apache2-dev autoconf automake autopoint autotools-dev bsdmainutils cvs cvsps
debhelper dh-autoreconf dh-exec dh-strip-nondeterminism dwz file gettext
gettext-base groff-base intltool-debian libapr1 libapr1-dev libaprutil1
libaprutil1-dev libarchive-zip-perl libbsd0 libcgi-pm-perl libcroco3
libcurl3-gnutls libcurl4-gnutls-dev libdbd-sqlite3-perl libdbi-perl libelf1
liberror-perl libexpat1 libexpat1-dev libfile-stripnondeterminism-perl
libglib2.0-0 libgssapi-krb5-2 libhtml-parser-perl libhtml-tagset-perl
libhttp-date-perl libicu63 libio-pty-perl libio-socket-ssl-perl libk5crypto3
libkeyutils1 libkrb5-3 libkrb5support0 libldap2-dev libmagic-mgc libmagic1
libmailtools-perl libncurses6 libnet-smtp-ssl-perl libnet-ssleay-perl
libnghttp2-14 libpcre2-16-0 libpcre2-32-0 libpcre2-8-0 libpcre2-dev
libpcre2-posix0 libpipeline1 libpsl5 libpython-stdlib libpython2-stdlib
libpython2.7-minimal libpython2.7-stdlib libreadline8 librtmp1 libsctp-dev
libsctp1 libserf-1-1 libsigsegv2 libssh2-1 libssl1.1 libsub-override-perl
libsvn-perl libsvn1 libtcl8.6 libtimedate-perl libtinfo5 libtool
libuchardet0 liburi-perl libutf8proc2 libxml2 libyaml-perl m4 man-db
mime-support openssl perl-openssl-defaults po-debconf python python-minimal
python2 python2-minimal python2.7 python2.7-minimal
sbuild-build-depends-git-dummy sensible-utils subversion tcl tcl8.6 unzip
uuid-dev zlib1g-dev
The following packages will be upgraded:
libgnutls30 libldap-2.4-2 libncursesw6 libtinfo6 libuuid1
5 upgraded, 106 newly installed, 0 to remove and 82 not upgraded.
Need to get 40.8 MB of archives.
After this operation, 142 MB of additional disk space will be used.
Get:1 copy:/<<BUILDDIR>>/resolver-y3BSZT/apt_archive ./ sbuild-build-depends-git-dummy 0.invalid.0 [1008 B]
Get:2 http://172.17.0.1/private bullseye-staging/main armhf libbsd0 armhf 0.9.1-2 [104 kB]
Get:3 http://172.17.0.1/private bullseye-staging/main armhf libtinfo5 armhf 6.1+20190713-2 [313 kB]
Get:4 http://172.17.0.1/private bullseye-staging/main armhf bsdmainutils armhf 11.1.2 [182 kB]
Get:5 http://172.17.0.1/private bullseye-staging/main armhf libuchardet0 armhf 0.0.6-3 [62.2 kB]
Get:6 http://172.17.0.1/private bullseye-staging/main armhf groff-base armhf 1.22.4-3 [782 kB]
Get:7 http://172.17.0.1/private bullseye-staging/main armhf libpipeline1 armhf 1.5.1-2 [26.6 kB]
Get:8 http://172.17.0.1/private bullseye-staging/main armhf man-db armhf 2.8.6.1-1 [1248 kB]
Get:9 http://172.17.0.1/private bullseye-staging/main armhf libpython2.7-minimal armhf 2.7.16-3 [395 kB]
Get:10 http://172.17.0.1/private bullseye-staging/main armhf python2.7-minimal armhf 2.7.16-3 [1090 kB]
Get:11 http://172.17.0.1/private bullseye-staging/main armhf python2-minimal armhf 2.7.16-1 [41.4 kB]
Get:12 http://172.17.0.1/private bullseye-staging/main armhf python-minimal armhf 2.7.16-1 [21.0 kB]
Get:13 http://172.17.0.1/private bullseye-staging/main armhf libssl1.1 armhf 1.1.1c-1 [1259 kB]
Get:14 http://172.17.0.1/private bullseye-staging/main armhf mime-support all 3.62 [37.2 kB]
Get:15 http://172.17.0.1/private bullseye-staging/main armhf libexpat1 armhf 2.2.7-1 [77.2 kB]
Get:16 http://172.17.0.1/private bullseye-staging/main armhf libtinfo6 armhf 6.1+20190713-2 [317 kB]
Get:17 http://172.17.0.1/private bullseye-staging/main armhf libncursesw6 armhf 6.1+20190713-2 [104 kB]
Get:18 http://172.17.0.1/private bullseye-staging/main armhf libreadline8 armhf 8.0-2 [137 kB]
Get:19 http://172.17.0.1/private bullseye-staging/main armhf libpython2.7-stdlib armhf 2.7.16-3 [1845 kB]
Get:20 http://172.17.0.1/private bullseye-staging/main armhf python2.7 armhf 2.7.16-3 [305 kB]
Get:21 http://172.17.0.1/private bullseye-staging/main armhf libpython2-stdlib armhf 2.7.16-1 [20.8 kB]
Get:22 http://172.17.0.1/private bullseye-staging/main armhf libpython-stdlib armhf 2.7.16-1 [20.8 kB]
Get:23 http://172.17.0.1/private bullseye-staging/main armhf python2 armhf 2.7.16-1 [41.6 kB]
Get:24 http://172.17.0.1/private bullseye-staging/main armhf python armhf 2.7.16-1 [22.8 kB]
Get:25 http://172.17.0.1/private bullseye-staging/main armhf libgnutls30 armhf 3.6.8-2 [1059 kB]
Get:26 http://172.17.0.1/private bullseye-staging/main armhf libldap-2.4-2 armhf 2.4.48+dfsg-1 [200 kB]
Get:27 http://172.17.0.1/private bullseye-staging/main armhf libuuid1 armhf 2.34-0.1 [77.4 kB]
Get:28 http://172.17.0.1/private bullseye-staging/main armhf sensible-utils all 0.0.12 [15.8 kB]
Get:29 http://172.17.0.1/private bullseye-staging/main armhf libmagic-mgc armhf 1:5.37-5 [253 kB]
Get:30 http://172.17.0.1/private bullseye-staging/main armhf libmagic1 armhf 1:5.37-5 [111 kB]
Get:31 http://172.17.0.1/private bullseye-staging/main armhf file armhf 1:5.37-5 [66.2 kB]
Get:32 http://172.17.0.1/private bullseye-staging/main armhf gettext-base armhf 0.19.8.1-9 [117 kB]
Get:33 http://172.17.0.1/private bullseye-staging/main armhf autotools-dev all 20180224.1 [77.0 kB]
Get:34 http://172.17.0.1/private bullseye-staging/main armhf libsigsegv2 armhf 2.12-2 [32.3 kB]
Get:35 http://172.17.0.1/private bullseye-staging/main armhf m4 armhf 1.4.18-2 [185 kB]
Get:36 http://172.17.0.1/private bullseye-staging/main armhf autoconf all 2.69-11 [341 kB]
Get:37 http://172.17.0.1/private bullseye-staging/main armhf automake all 1:1.16.1-4 [771 kB]
Get:38 http://172.17.0.1/private bullseye-staging/main armhf autopoint all 0.19.8.1-9 [434 kB]
Get:39 http://172.17.0.1/private bullseye-staging/main armhf libtool all 2.4.6-9 [547 kB]
Get:40 http://172.17.0.1/private bullseye-staging/main armhf dh-autoreconf all 19 [16.9 kB]
Get:41 http://172.17.0.1/private bullseye-staging/main armhf libarchive-zip-perl all 1.64-1 [96.8 kB]
Get:42 http://172.17.0.1/private bullseye-staging/main armhf libsub-override-perl all 0.09-2 [10.2 kB]
Get:43 http://172.17.0.1/private bullseye-staging/main armhf libfile-stripnondeterminism-perl all 1.4.0-1 [21.9 kB]
Get:44 http://172.17.0.1/private bullseye-staging/main armhf dh-strip-nondeterminism all 1.4.0-1 [14.0 kB]
Get:45 http://172.17.0.1/private bullseye-staging/main armhf libelf1 armhf 0.176-1.1 [158 kB]
Get:46 http://172.17.0.1/private bullseye-staging/main armhf dwz armhf 0.12.20190723-1 [68.6 kB]
Get:47 http://172.17.0.1/private bullseye-staging/main armhf libglib2.0-0 armhf 2.60.6-1 [1110 kB]
Get:48 http://172.17.0.1/private bullseye-staging/main armhf libicu63 armhf 63.2-2 [7974 kB]
Get:49 http://172.17.0.1/private bullseye-staging/main armhf libxml2 armhf 2.9.4+dfsg1-7+b2 [571 kB]
Get:50 http://172.17.0.1/private bullseye-staging/main armhf libcroco3 armhf 0.6.12-3 [132 kB]
Get:51 http://172.17.0.1/private bullseye-staging/main armhf libncurses6 armhf 6.1+20190713-2 [78.8 kB]
Get:52 http://172.17.0.1/private bullseye-staging/main armhf gettext armhf 0.19.8.1-9 [1219 kB]
Get:53 http://172.17.0.1/private bullseye-staging/main armhf intltool-debian all 0.35.0+20060710.5 [26.8 kB]
Get:54 http://172.17.0.1/private bullseye-staging/main armhf po-debconf all 1.0.21 [248 kB]
Get:55 http://172.17.0.1/private bullseye-staging/main armhf debhelper all 12.3 [1029 kB]
Get:56 http://172.17.0.1/private bullseye-staging/main armhf libapr1 armhf 1.6.5-1 [83.3 kB]
Get:57 http://172.17.0.1/private bullseye-staging/main armhf uuid-dev armhf 2.34-0.1 [92.5 kB]
Get:58 http://172.17.0.1/private bullseye-staging/main armhf libsctp1 armhf 1.0.18+dfsg-1 [27.6 kB]
Get:59 http://172.17.0.1/private bullseye-staging/main armhf libsctp-dev armhf 1.0.18+dfsg-1 [81.1 kB]
Get:60 http://172.17.0.1/private bullseye-staging/main armhf libapr1-dev armhf 1.6.5-1 [688 kB]
Get:61 http://172.17.0.1/private bullseye-staging/main armhf libaprutil1 armhf 1.6.1-4 [81.7 kB]
Get:62 http://172.17.0.1/private bullseye-staging/main armhf libldap2-dev armhf 2.4.48+dfsg-1 [300 kB]
Get:63 http://172.17.0.1/private bullseye-staging/main armhf libexpat1-dev armhf 2.2.7-1 [128 kB]
Get:64 http://172.17.0.1/private bullseye-staging/main armhf libaprutil1-dev armhf 1.6.1-4 [395 kB]
Get:65 http://172.17.0.1/private bullseye-staging/main armhf openssl armhf 1.1.1c-1 [804 kB]
Get:66 http://172.17.0.1/private bullseye-staging/main armhf apache2-dev armhf 2.4.38-3 [331 kB]
Get:67 http://172.17.0.1/private bullseye-staging/main armhf libkeyutils1 armhf 1.6-6 [14.0 kB]
Get:68 http://172.17.0.1/private bullseye-staging/main armhf libkrb5support0 armhf 1.17-6+b1 [61.5 kB]
Get:69 http://172.17.0.1/private bullseye-staging/main armhf libk5crypto3 armhf 1.17-6+b1 [112 kB]
Get:70 http://172.17.0.1/private bullseye-staging/main armhf libkrb5-3 armhf 1.17-6+b1 [316 kB]
Get:71 http://172.17.0.1/private bullseye-staging/main armhf libgssapi-krb5-2 armhf 1.17-6+b1 [134 kB]
Get:72 http://172.17.0.1/private bullseye-staging/main armhf cvs armhf 2:1.12.13+real-27 [2734 kB]
Get:73 http://172.17.0.1/private bullseye-staging/main armhf cvsps armhf 2.1-8 [43.3 kB]
Get:74 http://172.17.0.1/private bullseye-staging/main armhf dh-exec armhf 0.23.2 [25.3 kB]
Get:75 http://172.17.0.1/private bullseye-staging/main armhf libhtml-tagset-perl all 3.20-3 [12.7 kB]
Get:76 http://172.17.0.1/private bullseye-staging/main armhf liburi-perl all 1.76-1 [89.9 kB]
Get:77 http://172.17.0.1/private bullseye-staging/main armhf libhtml-parser-perl armhf 3.72-3+b2 [101 kB]
Get:78 http://172.17.0.1/private bullseye-staging/main armhf libcgi-pm-perl all 4.44-1 [223 kB]
Get:79 http://172.17.0.1/private bullseye-staging/main armhf libnghttp2-14 armhf 1.37.0-1+b1 [72.5 kB]
Get:80 http://172.17.0.1/private bullseye-staging/main armhf libpsl5 armhf 0.20.2-2 [52.6 kB]
Get:81 http://172.17.0.1/private bullseye-staging/main armhf librtmp1 armhf 2.4+20151223.gitfa8646d.1-2 [54.0 kB]
Get:82 http://172.17.0.1/private bullseye-staging/main armhf libssh2-1 armhf 1.8.0-2.1 [126 kB]
Get:83 http://172.17.0.1/private bullseye-staging/main armhf libcurl3-gnutls armhf 7.65.1-1 [296 kB]
Get:84 http://172.17.0.1/private bullseye-staging/main armhf libcurl4-gnutls-dev armhf 7.65.1-1 [369 kB]
Get:85 http://172.17.0.1/private bullseye-staging/main armhf libdbi-perl armhf 1.642-1+b1 [766 kB]
Get:86 http://172.17.0.1/private bullseye-staging/main armhf libdbd-sqlite3-perl armhf 1.62-3 [169 kB]
Get:87 http://172.17.0.1/private bullseye-staging/main armhf liberror-perl all 0.17027-2 [30.9 kB]
Get:88 http://172.17.0.1/private bullseye-staging/main armhf libtimedate-perl all 2.3000-2 [42.2 kB]
Get:89 http://172.17.0.1/private bullseye-staging/main armhf libhttp-date-perl all 6.02-1 [10.7 kB]
Get:90 http://172.17.0.1/private bullseye-staging/main armhf libio-pty-perl armhf 1:1.08-1.1+b4 [33.0 kB]
Get:91 http://172.17.0.1/private bullseye-staging/main armhf perl-openssl-defaults armhf 3 [6782 B]
Get:92 http://172.17.0.1/private bullseye-staging/main armhf libnet-ssleay-perl armhf 1.88-1 [298 kB]
Get:93 http://172.17.0.1/private bullseye-staging/main armhf libio-socket-ssl-perl all 2.066-1 [210 kB]
Get:94 http://172.17.0.1/private bullseye-staging/main armhf libnet-smtp-ssl-perl all 1.04-1 [6184 B]
Get:95 http://172.17.0.1/private bullseye-staging/main armhf libmailtools-perl all 2.21-1 [95.5 kB]
Get:96 http://172.17.0.1/private bullseye-staging/main armhf libpcre2-16-0 armhf 10.32-5 [175 kB]
Get:97 http://172.17.0.1/private bullseye-staging/main armhf libpcre2-32-0 armhf 10.32-5 [168 kB]
Get:98 http://172.17.0.1/private bullseye-staging/main armhf libpcre2-8-0 armhf 10.32-5 [184 kB]
Get:99 http://172.17.0.1/private bullseye-staging/main armhf libpcre2-posix0 armhf 10.32-5 [38.3 kB]
Get:100 http://172.17.0.1/private bullseye-staging/main armhf libpcre2-dev armhf 10.32-5 [572 kB]
Get:101 http://172.17.0.1/private bullseye-staging/main armhf libserf-1-1 armhf 1.3.9-7 [45.6 kB]
Get:102 http://172.17.0.1/private bullseye-staging/main armhf libutf8proc2 armhf 2.3.0-1 [52.6 kB]
Get:103 http://172.17.0.1/private bullseye-staging/main armhf libsvn1 armhf 1.10.6-1 [1175 kB]
Get:104 http://172.17.0.1/private bullseye-staging/main armhf libsvn-perl armhf 1.10.6-1 [937 kB]
Get:105 http://172.17.0.1/private bullseye-staging/main armhf libtcl8.6 armhf 8.6.9+dfsg-2 [878 kB]
Get:106 http://172.17.0.1/private bullseye-staging/main armhf libyaml-perl all 1.29-1 [67.4 kB]
Get:107 http://172.17.0.1/private bullseye-staging/main armhf subversion armhf 1.10.6-1 [985 kB]
Get:108 http://172.17.0.1/private bullseye-staging/main armhf tcl8.6 armhf 8.6.9+dfsg-2 [123 kB]
Get:109 http://172.17.0.1/private bullseye-staging/main armhf tcl armhf 8.6.9+1 [5636 B]
Get:110 http://172.17.0.1/private bullseye-staging/main armhf unzip armhf 6.0-25 [152 kB]
Get:111 http://172.17.0.1/private bullseye-staging/main armhf zlib1g-dev armhf 1:1.2.11.dfsg-1 [206 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 40.8 MB in 5s (7708 kB/s)
Selecting previously unselected package libbsd0:armhf.
(Reading database ... 12050 files and directories currently installed.)
Preparing to unpack .../00-libbsd0_0.9.1-2_armhf.deb ...
Unpacking libbsd0:armhf (0.9.1-2) ...
Selecting previously unselected package libtinfo5:armhf.
Preparing to unpack .../01-libtinfo5_6.1+20190713-2_armhf.deb ...
Unpacking libtinfo5:armhf (6.1+20190713-2) ...
Selecting previously unselected package bsdmainutils.
Preparing to unpack .../02-bsdmainutils_11.1.2_armhf.deb ...
Unpacking bsdmainutils (11.1.2) ...
Selecting previously unselected package libuchardet0:armhf.
Preparing to unpack .../03-libuchardet0_0.0.6-3_armhf.deb ...
Unpacking libuchardet0:armhf (0.0.6-3) ...
Selecting previously unselected package groff-base.
Preparing to unpack .../04-groff-base_1.22.4-3_armhf.deb ...
Unpacking groff-base (1.22.4-3) ...
Selecting previously unselected package libpipeline1:armhf.
Preparing to unpack .../05-libpipeline1_1.5.1-2_armhf.deb ...
Unpacking libpipeline1:armhf (1.5.1-2) ...
Selecting previously unselected package man-db.
Preparing to unpack .../06-man-db_2.8.6.1-1_armhf.deb ...
Unpacking man-db (2.8.6.1-1) ...
Selecting previously unselected package libpython2.7-minimal:armhf.
Preparing to unpack .../07-libpython2.7-minimal_2.7.16-3_armhf.deb ...
Unpacking libpython2.7-minimal:armhf (2.7.16-3) ...
Selecting previously unselected package python2.7-minimal.
Preparing to unpack .../08-python2.7-minimal_2.7.16-3_armhf.deb ...
Unpacking python2.7-minimal (2.7.16-3) ...
Selecting previously unselected package python2-minimal.
Preparing to unpack .../09-python2-minimal_2.7.16-1_armhf.deb ...
Unpacking python2-minimal (2.7.16-1) ...
Selecting previously unselected package python-minimal.
Preparing to unpack .../10-python-minimal_2.7.16-1_armhf.deb ...
Unpacking python-minimal (2.7.16-1) ...
Selecting previously unselected package libssl1.1:armhf.
Preparing to unpack .../11-libssl1.1_1.1.1c-1_armhf.deb ...
Unpacking libssl1.1:armhf (1.1.1c-1) ...
Selecting previously unselected package mime-support.
Preparing to unpack .../12-mime-support_3.62_all.deb ...
Unpacking mime-support (3.62) ...
Selecting previously unselected package libexpat1:armhf.
Preparing to unpack .../13-libexpat1_2.2.7-1_armhf.deb ...
Unpacking libexpat1:armhf (2.2.7-1) ...
Preparing to unpack .../14-libtinfo6_6.1+20190713-2_armhf.deb ...
Unpacking libtinfo6:armhf (6.1+20190713-2) over (6.1+20181013-2) ...
Setting up libtinfo6:armhf (6.1+20190713-2) ...
(Reading database ... 12981 files and directories currently installed.)
Preparing to unpack .../libncursesw6_6.1+20190713-2_armhf.deb ...
Unpacking libncursesw6:armhf (6.1+20190713-2) over (6.1+20181013-2) ...
Setting up libncursesw6:armhf (6.1+20190713-2) ...
Selecting previously unselected package libreadline8:armhf.
(Reading database ... 12981 files and directories currently installed.)
Preparing to unpack .../libreadline8_8.0-2_armhf.deb ...
Unpacking libreadline8:armhf (8.0-2) ...
Selecting previously unselected package libpython2.7-stdlib:armhf.
Preparing to unpack .../libpython2.7-stdlib_2.7.16-3_armhf.deb ...
Unpacking libpython2.7-stdlib:armhf (2.7.16-3) ...
Selecting previously unselected package python2.7.
Preparing to unpack .../python2.7_2.7.16-3_armhf.deb ...
Unpacking python2.7 (2.7.16-3) ...
Selecting previously unselected package libpython2-stdlib:armhf.
Preparing to unpack .../libpython2-stdlib_2.7.16-1_armhf.deb ...
Unpacking libpython2-stdlib:armhf (2.7.16-1) ...
Selecting previously unselected package libpython-stdlib:armhf.
Preparing to unpack .../libpython-stdlib_2.7.16-1_armhf.deb ...
Unpacking libpython-stdlib:armhf (2.7.16-1) ...
Setting up libpython2.7-minimal:armhf (2.7.16-3) ...
Setting up python2.7-minimal (2.7.16-3) ...
Setting up python2-minimal (2.7.16-1) ...
Selecting previously unselected package python2.
(Reading database ... 13511 files and directories currently installed.)
Preparing to unpack .../python2_2.7.16-1_armhf.deb ...
Unpacking python2 (2.7.16-1) ...
Setting up python-minimal (2.7.16-1) ...
Selecting previously unselected package python.
(Reading database ... 13544 files and directories currently installed.)
Preparing to unpack .../python_2.7.16-1_armhf.deb ...
Unpacking python (2.7.16-1) ...
Preparing to unpack .../libgnutls30_3.6.8-2_armhf.deb ...
Unpacking libgnutls30:armhf (3.6.8-2) over (3.6.7-4) ...
Setting up libgnutls30:armhf (3.6.8-2) ...
(Reading database ... 13558 files and directories currently installed.)
Preparing to unpack .../libldap-2.4-2_2.4.48+dfsg-1_armhf.deb ...
Unpacking libldap-2.4-2:armhf (2.4.48+dfsg-1) over (2.4.47+dfsg-3+rpi1) ...
Setting up libldap-2.4-2:armhf (2.4.48+dfsg-1) ...
(Reading database ... 13558 files and directories currently installed.)
Preparing to unpack .../libuuid1_2.34-0.1_armhf.deb ...
Unpacking libuuid1:armhf (2.34-0.1) over (2.33.1-0.1) ...
Setting up libuuid1:armhf (2.34-0.1) ...
Selecting previously unselected package sensible-utils.
(Reading database ... 13558 files and directories currently installed.)
Preparing to unpack .../00-sensible-utils_0.0.12_all.deb ...
Unpacking sensible-utils (0.0.12) ...
Selecting previously unselected package libmagic-mgc.
Preparing to unpack .../01-libmagic-mgc_1%3a5.37-5_armhf.deb ...
Unpacking libmagic-mgc (1:5.37-5) ...
Selecting previously unselected package libmagic1:armhf.
Preparing to unpack .../02-libmagic1_1%3a5.37-5_armhf.deb ...
Unpacking libmagic1:armhf (1:5.37-5) ...
Selecting previously unselected package file.
Preparing to unpack .../03-file_1%3a5.37-5_armhf.deb ...
Unpacking file (1:5.37-5) ...
Selecting previously unselected package gettext-base.
Preparing to unpack .../04-gettext-base_0.19.8.1-9_armhf.deb ...
Unpacking gettext-base (0.19.8.1-9) ...
Selecting previously unselected package autotools-dev.
Preparing to unpack .../05-autotools-dev_20180224.1_all.deb ...
Unpacking autotools-dev (20180224.1) ...
Selecting previously unselected package libsigsegv2:armhf.
Preparing to unpack .../06-libsigsegv2_2.12-2_armhf.deb ...
Unpacking libsigsegv2:armhf (2.12-2) ...
Selecting previously unselected package m4.
Preparing to unpack .../07-m4_1.4.18-2_armhf.deb ...
Unpacking m4 (1.4.18-2) ...
Selecting previously unselected package autoconf.
Preparing to unpack .../08-autoconf_2.69-11_all.deb ...
Unpacking autoconf (2.69-11) ...
Selecting previously unselected package automake.
Preparing to unpack .../09-automake_1%3a1.16.1-4_all.deb ...
Unpacking automake (1:1.16.1-4) ...
Selecting previously unselected package autopoint.
Preparing to unpack .../10-autopoint_0.19.8.1-9_all.deb ...
Unpacking autopoint (0.19.8.1-9) ...
Selecting previously unselected package libtool.
Preparing to unpack .../11-libtool_2.4.6-9_all.deb ...
Unpacking libtool (2.4.6-9) ...
Selecting previously unselected package dh-autoreconf.
Preparing to unpack .../12-dh-autoreconf_19_all.deb ...
Unpacking dh-autoreconf (19) ...
Selecting previously unselected package libarchive-zip-perl.
Preparing to unpack .../13-libarchive-zip-perl_1.64-1_all.deb ...
Unpacking libarchive-zip-perl (1.64-1) ...
Selecting previously unselected package libsub-override-perl.
Preparing to unpack .../14-libsub-override-perl_0.09-2_all.deb ...
Unpacking libsub-override-perl (0.09-2) ...
Selecting previously unselected package libfile-stripnondeterminism-perl.
Preparing to unpack .../15-libfile-stripnondeterminism-perl_1.4.0-1_all.deb ...
Unpacking libfile-stripnondeterminism-perl (1.4.0-1) ...
Selecting previously unselected package dh-strip-nondeterminism.
Preparing to unpack .../16-dh-strip-nondeterminism_1.4.0-1_all.deb ...
Unpacking dh-strip-nondeterminism (1.4.0-1) ...
Selecting previously unselected package libelf1:armhf.
Preparing to unpack .../17-libelf1_0.176-1.1_armhf.deb ...
Unpacking libelf1:armhf (0.176-1.1) ...
Selecting previously unselected package dwz.
Preparing to unpack .../18-dwz_0.12.20190723-1_armhf.deb ...
Unpacking dwz (0.12.20190723-1) ...
Selecting previously unselected package libglib2.0-0:armhf.
Preparing to unpack .../19-libglib2.0-0_2.60.6-1_armhf.deb ...
Unpacking libglib2.0-0:armhf (2.60.6-1) ...
Selecting previously unselected package libicu63:armhf.
Preparing to unpack .../20-libicu63_63.2-2_armhf.deb ...
Unpacking libicu63:armhf (63.2-2) ...
Selecting previously unselected package libxml2:armhf.
Preparing to unpack .../21-libxml2_2.9.4+dfsg1-7+b2_armhf.deb ...
Unpacking libxml2:armhf (2.9.4+dfsg1-7+b2) ...
Selecting previously unselected package libcroco3:armhf.
Preparing to unpack .../22-libcroco3_0.6.12-3_armhf.deb ...
Unpacking libcroco3:armhf (0.6.12-3) ...
Selecting previously unselected package libncurses6:armhf.
Preparing to unpack .../23-libncurses6_6.1+20190713-2_armhf.deb ...
Unpacking libncurses6:armhf (6.1+20190713-2) ...
Selecting previously unselected package gettext.
Preparing to unpack .../24-gettext_0.19.8.1-9_armhf.deb ...
Unpacking gettext (0.19.8.1-9) ...
Selecting previously unselected package intltool-debian.
Preparing to unpack .../25-intltool-debian_0.35.0+20060710.5_all.deb ...
Unpacking intltool-debian (0.35.0+20060710.5) ...
Selecting previously unselected package po-debconf.
Preparing to unpack .../26-po-debconf_1.0.21_all.deb ...
Unpacking po-debconf (1.0.21) ...
Selecting previously unselected package debhelper.
Preparing to unpack .../27-debhelper_12.3_all.deb ...
Unpacking debhelper (12.3) ...
Selecting previously unselected package libapr1:armhf.
Preparing to unpack .../28-libapr1_1.6.5-1_armhf.deb ...
Unpacking libapr1:armhf (1.6.5-1) ...
Selecting previously unselected package uuid-dev:armhf.
Preparing to unpack .../29-uuid-dev_2.34-0.1_armhf.deb ...
Unpacking uuid-dev:armhf (2.34-0.1) ...
Selecting previously unselected package libsctp1:armhf.
Preparing to unpack .../30-libsctp1_1.0.18+dfsg-1_armhf.deb ...
Unpacking libsctp1:armhf (1.0.18+dfsg-1) ...
Selecting previously unselected package libsctp-dev:armhf.
Preparing to unpack .../31-libsctp-dev_1.0.18+dfsg-1_armhf.deb ...
Unpacking libsctp-dev:armhf (1.0.18+dfsg-1) ...
Selecting previously unselected package libapr1-dev.
Preparing to unpack .../32-libapr1-dev_1.6.5-1_armhf.deb ...
Unpacking libapr1-dev (1.6.5-1) ...
Selecting previously unselected package libaprutil1:armhf.
Preparing to unpack .../33-libaprutil1_1.6.1-4_armhf.deb ...
Unpacking libaprutil1:armhf (1.6.1-4) ...
Selecting previously unselected package libldap2-dev:armhf.
Preparing to unpack .../34-libldap2-dev_2.4.48+dfsg-1_armhf.deb ...
Unpacking libldap2-dev:armhf (2.4.48+dfsg-1) ...
Selecting previously unselected package libexpat1-dev:armhf.
Preparing to unpack .../35-libexpat1-dev_2.2.7-1_armhf.deb ...
Unpacking libexpat1-dev:armhf (2.2.7-1) ...
Selecting previously unselected package libaprutil1-dev.
Preparing to unpack .../36-libaprutil1-dev_1.6.1-4_armhf.deb ...
Unpacking libaprutil1-dev (1.6.1-4) ...
Selecting previously unselected package openssl.
Preparing to unpack .../37-openssl_1.1.1c-1_armhf.deb ...
Unpacking openssl (1.1.1c-1) ...
Selecting previously unselected package apache2-dev.
Preparing to unpack .../38-apache2-dev_2.4.38-3_armhf.deb ...
Unpacking apache2-dev (2.4.38-3) ...
Selecting previously unselected package libkeyutils1:armhf.
Preparing to unpack .../39-libkeyutils1_1.6-6_armhf.deb ...
Unpacking libkeyutils1:armhf (1.6-6) ...
Selecting previously unselected package libkrb5support0:armhf.
Preparing to unpack .../40-libkrb5support0_1.17-6+b1_armhf.deb ...
Unpacking libkrb5support0:armhf (1.17-6+b1) ...
Selecting previously unselected package libk5crypto3:armhf.
Preparing to unpack .../41-libk5crypto3_1.17-6+b1_armhf.deb ...
Unpacking libk5crypto3:armhf (1.17-6+b1) ...
Selecting previously unselected package libkrb5-3:armhf.
Preparing to unpack .../42-libkrb5-3_1.17-6+b1_armhf.deb ...
Unpacking libkrb5-3:armhf (1.17-6+b1) ...
Selecting previously unselected package libgssapi-krb5-2:armhf.
Preparing to unpack .../43-libgssapi-krb5-2_1.17-6+b1_armhf.deb ...
Unpacking libgssapi-krb5-2:armhf (1.17-6+b1) ...
Selecting previously unselected package cvs.
Preparing to unpack .../44-cvs_2%3a1.12.13+real-27_armhf.deb ...
Unpacking cvs (2:1.12.13+real-27) ...
Selecting previously unselected package cvsps.
Preparing to unpack .../45-cvsps_2.1-8_armhf.deb ...
Unpacking cvsps (2.1-8) ...
Selecting previously unselected package dh-exec.
Preparing to unpack .../46-dh-exec_0.23.2_armhf.deb ...
Unpacking dh-exec (0.23.2) ...
Selecting previously unselected package libhtml-tagset-perl.
Preparing to unpack .../47-libhtml-tagset-perl_3.20-3_all.deb ...
Unpacking libhtml-tagset-perl (3.20-3) ...
Selecting previously unselected package liburi-perl.
Preparing to unpack .../48-liburi-perl_1.76-1_all.deb ...
Unpacking liburi-perl (1.76-1) ...
Selecting previously unselected package libhtml-parser-perl.
Preparing to unpack .../49-libhtml-parser-perl_3.72-3+b2_armhf.deb ...
Unpacking libhtml-parser-perl (3.72-3+b2) ...
Selecting previously unselected package libcgi-pm-perl.
Preparing to unpack .../50-libcgi-pm-perl_4.44-1_all.deb ...
Unpacking libcgi-pm-perl (4.44-1) ...
Selecting previously unselected package libnghttp2-14:armhf.
Preparing to unpack .../51-libnghttp2-14_1.37.0-1+b1_armhf.deb ...
Unpacking libnghttp2-14:armhf (1.37.0-1+b1) ...
Selecting previously unselected package libpsl5:armhf.
Preparing to unpack .../52-libpsl5_0.20.2-2_armhf.deb ...
Unpacking libpsl5:armhf (0.20.2-2) ...
Selecting previously unselected package librtmp1:armhf.
Preparing to unpack .../53-librtmp1_2.4+20151223.gitfa8646d.1-2_armhf.deb ...
Unpacking librtmp1:armhf (2.4+20151223.gitfa8646d.1-2) ...
Selecting previously unselected package libssh2-1:armhf.
Preparing to unpack .../54-libssh2-1_1.8.0-2.1_armhf.deb ...
Unpacking libssh2-1:armhf (1.8.0-2.1) ...
Selecting previously unselected package libcurl3-gnutls:armhf.
Preparing to unpack .../55-libcurl3-gnutls_7.65.1-1_armhf.deb ...
Unpacking libcurl3-gnutls:armhf (7.65.1-1) ...
Selecting previously unselected package libcurl4-gnutls-dev:armhf.
Preparing to unpack .../56-libcurl4-gnutls-dev_7.65.1-1_armhf.deb ...
Unpacking libcurl4-gnutls-dev:armhf (7.65.1-1) ...
Selecting previously unselected package libdbi-perl:armhf.
Preparing to unpack .../57-libdbi-perl_1.642-1+b1_armhf.deb ...
Unpacking libdbi-perl:armhf (1.642-1+b1) ...
Selecting previously unselected package libdbd-sqlite3-perl:armhf.
Preparing to unpack .../58-libdbd-sqlite3-perl_1.62-3_armhf.deb ...
Unpacking libdbd-sqlite3-perl:armhf (1.62-3) ...
Selecting previously unselected package liberror-perl.
Preparing to unpack .../59-liberror-perl_0.17027-2_all.deb ...
Unpacking liberror-perl (0.17027-2) ...
Selecting previously unselected package libtimedate-perl.
Preparing to unpack .../60-libtimedate-perl_2.3000-2_all.deb ...
Unpacking libtimedate-perl (2.3000-2) ...
Selecting previously unselected package libhttp-date-perl.
Preparing to unpack .../61-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 .../62-libio-pty-perl_1%3a1.08-1.1+b4_armhf.deb ...
Unpacking libio-pty-perl (1:1.08-1.1+b4) ...
Selecting previously unselected package perl-openssl-defaults:armhf.
Preparing to unpack .../63-perl-openssl-defaults_3_armhf.deb ...
Unpacking perl-openssl-defaults:armhf (3) ...
Selecting previously unselected package libnet-ssleay-perl.
Preparing to unpack .../64-libnet-ssleay-perl_1.88-1_armhf.deb ...
Unpacking libnet-ssleay-perl (1.88-1) ...
Selecting previously unselected package libio-socket-ssl-perl.
Preparing to unpack .../65-libio-socket-ssl-perl_2.066-1_all.deb ...
Unpacking libio-socket-ssl-perl (2.066-1) ...
Selecting previously unselected package libnet-smtp-ssl-perl.
Preparing to unpack .../66-libnet-smtp-ssl-perl_1.04-1_all.deb ...
Unpacking libnet-smtp-ssl-perl (1.04-1) ...
Selecting previously unselected package libmailtools-perl.
Preparing to unpack .../67-libmailtools-perl_2.21-1_all.deb ...
Unpacking libmailtools-perl (2.21-1) ...
Selecting previously unselected package libpcre2-16-0:armhf.
Preparing to unpack .../68-libpcre2-16-0_10.32-5_armhf.deb ...
Unpacking libpcre2-16-0:armhf (10.32-5) ...
Selecting previously unselected package libpcre2-32-0:armhf.
Preparing to unpack .../69-libpcre2-32-0_10.32-5_armhf.deb ...
Unpacking libpcre2-32-0:armhf (10.32-5) ...
Selecting previously unselected package libpcre2-8-0:armhf.
Preparing to unpack .../70-libpcre2-8-0_10.32-5_armhf.deb ...
Unpacking libpcre2-8-0:armhf (10.32-5) ...
Selecting previously unselected package libpcre2-posix0:armhf.
Preparing to unpack .../71-libpcre2-posix0_10.32-5_armhf.deb ...
Unpacking libpcre2-posix0:armhf (10.32-5) ...
Selecting previously unselected package libpcre2-dev:armhf.
Preparing to unpack .../72-libpcre2-dev_10.32-5_armhf.deb ...
Unpacking libpcre2-dev:armhf (10.32-5) ...
Selecting previously unselected package libserf-1-1:armhf.
Preparing to unpack .../73-libserf-1-1_1.3.9-7_armhf.deb ...
Unpacking libserf-1-1:armhf (1.3.9-7) ...
Selecting previously unselected package libutf8proc2:armhf.
Preparing to unpack .../74-libutf8proc2_2.3.0-1_armhf.deb ...
Unpacking libutf8proc2:armhf (2.3.0-1) ...
Selecting previously unselected package libsvn1:armhf.
Preparing to unpack .../75-libsvn1_1.10.6-1_armhf.deb ...
Unpacking libsvn1:armhf (1.10.6-1) ...
Selecting previously unselected package libsvn-perl:armhf.
Preparing to unpack .../76-libsvn-perl_1.10.6-1_armhf.deb ...
Unpacking libsvn-perl:armhf (1.10.6-1) ...
Selecting previously unselected package libtcl8.6:armhf.
Preparing to unpack .../77-libtcl8.6_8.6.9+dfsg-2_armhf.deb ...
Unpacking libtcl8.6:armhf (8.6.9+dfsg-2) ...
Selecting previously unselected package libyaml-perl.
Preparing to unpack .../78-libyaml-perl_1.29-1_all.deb ...
Unpacking libyaml-perl (1.29-1) ...
Selecting previously unselected package subversion.
Preparing to unpack .../79-subversion_1.10.6-1_armhf.deb ...
Unpacking subversion (1.10.6-1) ...
Selecting previously unselected package tcl8.6.
Preparing to unpack .../80-tcl8.6_8.6.9+dfsg-2_armhf.deb ...
Unpacking tcl8.6 (8.6.9+dfsg-2) ...
Selecting previously unselected package tcl.
Preparing to unpack .../81-tcl_8.6.9+1_armhf.deb ...
Unpacking tcl (8.6.9+1) ...
Selecting previously unselected package unzip.
Preparing to unpack .../82-unzip_6.0-25_armhf.deb ...
Unpacking unzip (6.0-25) ...
Selecting previously unselected package zlib1g-dev:armhf.
Preparing to unpack .../83-zlib1g-dev_1%3a1.2.11.dfsg-1_armhf.deb ...
Unpacking zlib1g-dev:armhf (1:1.2.11.dfsg-1) ...
Selecting previously unselected package sbuild-build-depends-git-dummy.
Preparing to unpack .../84-sbuild-build-depends-git-dummy_0.invalid.0_armhf.deb ...
Unpacking sbuild-build-depends-git-dummy (0.invalid.0) ...
Setting up libexpat1:armhf (2.2.7-1) ...
Setting up libpipeline1:armhf (1.5.1-2) ...
Setting up libkeyutils1:armhf (1.6-6) ...
Setting up libpsl5:armhf (0.20.2-2) ...
Setting up mime-support (3.62) ...
Setting up libio-pty-perl (1:1.08-1.1+b4) ...
Setting up libmagic-mgc (1:5.37-5) ...
Setting up libarchive-zip-perl (1.64-1) ...
Setting up libglib2.0-0:armhf (2.60.6-1) ...
No schema files found: doing nothing.
Setting up libssl1.1:armhf (1.1.1c-1) ...
Setting up libhtml-tagset-perl (3.20-3) ...
Setting up unzip (6.0-25) ...
Setting up libutf8proc2:armhf (2.3.0-1) ...
Setting up libreadline8:armhf (8.0-2) ...
Setting up libnghttp2-14:armhf (1.37.0-1+b1) ...
Setting up libmagic1:armhf (1:5.37-5) ...
Setting up libapr1:armhf (1.6.5-1) ...
Setting up perl-openssl-defaults:armhf (3) ...
Setting up gettext-base (0.19.8.1-9) ...
Setting up file (1:5.37-5) ...
Setting up libyaml-perl (1.29-1) ...
Setting up libpcre2-16-0:armhf (10.32-5) ...
Setting up libicu63:armhf (63.2-2) ...
Setting up libkrb5support0:armhf (1.17-6+b1) ...
Setting up libpython2.7-stdlib:armhf (2.7.16-3) ...
Setting up liberror-perl (0.17027-2) ...
Setting up libldap2-dev:armhf (2.4.48+dfsg-1) ...
Setting up autotools-dev (20180224.1) ...
Setting up libpcre2-32-0:armhf (10.32-5) ...
Setting up libexpat1-dev:armhf (2.2.7-1) ...
Setting up librtmp1:armhf (2.4+20151223.gitfa8646d.1-2) ...
Setting up uuid-dev:armhf (2.34-0.1) ...
Setting up libncurses6:armhf (6.1+20190713-2) ...
Setting up libsigsegv2:armhf (2.12-2) ...
Setting up libtcl8.6:armhf (8.6.9+dfsg-2) ...
Setting up autopoint (0.19.8.1-9) ...
Setting up libpcre2-8-0:armhf (10.32-5) ...
Setting up libk5crypto3:armhf (1.17-6+b1) ...
Setting up libtimedate-perl (2.3000-2) ...
Setting up zlib1g-dev:armhf (1:1.2.11.dfsg-1) ...
Setting up libsctp1:armhf (1.0.18+dfsg-1) ...
Setting up sensible-utils (0.0.12) ...
Setting up libuchardet0:armhf (0.0.6-3) ...
Setting up libsub-override-perl (0.09-2) ...
Setting up libssh2-1:armhf (1.8.0-2.1) ...
Setting up libkrb5-3:armhf (1.17-6+b1) ...
Setting up openssl (1.1.1c-1) ...
Setting up libbsd0:armhf (0.9.1-2) ...
Setting up libtinfo5:armhf (6.1+20190713-2) ...
Setting up libelf1:armhf (0.176-1.1) ...
Setting up libxml2:armhf (2.9.4+dfsg1-7+b2) ...
Setting up liburi-perl (1.76-1) ...
Setting up libdbi-perl:armhf (1.642-1+b1) ...
Setting up libaprutil1:armhf (1.6.1-4) ...
Setting up libnet-ssleay-perl (1.88-1) ...
Setting up libfile-stripnondeterminism-perl (1.4.0-1) ...
Setting up libhttp-date-perl (6.02-1) ...
Setting up tcl8.6 (8.6.9+dfsg-2) ...
Setting up python2.7 (2.7.16-3) ...
Setting up libtool (2.4.6-9) ...
Setting up libpython2-stdlib:armhf (2.7.16-1) ...
Setting up m4 (1.4.18-2) ...
Setting up python2 (2.7.16-1) ...
Setting up libpython-stdlib:armhf (2.7.16-1) ...
Setting up libpcre2-posix0:armhf (10.32-5) ...
Setting up bsdmainutils (11.1.2) ...
update-alternatives: using /usr/bin/bsd-write to provide /usr/bin/write (write) in auto mode
update-alternatives: using /usr/bin/bsd-from to provide /usr/bin/from (from) in auto mode
Setting up libgssapi-krb5-2:armhf (1.17-6+b1) ...
Setting up libcroco3:armhf (0.6.12-3) ...
Setting up libsctp-dev:armhf (1.0.18+dfsg-1) ...
Setting up autoconf (2.69-11) ...
Setting up dwz (0.12.20190723-1) ...
Setting up groff-base (1.22.4-3) ...
Setting up libhtml-parser-perl (3.72-3+b2) ...
Setting up tcl (8.6.9+1) ...
Setting up libdbd-sqlite3-perl:armhf (1.62-3) ...
Setting up python (2.7.16-1) ...
Setting up libio-socket-ssl-perl (2.066-1) ...
Setting up automake (1:1.16.1-4) ...
update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode
Setting up gettext (0.19.8.1-9) ...
Setting up libpcre2-dev:armhf (10.32-5) ...
Setting up cvs (2:1.12.13+real-27) ...
Allowing use of questionable username.
Adding group `_cvsadmin' (GID 115) ...
Done.
Setting up libcgi-pm-perl (4.44-1) ...
Setting up libserf-1-1:armhf (1.3.9-7) ...
Setting up libcurl3-gnutls:armhf (7.65.1-1) ...
Setting up libcurl4-gnutls-dev:armhf (7.65.1-1) ...
Setting up man-db (2.8.6.1-1) ...
Not building database; man-db/auto-update is not 'true'.
Setting up intltool-debian (0.35.0+20060710.5) ...
Setting up libnet-smtp-ssl-perl (1.04-1) ...
Setting up libmailtools-perl (2.21-1) ...
Setting up libapr1-dev (1.6.5-1) ...
Setting up libaprutil1-dev (1.6.1-4) ...
Setting up cvsps (2.1-8) ...
Setting up libsvn1:armhf (1.10.6-1) ...
Setting up libsvn-perl:armhf (1.10.6-1) ...
Setting up po-debconf (1.0.21) ...
Setting up subversion (1.10.6-1) ...
Setting up dh-autoreconf (19) ...
Setting up debhelper (12.3) ...
Setting up dh-exec (0.23.2) ...
Setting up dh-strip-nondeterminism (1.4.0-1) ...
Setting up apache2-dev (2.4.38-3) ...
Setting up sbuild-build-depends-git-dummy (0.invalid.0) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
W: No sandbox user '_apt' on the system, can not drop privileges
+------------------------------------------------------------------------------+
| Build environment |
+------------------------------------------------------------------------------+
Kernel: Linux 4.4.0-124-generic armhf (armv8l)
Toolchain package versions: binutils_2.31.1-16+rpi1 dpkg-dev_1.19.7 g++-8_8.3.0-6+rpi1 gcc-8_8.3.0-6+rpi1 libc6-dev_2.28-10+rpi1 libstdc++-8-dev_8.3.0-6+rpi1 libstdc++6_8.3.0-6+rpi1 linux-libc-dev_4.18.20-2+rpi1
Package versions: adduser_3.118 apache2-dev_2.4.38-3 apt_1.8.2 autoconf_2.69-11 automake_1:1.16.1-4 autopoint_0.19.8.1-9 autotools-dev_20180224.1 base-files_10.3+rpi1 base-passwd_3.5.46 bash_5.0-4 binutils_2.31.1-16+rpi1 binutils-arm-linux-gnueabihf_2.31.1-16+rpi1 binutils-common_2.31.1-16+rpi1 bsdmainutils_11.1.2 bsdutils_1:2.33.1-0.1 build-essential_12.6 bzip2_1.0.6-9.1 coreutils_8.30-3 cpp_4:8.3.0-1+rpi2 cpp-8_8.3.0-6+rpi1 cvs_2:1.12.13+real-27 cvsps_2.1-8 dash_0.5.10.2-5 debconf_1.5.71 debhelper_12.3 debianutils_4.8.6.1 dh-autoreconf_19 dh-exec_0.23.2 dh-strip-nondeterminism_1.4.0-1 diffutils_1:3.7-3 dirmngr_2.2.12-1+rpi1 dpkg_1.19.7 dpkg-dev_1.19.7 dwz_0.12.20190723-1 e2fsprogs_1.44.5-1 fakeroot_1.23-1 fdisk_2.33.1-0.1 file_1:5.37-5 findutils_4.6.0+git+20190209-2 g++_4:8.3.0-1+rpi2 g++-8_8.3.0-6+rpi1 gcc_4:8.3.0-1+rpi2 gcc-4.9-base_4.9.4-2+rpi1+b19 gcc-5-base_5.5.0-8 gcc-6-base_6.5.0-1+rpi1+b1 gcc-7-base_7.3.0-19 gcc-8_8.3.0-6+rpi1 gcc-8-base_8.3.0-6+rpi1 gettext_0.19.8.1-9 gettext-base_0.19.8.1-9 gnupg_2.2.12-1+rpi1 gnupg-l10n_2.2.12-1+rpi1 gnupg-utils_2.2.12-1+rpi1 gpg_2.2.12-1+rpi1 gpg-agent_2.2.12-1+rpi1 gpg-wks-client_2.2.12-1+rpi1 gpg-wks-server_2.2.12-1+rpi1 gpgconf_2.2.12-1+rpi1 gpgsm_2.2.12-1+rpi1 gpgv_2.2.12-1+rpi1 grep_3.3-1 groff-base_1.22.4-3 gzip_1.9-3 hostname_3.21 init-system-helpers_1.56+nmu1 intltool-debian_0.35.0+20060710.5 libacl1_2.2.53-4 libapr1_1.6.5-1 libapr1-dev_1.6.5-1 libaprutil1_1.6.1-4 libaprutil1-dev_1.6.1-4 libapt-pkg5.0_1.8.2 libarchive-zip-perl_1.64-1 libasan5_8.3.0-6+rpi1 libassuan0_2.5.2-1 libatomic1_8.3.0-6+rpi1 libattr1_1:2.4.48-4 libaudit-common_1:2.8.4-3 libaudit1_1:2.8.4-3 libbinutils_2.31.1-16+rpi1 libblkid1_2.33.1-0.1 libbsd0_0.9.1-2 libbz2-1.0_1.0.6-9.1 libc-bin_2.28-10+rpi1 libc-dev-bin_2.28-10+rpi1 libc6_2.28-10+rpi1 libc6-dev_2.28-10+rpi1 libcap-ng0_0.7.9-2 libcc1-0_8.3.0-6+rpi1 libcgi-pm-perl_4.44-1 libcom-err2_1.44.5-1 libcroco3_0.6.12-3 libcurl3-gnutls_7.65.1-1 libcurl4-gnutls-dev_7.65.1-1 libdb5.3_5.3.28+dfsg1-0.5 libdbd-sqlite3-perl_1.62-3 libdbi-perl_1.642-1+b1 libdebconfclient0_0.249 libdpkg-perl_1.19.7 libelf1_0.176-1.1 liberror-perl_0.17027-2 libexpat1_2.2.7-1 libexpat1-dev_2.2.7-1 libext2fs2_1.44.5-1 libfakeroot_1.23-1 libfdisk1_2.33.1-0.1 libffi6_3.2.1-9 libfile-stripnondeterminism-perl_1.4.0-1 libgcc-8-dev_8.3.0-6+rpi1 libgcc1_1:8.3.0-6+rpi1 libgcrypt20_1.8.4-5 libgdbm-compat4_1.18.1-4 libgdbm6_1.18.1-4 libglib2.0-0_2.60.6-1 libgmp10_2:6.1.2+dfsg-4 libgnutls30_3.6.8-2 libgomp1_8.3.0-6+rpi1 libgpg-error0_1.35-1 libgssapi-krb5-2_1.17-6+b1 libhogweed4_3.4.1-1 libhtml-parser-perl_3.72-3+b2 libhtml-tagset-perl_3.20-3 libhttp-date-perl_6.02-1 libicu63_63.2-2 libidn2-0_2.0.5-1 libio-pty-perl_1:1.08-1.1+b4 libio-socket-ssl-perl_2.066-1 libisl19_0.20-2 libk5crypto3_1.17-6+b1 libkeyutils1_1.6-6 libkrb5-3_1.17-6+b1 libkrb5support0_1.17-6+b1 libksba8_1.3.5-2 libldap-2.4-2_2.4.48+dfsg-1 libldap-common_2.4.47+dfsg-3+rpi1 libldap2-dev_2.4.48+dfsg-1 liblocale-gettext-perl_1.07-3+b3 liblz4-1_1.8.3-1 liblzma5_5.2.4-1 libmagic-mgc_1:5.37-5 libmagic1_1:5.37-5 libmailtools-perl_2.21-1 libmount1_2.33.1-0.1 libmpc3_1.1.0-1 libmpfr6_4.0.2-1 libncurses6_6.1+20190713-2 libncursesw6_6.1+20190713-2 libnet-smtp-ssl-perl_1.04-1 libnet-ssleay-perl_1.88-1 libnettle6_3.4.1-1 libnghttp2-14_1.37.0-1+b1 libnpth0_1.6-1 libp11-kit0_0.23.15-2 libpam-modules_1.3.1-5 libpam-modules-bin_1.3.1-5 libpam-runtime_1.3.1-5 libpam0g_1.3.1-5 libpcre2-16-0_10.32-5 libpcre2-32-0_10.32-5 libpcre2-8-0_10.32-5 libpcre2-dev_10.32-5 libpcre2-posix0_10.32-5 libpcre3_2:8.39-12 libperl5.28_5.28.1-6 libpipeline1_1.5.1-2 libpsl5_0.20.2-2 libpython-stdlib_2.7.16-1 libpython2-stdlib_2.7.16-1 libpython2.7-minimal_2.7.16-3 libpython2.7-stdlib_2.7.16-3 libreadline7_7.0-5 libreadline8_8.0-2 librtmp1_2.4+20151223.gitfa8646d.1-2 libsasl2-2_2.1.27+dfsg-1+b1 libsasl2-modules-db_2.1.27+dfsg-1+b1 libsctp-dev_1.0.18+dfsg-1 libsctp1_1.0.18+dfsg-1 libseccomp2_2.3.3-4 libselinux1_2.8-1+b1 libsemanage-common_2.8-2 libsemanage1_2.8-2 libsepol1_2.8-1 libserf-1-1_1.3.9-7 libsigsegv2_2.12-2 libsmartcols1_2.33.1-0.1 libsqlite3-0_3.27.2-3 libss2_1.44.5-1 libssh2-1_1.8.0-2.1 libssl1.1_1.1.1c-1 libstdc++-8-dev_8.3.0-6+rpi1 libstdc++6_8.3.0-6+rpi1 libsub-override-perl_0.09-2 libsvn-perl_1.10.6-1 libsvn1_1.10.6-1 libsystemd0_241-5+rpi1 libtasn1-6_4.13-3 libtcl8.6_8.6.9+dfsg-2 libtext-charwidth-perl_0.04-7.1+b1 libtext-iconv-perl_1.7-5+b10 libtext-wrapi18n-perl_0.06-7.1 libtimedate-perl_2.3000-2 libtinfo5_6.1+20190713-2 libtinfo6_6.1+20190713-2 libtool_2.4.6-9 libubsan1_8.3.0-6+rpi1 libuchardet0_0.0.6-3 libudev1_241-5+rpi1 libunistring2_0.9.10-1 liburi-perl_1.76-1 libutf8proc2_2.3.0-1 libuuid1_2.34-0.1 libxml2_2.9.4+dfsg1-7+b2 libyaml-perl_1.29-1 libzstd1_1.3.8+dfsg-3+rpi1 linux-libc-dev_4.18.20-2+rpi1 login_1:4.5-1.1 lsb-base_10.2019051400+rpi1 m4_1.4.18-2 make_4.2.1-1.2 man-db_2.8.6.1-1 mawk_1.3.3-17 mime-support_3.62 mount_2.33.1-0.1 ncurses-base_6.1+20181013-2 ncurses-bin_6.1+20181013-2 netbase_5.6 openssl_1.1.1c-1 passwd_1:4.5-1.1 patch_2.7.6-3 perl_5.28.1-6 perl-base_5.28.1-6 perl-modules-5.28_5.28.1-6 perl-openssl-defaults_3 pinentry-curses_1.1.0-2 po-debconf_1.0.21 python_2.7.16-1 python-minimal_2.7.16-1 python2_2.7.16-1 python2-minimal_2.7.16-1 python2.7_2.7.16-3 python2.7-minimal_2.7.16-3 raspbian-archive-keyring_20120528.2 readline-common_7.0-5 sbuild-build-depends-core-dummy_0.invalid.0 sbuild-build-depends-git-dummy_0.invalid.0 sed_4.7-1 sensible-utils_0.0.12 subversion_1.10.6-1 sysvinit-utils_2.93-8 tar_1.30+dfsg-6 tcl_8.6.9+1 tcl8.6_8.6.9+dfsg-2 tzdata_2019a-1 unzip_6.0-25 util-linux_2.33.1-0.1 uuid-dev_2.34-0.1 xz-utils_5.2.4-1 zlib1g_1:1.2.11.dfsg-1 zlib1g-dev_1:1.2.11.dfsg-1
+------------------------------------------------------------------------------+
| Build |
+------------------------------------------------------------------------------+
Unpack source
-------------
gpgv: unknown type of key resource 'trustedkeys.kbx'
gpgv: keyblock resource '/sbuild-nonexistent/.gnupg/trustedkeys.kbx': General error
gpgv: Signature made Sat Aug 3 00:32:49 2019 UTC
gpgv: using RSA key 521E58F17E96D712AA0FF102DFC671EEB333FA25
gpgv: issuer "jrnieder@gmail.com"
gpgv: Can't check signature: No public key
dpkg-source: warning: failed to verify signature on ./git_2.23.0~rc1-1.dsc
dpkg-source: info: extracting git in /<<PKGBUILDDIR>>
dpkg-source: info: unpacking git_2.23.0~rc1.orig.tar.xz
dpkg-source: info: unpacking git_2.23.0~rc1-1.debian.tar.xz
Check disk space
----------------
Sufficient free space for build
User Environment
----------------
APT_CONFIG=/var/lib/sbuild/apt.conf
DEB_BUILD_OPTIONS=parallel=4
HOME=/sbuild-nonexistent
LC_ALL=POSIX
LOGNAME=buildd
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
SCHROOT_ALIAS_NAME=bullseye-staging-armhf-sbuild
SCHROOT_CHROOT_NAME=bullseye-staging-armhf-sbuild
SCHROOT_COMMAND=env
SCHROOT_GID=112
SCHROOT_GROUP=buildd
SCHROOT_SESSION_ID=bullseye-staging-armhf-sbuild-3678b372-ef0d-4882-961a-7c6c420da23a
SCHROOT_UID=107
SCHROOT_USER=buildd
SHELL=/bin/sh
USER=buildd
dpkg-buildpackage
-----------------
dpkg-buildpackage: info: source package git
dpkg-buildpackage: info: source version 1:2.23.0~rc1-1
dpkg-buildpackage: info: source distribution unstable
dpkg-source --before-build .
dpkg-buildpackage: info: host architecture armhf
fakeroot debian/rules clean
dh clean --with apache2
debian/rules override_dh_auto_clean
/usr/bin/make -C contrib/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 SANE_TOOL_PATH= INSTALL=install TAR=tar NO_CROSS_DIRECTORY_HARDLINKS=1 NO_INSTALL_HARDLINKS=1 NO_PERL_CPAN_FALLBACKS=1 DEFAULT_PAGER=pager DEFAULT_EDITOR=editor CC='gcc' CFLAGS='-Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS='-Wl,-z,relro' V=1 USE_LIBPCRE2=1
/usr/bin/make -C ../.. SCRIPT_PERL="contrib/mw-to-git//git-remote-mediawiki.perl contrib/mw-to-git//git-mw.perl" \
clean-perl-script
make[3]: Entering directory '/<<PKGBUILDDIR>>'
GIT_VERSION = 2.23.0.rc1
make[3]: Leaving directory '/<<PKGBUILDDIR>>'
make[3]: Entering directory '/<<PKGBUILDDIR>>'
rm -f contrib/mw-to-git//git-remote-mediawiki contrib/mw-to-git//git-mw
make[3]: Leaving directory '/<<PKGBUILDDIR>>'
/usr/bin/make -C contrib/subtree 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 SANE_TOOL_PATH= INSTALL=install TAR=tar NO_CROSS_DIRECTORY_HARDLINKS=1 NO_INSTALL_HARDLINKS=1 NO_PERL_CPAN_FALLBACKS=1 DEFAULT_PAGER=pager DEFAULT_EDITOR=editor CC='gcc' CFLAGS='-Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS='-Wl,-z,relro' V=1 USE_LIBPCRE2=1
/usr/bin/make -C ../../ GIT-VERSION-FILE
make[3]: 'GIT-VERSION-FILE' is up to date.
make[2]: Entering directory '/<<PKGBUILDDIR>>/contrib/subtree'
rm -f git-subtree
make[2]: Leaving directory '/<<PKGBUILDDIR>>/contrib/subtree'
make[2]: Entering directory '/<<PKGBUILDDIR>>/contrib/subtree'
rm -f *.xml *.html *.1
make[2]: Leaving directory '/<<PKGBUILDDIR>>/contrib/subtree'
/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 SANE_TOOL_PATH= INSTALL=install TAR=tar NO_CROSS_DIRECTORY_HARDLINKS=1 NO_INSTALL_HARDLINKS=1 NO_PERL_CPAN_FALLBACKS=1 DEFAULT_PAGER=pager DEFAULT_EDITOR=editor CC='gcc' CFLAGS='-Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS='-Wl,-z,relro' V=1 USE_LIBPCRE2=1
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f /<<PKGBUILDDIR>>/./*.gcda /<<PKGBUILDDIR>>/builtin/*.gcda /<<PKGBUILDDIR>>/compat/*.gcda /<<PKGBUILDDIR>>/ewah/*.gcda /<<PKGBUILDDIR>>/negotiator/*.gcda /<<PKGBUILDDIR>>/refs/*.gcda /<<PKGBUILDDIR>>/sha1dc/*.gcda /<<PKGBUILDDIR>>/sha256/block/*.gcda /<<PKGBUILDDIR>>/t/helper/*.gcda /<<PKGBUILDDIR>>/trace2/*.gcda /<<PKGBUILDDIR>>/vcs-svn/*.gcda /<<PKGBUILDDIR>>/xdiff/*.gcda
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f ./*.gcov builtin/*.gcov compat/*.gcov ewah/*.gcov negotiator/*.gcov refs/*.gcov sha1dc/*.gcov sha256/block/*.gcov t/helper/*.gcov trace2/*.gcov vcs-svn/*.gcov xdiff/*.gcov
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f contrib/coccinelle/*.cocci.patch*
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f /<<PKGBUILDDIR>>/./*.gcno /<<PKGBUILDDIR>>/builtin/*.gcno /<<PKGBUILDDIR>>/compat/*.gcno /<<PKGBUILDDIR>>/ewah/*.gcno /<<PKGBUILDDIR>>/negotiator/*.gcno /<<PKGBUILDDIR>>/refs/*.gcno /<<PKGBUILDDIR>>/sha1dc/*.gcno /<<PKGBUILDDIR>>/sha256/block/*.gcno /<<PKGBUILDDIR>>/t/helper/*.gcno /<<PKGBUILDDIR>>/trace2/*.gcno /<<PKGBUILDDIR>>/vcs-svn/*.gcno /<<PKGBUILDDIR>>/xdiff/*.gcno
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f ./*.gcda builtin/*.gcda compat/*.gcda ewah/*.gcda negotiator/*.gcda refs/*.gcda sha1dc/*.gcda sha256/block/*.gcda t/helper/*.gcda trace2/*.gcda vcs-svn/*.gcda xdiff/*.gcda
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f coverage-untested-functions
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f -r cover_db/
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f -r cover_db_html/
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f ./*.gcno builtin/*.gcno compat/*.gcno ewah/*.gcno negotiator/*.gcno refs/*.gcno sha1dc/*.gcno sha256/block/*.gcno t/helper/*.gcno trace2/*.gcno vcs-svn/*.gcno xdiff/*.gcno
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f *.res
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f abspath.o advice.o alias.o alloc.o apply.o archive.o archive-tar.o archive-zip.o argv-array.o attr.o base85.o bisect.o blame.o blob.o branch.o bulk-checkin.o bundle.o cache-tree.o chdir-notify.o checkout.o color.o column.o combine-diff.o commit.o commit-graph.o commit-reach.o compat/obstack.o compat/terminal.o config.o connect.o connected.o convert.o copy.o credential.o csum-file.o ctype.o date.o decorate.o delta-islands.o diffcore-break.o diffcore-delta.o diffcore-order.o diffcore-pickaxe.o diffcore-rename.o diff-delta.o diff-lib.o diff-no-index.o diff.o dir.o dir-iterator.o editor.o entry.o environment.o ewah/bitmap.o ewah/ewah_bitmap.o ewah/ewah_io.o ewah/ewah_rlw.o exec-cmd.o fetch-negotiator.o fetch-object.o fetch-pack.o fsck.o fsmonitor.o gettext.o gpg-interface.o graph.o grep.o hashmap.o linear-assignment.o help.o hex.o ident.o interdiff.o json-writer.o kwset.o levenshtein.o line-log.o line-range.o list-objects.o list-objects-filter.o list-objects-filter-options.o ll-merge.o lockfile.o log-tree.o ls-refs.o mailinfo.o mailmap.o match-trees.o mem-pool.o merge.o merge-blobs.o merge-recursive.o mergesort.o midx.o name-hash.o negotiator/default.o negotiator/skipping.o notes.o notes-cache.o notes-merge.o notes-utils.o object.o oidmap.o oidset.o packfile.o pack-bitmap.o pack-bitmap-write.o pack-check.o pack-objects.o pack-revindex.o pack-write.o pager.o parse-options.o parse-options-cb.o patch-delta.o patch-ids.o path.o pathspec.o pkt-line.o preload-index.o pretty.o prio-queue.o progress.o prompt.o protocol.o quote.o range-diff.o reachable.o read-cache.o rebase-interactive.o reflog-walk.o refs.o refs/files-backend.o refs/iterator.o refs/packed-backend.o refs/ref-cache.o refspec.o ref-filter.o remote.o replace-object.o repository.o rerere.o resolve-undo.o revision.o run-command.o send-pack.o sequencer.o serve.o server-info.o setup.o sha1-array.o sha1-lookup.o sha1-file.o sha1-name.o shallow.o sideband.o sigchain.o split-index.o strbuf.o streaming.o string-list.o submodule.o submodule-config.o sub-process.o symlinks.o tag.o tempfile.o thread-utils.o tmp-objdir.o trace.o trace2.o trace2/tr2_cfg.o trace2/tr2_cmd_name.o trace2/tr2_dst.o trace2/tr2_sid.o trace2/tr2_sysenv.o trace2/tr2_tbuf.o trace2/tr2_tgt_event.o trace2/tr2_tgt_normal.o trace2/tr2_tgt_perf.o trace2/tr2_tls.o trailer.o transport.o transport-helper.o tree-diff.o tree.o tree-walk.o unpack-trees.o upload-pack.o url.o urlmatch.o usage.o userdiff.o utf8.o varint.o version.o versioncmp.o walker.o wildmatch.o worktree.o wrapper.o write-or-die.o ws.o wt-status.o xdiff-interface.o zlib.o unix-socket.o sha1dc_git.o sha1dc/sha1.o sha1dc/ubc_check.o sha256/block/sha256.o compat/fopen.o compat/strlcpy.o compat/qsort_s.o builtin/add.o builtin/am.o builtin/annotate.o builtin/apply.o builtin/archive.o builtin/bisect--helper.o builtin/blame.o builtin/branch.o builtin/bundle.o builtin/cat-file.o builtin/check-attr.o builtin/check-ignore.o builtin/check-mailmap.o builtin/check-ref-format.o builtin/checkout-index.o builtin/checkout.o builtin/clean.o builtin/clone.o builtin/column.o builtin/commit-tree.o builtin/commit.o builtin/commit-graph.o builtin/config.o builtin/count-objects.o builtin/credential.o builtin/describe.o builtin/diff-files.o builtin/diff-index.o builtin/diff-tree.o builtin/diff.o builtin/difftool.o builtin/env--helper.o builtin/fast-export.o builtin/fetch-pack.o builtin/fetch.o builtin/fmt-merge-msg.o builtin/for-each-ref.o builtin/fsck.o builtin/gc.o builtin/get-tar-commit-id.o builtin/grep.o builtin/hash-object.o builtin/help.o builtin/index-pack.o builtin/init-db.o builtin/interpret-trailers.o builtin/log.o builtin/ls-files.o builtin/ls-remote.o builtin/ls-tree.o builtin/mailinfo.o builtin/mailsplit.o builtin/merge.o builtin/merge-base.o builtin/merge-file.o builtin/merge-index.o builtin/merge-ours.o builtin/merge-recursive.o builtin/merge-tree.o builtin/mktag.o builtin/mktree.o builtin/multi-pack-index.o builtin/mv.o builtin/name-rev.o builtin/notes.o builtin/pack-objects.o builtin/pack-redundant.o builtin/pack-refs.o builtin/patch-id.o builtin/prune-packed.o builtin/prune.o builtin/pull.o builtin/push.o builtin/range-diff.o builtin/read-tree.o builtin/rebase.o builtin/receive-pack.o builtin/reflog.o builtin/remote.o builtin/remote-ext.o builtin/remote-fd.o builtin/repack.o builtin/replace.o builtin/rerere.o builtin/reset.o builtin/rev-list.o builtin/rev-parse.o builtin/revert.o builtin/rm.o builtin/send-pack.o builtin/shortlog.o builtin/show-branch.o builtin/show-index.o builtin/show-ref.o builtin/stash.o builtin/stripspace.o builtin/submodule--helper.o builtin/symbolic-ref.o builtin/tag.o builtin/unpack-file.o builtin/unpack-objects.o builtin/update-index.o builtin/update-ref.o builtin/update-server-info.o builtin/upload-archive.o builtin/upload-pack.o builtin/var.o builtin/verify-commit.o builtin/verify-pack.o builtin/verify-tag.o builtin/worktree.o builtin/write-tree.o credential-store.o daemon.o fast-import.o http-backend.o imap-send.o sh-i18n--envsubst.o shell.o remote-testsvn.o http-fetch.o http-push.o credential-cache.o credential-cache--daemon.o t/helper/test-fake-ssh.o t/helper/test-line-buffer.o t/helper/test-svn-fe.o t/helper/test-tool.o t/helper/test-chmtime.o t/helper/test-config.o t/helper/test-ctype.o t/helper/test-date.o t/helper/test-delta.o t/helper/test-dir-iterator.o t/helper/test-drop-caches.o t/helper/test-dump-cache-tree.o t/helper/test-dump-fsmonitor.o t/helper/test-dump-split-index.o t/helper/test-dump-untracked-cache.o t/helper/test-example-decorate.o t/helper/test-genrandom.o t/helper/test-genzeros.o t/helper/test-hash.o t/helper/test-hashmap.o t/helper/test-hash-speed.o t/helper/test-index-version.o t/helper/test-json-writer.o t/helper/test-lazy-init-name-hash.o t/helper/test-match-trees.o t/helper/test-mergesort.o t/helper/test-mktemp.o t/helper/test-oidmap.o t/helper/test-online-cpus.o t/helper/test-parse-options.o t/helper/test-path-utils.o t/helper/test-pkt-line.o t/helper/test-prio-queue.o t/helper/test-reach.o t/helper/test-read-cache.o t/helper/test-read-midx.o t/helper/test-ref-store.o t/helper/test-regex.o t/helper/test-repository.o t/helper/test-revision-walking.o t/helper/test-run-command.o t/helper/test-scrap-cache-tree.o t/helper/test-serve-v2.o t/helper/test-sha1.o t/helper/test-sha1-array.o t/helper/test-sha256.o t/helper/test-sigchain.o t/helper/test-strcmp-offset.o t/helper/test-string-list.o t/helper/test-submodule-config.o t/helper/test-submodule-nested-repo-config.o t/helper/test-subprocess.o t/helper/test-trace2.o t/helper/test-urlmatch-normalization.o t/helper/test-xml-encode.o t/helper/test-wildmatch.o t/helper/test-windows-named-pipe.o t/helper/test-write-cache.o xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o xdiff/xmerge.o xdiff/xpatience.o xdiff/xhistogram.o vcs-svn/line_buffer.o vcs-svn/sliding_window.o vcs-svn/fast_export.o vcs-svn/svndiff.o vcs-svn/svndump.o fuzz-commit-graph.o fuzz-pack-headers.o fuzz-pack-idx.o common-main.o git.o http.o http-walker.o remote-curl.o
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f libgit.a xdiff/lib.a vcs-svn/lib.a
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-credential-store git-daemon git-fast-import git-http-backend git-imap-send git-sh-i18n--envsubst git-shell 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-legacy-stash git-request-pull git-submodule git-web--browse git-add--interactive git-archimport git-cvsexportcommit git-cvsimport git-cvsserver git-send-email git-svn git-p4 git-instaweb git-mergetool--lib git-parse-remote git-rebase--preserve-merges 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-commit-graph git-config git-count-objects git-credential git-describe git-diff-files git-diff-index git-diff-tree git-diff git-difftool git-env--helper 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-multi-pack-index 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-range-diff git-read-tree git-rebase 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-index git-show-ref git-stash git-stripspace git-submodule--helper 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-upload-pack 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-restore git-show git-stage git-status git-switch git-whatchanged git
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f t/helper/test-fake-ssh t/helper/test-line-buffer t/helper/test-svn-fe t/helper/test-tool
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f fuzz-commit-graph fuzz-pack-headers fuzz-pack-idx
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f -r bin-wrappers ./.depend builtin/.depend compat/.depend ewah/.depend negotiator/.depend refs/.depend sha1dc/.depend sha256/block/.depend t/helper/.depend trace2/.depend vcs-svn/.depend xdiff/.depend
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f -r po/build/
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f *.pyc *.pyo */*.pyc */*.pyo command-list.h TAGS tags cscope*
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f -r git-2.23.0.rc1 .doc-tmp-dir
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-2.23.0.rc1.tar.gz git-core_2.23.0.rc1-*.tar.gz
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-htmldocs-2.23.0.rc1.tar.gz git-manpages-2.23.0.rc1.tar.gz
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
/usr/bin/make -C Documentation/ clean
make[3]: Entering directory '/<<PKGBUILDDIR>>/Documentation'
rm -f mergetools-list.made && \
/bin/sh -c 'MERGE_TOOLS_DIR=../mergetools && \
. ../git-mergetool--lib.sh && \
show_tool_names can_diff "* " || :' >mergetools-diff.txt && \
/bin/sh -c 'MERGE_TOOLS_DIR=../mergetools && \
. ../git-mergetool--lib.sh && \
show_tool_names can_merge "* " || :' >mergetools-merge.txt && \
date >mergetools-list.made
make[3]: Leaving directory '/<<PKGBUILDDIR>>/Documentation'
make[3]: Entering directory '/<<PKGBUILDDIR>>/Documentation'
rm -f cmd-list.made && \
/usr/bin/perl ./cmd-list.perl ../command-list.txt && \
date >cmd-list.made
cmds-ancillaryinterrogators.txt
cmds-ancillarymanipulators.txt
cmds-mainporcelain.txt
cmds-plumbinginterrogators.txt
cmds-plumbingmanipulators.txt
cmds-synchingrepositories.txt
cmds-foreignscminterface.txt
cmds-purehelpers.txt
cmds-synchelpers.txt
make[3]: Leaving directory '/<<PKGBUILDDIR>>/Documentation'
/usr/bin/make -C ../ GIT-VERSION-FILE
make[4]: 'GIT-VERSION-FILE' is up to date.
make[3]: Entering directory '/<<PKGBUILDDIR>>/Documentation'
rm -f doc.dep+ doc.dep && \
/usr/bin/perl ./build-docdep.perl >doc.dep+ && \
mv doc.dep+ doc.dep
make[3]: Leaving directory '/<<PKGBUILDDIR>>/Documentation'
/usr/bin/make -C ../ GIT-VERSION-FILE
make[4]: 'GIT-VERSION-FILE' is up to date.
make[3]: Entering directory '/<<PKGBUILDDIR>>/Documentation'
rm -f *.xml *.xml+ *.html *.html+ *.1 *.5 *.7
make[3]: Leaving directory '/<<PKGBUILDDIR>>/Documentation'
make[3]: Entering directory '/<<PKGBUILDDIR>>/Documentation'
rm -f *.texi *.texi+ *.texi++ git.info gitman.info
make[3]: Leaving directory '/<<PKGBUILDDIR>>/Documentation'
make[3]: Entering directory '/<<PKGBUILDDIR>>/Documentation'
rm -f *.pdf
make[3]: Leaving directory '/<<PKGBUILDDIR>>/Documentation'
make[3]: Entering directory '/<<PKGBUILDDIR>>/Documentation'
rm -f howto-index.txt howto/*.html doc.dep
make[3]: Leaving directory '/<<PKGBUILDDIR>>/Documentation'
make[3]: Entering directory '/<<PKGBUILDDIR>>/Documentation'
rm -f technical/*.html technical/api-index.txt
make[3]: Leaving directory '/<<PKGBUILDDIR>>/Documentation'
make[3]: Entering directory '/<<PKGBUILDDIR>>/Documentation'
rm -f SubmittingPatches.txt
make[3]: Leaving directory '/<<PKGBUILDDIR>>/Documentation'
make[3]: Entering directory '/<<PKGBUILDDIR>>/Documentation'
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
make[3]: Leaving directory '/<<PKGBUILDDIR>>/Documentation'
make[3]: Entering directory '/<<PKGBUILDDIR>>/Documentation'
rm -f manpage-base-url.xsl
make[3]: Leaving directory '/<<PKGBUILDDIR>>/Documentation'
make[3]: Entering directory '/<<PKGBUILDDIR>>/Documentation'
rm -f GIT-ASCIIDOCFLAGS
make[3]: Leaving directory '/<<PKGBUILDDIR>>/Documentation'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f Documentation/GIT-EXCLUDED-PROGRAMS
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
/usr/bin/make -C gitweb clean
/usr/bin/make -C ../ GIT-VERSION-FILE
make[4]: 'GIT-VERSION-FILE' is up to date.
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitweb'
rm -f gitweb.cgi static/gitweb.js \
static/gitweb.min.js static/gitweb.min.css \
GITWEB-BUILD-OPTIONS
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitweb'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f -r perl/build/
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
/usr/bin/make -C templates/ clean
make[3]: Entering directory '/<<PKGBUILDDIR>>/templates'
rm -f -r blt boilerplates.made
make[3]: Leaving directory '/<<PKGBUILDDIR>>/templates'
/usr/bin/make -C t/ clean
make[3]: Entering directory '/<<PKGBUILDDIR>>/t'
rm -f -r 'chainlinttmp'
make[3]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[3]: Entering directory '/<<PKGBUILDDIR>>/t'
rm -f -r 'trash directory'.* 'test-results'
make[3]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[3]: Entering directory '/<<PKGBUILDDIR>>/t'
rm -f -r valgrind/bin
make[3]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[3]: Entering directory '/<<PKGBUILDDIR>>/t'
rm -f .prove
make[3]: Leaving directory '/<<PKGBUILDDIR>>/t'
/usr/bin/make -C gitk-git clean
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
rm -f gitk-wish po/*.msg GIT-TCLTK-VARS
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
/usr/bin/make -C git-gui clean
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
GITGUI_VERSION = 0.21.GITGUI
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
rm -rf git-gui lib/tclIndex po/*.msg
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
rm -rf GIT-VERSION-FILE GIT-GUI-VARS
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f GIT-VERSION-FILE GIT-CFLAGS GIT-LDFLAGS GIT-BUILD-OPTIONS
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f GIT-USER-AGENT GIT-PREFIX
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f GIT-SCRIPT-DEFINES GIT-PERL-DEFINES GIT-PERL-HEADER GIT-PYTHON-VARS
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-subtree
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
debian/rules override_dh_clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_clean -Xmailinfo.c.orig
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
debian/rules build-arch
dh build-arch --with apache2
dh_update_autotools_config -a
debian/rules override_dh_auto_build-arch
make[1]: Entering directory '/<<PKGBUILDDIR>>'
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/8/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Raspbian 8.3.0-6+rpi1' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 8.3.0 (Raspbian 8.3.0-6+rpi1)
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
/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 SANE_TOOL_PATH= INSTALL=install TAR=tar NO_CROSS_DIRECTORY_HARDLINKS=1 NO_INSTALL_HARDLINKS=1 NO_PERL_CPAN_FALLBACKS=1 DEFAULT_PAGER=pager DEFAULT_EDITOR=editor CC='gcc' CFLAGS='-Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS='-Wl,-z,relro' V=1 USE_LIBPCRE2=1
make[2]: Entering directory '/<<PKGBUILDDIR>>'
GIT_VERSION = 2.23.0.rc1
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
* new build flags
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o fuzz-commit-graph.o -c -MF ./.depend/fuzz-commit-graph.o.d -MQ fuzz-commit-graph.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' fuzz-commit-graph.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o fuzz-pack-idx.o -c -MF ./.depend/fuzz-pack-idx.o.d -MQ fuzz-pack-idx.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' fuzz-pack-idx.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o fuzz-pack-headers.o -c -MF ./.depend/fuzz-pack-headers.o.d -MQ fuzz-pack-headers.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' fuzz-pack-headers.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
* new link flags
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o common-main.o -c -MF ./.depend/common-main.o.d -MQ common-main.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' common-main.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o advice.o -c -MF ./.depend/advice.o.d -MQ advice.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' advice.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o credential-store.o -c -MF ./.depend/credential-store.o.d -MQ credential-store.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' credential-store.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o abspath.o -c -MF ./.depend/abspath.o.d -MQ abspath.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' abspath.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o alias.o -c -MF ./.depend/alias.o.d -MQ alias.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' alias.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o alloc.o -c -MF ./.depend/alloc.o.d -MQ alloc.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' alloc.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o archive-tar.o -c -MF ./.depend/archive-tar.o.d -MQ archive-tar.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' archive-tar.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o archive.o -c -MF ./.depend/archive.o.d -MQ archive.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' archive.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
* new prefix flags
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o argv-array.o -c -MF ./.depend/argv-array.o.d -MQ argv-array.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' argv-array.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o base85.o -c -MF ./.depend/base85.o.d -MQ base85.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' base85.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o archive-zip.o -c -MF ./.depend/archive-zip.o.d -MQ archive-zip.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' archive-zip.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o blob.o -c -MF ./.depend/blob.o.d -MQ blob.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' blob.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o branch.o -c -MF ./.depend/branch.o.d -MQ branch.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' branch.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o bisect.o -c -MF ./.depend/bisect.o.d -MQ bisect.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' bisect.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o bulk-checkin.o -c -MF ./.depend/bulk-checkin.o.d -MQ bulk-checkin.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' bulk-checkin.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o bundle.o -c -MF ./.depend/bundle.o.d -MQ bundle.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' bundle.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o cache-tree.o -c -MF ./.depend/cache-tree.o.d -MQ cache-tree.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' cache-tree.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o chdir-notify.o -c -MF ./.depend/chdir-notify.o.d -MQ chdir-notify.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' chdir-notify.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o checkout.o -c -MF ./.depend/checkout.o.d -MQ checkout.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' checkout.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o blame.o -c -MF ./.depend/blame.o.d -MQ blame.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' blame.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o column.o -c -MF ./.depend/column.o.d -MQ column.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' column.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o color.o -c -MF ./.depend/color.o.d -MQ color.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' color.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o apply.o -c -MF ./.depend/apply.o.d -MQ apply.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' apply.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o commit.o -c -MF ./.depend/commit.o.d -MQ commit.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' commit.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o combine-diff.o -c -MF ./.depend/combine-diff.o.d -MQ combine-diff.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' combine-diff.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o compat/obstack.o -c -MF compat/.depend/obstack.o.d -MQ compat/obstack.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' compat/obstack.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o compat/terminal.o -c -MF compat/.depend/terminal.o.d -MQ compat/terminal.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' compat/terminal.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o commit-reach.o -c -MF ./.depend/commit-reach.o.d -MQ commit-reach.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' commit-reach.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o connected.o -c -MF ./.depend/connected.o.d -MQ connected.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' connected.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o commit-graph.o -c -MF ./.depend/commit-graph.o.d -MQ commit-graph.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' commit-graph.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o copy.o -c -MF ./.depend/copy.o.d -MQ copy.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' copy.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o connect.o -c -MF ./.depend/connect.o.d -MQ connect.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' connect.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o credential.o -c -MF ./.depend/credential.o.d -MQ credential.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' credential.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o ctype.o -c -MF ./.depend/ctype.o.d -MQ ctype.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' ctype.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o csum-file.o -c -MF ./.depend/csum-file.o.d -MQ csum-file.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' csum-file.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o decorate.o -c -MF ./.depend/decorate.o.d -MQ decorate.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' decorate.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o convert.o -c -MF ./.depend/convert.o.d -MQ convert.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' convert.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o diffcore-break.o -c -MF ./.depend/diffcore-break.o.d -MQ diffcore-break.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' diffcore-break.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o date.o -c -MF ./.depend/date.o.d -MQ date.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' date.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o config.o -c -MF ./.depend/config.o.d -MQ config.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -DETC_GITCONFIG='"/etc/gitconfig"' config.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o diffcore-delta.o -c -MF ./.depend/diffcore-delta.o.d -MQ diffcore-delta.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' diffcore-delta.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o diffcore-order.o -c -MF ./.depend/diffcore-order.o.d -MQ diffcore-order.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' diffcore-order.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o diffcore-pickaxe.o -c -MF ./.depend/diffcore-pickaxe.o.d -MQ diffcore-pickaxe.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' diffcore-pickaxe.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o delta-islands.o -c -MF ./.depend/delta-islands.o.d -MQ delta-islands.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' delta-islands.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o diffcore-rename.o -c -MF ./.depend/diffcore-rename.o.d -MQ diffcore-rename.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' diffcore-rename.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o diff-delta.o -c -MF ./.depend/diff-delta.o.d -MQ diff-delta.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' diff-delta.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o diff-lib.o -c -MF ./.depend/diff-lib.o.d -MQ diff-lib.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' diff-lib.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o diff-no-index.o -c -MF ./.depend/diff-no-index.o.d -MQ diff-no-index.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' diff-no-index.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o editor.o -c -MF ./.depend/editor.o.d -MQ editor.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' editor.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o dir-iterator.o -c -MF ./.depend/dir-iterator.o.d -MQ dir-iterator.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' dir-iterator.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o environment.o -c -MF ./.depend/environment.o.d -MQ environment.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' environment.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o entry.o -c -MF ./.depend/entry.o.d -MQ entry.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' entry.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o ewah/bitmap.o -c -MF ewah/.depend/bitmap.o.d -MQ ewah/bitmap.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' ewah/bitmap.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o ewah/ewah_io.o -c -MF ewah/.depend/ewah_io.o.d -MQ ewah/ewah_io.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' ewah/ewah_io.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o ewah/ewah_rlw.o -c -MF ewah/.depend/ewah_rlw.o.d -MQ ewah/ewah_rlw.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' ewah/ewah_rlw.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o ewah/ewah_bitmap.o -c -MF ewah/.depend/ewah_bitmap.o.d -MQ ewah/ewah_bitmap.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' ewah/ewah_bitmap.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o exec-cmd.o -c -MF ./.depend/exec-cmd.o.d -MQ exec-cmd.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' '-DGIT_EXEC_PATH="/usr/lib/git-core"' '-DGIT_LOCALE_PATH="share/locale"' '-DBINDIR="bin"' '-DFALLBACK_RUNTIME_PREFIX="/usr"' exec-cmd.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o fetch-negotiator.o -c -MF ./.depend/fetch-negotiator.o.d -MQ fetch-negotiator.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' fetch-negotiator.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o dir.o -c -MF ./.depend/dir.o.d -MQ dir.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' dir.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o fetch-object.o -c -MF ./.depend/fetch-object.o.d -MQ fetch-object.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' fetch-object.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o fsmonitor.o -c -MF ./.depend/fsmonitor.o.d -MQ fsmonitor.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' fsmonitor.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o gettext.o -c -MF ./.depend/gettext.o.d -MQ gettext.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -DGIT_LOCALE_PATH='"share/locale"' gettext.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o fsck.o -c -MF ./.depend/fsck.o.d -MQ fsck.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' fsck.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o gpg-interface.o -c -MF ./.depend/gpg-interface.o.d -MQ gpg-interface.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' gpg-interface.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o fetch-pack.o -c -MF ./.depend/fetch-pack.o.d -MQ fetch-pack.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' fetch-pack.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o graph.o -c -MF ./.depend/graph.o.d -MQ graph.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' graph.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o hashmap.o -c -MF ./.depend/hashmap.o.d -MQ hashmap.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' hashmap.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o linear-assignment.o -c -MF ./.depend/linear-assignment.o.d -MQ linear-assignment.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' linear-assignment.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o hex.o -c -MF ./.depend/hex.o.d -MQ hex.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' hex.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o grep.o -c -MF ./.depend/grep.o.d -MQ grep.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' grep.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o interdiff.o -c -MF ./.depend/interdiff.o.d -MQ interdiff.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' interdiff.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o ident.o -c -MF ./.depend/ident.o.d -MQ ident.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' ident.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
/bin/sh ./generate-cmdlist.sh \
\
command-list.txt >command-list.h+ && mv command-list.h+ command-list.h
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o json-writer.o -c -MF ./.depend/json-writer.o.d -MQ json-writer.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' json-writer.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o levenshtein.o -c -MF ./.depend/levenshtein.o.d -MQ levenshtein.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' levenshtein.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o kwset.o -c -MF ./.depend/kwset.o.d -MQ kwset.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' kwset.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o line-range.o -c -MF ./.depend/line-range.o.d -MQ line-range.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' line-range.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o diff.o -c -MF ./.depend/diff.o.d -MQ diff.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' diff.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o list-objects.o -c -MF ./.depend/list-objects.o.d -MQ list-objects.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' list-objects.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o list-objects-filter.o -c -MF ./.depend/list-objects-filter.o.d -MQ list-objects-filter.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' list-objects-filter.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o list-objects-filter-options.o -c -MF ./.depend/list-objects-filter-options.o.d -MQ list-objects-filter-options.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' list-objects-filter-options.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o lockfile.o -c -MF ./.depend/lockfile.o.d -MQ lockfile.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' lockfile.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o ll-merge.o -c -MF ./.depend/ll-merge.o.d -MQ ll-merge.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' ll-merge.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o line-log.o -c -MF ./.depend/line-log.o.d -MQ line-log.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' line-log.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o ls-refs.o -c -MF ./.depend/ls-refs.o.d -MQ ls-refs.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' ls-refs.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o mailmap.o -c -MF ./.depend/mailmap.o.d -MQ mailmap.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' mailmap.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o log-tree.o -c -MF ./.depend/log-tree.o.d -MQ log-tree.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' log-tree.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o match-trees.o -c -MF ./.depend/match-trees.o.d -MQ match-trees.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' match-trees.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o mem-pool.o -c -MF ./.depend/mem-pool.o.d -MQ mem-pool.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' mem-pool.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o merge-blobs.o -c -MF ./.depend/merge-blobs.o.d -MQ merge-blobs.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' merge-blobs.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o merge.o -c -MF ./.depend/merge.o.d -MQ merge.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' merge.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o mergesort.o -c -MF ./.depend/mergesort.o.d -MQ mergesort.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' mergesort.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o mailinfo.o -c -MF ./.depend/mailinfo.o.d -MQ mailinfo.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' mailinfo.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o negotiator/default.o -c -MF negotiator/.depend/default.o.d -MQ negotiator/default.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' negotiator/default.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o name-hash.o -c -MF ./.depend/name-hash.o.d -MQ name-hash.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' name-hash.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o negotiator/skipping.o -c -MF negotiator/.depend/skipping.o.d -MQ negotiator/skipping.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' negotiator/skipping.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o notes-cache.o -c -MF ./.depend/notes-cache.o.d -MQ notes-cache.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' notes-cache.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o midx.o -c -MF ./.depend/midx.o.d -MQ midx.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' midx.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o notes-utils.o -c -MF ./.depend/notes-utils.o.d -MQ notes-utils.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' notes-utils.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o notes.o -c -MF ./.depend/notes.o.d -MQ notes.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' notes.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o oidmap.o -c -MF ./.depend/oidmap.o.d -MQ oidmap.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' oidmap.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o object.o -c -MF ./.depend/object.o.d -MQ object.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' object.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o notes-merge.o -c -MF ./.depend/notes-merge.o.d -MQ notes-merge.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' notes-merge.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o merge-recursive.o -c -MF ./.depend/merge-recursive.o.d -MQ merge-recursive.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' merge-recursive.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o oidset.o -c -MF ./.depend/oidset.o.d -MQ oidset.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' oidset.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o pack-check.o -c -MF ./.depend/pack-check.o.d -MQ pack-check.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' pack-check.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o pack-bitmap-write.o -c -MF ./.depend/pack-bitmap-write.o.d -MQ pack-bitmap-write.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' pack-bitmap-write.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o pack-objects.o -c -MF ./.depend/pack-objects.o.d -MQ pack-objects.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' pack-objects.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o pack-revindex.o -c -MF ./.depend/pack-revindex.o.d -MQ pack-revindex.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' pack-revindex.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o pack-bitmap.o -c -MF ./.depend/pack-bitmap.o.d -MQ pack-bitmap.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' pack-bitmap.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o packfile.o -c -MF ./.depend/packfile.o.d -MQ packfile.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' packfile.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o pager.o -c -MF ./.depend/pager.o.d -MQ pager.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' pager.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o pack-write.o -c -MF ./.depend/pack-write.o.d -MQ pack-write.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' pack-write.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o patch-delta.o -c -MF ./.depend/patch-delta.o.d -MQ patch-delta.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' patch-delta.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o parse-options-cb.o -c -MF ./.depend/parse-options-cb.o.d -MQ parse-options-cb.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' parse-options-cb.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o patch-ids.o -c -MF ./.depend/patch-ids.o.d -MQ patch-ids.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' patch-ids.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o parse-options.o -c -MF ./.depend/parse-options.o.d -MQ parse-options.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' parse-options.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o pathspec.o -c -MF ./.depend/pathspec.o.d -MQ pathspec.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' pathspec.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o pkt-line.o -c -MF ./.depend/pkt-line.o.d -MQ pkt-line.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' pkt-line.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o preload-index.o -c -MF ./.depend/preload-index.o.d -MQ preload-index.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' preload-index.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o prio-queue.o -c -MF ./.depend/prio-queue.o.d -MQ prio-queue.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' prio-queue.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o progress.o -c -MF ./.depend/progress.o.d -MQ progress.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' progress.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o path.o -c -MF ./.depend/path.o.d -MQ path.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' path.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o prompt.o -c -MF ./.depend/prompt.o.d -MQ prompt.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' prompt.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o protocol.o -c -MF ./.depend/protocol.o.d -MQ protocol.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' protocol.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o reachable.o -c -MF ./.depend/reachable.o.d -MQ reachable.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' reachable.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o range-diff.o -c -MF ./.depend/range-diff.o.d -MQ range-diff.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' range-diff.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o quote.o -c -MF ./.depend/quote.o.d -MQ quote.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' quote.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o rebase-interactive.o -c -MF ./.depend/rebase-interactive.o.d -MQ rebase-interactive.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' rebase-interactive.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o pretty.o -c -MF ./.depend/pretty.o.d -MQ pretty.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' pretty.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o reflog-walk.o -c -MF ./.depend/reflog-walk.o.d -MQ reflog-walk.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' reflog-walk.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o refs/iterator.o -c -MF refs/.depend/iterator.o.d -MQ refs/iterator.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' refs/iterator.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o refs/packed-backend.o -c -MF refs/.depend/packed-backend.o.d -MQ refs/packed-backend.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' refs/packed-backend.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o refs/ref-cache.o -c -MF refs/.depend/ref-cache.o.d -MQ refs/ref-cache.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' refs/ref-cache.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o read-cache.o -c -MF ./.depend/read-cache.o.d -MQ read-cache.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' read-cache.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o refs.o -c -MF ./.depend/refs.o.d -MQ refs.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' refs.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o refs/files-backend.o -c -MF refs/.depend/files-backend.o.d -MQ refs/files-backend.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' refs/files-backend.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o refspec.o -c -MF ./.depend/refspec.o.d -MQ refspec.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' refspec.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o replace-object.o -c -MF ./.depend/replace-object.o.d -MQ replace-object.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' replace-object.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o repository.o -c -MF ./.depend/repository.o.d -MQ repository.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' repository.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o resolve-undo.o -c -MF ./.depend/resolve-undo.o.d -MQ resolve-undo.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' resolve-undo.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o rerere.o -c -MF ./.depend/rerere.o.d -MQ rerere.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' rerere.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o remote.o -c -MF ./.depend/remote.o.d -MQ remote.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' remote.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o ref-filter.o -c -MF ./.depend/ref-filter.o.d -MQ ref-filter.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' ref-filter.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o send-pack.o -c -MF ./.depend/send-pack.o.d -MQ send-pack.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' send-pack.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o run-command.o -c -MF ./.depend/run-command.o.d -MQ run-command.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' run-command.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o serve.o -c -MF ./.depend/serve.o.d -MQ serve.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' serve.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o server-info.o -c -MF ./.depend/server-info.o.d -MQ server-info.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' server-info.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o sha1-array.o -c -MF ./.depend/sha1-array.o.d -MQ sha1-array.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' sha1-array.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o sha1-lookup.o -c -MF ./.depend/sha1-lookup.o.d -MQ sha1-lookup.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' sha1-lookup.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o revision.o -c -MF ./.depend/revision.o.d -MQ revision.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' revision.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o setup.o -c -MF ./.depend/setup.o.d -MQ setup.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' setup.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o shallow.o -c -MF ./.depend/shallow.o.d -MQ shallow.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' shallow.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o sha1-name.o -c -MF ./.depend/sha1-name.o.d -MQ sha1-name.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' sha1-name.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o sideband.o -c -MF ./.depend/sideband.o.d -MQ sideband.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' sideband.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o sha1-file.o -c -MF ./.depend/sha1-file.o.d -MQ sha1-file.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' sha1-file.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o sigchain.o -c -MF ./.depend/sigchain.o.d -MQ sigchain.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' sigchain.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o split-index.o -c -MF ./.depend/split-index.o.d -MQ split-index.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' split-index.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o streaming.o -c -MF ./.depend/streaming.o.d -MQ streaming.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' streaming.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o string-list.o -c -MF ./.depend/string-list.o.d -MQ string-list.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' string-list.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o strbuf.o -c -MF ./.depend/strbuf.o.d -MQ strbuf.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' strbuf.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o sub-process.o -c -MF ./.depend/sub-process.o.d -MQ sub-process.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' sub-process.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o submodule-config.o -c -MF ./.depend/submodule-config.o.d -MQ submodule-config.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' submodule-config.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o symlinks.o -c -MF ./.depend/symlinks.o.d -MQ symlinks.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' symlinks.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o tag.o -c -MF ./.depend/tag.o.d -MQ tag.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' tag.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o submodule.o -c -MF ./.depend/submodule.o.d -MQ submodule.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' submodule.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o thread-utils.o -c -MF ./.depend/thread-utils.o.d -MQ thread-utils.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' thread-utils.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o tempfile.o -c -MF ./.depend/tempfile.o.d -MQ tempfile.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' tempfile.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o sequencer.o -c -MF ./.depend/sequencer.o.d -MQ sequencer.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' sequencer.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o tmp-objdir.o -c -MF ./.depend/tmp-objdir.o.d -MQ tmp-objdir.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' tmp-objdir.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o trace2/tr2_cfg.o -c -MF trace2/.depend/tr2_cfg.o.d -MQ trace2/tr2_cfg.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' trace2/tr2_cfg.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o trace.o -c -MF ./.depend/trace.o.d -MQ trace.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' trace.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o trace2/tr2_cmd_name.o -c -MF trace2/.depend/tr2_cmd_name.o.d -MQ trace2/tr2_cmd_name.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' trace2/tr2_cmd_name.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o trace2/tr2_sid.o -c -MF trace2/.depend/tr2_sid.o.d -MQ trace2/tr2_sid.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' trace2/tr2_sid.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o trace2/tr2_sysenv.o -c -MF trace2/.depend/tr2_sysenv.o.d -MQ trace2/tr2_sysenv.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' trace2/tr2_sysenv.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o trace2/tr2_dst.o -c -MF trace2/.depend/tr2_dst.o.d -MQ trace2/tr2_dst.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' trace2/tr2_dst.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o trace2.o -c -MF ./.depend/trace2.o.d -MQ trace2.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' trace2.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o trace2/tr2_tbuf.o -c -MF trace2/.depend/tr2_tbuf.o.d -MQ trace2/tr2_tbuf.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' trace2/tr2_tbuf.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o trace2/tr2_tgt_normal.o -c -MF trace2/.depend/tr2_tgt_normal.o.d -MQ trace2/tr2_tgt_normal.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' trace2/tr2_tgt_normal.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o trace2/tr2_tls.o -c -MF trace2/.depend/tr2_tls.o.d -MQ trace2/tr2_tls.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' trace2/tr2_tls.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o trace2/tr2_tgt_perf.o -c -MF trace2/.depend/tr2_tgt_perf.o.d -MQ trace2/tr2_tgt_perf.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' trace2/tr2_tgt_perf.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o trace2/tr2_tgt_event.o -c -MF trace2/.depend/tr2_tgt_event.o.d -MQ trace2/tr2_tgt_event.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' trace2/tr2_tgt_event.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o tree-diff.o -c -MF ./.depend/tree-diff.o.d -MQ tree-diff.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' tree-diff.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o tree.o -c -MF ./.depend/tree.o.d -MQ tree.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' tree.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o transport.o -c -MF ./.depend/transport.o.d -MQ transport.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' transport.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o trailer.o -c -MF ./.depend/trailer.o.d -MQ trailer.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' trailer.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o transport-helper.o -c -MF ./.depend/transport-helper.o.d -MQ transport-helper.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' transport-helper.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o url.o -c -MF ./.depend/url.o.d -MQ url.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' url.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o tree-walk.o -c -MF ./.depend/tree-walk.o.d -MQ tree-walk.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' tree-walk.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o urlmatch.o -c -MF ./.depend/urlmatch.o.d -MQ urlmatch.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' urlmatch.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o usage.o -c -MF ./.depend/usage.o.d -MQ usage.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' usage.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o upload-pack.o -c -MF ./.depend/upload-pack.o.d -MQ upload-pack.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' upload-pack.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o userdiff.o -c -MF ./.depend/userdiff.o.d -MQ userdiff.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' userdiff.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o varint.o -c -MF ./.depend/varint.o.d -MQ varint.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' varint.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o versioncmp.o -c -MF ./.depend/versioncmp.o.d -MQ versioncmp.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' versioncmp.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o unpack-trees.o -c -MF ./.depend/unpack-trees.o.d -MQ unpack-trees.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' unpack-trees.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o walker.o -c -MF ./.depend/walker.o.d -MQ walker.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' walker.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o utf8.o -c -MF ./.depend/utf8.o.d -MQ utf8.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' utf8.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o wildmatch.o -c -MF ./.depend/wildmatch.o.d -MQ wildmatch.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' wildmatch.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o write-or-die.o -c -MF ./.depend/write-or-die.o.d -MQ write-or-die.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' write-or-die.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o worktree.o -c -MF ./.depend/worktree.o.d -MQ worktree.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' worktree.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o wrapper.o -c -MF ./.depend/wrapper.o.d -MQ wrapper.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' wrapper.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o ws.o -c -MF ./.depend/ws.o.d -MQ ws.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' ws.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o xdiff-interface.o -c -MF ./.depend/xdiff-interface.o.d -MQ xdiff-interface.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' xdiff-interface.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o sha1dc_git.o -c -MF ./.depend/sha1dc_git.o.d -MQ sha1dc_git.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' sha1dc_git.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o unix-socket.o -c -MF ./.depend/unix-socket.o.d -MQ unix-socket.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' unix-socket.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o zlib.o -c -MF ./.depend/zlib.o.d -MQ zlib.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' zlib.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o sha1dc/ubc_check.o -c -MF sha1dc/.depend/ubc_check.o.d -MQ sha1dc/ubc_check.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' sha1dc/ubc_check.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o compat/fopen.o -c -MF compat/.depend/fopen.o.d -MQ compat/fopen.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' compat/fopen.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o compat/strlcpy.o -c -MF compat/.depend/strlcpy.o.d -MQ compat/strlcpy.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' compat/strlcpy.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o sha256/block/sha256.o -c -MF sha256/block/.depend/sha256.o.d -MQ sha256/block/sha256.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' sha256/block/sha256.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o compat/qsort_s.o -c -MF compat/.depend/qsort_s.o.d -MQ compat/qsort_s.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' compat/qsort_s.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o sha1dc/sha1.o -c -MF sha1dc/.depend/sha1.o.d -MQ sha1dc/sha1.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' sha1dc/sha1.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o xdiff/xprepare.o -c -MF xdiff/.depend/xprepare.o.d -MQ xdiff/xprepare.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' xdiff/xprepare.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o xdiff/xdiffi.o -c -MF xdiff/.depend/xdiffi.o.d -MQ xdiff/xdiffi.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' xdiff/xdiffi.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o wt-status.o -c -MF ./.depend/wt-status.o.d -MQ wt-status.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' wt-status.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o xdiff/xutils.o -c -MF xdiff/.depend/xutils.o.d -MQ xdiff/xutils.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' xdiff/xutils.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o xdiff/xemit.o -c -MF xdiff/.depend/xemit.o.d -MQ xdiff/xemit.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' xdiff/xemit.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o xdiff/xpatience.o -c -MF xdiff/.depend/xpatience.o.d -MQ xdiff/xpatience.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' xdiff/xpatience.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o xdiff/xhistogram.o -c -MF xdiff/.depend/xhistogram.o.d -MQ xdiff/xhistogram.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' xdiff/xhistogram.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o xdiff/xmerge.o -c -MF xdiff/.depend/xmerge.o.d -MQ xdiff/xmerge.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' xdiff/xmerge.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o http-backend.o -c -MF ./.depend/http-backend.o.d -MQ http-backend.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' http-backend.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o daemon.o -c -MF ./.depend/daemon.o.d -MQ daemon.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' daemon.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o sh-i18n--envsubst.o -c -MF ./.depend/sh-i18n--envsubst.o.d -MQ sh-i18n--envsubst.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' sh-i18n--envsubst.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o imap-send.o -c -MF ./.depend/imap-send.o.d -MQ imap-send.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' imap-send.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o shell.o -c -MF ./.depend/shell.o.d -MQ shell.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' shell.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o vcs-svn/line_buffer.o -c -MF vcs-svn/.depend/line_buffer.o.d -MQ vcs-svn/line_buffer.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' vcs-svn/line_buffer.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o remote-testsvn.o -c -MF ./.depend/remote-testsvn.o.d -MQ remote-testsvn.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' remote-testsvn.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o vcs-svn/sliding_window.o -c -MF vcs-svn/.depend/sliding_window.o.d -MQ vcs-svn/sliding_window.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' vcs-svn/sliding_window.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o vcs-svn/svndiff.o -c -MF vcs-svn/.depend/svndiff.o.d -MQ vcs-svn/svndiff.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' vcs-svn/svndiff.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o vcs-svn/fast_export.o -c -MF vcs-svn/.depend/fast_export.o.d -MQ vcs-svn/fast_export.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' vcs-svn/fast_export.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o vcs-svn/svndump.o -c -MF vcs-svn/.depend/svndump.o.d -MQ vcs-svn/svndump.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' vcs-svn/svndump.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o http-walker.o -c -MF ./.depend/http-walker.o.d -MQ http-walker.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' http-walker.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o fast-import.o -c -MF ./.depend/fast-import.o.d -MQ fast-import.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' fast-import.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o http-fetch.o -c -MF ./.depend/http-fetch.o.d -MQ http-fetch.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' http-fetch.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o http.o -c -MF ./.depend/http.o.d -MQ http.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' http.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o credential-cache.o -c -MF ./.depend/credential-cache.o.d -MQ credential-cache.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' credential-cache.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
* new script parameters
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
* new perl-specific parameters
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
* new Python interpreter location
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-instaweb git-instaweb+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's|@@LOCALEDIR@@|/usr/share/locale|g' -e 's/@@NO_CURL@@//g' -e 's/@@USE_GETTEXT_SCHEME@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' -e 's|@@GITWEBDIR@@|/usr/share/gitweb|g' -e 's|@@PERL@@|/usr/bin/perl|g' -e 's|@@SANE_TEXT_GREP@@|-a|g' -e 's|@@PAGER_ENV@@|LESS=FRX LV=-c|g' git-instaweb.sh >git-instaweb+ && \
chmod +x git-instaweb+ && \
mv git-instaweb+ git-instaweb
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o credential-cache--daemon.o -c -MF ./.depend/credential-cache--daemon.o.d -MQ credential-cache--daemon.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' credential-cache--daemon.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-mergetool--lib git-mergetool--lib+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's|@@LOCALEDIR@@|/usr/share/locale|g' -e 's/@@NO_CURL@@//g' -e 's/@@USE_GETTEXT_SCHEME@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' -e 's|@@GITWEBDIR@@|/usr/share/gitweb|g' -e 's|@@PERL@@|/usr/bin/perl|g' -e 's|@@SANE_TEXT_GREP@@|-a|g' -e 's|@@PAGER_ENV@@|LESS=FRX LV=-c|g' git-mergetool--lib.sh >git-mergetool--lib+ && \
mv git-mergetool--lib+ git-mergetool--lib
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-parse-remote git-parse-remote+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's|@@LOCALEDIR@@|/usr/share/locale|g' -e 's/@@NO_CURL@@//g' -e 's/@@USE_GETTEXT_SCHEME@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' -e 's|@@GITWEBDIR@@|/usr/share/gitweb|g' -e 's|@@PERL@@|/usr/bin/perl|g' -e 's|@@SANE_TEXT_GREP@@|-a|g' -e 's|@@PAGER_ENV@@|LESS=FRX LV=-c|g' git-parse-remote.sh >git-parse-remote+ && \
mv git-parse-remote+ git-parse-remote
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-rebase--preserve-merges git-rebase--preserve-merges+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's|@@LOCALEDIR@@|/usr/share/locale|g' -e 's/@@NO_CURL@@//g' -e 's/@@USE_GETTEXT_SCHEME@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' -e 's|@@GITWEBDIR@@|/usr/share/gitweb|g' -e 's|@@PERL@@|/usr/bin/perl|g' -e 's|@@SANE_TEXT_GREP@@|-a|g' -e 's|@@PAGER_ENV@@|LESS=FRX LV=-c|g' git-rebase--preserve-merges.sh >git-rebase--preserve-merges+ && \
mv git-rebase--preserve-merges+ git-rebase--preserve-merges
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-sh-setup git-sh-setup+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's|@@LOCALEDIR@@|/usr/share/locale|g' -e 's/@@NO_CURL@@//g' -e 's/@@USE_GETTEXT_SCHEME@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' -e 's|@@GITWEBDIR@@|/usr/share/gitweb|g' -e 's|@@PERL@@|/usr/bin/perl|g' -e 's|@@SANE_TEXT_GREP@@|-a|g' -e 's|@@PAGER_ENV@@|LESS=FRX LV=-c|g' git-sh-setup.sh >git-sh-setup+ && \
mv git-sh-setup+ git-sh-setup
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-sh-i18n git-sh-i18n+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's|@@LOCALEDIR@@|/usr/share/locale|g' -e 's/@@NO_CURL@@//g' -e 's/@@USE_GETTEXT_SCHEME@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' -e 's|@@GITWEBDIR@@|/usr/share/gitweb|g' -e 's|@@PERL@@|/usr/bin/perl|g' -e 's|@@SANE_TEXT_GREP@@|-a|g' -e 's|@@PAGER_ENV@@|LESS=FRX LV=-c|g' git-sh-i18n.sh >git-sh-i18n+ && \
mv git-sh-i18n+ git-sh-i18n
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/add.o -c -MF builtin/.depend/add.o.d -MQ builtin/add.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/add.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o git.o -c -MF ./.depend/git.o.d -MQ git.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' '-DGIT_HTML_PATH="share/doc/git/html"' '-DGIT_MAN_PATH="share/man"' '-DGIT_INFO_PATH="share/info"' git.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o http-push.o -c -MF ./.depend/http-push.o.d -MQ http-push.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' http-push.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/annotate.o -c -MF builtin/.depend/annotate.o.d -MQ builtin/annotate.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/annotate.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o remote-curl.o -c -MF ./.depend/remote-curl.o.d -MQ remote-curl.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' remote-curl.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/apply.o -c -MF builtin/.depend/apply.o.d -MQ builtin/apply.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/apply.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/archive.o -c -MF builtin/.depend/archive.o.d -MQ builtin/archive.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/archive.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/bisect--helper.o -c -MF builtin/.depend/bisect--helper.o.d -MQ builtin/bisect--helper.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/bisect--helper.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/bundle.o -c -MF builtin/.depend/bundle.o.d -MQ builtin/bundle.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/bundle.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/blame.o -c -MF builtin/.depend/blame.o.d -MQ builtin/blame.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/blame.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/branch.o -c -MF builtin/.depend/branch.o.d -MQ builtin/branch.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/branch.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/check-attr.o -c -MF builtin/.depend/check-attr.o.d -MQ builtin/check-attr.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/check-attr.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/am.o -c -MF builtin/.depend/am.o.d -MQ builtin/am.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/am.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/cat-file.o -c -MF builtin/.depend/cat-file.o.d -MQ builtin/cat-file.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/cat-file.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/check-ignore.o -c -MF builtin/.depend/check-ignore.o.d -MQ builtin/check-ignore.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/check-ignore.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/check-mailmap.o -c -MF builtin/.depend/check-mailmap.o.d -MQ builtin/check-mailmap.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/check-mailmap.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/check-ref-format.o -c -MF builtin/.depend/check-ref-format.o.d -MQ builtin/check-ref-format.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/check-ref-format.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/checkout-index.o -c -MF builtin/.depend/checkout-index.o.d -MQ builtin/checkout-index.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/checkout-index.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/column.o -c -MF builtin/.depend/column.o.d -MQ builtin/column.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/column.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/commit-tree.o -c -MF builtin/.depend/commit-tree.o.d -MQ builtin/commit-tree.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/commit-tree.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/clean.o -c -MF builtin/.depend/clean.o.d -MQ builtin/clean.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/clean.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/commit-graph.o -c -MF builtin/.depend/commit-graph.o.d -MQ builtin/commit-graph.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/commit-graph.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/clone.o -c -MF builtin/.depend/clone.o.d -MQ builtin/clone.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/clone.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/checkout.o -c -MF builtin/.depend/checkout.o.d -MQ builtin/checkout.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/checkout.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/count-objects.o -c -MF builtin/.depend/count-objects.o.d -MQ builtin/count-objects.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/count-objects.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/credential.o -c -MF builtin/.depend/credential.o.d -MQ builtin/credential.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/credential.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/diff-files.o -c -MF builtin/.depend/diff-files.o.d -MQ builtin/diff-files.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/diff-files.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/config.o -c -MF builtin/.depend/config.o.d -MQ builtin/config.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/config.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/diff-index.o -c -MF builtin/.depend/diff-index.o.d -MQ builtin/diff-index.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/diff-index.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/commit.o -c -MF builtin/.depend/commit.o.d -MQ builtin/commit.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/commit.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/diff-tree.o -c -MF builtin/.depend/diff-tree.o.d -MQ builtin/diff-tree.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/diff-tree.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/describe.o -c -MF builtin/.depend/describe.o.d -MQ builtin/describe.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/describe.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/diff.o -c -MF builtin/.depend/diff.o.d -MQ builtin/diff.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/diff.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/env--helper.o -c -MF builtin/.depend/env--helper.o.d -MQ builtin/env--helper.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/env--helper.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/fetch-pack.o -c -MF builtin/.depend/fetch-pack.o.d -MQ builtin/fetch-pack.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/fetch-pack.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/difftool.o -c -MF builtin/.depend/difftool.o.d -MQ builtin/difftool.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/difftool.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/for-each-ref.o -c -MF builtin/.depend/for-each-ref.o.d -MQ builtin/for-each-ref.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/for-each-ref.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/fast-export.o -c -MF builtin/.depend/fast-export.o.d -MQ builtin/fast-export.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/fast-export.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/fmt-merge-msg.o -c -MF builtin/.depend/fmt-merge-msg.o.d -MQ builtin/fmt-merge-msg.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/fmt-merge-msg.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/fetch.o -c -MF builtin/.depend/fetch.o.d -MQ builtin/fetch.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/fetch.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/get-tar-commit-id.o -c -MF builtin/.depend/get-tar-commit-id.o.d -MQ builtin/get-tar-commit-id.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/get-tar-commit-id.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/gc.o -c -MF builtin/.depend/gc.o.d -MQ builtin/gc.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/gc.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/fsck.o -c -MF builtin/.depend/fsck.o.d -MQ builtin/fsck.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/fsck.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/hash-object.o -c -MF builtin/.depend/hash-object.o.d -MQ builtin/hash-object.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/hash-object.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/help.o -c -MF builtin/.depend/help.o.d -MQ builtin/help.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' '-DGIT_HTML_PATH="share/doc/git/html"' '-DGIT_MAN_PATH="share/man"' '-DGIT_INFO_PATH="share/info"' builtin/help.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/interpret-trailers.o -c -MF builtin/.depend/interpret-trailers.o.d -MQ builtin/interpret-trailers.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/interpret-trailers.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/init-db.o -c -MF builtin/.depend/init-db.o.d -MQ builtin/init-db.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -DDEFAULT_GIT_TEMPLATE_DIR='"share/git-core/templates"' builtin/init-db.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/grep.o -c -MF builtin/.depend/grep.o.d -MQ builtin/grep.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/grep.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/ls-files.o -c -MF builtin/.depend/ls-files.o.d -MQ builtin/ls-files.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/ls-files.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/ls-remote.o -c -MF builtin/.depend/ls-remote.o.d -MQ builtin/ls-remote.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/ls-remote.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/ls-tree.o -c -MF builtin/.depend/ls-tree.o.d -MQ builtin/ls-tree.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/ls-tree.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/index-pack.o -c -MF builtin/.depend/index-pack.o.d -MQ builtin/index-pack.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/index-pack.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/mailinfo.o -c -MF builtin/.depend/mailinfo.o.d -MQ builtin/mailinfo.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/mailinfo.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/mailsplit.o -c -MF builtin/.depend/mailsplit.o.d -MQ builtin/mailsplit.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/mailsplit.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/merge-base.o -c -MF builtin/.depend/merge-base.o.d -MQ builtin/merge-base.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/merge-base.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/merge-file.o -c -MF builtin/.depend/merge-file.o.d -MQ builtin/merge-file.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/merge-file.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/merge-index.o -c -MF builtin/.depend/merge-index.o.d -MQ builtin/merge-index.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/merge-index.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/merge-ours.o -c -MF builtin/.depend/merge-ours.o.d -MQ builtin/merge-ours.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/merge-ours.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/merge-recursive.o -c -MF builtin/.depend/merge-recursive.o.d -MQ builtin/merge-recursive.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/merge-recursive.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/log.o -c -MF builtin/.depend/log.o.d -MQ builtin/log.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/log.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/merge-tree.o -c -MF builtin/.depend/merge-tree.o.d -MQ builtin/merge-tree.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/merge-tree.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/mktag.o -c -MF builtin/.depend/mktag.o.d -MQ builtin/mktag.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/mktag.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/multi-pack-index.o -c -MF builtin/.depend/multi-pack-index.o.d -MQ builtin/multi-pack-index.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/multi-pack-index.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/mktree.o -c -MF builtin/.depend/mktree.o.d -MQ builtin/mktree.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/mktree.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/merge.o -c -MF builtin/.depend/merge.o.d -MQ builtin/merge.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/merge.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/mv.o -c -MF builtin/.depend/mv.o.d -MQ builtin/mv.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/mv.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/name-rev.o -c -MF builtin/.depend/name-rev.o.d -MQ builtin/name-rev.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/name-rev.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/pack-refs.o -c -MF builtin/.depend/pack-refs.o.d -MQ builtin/pack-refs.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/pack-refs.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/patch-id.o -c -MF builtin/.depend/patch-id.o.d -MQ builtin/patch-id.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/patch-id.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/notes.o -c -MF builtin/.depend/notes.o.d -MQ builtin/notes.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/notes.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/prune-packed.o -c -MF builtin/.depend/prune-packed.o.d -MQ builtin/prune-packed.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/prune-packed.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/prune.o -c -MF builtin/.depend/prune.o.d -MQ builtin/prune.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/prune.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/pack-redundant.o -c -MF builtin/.depend/pack-redundant.o.d -MQ builtin/pack-redundant.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/pack-redundant.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/range-diff.o -c -MF builtin/.depend/range-diff.o.d -MQ builtin/range-diff.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/range-diff.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/pull.o -c -MF builtin/.depend/pull.o.d -MQ builtin/pull.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/pull.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/read-tree.o -c -MF builtin/.depend/read-tree.o.d -MQ builtin/read-tree.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/read-tree.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/push.o -c -MF builtin/.depend/push.o.d -MQ builtin/push.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/push.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/reflog.o -c -MF builtin/.depend/reflog.o.d -MQ builtin/reflog.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/reflog.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/pack-objects.o -c -MF builtin/.depend/pack-objects.o.d -MQ builtin/pack-objects.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/pack-objects.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/remote-ext.o -c -MF builtin/.depend/remote-ext.o.d -MQ builtin/remote-ext.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/remote-ext.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/receive-pack.o -c -MF builtin/.depend/receive-pack.o.d -MQ builtin/receive-pack.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/receive-pack.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/remote-fd.o -c -MF builtin/.depend/remote-fd.o.d -MQ builtin/remote-fd.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/remote-fd.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/rebase.o -c -MF builtin/.depend/rebase.o.d -MQ builtin/rebase.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/rebase.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/repack.o -c -MF builtin/.depend/repack.o.d -MQ builtin/repack.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/repack.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/replace.o -c -MF builtin/.depend/replace.o.d -MQ builtin/replace.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/replace.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/remote.o -c -MF builtin/.depend/remote.o.d -MQ builtin/remote.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/remote.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/rerere.o -c -MF builtin/.depend/rerere.o.d -MQ builtin/rerere.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/rerere.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/reset.o -c -MF builtin/.depend/reset.o.d -MQ builtin/reset.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/reset.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/revert.o -c -MF builtin/.depend/revert.o.d -MQ builtin/revert.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/revert.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/rev-list.o -c -MF builtin/.depend/rev-list.o.d -MQ builtin/rev-list.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/rev-list.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/rm.o -c -MF builtin/.depend/rm.o.d -MQ builtin/rm.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/rm.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/send-pack.o -c -MF builtin/.depend/send-pack.o.d -MQ builtin/send-pack.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/send-pack.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/rev-parse.o -c -MF builtin/.depend/rev-parse.o.d -MQ builtin/rev-parse.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/rev-parse.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/shortlog.o -c -MF builtin/.depend/shortlog.o.d -MQ builtin/shortlog.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/shortlog.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/show-index.o -c -MF builtin/.depend/show-index.o.d -MQ builtin/show-index.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/show-index.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/stripspace.o -c -MF builtin/.depend/stripspace.o.d -MQ builtin/stripspace.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/stripspace.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/show-ref.o -c -MF builtin/.depend/show-ref.o.d -MQ builtin/show-ref.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/show-ref.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/symbolic-ref.o -c -MF builtin/.depend/symbolic-ref.o.d -MQ builtin/symbolic-ref.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/symbolic-ref.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/show-branch.o -c -MF builtin/.depend/show-branch.o.d -MQ builtin/show-branch.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/show-branch.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/unpack-file.o -c -MF builtin/.depend/unpack-file.o.d -MQ builtin/unpack-file.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/unpack-file.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/stash.o -c -MF builtin/.depend/stash.o.d -MQ builtin/stash.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/stash.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/unpack-objects.o -c -MF builtin/.depend/unpack-objects.o.d -MQ builtin/unpack-objects.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/unpack-objects.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/tag.o -c -MF builtin/.depend/tag.o.d -MQ builtin/tag.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/tag.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/update-server-info.o -c -MF builtin/.depend/update-server-info.o.d -MQ builtin/update-server-info.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/update-server-info.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/update-ref.o -c -MF builtin/.depend/update-ref.o.d -MQ builtin/update-ref.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/update-ref.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/upload-archive.o -c -MF builtin/.depend/upload-archive.o.d -MQ builtin/upload-archive.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/upload-archive.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/upload-pack.o -c -MF builtin/.depend/upload-pack.o.d -MQ builtin/upload-pack.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/upload-pack.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/submodule--helper.o -c -MF builtin/.depend/submodule--helper.o.d -MQ builtin/submodule--helper.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/submodule--helper.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/var.o -c -MF builtin/.depend/var.o.d -MQ builtin/var.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/var.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/update-index.o -c -MF builtin/.depend/update-index.o.d -MQ builtin/update-index.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/update-index.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/verify-commit.o -c -MF builtin/.depend/verify-commit.o.d -MQ builtin/verify-commit.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/verify-commit.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/verify-tag.o -c -MF builtin/.depend/verify-tag.o.d -MQ builtin/verify-tag.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/verify-tag.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/verify-pack.o -c -MF builtin/.depend/verify-pack.o.d -MQ builtin/verify-pack.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/verify-pack.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/write-tree.o -c -MF builtin/.depend/write-tree.o.d -MQ builtin/write-tree.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/write-tree.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o version.o -c -MF ./.depend/version.o.d -MQ version.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' '-DGIT_VERSION="2.23.0.rc1"' '-DGIT_USER_AGENT="git/2.23.0.rc1"' '-DGIT_BUILT_FROM_COMMIT=""' version.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f xdiff/lib.a && ar rcs xdiff/lib.a xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o xdiff/xmerge.o xdiff/xpatience.o xdiff/xhistogram.o
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f vcs-svn/lib.a && ar rcs vcs-svn/lib.a vcs-svn/line_buffer.o vcs-svn/sliding_window.o vcs-svn/fast_export.o vcs-svn/svndiff.o vcs-svn/svndump.o
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-bisect git-bisect+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's|@@LOCALEDIR@@|/usr/share/locale|g' -e 's/@@NO_CURL@@//g' -e 's/@@USE_GETTEXT_SCHEME@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' -e 's|@@GITWEBDIR@@|/usr/share/gitweb|g' -e 's|@@PERL@@|/usr/bin/perl|g' -e 's|@@SANE_TEXT_GREP@@|-a|g' -e 's|@@PAGER_ENV@@|LESS=FRX LV=-c|g' git-bisect.sh >git-bisect+ && \
chmod +x git-bisect+ && \
mv git-bisect+ git-bisect
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-difftool--helper git-difftool--helper+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's|@@LOCALEDIR@@|/usr/share/locale|g' -e 's/@@NO_CURL@@//g' -e 's/@@USE_GETTEXT_SCHEME@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' -e 's|@@GITWEBDIR@@|/usr/share/gitweb|g' -e 's|@@PERL@@|/usr/bin/perl|g' -e 's|@@SANE_TEXT_GREP@@|-a|g' -e 's|@@PAGER_ENV@@|LESS=FRX LV=-c|g' git-difftool--helper.sh >git-difftool--helper+ && \
chmod +x git-difftool--helper+ && \
mv git-difftool--helper+ git-difftool--helper
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-filter-branch git-filter-branch+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's|@@LOCALEDIR@@|/usr/share/locale|g' -e 's/@@NO_CURL@@//g' -e 's/@@USE_GETTEXT_SCHEME@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' -e 's|@@GITWEBDIR@@|/usr/share/gitweb|g' -e 's|@@PERL@@|/usr/bin/perl|g' -e 's|@@SANE_TEXT_GREP@@|-a|g' -e 's|@@PAGER_ENV@@|LESS=FRX LV=-c|g' git-filter-branch.sh >git-filter-branch+ && \
chmod +x git-filter-branch+ && \
mv git-filter-branch+ git-filter-branch
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-merge-octopus git-merge-octopus+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's|@@LOCALEDIR@@|/usr/share/locale|g' -e 's/@@NO_CURL@@//g' -e 's/@@USE_GETTEXT_SCHEME@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' -e 's|@@GITWEBDIR@@|/usr/share/gitweb|g' -e 's|@@PERL@@|/usr/bin/perl|g' -e 's|@@SANE_TEXT_GREP@@|-a|g' -e 's|@@PAGER_ENV@@|LESS=FRX LV=-c|g' git-merge-octopus.sh >git-merge-octopus+ && \
chmod +x git-merge-octopus+ && \
mv git-merge-octopus+ git-merge-octopus
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-merge-one-file git-merge-one-file+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's|@@LOCALEDIR@@|/usr/share/locale|g' -e 's/@@NO_CURL@@//g' -e 's/@@USE_GETTEXT_SCHEME@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' -e 's|@@GITWEBDIR@@|/usr/share/gitweb|g' -e 's|@@PERL@@|/usr/bin/perl|g' -e 's|@@SANE_TEXT_GREP@@|-a|g' -e 's|@@PAGER_ENV@@|LESS=FRX LV=-c|g' git-merge-one-file.sh >git-merge-one-file+ && \
chmod +x git-merge-one-file+ && \
mv git-merge-one-file+ git-merge-one-file
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-merge-resolve git-merge-resolve+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's|@@LOCALEDIR@@|/usr/share/locale|g' -e 's/@@NO_CURL@@//g' -e 's/@@USE_GETTEXT_SCHEME@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' -e 's|@@GITWEBDIR@@|/usr/share/gitweb|g' -e 's|@@PERL@@|/usr/bin/perl|g' -e 's|@@SANE_TEXT_GREP@@|-a|g' -e 's|@@PAGER_ENV@@|LESS=FRX LV=-c|g' git-merge-resolve.sh >git-merge-resolve+ && \
chmod +x git-merge-resolve+ && \
mv git-merge-resolve+ git-merge-resolve
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-mergetool git-mergetool+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's|@@LOCALEDIR@@|/usr/share/locale|g' -e 's/@@NO_CURL@@//g' -e 's/@@USE_GETTEXT_SCHEME@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' -e 's|@@GITWEBDIR@@|/usr/share/gitweb|g' -e 's|@@PERL@@|/usr/bin/perl|g' -e 's|@@SANE_TEXT_GREP@@|-a|g' -e 's|@@PAGER_ENV@@|LESS=FRX LV=-c|g' git-mergetool.sh >git-mergetool+ && \
chmod +x git-mergetool+ && \
mv git-mergetool+ git-mergetool
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-quiltimport git-quiltimport+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's|@@LOCALEDIR@@|/usr/share/locale|g' -e 's/@@NO_CURL@@//g' -e 's/@@USE_GETTEXT_SCHEME@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' -e 's|@@GITWEBDIR@@|/usr/share/gitweb|g' -e 's|@@PERL@@|/usr/bin/perl|g' -e 's|@@SANE_TEXT_GREP@@|-a|g' -e 's|@@PAGER_ENV@@|LESS=FRX LV=-c|g' git-quiltimport.sh >git-quiltimport+ && \
chmod +x git-quiltimport+ && \
mv git-quiltimport+ git-quiltimport
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-legacy-stash git-legacy-stash+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's|@@LOCALEDIR@@|/usr/share/locale|g' -e 's/@@NO_CURL@@//g' -e 's/@@USE_GETTEXT_SCHEME@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' -e 's|@@GITWEBDIR@@|/usr/share/gitweb|g' -e 's|@@PERL@@|/usr/bin/perl|g' -e 's|@@SANE_TEXT_GREP@@|-a|g' -e 's|@@PAGER_ENV@@|LESS=FRX LV=-c|g' git-legacy-stash.sh >git-legacy-stash+ && \
chmod +x git-legacy-stash+ && \
mv git-legacy-stash+ git-legacy-stash
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-request-pull git-request-pull+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's|@@LOCALEDIR@@|/usr/share/locale|g' -e 's/@@NO_CURL@@//g' -e 's/@@USE_GETTEXT_SCHEME@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' -e 's|@@GITWEBDIR@@|/usr/share/gitweb|g' -e 's|@@PERL@@|/usr/bin/perl|g' -e 's|@@SANE_TEXT_GREP@@|-a|g' -e 's|@@PAGER_ENV@@|LESS=FRX LV=-c|g' git-request-pull.sh >git-request-pull+ && \
chmod +x git-request-pull+ && \
mv git-request-pull+ git-request-pull
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-submodule git-submodule+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's|@@LOCALEDIR@@|/usr/share/locale|g' -e 's/@@NO_CURL@@//g' -e 's/@@USE_GETTEXT_SCHEME@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' -e 's|@@GITWEBDIR@@|/usr/share/gitweb|g' -e 's|@@PERL@@|/usr/bin/perl|g' -e 's|@@SANE_TEXT_GREP@@|-a|g' -e 's|@@PAGER_ENV@@|LESS=FRX LV=-c|g' git-submodule.sh >git-submodule+ && \
chmod +x git-submodule+ && \
mv git-submodule+ git-submodule
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-web--browse git-web--browse+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's|@@LOCALEDIR@@|/usr/share/locale|g' -e 's/@@NO_CURL@@//g' -e 's/@@USE_GETTEXT_SCHEME@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' -e 's|@@GITWEBDIR@@|/usr/share/gitweb|g' -e 's|@@PERL@@|/usr/bin/perl|g' -e 's|@@SANE_TEXT_GREP@@|-a|g' -e 's|@@PAGER_ENV@@|LESS=FRX LV=-c|g' git-web--browse.sh >git-web--browse+ && \
chmod +x git-web--browse+ && \
mv git-web--browse+ git-web--browse
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f GIT-PERL-HEADER && \
INSTLIBDIR='/usr/share/perl5' && \
INSTLIBDIR_EXTRA='' && \
INSTLIBDIR="$INSTLIBDIR${INSTLIBDIR_EXTRA:+:$INSTLIBDIR_EXTRA}" && \
sed -e 's=@@PATHSEP@@=:=g' \
-e "s=@@INSTLIBDIR@@=$INSTLIBDIR=g" \
-e 's=@@PERLLIBDIR_REL@@=share/perl5=g' \
-e 's=@@GITEXECDIR_REL@@=lib/git-core=g' \
-e 's=@@LOCALEDIR_REL@@=share/locale=g' \
perl/header_templates/fixed_prefix.template.pl >GIT-PERL-HEADER+ && \
mv GIT-PERL-HEADER+ GIT-PERL-HEADER
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-p4 git-p4+ && \
sed -e '1s|#!.*python|#!/usr/bin/python|' \
git-p4.py >git-p4+ && \
chmod +x git-p4+ && \
mv git-p4+ git-p4
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-add--interactive git-add--interactive+ && \
sed -e '1{' \
-e ' s|#!.*perl|#!/usr/bin/perl|' \
-e ' r GIT-PERL-HEADER' \
-e ' G' \
-e '}' \
-e 's/@@GIT_VERSION@@/2.23.0.rc1/g' \
git-add--interactive.perl >git-add--interactive+ && \
chmod +x git-add--interactive+ && \
mv git-add--interactive+ git-add--interactive
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-archimport git-archimport+ && \
sed -e '1{' \
-e ' s|#!.*perl|#!/usr/bin/perl|' \
-e ' r GIT-PERL-HEADER' \
-e ' G' \
-e '}' \
-e 's/@@GIT_VERSION@@/2.23.0.rc1/g' \
git-archimport.perl >git-archimport+ && \
chmod +x git-archimport+ && \
mv git-archimport+ git-archimport
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-cvsexportcommit git-cvsexportcommit+ && \
sed -e '1{' \
-e ' s|#!.*perl|#!/usr/bin/perl|' \
-e ' r GIT-PERL-HEADER' \
-e ' G' \
-e '}' \
-e 's/@@GIT_VERSION@@/2.23.0.rc1/g' \
git-cvsexportcommit.perl >git-cvsexportcommit+ && \
chmod +x git-cvsexportcommit+ && \
mv git-cvsexportcommit+ git-cvsexportcommit
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-cvsimport git-cvsimport+ && \
sed -e '1{' \
-e ' s|#!.*perl|#!/usr/bin/perl|' \
-e ' r GIT-PERL-HEADER' \
-e ' G' \
-e '}' \
-e 's/@@GIT_VERSION@@/2.23.0.rc1/g' \
git-cvsimport.perl >git-cvsimport+ && \
chmod +x git-cvsimport+ && \
mv git-cvsimport+ git-cvsimport
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-cvsserver git-cvsserver+ && \
sed -e '1{' \
-e ' s|#!.*perl|#!/usr/bin/perl|' \
-e ' r GIT-PERL-HEADER' \
-e ' G' \
-e '}' \
-e 's/@@GIT_VERSION@@/2.23.0.rc1/g' \
git-cvsserver.perl >git-cvsserver+ && \
chmod +x git-cvsserver+ && \
mv git-cvsserver+ git-cvsserver
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-send-email git-send-email+ && \
sed -e '1{' \
-e ' s|#!.*perl|#!/usr/bin/perl|' \
-e ' r GIT-PERL-HEADER' \
-e ' G' \
-e '}' \
-e 's/@@GIT_VERSION@@/2.23.0.rc1/g' \
git-send-email.perl >git-send-email+ && \
chmod +x git-send-email+ && \
mv git-send-email+ git-send-email
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-svn git-svn+ && \
sed -e '1{' \
-e ' s|#!.*perl|#!/usr/bin/perl|' \
-e ' r GIT-PERL-HEADER' \
-e ' G' \
-e '}' \
-e 's/@@GIT_VERSION@@/2.23.0.rc1/g' \
git-svn.perl >git-svn+ && \
chmod +x git-svn+ && \
mv git-svn+ git-svn
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o attr.o -c -MF ./.depend/attr.o.d -MQ attr.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -DETC_GITATTRIBUTES='"/etc/gitattributes"' attr.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o builtin/worktree.o -c -MF builtin/.depend/worktree.o.d -MQ builtin/worktree.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' builtin/worktree.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o help.o -c -MF ./.depend/help.o.d -MQ help.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' help.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f libgit.a && ar rcs libgit.a abspath.o advice.o alias.o alloc.o apply.o archive.o archive-tar.o archive-zip.o argv-array.o attr.o base85.o bisect.o blame.o blob.o branch.o bulk-checkin.o bundle.o cache-tree.o chdir-notify.o checkout.o color.o column.o combine-diff.o commit.o commit-graph.o commit-reach.o compat/obstack.o compat/terminal.o config.o connect.o connected.o convert.o copy.o credential.o csum-file.o ctype.o date.o decorate.o delta-islands.o diffcore-break.o diffcore-delta.o diffcore-order.o diffcore-pickaxe.o diffcore-rename.o diff-delta.o diff-lib.o diff-no-index.o diff.o dir.o dir-iterator.o editor.o entry.o environment.o ewah/bitmap.o ewah/ewah_bitmap.o ewah/ewah_io.o ewah/ewah_rlw.o exec-cmd.o fetch-negotiator.o fetch-object.o fetch-pack.o fsck.o fsmonitor.o gettext.o gpg-interface.o graph.o grep.o hashmap.o linear-assignment.o help.o hex.o ident.o interdiff.o json-writer.o kwset.o levenshtein.o line-log.o line-range.o list-objects.o list-objects-filter.o list-objects-filter-options.o ll-merge.o lockfile.o log-tree.o ls-refs.o mailinfo.o mailmap.o match-trees.o mem-pool.o merge.o merge-blobs.o merge-recursive.o mergesort.o midx.o name-hash.o negotiator/default.o negotiator/skipping.o notes.o notes-cache.o notes-merge.o notes-utils.o object.o oidmap.o oidset.o packfile.o pack-bitmap.o pack-bitmap-write.o pack-check.o pack-objects.o pack-revindex.o pack-write.o pager.o parse-options.o parse-options-cb.o patch-delta.o patch-ids.o path.o pathspec.o pkt-line.o preload-index.o pretty.o prio-queue.o progress.o prompt.o protocol.o quote.o range-diff.o reachable.o read-cache.o rebase-interactive.o reflog-walk.o refs.o refs/files-backend.o refs/iterator.o refs/packed-backend.o refs/ref-cache.o refspec.o ref-filter.o remote.o replace-object.o repository.o rerere.o resolve-undo.o revision.o run-command.o send-pack.o sequencer.o serve.o server-info.o setup.o sha1-array.o sha1-lookup.o sha1-file.o sha1-name.o shallow.o sideband.o sigchain.o split-index.o strbuf.o streaming.o string-list.o submodule.o submodule-config.o sub-process.o symlinks.o tag.o tempfile.o thread-utils.o tmp-objdir.o trace.o trace2.o trace2/tr2_cfg.o trace2/tr2_cmd_name.o trace2/tr2_dst.o trace2/tr2_sid.o trace2/tr2_sysenv.o trace2/tr2_tbuf.o trace2/tr2_tgt_event.o trace2/tr2_tgt_normal.o trace2/tr2_tgt_perf.o trace2/tr2_tls.o trailer.o transport.o transport-helper.o tree-diff.o tree.o tree-walk.o unpack-trees.o upload-pack.o url.o urlmatch.o usage.o userdiff.o utf8.o varint.o version.o versioncmp.o walker.o wildmatch.o worktree.o wrapper.o write-or-die.o ws.o wt-status.o xdiff-interface.o zlib.o unix-socket.o sha1dc_git.o sha1dc/sha1.o sha1dc/ubc_check.o sha256/block/sha256.o compat/fopen.o compat/strlcpy.o compat/qsort_s.o
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o git-http-backend -Wl,-z,relro http-backend.o common-main.o libgit.a xdiff/lib.a -lpcre2-8 -lz -lpthread -lrt
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o git-daemon -Wl,-z,relro daemon.o common-main.o libgit.a xdiff/lib.a -lpcre2-8 -lz -lpthread -lrt
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o git-fast-import -Wl,-z,relro fast-import.o common-main.o libgit.a xdiff/lib.a -lpcre2-8 -lz -lpthread -lrt
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o git-credential-store -Wl,-z,relro credential-store.o common-main.o libgit.a xdiff/lib.a -lpcre2-8 -lz -lpthread -lrt
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o git-imap-send -Wl,-z,relro imap-send.o http.o common-main.o \
-lcurl libgit.a xdiff/lib.a -lpcre2-8 -lz -lpthread -lrt
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o git-shell -Wl,-z,relro shell.o common-main.o libgit.a xdiff/lib.a -lpcre2-8 -lz -lpthread -lrt
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o git-sh-i18n--envsubst -Wl,-z,relro sh-i18n--envsubst.o common-main.o libgit.a xdiff/lib.a -lpcre2-8 -lz -lpthread -lrt
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o git-remote-testsvn -Wl,-z,relro remote-testsvn.o common-main.o libgit.a xdiff/lib.a -lpcre2-8 -lz -lpthread -lrt \
vcs-svn/lib.a
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o git-credential-cache -Wl,-z,relro credential-cache.o common-main.o libgit.a xdiff/lib.a -lpcre2-8 -lz -lpthread -lrt
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o git-http-push -Wl,-z,relro http.o http-push.o common-main.o \
-lcurl -lexpat libgit.a xdiff/lib.a -lpcre2-8 -lz -lpthread -lrt
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o git-credential-cache--daemon -Wl,-z,relro credential-cache--daemon.o common-main.o libgit.a xdiff/lib.a -lpcre2-8 -lz -lpthread -lrt
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o git-http-fetch -Wl,-z,relro http.o http-walker.o http-fetch.o common-main.o \
-lcurl libgit.a xdiff/lib.a -lpcre2-8 -lz -lpthread -lrt
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o git-remote-http -Wl,-z,relro remote-curl.o http.o http-walker.o common-main.o \
-lcurl -lexpat libgit.a xdiff/lib.a -lpcre2-8 -lz -lpthread -lrt
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-remote-ftps && \
ln git-remote-http git-remote-ftps 2>/dev/null || \
ln -s git-remote-http git-remote-ftps 2>/dev/null || \
cp git-remote-http git-remote-ftps
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-remote-ftp && \
ln git-remote-http git-remote-ftp 2>/dev/null || \
ln -s git-remote-http git-remote-ftp 2>/dev/null || \
cp git-remote-http git-remote-ftp
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-remote-https && \
ln git-remote-http git-remote-https 2>/dev/null || \
ln -s git-remote-http git-remote-https 2>/dev/null || \
cp git-remote-http git-remote-https
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o git -Wl,-z,relro \
git.o builtin/add.o builtin/am.o builtin/annotate.o builtin/apply.o builtin/archive.o builtin/bisect--helper.o builtin/blame.o builtin/branch.o builtin/bundle.o builtin/cat-file.o builtin/check-attr.o builtin/check-ignore.o builtin/check-mailmap.o builtin/check-ref-format.o builtin/checkout-index.o builtin/checkout.o builtin/clean.o builtin/clone.o builtin/column.o builtin/commit-tree.o builtin/commit.o builtin/commit-graph.o builtin/config.o builtin/count-objects.o builtin/credential.o builtin/describe.o builtin/diff-files.o builtin/diff-index.o builtin/diff-tree.o builtin/diff.o builtin/difftool.o builtin/env--helper.o builtin/fast-export.o builtin/fetch-pack.o builtin/fetch.o builtin/fmt-merge-msg.o builtin/for-each-ref.o builtin/fsck.o builtin/gc.o builtin/get-tar-commit-id.o builtin/grep.o builtin/hash-object.o builtin/help.o builtin/index-pack.o builtin/init-db.o builtin/interpret-trailers.o builtin/log.o builtin/ls-files.o builtin/ls-remote.o builtin/ls-tree.o builtin/mailinfo.o builtin/mailsplit.o builtin/merge.o builtin/merge-base.o builtin/merge-file.o builtin/merge-index.o builtin/merge-ours.o builtin/merge-recursive.o builtin/merge-tree.o builtin/mktag.o builtin/mktree.o builtin/multi-pack-index.o builtin/mv.o builtin/name-rev.o builtin/notes.o builtin/pack-objects.o builtin/pack-redundant.o builtin/pack-refs.o builtin/patch-id.o builtin/prune-packed.o builtin/prune.o builtin/pull.o builtin/push.o builtin/range-diff.o builtin/read-tree.o builtin/rebase.o builtin/receive-pack.o builtin/reflog.o builtin/remote.o builtin/remote-ext.o builtin/remote-fd.o builtin/repack.o builtin/replace.o builtin/rerere.o builtin/reset.o builtin/rev-list.o builtin/rev-parse.o builtin/revert.o builtin/rm.o builtin/send-pack.o builtin/shortlog.o builtin/show-branch.o builtin/show-index.o builtin/show-ref.o builtin/stash.o builtin/stripspace.o builtin/submodule--helper.o builtin/symbolic-ref.o builtin/tag.o builtin/unpack-file.o builtin/unpack-objects.o builtin/update-index.o builtin/update-ref.o builtin/update-server-info.o builtin/upload-archive.o builtin/upload-pack.o builtin/var.o builtin/verify-commit.o builtin/verify-pack.o builtin/verify-tag.o builtin/worktree.o builtin/write-tree.o common-main.o libgit.a xdiff/lib.a -lpcre2-8 -lz -lpthread -lrt
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-add && \
ln git git-add 2>/dev/null || \
ln -s git git-add 2>/dev/null || \
cp git git-add
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-am && \
ln git git-am 2>/dev/null || \
ln -s git git-am 2>/dev/null || \
cp git git-am
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-annotate && \
ln git git-annotate 2>/dev/null || \
ln -s git git-annotate 2>/dev/null || \
cp git git-annotate
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-apply && \
ln git git-apply 2>/dev/null || \
ln -s git git-apply 2>/dev/null || \
cp git git-apply
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-bisect--helper && \
ln git git-bisect--helper 2>/dev/null || \
ln -s git git-bisect--helper 2>/dev/null || \
cp git git-bisect--helper
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-archive && \
ln git git-archive 2>/dev/null || \
ln -s git git-archive 2>/dev/null || \
cp git git-archive
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-blame && \
ln git git-blame 2>/dev/null || \
ln -s git git-blame 2>/dev/null || \
cp git git-blame
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-branch && \
ln git git-branch 2>/dev/null || \
ln -s git git-branch 2>/dev/null || \
cp git git-branch
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-bundle && \
ln git git-bundle 2>/dev/null || \
ln -s git git-bundle 2>/dev/null || \
cp git git-bundle
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-cat-file && \
ln git git-cat-file 2>/dev/null || \
ln -s git git-cat-file 2>/dev/null || \
cp git git-cat-file
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-check-attr && \
ln git git-check-attr 2>/dev/null || \
ln -s git git-check-attr 2>/dev/null || \
cp git git-check-attr
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-check-ignore && \
ln git git-check-ignore 2>/dev/null || \
ln -s git git-check-ignore 2>/dev/null || \
cp git git-check-ignore
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-check-mailmap && \
ln git git-check-mailmap 2>/dev/null || \
ln -s git git-check-mailmap 2>/dev/null || \
cp git git-check-mailmap
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-check-ref-format && \
ln git git-check-ref-format 2>/dev/null || \
ln -s git git-check-ref-format 2>/dev/null || \
cp git git-check-ref-format
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-checkout-index && \
ln git git-checkout-index 2>/dev/null || \
ln -s git git-checkout-index 2>/dev/null || \
cp git git-checkout-index
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-clone && \
ln git git-clone 2>/dev/null || \
ln -s git git-clone 2>/dev/null || \
cp git git-clone
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-checkout && \
ln git git-checkout 2>/dev/null || \
ln -s git git-checkout 2>/dev/null || \
cp git git-checkout
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-clean && \
ln git git-clean 2>/dev/null || \
ln -s git git-clean 2>/dev/null || \
cp git git-clean
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-commit && \
ln git git-commit 2>/dev/null || \
ln -s git git-commit 2>/dev/null || \
cp git git-commit
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-commit-tree && \
ln git git-commit-tree 2>/dev/null || \
ln -s git git-commit-tree 2>/dev/null || \
cp git git-commit-tree
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-column && \
ln git git-column 2>/dev/null || \
ln -s git git-column 2>/dev/null || \
cp git git-column
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-commit-graph && \
ln git git-commit-graph 2>/dev/null || \
ln -s git git-commit-graph 2>/dev/null || \
cp git git-commit-graph
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-config && \
ln git git-config 2>/dev/null || \
ln -s git git-config 2>/dev/null || \
cp git git-config
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-credential && \
ln git git-credential 2>/dev/null || \
ln -s git git-credential 2>/dev/null || \
cp git git-credential
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-describe && \
ln git git-describe 2>/dev/null || \
ln -s git git-describe 2>/dev/null || \
cp git git-describe
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-count-objects && \
ln git git-count-objects 2>/dev/null || \
ln -s git git-count-objects 2>/dev/null || \
cp git git-count-objects
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-diff-files && \
ln git git-diff-files 2>/dev/null || \
ln -s git git-diff-files 2>/dev/null || \
cp git git-diff-files
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-diff-tree && \
ln git git-diff-tree 2>/dev/null || \
ln -s git git-diff-tree 2>/dev/null || \
cp git git-diff-tree
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-diff && \
ln git git-diff 2>/dev/null || \
ln -s git git-diff 2>/dev/null || \
cp git git-diff
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-diff-index && \
ln git git-diff-index 2>/dev/null || \
ln -s git git-diff-index 2>/dev/null || \
cp git git-diff-index
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-difftool && \
ln git git-difftool 2>/dev/null || \
ln -s git git-difftool 2>/dev/null || \
cp git git-difftool
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-env--helper && \
ln git git-env--helper 2>/dev/null || \
ln -s git git-env--helper 2>/dev/null || \
cp git git-env--helper
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-fmt-merge-msg && \
ln git git-fmt-merge-msg 2>/dev/null || \
ln -s git git-fmt-merge-msg 2>/dev/null || \
cp git git-fmt-merge-msg
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-fast-export && \
ln git git-fast-export 2>/dev/null || \
ln -s git git-fast-export 2>/dev/null || \
cp git git-fast-export
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-fetch-pack && \
ln git git-fetch-pack 2>/dev/null || \
ln -s git git-fetch-pack 2>/dev/null || \
cp git git-fetch-pack
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-fetch && \
ln git git-fetch 2>/dev/null || \
ln -s git git-fetch 2>/dev/null || \
cp git git-fetch
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-for-each-ref && \
ln git git-for-each-ref 2>/dev/null || \
ln -s git git-for-each-ref 2>/dev/null || \
cp git git-for-each-ref
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-fsck && \
ln git git-fsck 2>/dev/null || \
ln -s git git-fsck 2>/dev/null || \
cp git git-fsck
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-gc && \
ln git git-gc 2>/dev/null || \
ln -s git git-gc 2>/dev/null || \
cp git git-gc
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-get-tar-commit-id && \
ln git git-get-tar-commit-id 2>/dev/null || \
ln -s git git-get-tar-commit-id 2>/dev/null || \
cp git git-get-tar-commit-id
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-help && \
ln git git-help 2>/dev/null || \
ln -s git git-help 2>/dev/null || \
cp git git-help
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-grep && \
ln git git-grep 2>/dev/null || \
ln -s git git-grep 2>/dev/null || \
cp git git-grep
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-hash-object && \
ln git git-hash-object 2>/dev/null || \
ln -s git git-hash-object 2>/dev/null || \
cp git git-hash-object
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-index-pack && \
ln git git-index-pack 2>/dev/null || \
ln -s git git-index-pack 2>/dev/null || \
cp git git-index-pack
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-init-db && \
ln git git-init-db 2>/dev/null || \
ln -s git git-init-db 2>/dev/null || \
cp git git-init-db
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-interpret-trailers && \
ln git git-interpret-trailers 2>/dev/null || \
ln -s git git-interpret-trailers 2>/dev/null || \
cp git git-interpret-trailers
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-log && \
ln git git-log 2>/dev/null || \
ln -s git git-log 2>/dev/null || \
cp git git-log
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-ls-files && \
ln git git-ls-files 2>/dev/null || \
ln -s git git-ls-files 2>/dev/null || \
cp git git-ls-files
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-ls-remote && \
ln git git-ls-remote 2>/dev/null || \
ln -s git git-ls-remote 2>/dev/null || \
cp git git-ls-remote
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-ls-tree && \
ln git git-ls-tree 2>/dev/null || \
ln -s git git-ls-tree 2>/dev/null || \
cp git git-ls-tree
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-mailinfo && \
ln git git-mailinfo 2>/dev/null || \
ln -s git git-mailinfo 2>/dev/null || \
cp git git-mailinfo
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-merge && \
ln git git-merge 2>/dev/null || \
ln -s git git-merge 2>/dev/null || \
cp git git-merge
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-merge-base && \
ln git git-merge-base 2>/dev/null || \
ln -s git git-merge-base 2>/dev/null || \
cp git git-merge-base
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-merge-file && \
ln git git-merge-file 2>/dev/null || \
ln -s git git-merge-file 2>/dev/null || \
cp git git-merge-file
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-mailsplit && \
ln git git-mailsplit 2>/dev/null || \
ln -s git git-mailsplit 2>/dev/null || \
cp git git-mailsplit
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-merge-index && \
ln git git-merge-index 2>/dev/null || \
ln -s git git-merge-index 2>/dev/null || \
cp git git-merge-index
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-merge-ours && \
ln git git-merge-ours 2>/dev/null || \
ln -s git git-merge-ours 2>/dev/null || \
cp git git-merge-ours
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-merge-recursive && \
ln git git-merge-recursive 2>/dev/null || \
ln -s git git-merge-recursive 2>/dev/null || \
cp git git-merge-recursive
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-merge-tree && \
ln git git-merge-tree 2>/dev/null || \
ln -s git git-merge-tree 2>/dev/null || \
cp git git-merge-tree
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-mktag && \
ln git git-mktag 2>/dev/null || \
ln -s git git-mktag 2>/dev/null || \
cp git git-mktag
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-mktree && \
ln git git-mktree 2>/dev/null || \
ln -s git git-mktree 2>/dev/null || \
cp git git-mktree
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-name-rev && \
ln git git-name-rev 2>/dev/null || \
ln -s git git-name-rev 2>/dev/null || \
cp git git-name-rev
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-multi-pack-index && \
ln git git-multi-pack-index 2>/dev/null || \
ln -s git git-multi-pack-index 2>/dev/null || \
cp git git-multi-pack-index
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-notes && \
ln git git-notes 2>/dev/null || \
ln -s git git-notes 2>/dev/null || \
cp git git-notes
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-mv && \
ln git git-mv 2>/dev/null || \
ln -s git git-mv 2>/dev/null || \
cp git git-mv
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-pack-objects && \
ln git git-pack-objects 2>/dev/null || \
ln -s git git-pack-objects 2>/dev/null || \
cp git git-pack-objects
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-pack-redundant && \
ln git git-pack-redundant 2>/dev/null || \
ln -s git git-pack-redundant 2>/dev/null || \
cp git git-pack-redundant
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-pack-refs && \
ln git git-pack-refs 2>/dev/null || \
ln -s git git-pack-refs 2>/dev/null || \
cp git git-pack-refs
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-patch-id && \
ln git git-patch-id 2>/dev/null || \
ln -s git git-patch-id 2>/dev/null || \
cp git git-patch-id
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-prune-packed && \
ln git git-prune-packed 2>/dev/null || \
ln -s git git-prune-packed 2>/dev/null || \
cp git git-prune-packed
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-prune && \
ln git git-prune 2>/dev/null || \
ln -s git git-prune 2>/dev/null || \
cp git git-prune
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-pull && \
ln git git-pull 2>/dev/null || \
ln -s git git-pull 2>/dev/null || \
cp git git-pull
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-push && \
ln git git-push 2>/dev/null || \
ln -s git git-push 2>/dev/null || \
cp git git-push
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-range-diff && \
ln git git-range-diff 2>/dev/null || \
ln -s git git-range-diff 2>/dev/null || \
cp git git-range-diff
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-read-tree && \
ln git git-read-tree 2>/dev/null || \
ln -s git git-read-tree 2>/dev/null || \
cp git git-read-tree
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-rebase && \
ln git git-rebase 2>/dev/null || \
ln -s git git-rebase 2>/dev/null || \
cp git git-rebase
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-receive-pack && \
ln git git-receive-pack 2>/dev/null || \
ln -s git git-receive-pack 2>/dev/null || \
cp git git-receive-pack
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-reflog && \
ln git git-reflog 2>/dev/null || \
ln -s git git-reflog 2>/dev/null || \
cp git git-reflog
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-remote-ext && \
ln git git-remote-ext 2>/dev/null || \
ln -s git git-remote-ext 2>/dev/null || \
cp git git-remote-ext
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-remote && \
ln git git-remote 2>/dev/null || \
ln -s git git-remote 2>/dev/null || \
cp git git-remote
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-remote-fd && \
ln git git-remote-fd 2>/dev/null || \
ln -s git git-remote-fd 2>/dev/null || \
cp git git-remote-fd
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-repack && \
ln git git-repack 2>/dev/null || \
ln -s git git-repack 2>/dev/null || \
cp git git-repack
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-replace && \
ln git git-replace 2>/dev/null || \
ln -s git git-replace 2>/dev/null || \
cp git git-replace
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-rerere && \
ln git git-rerere 2>/dev/null || \
ln -s git git-rerere 2>/dev/null || \
cp git git-rerere
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-rev-list && \
ln git git-rev-list 2>/dev/null || \
ln -s git git-rev-list 2>/dev/null || \
cp git git-rev-list
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-reset && \
ln git git-reset 2>/dev/null || \
ln -s git git-reset 2>/dev/null || \
cp git git-reset
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-rev-parse && \
ln git git-rev-parse 2>/dev/null || \
ln -s git git-rev-parse 2>/dev/null || \
cp git git-rev-parse
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-rm && \
ln git git-rm 2>/dev/null || \
ln -s git git-rm 2>/dev/null || \
cp git git-rm
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-send-pack && \
ln git git-send-pack 2>/dev/null || \
ln -s git git-send-pack 2>/dev/null || \
cp git git-send-pack
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-shortlog && \
ln git git-shortlog 2>/dev/null || \
ln -s git git-shortlog 2>/dev/null || \
cp git git-shortlog
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-revert && \
ln git git-revert 2>/dev/null || \
ln -s git git-revert 2>/dev/null || \
cp git git-revert
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-show-branch && \
ln git git-show-branch 2>/dev/null || \
ln -s git git-show-branch 2>/dev/null || \
cp git git-show-branch
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-show-index && \
ln git git-show-index 2>/dev/null || \
ln -s git git-show-index 2>/dev/null || \
cp git git-show-index
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-stash && \
ln git git-stash 2>/dev/null || \
ln -s git git-stash 2>/dev/null || \
cp git git-stash
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-show-ref && \
ln git git-show-ref 2>/dev/null || \
ln -s git git-show-ref 2>/dev/null || \
cp git git-show-ref
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-symbolic-ref && \
ln git git-symbolic-ref 2>/dev/null || \
ln -s git git-symbolic-ref 2>/dev/null || \
cp git git-symbolic-ref
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-stripspace && \
ln git git-stripspace 2>/dev/null || \
ln -s git git-stripspace 2>/dev/null || \
cp git git-stripspace
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-submodule--helper && \
ln git git-submodule--helper 2>/dev/null || \
ln -s git git-submodule--helper 2>/dev/null || \
cp git git-submodule--helper
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-tag && \
ln git git-tag 2>/dev/null || \
ln -s git git-tag 2>/dev/null || \
cp git git-tag
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-unpack-file && \
ln git git-unpack-file 2>/dev/null || \
ln -s git git-unpack-file 2>/dev/null || \
cp git git-unpack-file
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-unpack-objects && \
ln git git-unpack-objects 2>/dev/null || \
ln -s git git-unpack-objects 2>/dev/null || \
cp git git-unpack-objects
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-update-index && \
ln git git-update-index 2>/dev/null || \
ln -s git git-update-index 2>/dev/null || \
cp git git-update-index
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-update-ref && \
ln git git-update-ref 2>/dev/null || \
ln -s git git-update-ref 2>/dev/null || \
cp git git-update-ref
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-update-server-info && \
ln git git-update-server-info 2>/dev/null || \
ln -s git git-update-server-info 2>/dev/null || \
cp git git-update-server-info
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-upload-archive && \
ln git git-upload-archive 2>/dev/null || \
ln -s git git-upload-archive 2>/dev/null || \
cp git git-upload-archive
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-upload-pack && \
ln git git-upload-pack 2>/dev/null || \
ln -s git git-upload-pack 2>/dev/null || \
cp git git-upload-pack
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-var && \
ln git git-var 2>/dev/null || \
ln -s git git-var 2>/dev/null || \
cp git git-var
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-verify-commit && \
ln git git-verify-commit 2>/dev/null || \
ln -s git git-verify-commit 2>/dev/null || \
cp git git-verify-commit
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-verify-tag && \
ln git git-verify-tag 2>/dev/null || \
ln -s git git-verify-tag 2>/dev/null || \
cp git git-verify-tag
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-worktree && \
ln git git-worktree 2>/dev/null || \
ln -s git git-worktree 2>/dev/null || \
cp git git-worktree
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-verify-pack && \
ln git git-verify-pack 2>/dev/null || \
ln -s git git-verify-pack 2>/dev/null || \
cp git git-verify-pack
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-write-tree && \
ln git git-write-tree 2>/dev/null || \
ln -s git git-write-tree 2>/dev/null || \
cp git git-write-tree
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-format-patch && \
ln git git-format-patch 2>/dev/null || \
ln -s git git-format-patch 2>/dev/null || \
cp git git-format-patch
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-cherry && \
ln git git-cherry 2>/dev/null || \
ln -s git git-cherry 2>/dev/null || \
cp git git-cherry
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-cherry-pick && \
ln git git-cherry-pick 2>/dev/null || \
ln -s git git-cherry-pick 2>/dev/null || \
cp git git-cherry-pick
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-fsck-objects && \
ln git git-fsck-objects 2>/dev/null || \
ln -s git git-fsck-objects 2>/dev/null || \
cp git git-fsck-objects
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-merge-subtree && \
ln git git-merge-subtree 2>/dev/null || \
ln -s git git-merge-subtree 2>/dev/null || \
cp git git-merge-subtree
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-init && \
ln git git-init 2>/dev/null || \
ln -s git git-init 2>/dev/null || \
cp git git-init
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-restore && \
ln git git-restore 2>/dev/null || \
ln -s git git-restore 2>/dev/null || \
cp git git-restore
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-show && \
ln git git-show 2>/dev/null || \
ln -s git git-show 2>/dev/null || \
cp git git-show
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-status && \
ln git git-status 2>/dev/null || \
ln -s git git-status 2>/dev/null || \
cp git git-status
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-switch && \
ln git git-switch 2>/dev/null || \
ln -s git git-switch 2>/dev/null || \
cp git git-switch
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-stage && \
ln git git-stage 2>/dev/null || \
ln -s git git-stage 2>/dev/null || \
cp git git-stage
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-whatchanged && \
ln git git-whatchanged 2>/dev/null || \
ln -s git git-whatchanged 2>/dev/null || \
cp git git-whatchanged
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
/usr/bin/make -C git-gui gitexecdir='/usr/lib/git-core' all
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
GITGUI_VERSION = 0.21.GITGUI
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
* new locations or Tcl/Tk interpreter
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
msgfmt --statistics --tcl -l de -d po/ po/de.po
520 translated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
msgfmt --statistics --tcl -l pt_pt -d po/ po/pt_pt.po
550 translated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
msgfmt --statistics --tcl -l nb -d po/ po/nb.po
474 translated messages, 39 untranslated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
msgfmt --statistics --tcl -l hu -d po/ po/hu.po
514 translated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
msgfmt --statistics --tcl -l vi -d po/ po/vi.po
543 translated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
msgfmt --statistics --tcl -l sv -d po/ po/sv.po
547 translated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
msgfmt --statistics --tcl -l fr -d po/ po/fr.po
520 translated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
msgfmt --statistics --tcl -l it -d po/ po/it.po
519 translated messages, 1 untranslated message.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
msgfmt --statistics --tcl -l ja -d po/ po/ja.po
546 translated messages, 1 untranslated message.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
msgfmt --statistics --tcl -l pt_br -d po/ po/pt_br.po
520 translated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
msgfmt --statistics --tcl -l zh_cn -d po/ po/zh_cn.po
366 translated messages, 7 fuzzy translations, 17 untranslated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
msgfmt --statistics --tcl -l bg -d po/ po/bg.po
565 translated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
msgfmt --statistics --tcl -l ru -d po/ po/ru.po
520 translated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
rm -f git-gui git-gui+ && \
sed -e '1s|#!.*/sh|#!/bin/sh|' \
-e 's|@@SHELL_PATH@@|/bin/sh|' \
-e '1,30s|^ argv0=$0| argv0=$0|' \
-e '1,30s|^ exec wish | exec '\''wish'\'' |' \
-e 's/@@GITGUI_VERSION@@/0.21.GITGUI/g' \
-e 's|@@GITGUI_RELATIVE@@||' \
-e 's|@@GITGUI_LIBDIR@@|/usr/share/git-gui/lib|' \
git-gui.sh >git-gui+ && \
chmod +x git-gui+ && \
mv git-gui+ git-gui
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
msgfmt --statistics --tcl -l el -d po/ po/el.po
381 translated messages, 4 fuzzy translations, 6 untranslated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
make[3]: Entering directory '/<<PKGBUILDDIR>>/git-gui'
if echo \
source lib/class.tcl\; \
auto_mkindex lib about.tcl blame.tcl branch.tcl branch_checkout.tcl branch_create.tcl branch_delete.tcl branch_rename.tcl browser.tcl checkout_op.tcl choose_font.tcl choose_repository.tcl choose_rev.tcl class.tcl commit.tcl console.tcl database.tcl date.tcl diff.tcl encoding.tcl error.tcl index.tcl line.tcl logo.tcl merge.tcl mergetool.tcl option.tcl remote.tcl remote_add.tcl remote_branch_delete.tcl search.tcl shortcut.tcl spellcheck.tcl sshkey.tcl status_bar.tcl themed.tcl tools.tcl tools_dlg.tcl transport.tcl win32.tcl \
| tclsh ; then : ok; \
else \
echo >&2 " * tclsh failed; using unoptimized loading"; \
rm -f lib/tclIndex ; \
echo '# Autogenerated by git-gui Makefile' >lib/tclIndex && \
echo >>lib/tclIndex && \
echo 'class.tcl' >>lib/tclIndex && echo 'about.tcl' >>lib/tclIndex && echo 'blame.tcl' >>lib/tclIndex && echo 'branch.tcl' >>lib/tclIndex && echo 'branch_checkout.tcl' >>lib/tclIndex && echo 'branch_create.tcl' >>lib/tclIndex && echo 'branch_delete.tcl' >>lib/tclIndex && echo 'branch_rename.tcl' >>lib/tclIndex && echo 'browser.tcl' >>lib/tclIndex && echo 'checkout_op.tcl' >>lib/tclIndex && echo 'choose_font.tcl' >>lib/tclIndex && echo 'choose_repository.tcl' >>lib/tclIndex && echo 'choose_rev.tcl' >>lib/tclIndex && echo 'class.tcl' >>lib/tclIndex && echo 'commit.tcl' >>lib/tclIndex && echo 'console.tcl' >>lib/tclIndex && echo 'database.tcl' >>lib/tclIndex && echo 'date.tcl' >>lib/tclIndex && echo 'diff.tcl' >>lib/tclIndex && echo 'encoding.tcl' >>lib/tclIndex && echo 'error.tcl' >>lib/tclIndex && echo 'index.tcl' >>lib/tclIndex && echo 'line.tcl' >>lib/tclIndex && echo 'logo.tcl' >>lib/tclIndex && echo 'merge.tcl' >>lib/tclIndex && echo 'mergetool.tcl' >>lib/tclIndex && echo 'option.tcl' >>lib/tclIndex && echo 'remote.tcl' >>lib/tclIndex && echo 'remote_add.tcl' >>lib/tclIndex && echo 'remote_branch_delete.tcl' >>lib/tclIndex && echo 'search.tcl' >>lib/tclIndex && echo 'shortcut.tcl' >>lib/tclIndex && echo 'spellcheck.tcl' >>lib/tclIndex && echo 'sshkey.tcl' >>lib/tclIndex && echo 'status_bar.tcl' >>lib/tclIndex && echo 'themed.tcl' >>lib/tclIndex && echo 'tools.tcl' >>lib/tclIndex && echo 'tools_dlg.tcl' >>lib/tclIndex && echo 'transport.tcl' >>lib/tclIndex && echo 'win32.tcl' >>lib/tclIndex && \
echo >>lib/tclIndex ; \
fi
make[3]: Leaving directory '/<<PKGBUILDDIR>>/git-gui'
/usr/bin/make -C gitk-git all
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
* new Tcl/Tk interpreter location
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
Generating catalog po/de.msg
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
msgfmt --statistics --tcl po/de.po -l de -d po/
307 translated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
Generating catalog po/pt_pt.msg
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
Generating catalog po/vi.msg
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
Generating catalog po/ca.msg
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
Generating catalog po/hu.msg
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
msgfmt --statistics --tcl po/pt_pt.po -l pt_pt -d po/
311 translated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
msgfmt --statistics --tcl po/ca.po -l ca -d po/
307 translated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
msgfmt --statistics --tcl po/vi.po -l vi -d po/
307 translated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
Generating catalog po/es.msg
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
msgfmt --statistics --tcl po/hu.po -l hu -d po/
277 translated messages, 18 fuzzy translations, 12 untranslated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
msgfmt --statistics --tcl po/es.po -l es -d po/
184 translated messages, 46 fuzzy translations, 77 untranslated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
Generating catalog po/sv.msg
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
Generating catalog po/fr.msg
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
Generating catalog po/it.msg
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
msgfmt --statistics --tcl po/sv.po -l sv -d po/
311 translated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
msgfmt --statistics --tcl po/fr.po -l fr -d po/
311 translated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
Generating catalog po/ja.msg
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
Generating catalog po/pt_br.msg
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
Generating catalog po/bg.msg
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
msgfmt --statistics --tcl po/it.po -l it -d po/
274 translated messages, 17 fuzzy translations, 16 untranslated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
Generating catalog po/ru.msg
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
msgfmt --statistics --tcl po/ja.po -l ja -d po/
311 translated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
msgfmt --statistics --tcl po/pt_br.po -l pt_br -d po/
279 translated messages, 16 fuzzy translations, 12 untranslated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
msgfmt --statistics --tcl po/ru.po -l ru -d po/
317 translated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
msgfmt --statistics --tcl po/bg.po -l bg -d po/
317 translated messages.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
make[3]: Entering directory '/<<PKGBUILDDIR>>/gitk-git'
rm -f gitk-wish gitk-wish+ && \
sed -e '1,3s|^exec .* "$0"|exec wish "$0"|' <gitk >gitk-wish+ && \
chmod +x gitk-wish+ && \
mv -f gitk-wish+ gitk-wish
make[3]: Leaving directory '/<<PKGBUILDDIR>>/gitk-git'
/usr/bin/make -C templates SHELL_PATH='/bin/sh' PERL_PATH='/usr/bin/perl'
make[3]: Entering directory '/<<PKGBUILDDIR>>/templates'
: no custom templates yet
make[3]: Leaving directory '/<<PKGBUILDDIR>>/templates'
make[3]: Entering directory '/<<PKGBUILDDIR>>/templates'
umask 022 && ls *--* 2>/dev/null | \
while read boilerplate; \
do \
case "$boilerplate" in *~) continue ;; esac && \
dst=`echo "$boilerplate" | sed -e 's|^this|.|;s|--|/|g'` && \
dir=`expr "$dst" : '\(.*\)/'` && \
mkdir -p blt/$dir && \
case "$boilerplate" in \
*--) continue;; \
esac && \
sed -e '1s|#!.*/sh|#!/bin/sh|' \
-e 's|@SHELL_PATH@|/bin/sh|' \
-e 's|@PERL_PATH@|/usr/bin/perl|g' $boilerplate > \
blt/$dst && \
if test -x "$boilerplate"; then rx=rx; else rx=r; fi && \
chmod a+$rx "blt/$dst" || exit; \
done && \
date >boilerplates.made
make[3]: Leaving directory '/<<PKGBUILDDIR>>/templates'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p po/build/locale/is/LC_MESSAGES/ && msgfmt --check --statistics -o po/build/locale/is/LC_MESSAGES/git.mo po/is.po
14 translated messages.
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p po/build/locale/pt_PT/LC_MESSAGES/ && msgfmt --check --statistics -o po/build/locale/pt_PT/LC_MESSAGES/git.mo po/pt_PT.po
3198 translated messages.
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p po/build/locale/de/LC_MESSAGES/ && msgfmt --check --statistics -o po/build/locale/de/LC_MESSAGES/git.mo po/de.po
4581 translated messages.
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p po/build/locale/vi/LC_MESSAGES/ && msgfmt --check --statistics -o po/build/locale/vi/LC_MESSAGES/git.mo po/vi.po
4581 translated messages.
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p po/build/locale/ca/LC_MESSAGES/ && msgfmt --check --statistics -o po/build/locale/ca/LC_MESSAGES/git.mo po/ca.po
3636 translated messages, 399 fuzzy translations, 328 untranslated messages.
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p po/build/locale/ko/LC_MESSAGES/ && msgfmt --check --statistics -o po/build/locale/ko/LC_MESSAGES/git.mo po/ko.po
3608 translated messages.
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p po/build/locale/es/LC_MESSAGES/ && msgfmt --check --statistics -o po/build/locale/es/LC_MESSAGES/git.mo po/es.po
4581 translated messages.
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p po/build/locale/fr/LC_MESSAGES/ && msgfmt --check --statistics -o po/build/locale/fr/LC_MESSAGES/git.mo po/fr.po
4581 translated messages.
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p po/build/locale/it/LC_MESSAGES/ && msgfmt --check --statistics -o po/build/locale/it/LC_MESSAGES/git.mo po/it.po
3890 translated messages, 140 fuzzy translations, 551 untranslated messages.
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p po/build/locale/sv/LC_MESSAGES/ && msgfmt --check --statistics -o po/build/locale/sv/LC_MESSAGES/git.mo po/sv.po
4577 translated messages.
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p po/build/locale/bg/LC_MESSAGES/ && msgfmt --check --statistics -o po/build/locale/bg/LC_MESSAGES/git.mo po/bg.po
4581 translated messages.
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p po/build/locale/ru/LC_MESSAGES/ && msgfmt --check --statistics -o po/build/locale/ru/LC_MESSAGES/git.mo po/ru.po
3366 translated messages, 594 untranslated messages.
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p po/build/locale/el/LC_MESSAGES/ && msgfmt --check --statistics -o po/build/locale/el/LC_MESSAGES/git.mo po/el.po
1038 translated messages, 3325 untranslated messages.
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p po/build/locale/zh_CN/LC_MESSAGES/ && msgfmt --check --statistics -o po/build/locale/zh_CN/LC_MESSAGES/git.mo po/zh_CN.po
4581 translated messages.
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p perl/build/lib/Git/ && \
sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' \
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|1|g' \
< perl/Git/IndexInfo.pm > perl/build/lib/Git/IndexInfo.pm
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p perl/build/lib/ && \
sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' \
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|1|g' \
< perl/Git.pm > perl/build/lib/Git.pm
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p perl/build/lib/Git/ && \
sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' \
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|1|g' \
< perl/Git/Packet.pm > perl/build/lib/Git/Packet.pm
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p perl/build/lib/Git/ && \
sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' \
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|1|g' \
< perl/Git/SVN.pm > perl/build/lib/Git/SVN.pm
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p perl/build/lib/Git/LoadCPAN/ && \
sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' \
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|1|g' \
< perl/Git/LoadCPAN/Error.pm > perl/build/lib/Git/LoadCPAN/Error.pm
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p perl/build/lib/Git/ && \
sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' \
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|1|g' \
< perl/Git/I18N.pm > perl/build/lib/Git/I18N.pm
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p perl/build/lib/Git/ && \
sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' \
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|1|g' \
< perl/Git/LoadCPAN.pm > perl/build/lib/Git/LoadCPAN.pm
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p perl/build/lib/Git/SVN/ && \
sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' \
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|1|g' \
< perl/Git/SVN/GlobSpec.pm > perl/build/lib/Git/SVN/GlobSpec.pm
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p perl/build/lib/Git/SVN/ && \
sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' \
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|1|g' \
< perl/Git/SVN/Fetcher.pm > perl/build/lib/Git/SVN/Fetcher.pm
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p perl/build/lib/Git/SVN/ && \
sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' \
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|1|g' \
< perl/Git/SVN/Utils.pm > perl/build/lib/Git/SVN/Utils.pm
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p perl/build/lib/Git/SVN/ && \
sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' \
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|1|g' \
< perl/Git/SVN/Prompt.pm > perl/build/lib/Git/SVN/Prompt.pm
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p perl/build/lib/Git/SVN/ && \
sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' \
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|1|g' \
< perl/Git/SVN/Ra.pm > perl/build/lib/Git/SVN/Ra.pm
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p perl/build/lib/Git/SVN/ && \
sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' \
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|1|g' \
< perl/Git/SVN/Editor.pm > perl/build/lib/Git/SVN/Editor.pm
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p perl/build/lib/Git/SVN/ && \
sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' \
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|1|g' \
< perl/Git/SVN/Migration.pm > perl/build/lib/Git/SVN/Migration.pm
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p perl/build/lib/Git/SVN/ && \
sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' \
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|1|g' \
< perl/Git/SVN/Log.pm > perl/build/lib/Git/SVN/Log.pm
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p perl/build/lib/Git/LoadCPAN/Mail/ && \
sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' \
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|1|g' \
< perl/Git/LoadCPAN/Mail/Address.pm > perl/build/lib/Git/LoadCPAN/Mail/Address.pm
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
mkdir -p perl/build/lib/Git/SVN/Memoize/ && \
sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' \
-e 's|@@NO_PERL_CPAN_FALLBACKS@@|1|g' \
< perl/Git/SVN/Memoize/YAML.pm > perl/build/lib/Git/SVN/Memoize/YAML.pm
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-tool.o -c -MF t/helper/.depend/test-tool.o.d -MQ t/helper/test-tool.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-tool.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-line-buffer.o -c -MF t/helper/.depend/test-line-buffer.o.d -MQ t/helper/test-line-buffer.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-line-buffer.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-svn-fe.o -c -MF t/helper/.depend/test-svn-fe.o.d -MQ t/helper/test-svn-fe.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-svn-fe.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-fake-ssh.o -c -MF t/helper/.depend/test-fake-ssh.o.d -MQ t/helper/test-fake-ssh.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-fake-ssh.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-chmtime.o -c -MF t/helper/.depend/test-chmtime.o.d -MQ t/helper/test-chmtime.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-chmtime.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-config.o -c -MF t/helper/.depend/test-config.o.d -MQ t/helper/test-config.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-config.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-ctype.o -c -MF t/helper/.depend/test-ctype.o.d -MQ t/helper/test-ctype.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-ctype.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-date.o -c -MF t/helper/.depend/test-date.o.d -MQ t/helper/test-date.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-date.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-delta.o -c -MF t/helper/.depend/test-delta.o.d -MQ t/helper/test-delta.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-delta.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-dir-iterator.o -c -MF t/helper/.depend/test-dir-iterator.o.d -MQ t/helper/test-dir-iterator.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-dir-iterator.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-drop-caches.o -c -MF t/helper/.depend/test-drop-caches.o.d -MQ t/helper/test-drop-caches.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-drop-caches.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-dump-cache-tree.o -c -MF t/helper/.depend/test-dump-cache-tree.o.d -MQ t/helper/test-dump-cache-tree.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-dump-cache-tree.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-dump-fsmonitor.o -c -MF t/helper/.depend/test-dump-fsmonitor.o.d -MQ t/helper/test-dump-fsmonitor.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-dump-fsmonitor.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-dump-split-index.o -c -MF t/helper/.depend/test-dump-split-index.o.d -MQ t/helper/test-dump-split-index.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-dump-split-index.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-dump-untracked-cache.o -c -MF t/helper/.depend/test-dump-untracked-cache.o.d -MQ t/helper/test-dump-untracked-cache.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-dump-untracked-cache.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-example-decorate.o -c -MF t/helper/.depend/test-example-decorate.o.d -MQ t/helper/test-example-decorate.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-example-decorate.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-genrandom.o -c -MF t/helper/.depend/test-genrandom.o.d -MQ t/helper/test-genrandom.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-genrandom.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-genzeros.o -c -MF t/helper/.depend/test-genzeros.o.d -MQ t/helper/test-genzeros.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-genzeros.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-hash.o -c -MF t/helper/.depend/test-hash.o.d -MQ t/helper/test-hash.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-hash.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-hash-speed.o -c -MF t/helper/.depend/test-hash-speed.o.d -MQ t/helper/test-hash-speed.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-hash-speed.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-index-version.o -c -MF t/helper/.depend/test-index-version.o.d -MQ t/helper/test-index-version.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-index-version.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-hashmap.o -c -MF t/helper/.depend/test-hashmap.o.d -MQ t/helper/test-hashmap.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-hashmap.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-match-trees.o -c -MF t/helper/.depend/test-match-trees.o.d -MQ t/helper/test-match-trees.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-match-trees.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-json-writer.o -c -MF t/helper/.depend/test-json-writer.o.d -MQ t/helper/test-json-writer.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-json-writer.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-mergesort.o -c -MF t/helper/.depend/test-mergesort.o.d -MQ t/helper/test-mergesort.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-mergesort.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-mktemp.o -c -MF t/helper/.depend/test-mktemp.o.d -MQ t/helper/test-mktemp.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-mktemp.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-lazy-init-name-hash.o -c -MF t/helper/.depend/test-lazy-init-name-hash.o.d -MQ t/helper/test-lazy-init-name-hash.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-lazy-init-name-hash.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-online-cpus.o -c -MF t/helper/.depend/test-online-cpus.o.d -MQ t/helper/test-online-cpus.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-online-cpus.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-oidmap.o -c -MF t/helper/.depend/test-oidmap.o.d -MQ t/helper/test-oidmap.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-oidmap.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-pkt-line.o -c -MF t/helper/.depend/test-pkt-line.o.d -MQ t/helper/test-pkt-line.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-pkt-line.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-prio-queue.o -c -MF t/helper/.depend/test-prio-queue.o.d -MQ t/helper/test-prio-queue.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-prio-queue.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-path-utils.o -c -MF t/helper/.depend/test-path-utils.o.d -MQ t/helper/test-path-utils.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-path-utils.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-parse-options.o -c -MF t/helper/.depend/test-parse-options.o.d -MQ t/helper/test-parse-options.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-parse-options.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-read-cache.o -c -MF t/helper/.depend/test-read-cache.o.d -MQ t/helper/test-read-cache.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-read-cache.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-read-midx.o -c -MF t/helper/.depend/test-read-midx.o.d -MQ t/helper/test-read-midx.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-read-midx.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-reach.o -c -MF t/helper/.depend/test-reach.o.d -MQ t/helper/test-reach.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-reach.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-regex.o -c -MF t/helper/.depend/test-regex.o.d -MQ t/helper/test-regex.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-regex.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-repository.o -c -MF t/helper/.depend/test-repository.o.d -MQ t/helper/test-repository.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-repository.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-run-command.o -c -MF t/helper/.depend/test-run-command.o.d -MQ t/helper/test-run-command.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-run-command.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-revision-walking.o -c -MF t/helper/.depend/test-revision-walking.o.d -MQ t/helper/test-revision-walking.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-revision-walking.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-ref-store.o -c -MF t/helper/.depend/test-ref-store.o.d -MQ t/helper/test-ref-store.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-ref-store.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-scrap-cache-tree.o -c -MF t/helper/.depend/test-scrap-cache-tree.o.d -MQ t/helper/test-scrap-cache-tree.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-scrap-cache-tree.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-sha1.o -c -MF t/helper/.depend/test-sha1.o.d -MQ t/helper/test-sha1.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-sha1.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-serve-v2.o -c -MF t/helper/.depend/test-serve-v2.o.d -MQ t/helper/test-serve-v2.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-serve-v2.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-sha256.o -c -MF t/helper/.depend/test-sha256.o.d -MQ t/helper/test-sha256.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-sha256.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-sigchain.o -c -MF t/helper/.depend/test-sigchain.o.d -MQ t/helper/test-sigchain.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-sigchain.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-sha1-array.o -c -MF t/helper/.depend/test-sha1-array.o.d -MQ t/helper/test-sha1-array.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-sha1-array.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-strcmp-offset.o -c -MF t/helper/.depend/test-strcmp-offset.o.d -MQ t/helper/test-strcmp-offset.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-strcmp-offset.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-submodule-nested-repo-config.o -c -MF t/helper/.depend/test-submodule-nested-repo-config.o.d -MQ t/helper/test-submodule-nested-repo-config.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-submodule-nested-repo-config.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-string-list.o -c -MF t/helper/.depend/test-string-list.o.d -MQ t/helper/test-string-list.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-string-list.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-submodule-config.o -c -MF t/helper/.depend/test-submodule-config.o.d -MQ t/helper/test-submodule-config.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-submodule-config.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-subprocess.o -c -MF t/helper/.depend/test-subprocess.o.d -MQ t/helper/test-subprocess.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-subprocess.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-urlmatch-normalization.o -c -MF t/helper/.depend/test-urlmatch-normalization.o.d -MQ t/helper/test-urlmatch-normalization.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-urlmatch-normalization.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-xml-encode.o -c -MF t/helper/.depend/test-xml-encode.o.d -MQ t/helper/test-xml-encode.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-xml-encode.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-trace2.o -c -MF t/helper/.depend/test-trace2.o.d -MQ t/helper/test-trace2.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-trace2.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
sed -e '1s|#!.*/sh|#!/bin/sh|' \
-e 's|@@BUILD_DIR@@|/<<PKGBUILDDIR>>|' \
-e 's|@@PROG@@|git|' < wrap-for-bin.sh > bin-wrappers/git && \
chmod +x bin-wrappers/git
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
sed -e '1s|#!.*/sh|#!/bin/sh|' \
-e 's|@@BUILD_DIR@@|/<<PKGBUILDDIR>>|' \
-e 's|@@PROG@@|git-upload-pack|' < wrap-for-bin.sh > bin-wrappers/git-upload-pack && \
chmod +x bin-wrappers/git-upload-pack
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
sed -e '1s|#!.*/sh|#!/bin/sh|' \
-e 's|@@BUILD_DIR@@|/<<PKGBUILDDIR>>|' \
-e 's|@@PROG@@|git-receive-pack|' < wrap-for-bin.sh > bin-wrappers/git-receive-pack && \
chmod +x bin-wrappers/git-receive-pack
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
sed -e '1s|#!.*/sh|#!/bin/sh|' \
-e 's|@@BUILD_DIR@@|/<<PKGBUILDDIR>>|' \
-e 's|@@PROG@@|git-upload-archive|' < wrap-for-bin.sh > bin-wrappers/git-upload-archive && \
chmod +x bin-wrappers/git-upload-archive
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
sed -e '1s|#!.*/sh|#!/bin/sh|' \
-e 's|@@BUILD_DIR@@|/<<PKGBUILDDIR>>|' \
-e 's|@@PROG@@|git-shell|' < wrap-for-bin.sh > bin-wrappers/git-shell && \
chmod +x bin-wrappers/git-shell
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
sed -e '1s|#!.*/sh|#!/bin/sh|' \
-e 's|@@BUILD_DIR@@|/<<PKGBUILDDIR>>|' \
-e 's|@@PROG@@|git-cvsserver|' < wrap-for-bin.sh > bin-wrappers/git-cvsserver && \
chmod +x bin-wrappers/git-cvsserver
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
sed -e '1s|#!.*/sh|#!/bin/sh|' \
-e 's|@@BUILD_DIR@@|/<<PKGBUILDDIR>>|' \
-e 's|@@PROG@@|t/helper/test-fake-ssh|' < wrap-for-bin.sh > bin-wrappers/test-fake-ssh && \
chmod +x bin-wrappers/test-fake-ssh
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
sed -e '1s|#!.*/sh|#!/bin/sh|' \
-e 's|@@BUILD_DIR@@|/<<PKGBUILDDIR>>|' \
-e 's|@@PROG@@|t/helper/test-line-buffer|' < wrap-for-bin.sh > bin-wrappers/test-line-buffer && \
chmod +x bin-wrappers/test-line-buffer
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-windows-named-pipe.o -c -MF t/helper/.depend/test-windows-named-pipe.o.d -MQ t/helper/test-windows-named-pipe.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-windows-named-pipe.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
sed -e '1s|#!.*/sh|#!/bin/sh|' \
-e 's|@@BUILD_DIR@@|/<<PKGBUILDDIR>>|' \
-e 's|@@PROG@@|t/helper/test-svn-fe|' < wrap-for-bin.sh > bin-wrappers/test-svn-fe && \
chmod +x bin-wrappers/test-svn-fe
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
sed -e '1s|#!.*/sh|#!/bin/sh|' \
-e 's|@@BUILD_DIR@@|/<<PKGBUILDDIR>>|' \
-e 's|@@PROG@@|t/helper/test-tool|' < wrap-for-bin.sh > bin-wrappers/test-tool && \
chmod +x bin-wrappers/test-tool
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-write-cache.o -c -MF t/helper/.depend/test-write-cache.o.d -MQ t/helper/test-write-cache.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-write-cache.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -o t/helper/test-wildmatch.o -c -MF t/helper/.depend/test-wildmatch.o.d -MQ t/helper/test-wildmatch.o -MMD -MP -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' t/helper/test-wildmatch.c
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o t/helper/test-line-buffer -Wl,-z,relro t/helper/test-line-buffer.o common-main.o libgit.a xdiff/lib.a vcs-svn/lib.a libgit.a xdiff/lib.a -lpcre2-8 -lz -lpthread -lrt
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o t/helper/test-fake-ssh -Wl,-z,relro t/helper/test-fake-ssh.o common-main.o libgit.a xdiff/lib.a libgit.a xdiff/lib.a -lpcre2-8 -lz -lpthread -lrt
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o t/helper/test-svn-fe -Wl,-z,relro t/helper/test-svn-fe.o common-main.o libgit.a xdiff/lib.a vcs-svn/lib.a libgit.a xdiff/lib.a -lpcre2-8 -lz -lpthread -lrt
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
gcc -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"armv8l\"" -DUSE_LIBPCRE2 -DHAVE_ALLOCA_H -DUSE_CURL_FOR_IMAP_SEND -DNO_OPENSSL -DSHA1_DC -DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 -DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" -DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM '-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DDEFAULT_EDITOR='"editor"' -DDEFAULT_PAGER='"pager"' -DSHELL_PATH='"/bin/sh"' -DPAGER_ENV='"LESS=FRX LV=-c"' -o t/helper/test-tool -Wl,-z,relro t/helper/test-tool.o common-main.o t/helper/test-chmtime.o t/helper/test-config.o t/helper/test-ctype.o t/helper/test-date.o t/helper/test-delta.o t/helper/test-dir-iterator.o t/helper/test-drop-caches.o t/helper/test-dump-cache-tree.o t/helper/test-dump-fsmonitor.o t/helper/test-dump-split-index.o t/helper/test-dump-untracked-cache.o t/helper/test-example-decorate.o t/helper/test-genrandom.o t/helper/test-genzeros.o t/helper/test-hash.o t/helper/test-hashmap.o t/helper/test-hash-speed.o t/helper/test-index-version.o t/helper/test-json-writer.o t/helper/test-lazy-init-name-hash.o t/helper/test-match-trees.o t/helper/test-mergesort.o t/helper/test-mktemp.o t/helper/test-oidmap.o t/helper/test-online-cpus.o t/helper/test-parse-options.o t/helper/test-path-utils.o t/helper/test-pkt-line.o t/helper/test-prio-queue.o t/helper/test-reach.o t/helper/test-read-cache.o t/helper/test-read-midx.o t/helper/test-ref-store.o t/helper/test-regex.o t/helper/test-repository.o t/helper/test-revision-walking.o t/helper/test-run-command.o t/helper/test-scrap-cache-tree.o t/helper/test-serve-v2.o t/helper/test-sha1.o t/helper/test-sha1-array.o t/helper/test-sha256.o t/helper/test-sigchain.o t/helper/test-strcmp-offset.o t/helper/test-string-list.o t/helper/test-submodule-config.o t/helper/test-submodule-nested-repo-config.o t/helper/test-subprocess.o t/helper/test-trace2.o t/helper/test-urlmatch-normalization.o t/helper/test-xml-encode.o t/helper/test-wildmatch.o t/helper/test-windows-named-pipe.o t/helper/test-write-cache.o libgit.a xdiff/lib.a libgit.a xdiff/lib.a -lpcre2-8 -lz -lpthread -lrt
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: Entering directory '/<<PKGBUILDDIR>>'
touch build-stamp
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
/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 SANE_TOOL_PATH= INSTALL=install TAR=tar NO_CROSS_DIRECTORY_HARDLINKS=1 NO_INSTALL_HARDLINKS=1 NO_PERL_CPAN_FALLBACKS=1 DEFAULT_PAGER=pager DEFAULT_EDITOR=editor CC='gcc' CFLAGS='-Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS='-Wl,-z,relro' V=1 USE_LIBPCRE2=1
/usr/bin/make -C ../../ GIT-VERSION-FILE
make[3]: 'GIT-VERSION-FILE' is up to date.
make[2]: Entering directory '/<<PKGBUILDDIR>>/contrib/subtree'
sed -e '1s|#!.*/sh|#!/bin/sh|' git-subtree.sh >git-subtree
make[2]: Leaving directory '/<<PKGBUILDDIR>>/contrib/subtree'
make[2]: Entering directory '/<<PKGBUILDDIR>>/contrib/subtree'
chmod +x git-subtree
make[2]: Leaving directory '/<<PKGBUILDDIR>>/contrib/subtree'
make[1]: Entering directory '/<<PKGBUILDDIR>>'
ln -s contrib/subtree/git-subtree
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
debian/rules override_dh_auto_test-arch
test -z 'test' || \
GIT_SKIP_TESTS="t9128 t9167" \
GIT_TEST_OPTS='--verbose' /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 SANE_TOOL_PATH= INSTALL=install TAR=tar NO_CROSS_DIRECTORY_HARDLINKS=1 NO_INSTALL_HARDLINKS=1 NO_PERL_CPAN_FALLBACKS=1 DEFAULT_PAGER=pager DEFAULT_EDITOR=editor CC='gcc' CFLAGS='-Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS='-Wl,-z,relro' V=1 USE_LIBPCRE2=1
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-add--interactive git-add--interactive+ && \
sed -e '1{' \
-e ' s|#!.*perl|#!/usr/bin/perl|' \
-e ' r GIT-PERL-HEADER' \
-e ' G' \
-e '}' \
-e 's/@@GIT_VERSION@@/2.23.0.rc1/g' \
git-add--interactive.perl >git-add--interactive+ && \
chmod +x git-add--interactive+ && \
mv git-add--interactive+ git-add--interactive
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-archimport git-archimport+ && \
sed -e '1{' \
-e ' s|#!.*perl|#!/usr/bin/perl|' \
-e ' r GIT-PERL-HEADER' \
-e ' G' \
-e '}' \
-e 's/@@GIT_VERSION@@/2.23.0.rc1/g' \
git-archimport.perl >git-archimport+ && \
chmod +x git-archimport+ && \
mv git-archimport+ git-archimport
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-cvsexportcommit git-cvsexportcommit+ && \
sed -e '1{' \
-e ' s|#!.*perl|#!/usr/bin/perl|' \
-e ' r GIT-PERL-HEADER' \
-e ' G' \
-e '}' \
-e 's/@@GIT_VERSION@@/2.23.0.rc1/g' \
git-cvsexportcommit.perl >git-cvsexportcommit+ && \
chmod +x git-cvsexportcommit+ && \
mv git-cvsexportcommit+ git-cvsexportcommit
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-cvsimport git-cvsimport+ && \
sed -e '1{' \
-e ' s|#!.*perl|#!/usr/bin/perl|' \
-e ' r GIT-PERL-HEADER' \
-e ' G' \
-e '}' \
-e 's/@@GIT_VERSION@@/2.23.0.rc1/g' \
git-cvsimport.perl >git-cvsimport+ && \
chmod +x git-cvsimport+ && \
mv git-cvsimport+ git-cvsimport
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-cvsserver git-cvsserver+ && \
sed -e '1{' \
-e ' s|#!.*perl|#!/usr/bin/perl|' \
-e ' r GIT-PERL-HEADER' \
-e ' G' \
-e '}' \
-e 's/@@GIT_VERSION@@/2.23.0.rc1/g' \
git-cvsserver.perl >git-cvsserver+ && \
chmod +x git-cvsserver+ && \
mv git-cvsserver+ git-cvsserver
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-send-email git-send-email+ && \
sed -e '1{' \
-e ' s|#!.*perl|#!/usr/bin/perl|' \
-e ' r GIT-PERL-HEADER' \
-e ' G' \
-e '}' \
-e 's/@@GIT_VERSION@@/2.23.0.rc1/g' \
git-send-email.perl >git-send-email+ && \
chmod +x git-send-email+ && \
mv git-send-email+ git-send-email
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-svn git-svn+ && \
sed -e '1{' \
-e ' s|#!.*perl|#!/usr/bin/perl|' \
-e ' r GIT-PERL-HEADER' \
-e ' G' \
-e '}' \
-e 's/@@GIT_VERSION@@/2.23.0.rc1/g' \
git-svn.perl >git-svn+ && \
chmod +x git-svn+ && \
mv git-svn+ git-svn
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: Entering directory '/<<PKGBUILDDIR>>'
rm -f git-p4 git-p4+ && \
sed -e '1s|#!.*python|#!/usr/bin/python|' \
git-p4.py >git-p4+ && \
chmod +x git-p4+ && \
mv git-p4+ git-p4
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
/usr/bin/make -C git-gui gitexecdir='/usr/lib/git-core' all
/usr/bin/make -C gitk-git all
/usr/bin/make -C templates SHELL_PATH='/bin/sh' PERL_PATH='/usr/bin/perl'
make[3]: Entering directory '/<<PKGBUILDDIR>>/templates'
: no custom templates yet
make[3]: Leaving directory '/<<PKGBUILDDIR>>/templates'
/usr/bin/make -C t/ all
make[3]: Entering directory '/<<PKGBUILDDIR>>/t'
rm -f -r 'test-results'
make[3]: Leaving directory '/<<PKGBUILDDIR>>/t'
/usr/bin/make aggregate-results-and-cleanup
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0002-gitfile.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0002-gitfile/.git/
expecting success:
REAL="$(pwd)/.real" &&
mv .git "$REAL"
ok 1 - initial setup
expecting success:
echo "gitdir $REAL" >.git &&
test_must_fail git rev-parse 2>.err &&
test_i18ngrep "invalid gitfile format" .err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: invalid gitfile format: /<<PKGBUILDDIR>>/t/trash directory.t0002-gitfile/.git
ok 2 - bad setup: invalid .git file format
expecting success:
echo "gitdir: $REAL.not" >.git &&
test_must_fail git rev-parse 2>.err &&
test_i18ngrep "not a git repository" .err
fatal: not a git repository: /<<PKGBUILDDIR>>/t/trash directory.t0002-gitfile/.real.not
ok 3 - bad setup: invalid .git file path
expecting success:
echo "gitdir: $REAL" >.git &&
test "$REAL" = "$(git rev-parse --git-dir)"
ok 4 - final setup + check rev-parse --git-dir
expecting success:
echo "foo" >bar &&
SHA=$(cat bar | git hash-object -w --stdin) &&
test_path_is_file "$REAL/objects/$(objpath $SHA)"
ok 5 - check hash-object
expecting success:
git cat-file blob $SHA >actual &&
test_cmp bar actual
ok 6 - check cat-file
expecting success:
test_path_is_missing "$REAL/index" &&
rm -f "$REAL/objects/$(objpath $SHA)" &&
git update-index --add bar &&
test_path_is_file "$REAL/index" &&
test_path_is_file "$REAL/objects/$(objpath $SHA)"
ok 7 - check update-index
expecting success:
SHA=$(git write-tree) &&
test_path_is_file "$REAL/objects/$(objpath $SHA)"
ok 8 - check write-tree
expecting success:
SHA=$(echo "commit bar" | git commit-tree $SHA) &&
test_path_is_file "$REAL/objects/$(objpath $SHA)"
ok 9 - check commit-tree
expecting success:
echo $SHA >"$REAL/HEAD" &&
test "$SHA" = "$(git rev-list HEAD)"
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/
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
) &&
head=$(git -C enter_repo rev-parse HEAD) &&
git ls-remote enter_repo >actual &&
cat >expected <<-EOF &&
$head HEAD
$head refs/heads/master
$head refs/tags/foo
EOF
test_cmp expected actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0002-gitfile/enter_repo/.git/
[master (root-commit) 946e985] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
ok 12 - enter_repo non-strict mode
expecting success:
(
cd enter_repo &&
git worktree add ../foo refs/tags/foo
) &&
head=$(git -C enter_repo rev-parse HEAD) &&
git ls-remote foo >actual &&
cat >expected <<-EOF &&
$head HEAD
$head refs/heads/master
$head refs/tags/foo
EOF
test_cmp expected actual
Preparing worktree (detached HEAD 946e985)
HEAD is now at 946e985 foo
ok 13 - enter_repo linked checkout
expecting success:
head=$(git -C enter_repo rev-parse HEAD) &&
git ls-remote --upload-pack="git upload-pack --strict" foo/.git >actual &&
cat >expected <<-EOF &&
$head HEAD
$head refs/heads/master
$head refs/tags/foo
EOF
test_cmp expected actual
ok 14 - enter_repo strict mode
# passed all 14 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0004-unwritable.sh ***
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
[master (root-commit) 1bd44cb] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
ok 1 - setup
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 -r SANETESTD.1/x &&
chmod -rx SANETESTD.2 ||
BUG "cannot prepare SANETESTD"
! test -r SANETESTD.1/x &&
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
BUG "cannot clean SANETESTD"
return $status
)
rm: cannot remove 'SANETESTD.1/x': Permission denied
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
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
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
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 - add should notice unwritable repository
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0005-signals.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0005-signals/.git/
expecting success:
{ test-tool sigchain >actual; ret=$?; } &&
{
# Signal death by raise() on Windows acts like exit(3),
# regardless of the signal number. So we must allow that
# as well as the normal signal check.
test_match_signal 15 "$ret" ||
test "$ret" = 3
} &&
test_cmp expect actual
Terminated
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-tool sigchain" &&
test_expect_code 143 git sigterm
three
two
one
error: exec test-tool sigchain died of signal 15
ok 2 - signals are propagated using shell convention
expecting success:
test-tool genrandom foo 16384 >file &&
git add file
ok 3 - create blob
expecting success:
OUT=$( ((large_git; echo $? 1>&3) | :) 3>&1 ) &&
test_match_signal 13 "$OUT"
ok 4 - a constipated git dies with SIGPIPE
expecting success:
OUT=$( ((trap "" PIPE; large_git; echo $? 1>&3) | :) 3>&1 ) &&
test_match_signal 13 "$OUT"
ok 5 - a constipated git dies with SIGPIPE even if parent ignores it
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0003-attributes.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0003-attributes/.git/
expecting success:
echo "\"a test=a" >.gitattributes &&
test_must_fail attr_check a a
--- expect 2019-08-14 07:23:15.020360224 +0000
+++ actual 2019-08-14 07:23:15.020360224 +0000
@@ -1 +1 @@
-a: test: a
+a: test: unspecified
ok 1 - open-quoted pathname
expecting success:
mkdir -p a/b/d a/c b &&
(
echo "[attr]notest !test" &&
echo "\" d \" test=d" &&
echo " e test=e" &&
echo " e\" test=e" &&
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
ok 2 - 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
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
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 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
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
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 3 - command line checks
expecting success:
attr_check " d " d &&
attr_check e e &&
attr_check_quote e\" e\\\" e &&
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 4 - 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"
--- expect 2019-08-14 07:23:15.584367672 +0000
+++ actual 2019-08-14 07:23:15.580367619 +0000
@@ -1 +1 @@
-F: test: f
+F: test: unspecified
--- expect 2019-08-14 07:23:15.604367936 +0000
+++ actual 2019-08-14 07:23:15.596367831 +0000
@@ -1 +1 @@
-a/F: test: f
+a/F: test: unspecified
--- expect 2019-08-14 07:23:15.616368095 +0000
+++ actual 2019-08-14 07:23:15.616368095 +0000
@@ -1 +1 @@
-a/c/F: test: f
+a/c/F: test: unspecified
--- expect 2019-08-14 07:23:15.632368306 +0000
+++ actual 2019-08-14 07:23:15.628368253 +0000
@@ -1 +1 @@
-a/G: test: a/g
+a/G: test: unspecified
--- expect 2019-08-14 07:23:15.644368464 +0000
+++ actual 2019-08-14 07:23:15.636368359 +0000
@@ -1 +1 @@
-a/B/g: test: a/b/g
+a/B/g: test: a/g
--- expect 2019-08-14 07:23:15.656368623 +0000
+++ actual 2019-08-14 07:23:15.656368623 +0000
@@ -1 +1 @@
-a/b/G: test: a/b/g
+a/b/G: test: unspecified
--- expect 2019-08-14 07:23:15.668368781 +0000
+++ actual 2019-08-14 07:23:15.668368781 +0000
@@ -1 +1 @@
-a/b/H: test: a/b/h
+a/b/H: test: unspecified
--- expect 2019-08-14 07:23:15.680368940 +0000
+++ actual 2019-08-14 07:23:15.676368887 +0000
@@ -1 +1 @@
-a/b/D/g: test: a/b/d/*
+a/b/D/g: test: a/g
--- expect 2019-08-14 07:23:15.684368993 +0000
+++ actual 2019-08-14 07:23:15.684368993 +0000
@@ -1 +1 @@
-oNoFf: test: unset
+oNoFf: test: unspecified
--- expect 2019-08-14 07:23:15.708369310 +0000
+++ actual 2019-08-14 07:23:15.704369257 +0000
@@ -1 +1 @@
-oFfOn: test: set
+oFfOn: test: unspecified
--- expect 2019-08-14 07:23:15.740369732 +0000
+++ actual 2019-08-14 07:23:15.728369574 +0000
@@ -1 +1 @@
-a/b/D/NO: test: a/b/d/*
+a/b/D/NO: test: unspecified
--- expect 2019-08-14 07:23:15.772370155 +0000
+++ actual 2019-08-14 07:23:15.772370155 +0000
@@ -1 +1 @@
-a/E/f: test: A/e/F
+a/E/f: test: f
ok 5 - 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"
ok 6 - 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
)
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 7 # 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 8 - 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 9 - 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
ok 10 - 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
ok 11 - core.attributesfile
expecting success:
grep -v notest <expect-all >expect &&
sed -e "s/:.*//" <expect | git check-attr --stdin test >actual &&
test_cmp expect actual
ok 12 - attribute test: read paths from stdin
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
ok 13 - attribute test: --all option
expecting success:
git check-attr --cached --stdin --all <stdin-all | sort >actual &&
test_must_be_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 14 - attribute test: --cached option
expecting success:
attr_check a/i a/i &&
attr_check subdir/a/i unspecified
ok 15 - 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
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
warning: Negative patterns are ignored in git attributes
ok 16 - negative patterns
expecting success:
echo "\!f test=foo" >.gitattributes &&
attr_check "!f" foo
ok 17 - patterns starting with exclamation
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 18 - "**" 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 19 - "**" 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"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0003-attributes/real/.git/
ok 20 - using --git-dir and --work-tree
expecting success:
git clone --bare . bare.git
Cloning into bare repository 'bare.git'...
warning: You appear to have cloned an empty repository.
done.
ok 21 - 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 22 - 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 23 - 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 24 - bare repository: test info/attributes
expecting success:
echo "file binary" >.gitattributes &&
cat >expect <<-\EOF &&
file: binary: set
file: diff: unset
file: merge: unset
file: text: unset
EOF
git check-attr -a file >actual &&
test_cmp expect actual
ok 25 - binary macro expanded by -a
expecting success:
echo "file binary" >.gitattributes &&
echo file: binary: set >expect &&
git check-attr binary file >actual &&
test_cmp expect actual
ok 26 - query binary macro directly
# passed all 26 test(s)
1..26
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0001-init.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/.git/
expecting success:
git init plain &&
check_config plain/.git false unset
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/plain/.git/
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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/bare-ancestor.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/bare-ancestor.git/plain-nested/.git/
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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/plain-aliased/.git/
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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/plain-ancestor-aliased/.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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/bare-ancestor-aliased.git/
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:
write_script script <<-\EOF &&
env |
sed -n \
-e "/^GIT_PREFIX=/d" \
-e "/^GIT_TEXTDOMAINDIR=/d" \
-e "/^GIT_TRACE2_PARENT/d" \
-e "/^GIT_/s/=.*//p" |
sort
EOF
./script >expected &&
git config alias.script \!./script &&
( mkdir sub && cd sub && git script >../actual ) &&
test_cmp expected actual
ok 6 - No extra GIT_* on alias scripts
expecting success:
mkdir plain-wt &&
test_must_fail env GIT_WORK_TREE="$(pwd)/plain-wt" git init plain-wt
fatal: GIT_WORK_TREE (or --work-tree=<directory>) not allowed without specifying GIT_DIR (or --git-dir=<directory>)
ok 7 - 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 8 - 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
fatal: GIT_WORK_TREE (or --work-tree=<directory>) not allowed without specifying GIT_DIR (or --git-dir=<directory>)
ok 9 - 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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/git-dir-bare.git/
ok 10 - GIT_DIR bare
expecting success:
git init --bare init-bare.git &&
check_config init-bare.git true unset
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/init-bare.git/
ok 11 - init --bare
expecting success:
(
mkdir non-bare &&
cd non-bare &&
GIT_DIR=.git git init
) &&
check_config non-bare/.git false unset
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/non-bare/.git/
ok 12 - 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)"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/git-dir-wt-1.git/
ok 13 - 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
fatal: GIT_WORK_TREE (or --work-tree=<directory>) not allowed without specifying GIT_DIR (or --git-dir=<directory>)
ok 14 - 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 &&
test_must_be_empty again/err1 &&
test_must_be_empty again/err2
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
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 15 - 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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/template-custom/.git/
ok 16 - init with --template
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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/template-plain/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/template-blank/.git/
ok 17 - 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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/templatedir-set/.git/
ok 18 - 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)
Initialized empty shared Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/init-bare-shared-override/
ok 19 - 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)
Initialized empty shared Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/shared-honor-global/.git/
ok 20 - init honors global core.sharedRepository
expecting success:
git init --template=$(printf "x%09999dx" 1) test
warning: templates not found in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/test/.git/
ok 21 - init allows insanely long --template
expecting success:
rm -fr newdir &&
git init newdir &&
test_path_is_dir newdir/.git/refs
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/newdir/.git/
ok 22 - init creates a new directory
expecting success:
rm -fr newdir &&
git init --bare newdir &&
test_path_is_dir newdir/refs
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/newdir/
ok 23 - init creates a new bare directory
expecting success:
rm -fr newdir &&
mkdir newdir &&
git init newdir &&
test_path_is_dir newdir/.git/refs
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/newdir/.git/
ok 24 - init recreates a directory
expecting success:
rm -fr newdir &&
mkdir newdir &&
git init --bare newdir &&
test_path_is_dir newdir/refs
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/newdir/
ok 25 - 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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/newdir/a/b/c/.git/
ok 26 - init creates a new deep directory
expecting success:
rm -fr newdir &&
(
# Leading directories should honor umask while
# the repository itself should follow "shared"
mkdir newdir &&
# Remove a default ACL if possible.
(setfacl -k newdir 2>/dev/null || true) &&
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
)
Initialized empty shared Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/newdir/a/b/c/
ok 27 - 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
fatal: cannot mkdir newdir: File exists
ok 28 - 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
fatal: cannot mkdir newdir/a/b: File exists
ok 29 - 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 -r SANETESTD.1/x &&
chmod -rx SANETESTD.2 ||
BUG "cannot prepare SANETESTD"
! test -r SANETESTD.1/x &&
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
BUG "cannot clean SANETESTD"
return $status
)
rm: cannot remove 'SANETESTD.1/x': Permission denied
prerequisite SANITY ok
expecting success:
test_when_finished "chmod +w newdir" &&
rm -fr newdir &&
mkdir newdir &&
chmod -w newdir &&
test_must_fail git init newdir/a/b
fatal: cannot mkdir newdir/a/b: Permission denied
ok 30 - init notices EPERM
expecting success:
rm -rf newdir &&
git --bare init newdir &&
test_path_is_dir newdir/refs
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/newdir/
ok 31 - init creates a new bare directory with global --bare
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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/newdir/
ok 32 - init prefers command line to GIT_DIR
expecting success:
rm -rf newdir &&
git init --separate-git-dir realgitdir newdir &&
newdir_git="$(cat newdir/.git)" &&
test_cmp_fspath "$(pwd)/realgitdir" "${newdir_git#gitdir: }" &&
test_path_is_dir realgitdir/refs
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/realgitdir/
ok 33 - init with separate gitdir
expecting success:
check_long_base_path
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/123456789abcdef/123456789abcdef/123456789abcdef/123456789abcdef/123456789abcdef/123456789abcdef/123456789abcdef/123456789abcdef/newdir/.git/
ok 34 - init in long base path
checking prerequisite: GETCWD_IGNORES_PERMS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
base=GETCWD_TEST_BASE_DIR &&
mkdir -p $base/dir &&
chmod 100 $base ||
BUG "cannot prepare $base"
(cd $base/dir && /bin/pwd -P)
status=$?
chmod 700 $base &&
rm -rf $base ||
BUG "cannot clean $base"
return $status
)
/<<PKGBUILDDIR>>/t/trash directory.t0001-init/prereq-test-dir/GETCWD_TEST_BASE_DIR/dir
prerequisite GETCWD_IGNORES_PERMS ok
expecting success:
check_long_base_path 0111
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/123456789abcdef/123456789abcdef/123456789abcdef/123456789abcdef/123456789abcdef/123456789abcdef/123456789abcdef/123456789abcdef/newdir/.git/
ok 35 - init in long restricted base path
expecting success:
( cd newdir && git init )
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/realgitdir/
ok 36 - re-init on .git file
expecting success:
git -C newdir init --separate-git-dir ../surrealgitdir &&
newdir_git="$(cat newdir/.git)" &&
test_cmp_fspath "$(pwd)/surrealgitdir" "${newdir_git#gitdir: }" &&
test_path_is_dir surrealgitdir/refs &&
test_path_is_missing realgitdir/refs
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/surrealgitdir/
ok 37 - re-init to update git link
expecting success:
rm -rf newdir realgitdir surrealgitdir &&
git init newdir &&
git -C newdir init --separate-git-dir ../realgitdir &&
newdir_git="$(cat newdir/.git)" &&
test_cmp_fspath "$(pwd)/realgitdir" "${newdir_git#gitdir: }" &&
test_path_is_dir realgitdir/refs
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/newdir/.git/
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/realgitdir/
ok 38 - 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
)
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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/newdir/.git/
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/realgitdir/
ok 39 - re-init to move gitdir symlink
skipping test: .git hidden
rm -rf newdir &&
(
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir newdir &&
cd newdir &&
git init &&
is_hidden .git
) &&
check_config newdir/.git false unset
ok 40 # skip .git hidden (missing MINGW)
skipping test: bare git dir not hidden
rm -rf newdir &&
(
sane_unset GIT_DIR GIT_WORK_TREE GIT_CONFIG &&
mkdir newdir &&
cd newdir &&
git --bare init
) &&
! is_hidden newdir
ok 41 # skip bare git dir not hidden (missing MINGW)
expecting success:
rm -rf newdir &&
test_config core.logallrefupdates true &&
git init newdir &&
echo true >expect &&
git -C newdir config --bool core.logallrefupdates >actual &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/newdir/.git/
ok 42 - remote init from does not use config from cwd
expecting success:
git init main-worktree &&
(
cd main-worktree &&
test_commit first &&
git worktree add ../linked-worktree &&
mv .git/info/exclude expected-exclude &&
cp .git/config expected-config &&
find .git/worktrees -print | sort >expected &&
git -C ../linked-worktree init &&
test_cmp expected-exclude .git/info/exclude &&
test_cmp expected-config .git/config &&
find .git/worktrees -print | sort >actual &&
test_cmp expected actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/main-worktree/.git/
[master (root-commit) 50e526b] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 first.t
Preparing worktree (new branch 'linked-worktree')
HEAD is now at 50e526b first
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0001-init/main-worktree/.git/worktrees/linked-worktree/
ok 43 - re-init from a linked worktree
skipping test: core.hidedotfiles = false
git config --global core.hidedotfiles false &&
rm -rf newdir &&
mkdir newdir &&
(
sane_unset GIT_DIR GIT_WORK_TREE GIT_CONFIG &&
git -C newdir init
) &&
! is_hidden newdir/.git
ok 44 # skip core.hidedotfiles = false (missing MINGW)
skipping test: redirect std handles
GIT_REDIRECT_STDOUT=output.txt git rev-parse --git-dir &&
test .git = "$(cat output.txt)" &&
test -z "$(GIT_REDIRECT_STDOUT=off git rev-parse --git-dir)" &&
test_must_fail env \
GIT_REDIRECT_STDOUT=output.txt \
GIT_REDIRECT_STDERR="2>&1" \
git rev-parse --git-dir --verify refs/invalid &&
grep "^\\.git\$" output.txt &&
grep "Needed a single revision" output.txt
ok 45 # skip redirect std handles (missing MINGW)
# passed all 45 test(s)
1..45
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0007-git-var.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0007-git-var/.git/
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 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 2 - get GIT_COMMITTER_IDENT
checking prerequisite: FAIL_PREREQS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
git env--helper --type=bool --default=0 --exit-code GIT_TEST_FAIL_PREREQS
)
prerequisite FAIL_PREREQS not satisfied
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
)
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'buildd@mb-lxc-01.(none)')
prerequisite AUTOIDENT not satisfied
expecting success:
(
sane_unset GIT_COMMITTER_NAME &&
sane_unset GIT_COMMITTER_EMAIL &&
test_must_fail git var GIT_COMMITTER_IDENT
)
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'buildd@mb-lxc-01.(none)')
ok 3 - requested identites are strict
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
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 5 - git var -l lists config
expecting success:
test_must_fail git var -l GIT_COMMITTER_IDENT
usage: git var (-l | <variable>)
ok 6 - listing and asking for variables are exclusive
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0009-prio-queue.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0009-prio-queue/.git/
expecting success:
test-tool 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-tool prio-queue 6 2 4 get 5 3 get get 1 dump >actual &&
test_cmp expect actual
ok 2 - mixed put and get
expecting success:
test-tool prio-queue 1 2 get get get 1 2 get get get >actual &&
test_cmp expect actual
ok 3 - notice empty queue
expecting success:
test-tool prio-queue stack 8 1 5 4 6 2 3 dump >actual &&
test_cmp expect actual
ok 4 - stack order
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0006-date.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0006-date/.git/
expecting success:
test-tool date relative 1251659995 >actual &&
test_i18ncmp expect actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 1 - relative date (5 seconds ago)
expecting success:
test-tool date relative 1251659700 >actual &&
test_i18ncmp expect actual
ok 2 - relative date (5 minutes ago)
expecting success:
test-tool date relative 1251642000 >actual &&
test_i18ncmp expect actual
ok 3 - relative date (5 hours ago)
expecting success:
test-tool date relative 1251228000 >actual &&
test_i18ncmp expect actual
ok 4 - relative date (5 days ago)
expecting success:
test-tool date relative 1249932000 >actual &&
test_i18ncmp expect actual
ok 5 - relative date (3 weeks ago)
expecting success:
test-tool date relative 1238660000 >actual &&
test_i18ncmp expect actual
ok 6 - relative date (5 months ago)
expecting success:
test-tool date relative 1214160000 >actual &&
test_i18ncmp expect actual
ok 7 - relative date (1 year, 2 months ago)
expecting success:
test-tool date relative 1196472000 >actual &&
test_i18ncmp expect actual
ok 8 - relative date (1 year, 9 months ago)
expecting success:
test-tool date relative 621660000 >actual &&
test_i18ncmp expect actual
ok 9 - relative date (20 years ago)
expecting success:
test-tool date relative 1220210400 >actual &&
test_i18ncmp expect actual
ok 10 - relative date (12 months ago)
expecting success:
test-tool date relative 1188674400 >actual &&
test_i18ncmp expect actual
ok 11 - relative date (2 years ago)
expecting success:
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 12 - show date (iso8601:1466000000 +0200)
expecting success:
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 13 - show date (iso8601-strict:1466000000 +0200)
expecting success:
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 14 - show date (rfc2822:1466000000 +0200)
expecting success:
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 15 - show date (short:1466000000 +0200)
expecting success:
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 16 - show date (default:1466000000 +0200)
expecting success:
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 17 - show date (raw:1466000000 +0200)
expecting success:
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 18 - show date (unix:1466000000 +0200)
expecting success:
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 19 - show date (iso-local:1466000000 +0200)
expecting success:
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 20 - show date (raw-local:1466000000 +0200)
expecting success:
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 21 - show date (unix-local:1466000000 +0200)
expecting success:
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 22 - show date (format:%z:1466000000 +0200)
expecting success:
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 23 - show date (format-local:%z:1466000000 +0200)
expecting success:
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 24 - show date (format:%Z:1466000000 +0200)
expecting success:
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 25 - show date (format-local:%Z:1466000000 +0200)
expecting success:
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 26 - show date (format:%%z:1466000000 +0200)
expecting success:
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 27 - show date (format-local:%%z:1466000000 +0200)
expecting success:
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 28 - show date (format:%Y-%m-%d %H:%M:%S:1466000000 +0200)
expecting success:
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 29 - show date (format-local:%Y-%m-%d %H:%M:%S:1466000000 +0200)
checking prerequisite: TIME_IS_64BIT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&test-tool date is64bit
)
prerequisite TIME_IS_64BIT ok
checking prerequisite: TIME_T_IS_64BIT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&test-tool date time_t-is64bit
)
prerequisite TIME_T_IS_64BIT not satisfied
skipping test: show date (iso:5758122296 -0400)
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 30 # skip show date (iso:5758122296 -0400) (missing TIME_T_IS_64BIT of TIME_IS_64BIT,TIME_T_IS_64BIT)
skipping test: show date (iso-local:5758122296 -0400)
echo "$time -> $expect" >expect &&
TZ=${zone:-$TZ} test-tool date show:"$format" "$time" >actual &&
test_cmp expect actual
ok 31 # skip show date (iso-local:5758122296 -0400) (missing TIME_T_IS_64BIT of TIME_IS_64BIT,TIME_T_IS_64BIT)
expecting success:
TZ=UTC test-tool date parse '2008' >actual &&
test_cmp expect actual
ok 32 - parse date (2008)
expecting success:
TZ=UTC test-tool date parse '2008-02' >actual &&
test_cmp expect actual
ok 33 - parse date (2008-02)
expecting success:
TZ=UTC test-tool date parse '2008-02-14' >actual &&
test_cmp expect actual
ok 34 - parse date (2008-02-14)
expecting success:
TZ=UTC test-tool date parse '2008-02-14 20:30:45' >actual &&
test_cmp expect actual
ok 35 - parse date (2008-02-14 20:30:45)
expecting success:
TZ=UTC test-tool date parse '2008-02-14 20:30:45 -0500' >actual &&
test_cmp expect actual
ok 36 - parse date (2008-02-14 20:30:45 -0500)
expecting success:
TZ=UTC test-tool date parse '2008-02-14 20:30:45 -0015' >actual &&
test_cmp expect actual
ok 37 - parse date (2008-02-14 20:30:45 -0015)
expecting success:
TZ=UTC test-tool date parse '2008-02-14 20:30:45 -5' >actual &&
test_cmp expect actual
ok 38 - parse date (2008-02-14 20:30:45 -5)
expecting success:
TZ=UTC test-tool date parse '2008-02-14 20:30:45 -5:' >actual &&
test_cmp expect actual
ok 39 - parse date (2008-02-14 20:30:45 -5:)
expecting success:
TZ=UTC test-tool date parse '2008-02-14 20:30:45 -05' >actual &&
test_cmp expect actual
ok 40 - parse date (2008-02-14 20:30:45 -05)
expecting success:
TZ=UTC test-tool date parse '2008-02-14 20:30:45 -:30' >actual &&
test_cmp expect actual
ok 41 - parse date (2008-02-14 20:30:45 -:30)
expecting success:
TZ=UTC test-tool date parse '2008-02-14 20:30:45 -05:00' >actual &&
test_cmp expect actual
ok 42 - parse date (2008-02-14 20:30:45 -05:00)
expecting success:
TZ=EST5 test-tool date parse '2008-02-14 20:30:45' >actual &&
test_cmp expect actual
ok 43 - parse date (2008-02-14 20:30:45 TZ=EST5)
expecting success:
test-tool date approxidate 'now' >actual &&
test_cmp expect actual
ok 44 - parse approxidate (now)
expecting success:
test-tool date approxidate '5 seconds ago' >actual &&
test_cmp expect actual
ok 45 - parse approxidate (5 seconds ago)
expecting success:
test-tool date approxidate '5.seconds.ago' >actual &&
test_cmp expect actual
ok 46 - parse approxidate (5.seconds.ago)
expecting success:
test-tool date approxidate '10.minutes.ago' >actual &&
test_cmp expect actual
ok 47 - parse approxidate (10.minutes.ago)
expecting success:
test-tool date approxidate 'yesterday' >actual &&
test_cmp expect actual
ok 48 - parse approxidate (yesterday)
expecting success:
test-tool date approxidate '3.days.ago' >actual &&
test_cmp expect actual
ok 49 - parse approxidate (3.days.ago)
expecting success:
test-tool date approxidate '3.weeks.ago' >actual &&
test_cmp expect actual
ok 50 - parse approxidate (3.weeks.ago)
expecting success:
test-tool date approxidate '3.months.ago' >actual &&
test_cmp expect actual
ok 51 - parse approxidate (3.months.ago)
expecting success:
test-tool date approxidate '2.years.3.months.ago' >actual &&
test_cmp expect actual
ok 52 - parse approxidate (2.years.3.months.ago)
expecting success:
test-tool date approxidate '6am yesterday' >actual &&
test_cmp expect actual
ok 53 - parse approxidate (6am yesterday)
expecting success:
test-tool date approxidate '6pm yesterday' >actual &&
test_cmp expect actual
ok 54 - parse approxidate (6pm yesterday)
expecting success:
test-tool date approxidate '3:00' >actual &&
test_cmp expect actual
ok 55 - parse approxidate (3:00)
expecting success:
test-tool date approxidate '15:00' >actual &&
test_cmp expect actual
ok 56 - parse approxidate (15:00)
expecting success:
test-tool date approxidate 'noon today' >actual &&
test_cmp expect actual
ok 57 - parse approxidate (noon today)
expecting success:
test-tool date approxidate 'noon yesterday' >actual &&
test_cmp expect actual
ok 58 - parse approxidate (noon yesterday)
expecting success:
test-tool date approxidate 'January 5th noon pm' >actual &&
test_cmp expect actual
ok 59 - parse approxidate (January 5th noon pm)
expecting success:
test-tool date approxidate '10am noon' >actual &&
test_cmp expect actual
ok 60 - parse approxidate (10am noon)
expecting success:
test-tool date approxidate 'last tuesday' >actual &&
test_cmp expect actual
ok 61 - parse approxidate (last tuesday)
expecting success:
test-tool date approxidate 'July 5th' >actual &&
test_cmp expect actual
ok 62 - parse approxidate (July 5th)
expecting success:
test-tool date approxidate '06/05/2009' >actual &&
test_cmp expect actual
ok 63 - parse approxidate (06/05/2009)
expecting success:
test-tool date approxidate '06.05.2009' >actual &&
test_cmp expect actual
ok 64 - parse approxidate (06.05.2009)
expecting success:
test-tool date approxidate 'Jun 6, 5AM' >actual &&
test_cmp expect actual
ok 65 - parse approxidate (Jun 6, 5AM)
expecting success:
test-tool date approxidate '5AM Jun 6' >actual &&
test_cmp expect actual
ok 66 - parse approxidate (5AM Jun 6)
expecting success:
test-tool date approxidate '6AM, June 7, 2009' >actual &&
test_cmp expect actual
ok 67 - parse approxidate (6AM, June 7, 2009)
expecting success:
test-tool date approxidate '2008-12-01' >actual &&
test_cmp expect actual
ok 68 - parse approxidate (2008-12-01)
expecting success:
test-tool date approxidate '2009-12-01' >actual &&
test_cmp expect actual
ok 69 - parse approxidate (2009-12-01)
expecting success:
test-tool date human $t >actual &&
test_i18ncmp expect actual
ok 70 - human date 1251642000
expecting success:
test-tool date human $t >actual &&
test_i18ncmp expect actual
ok 71 - human date 1251228000
expecting success:
test-tool date human $t >actual &&
test_i18ncmp expect actual
ok 72 - human date 1249932000
expecting success:
test-tool date human $t >actual &&
test_i18ncmp expect actual
ok 73 - human date 1238660000
expecting success:
test-tool date human $t >actual &&
test_i18ncmp expect actual
ok 74 - human date 1220210400
expecting success:
test-tool date human $t >actual &&
test_i18ncmp expect actual
ok 75 - human date 1214160000
expecting success:
test-tool date human $t >actual &&
test_i18ncmp expect actual
ok 76 - human date 1196472000
expecting success:
test-tool date human $t >actual &&
test_i18ncmp expect actual
ok 77 - human date 621660000
# passed all 77 test(s)
1..77
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0011-hashmap.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0011-hashmap/.git/
expecting success:
test_hashmap "put key1 value1
put key2 value2
put fooBarFrotz value3
put foobarfrotz value4
size" "NULL
NULL
NULL
NULL
64 4"
ok 1 - put
expecting success:
test_hashmap "put key1 value1
put key2 value2
put fooBarFrotz value3
size" "NULL
NULL
NULL
64 3" ignorecase
ok 2 - 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 3 - 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 4 - 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 5 - 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 6 - 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"
ok 7 - 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 8 - 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"
ok 9 - 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 10 - remove (case insensitive)
expecting success:
test-tool hashmap >actual.raw <<-\EOF &&
put key1 value1
put key2 value2
put fooBarFrotz value3
iterate
EOF
cat >expect <<-\EOF &&
NULL
NULL
NULL
fooBarFrotz value3
key1 value1
key2 value2
EOF
sort <actual.raw >actual &&
test_cmp expect actual
ok 11 - iterate
expecting success:
test-tool hashmap ignorecase >actual.raw <<-\EOF &&
put key1 value1
put key2 value2
put fooBarFrotz value3
iterate
EOF
cat >expect <<-\EOF &&
NULL
NULL
NULL
fooBarFrotz value3
key1 value1
key2 value2
EOF
sort <actual.raw >actual &&
test_cmp expect actual
ok 12 - 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-tool hashmap > out &&
test_cmp expect out
ok 13 - grow / shrink
expecting success:
test_hashmap "intern value1
intern Value1
intern value2
intern value2
" "value1
Value1
value2
value2"
ok 14 - string interning
# passed all 14 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0010-racy-git.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0010-racy-git/.git/
expecting success: test "" != "$files"
ok 1 - Racy GIT trial #0 part A
expecting success: test "" != "$files"
ok 2 - Racy GIT trial #0 part B
expecting success: test "" != "$files"
ok 3 - Racy GIT trial #1 part A
expecting success: test "" != "$files"
ok 4 - Racy GIT trial #1 part B
expecting success: test "" != "$files"
ok 5 - Racy GIT trial #2 part A
expecting success: test "" != "$files"
ok 6 - Racy GIT trial #2 part B
expecting success: test "" != "$files"
ok 7 - Racy GIT trial #3 part A
expecting success: test "" != "$files"
ok 8 - Racy GIT trial #3 part B
expecting success: test "" != "$files"
ok 9 - Racy GIT trial #4 part A
expecting success: test "" != "$files"
ok 10 - Racy GIT trial #4 part B
# passed all 10 test(s)
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0013-sha1dc.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0013-sha1dc/.git/
expecting success:
test_must_fail test-tool sha1 <"$TEST_DATA/shattered-1.pdf" 2>err &&
test_i18ngrep collision err &&
grep 38762cf7f55934b34d179ae6a4c80cadccbb7f0a err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: SHA-1 appears to be part of a collision attack: 38762cf7f55934b34d179ae6a4c80cadccbb7f0a
fatal: SHA-1 appears to be part of a collision attack: 38762cf7f55934b34d179ae6a4c80cadccbb7f0a
ok 1 - test-sha1 detects shattered pdf
# passed all 1 test(s)
1..1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0014-alias.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0014-alias/.git/
expecting success:
git config alias.nested-internal-1 nested-internal-2 &&
git config alias.nested-internal-2 status &&
git nested-internal-1 >output &&
test_i18ngrep "^On branch " output
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
On branch master
ok 1 - nested aliases - internal execution
expecting success:
git config alias.nested-external-1 nested-external-2 &&
git config alias.nested-external-2 "!git nested-external-3" &&
git config alias.nested-external-3 status &&
git nested-external-1 >output &&
test_i18ngrep "^On branch " output
On branch master
ok 2 - nested aliases - mixed execution
expecting success:
git config alias.loop-internal-1 loop-internal-2 &&
git config alias.loop-internal-2 loop-internal-3 &&
git config alias.loop-internal-3 loop-internal-2 &&
test_must_fail git loop-internal-1 2>output &&
test_i18ngrep "^fatal: alias loop detected: expansion of" output
fatal: alias loop detected: expansion of 'loop-internal-1' does not terminate:
ok 3 - looping aliases - internal execution
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0000-basic.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0000-basic/.git/
expecting success:
x="notlocal" &&
echo "local" >expected1 &&
try_local_x >actual1 &&
test_cmp expected1 actual1 &&
echo "notlocal" >expected2 &&
echo "$x" >actual2 &&
test_cmp expected2 actual2
ok 1 - verify that the running shell supports "local"
expecting success:
find .git/objects -type f -print >should-be-empty &&
test_line_count = 0 should-be-empty
ok 2 - .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 3 - .git/objects should have 3 subdirectories
expecting success:
:
ok 4 - 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
ok 5 - 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 6 - 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
ok 7 - 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
ok 8 - 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
ok 9 - 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
ok 10 - 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 11 - pretend we have a mix of all possible results
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
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
ok 12 - 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
ok 13 - 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 14 - 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 - 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 16 - 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 17 - --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
ok 18 - --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 19 - --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 20 - --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
ok 21 - --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 - --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
ok 23 - --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 24 - --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
ok 25 - --run range negation
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 26 - --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
ok 27 - --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
ok 28 - --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
ok 29 - --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
ok 30 - --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 - --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 32 - --run invalid selector
expecting success:
test_have_prereq HAVEIT &&
haveit=yes
ok 33 - test runs if prerequisite is satisfied
skipping test: unmet prerequisite causes test to be skipped
donthaveit=no
ok 34 # skip unmet prerequisite causes test to be skipped (missing DONTHAVEIT)
expecting success:
test_have_prereq HAVEIT &&
test_have_prereq HAVETHIS &&
haveit=yes
ok 35 - test runs if prerequisites are satisfied
skipping test: unmet prerequisites causes test to be skipped
donthaveit=no
ok 36 # 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 37 # skip unmet prerequisites causes test to be skipped (missing DONTHAVEIT of DONTHAVEIT,HAVEIT)
checking prerequisite: LAZY_TRUE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&true
)
prerequisite LAZY_TRUE ok
expecting success:
havetrue=yes
ok 38 - test runs if lazy prereq is satisfied
skipping test: missing lazy prereqs skip tests
donthavetrue=no
ok 39 # 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
)
prerequisite LAZY_FALSE not satisfied
expecting success:
nothavefalse=yes
ok 40 - negative lazy prereqs checked
skipping test: missing negative lazy prereqs will skip
havefalse=no
ok 41 # skip missing negative lazy prereqs will skip (missing LAZY_FALSE)
expecting success:
test_when_finished clean=yes
ok 42 - tests clean up after themselves
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 43 - tests clean up even on failures
expecting success:
test_must_fail run_sub_test_lib_test atexit-cleanup 'Run atexit commands' -i <<-\EOF &&
test_expect_success 'tests clean up even after a failure' '
> ../../clean-atexit &&
test_atexit rm ../../clean-atexit &&
> ../../also-clean-atexit &&
test_atexit rm ../../also-clean-atexit &&
> ../../dont-clean-atexit &&
(exit 1)
'
test_done
EOF
test_path_is_file dont-clean-atexit &&
test_path_is_missing clean-atexit &&
test_path_is_missing also-clean-atexit
ok 44 - test_atexit is run
expecting success:
test_oid_init
ok 45 - test_oid setup
expecting success:
test_oid zero >actual &&
grep "^00*\$" actual &&
rawsz="$(test_oid rawsz)" &&
hexsz="$(test_oid hexsz)" &&
test "$hexsz" -eq $(wc -c <actual) &&
test $(( $rawsz * 2)) -eq "$hexsz"
0000000000000000000000000000000000000000
ok 46 - test_oid provides sane info by default
expecting success:
test_when_finished "test_detect_hash" &&
test_set_hash sha1 &&
test_oid zero >actual &&
grep "^00*\$" actual &&
rawsz="$(test_oid rawsz)" &&
hexsz="$(test_oid hexsz)" &&
test $(wc -c <actual) -eq 40 &&
test "$rawsz" -eq 20 &&
test "$hexsz" -eq 40
0000000000000000000000000000000000000000
ok 47 - test_oid can look up data for SHA-1
expecting success:
test_when_finished "test_detect_hash" &&
test_set_hash sha256 &&
test_oid zero >actual &&
grep "^00*\$" actual &&
rawsz="$(test_oid rawsz)" &&
hexsz="$(test_oid hexsz)" &&
test $(wc -c <actual) -eq 64 &&
test "$rawsz" -eq 32 &&
test "$hexsz" -eq 64
0000000000000000000000000000000000000000000000000000000000000000
ok 48 - test_oid can look up data for SHA-256
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 49 - git update-index without --add should fail adding
expecting success:
git update-index --add should-be-empty
ok 50 - git update-index with --add should succeed
expecting success:
tree=$(git write-tree)
ok 51 - writing tree out with git write-tree
expecting success:
test "$tree" = "$(test_oid simpletree)"
ok 52 - 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
error: should-be-empty: does not exist and --remove not passed
fatal: Unable to process path should-be-empty
ok 53 - git update-index without --remove should fail removing
expecting success:
git update-index --remove should-be-empty
ok 54 - git update-index with --remove should be able to remove
expecting success:
tree=$(git write-tree)
ok 55 - git write-tree should be able to write an empty tree
expecting success:
test "$tree" = $EMPTY_TREE
ok 56 - 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 57 - adding various types of objects with git update-index --add
expecting success:
git ls-files --stage >current
ok 58 - showing stage with git ls-files --stage
expecting success:
cat >expected <<-EOF &&
100644 $(test_oid path0f) 0 path0
120000 $(test_oid path0s) 0 path0sym
100644 $(test_oid path2f) 0 path2/file2
120000 $(test_oid path2s) 0 path2/file2sym
100644 $(test_oid path3f) 0 path3/file3
120000 $(test_oid path3s) 0 path3/file3sym
100644 $(test_oid subp3f) 0 path3/subp3/file3
120000 $(test_oid subp3s) 0 path3/subp3/file3sym
EOF
test_cmp expected current
ok 59 - validate git ls-files output for a known tree
expecting success:
tree=$(git write-tree)
ok 60 - writing tree out with git write-tree
expecting success:
test "$tree" = "$(test_oid root)"
ok 61 - validate object ID for a known tree
expecting success:
git ls-tree $tree >current
ok 62 - showing tree with git ls-tree
expecting success:
cat >expected <<-EOF &&
100644 blob $(test_oid path0f) path0
120000 blob $(test_oid path0s) path0sym
040000 tree $(test_oid path2d) path2
040000 tree $(test_oid path3d) path3
EOF
test_cmp expected current
ok 63 - git ls-tree output for a known tree
expecting success:
git ls-tree -r $tree >current
ok 64 - showing tree with git ls-tree -r
expecting success:
cat >expected <<-EOF &&
100644 blob $(test_oid path0f) path0
120000 blob $(test_oid path0s) path0sym
100644 blob $(test_oid path2f) path2/file2
120000 blob $(test_oid path2s) path2/file2sym
100644 blob $(test_oid path3f) path3/file3
120000 blob $(test_oid path3s) path3/file3sym
100644 blob $(test_oid subp3f) path3/subp3/file3
120000 blob $(test_oid subp3s) path3/subp3/file3sym
EOF
test_cmp expected current
ok 65 - git ls-tree -r output for a known tree
expecting success:
git ls-tree -r -t $tree >current
ok 66 - showing tree with git ls-tree -r -t
expecting success:
cat >expected <<-EOF &&
100644 blob $(test_oid path0f) path0
120000 blob $(test_oid path0s) path0sym
040000 tree $(test_oid path2d) path2
100644 blob $(test_oid path2f) path2/file2
120000 blob $(test_oid path2s) path2/file2sym
040000 tree $(test_oid path3d) path3
100644 blob $(test_oid path3f) path3/file3
120000 blob $(test_oid path3s) path3/file3sym
040000 tree $(test_oid subp3d) path3/subp3
100644 blob $(test_oid subp3f) path3/subp3/file3
120000 blob $(test_oid subp3s) path3/subp3/file3sym
EOF
test_cmp expected current
ok 67 - git ls-tree -r output for a known tree
expecting success:
ptree=$(git write-tree --prefix=path3)
ok 68 - writing partial tree out with git write-tree --prefix
expecting success:
test "$ptree" = $(test_oid path3d)
ok 69 - validate object ID for a known tree
expecting success:
ptree=$(git write-tree --prefix=path3/subp3)
ok 70 - writing partial tree out with git write-tree --prefix
expecting success:
test "$ptree" = $(test_oid subp3d)
ok 71 - validate object ID for a known tree
expecting success:
rm -f .git/index &&
suffix=$(echo $ZERO_OID | sed -e "s/^.//") &&
cat >badobjects <<-EOF &&
100644 blob $(test_oid 001) dir/file1
100644 blob $(test_oid 002) dir/file2
100644 blob $(test_oid 003) dir/file3
100644 blob $(test_oid 004) dir/file4
100644 blob $(test_oid 005) dir/file5
EOF
git update-index --index-info <badobjects
ok 72 - put invalid objects into the index
expecting success:
test_must_fail git write-tree
error: invalid object 100644 0000000000000000000000000000000000000001 for 'dir/file1'
fatal: git-write-tree: error building trees
ok 73 - writing this tree without --missing-ok
expecting success:
git write-tree --missing-ok
6718b1dd2231ec9ad958238ceeaa06fbfbefda94
ok 74 - 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 75 - git read-tree followed by write-tree should be idempotent
expecting success:
cat >expected <<EOF &&
:100644 100644 $(test_oid path0f) $ZERO_OID M path0
:120000 120000 $(test_oid path0s) $ZERO_OID M path0sym
:100644 100644 $(test_oid path2f) $ZERO_OID M path2/file2
:120000 120000 $(test_oid path2s) $ZERO_OID M path2/file2sym
:100644 100644 $(test_oid path3f) $ZERO_OID M path3/file3
:120000 120000 $(test_oid path3s) $ZERO_OID M path3/file3sym
:100644 100644 $(test_oid subp3f) $ZERO_OID M path3/subp3/file3
:120000 120000 $(test_oid subp3s) $ZERO_OID M path3/subp3/file3sym
EOF
git diff-files >current &&
test_cmp expected current
ok 76 - validate git diff-files output for a know cache/work tree state
expecting success:
git update-index --refresh
ok 77 - git update-index --refresh should succeed
expecting success:
git diff-files >current &&
cmp -s current /dev/null
ok 78 - 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 79 - 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"
ok 80 - 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 18fe6c31d8b0fe9bed884e4cf088792c8b81c7ae ignored
ok 81 - git commit-tree omits duplicated parent in a commit
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
ok 82 - 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 83 - very long name in the index handled sanely
# passed all 83 test(s)
1..83
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0012-help.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0012-help/.git/
expecting success:
# Just write out which page gets requested
write_script test-browser <<-\EOF
echo "$*" >test-browser.log
EOF
ok 1 - setup
expecting success:
git help >/dev/null &&
git help -a --no-verbose >/dev/null &&
git help -g >/dev/null &&
git help -a >/dev/null
ok 2 - basic help commands
expecting success:
configure_help &&
git help status &&
echo "test://html/git-status.html" >expect &&
test_cmp expect test-browser.log &&
git help revisions &&
echo "test://html/gitrevisions.html" >expect &&
test_cmp expect test-browser.log
ok 3 - works for commands and guides by default
expecting success:
>test-browser.log &&
test_must_fail git help --exclude-guides revisions &&
test_must_be_empty test-browser.log
git: 'revisions' is not a git command. See 'git --help'.
ok 4 - --exclude-guides does not work for guides
expecting success:
cat <<-EOF >expect &&
git: 'revisions' is not a git command. See 'git --help'.
EOF
test_must_fail git revisions --help 2>actual &&
test_i18ncmp expect actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 5 - --help does not work for guides
expecting success:
git help >help.output &&
test_i18ngrep "^ clone " help.output &&
test_i18ngrep "^ add " help.output &&
test_i18ngrep "^ log " help.output &&
test_i18ngrep "^ commit " help.output &&
test_i18ngrep "^ fetch " help.output
clone Clone a repository into a new directory
add Add file contents to the index
log Show commit logs
commit Record changes to the repository
fetch Download objects and refs from another repository
ok 6 - git help
expecting success:
git help -g >help.output &&
test_i18ngrep "^ attributes " help.output &&
test_i18ngrep "^ everyday " help.output &&
test_i18ngrep "^ tutorial " help.output
attributes Defining attributes per path
everyday A useful minimum set of commands for Everyday Git
tutorial A tutorial introduction to Git
ok 7 - git help -g
expecting success:
git --list-cmds=builtins >builtins
ok 8 - generate builtin list
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git add [<options>] [--] <pathspec>...
ok 9 - add can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git am [<options>] [(<mbox> | <Maildir>)...]
ok 10 - am can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git blame [<options>] [<rev-opts>] [<rev>] [--] <file>
ok 11 - annotate can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git apply [<options>] [<patch>...]
ok 12 - apply can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git archive [<options>] <tree-ish> [<path>...]
ok 13 - archive can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git bisect--helper --next-all [--no-checkout]
ok 14 - bisect--helper can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git blame [<options>] [<rev-opts>] [<rev>] [--] <file>
ok 15 - blame can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git branch [<options>] [-r | -a] [--merged | --no-merged]
ok 16 - branch can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git bundle create <file> <git-rev-list args>
ok 17 - bundle can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git cat-file (-t [--allow-unknown-type] | -s [--allow-unknown-type] | -e | -p | <type> | --textconv | --filters) [--path=<path>] <object>
ok 18 - cat-file can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git check-attr [-a | --all | <attr>...] [--] <pathname>...
ok 19 - check-attr can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git check-ignore [<options>] <pathname>...
ok 20 - check-ignore can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git check-mailmap [<options>] <contact>...
ok 21 - check-mailmap can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git check-ref-format [--normalize] [<options>] <refname>
ok 22 - check-ref-format can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git checkout [<options>] <branch>
ok 23 - checkout can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git checkout-index [<options>] [--] [<file>...]
ok 24 - checkout-index can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git cherry [-v] [<upstream> [<head> [<limit>]]]
ok 25 - cherry can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git cherry-pick [<options>] <commit-ish>...
ok 26 - cherry-pick can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git clean [-d] [-f] [-i] [-n] [-q] [-e <pattern>] [-x | -X] [--] <paths>...
ok 27 - clean can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git clone [<options>] [--] <repo> [<dir>]
ok 28 - clone can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git column [<options>]
ok 29 - column can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git commit [<options>] [--] <pathspec>...
ok 30 - commit can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git commit-graph [--object-dir <objdir>]
ok 31 - commit-graph can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git commit-tree [(-p <parent>)...] [-S[<keyid>]] [(-m <message>)...] [(-F <file>)...] <tree>
ok 32 - commit-tree can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git config [<options>]
ok 33 - config can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git count-objects [-v] [-H | --human-readable]
ok 34 - count-objects can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git credential [fill|approve|reject]
ok 35 - credential can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git describe [<options>] [<commit-ish>...]
ok 36 - describe can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git diff [<options>] [<commit> [<commit>]] [--] [<path>...]
ok 37 - diff can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git diff-files [-q] [-0 | -1 | -2 | -3 | -c | --cc] [<common-diff-options>] [<path>...]
ok 38 - diff-files can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git diff-index [-m] [--cached] [<common-diff-options>] <tree-ish> [<path>...]
ok 39 - diff-index can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git diff-tree [--stdin] [-m] [-c | --cc] [-s] [-v] [--pretty] [-t] [-r] [--root] [<common-diff-options>] <tree-ish> [<tree-ish>] [<path>...]
ok 40 - diff-tree can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git difftool [<options>] [<commit> [<commit>]] [--] [<path>...]
ok 41 - difftool can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git env--helper --type=[bool|ulong] <options> <env-var>
ok 42 - env--helper can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git fast-export [rev-list-opts]
ok 43 - fast-export can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git fetch [<options>] [<repository> [<refspec>...]]
ok 44 - fetch can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git fetch-pack [--all] [--stdin] [--quiet | -q] [--keep | -k] [--thin] [--include-tag] [--upload-pack=<git-upload-pack>] [--depth=<n>] [--no-progress] [--diag-url] [-v] [<host>:]<directory> [<refs>...]
ok 45 - fetch-pack can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git fmt-merge-msg [-m <message>] [--log[=<n>] | --no-log] [--file <file>]
ok 46 - fmt-merge-msg can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git for-each-ref [<options>] [<pattern>]
ok 47 - for-each-ref can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git format-patch [<options>] [<since> | <revision-range>]
ok 48 - format-patch can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git fsck [<options>] [<object>...]
ok 49 - fsck can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git fsck [<options>] [<object>...]
ok 50 - fsck-objects can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git gc [<options>]
ok 51 - gc can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git get-tar-commit-id
ok 52 - get-tar-commit-id can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git grep [<options>] [-e] <pattern> [<rev>...] [[--] <path>...]
ok 53 - grep can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git hash-object [-t <type>] [-w] [--path=<file> | --no-filters] [--stdin] [--] <file>...
ok 54 - hash-object can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git help [--all] [--guides] [--man | --web | --info] [<command>]
ok 55 - help can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git index-pack [-v] [-o <index-file>] [--keep | --keep=<msg>] [--verify] [--strict] (<pack-file> | --stdin [--fix-thin] [<pack-file>])
ok 56 - index-pack can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]] [<directory>]
ok 57 - init can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git init [-q | --quiet] [--bare] [--template=<template-directory>] [--shared[=<permissions>]] [<directory>]
ok 58 - init-db can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git interpret-trailers [--in-place] [--trim-empty] [(--trailer <token>[(=|:)<value>])...] [<file>...]
ok 59 - interpret-trailers can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git log [<options>] [<revision-range>] [[--] <path>...]
ok 60 - log can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git ls-files [<options>] [<file>...]
ok 61 - ls-files can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]
ok 62 - ls-remote can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git ls-tree [<options>] <tree-ish> [<path>...]
ok 63 - ls-tree can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git mailinfo [-k | -b] [-m | --message-id] [-u | --encoding=<encoding> | -n] [--scissors | --no-scissors] <msg> <patch> < mail >info
ok 64 - mailinfo can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git mailsplit [-d<prec>] [-f<n>] [-b] [--keep-cr] -o<directory> [(<mbox>|<Maildir>)...]
ok 65 - mailsplit can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git merge [<options>] [<commit>...]
ok 66 - merge can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git merge-base [-a | --all] <commit> <commit>...
ok 67 - merge-base can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git merge-file [<options>] [-L <name1> [-L <orig> [-L <name2>]]] <file1> <orig-file> <file2>
ok 68 - merge-file can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git merge-index [-o] [-q] <merge-program> (-a | [--] [<filename>...])
ok 69 - merge-index can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git merge-ours <base>... -- HEAD <remote>...
ok 70 - merge-ours can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git merge-recursive <base>... -- <head> <remote> ...
ok 71 - merge-recursive can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git merge-recursive-ours <base>... -- <head> <remote> ...
ok 72 - merge-recursive-ours can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git merge-recursive-theirs <base>... -- <head> <remote> ...
ok 73 - merge-recursive-theirs can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git merge-subtree <base>... -- <head> <remote> ...
ok 74 - merge-subtree can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git merge-tree <base-tree> <branch1> <branch2>
ok 75 - merge-tree can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git mktag
ok 76 - mktag can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git mktree [-z] [--missing] [--batch]
ok 77 - mktree can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git multi-pack-index [--object-dir=<dir>] (write|verify|expire|repack --batch-size=<size>)
ok 78 - multi-pack-index can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git mv [<options>] <source>... <destination>
ok 79 - mv can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git name-rev [<options>] <commit>...
ok 80 - name-rev can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git notes [--ref <notes-ref>] [list [<object>]]
ok 81 - notes can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git pack-objects --stdout [<options>...] [< <ref-list> | < <object-list>]
ok 82 - pack-objects can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git pack-redundant [--verbose] [--alt-odb] (--all | <filename.pack>...)
ok 83 - pack-redundant can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git pack-refs [<options>]
ok 84 - pack-refs can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git patch-id [--stable | --unstable]
ok 85 - patch-id can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git blame [<options>] [<rev-opts>] [<rev>] [--] <file>
ok 86 - pickaxe can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git prune [-n] [-v] [--progress] [--expire <time>] [--] [<head>...]
ok 87 - prune can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git prune-packed [-n | --dry-run] [-q | --quiet]
ok 88 - prune-packed can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git pull [<options>] [<repository> [<refspec>...]]
ok 89 - pull can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git push [<options>] [<repository> [<refspec>...]]
ok 90 - push can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git range-diff [<options>] <old-base>..<old-tip> <new-base>..<new-tip>
ok 91 - range-diff can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git read-tree [(-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>) [-u [--exclude-per-directory=<gitignore>] | -i]] [--no-sparse-checkout] [--index-output=<file>] (--empty | <tree-ish1> [<tree-ish2> [<tree-ish3>]])
ok 92 - read-tree can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>]
ok 93 - rebase can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git rebase--interactive [<options>]
ok 94 - rebase--interactive can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git receive-pack <git-dir>
ok 95 - receive-pack can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git reflog [ show | expire | delete | exists ]
ok 96 - reflog can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git remote [-v | --verbose]
ok 97 - remote can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git remote-ext <remote> <url>
ok 98 - remote-ext can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git remote-fd <remote> <url>
ok 99 - remote-fd can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git repack [<options>]
ok 100 - repack can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git replace [-f] <object> <replacement>
ok 101 - replace can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git rerere [clear | forget <path>... | status | remaining | diff | gc]
ok 102 - rerere can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [<commit>]
ok 103 - reset can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git restore [<options>] [--source=<branch>] <file>...
ok 104 - restore can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]
ok 105 - rev-list can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git rev-parse --parseopt [<options>] -- [<args>...]
Run "git rev-parse --parseopt -h" for more information on the first usage.
ok 106 - rev-parse can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git revert [<options>] <commit-ish>...
ok 107 - revert can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git rm [<options>] [--] <file>...
ok 108 - rm can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git send-pack [--all | --mirror] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [--atomic] [<host>:]<directory> [<ref>...]
ok 109 - send-pack can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git shortlog [<options>] [<revision-range>] [[--] <path>...]
ok 110 - shortlog can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git log [<options>] [<revision-range>] [[--] <path>...]
ok 111 - show can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git show-branch [-a | --all] [-r | --remotes] [--topo-order | --date-order]
ok 112 - show-branch can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git show-index
ok 113 - show-index can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git show-ref [-q | --quiet] [--verify] [--head] [-d | --dereference] [-s | --hash[=<n>]] [--abbrev[=<n>]] [--tags] [--heads] [--] [<pattern>...]
ok 114 - show-ref can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git add [<options>] [--] <pathspec>...
ok 115 - stage can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git stash list [<options>]
ok 116 - stash can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git status [<options>] [--] <pathspec>...
ok 117 - status can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git stripspace [-s | --strip-comments]
ok 118 - stripspace can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git submodule--helper <command>
ok 119 - submodule--helper can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git switch [<options>] [<branch>]
ok 120 - switch can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git symbolic-ref [<options>] <name> [<ref>]
ok 121 - symbolic-ref can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
ok 122 - tag can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git unpack-file <sha1>
ok 123 - unpack-file can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git unpack-objects [-n] [-q] [-r] [--strict]
ok 124 - unpack-objects can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git update-index [<options>] [--] [<file>...]
ok 125 - update-index can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git update-ref [<options>] -d <refname> [<old-val>]
ok 126 - update-ref can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git update-server-info [--force]
ok 127 - update-server-info can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git upload-archive <repo>
ok 128 - upload-archive can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git upload-archive <repo>
ok 129 - upload-archive--writer can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git upload-pack [<options>] <dir>
ok 130 - upload-pack can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git var (-l | <variable>)
ok 131 - var can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git verify-commit [-v | --verbose] <commit>...
ok 132 - verify-commit can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git verify-pack [-v | --verbose] [-s | --stat-only] <pack>...
ok 133 - verify-pack can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git verify-tag [-v | --verbose] [--format=<format>] <tag>...
ok 134 - verify-tag can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git version [<options>]
ok 135 - version can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git log [<options>] [<revision-range>] [[--] <path>...]
ok 136 - whatchanged can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git worktree add [<options>] <path> [<commit-ish>]
ok 137 - worktree can handle -h
expecting success:
test_expect_code 129 git $builtin -h >output 2>&1 &&
test_i18ngrep usage output
usage: git write-tree [--missing-ok] [--prefix=<prefix>/]
ok 138 - write-tree can handle -h
# passed all 138 test(s)
1..138
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0016-oidmap.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0016-oidmap/.git/
expecting success:
test_commit one &&
test_commit two &&
test_commit three &&
test_commit four
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[master 7c7cd71] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
[master fd8d77e] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 four.t
ok 1 - setup
expecting success:
test_oidmap "put one 1
put two 2
put invalidOid 4
put three 3" "NULL
NULL
Unknown oid: invalidOid
NULL"
ok 2 - put
expecting success:
test_oidmap "put one 1
put two 2
put three 3
put invalidOid 4
put two deux
put one un" "NULL
NULL
NULL
Unknown oid: invalidOid
2
1"
ok 3 - replace
expecting success:
test_oidmap "put one 1
put two 2
put three 3
get two
get four
get invalidOid
get one" "NULL
NULL
NULL
2
NULL
Unknown oid: invalidOid
1"
ok 4 - get
expecting success:
test_oidmap "put one 1
put two 2
put three 3
remove one
remove two
remove invalidOid
remove four" "NULL
NULL
NULL
1
2
Unknown oid: invalidOid
NULL"
ok 5 - remove
expecting success:
test-tool oidmap >actual.raw <<-\EOF &&
put one 1
put two 2
put three 3
iterate
EOF
# sort "expect" too so we do not rely on the order of particular oids
sort >expect <<-EOF &&
NULL
NULL
NULL
$(git rev-parse one) 1
$(git rev-parse two) 2
$(git rev-parse three) 3
EOF
sort <actual.raw >actual &&
test_cmp expect actual
ok 6 - iterate
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0017-env-helper.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0017-env-helper/.git/
expecting success:
test_must_fail git env--helper &&
test_must_fail git env--helper --type=bool &&
test_must_fail git env--helper --type=ulong &&
test_must_fail git env--helper --type=bool &&
test_must_fail git env--helper --type=bool --default &&
test_must_fail git env--helper --type=bool --default= &&
test_must_fail git env--helper --defaultxyz
usage: git env--helper --type=[bool|ulong] <options> <env-var>
--type <type> value is given this type
--default <value> default for git_env_*(...) to fall back on
--exit-code be quiet only use git_env_*() value as exit code
usage: git env--helper --type=[bool|ulong] <options> <env-var>
--type <type> value is given this type
--default <value> default for git_env_*(...) to fall back on
--exit-code be quiet only use git_env_*() value as exit code
usage: git env--helper --type=[bool|ulong] <options> <env-var>
--type <type> value is given this type
--default <value> default for git_env_*(...) to fall back on
--exit-code be quiet only use git_env_*() value as exit code
usage: git env--helper --type=[bool|ulong] <options> <env-var>
--type <type> value is given this type
--default <value> default for git_env_*(...) to fall back on
--exit-code be quiet only use git_env_*() value as exit code
error: option `default' requires a value
usage: git env--helper --type=[bool|ulong] <options> <env-var>
--type <type> value is given this type
--default <value> default for git_env_*(...) to fall back on
--exit-code be quiet only use git_env_*() value as exit code
usage: git env--helper --type=[bool|ulong] <options> <env-var>
--type <type> value is given this type
--default <value> default for git_env_*(...) to fall back on
--exit-code be quiet only use git_env_*() value as exit code
ok 1 - env--helper usage
expecting success:
test_must_fail git env--helper --type=bool --default=1xyz MISSING &&
test_must_fail git env--helper --type=ulong --default=1xyz MISSING
error: option `--default' expects a boolean value with `--type=bool`, not `1xyz`
usage: git env--helper --type=[bool|ulong] <options> <env-var>
--type <type> value is given this type
--default <value> default for git_env_*(...) to fall back on
--exit-code be quiet only use git_env_*() value as exit code
error: option `--default' expects an unsigned long value with `--type=ulong`, not `1xyz`
usage: git env--helper --type=[bool|ulong] <options> <env-var>
--type <type> value is given this type
--default <value> default for git_env_*(...) to fall back on
--exit-code be quiet only use git_env_*() value as exit code
ok 2 - env--helper bad default values
expecting success:
# Test various --default bool values
echo true >expected &&
git env--helper --type=bool --default=1 MISSING >actual &&
test_cmp expected actual &&
git env--helper --type=bool --default=yes MISSING >actual &&
test_cmp expected actual &&
git env--helper --type=bool --default=true MISSING >actual &&
test_cmp expected actual &&
echo false >expected &&
test_must_fail git env--helper --type=bool --default=0 MISSING >actual &&
test_cmp expected actual &&
test_must_fail git env--helper --type=bool --default=no MISSING >actual &&
test_cmp expected actual &&
test_must_fail git env--helper --type=bool --default=false MISSING >actual &&
test_cmp expected actual &&
# No output with --exit-code
git env--helper --type=bool --default=true --exit-code MISSING >actual.out 2>actual.err &&
test_must_be_empty actual.out &&
test_must_be_empty actual.err &&
test_must_fail git env--helper --type=bool --default=false --exit-code MISSING >actual.out 2>actual.err &&
test_must_be_empty actual.out &&
test_must_be_empty actual.err &&
# Existing variable
EXISTS=true git env--helper --type=bool --default=false --exit-code EXISTS >actual.out 2>actual.err &&
test_must_be_empty actual.out &&
test_must_be_empty actual.err &&
test_must_fail \
env EXISTS=false \
git env--helper --type=bool --default=true --exit-code EXISTS >actual.out 2>actual.err &&
test_must_be_empty actual.out &&
test_must_be_empty actual.err
ok 3 - env--helper --type=bool
expecting success:
echo 1234567890 >expected &&
git env--helper --type=ulong --default=1234567890 MISSING >actual.out 2>actual.err &&
test_cmp expected actual.out &&
test_must_be_empty actual.err &&
echo 0 >expected &&
test_must_fail git env--helper --type=ulong --default=0 MISSING >actual &&
test_cmp expected actual &&
git env--helper --type=ulong --default=1234567890 --exit-code MISSING >actual.out 2>actual.err &&
test_must_be_empty actual.out &&
test_must_be_empty actual.err &&
EXISTS=1234567890 git env--helper --type=ulong --default=0 EXISTS --exit-code >actual.out 2>actual.err &&
test_must_be_empty actual.out &&
test_must_be_empty actual.err &&
echo 1234567890 >expected &&
EXISTS=1234567890 git env--helper --type=ulong --default=0 EXISTS >actual.out 2>actual.err &&
test_cmp expected actual.out &&
test_must_be_empty actual.err
ok 4 - env--helper --type=ulong
expecting success:
mkdir home &&
git config -f home/.gitconfig include.path cycle &&
git config -f home/cycle include.path .gitconfig &&
test_must_fail \
env HOME="$(pwd)/home" GIT_TEST_GETTEXT_POISON=false \
git config -l 2>err &&
grep "exceeded maximum include depth" err &&
test_must_fail \
env HOME="$(pwd)/home" GIT_TEST_GETTEXT_POISON=true \
git -C cycle env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON 2>err &&
grep "# GETTEXT POISON #" err
fatal: exceeded maximum include depth (10) while including
fatal: # GETTEXT POISON #
ok 5 - env--helper reads config thanks to trace2
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0019-json-writer.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0019-json-writer/.git/
expecting success:
test-tool json-writer -u
ok 1 - unit test of json-writer routines
expecting success:
cat >expect <<-\EOF &&
{}
EOF
cat >input <<-\EOF &&
object
end
EOF
test-tool json-writer <input >actual &&
test_cmp expect actual
ok 2 - trivial object
expecting success:
cat >expect <<-\EOF &&
[]
EOF
cat >input <<-\EOF &&
array
end
EOF
test-tool json-writer <input >actual &&
test_cmp expect actual
ok 3 - trivial array
expecting success:
cat >expect <<-\EOF &&
{"a":"abc","b":42,"c":3.14,"d":true,"e":false,"f":null}
EOF
cat >input <<-\EOF &&
object
object-string a abc
object-int b 42
object-double c 2 3.140
object-true d
object-false e
object-null f
end
EOF
test-tool json-writer <input >actual &&
test_cmp expect actual
ok 4 - simple object
expecting success:
cat >expect <<-\EOF &&
["abc",42,3.14,true,false,null]
EOF
cat >input <<-\EOF &&
array
array-string abc
array-int 42
array-double 2 3.140
array-true
array-false
array-null
end
EOF
test-tool json-writer <input >actual &&
test_cmp expect actual
ok 5 - simple array
expecting success:
cat >expect <<-\EOF &&
{"a":"abc\\def"}
EOF
cat >input <<-\EOF &&
object
object-string a abc\def
end
EOF
test-tool json-writer <input >actual &&
test_cmp expect actual
ok 6 - escape quoting string
expecting success:
cat >expect <<-\EOF &&
{"a":"abc\"def"}
EOF
cat >input <<-\EOF &&
object
object-string a abc"def
end
EOF
test-tool json-writer <input >actual &&
test_cmp expect actual
ok 7 - escape quoting string 2
expecting success:
cat >expect <<-\EOF &&
{"a":"abc","b":42,"sub1":{"c":3.14,"d":true,"sub2":{"e":false,"f":null}}}
EOF
cat >input <<-\EOF &&
object
object-string a abc
object-int b 42
object-object sub1
object-double c 2 3.140
object-true d
object-object sub2
object-false e
object-null f
end
end
end
EOF
test-tool json-writer <input >actual &&
test_cmp expect actual
ok 8 - nested inline object
expecting success:
cat >expect <<-\EOF &&
["abc",42,[3.14,true,[false,null]]]
EOF
cat >input <<-\EOF &&
array
array-string abc
array-int 42
array-array
array-double 2 3.140
array-true
array-array
array-false
array-null
end
end
end
EOF
test-tool json-writer <input >actual &&
test_cmp expect actual
ok 9 - nested inline array
expecting success:
cat >expect <<-\EOF &&
{"a":"abc","b":42,"sub1":{"c":3.14,"d":true,"sub2":[false,null]}}
EOF
cat >input <<-\EOF &&
object
object-string a abc
object-int b 42
object-object sub1
object-double c 2 3.140
object-true d
object-array sub2
array-false
array-null
end
end
end
EOF
test-tool json-writer <input >actual &&
test_cmp expect actual
ok 10 - nested inline object and array
expecting success:
cat >expect <<-\EOF &&
{"a":"abc","b":42,"sub1":{"c":3.14,"d":true,"sub2":[false,{"g":0,"h":1},null]}}
EOF
cat >input <<-\EOF &&
object
object-string a abc
object-int b 42
object-object sub1
object-double c 2 3.140
object-true d
object-array sub2
array-false
array-object
object-int g 0
object-int h 1
end
array-null
end
end
end
EOF
test-tool json-writer <input >actual &&
test_cmp expect actual
ok 11 - nested inline object and array 2
expecting success:
sed -e "s/^|//" >expect <<-\EOF &&
|{
| "a": "abc",
| "b": 42,
| "sub1": {
| "c": 3.14,
| "d": true,
| "sub2": [
| false,
| {
| "g": 0,
| "h": 1
| },
| null
| ]
| }
|}
EOF
cat >input <<-\EOF &&
object
object-string a abc
object-int b 42
object-object sub1
object-double c 2 3.140
object-true d
object-array sub2
array-false
array-object
object-int g 0
object-int h 1
end
array-null
end
end
end
EOF
test-tool json-writer -p <input >actual &&
test_cmp expect actual
ok 12 - pretty nested inline object and array 2
expecting success:
cat >expect <<-\EOF &&
{"a":"abc","empty":{},"b":42}
EOF
cat >input <<-\EOF &&
object
object-string a abc
object-object empty
end
object-int b 42
end
EOF
test-tool json-writer <input >actual &&
test_cmp expect actual
ok 13 - inline object with no members
expecting success:
cat >expect <<-\EOF &&
{"a":"abc","empty":[],"b":42}
EOF
cat >input <<-\EOF &&
object
object-string a abc
object-array empty
end
object-int b 42
end
EOF
test-tool json-writer <input >actual &&
test_cmp expect actual
ok 14 - inline array with no members
expecting success:
cat >expect <<-\EOF &&
{"a":"abc","empty":[{},{},{},[],{}],"b":42}
EOF
cat >input <<-\EOF &&
object
object-string a abc
object-array empty
array-object
end
array-object
end
array-object
end
array-array
end
array-object
end
end
object-int b 42
end
EOF
test-tool json-writer <input >actual &&
test_cmp expect actual
ok 15 - larger empty example
checking prerequisite: PERLJSON
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
perl -MJSON -e "exit 0"
)
Can't locate JSON.pm in @INC (you may need to install the JSON module) (@INC contains: /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/arm-linux-gnueabihf/perl5/5.28 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base .).
BEGIN failed--compilation aborted.
prerequisite PERLJSON not satisfied
skipping test: parse JSON using Perl
cat >expect <<-\EOF &&
row[0].a abc
row[0].b 42
row[0].sub1 hash
row[0].sub1.c 3.14
row[0].sub1.d 1
row[0].sub1.sub2 array
row[0].sub1.sub2[0] 0
row[0].sub1.sub2[1] hash
row[0].sub1.sub2[1].g 0
row[0].sub1.sub2[1].h 1
row[0].sub1.sub2[2] null
EOF
cat >input <<-\EOF &&
object
object-string a abc
object-int b 42
object-object sub1
object-double c 2 3.140
object-true d
object-array sub2
array-false
array-object
object-int g 0
object-int h 1
end
array-null
end
end
end
EOF
test-tool json-writer <input >output.json &&
perl "$TEST_DIRECTORY"/t0019/parse_json.perl <output.json >actual &&
test_cmp expect actual
ok 16 # skip parse JSON using Perl (missing PERLJSON)
# passed all 16 test(s)
1..16
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0015-hash.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0015-hash/.git/
expecting success:
test-tool sha1 </dev/null >actual &&
grep da39a3ee5e6b4b0d3255bfef95601890afd80709 actual &&
printf "a" | test-tool sha1 >actual &&
grep 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 actual &&
printf "abc" | test-tool sha1 >actual &&
grep a9993e364706816aba3e25717850c26c9cd0d89d actual &&
printf "message digest" | test-tool sha1 >actual &&
grep c12252ceda8be8994d5fa0290a47231c1d16aae3 actual &&
printf "abcdefghijklmnopqrstuvwxyz" | test-tool sha1 >actual &&
grep 32d10c7b8cf96570ca04ce37f2a19d84240d3a89 actual &&
perl -e "$| = 1; print q{aaaaaaaaaa} for 1..100000;" | \
test-tool sha1 >actual &&
grep 34aa973cd4c4daa4f61eeb2bdbad27316534016f actual &&
printf "blob 0\0" | test-tool sha1 >actual &&
grep e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 actual &&
printf "blob 3\0abc" | test-tool sha1 >actual &&
grep f2ba8f84ab5c1bce84a7b441cb1959cfc7093b7f actual &&
printf "tree 0\0" | test-tool sha1 >actual &&
grep 4b825dc642cb6eb9a060e54bf8d69288fbee4904 actual
da39a3ee5e6b4b0d3255bfef95601890afd80709
86f7e437faa5a7fce15d1ddcb9eaeaea377667b8
a9993e364706816aba3e25717850c26c9cd0d89d
c12252ceda8be8994d5fa0290a47231c1d16aae3
32d10c7b8cf96570ca04ce37f2a19d84240d3a89
34aa973cd4c4daa4f61eeb2bdbad27316534016f
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
f2ba8f84ab5c1bce84a7b441cb1959cfc7093b7f
4b825dc642cb6eb9a060e54bf8d69288fbee4904
ok 1 - test basic SHA-1 hash values
expecting success:
test-tool sha256 </dev/null >actual &&
grep e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 actual &&
printf "a" | test-tool sha256 >actual &&
grep ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb actual &&
printf "abc" | test-tool sha256 >actual &&
grep ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad actual &&
printf "message digest" | test-tool sha256 >actual &&
grep f7846f55cf23e14eebeab5b4e1550cad5b509e3348fbc4efa3a1413d393cb650 actual &&
printf "abcdefghijklmnopqrstuvwxyz" | test-tool sha256 >actual &&
grep 71c480df93d6ae2f1efad1447c66c9525e316218cf51fc8d9ed832f2daf18b73 actual &&
# Try to exercise the chunking code by turning autoflush on.
perl -e "$| = 1; print q{aaaaaaaaaa} for 1..100000;" | \
test-tool sha256 >actual &&
grep cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0 actual &&
perl -e "$| = 1; print q{abcdefghijklmnopqrstuvwxyz} for 1..100000;" | \
test-tool sha256 >actual &&
grep e406ba321ca712ad35a698bf0af8d61fc4dc40eca6bdcea4697962724ccbde35 actual &&
printf "blob 0\0" | test-tool sha256 >actual &&
grep 473a0f4c3be8a93681a267e3b1e9a7dcda1185436fe141f7749120a303721813 actual &&
printf "blob 3\0abc" | test-tool sha256 >actual &&
grep c1cf6e465077930e88dc5136641d402f72a229ddd996f627d60e9639eaba35a6 actual &&
printf "tree 0\0" | test-tool sha256 >actual &&
grep 6ef19b41225c5369f1c104d45d8d85efa9b057b53b14b4b9b939dd74decc5321 actual
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
f7846f55cf23e14eebeab5b4e1550cad5b509e3348fbc4efa3a1413d393cb650
71c480df93d6ae2f1efad1447c66c9525e316218cf51fc8d9ed832f2daf18b73
cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0
e406ba321ca712ad35a698bf0af8d61fc4dc40eca6bdcea4697962724ccbde35
473a0f4c3be8a93681a267e3b1e9a7dcda1185436fe141f7749120a303721813
c1cf6e465077930e88dc5136641d402f72a229ddd996f627d60e9639eaba35a6
6ef19b41225c5369f1c104d45d8d85efa9b057b53b14b4b9b939dd74decc5321
ok 2 - test basic SHA-256 hash values
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0022-crlf-rename.sh ***
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
[master (root-commit) 6ee20c2] Initial
Author: A U Thor <author@example.com>
1 file changed, 33 insertions(+)
create mode 100644 sample
[master d248b45] Second
Author: A U Thor <author@example.com>
1 file changed, 33 insertions(+), 33 deletions(-)
rename sample => elpmas (94%)
ok 1 - setup
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
ok 2 - diff -M
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0023-crlf-am.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0023-crlf-am/.git/
expecting success:
git config core.autocrlf true &&
echo foo >bar &&
git add bar &&
test_tick &&
git commit -m initial
warning: LF will be replaced by CRLF in bar.
The file will have its original line endings in your working directory
[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
Applying: test1
ok 2 - am
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0024-crlf-archive.sh ***
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
[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 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
)
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 8.3.0 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
Archive: ../test.zip
4f7f1aaec1ee996d8f5e13c2cfbd43a378578e1f
extracting: sample
ok 3 - zip archive
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0025-crlf-renormalize.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0025-crlf-renormalize/.git/
expecting success:
git config core.autocrlf false &&
printf "LINEONE\nLINETWO\nLINETHREE\n" >LF.txt &&
printf "LINEONE\r\nLINETWO\r\nLINETHREE\r\n" >CRLF.txt &&
printf "LINEONE\r\nLINETWO\nLINETHREE\n" >CRLF_mix_LF.txt &&
git add . &&
git commit -m initial
[master (root-commit) a2762d7] initial
Author: A U Thor <author@example.com>
3 files changed, 9 insertions(+)
create mode 100644 CRLF.txt
create mode 100644 CRLF_mix_LF.txt
create mode 100644 LF.txt
ok 1 - setup
expecting success:
echo "*.txt text=auto" >.gitattributes &&
git add --renormalize "*.txt" &&
cat >expect <<-\EOF &&
i/lf w/crlf attr/text=auto CRLF.txt
i/lf w/lf attr/text=auto LF.txt
i/lf w/mixed attr/text=auto CRLF_mix_LF.txt
EOF
git ls-files --eol |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 2 - renormalize CRLF in repo
expecting success:
git reset --hard &&
echo "*.txt text=auto" >.gitattributes &&
git ls-files --eol >expect &&
git add --ignore-errors "*.txt" &&
git ls-files --eol >actual &&
test_cmp expect actual
HEAD is now at a2762d7 initial
ok 3 - ignore-errors not mistaken for renormalize
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0020-crlf.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0020-crlf/.git/
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
[master (root-commit) 7b42fb8] 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 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
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
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
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
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 &&
git add doublewarn 2>err &&
if test_have_prereq C_LOCALE_OUTPUT
then
test $(grep "CRLF will be replaced by LF" err | wc -l) = 1
fi
[master 6bf0a09] nowarn
Author: A U Thor <author@example.com>
1 file changed, 4 insertions(+)
create mode 100644 doublewarn
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 6 - safecrlf: print warning only once
expecting success:
git config core.autocrlf input &&
git config core.safecrlf true &&
git diff HEAD
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 input &&
git config core.safecrlf false &&
for w in I am all CRLF; do echo $w; done | append_cr >allcrlf &&
git add allcrlf 2>err &&
test_must_be_empty err
ok 8 - safecrlf: no warning with safecrlf=false
expecting success:
git config core.autocrlf false &&
git config core.safecrlf false &&
git reset --hard HEAD^
HEAD is now at 7b42fb8 initial
ok 9 - 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"
ok 10 - 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"
ok 11 - 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"
ok 12 - checkout with autocrlf=true
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 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"
ok 13 - 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)"
ok 14 - 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 15 - 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)
ok 16 - 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)"
ok 17 - 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)
ok 18 - 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)"
ok 19 - 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
ok 20 - .gitattributes says two is binary
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 21 - .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
ok 22 - .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
[master 536a952] Add .gitattributes
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
create mode 100644 .gitattributes
ok 23 - in-tree .gitattributes (1)
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
ok 24 - 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 25 - 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
ok 26 - 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)" = ""
[master 76a56ef] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 5276471] second
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 .file
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 76a56ef initial
Previous HEAD position was 76a56ef initial
Switched to branch 'master'
ok 27 - 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'
[master a41e25b] third
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 4 deletions(-)
create mode 100644 .file2
delete mode 100644 .gitattributes
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 5276471 second
M three
Previous HEAD position was 5276471 second
Switched to branch 'master'
ok 28 - checkout when deleting .gitattributes
expecting success:
echo "three +crlf" >>.gitattributes &&
git diff
+crlf is not a valid attribute name: .gitattributes:1
ok 29 - 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
[master 6978f4e] 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
ok 30 - setting up for new autocrlf tests
expecting success:
git config core.autocrlf true &&
touch * &&
git diff --exit-code
ok 31 - report no change after setting autocrlf
expecting success:
rm * &&
git checkout -f &&
git diff --exit-code
ok 32 - files are clean after checkout
expecting success:
test "$(cr_to_Q_no_NL < alllf)" = "IQamQallQLFQ"
ok 33 - LF only file gets CRLF with autocrlf
expecting success:
test "$(cr_to_Q_no_NL < mixed)" = "OhhereisCRLFQintext"
ok 34 - Mixed file is still mixed with autocrlf
expecting success:
test "$(cr_to_Q_no_NL < allcrlf)" = "IQamQallQCRLFQ"
ok 35 - 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
[master f6d4b00] alllf2 added
Author: A U Thor <author@example.com>
1 file changed, 4 insertions(+)
create mode 100644 alllf2
ok 36 - New CRLF file gets LF in repo
# passed all 36 test(s)
1..36
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0026-eol-config.sh ***
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.
[master (root-commit) dc5ba6e] 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
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"
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 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"
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 5 - autocrlf=true overrides unset eol
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
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0028-working-tree-encoding.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0028-working-tree-encoding/.git/
expecting success:
git config core.eol lf &&
text="hallo there!\ncan you read me?" &&
echo "*.utf16 text working-tree-encoding=utf-16" >.gitattributes &&
echo "*.utf16lebom text working-tree-encoding=UTF-16LE-BOM" >>.gitattributes &&
printf "$text" >test.utf8.raw &&
printf "$text" | write_utf16 >test.utf16.raw &&
printf "$text" | write_utf32 >test.utf32.raw &&
printf "\377\376" >test.utf16lebom.raw &&
printf "$text" | iconv -f UTF-8 -t UTF-32LE >>test.utf16lebom.raw &&
# Line ending tests
printf "one\ntwo\nthree\n" >lf.utf8.raw &&
printf "one\r\ntwo\r\nthree\r\n" >crlf.utf8.raw &&
# BOM tests
printf "\0a\0b\0c" >nobom.utf16be.raw &&
printf "a\0b\0c\0" >nobom.utf16le.raw &&
printf "\376\377\0a\0b\0c" >bebom.utf16be.raw &&
printf "\377\376a\0b\0c\0" >lebom.utf16le.raw &&
printf "\0\0\0a\0\0\0b\0\0\0c" >nobom.utf32be.raw &&
printf "a\0\0\0b\0\0\0c\0\0\0" >nobom.utf32le.raw &&
printf "\0\0\376\377\0\0\0a\0\0\0b\0\0\0c" >bebom.utf32be.raw &&
printf "\377\376\0\0a\0\0\0b\0\0\0c\0\0\0" >lebom.utf32le.raw &&
# Add only UTF-16 file, we will add the UTF-32 file later
cp test.utf16.raw test.utf16 &&
cp test.utf32.raw test.utf32 &&
cp test.utf16lebom.raw test.utf16lebom &&
git add .gitattributes test.utf16 test.utf16lebom &&
git commit -m initial
checking prerequisite: NO_UTF16_BOM
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test $(printf abc | iconv -f UTF-8 -t UTF-16 | wc -c) = 6
)
prerequisite NO_UTF16_BOM not satisfied
checking prerequisite: NO_UTF32_BOM
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test $(printf abc | iconv -f UTF-8 -t UTF-32 | wc -c) = 12
)
prerequisite NO_UTF32_BOM not satisfied
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
[master (root-commit) 9a88bc7] initial
Author: A U Thor <author@example.com>
3 files changed, 4 insertions(+)
create mode 100644 .gitattributes
create mode 100644 test.utf16
create mode 100644 test.utf16lebom
ok 1 - setup test files
expecting success:
test_when_finished "rm -f test.utf16.git" &&
git cat-file -p :test.utf16 >test.utf16.git &&
test_cmp_bin test.utf8.raw test.utf16.git
ok 2 - ensure UTF-8 is stored in Git
expecting success:
test_when_finished "rm -f test.utf16.raw" &&
rm test.utf16 &&
git checkout test.utf16 &&
test_cmp_bin test.utf16.raw test.utf16
Updated 1 path from the index
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
ok 3 - re-encode to UTF-16 on checkout
expecting success:
rm test.utf16lebom &&
git checkout test.utf16lebom &&
test_cmp_bin test.utf16lebom.raw test.utf16lebom
Updated 1 path from the index
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
ok 4 - re-encode to UTF-16-LE-BOM on checkout
expecting success:
test_when_finished "rm -f test.utf32.git" &&
test_when_finished "git reset --hard HEAD" &&
echo "*.utf32 text working-tree-encoding=utf-32" >.git/info/attributes &&
git add test.utf32 &&
git cat-file -p :test.utf32 >test.utf32.git &&
test_cmp_bin test.utf8.raw test.utf32.git
source (test.utf32, considered utf-32):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 0 [2m [0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 68 [2mh[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 0 [2m [0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 61 [2ma[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 0 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 6c [2ml[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 0 [2m [0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 6c [2ml[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 0 [2m [0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 6f [2mo[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 0 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 20 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 0 [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 74 [2mt[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 0 [2m [0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 68 [2mh[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 0 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 65 [2me[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 0 [2m [0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 72 [2mr[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 0 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 0 [2m [0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 21 [2m![0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 0 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m a [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 0 [2m [0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 63 [2mc[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 0 [2m [0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 61 [2ma[0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 0 [2m [0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 6e [2mn[0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 0 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 20 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 0 [2m [0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 79 [2my[0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 0 [2m [0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 6f [2mo[0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 0 [2m [0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 75 [2mu[0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 0 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 20 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 0 [2m [0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 72 [2mr[0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 0 [2m [0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 65 [2me[0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 0 [2m [0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 61 [2ma[0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 0 [2m [0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 64 [2md[0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 0 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 20 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 0 [2m [0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 6d [2mm[0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 0 [2m [0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 65 [2me[0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 0 [2m [0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 3f [2m?[0m | [2m117:[0m 0 [2m [0m | [2m118:[0m 0 [2m [0m | [2m119:[0m 0 [2m [0m
destination (test.utf32, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
HEAD is now at 9a88bc7 initial
ok 5 - check $GIT_DIR/info/attributes support
expecting success:
test_when_finished "git reset --hard HEAD" &&
echo "*.utf${i}be text working-tree-encoding=utf-${i}be" >>.gitattributes &&
echo "*.utf${i}le text working-tree-encoding=utf-${i}LE" >>.gitattributes &&
# Here we add a UTF-16 (resp. UTF-32) files with BOM (big/little-endian)
# but we tell Git to treat it as UTF-16BE/UTF-16LE (resp. UTF-32).
# In these cases the BOM is prohibited.
cp bebom.utf${i}be.raw bebom.utf${i}be &&
test_must_fail git add bebom.utf${i}be 2>err.out &&
test_i18ngrep "fatal: BOM is prohibited .* utf-${i}be" err.out &&
test_i18ngrep "use UTF-${i} as working-tree-encoding" err.out &&
cp lebom.utf${i}le.raw lebom.utf${i}be &&
test_must_fail git add lebom.utf${i}be 2>err.out &&
test_i18ngrep "fatal: BOM is prohibited .* utf-${i}be" err.out &&
test_i18ngrep "use UTF-${i} as working-tree-encoding" err.out &&
cp bebom.utf${i}be.raw bebom.utf${i}le &&
test_must_fail git add bebom.utf${i}le 2>err.out &&
test_i18ngrep "fatal: BOM is prohibited .* utf-${i}LE" err.out &&
test_i18ngrep "use UTF-${i} as working-tree-encoding" err.out &&
cp lebom.utf${i}le.raw lebom.utf${i}le &&
test_must_fail git add lebom.utf${i}le 2>err.out &&
test_i18ngrep "fatal: BOM is prohibited .* utf-${i}LE" err.out &&
test_i18ngrep "use UTF-${i} as working-tree-encoding" err.out
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: BOM is prohibited in 'bebom.utf16be' if encoded as utf-16be
hint: The file 'bebom.utf16be' contains a byte order mark (BOM). Please use UTF-16 as working-tree-encoding.
fatal: BOM is prohibited in 'lebom.utf16be' if encoded as utf-16be
hint: The file 'lebom.utf16be' contains a byte order mark (BOM). Please use UTF-16 as working-tree-encoding.
fatal: BOM is prohibited in 'bebom.utf16le' if encoded as utf-16LE
hint: The file 'bebom.utf16le' contains a byte order mark (BOM). Please use UTF-16 as working-tree-encoding.
fatal: BOM is prohibited in 'lebom.utf16le' if encoded as utf-16LE
hint: The file 'lebom.utf16le' contains a byte order mark (BOM). Please use UTF-16 as working-tree-encoding.
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
HEAD is now at 9a88bc7 initial
ok 6 - check prohibited UTF-16 BOM
expecting success:
test_when_finished "git reset --hard HEAD" &&
echo "*.utf${i} text working-tree-encoding=utf-${i}" >>.gitattributes &&
cp nobom.utf${i}be.raw nobom.utf${i} &&
test_must_fail git add nobom.utf${i} 2>err.out &&
test_i18ngrep "fatal: BOM is required .* utf-${i}" err.out &&
test_i18ngrep "use UTF-${i}BE or UTF-${i}LE" err.out &&
cp nobom.utf${i}le.raw nobom.utf${i} &&
test_must_fail git add nobom.utf${i} 2>err.out &&
test_i18ngrep "fatal: BOM is required .* utf-${i}" err.out &&
test_i18ngrep "use UTF-${i}BE or UTF-${i}LE" err.out
fatal: BOM is required in 'nobom.utf16' if encoded as utf-16
hint: The file 'nobom.utf16' is missing a byte order mark (BOM). Please use UTF-16BE or UTF-16LE (depending on the byte order) as working-tree-encoding.
fatal: BOM is required in 'nobom.utf16' if encoded as utf-16
hint: The file 'nobom.utf16' is missing a byte order mark (BOM). Please use UTF-16BE or UTF-16LE (depending on the byte order) as working-tree-encoding.
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
HEAD is now at 9a88bc7 initial
ok 7 - check required UTF-16 BOM
expecting success:
test_when_finished "rm -f crlf.utf${i}.raw lf.utf${i}.raw" &&
test_when_finished "git reset --hard HEAD^" &&
cat lf.utf8.raw | write_utf${i} >lf.utf${i}.raw &&
cat crlf.utf8.raw | write_utf${i} >crlf.utf${i}.raw &&
cp crlf.utf${i}.raw eol.utf${i} &&
cat >expectIndexLF <<-EOF &&
i/lf w/-text attr/text eol.utf${i}
EOF
git add eol.utf${i} &&
git commit -m eol &&
# UTF-${i} with CRLF (Windows line endings)
rm eol.utf${i} &&
git -c core.eol=crlf checkout eol.utf${i} &&
test_cmp_bin crlf.utf${i}.raw eol.utf${i} &&
# Although the file has CRLF in the working tree,
# ensure LF in the index
git ls-files --eol eol.utf${i} >actual &&
test_cmp expectIndexLF actual &&
# UTF-${i} with LF (Unix line endings)
rm eol.utf${i} &&
git -c core.eol=lf checkout eol.utf${i} &&
test_cmp_bin lf.utf${i}.raw eol.utf${i} &&
# The file LF in the working tree, ensure LF in the index
git ls-files --eol eol.utf${i} >actual &&
test_cmp expectIndexLF actual
checking prerequisite: NO_UTF16_BOM
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test $(printf abc | iconv -f UTF-8 -t UTF-16 | wc -c) = 6
)
prerequisite NO_UTF16_BOM not satisfied
checking prerequisite: NO_UTF16_BOM
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test $(printf abc | iconv -f UTF-8 -t UTF-16 | wc -c) = 6
)
prerequisite NO_UTF16_BOM not satisfied
source (eol.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 6f [2mo[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6e [2mn[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 65 [2me[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m d [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m a [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 77 [2mw[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 6f [2mo[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m d [2m [0m | [2m19:[0m 0 [2m [0m | [2m20:[0m a [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 74 [2mt[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 68 [2mh[0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 72 [2mr[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 65 [2me[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 65 [2me[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m d [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m a [2m [0m | [2m35:[0m 0 [2m [0m
destination (eol.utf16, considered UTF-8):
| [2m 0:[0m 6f [2mo[0m | [2m 1:[0m 6e [2mn[0m | [2m 2:[0m 65 [2me[0m | [2m 3:[0m d [2m [0m | [2m 4:[0m a [2m [0m | [2m 5:[0m 74 [2mt[0m | [2m 6:[0m 77 [2mw[0m | [2m 7:[0m 6f [2mo[0m
| [2m 8:[0m d [2m [0m | [2m 9:[0m a [2m [0m | [2m10:[0m 74 [2mt[0m | [2m11:[0m 68 [2mh[0m | [2m12:[0m 72 [2mr[0m | [2m13:[0m 65 [2me[0m | [2m14:[0m 65 [2me[0m | [2m15:[0m d [2m [0m
| [2m16:[0m a [2m [0m
warning: CRLF will be replaced by LF in eol.utf16.
The file will have its original line endings in your working directory
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
source (eol.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 6f [2mo[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6e [2mn[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 65 [2me[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m d [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m a [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 77 [2mw[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 6f [2mo[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m d [2m [0m | [2m19:[0m 0 [2m [0m | [2m20:[0m a [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 74 [2mt[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 68 [2mh[0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 72 [2mr[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 65 [2me[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 65 [2me[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m d [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m a [2m [0m | [2m35:[0m 0 [2m [0m
destination (eol.utf16, considered UTF-8):
| [2m 0:[0m 6f [2mo[0m | [2m 1:[0m 6e [2mn[0m | [2m 2:[0m 65 [2me[0m | [2m 3:[0m d [2m [0m | [2m 4:[0m a [2m [0m | [2m 5:[0m 74 [2mt[0m | [2m 6:[0m 77 [2mw[0m | [2m 7:[0m 6f [2mo[0m
| [2m 8:[0m d [2m [0m | [2m 9:[0m a [2m [0m | [2m10:[0m 74 [2mt[0m | [2m11:[0m 68 [2mh[0m | [2m12:[0m 72 [2mr[0m | [2m13:[0m 65 [2me[0m | [2m14:[0m 65 [2me[0m | [2m15:[0m d [2m [0m
| [2m16:[0m a [2m [0m
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
[master d4f70c6] eol
Author: A U Thor <author@example.com>
1 file changed, 3 insertions(+)
create mode 100644 eol.utf16
Updated 1 path from the index
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
Updated 1 path from the index
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
HEAD is now at 9a88bc7 initial
ok 8 - eol conversion for UTF-16 encoded files on checkout
expecting success:
test_when_finished "git reset --hard HEAD" &&
echo "*.utf${i}be text working-tree-encoding=utf-${i}be" >>.gitattributes &&
echo "*.utf${i}le text working-tree-encoding=utf-${i}LE" >>.gitattributes &&
# Here we add a UTF-16 (resp. UTF-32) files with BOM (big/little-endian)
# but we tell Git to treat it as UTF-16BE/UTF-16LE (resp. UTF-32).
# In these cases the BOM is prohibited.
cp bebom.utf${i}be.raw bebom.utf${i}be &&
test_must_fail git add bebom.utf${i}be 2>err.out &&
test_i18ngrep "fatal: BOM is prohibited .* utf-${i}be" err.out &&
test_i18ngrep "use UTF-${i} as working-tree-encoding" err.out &&
cp lebom.utf${i}le.raw lebom.utf${i}be &&
test_must_fail git add lebom.utf${i}be 2>err.out &&
test_i18ngrep "fatal: BOM is prohibited .* utf-${i}be" err.out &&
test_i18ngrep "use UTF-${i} as working-tree-encoding" err.out &&
cp bebom.utf${i}be.raw bebom.utf${i}le &&
test_must_fail git add bebom.utf${i}le 2>err.out &&
test_i18ngrep "fatal: BOM is prohibited .* utf-${i}LE" err.out &&
test_i18ngrep "use UTF-${i} as working-tree-encoding" err.out &&
cp lebom.utf${i}le.raw lebom.utf${i}le &&
test_must_fail git add lebom.utf${i}le 2>err.out &&
test_i18ngrep "fatal: BOM is prohibited .* utf-${i}LE" err.out &&
test_i18ngrep "use UTF-${i} as working-tree-encoding" err.out
fatal: BOM is prohibited in 'bebom.utf32be' if encoded as utf-32be
hint: The file 'bebom.utf32be' contains a byte order mark (BOM). Please use UTF-32 as working-tree-encoding.
fatal: BOM is prohibited in 'lebom.utf32be' if encoded as utf-32be
hint: The file 'lebom.utf32be' contains a byte order mark (BOM). Please use UTF-32 as working-tree-encoding.
fatal: BOM is prohibited in 'bebom.utf32le' if encoded as utf-32LE
hint: The file 'bebom.utf32le' contains a byte order mark (BOM). Please use UTF-32 as working-tree-encoding.
fatal: BOM is prohibited in 'lebom.utf32le' if encoded as utf-32LE
hint: The file 'lebom.utf32le' contains a byte order mark (BOM). Please use UTF-32 as working-tree-encoding.
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
HEAD is now at 9a88bc7 initial
ok 9 - check prohibited UTF-32 BOM
expecting success:
test_when_finished "git reset --hard HEAD" &&
echo "*.utf${i} text working-tree-encoding=utf-${i}" >>.gitattributes &&
cp nobom.utf${i}be.raw nobom.utf${i} &&
test_must_fail git add nobom.utf${i} 2>err.out &&
test_i18ngrep "fatal: BOM is required .* utf-${i}" err.out &&
test_i18ngrep "use UTF-${i}BE or UTF-${i}LE" err.out &&
cp nobom.utf${i}le.raw nobom.utf${i} &&
test_must_fail git add nobom.utf${i} 2>err.out &&
test_i18ngrep "fatal: BOM is required .* utf-${i}" err.out &&
test_i18ngrep "use UTF-${i}BE or UTF-${i}LE" err.out
fatal: BOM is required in 'nobom.utf32' if encoded as utf-32
hint: The file 'nobom.utf32' is missing a byte order mark (BOM). Please use UTF-32BE or UTF-32LE (depending on the byte order) as working-tree-encoding.
fatal: BOM is required in 'nobom.utf32' if encoded as utf-32
hint: The file 'nobom.utf32' is missing a byte order mark (BOM). Please use UTF-32BE or UTF-32LE (depending on the byte order) as working-tree-encoding.
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
HEAD is now at 9a88bc7 initial
ok 10 - check required UTF-32 BOM
expecting success:
test_when_finished "rm -f crlf.utf${i}.raw lf.utf${i}.raw" &&
test_when_finished "git reset --hard HEAD^" &&
cat lf.utf8.raw | write_utf${i} >lf.utf${i}.raw &&
cat crlf.utf8.raw | write_utf${i} >crlf.utf${i}.raw &&
cp crlf.utf${i}.raw eol.utf${i} &&
cat >expectIndexLF <<-EOF &&
i/lf w/-text attr/text eol.utf${i}
EOF
git add eol.utf${i} &&
git commit -m eol &&
# UTF-${i} with CRLF (Windows line endings)
rm eol.utf${i} &&
git -c core.eol=crlf checkout eol.utf${i} &&
test_cmp_bin crlf.utf${i}.raw eol.utf${i} &&
# Although the file has CRLF in the working tree,
# ensure LF in the index
git ls-files --eol eol.utf${i} >actual &&
test_cmp expectIndexLF actual &&
# UTF-${i} with LF (Unix line endings)
rm eol.utf${i} &&
git -c core.eol=lf checkout eol.utf${i} &&
test_cmp_bin lf.utf${i}.raw eol.utf${i} &&
# The file LF in the working tree, ensure LF in the index
git ls-files --eol eol.utf${i} >actual &&
test_cmp expectIndexLF actual
checking prerequisite: NO_UTF32_BOM
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test $(printf abc | iconv -f UTF-8 -t UTF-32 | wc -c) = 12
)
prerequisite NO_UTF32_BOM not satisfied
checking prerequisite: NO_UTF32_BOM
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test $(printf abc | iconv -f UTF-8 -t UTF-32 | wc -c) = 12
)
prerequisite NO_UTF32_BOM not satisfied
source (eol.utf32, considered utf-32):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 0 [2m [0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 0 [2m [0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6e [2mn[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 0 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 65 [2me[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 0 [2m [0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m d [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 0 [2m [0m | [2m19:[0m 0 [2m [0m | [2m20:[0m a [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 0 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 74 [2mt[0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 0 [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 77 [2mw[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 0 [2m [0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6f [2mo[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 0 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m d [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 0 [2m [0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m a [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 0 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 74 [2mt[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 0 [2m [0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 68 [2mh[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 0 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 72 [2mr[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 0 [2m [0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 0 [2m [0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 65 [2me[0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 0 [2m [0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m d [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 0 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m a [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 0 [2m [0m | [2m71:[0m 0 [2m [0m
destination (eol.utf32, considered UTF-8):
| [2m 0:[0m 6f [2mo[0m | [2m 1:[0m 6e [2mn[0m | [2m 2:[0m 65 [2me[0m | [2m 3:[0m d [2m [0m | [2m 4:[0m a [2m [0m | [2m 5:[0m 74 [2mt[0m | [2m 6:[0m 77 [2mw[0m | [2m 7:[0m 6f [2mo[0m
| [2m 8:[0m d [2m [0m | [2m 9:[0m a [2m [0m | [2m10:[0m 74 [2mt[0m | [2m11:[0m 68 [2mh[0m | [2m12:[0m 72 [2mr[0m | [2m13:[0m 65 [2me[0m | [2m14:[0m 65 [2me[0m | [2m15:[0m d [2m [0m
| [2m16:[0m a [2m [0m
warning: CRLF will be replaced by LF in eol.utf32.
The file will have its original line endings in your working directory
source (test.utf16, considered utf-16):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 61 [2ma[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6c [2ml[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6f [2mo[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 20 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 74 [2mt[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 68 [2mh[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 65 [2me[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 72 [2mr[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 21 [2m![0m | [2m25:[0m 0 [2m [0m | [2m26:[0m a [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 63 [2mc[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 61 [2ma[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6e [2mn[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 20 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 79 [2my[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 6f [2mo[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 75 [2mu[0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 20 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 72 [2mr[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 65 [2me[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 61 [2ma[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 64 [2md[0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 20 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 6d [2mm[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 3f [2m?[0m | [2m59:[0m 0 [2m [0m
destination (test.utf16, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 61 [2ma[0m | [2m 2:[0m 6c [2ml[0m | [2m 3:[0m 6c [2ml[0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 20 [2m [0m | [2m 6:[0m 74 [2mt[0m | [2m 7:[0m 68 [2mh[0m
| [2m 8:[0m 65 [2me[0m | [2m 9:[0m 72 [2mr[0m | [2m10:[0m 65 [2me[0m | [2m11:[0m 21 [2m![0m | [2m12:[0m a [2m [0m | [2m13:[0m 63 [2mc[0m | [2m14:[0m 61 [2ma[0m | [2m15:[0m 6e [2mn[0m
| [2m16:[0m 20 [2m [0m | [2m17:[0m 79 [2my[0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 75 [2mu[0m | [2m20:[0m 20 [2m [0m | [2m21:[0m 72 [2mr[0m | [2m22:[0m 65 [2me[0m | [2m23:[0m 61 [2ma[0m
| [2m24:[0m 64 [2md[0m | [2m25:[0m 20 [2m [0m | [2m26:[0m 6d [2mm[0m | [2m27:[0m 65 [2me[0m | [2m28:[0m 3f [2m?[0m
source (test.utf16lebom, considered UTF-16LE-BOM):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 68 [2mh[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 0 [2m [0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 61 [2ma[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 0 [2m [0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 6c [2ml[0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 0 [2m [0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 6c [2ml[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 0 [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 6f [2mo[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 0 [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 20 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 0 [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 74 [2mt[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 0 [2m [0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 68 [2mh[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 0 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 65 [2me[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 0 [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 72 [2mr[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 0 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 65 [2me[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 0 [2m [0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 21 [2m![0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 0 [2m [0m | [2m49:[0m 0 [2m [0m | [2m50:[0m a [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 0 [2m [0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 63 [2mc[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 0 [2m [0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 61 [2ma[0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 0 [2m [0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 6e [2mn[0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m 0 [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 20 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m 0 [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 79 [2my[0m | [2m71:[0m 0 [2m [0m
| [2m72:[0m 0 [2m [0m | [2m73:[0m 0 [2m [0m | [2m74:[0m 6f [2mo[0m | [2m75:[0m 0 [2m [0m | [2m76:[0m 0 [2m [0m | [2m77:[0m 0 [2m [0m | [2m78:[0m 75 [2mu[0m | [2m79:[0m 0 [2m [0m
| [2m80:[0m 0 [2m [0m | [2m81:[0m 0 [2m [0m | [2m82:[0m 20 [2m [0m | [2m83:[0m 0 [2m [0m | [2m84:[0m 0 [2m [0m | [2m85:[0m 0 [2m [0m | [2m86:[0m 72 [2mr[0m | [2m87:[0m 0 [2m [0m
| [2m88:[0m 0 [2m [0m | [2m89:[0m 0 [2m [0m | [2m90:[0m 65 [2me[0m | [2m91:[0m 0 [2m [0m | [2m92:[0m 0 [2m [0m | [2m93:[0m 0 [2m [0m | [2m94:[0m 61 [2ma[0m | [2m95:[0m 0 [2m [0m
| [2m96:[0m 0 [2m [0m | [2m97:[0m 0 [2m [0m | [2m98:[0m 64 [2md[0m | [2m99:[0m 0 [2m [0m | [2m100:[0m 0 [2m [0m | [2m101:[0m 0 [2m [0m | [2m102:[0m 20 [2m [0m | [2m103:[0m 0 [2m [0m
| [2m104:[0m 0 [2m [0m | [2m105:[0m 0 [2m [0m | [2m106:[0m 6d [2mm[0m | [2m107:[0m 0 [2m [0m | [2m108:[0m 0 [2m [0m | [2m109:[0m 0 [2m [0m | [2m110:[0m 65 [2me[0m | [2m111:[0m 0 [2m [0m
| [2m112:[0m 0 [2m [0m | [2m113:[0m 0 [2m [0m | [2m114:[0m 3f [2m?[0m | [2m115:[0m 0 [2m [0m | [2m116:[0m 0 [2m [0m | [2m117:[0m 0 [2m [0m
destination (test.utf16lebom, considered UTF-8):
| [2m 0:[0m 68 [2mh[0m | [2m 1:[0m 0 [2m [0m | [2m 2:[0m 61 [2ma[0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6c [2ml[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 6c [2ml[0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6f [2mo[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 20 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 74 [2mt[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 68 [2mh[0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m 65 [2me[0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 72 [2mr[0m | [2m19:[0m 0 [2m [0m | [2m20:[0m 65 [2me[0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 21 [2m![0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m a [2m [0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 63 [2mc[0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 61 [2ma[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 6e [2mn[0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 20 [2m [0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 79 [2my[0m | [2m35:[0m 0 [2m [0m | [2m36:[0m 6f [2mo[0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 75 [2mu[0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m 20 [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 72 [2mr[0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 65 [2me[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 61 [2ma[0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 64 [2md[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 20 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 6d [2mm[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 65 [2me[0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 3f [2m?[0m | [2m57:[0m 0 [2m [0m
source (eol.utf32, considered utf-32):
| [2m 0:[0m ff [2m [0m | [2m 1:[0m fe [2m [0m | [2m 2:[0m 0 [2m [0m | [2m 3:[0m 0 [2m [0m | [2m 4:[0m 6f [2mo[0m | [2m 5:[0m 0 [2m [0m | [2m 6:[0m 0 [2m [0m | [2m 7:[0m 0 [2m [0m
| [2m 8:[0m 6e [2mn[0m | [2m 9:[0m 0 [2m [0m | [2m10:[0m 0 [2m [0m | [2m11:[0m 0 [2m [0m | [2m12:[0m 65 [2me[0m | [2m13:[0m 0 [2m [0m | [2m14:[0m 0 [2m [0m | [2m15:[0m 0 [2m [0m
| [2m16:[0m d [2m [0m | [2m17:[0m 0 [2m [0m | [2m18:[0m 0 [2m [0m | [2m19:[0m 0 [2m [0m | [2m20:[0m a [2m [0m | [2m21:[0m 0 [2m [0m | [2m22:[0m 0 [2m [0m | [2m23:[0m 0 [2m [0m
| [2m24:[0m 74 [2mt[0m | [2m25:[0m 0 [2m [0m | [2m26:[0m 0 [2m [0m | [2m27:[0m 0 [2m [0m | [2m28:[0m 77 [2mw[0m | [2m29:[0m 0 [2m [0m | [2m30:[0m 0 [2m [0m | [2m31:[0m 0 [2m [0m
| [2m32:[0m 6f [2mo[0m | [2m33:[0m 0 [2m [0m | [2m34:[0m 0 [2m [0m | [2m35:[0m 0 [2m [0m | [2m36:[0m d [2m [0m | [2m37:[0m 0 [2m [0m | [2m38:[0m 0 [2m [0m | [2m39:[0m 0 [2m [0m
| [2m40:[0m a [2m [0m | [2m41:[0m 0 [2m [0m | [2m42:[0m 0 [2m [0m | [2m43:[0m 0 [2m [0m | [2m44:[0m 74 [2mt[0m | [2m45:[0m 0 [2m [0m | [2m46:[0m 0 [2m [0m | [2m47:[0m 0 [2m [0m
| [2m48:[0m 68 [2mh[0m | [2m49:[0m 0 [2m [0m | [2m50:[0m 0 [2m [0m | [2m51:[0m 0 [2m [0m | [2m52:[0m 72 [2mr[0m | [2m53:[0m 0 [2m [0m | [2m54:[0m 0 [2m [0m | [2m55:[0m 0 [2m [0m
| [2m56:[0m 65 [2me[0m | [2m57:[0m 0 [2m [0m | [2m58:[0m 0 [2m [0m | [2m59:[0m 0 [2m [0m | [2m60:[0m 65 [2me[0m | [2m61:[0m 0 [2m [0m | [2m62:[0m 0 [2m [0m | [2m63:[0m 0 [2m [0m
| [2m64:[0m d [2m [0m | [2m65:[0m 0 [2m [0m | [2m66:[0m 0 [2m [0m | [2m67:[0m 0 [2m [0m | [2m68:[0m a [2m [0m | [2m69:[0m 0 [2m [0m | [2m70:[0m 0 [2m [0m | [2m71:[0m 0 [2m [0m
destination (eol.utf32, considered UTF-8):
| [2m 0:[0m 6f [2mo[0m | [2m 1:[0m 6e [2mn[0m | [2m 2:[0m 65 [2me[0m | [2m 3:[0m d [2m [0m | [2m 4:[0m a [2m [0m | [2m 5:[0m 74 [2mt[0m | [2m 6:[0m 77 [2mw[0m | [2m 7:[0m 6f [2mo[0m
| [2m 8:[0m d [2m [0m | [2m 9:[0m a [2m [0m | [2m10:[0m 74 [2mt[0m | [2m11:[0m 68 [2mh[0m | [2m12:[0m 72 [2mr[0m | [2m13:[0m 65 [2me[0m | [2m14:[0m 65 [2me[0m | [2m15:[0m d [2m [0m
| [2m16:[0m a [2m [0m
[master 376b443] eol
Author: A U Thor <author@example.com>
1 file changed, 3 insertions(+)
create mode 100644 eol.utf32
Updated 1 path from the index
Updated 1 path from the index
HEAD is now at 9a88bc7 initial
ok 11 - eol conversion for UTF-32 encoded files on checkout
expecting success:
test_when_finished "git reset --hard HEAD" &&
echo "*.set text working-tree-encoding" >.gitattributes &&
printf "set" >t.set &&
test_must_fail git add t.set 2>err.out &&
test_i18ngrep "true/false are no valid working-tree-encodings" err.out &&
echo "*.unset text -working-tree-encoding" >.gitattributes &&
printf "unset" >t.unset &&
git add t.unset &&
echo "*.empty text working-tree-encoding=" >.gitattributes &&
printf "empty" >t.empty &&
git add t.empty &&
echo "*.garbage text working-tree-encoding=garbage" >.gitattributes &&
printf "garbage" >t.garbage &&
test_must_fail git add t.garbage 2>err.out &&
test_i18ngrep "failed to encode" err.out
fatal: true/false are no valid working-tree-encodings
fatal: failed to encode 't.garbage' from garbage to UTF-8
HEAD is now at 9a88bc7 initial
ok 12 - check unsupported encodings
expecting success:
BEFORE_STATE=$(git rev-parse HEAD) &&
test_when_finished "git reset --hard $BEFORE_STATE" &&
# Add and commit a UTF-16 file but skip the "working-tree-encoding"
# filter. Consequently, the in-repo representation is UTF-16 and not
# UTF-8. This simulates a Git version that has no working tree encoding
# support.
echo "*.utf16le text working-tree-encoding=utf-16le" >.gitattributes &&
echo "hallo" >nonsense.utf16le &&
TEST_HASH=$(git hash-object --no-filters -w nonsense.utf16le) &&
git update-index --add --cacheinfo 100644 $TEST_HASH nonsense.utf16le &&
COMMIT=$(git commit-tree -p $(git rev-parse HEAD) -m "plain commit" $(git write-tree)) &&
git update-ref refs/heads/master $COMMIT &&
test_must_fail git checkout HEAD^ 2>err.out &&
test_i18ngrep "error: .* overwritten by checkout:" err.out
error: Your local changes to the following files would be overwritten by checkout:
HEAD is now at 9a88bc7 initial
ok 13 - error if encoding round trip is not the same during refresh
expecting success:
BEFORE_STATE=$(git rev-parse HEAD) &&
test_when_finished "git reset --hard $BEFORE_STATE" &&
# Skip the UTF-16 filter for the added file
# This simulates a Git version that has no checkoutEncoding support
cp nobom.utf16be.raw nonsense.utf16 &&
TEST_HASH=$(git hash-object --no-filters -w nonsense.utf16) &&
git update-index --add --cacheinfo 100644 $TEST_HASH nonsense.utf16 &&
COMMIT=$(git commit-tree -p $(git rev-parse HEAD) -m "plain commit" $(git write-tree)) &&
git update-ref refs/heads/master $COMMIT &&
git diff 2>err.out &&
test_i18ngrep "error: BOM is required" err.out
error: BOM is required in 'nonsense.utf16' if encoded as utf-16
error: BOM is required in 'nonsense.utf16' if encoded as utf-16
HEAD is now at 9a88bc7 initial
ok 14 - error if encoding garbage is already in Git
checking prerequisite: ICONV_SHIFT_JIS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
iconv -f UTF-8 -t SHIFT-JIS </dev/null
)
prerequisite ICONV_SHIFT_JIS ok
expecting success:
test_when_finished "rm -f roundtrip.shift roundtrip.utf16" &&
test_when_finished "git reset --hard HEAD" &&
text="hallo there!\nroundtrip test here!" &&
printf "$text" | iconv -f UTF-8 -t SHIFT-JIS >roundtrip.shift &&
printf "$text" | write_utf16 >roundtrip.utf16 &&
echo "*.shift text working-tree-encoding=SHIFT-JIS" >>.gitattributes &&
# SHIFT-JIS encoded files are round-trip checked by default...
GIT_TRACE=1 git add .gitattributes roundtrip.shift 2>&1 |
grep "Checking roundtrip encoding for SHIFT-JIS" &&
git reset &&
# ... unless we overwrite the Git config!
! GIT_TRACE=1 git -c core.checkRoundtripEncoding=garbage \
add .gitattributes roundtrip.shift 2>&1 |
grep "Checking roundtrip encoding for SHIFT-JIS" &&
git reset &&
# UTF-16 encoded files should not be round-trip checked by default...
! GIT_TRACE=1 git add roundtrip.utf16 2>&1 |
grep "Checking roundtrip encoding for UTF-16" &&
git reset &&
# ... unless we tell Git to check it!
GIT_TRACE=1 git -c core.checkRoundtripEncoding="UTF-16, UTF-32" \
add roundtrip.utf16 2>&1 |
grep "Checking roundtrip encoding for utf-16" &&
git reset &&
# ... unless we tell Git to check it!
# (here we also check that the casing of the encoding is irrelevant)
GIT_TRACE=1 git -c core.checkRoundtripEncoding="UTF-32, utf-16" \
add roundtrip.utf16 2>&1 |
grep "Checking roundtrip encoding for utf-16" &&
git reset
checking prerequisite: NO_UTF16_BOM
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test $(printf abc | iconv -f UTF-8 -t UTF-16 | wc -c) = 6
)
prerequisite NO_UTF16_BOM not satisfied
Checking roundtrip encoding for SHIFT-JIS...
Unstaged changes after reset:
M .gitattributes
Unstaged changes after reset:
M .gitattributes
Unstaged changes after reset:
M .gitattributes
Checking roundtrip encoding for utf-16...
Unstaged changes after reset:
M .gitattributes
Checking roundtrip encoding for utf-16...
Unstaged changes after reset:
M .gitattributes
HEAD is now at 9a88bc7 initial
ok 15 - check roundtrip encoding
# passed all 15 test(s)
1..15
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0029-core-unsetenvvars.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0029-core-unsetenvvars/.git/
1..0 # SKIP skipping Windows-specific tests
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0030-stripspace.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0030-stripspace/.git/
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
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 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 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 4 - consecutive blank lines should be unified
expecting success:
printf "\n" | git stripspace >actual &&
test_must_be_empty actual &&
printf "\n\n\n" | git stripspace >actual &&
test_must_be_empty actual &&
printf "$sss\n$sss\n$sss\n" | git stripspace >actual &&
test_must_be_empty actual &&
printf "$sss$sss\n$sss\n\n" | git stripspace >actual &&
test_must_be_empty actual &&
printf "\n$sss\n$sss$sss\n" | git stripspace >actual &&
test_must_be_empty actual &&
printf "$sss$sss$sss$sss\n\n\n" | git stripspace >actual &&
test_must_be_empty actual &&
printf "\n$sss$sss$sss$sss\n\n" | git stripspace >actual &&
test_must_be_empty actual &&
printf "\n\n$sss$sss$sss$sss\n" | git stripspace >actual &&
test_must_be_empty actual
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 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
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
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
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 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
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 12 - text plus spaces at end should not show spaces
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 13 - text plus spaces at end should be cleaned and newline must remain
expecting success:
echo | git stripspace >actual &&
test_must_be_empty actual &&
echo "$sss" | git stripspace >actual &&
test_must_be_empty actual &&
echo "$sss$sss" | git stripspace >actual &&
test_must_be_empty actual &&
echo "$sss$sss$sss" | git stripspace >actual &&
test_must_be_empty actual &&
echo "$sss$sss$sss$sss" | git stripspace >actual &&
test_must_be_empty actual
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 15 - spaces without newline at end should not show spaces
expecting success:
printf "" | git stripspace >actual &&
test_must_be_empty actual &&
printf "$sss$sss" | git stripspace >actual &&
test_must_be_empty actual &&
printf "$sss$sss$sss" | git stripspace >actual &&
test_must_be_empty actual &&
printf "$sss$sss$sss$sss" | git stripspace >actual &&
test_must_be_empty actual
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
ok 17 - consecutive text lines should be unchanged
expecting success:
test ! -z "$(echo "# comment" | git stripspace)" &&
test -z "$(echo "# comment" | git stripspace -s)"
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 19 - strip comments with changed comment char
expecting success:
printf "# foo\n" >expect &&
printf "foo" | git stripspace -c >actual &&
test_cmp expect actual
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
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 22 - -c with newline only
expecting success:
printf "# foo\n" >expect &&
printf "foo" | git stripspace -c >actual &&
test_cmp expect actual
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
ok 24 - -c with changed comment char
expecting success:
test_config core.commentchar = &&
printf "= foo\n" >expect &&
rm -fr sub &&
mkdir sub &&
printf "foo" | git -C sub stripspace -c >actual &&
test_cmp expect actual
ok 25 - -c with comment char defined in .git/config
expecting success:
printf "# foo\n" >expect &&
printf "foo" | nongit git stripspace -c >actual &&
test_cmp expect actual
ok 26 - -c outside git repository
expecting success:
printf "#\tone\n#\n# two\n" >expect &&
printf "\tone\n\ntwo\n" | git stripspace -c >actual &&
test_cmp expect actual
ok 27 - avoid SP-HT sequence in commented line
# passed all 27 test(s)
1..27
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0040-parse-options.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0040-parse-options/.git/
expecting success:
test_must_fail test-tool parse-options -h >output 2>output.err &&
test_must_be_empty output.err &&
test_i18ncmp expect output
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 1 - test help
expecting success: check boolean: 1 --yes
ok 2 - OPT_BOOL() #1
expecting success: check boolean: 1 --no-doubt
ok 3 - OPT_BOOL() #2
expecting success: check boolean: 1 -D
ok 4 - OPT_BOOL() #3
expecting success: check boolean: 1 --no-fear
ok 5 - OPT_BOOL() #4
expecting success: check boolean: 1 -B
ok 6 - OPT_BOOL() #5
expecting success: check boolean: 1 --yes --yes
ok 7 - OPT_BOOL() is idempotent #1
expecting success: check boolean: 1 -DB
ok 8 - OPT_BOOL() is idempotent #2
expecting success: check boolean: 0 -D --no-yes
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 11 - OPT_BOOL() no negation #1
expecting success: check_unknown_i18n --no-no-fear
ok 12 - OPT_BOOL() no negation #2
expecting success: check boolean: 0 -D --doubt
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 15 - OPT_MAGNITUDE() simple
expecting success:
check magnitude: 239616 -m 234k
ok 16 - OPT_MAGNITUDE() kilo
expecting success:
check magnitude: 104857600 -m 100m
ok 17 - OPT_MAGNITUDE() mega
expecting success:
check magnitude: 1073741824 -m 1g
ok 18 - OPT_MAGNITUDE() giga
expecting success:
check magnitude: 3221225472 -m 3g
ok 19 - OPT_MAGNITUDE() 3giga
expecting success:
test-tool 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 20 - short options
expecting success:
test-tool 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 21 - long options
expecting success:
test_expect_code 129 test-tool parse-options -s &&
test_expect_code 129 test-tool parse-options --string &&
test_expect_code 129 test-tool parse-options --file
error: switch `s' requires a value
error: option `string' requires a value
error: option `file' requires a value
ok 22 - missing required value
expecting success:
test-tool 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 23 - intermingled arguments
expecting success:
GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS=false \
test-tool parse-options --int 2 --boolean --no-bo >output 2>output.err &&
test_must_be_empty output.err &&
test_cmp expect output
ok 24 - unambiguously abbreviated option
expecting success:
GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS=false \
test-tool parse-options --expect="integer: 2" --int=2
ok 25 - unambiguously abbreviated option with "="
expecting success:
test_expect_code 129 env GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS=false \
test-tool parse-options --strin 123
error: ambiguous option: strin (could be --string or --string2)
usage: test-tool parse-options <options>
A helper function for the parse-options API.
--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
-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
--expect <string> expected output in the variable dump
Alias
-A, --alias-source <string>
get a string
-Z, --alias-target <string>
get a string
ok 26 - ambiguously abbreviated option
expecting success:
GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS=false \
test-tool parse-options --expect="string: 123" --st 123
ok 27 - non ambiguous option (after two options it abbreviates)
expecting success:
test-tool parse-options --alias-source 123 >output &&
grep "^string: 123" output &&
test-tool parse-options --alias-target 123 >output &&
grep "^string: 123" output &&
test_must_fail test-tool parse-options --alias &&
GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS=false \
test-tool parse-options --alias 123 >output &&
grep "^string: 123" output
string: 123
string: 123
fatal: disallowed abbreviated or ambiguous option 'alias'
string: 123
ok 28 - Alias options do not contribute to abbreviation
expecting success:
test_must_fail test-tool parse-options -boolean >output 2>output.err &&
test_must_be_empty output &&
test_i18ncmp typo.err output.err
ok 29 - detect possible typos
expecting success:
test_must_fail test-tool parse-options -ambiguous >output 2>output.err &&
test_must_be_empty output &&
test_i18ncmp typo.err output.err
ok 30 - detect possible typos
expecting success:
test-tool parse-options --expect="arg 00: --quux" --quux
ok 31 - keep some options as arguments
expecting success:
test-tool parse-options --length=four -b -4 >output 2>output.err &&
test_must_be_empty output.err &&
test_cmp expect output
ok 32 - OPT_CALLBACK() and OPT_BIT() work
expecting success:
test_must_fail test-tool parse-options --no-length >output 2>output.err &&
test_must_be_empty output &&
test_must_be_empty output.err
ok 33 - OPT_CALLBACK() and callback errors work
expecting success:
test-tool parse-options --set23 -bbbbb --no-or4 >output 2>output.err &&
test_must_be_empty output.err &&
test_cmp expect output
ok 34 - OPT_BIT() and OPT_SET_INT() work
expecting success:
test-tool parse-options --set23 -bbbbb --neg-or4 >output 2>output.err &&
test_must_be_empty output.err &&
test_cmp expect output
ok 35 - OPT_NEGBIT() and OPT_SET_INT() work
expecting success:
test-tool parse-options --expect="boolean: 6" -bb --or4
ok 36 - OPT_BIT() works
expecting success:
test-tool parse-options --expect="boolean: 6" -bb --no-neg-or4
ok 37 - OPT_NEGBIT() works
expecting success:
test-tool parse-options --expect="boolean: 6" + + + + + +
ok 38 - OPT_COUNTUP() with PARSE_OPT_NODASH works
expecting success:
test-tool parse-options --expect="integer: 12345" -12345
ok 39 - OPT_NUMBER_CALLBACK() works
expecting success:
GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS=false \
test-tool parse-options --no-ambig >output 2>output.err &&
test_must_be_empty output.err &&
test_cmp expect output
ok 40 - negation of OPT_NONEG flags is not ambiguous
expecting success:
test-tool parse-options --list foo --list=bar --list=baz >output &&
test_cmp expect output
ok 41 - --list keeps list of strings
expecting success:
test-tool parse-options --list=other --list=irrelevant --list=options \
--no-list --list=foo --list=bar --list=baz >output &&
test_cmp expect output
ok 42 - --no-list resets list
expecting success:
test-tool parse-options --expect="quiet: 3" -q -q -q
ok 43 - multiple quiet levels
expecting success:
test-tool parse-options --expect="verbose: 3" -v -v -v
ok 44 - multiple verbose levels
expecting success:
test-tool parse-options --expect="quiet: 0" --no-quiet
ok 45 - --no-quiet sets --quiet to 0
expecting success:
test-tool parse-options --expect="quiet: 0" -q -q -q --no-quiet
ok 46 - --no-quiet resets multiple -q to 0
expecting success:
test-tool parse-options --expect="verbose: 0" --no-verbose
ok 47 - --no-verbose sets verbose to 0
expecting success:
test-tool parse-options --expect="verbose: 0" -v -v -v --no-verbose
ok 48 - --no-verbose resets multiple verbose to 0
expecting success:
GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS=false \
test-tool parse-options --ye &&
test_must_fail env GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS=true \
test-tool parse-options --ye
boolean: 1
integer: 0
magnitude: 0
timestamp: 0
string: (not set)
abbrev: 7
verbose: -1
quiet: 0
dry run: no
file: (not set)
fatal: disallowed abbreviated or ambiguous option 'ye'
ok 49 - GIT_TEST_DISALLOW_ABBREVIATED_OPTIONS works
# passed all 49 test(s)
1..49
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0041-usage.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0041-usage/.git/
expecting success:
test_commit "v1.0"
[master (root-commit) 843b676] v1.0
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 v1.0.t
ok 1 - setup
expecting success:
git tag --contains "v1.0" >actual 2>actual.err &&
grep "v1.0" actual &&
test_line_count = 0 actual.err
v1.0
ok 2 - tag --contains <existent_tag>
expecting success:
test_must_fail git tag --contains "notag" >actual 2>actual.err &&
test_line_count = 0 actual &&
test_i18ngrep "error" actual.err &&
test_i18ngrep ! "usage" actual.err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: malformed object name notag
ok 3 - tag --contains <inexistent_tag>
expecting success:
git tag --no-contains "v1.0" >actual 2>actual.err &&
test_line_count = 0 actual &&
test_line_count = 0 actual.err
ok 4 - tag --no-contains <existent_tag>
expecting success:
test_must_fail git tag --no-contains "notag" >actual 2>actual.err &&
test_line_count = 0 actual &&
test_i18ngrep "error" actual.err &&
test_i18ngrep ! "usage" actual.err
error: malformed object name notag
ok 5 - tag --no-contains <inexistent_tag>
expecting success:
test_must_fail git tag --noopt >actual 2>actual.err &&
test_line_count = 0 actual &&
test_i18ngrep "usage" actual.err
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
ok 6 - tag usage error
expecting success:
git branch --contains "master" >actual 2>actual.err &&
test_i18ngrep "master" actual &&
test_line_count = 0 actual.err
* master
ok 7 - branch --contains <existent_commit>
expecting success:
test_must_fail git branch --no-contains "nocommit" >actual 2>actual.err &&
test_line_count = 0 actual &&
test_i18ngrep "error" actual.err &&
test_i18ngrep ! "usage" actual.err
error: malformed object name nocommit
ok 8 - branch --contains <inexistent_commit>
expecting success:
git branch --no-contains "master" >actual 2>actual.err &&
test_line_count = 0 actual &&
test_line_count = 0 actual.err
ok 9 - branch --no-contains <existent_commit>
expecting success:
test_must_fail git branch --no-contains "nocommit" >actual 2>actual.err &&
test_line_count = 0 actual &&
test_i18ngrep "error" actual.err &&
test_i18ngrep ! "usage" actual.err
error: malformed object name nocommit
ok 10 - branch --no-contains <inexistent_commit>
expecting success:
test_must_fail git branch --noopt >actual 2>actual.err &&
test_line_count = 0 actual &&
test_i18ngrep "usage" actual.err
usage: git branch [<options>] [-r | -a] [--merged | --no-merged]
ok 11 - branch usage error
expecting success:
git for-each-ref --contains "master" >actual 2>actual.err &&
test_line_count = 2 actual &&
test_line_count = 0 actual.err
ok 12 - for-each-ref --contains <existent_object>
expecting success:
test_must_fail git for-each-ref --no-contains "noobject" >actual 2>actual.err &&
test_line_count = 0 actual &&
test_i18ngrep "error" actual.err &&
test_i18ngrep ! "usage" actual.err
error: malformed object name noobject
ok 13 - for-each-ref --contains <inexistent_object>
expecting success:
git for-each-ref --no-contains "master" >actual 2>actual.err &&
test_line_count = 0 actual &&
test_line_count = 0 actual.err
ok 14 - for-each-ref --no-contains <existent_object>
expecting success:
test_must_fail git for-each-ref --no-contains "noobject" >actual 2>actual.err &&
test_line_count = 0 actual &&
test_i18ngrep "error" actual.err &&
test_i18ngrep ! "usage" actual.err
error: malformed object name noobject
ok 15 - for-each-ref --no-contains <inexistent_object>
expecting success:
test_must_fail git for-each-ref --noopt >actual 2>actual.err &&
test_line_count = 0 actual &&
test_i18ngrep "usage" actual.err
usage: git for-each-ref [<options>] [<pattern>]
ok 16 - for-each-ref usage error
# passed all 16 test(s)
1..16
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0050-filesystem.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0050-filesystem/.git/
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
)
prerequisite CASE_INSENSITIVE_FS not satisfied
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" &&
test -f "$aumlcdiar"
)
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
)
prerequisite SYMLINKS ok
expecting success:
{
test_must_fail git config --bool core.ignorecase >/dev/null ||
test $(git config --bool core.ignorecase) = false
}
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
}
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
[master (root-commit) 137dd25] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 camelcase
Switched to a new branch 'topic'
[topic d29df6d] rename
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename camelcase => CamelCase (100%)
Switched to branch 'master'
ok 3 - setup case tests
expecting success:
git mv camelcase CamelCase &&
git commit -m "rename"
[master d29df6d] rename
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename camelcase => CamelCase (100%)
ok 4 - rename (case change)
expecting success:
rm -f CamelCase &&
rm -f camelcase &&
git reset --hard initial &&
git merge topic
HEAD is now at 137dd25 initial
Updating 137dd25..d29df6d
Fast-forward
camelcase => CamelCase | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename camelcase => CamelCase (100%)
ok 5 - merge (case change)
skipping test: add directory (with different case)
git reset --hard initial &&
mkdir -p dir1/dir2 &&
echo >dir1/dir2/a &&
echo >dir1/dir2/b &&
git add dir1/dir2/a &&
git add dir1/DIR2/b &&
git ls-files >actual &&
cat >expected <<-\EOF &&
camelcase
dir1/dir2/a
dir1/dir2/b
EOF
test_cmp expected actual
ok 6 # skip add directory (with different case) (missing CASE_INSENSITIVE_FS)
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 7 # 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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0050-filesystem/unicode/.git/
[master (root-commit) 882b4c4] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 "a\314\210"
Switched to a new branch 'topic'
[topic 366b1c7] rename
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename "a\314\210" => "\303\244" (100%)
Switched to branch 'master'
ok 8 - setup unicode normalization tests
expecting success:
git mv "$aumlcdiar" "$auml" &&
git commit -m rename
[master 366b1c7] rename
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename "a\314\210" => "\303\244" (100%)
ok 9 - rename (silent unicode normalization)
expecting success:
git reset --hard initial &&
git merge topic
HEAD is now at 882b4c4 initial
Updating 882b4c4..366b1c7
Fast-forward
"a\314\210" => "\303\244" | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename "a\314\210" => "\303\244" (100%)
ok 10 - merge (silent unicode normalization)
# passed all 10 test(s)
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0051-windows-named-pipe.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0051-windows-named-pipe/.git/
skipping test: o_append write to named pipe
GIT_TRACE="$(pwd)/expect" git status >/dev/null 2>&1 &&
{ test-tool windows-named-pipe t0051 >actual 2>&1 & } &&
pid=$! &&
sleep 1 &&
GIT_TRACE=//./pipe/t0051 git status >/dev/null 2>warning &&
wait $pid &&
test_cmp expect actual
ok 1 # skip o_append write to named pipe (missing MINGW)
# passed all 1 test(s)
1..1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0055-beyond-symlinks.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0055-beyond-symlinks/.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
)
prerequisite SYMLINKS ok
expecting success:
>a &&
mkdir b &&
ln -s b c &&
>c/d &&
git update-index --add a b/d
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 2 - update-index --add beyond symlinks
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 3 - add beyond symlinks
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0008-ignores.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0008-ignores/.git/
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.t0008-ignores/a/submodule/.git/
[master (root-commit) 66cd1ee] commit in submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
warning: adding embedded git repository: a/submodule
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> a/submodule
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached a/submodule
hint:
hint: See "git help submodule" for more information.
ok 1 - setup
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
ok 4 - . corner-case with --quiet
expecting success:
expect '' &&
test_check_ignore . 1
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 7 - . corner-case with -v --non-matching
expecting success:
expect '' &&
test_check_ignore . 1
ok 8 - . corner-case with --verbose
expecting success:
expect ':: .' &&
test_check_ignore . 1
ok 9 - . corner-case with --verbose -n
expecting success:
expect ':: .' &&
test_check_ignore . 1
ok 10 - . corner-case with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: no path specified
ok 11 - empty command line
expecting success:
expect '' &&
test_check_ignore "" 128 &&
stderr_contains "fatal: no path specified"
fatal: no path specified
ok 12 - empty command line with -q
expecting success:
expect '' &&
test_check_ignore "" 128 &&
stderr_contains "fatal: no path specified"
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"
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"
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"
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"
fatal: no path specified
ok 19 - empty command line with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 20 - --stdin with empty STDIN
expecting success:
expect '' &&
test_check_ignore "--stdin" 1 </dev/null &&
test_stderr ""
ok 21 - --stdin with empty STDIN with -q
expecting success:
expect '' &&
test_check_ignore "--stdin" 1 </dev/null &&
test_stderr ""
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 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 ""
ok 27 - --stdin with empty STDIN with --verbose -n
expecting success:
expect '' &&
test_check_ignore "--stdin" 1 </dev/null &&
test_stderr ""
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: --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: 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'
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'
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"
fatal: --quiet is only valid with a single pathname
ok 35 - --quiet with multiple args
expecting success:
expect "$expect" &&
eval "$code"
fatal: no path specified
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"
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"
fatal: no path specified
ok 42 - erroneous use of -- with --verbose
expecting success:
expect '' &&
test_check_ignore "--" 128 &&
stderr_contains "fatal: no path specified"
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"
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 45 - --stdin with superfluous arg
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"
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"
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"
fatal: cannot specify pathnames with --stdin
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"
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
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"
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"
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"
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"
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"
fatal: cannot specify pathnames with --stdin
ok 62 - --stdin -z with superfluous arg with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
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"
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"
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 66 - -z without --stdin with -v
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
fatal: this operation must be run in a work tree
ok 81 - needs work tree
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 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"
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"
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"
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"
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"
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"
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 90 - non-existent file at top-level not ignored
expecting success:
expect '' &&
test_check_ignore 'non-existent' 1
ok 91 - non-existent file at top-level not ignored with -q
expecting success:
expect '' &&
test_check_ignore 'non-existent' 1
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
ok 95 - non-existent file at top-level not ignored with -v --non-matching
expecting success:
expect '' &&
test_check_ignore 'non-existent' 1
ok 96 - non-existent file at top-level not ignored with --verbose
expecting success:
expect ':: non-existent' &&
test_check_ignore 'non-existent' 1
ok 97 - non-existent file at top-level not ignored with --verbose -n
expecting success:
expect ':: non-existent' &&
test_check_ignore 'non-existent' 1
ok 98 - non-existent file at top-level not ignored with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
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 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
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 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 107 - non-existent file at top-level not ignored with --no-index --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 108 - non-existent file at top-level ignored
expecting success:
expect '' &&
test_check_ignore 'one'
ok 109 - non-existent file at top-level ignored with -q
expecting success:
expect '' &&
test_check_ignore 'one'
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'
ok 112 - non-existent file at top-level ignored with -v -n
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
ok 113 - non-existent file at top-level ignored with -v --non-matching
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
ok 114 - non-existent file at top-level ignored with --verbose
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
ok 115 - non-existent file at top-level ignored with --verbose -n
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
ok 116 - non-existent file at top-level ignored with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 117 - non-existent file at top-level ignored with --no-index
expecting success:
expect '' &&
test_check_ignore 'one'
ok 118 - non-existent file at top-level ignored with --no-index -q
expecting success:
expect '' &&
test_check_ignore 'one'
ok 119 - non-existent file at top-level ignored with --no-index --quiet
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
ok 120 - non-existent file at top-level ignored with --no-index -v
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
ok 121 - non-existent file at top-level ignored with --no-index -v -n
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
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 123 - non-existent file at top-level ignored with --no-index --verbose
expecting success:
expect '.gitignore:1:one one' &&
test_check_ignore 'one'
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 125 - non-existent file at top-level ignored with --no-index --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
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
expecting success:
expect '' &&
test_check_ignore 'not-ignored' 1
ok 128 - existing untracked file at top-level not ignored with --quiet
expecting success:
expect '' &&
test_check_ignore 'not-ignored' 1
ok 129 - existing untracked file at top-level not ignored with -v
expecting success:
expect ':: not-ignored' &&
test_check_ignore 'not-ignored' 1
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 131 - existing untracked file at top-level not ignored with -v --non-matching
expecting success:
expect '' &&
test_check_ignore 'not-ignored' 1
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
ok 134 - existing untracked file at top-level not ignored with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
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
ok 137 - existing untracked file at top-level not ignored with --no-index --quiet
expecting success:
expect '' &&
test_check_ignore 'not-ignored' 1
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
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
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
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
ok 143 - existing untracked file at top-level not ignored with --no-index --verbose --non-matching
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 146 - existing tracked file at top-level not ignored with --quiet
expecting success:
expect '' &&
test_check_ignore 'ignored-but-in-index' 1
ok 147 - existing tracked file at top-level not ignored with -v
expecting success:
expect ':: ignored-but-in-index' &&
test_check_ignore 'ignored-but-in-index' 1
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 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 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
expecting success:
expect "$expect" &&
eval "$code"
ok 153 - existing tracked file at top-level shown as ignored with --no-index
expecting success:
expect '' &&
test_check_ignore 'ignored-but-in-index'
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'
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 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'
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'
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 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
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 163 - existing untracked file at top-level ignored with -q
expecting success:
expect '' &&
test_check_ignore 'ignored-and-untracked'
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 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 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'
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 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 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 170 - existing untracked file at top-level ignored with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 171 - existing untracked file at top-level ignored with --no-index
expecting success:
expect '' &&
test_check_ignore 'ignored-and-untracked'
ok 172 - existing untracked file at top-level ignored with --no-index -q
expecting success:
expect '' &&
test_check_ignore 'ignored-and-untracked'
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 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 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 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 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 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 179 - existing untracked file at top-level ignored with --no-index --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
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 181 - mix of file types at top-level with -v
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 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'
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 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'
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 186 - mix of file types at top-level with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 187 - mix of file types at top-level with --no-index
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 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 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 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 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 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 193 - mix of file types at top-level with --no-index --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 194 - non-existent file in subdir a/ not ignored
expecting success:
expect '' &&
test_check_ignore 'a/non-existent' 1
ok 195 - non-existent file in subdir a/ not ignored with -q
expecting success:
expect '' &&
test_check_ignore 'a/non-existent' 1
ok 196 - non-existent file in subdir a/ not ignored with --quiet
expecting success:
expect '' &&
test_check_ignore 'a/non-existent' 1
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
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 199 - non-existent file in subdir a/ not ignored with -v --non-matching
expecting success:
expect '' &&
test_check_ignore 'a/non-existent' 1
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
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
ok 202 - non-existent file in subdir a/ not ignored with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 203 - non-existent file in subdir a/ not ignored with --no-index
expecting success:
expect '' &&
test_check_ignore 'a/non-existent' 1
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 205 - non-existent file in subdir a/ not ignored with --no-index --quiet
expecting success:
expect '' &&
test_check_ignore 'a/non-existent' 1
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
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
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
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 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 211 - non-existent file in subdir a/ not ignored with --no-index --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 212 - non-existent file in subdir a/ ignored
expecting success:
expect '' &&
test_check_ignore 'a/one'
ok 213 - non-existent file in subdir a/ ignored with -q
expecting success:
expect '' &&
test_check_ignore 'a/one'
ok 214 - non-existent file in subdir a/ ignored with --quiet
expecting success:
expect '.gitignore:1:one a/one' &&
test_check_ignore 'a/one'
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 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 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 218 - non-existent file in subdir a/ ignored with --verbose
expecting success:
expect '.gitignore:1:one a/one' &&
test_check_ignore 'a/one'
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 220 - non-existent file in subdir a/ ignored with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 221 - non-existent file in subdir a/ ignored with --no-index
expecting success:
expect '' &&
test_check_ignore 'a/one'
ok 222 - non-existent file in subdir a/ ignored with --no-index -q
expecting success:
expect '' &&
test_check_ignore 'a/one'
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 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 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 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'
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 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'
ok 229 - non-existent file in subdir a/ ignored with --no-index --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 230 - existing untracked file in subdir a/ not ignored
expecting success:
expect '' &&
test_check_ignore 'a/not-ignored' 1
ok 231 - existing untracked file in subdir a/ not ignored with -q
expecting success:
expect '' &&
test_check_ignore 'a/not-ignored' 1
ok 232 - existing untracked file in subdir a/ not ignored with --quiet
expecting success:
expect '' &&
test_check_ignore 'a/not-ignored' 1
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
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
ok 235 - existing untracked file in subdir a/ not ignored with -v --non-matching
expecting success:
expect '' &&
test_check_ignore 'a/not-ignored' 1
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 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 238 - existing untracked file in subdir a/ not ignored with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 239 - existing untracked file in subdir a/ not ignored with --no-index
expecting success:
expect '' &&
test_check_ignore 'a/not-ignored' 1
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 241 - existing untracked file in subdir a/ not ignored with --no-index --quiet
expecting success:
expect '' &&
test_check_ignore 'a/not-ignored' 1
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 243 - existing untracked file in subdir a/ not ignored with --no-index -v -n
expecting success:
expect ':: a/not-ignored' &&
test_check_ignore 'a/not-ignored' 1
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
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 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 247 - existing untracked file in subdir a/ not ignored with --no-index --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 248 - existing tracked file in subdir a/ not ignored
expecting success:
expect '' &&
test_check_ignore 'a/ignored-but-in-index' 1
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 250 - existing tracked file in subdir a/ not ignored with --quiet
expecting success:
expect '' &&
test_check_ignore 'a/ignored-but-in-index' 1
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 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 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 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 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 256 - existing tracked file in subdir a/ not ignored with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
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 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 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 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'
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'
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 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'
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'
ok 265 - existing tracked file in subdir a/ shown as ignored with --no-index --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 266 - existing untracked file in subdir a/ ignored
expecting success:
expect '' &&
test_check_ignore 'a/ignored-and-untracked'
ok 267 - existing untracked file in subdir a/ ignored with -q
expecting success:
expect '' &&
test_check_ignore 'a/ignored-and-untracked'
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 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 270 - existing untracked file in subdir a/ ignored with -v -n
expecting success:
expect '.gitignore:2:ignored-* a/ignored-and-untracked' &&
test_check_ignore 'a/ignored-and-untracked'
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 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 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'
ok 274 - existing untracked file in subdir a/ ignored with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 275 - existing untracked file in subdir a/ ignored with --no-index
expecting success:
expect '' &&
test_check_ignore 'a/ignored-and-untracked'
ok 276 - existing untracked file in subdir a/ ignored with --no-index -q
expecting success:
expect '' &&
test_check_ignore 'a/ignored-and-untracked'
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'
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 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'
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'
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'
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 283 - existing untracked file in subdir a/ ignored with --no-index --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 284 - mix of file types in subdir a/
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 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'
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'
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 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'
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 290 - mix of file types in subdir a/ with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 291 - mix of file types in subdir a/ with --no-index
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 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'
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 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 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 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 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 298 - sub-directory local ignore
expecting success:
expect "a/.gitignore:2:*three a/3-three" &&
test_check_ignore "--verbose a/3-three a/three-not-this-one"
ok 299 - sub-directory local ignore with --verbose
expecting success:
expect "3-three" &&
(
cd a &&
test_check_ignore "3-three three-not-this-one"
)
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 301 - local ignore inside a sub-directory with --verbose
expecting success:
expect "$expect" &&
eval "$code"
ok 302 - nested include
expecting success:
expect '' &&
test_check_ignore "a/b/one"
ok 303 - nested include with -q
expecting success:
expect '' &&
test_check_ignore "a/b/one"
ok 304 - nested include with --quiet
expecting success:
expect 'a/b/.gitignore:8:!on* a/b/one' &&
test_check_ignore "a/b/one"
ok 305 - nested include with -v
expecting success:
expect 'a/b/.gitignore:8:!on* a/b/one' &&
test_check_ignore "a/b/one"
ok 306 - nested include with -v -n
expecting success:
expect 'a/b/.gitignore:8:!on* a/b/one' &&
test_check_ignore "a/b/one"
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 308 - nested include with --verbose
expecting success:
expect 'a/b/.gitignore:8:!on* a/b/one' &&
test_check_ignore "a/b/one"
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 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"
ok 312 - ignored sub-directory with -q
expecting success:
expect '' &&
test_check_ignore "a/b/ignored-dir"
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 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 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"
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 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"
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"
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 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 323 - cd to ignored sub-directory with -v
expecting success:
expect "$expect" &&
eval "$code"
ok 324 - symlink
expecting success:
expect '' &&
test_check_ignore "a/symlink" 1
ok 325 - symlink with -q
expecting success:
expect '' &&
test_check_ignore "a/symlink" 1
ok 326 - symlink with --quiet
expecting success:
expect '' &&
test_check_ignore "a/symlink" 1
ok 327 - symlink with -v
expecting success:
expect ':: a/symlink' &&
test_check_ignore "a/symlink" 1
ok 328 - symlink with -v -n
expecting success:
expect ':: a/symlink' &&
test_check_ignore "a/symlink" 1
ok 329 - symlink with -v --non-matching
expecting success:
expect '' &&
test_check_ignore "a/symlink" 1
ok 330 - symlink with --verbose
expecting success:
expect ':: a/symlink' &&
test_check_ignore "a/symlink" 1
ok 331 - symlink with --verbose -n
expecting success:
expect ':: a/symlink' &&
test_check_ignore "a/symlink" 1
ok 332 - symlink with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
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 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
expecting success:
expect '' &&
test_check_ignore "a/symlink/foo" 128 &&
test_stderr "fatal: pathspec 'a/symlink/foo' is beyond a symbolic link"
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 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"
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"
ok 341 - beyond a symlink with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 342 - beyond a symlink from subdirectory
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "symlink/foo" 128
) &&
test_stderr "fatal: pathspec 'symlink/foo' is beyond a symbolic link"
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"
ok 344 - beyond a symlink from subdirectory with --quiet
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "symlink/foo" 128
) &&
test_stderr "fatal: pathspec 'symlink/foo' is beyond a symbolic link"
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"
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"
ok 347 - beyond a symlink from subdirectory with -v --non-matching
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "symlink/foo" 128
) &&
test_stderr "fatal: pathspec 'symlink/foo' is beyond a symbolic link"
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"
ok 349 - beyond a symlink from subdirectory with --verbose -n
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "symlink/foo" 128
) &&
test_stderr "fatal: pathspec 'symlink/foo' is beyond a symbolic link"
ok 350 - beyond a symlink from subdirectory with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
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'"
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'"
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 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 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'"
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'"
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 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 359 - submodule with --verbose --non-matching
expecting success:
expect "$expect" &&
eval "$code"
ok 360 - submodule from subdirectory
expecting success:
expect '' &&
(
cd a &&
test_check_ignore "submodule/one" 128
) &&
test_stderr "fatal: Pathspec 'submodule/one' is in submodule 'a/submodule'"
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 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 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'"
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 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 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 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"
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 370 - global ignore
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 371 - global ignore with -v
expecting success:
expect_from_stdin <expected-default &&
test_check_ignore "--stdin" <stdin
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 374 - --stdin -v
expecting success:
expect_from_stdin <expected-default0 &&
test_check_ignore '--stdin -z' <stdin0
ok 375 - --stdin -z
expecting success:
expect &&
test_check_ignore '-q --stdin -z' <stdin0
ok 376 - --stdin -z -q
expecting success:
expect_from_stdin <expected-verbose0 &&
test_check_ignore '-v --stdin -z' <stdin0
ok 377 - --stdin -z -v
expecting success:
expect_from_stdin <expected-default0 &&
test_check_ignore '-z --stdin' <stdin0
ok 378 - -z --stdin
expecting success:
expect &&
test_check_ignore '-q -z --stdin' <stdin0
ok 379 - -z --stdin -q
expecting success:
expect_from_stdin <expected-verbose0 &&
test_check_ignore '-v -z --stdin' <stdin0
ok 380 - -z --stdin -v
expecting success:
expect_from_stdin <expected-default &&
(
cd a &&
test_check_ignore "--stdin" <../stdin
)
ok 381 - --stdin from subdirectory
expecting success:
expect_from_stdin <expected-verbose &&
(
cd a &&
test_check_ignore "--stdin -v" <../stdin
)
ok 382 - --stdin from subdirectory with -v
expecting success:
expect_from_stdin <expected-all &&
(
cd a &&
test_check_ignore "--stdin -v -n" <../stdin
)
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 385 - --stdin -z from subdirectory with -v
expecting success:
expect_from_stdin <expected-default0 &&
(
cd a &&
test_check_ignore "-z --stdin" <../stdin0
)
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
test_have_prereq !MINGW,!CYGWIN &&
rm -f testfifo && mkfifo testfifo
)
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"
.gitignore:1:one one
:: two
ok 388 - streaming support for --stdin
expecting success:
test_when_finished "rm one" &&
test_when_finished "rmdir top-level-dir" &&
>one &&
mkdir top-level-dir &&
git check-ignore one top-level-dir >actual &&
grep one actual &&
grep top-level-dir actual
one
top-level-dir
ok 389 - existing file and directory
expecting success:
test_when_finished "rm one" &&
test_when_finished "rmdir top-level-dir" &&
>one &&
mkdir top-level-dir &&
git check-ignore top-level-dir one >actual &&
grep one actual &&
grep top-level-dir actual
one
top-level-dir
ok 390 - existing directory and file
expecting success:
mkdir whitespace &&
>whitespace/trailing &&
>whitespace/untracked &&
echo "whitespace/trailing " >ignore &&
cat >expect <<EOF &&
whitespace/untracked
EOF
git ls-files -o -X ignore whitespace >actual 2>err &&
test_cmp expect actual &&
test_must_be_empty err
ok 391 - trailing whitespace is ignored
expecting success:
rm -rf whitespace &&
mkdir whitespace &&
>"whitespace/trailing " &&
>whitespace/untracked &&
echo "whitespace/trailing\\ \\ " >ignore &&
echo whitespace/untracked >expect &&
git ls-files -o -X ignore whitespace >actual 2>err &&
test_cmp expect actual &&
test_must_be_empty err
ok 392 - quoting allows trailing whitespace
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 &&
git ls-files -o -X ignore whitespace >actual 2>err &&
test_cmp expect actual &&
test_must_be_empty err
ok 393 - correct handling of backslashes
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 394 - info/exclude trumps core.excludesfile
# passed all 394 test(s)
1..394
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0056-git-C.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0056-git-C/.git/
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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0056-git-C/dir1/.git/
[master (root-commit) db46646] initial in dir1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a.txt
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 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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0056-git-C/dir1/dir2/.git/
[master (root-commit) b8bfe7f] initial in dir1/dir2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b.txt
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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0056-git-C/c/a.git/
[master (root-commit) d13aea7] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a.txt
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 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
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
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
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 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
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
ok 11 - Relative followed by fullpath: "-C ./here -C /there" is equivalent to "-C /there"
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0061-run-command.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0061-run-command/.git/
expecting success:
test-tool run-command start-command-ENOENT ./does-not-exist 2>err &&
test_i18ngrep "\./does-not-exist" err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: cannot run ./does-not-exist: No such file or directory
ok 1 - start_command reports ENOENT (slash)
expecting success:
test-tool run-command start-command-ENOENT does-not-exist 2>err &&
test_i18ngrep "does-not-exist" err
error: cannot run does-not-exist: No such file or directory
ok 2 - start_command reports ENOENT (no slash)
expecting success:
cat hello-script >hello.sh &&
chmod +x hello.sh &&
test-tool run-command run-command ./hello.sh >actual 2>err &&
test_cmp hello-script actual &&
test_must_be_empty err
ok 3 - run_command can run a command
checking prerequisite: RUNS_COMMANDS_FROM_PWD
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
write_script runs-commands-from-pwd <<-\EOF &&
true
EOF
runs-commands-from-pwd >/dev/null 2>&1
)
prerequisite RUNS_COMMANDS_FROM_PWD not satisfied
expecting success:
write_script should-not-run <<-\EOF &&
echo yikes
EOF
test_must_fail test-tool run-command run-command should-not-run 2>err &&
test_i18ngrep "should-not-run" err
error: cannot run should-not-run: No such file or directory
ok 4 - run_command is restricted to PATH
expecting success:
cat >hello <<-\EOF &&
cat hello-script
EOF
chmod +x hello &&
test-tool run-command run-command ./hello >actual 2>err &&
test_cmp hello-script actual &&
test_must_be_empty err
ok 5 - run_command can run a script without a #! line
expecting success:
test_when_finished "rm -rf bin1 bin2" &&
mkdir -p bin1/greet bin2 &&
write_script bin2/greet <<-\EOF &&
cat bin2/greet
EOF
PATH=$PWD/bin1:$PWD/bin2:$PATH \
test-tool run-command run-command greet >actual 2>err &&
test_cmp bin2/greet actual &&
test_must_be_empty err
ok 6 - run_command does not try to execute a directory
expecting success:
test_when_finished "rm -rf bin1 bin2" &&
mkdir -p bin1 bin2 &&
write_script bin1/greet <<-\EOF &&
cat bin1/greet
EOF
chmod -x bin1/greet &&
write_script bin2/greet <<-\EOF &&
cat bin2/greet
EOF
PATH=$PWD/bin1:$PWD/bin2:$PATH \
test-tool run-command run-command greet >actual 2>err &&
test_cmp bin2/greet actual &&
test_must_be_empty err
ok 7 - run_command passes over non-executable file
expecting success:
cat hello-script >hello.sh &&
chmod -x hello.sh &&
test_must_fail test-tool run-command run-command ./hello.sh 2>err &&
grep "fatal: cannot exec.*hello.sh" err
fatal: cannot exec './hello.sh': Permission denied
ok 8 - 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 -r SANETESTD.1/x &&
chmod -rx SANETESTD.2 ||
BUG "cannot prepare SANETESTD"
! test -r SANETESTD.1/x &&
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
BUG "cannot clean SANETESTD"
return $status
)
rm: cannot remove 'SANETESTD.1/x': Permission denied
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 9 - unreadable directory in PATH
expecting success:
test-tool run-command run-command-parallel 5 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
test_cmp expect actual
ok 10 - run_command runs in parallel with more jobs available than tasks
expecting success:
test-tool run-command run-command-parallel 4 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
test_cmp expect actual
ok 11 - run_command runs in parallel with as many jobs as tasks
expecting success:
test-tool run-command run-command-parallel 3 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
test_cmp expect actual
ok 12 - run_command runs in parallel with more tasks than jobs available
expecting success:
test-tool run-command run-command-abort 3 false 2>actual &&
test_cmp expect actual
ok 13 - run_command is asked to abort gracefully
expecting success:
test-tool run-command run-command-no-jobs 3 sh -c "printf \"%s\n%s\n\" Hello World" 2>actual &&
test_cmp expect actual
ok 14 - run_command outputs
expecting success:
test_trace "abc=1 def=2" env abc=1 env def=2 &&
test_trace "abc=2" env abc env abc=1 env abc=2 &&
test_trace "abc=2" env abc env abc=2 &&
(
abc=1 && export abc &&
test_trace "def=1" env abc=1 env def=1
) &&
(
abc=1 && export abc &&
test_trace "def=1" env abc env abc=1 env def=1
) &&
test_trace "def=1" env non-exist env def=1 &&
test_trace "abc=2" env abc=1 env abc env abc=2 &&
(
abc=1 def=2 && export abc def &&
test_trace "unset abc def;" env abc env def
) &&
(
abc=1 def=2 && export abc def &&
test_trace "unset def; abc=3" env abc env def env abc=3
) &&
(
abc=1 && export abc &&
test_trace "unset abc;" env abc=2 env abc
)
ok 15 - GIT_TRACE with environment variables
skipping test: verify curlies are quoted properly
: force the rev-parse through the MSYS2 Bash &&
git -c alias.r="!git rev-parse" r -- a{b}c >actual &&
cat >expect <<-\EOF &&
--
a{b}c
EOF
test_cmp expect actual
ok 16 # skip verify curlies are quoted properly (missing MINGW)
skipping test: can spawn with argv[0] containing spaces
cp "$GIT_BUILD_DIR/t/helper/test-fake-ssh$X" ./ &&
test_must_fail "$PWD/test-fake-ssh$X" 2>err &&
grep TRASH_DIRECTORY err
ok 17 # skip can spawn with argv[0] containing spaces (missing MINGW)
# passed all 17 test(s)
1..17
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0062-revision-walking.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0062-revision-walking/.git/
expecting success:
echo a > a &&
git add a &&
git commit -m "add a" &&
echo b > b &&
git add b &&
git commit -m "add b"
[master (root-commit) ad59d45] add a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
[master 002579a] add b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b
ok 1 - setup
expecting success:
test-tool revision-walking run-twice >run_twice_actual &&
test_cmp run_twice_expected run_twice_actual
ok 2 - revision walking can be done twice
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0063-string-list.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0063-string-list/.git/
expecting success:
test-tool string-list split 'foo:bar:baz' ':' '-1' >actual &&
test_cmp expected actual &&
test-tool string-list split_in_place 'foo:bar:baz' ':' '-1' >actual &&
test_cmp expected actual
ok 1 - split foo:bar:baz at :, max -1
expecting success:
test-tool string-list split 'foo:bar:baz' ':' '0' >actual &&
test_cmp expected actual &&
test-tool string-list split_in_place 'foo:bar:baz' ':' '0' >actual &&
test_cmp expected actual
ok 2 - split foo:bar:baz at :, max 0
expecting success:
test-tool string-list split 'foo:bar:baz' ':' '1' >actual &&
test_cmp expected actual &&
test-tool string-list split_in_place 'foo:bar:baz' ':' '1' >actual &&
test_cmp expected actual
ok 3 - split foo:bar:baz at :, max 1
expecting success:
test-tool string-list split 'foo:bar:baz' ':' '2' >actual &&
test_cmp expected actual &&
test-tool string-list split_in_place 'foo:bar:baz' ':' '2' >actual &&
test_cmp expected actual
ok 4 - split foo:bar:baz at :, max 2
expecting success:
test-tool string-list split 'foo:bar:' ':' '-1' >actual &&
test_cmp expected actual &&
test-tool string-list split_in_place 'foo:bar:' ':' '-1' >actual &&
test_cmp expected actual
ok 5 - split foo:bar: at :, max -1
expecting success:
test-tool string-list split '' ':' '-1' >actual &&
test_cmp expected actual &&
test-tool string-list split_in_place '' ':' '-1' >actual &&
test_cmp expected actual
ok 6 - split at :, max -1
expecting success:
test-tool string-list split ':' ':' '-1' >actual &&
test_cmp expected actual &&
test-tool string-list split_in_place ':' ':' '-1' >actual &&
test_cmp expected actual
ok 7 - split : at :, max -1
expecting success:
test "x-" = "x$(test-tool string-list filter - y)" &&
test "x-" = "x$(test-tool string-list filter no y)" &&
test yes = "$(test-tool string-list filter yes y)" &&
test yes = "$(test-tool string-list filter no:yes y)" &&
test yes = "$(test-tool string-list filter yes:no y)" &&
test y1:y2 = "$(test-tool string-list filter y1:y2 y)" &&
test y2:y1 = "$(test-tool string-list filter y2:y1 y)" &&
test "x-" = "x$(test-tool string-list filter x1:x2 y)"
ok 8 - test filter_string_list
expecting success:
test "x-" = "x$(test-tool string-list remove_duplicates -)" &&
test "x" = "x$(test-tool string-list remove_duplicates "")" &&
test a = "$(test-tool string-list remove_duplicates a)" &&
test a = "$(test-tool string-list remove_duplicates a:a)" &&
test a = "$(test-tool string-list remove_duplicates a:a:a:a:a)" &&
test a:b = "$(test-tool string-list remove_duplicates a:b)" &&
test a:b = "$(test-tool string-list remove_duplicates a:a:b)" &&
test a:b = "$(test-tool string-list remove_duplicates a:b:b)" &&
test a:b:c = "$(test-tool string-list remove_duplicates a:b:c)" &&
test a:b:c = "$(test-tool string-list remove_duplicates a:a:b:c)" &&
test a:b:c = "$(test-tool string-list remove_duplicates a:b:b:c)" &&
test a:b:c = "$(test-tool string-list remove_duplicates a:b:c:c)" &&
test a:b:c = "$(test-tool string-list remove_duplicates a:a:b:b:c:c)" &&
test a:b:c = "$(test-tool string-list remove_duplicates a:a:a:b:b:b:c:c:c)"
ok 9 - test remove_duplicates
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0064-sha1-array.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0064-sha1-array/.git/
expecting success:
echoid "" 44 55 88 aa >expect &&
{
echoid append 88 44 aa 55 &&
echo for_each_unique
} | test-tool sha1-array >actual &&
test_cmp expect actual
ok 1 - ordered enumeration
expecting success:
echoid "" 44 55 88 aa >expect &&
{
echoid append 88 44 aa 55 &&
echoid append 88 44 aa 55 &&
echo for_each_unique
} | test-tool sha1-array >actual &&
test_cmp expect actual
ok 2 - ordered enumeration with duplicate suppression
expecting success:
{
echoid append 88 44 aa 55 &&
echoid lookup 55
} | test-tool sha1-array >actual &&
n=$(cat actual) &&
test "$n" -eq 1
ok 3 - lookup
expecting success:
{
echoid append 88 44 aa 55 &&
echoid lookup 33
} | test-tool sha1-array >actual &&
n=$(cat actual) &&
test "$n" -lt 0
ok 4 - lookup non-existing entry
expecting success:
{
echoid append 88 44 aa 55 &&
echoid append 88 44 aa 55 &&
echoid lookup 55
} | test-tool sha1-array >actual &&
n=$(cat actual) &&
test "$n" -ge 2 &&
test "$n" -le 3
ok 5 - lookup with duplicates
expecting success:
{
echoid append 88 44 aa 55 &&
echoid append 88 44 aa 55 &&
echoid lookup 66
} | test-tool sha1-array >actual &&
n=$(cat actual) &&
test "$n" -lt 0
ok 6 - lookup non-existing entry with duplicates
expecting success:
# n-1 5s
root=$(echoid "" 55) &&
root=${root%5} &&
{
id1="${root}5" &&
id2="${root}f" &&
echo "append $id1" &&
echo "append $id2" &&
echoid lookup 55
} | test-tool sha1-array >actual &&
n=$(cat actual) &&
test "$n" -eq 0
ok 7 - lookup with almost duplicate values
expecting success:
{
echoid append 55 55 &&
echoid lookup 55
} | test-tool sha1-array >actual &&
n=$(cat actual) &&
test "$n" -ge 0 &&
test "$n" -le 1
ok 8 - lookup with single duplicate value
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0065-strcmp-offset.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0065-strcmp-offset/.git/
expecting success:
echo "$expect" >expect &&
test-tool strcmp-offset "$s1" "$s2" >actual &&
test_cmp expect actual
ok 1 - strcmp_offset(abc, abc)
expecting success:
echo "$expect" >expect &&
test-tool strcmp-offset "$s1" "$s2" >actual &&
test_cmp expect actual
ok 2 - strcmp_offset(abc, def)
expecting success:
echo "$expect" >expect &&
test-tool strcmp-offset "$s1" "$s2" >actual &&
test_cmp expect actual
ok 3 - strcmp_offset(abc, abz)
expecting success:
echo "$expect" >expect &&
test-tool strcmp-offset "$s1" "$s2" >actual &&
test_cmp expect actual
ok 4 - strcmp_offset(abc, abcdef)
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0066-dir-iterator.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0066-dir-iterator/.git/
expecting success:
mkdir -p dir &&
mkdir -p dir/a/b/c/ &&
>dir/b &&
>dir/c &&
mkdir -p dir/d/e/d/ &&
>dir/a/b/c/d &&
>dir/a/e &&
>dir/d/e/d/a &&
mkdir -p dir2/a/b/c/ &&
>dir2/a/b/c/d
ok 1 - setup
expecting success:
cat >expected-iteration-sorted-output <<-EOF &&
[d] (a) [a] ./dir/a
[d] (a/b) [b] ./dir/a/b
[d] (a/b/c) [c] ./dir/a/b/c
[d] (d) [d] ./dir/d
[d] (d/e) [e] ./dir/d/e
[d] (d/e/d) [d] ./dir/d/e/d
[f] (a/b/c/d) [d] ./dir/a/b/c/d
[f] (a/e) [e] ./dir/a/e
[f] (b) [b] ./dir/b
[f] (c) [c] ./dir/c
[f] (d/e/d/a) [a] ./dir/d/e/d/a
EOF
test-tool dir-iterator ./dir >out &&
sort out >./actual-iteration-sorted-output &&
test_cmp expected-iteration-sorted-output actual-iteration-sorted-output
ok 2 - dir-iterator should iterate through all files
expecting success:
cat >expected-pre-order-output <<-EOF &&
[d] (a) [a] ./dir2/a
[d] (a/b) [b] ./dir2/a/b
[d] (a/b/c) [c] ./dir2/a/b/c
[f] (a/b/c/d) [d] ./dir2/a/b/c/d
EOF
test-tool dir-iterator ./dir2 >actual-pre-order-output &&
test_cmp expected-pre-order-output actual-pre-order-output
ok 3 - dir-iterator should list files in the correct order
expecting success:
test_must_fail test-tool dir-iterator ./inexistent-path \
>actual-inexistent-path-output &&
echo "dir_iterator_begin failure: ENOENT" >expected-inexistent-path-output &&
test_cmp expected-inexistent-path-output actual-inexistent-path-output
ok 4 - begin should fail upon inexistent paths
expecting success:
test_must_fail test-tool dir-iterator ./dir/b >actual-non-dir-output &&
echo "dir_iterator_begin failure: ENOTDIR" >expected-non-dir-output &&
test_cmp expected-non-dir-output actual-non-dir-output
ok 5 - begin should fail upon non directory paths
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 -r SANETESTD.1/x &&
chmod -rx SANETESTD.2 ||
BUG "cannot prepare SANETESTD"
! test -r SANETESTD.1/x &&
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
BUG "cannot clean SANETESTD"
return $status
)
rm: cannot remove 'SANETESTD.1/x': Permission denied
prerequisite SANITY ok
expecting success:
cat >expected-no-permissions-output <<-EOF &&
[d] (a) [a] ./dir3/a
EOF
mkdir -p dir3/a &&
>dir3/a/b &&
chmod 0 dir3/a &&
test-tool dir-iterator ./dir3 >actual-no-permissions-output &&
test_cmp expected-no-permissions-output actual-no-permissions-output &&
chmod 755 dir3/a &&
rm -rf dir3
warning: error opening directory './dir3/a/': Permission denied
ok 6 - advance should not fail on errors by default
expecting success:
cat >expected-no-permissions-pedantic-output <<-EOF &&
[d] (a) [a] ./dir3/a
dir_iterator_advance failure
EOF
mkdir -p dir3/a &&
>dir3/a/b &&
chmod 0 dir3/a &&
test_must_fail test-tool dir-iterator --pedantic ./dir3 \
>actual-no-permissions-pedantic-output &&
test_cmp expected-no-permissions-pedantic-output \
actual-no-permissions-pedantic-output &&
chmod 755 dir3/a &&
rm -rf dir3
warning: error opening directory './dir3/a/': Permission denied
ok 7 - advance should fail on errors, w/ pedantic flag
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:
mkdir -p dir4/a &&
mkdir -p dir4/b/c &&
>dir4/a/d &&
ln -s d dir4/a/e &&
ln -s ../b dir4/a/f &&
mkdir -p dir5/a/b &&
mkdir -p dir5/a/c &&
ln -s ../c dir5/a/b/d &&
ln -s ../ dir5/a/b/e &&
ln -s ../../ dir5/a/b/f
ok 8 - setup dirs with symlinks
expecting success:
cat >expected-no-follow-sorted-output <<-EOF &&
[d] (a) [a] ./dir4/a
[d] (b) [b] ./dir4/b
[d] (b/c) [c] ./dir4/b/c
[f] (a/d) [d] ./dir4/a/d
[s] (a/e) [e] ./dir4/a/e
[s] (a/f) [f] ./dir4/a/f
EOF
test-tool dir-iterator ./dir4 >out &&
sort out >actual-no-follow-sorted-output &&
test_cmp expected-no-follow-sorted-output actual-no-follow-sorted-output
ok 9 - dir-iterator should not follow symlinks by default
expecting success:
cat >expected-follow-sorted-output <<-EOF &&
[d] (a) [a] ./dir4/a
[d] (a/f) [f] ./dir4/a/f
[d] (a/f/c) [c] ./dir4/a/f/c
[d] (b) [b] ./dir4/b
[d] (b/c) [c] ./dir4/b/c
[f] (a/d) [d] ./dir4/a/d
[f] (a/e) [e] ./dir4/a/e
EOF
test-tool dir-iterator --follow-symlinks ./dir4 >out &&
sort out >actual-follow-sorted-output &&
test_cmp expected-follow-sorted-output actual-follow-sorted-output
ok 10 - dir-iterator should follow symlinks w/ follow flag
# passed all 10 test(s)
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0070-fundamental.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0070-fundamental/.git/
expecting success:
test-tool ctype
ok 1 - character classes (isspace, isalpha etc.)
expecting success:
test_must_fail test-tool mktemp doesnotexist/testXXXXXX 2>err &&
grep "doesnotexist/test" err
fatal: Unable to create temporary file '/<<PKGBUILDDIR>>/t/trash directory.t0070-fundamental/doesnotexist/testXezJnY': No such file or directory
ok 2 - mktemp to nonexistent directory prints filename
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 -r SANETESTD.1/x &&
chmod -rx SANETESTD.2 ||
BUG "cannot prepare SANETESTD"
! test -r SANETESTD.1/x &&
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
BUG "cannot clean SANETESTD"
return $status
)
rm: cannot remove 'SANETESTD.1/x': Permission denied
prerequisite SANITY ok
expecting success:
mkdir cannotwrite &&
test_when_finished "chmod +w cannotwrite" &&
chmod -w cannotwrite &&
test_must_fail test-tool mktemp cannotwrite/testXXXXXX 2>err &&
grep "cannotwrite/test" err
fatal: Unable to create temporary file '/<<PKGBUILDDIR>>/t/trash directory.t0070-fundamental/cannotwrite/testiq3YE7': Permission denied
ok 3 - mktemp to unwritable directory prints filename
expecting success:
git commit --allow-empty -m message <&-
[master (root-commit) de54872] 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-tool regex --bug
ok 5 - check for a bug in the regex routines
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0081-line-buffer.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0081-line-buffer/.git/
expecting success:
echo ">HELLO" >expect &&
test-line-buffer <<-\EOF >actual &&
binary 6
HELLO
EOF
test_cmp expect actual
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 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 3 - read from file descriptor
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
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
ok 5 - read null byte
expecting success:
echo ">foo" >expect &&
test-line-buffer <<-\EOF >actual &&
binary 5
foo
EOF
test_cmp expect actual
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 7 - long copies are truncated
expecting success:
echo ">foo" >expect &&
test-line-buffer <<-\EOF >actual &&
binary 5
foo
EOF
test_cmp expect actual
ok 8 - long binary reads are truncated
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0060-path-utils.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/.git/
expecting success: test-tool path-utils basename
ok 1 - basename
expecting success: test-tool path-utils dirname
ok 2 - dirname
expecting success: test "$(test-tool path-utils normalize_path_copy '')" = ''
ok 3 - normalize path: =>
expecting success: test "$(test-tool path-utils normalize_path_copy '.')" = ''
ok 4 - normalize path: . =>
expecting success: test "$(test-tool path-utils normalize_path_copy './')" = ''
ok 5 - normalize path: ./ =>
expecting success: test "$(test-tool path-utils normalize_path_copy './.')" = ''
ok 6 - normalize path: ./. =>
expecting success: test "$(test-tool path-utils normalize_path_copy './..')" = '++failed++'
ok 7 - normalize path: ./.. => ++failed++
expecting success: test "$(test-tool path-utils normalize_path_copy '../.')" = '++failed++'
ok 8 - normalize path: ../. => ++failed++
expecting success: test "$(test-tool path-utils normalize_path_copy './.././/')" = '++failed++'
ok 9 - normalize path: ./../.// => ++failed++
expecting success: test "$(test-tool path-utils normalize_path_copy 'dir/..')" = ''
ok 10 - normalize path: dir/.. =>
expecting success: test "$(test-tool path-utils normalize_path_copy 'dir/sub/../..')" = ''
ok 11 - normalize path: dir/sub/../.. =>
expecting success: test "$(test-tool path-utils normalize_path_copy 'dir/sub/../../..')" = '++failed++'
ok 12 - normalize path: dir/sub/../../.. => ++failed++
expecting success: test "$(test-tool path-utils normalize_path_copy 'dir')" = 'dir'
ok 13 - normalize path: dir => dir
expecting success: test "$(test-tool path-utils normalize_path_copy 'dir//')" = 'dir/'
ok 14 - normalize path: dir// => dir/
expecting success: test "$(test-tool path-utils normalize_path_copy './dir')" = 'dir'
ok 15 - normalize path: ./dir => dir
expecting success: test "$(test-tool path-utils normalize_path_copy 'dir/.')" = 'dir/'
ok 16 - normalize path: dir/. => dir/
expecting success: test "$(test-tool path-utils normalize_path_copy 'dir///./')" = 'dir/'
ok 17 - normalize path: dir///./ => dir/
expecting success: test "$(test-tool path-utils normalize_path_copy 'dir//sub/..')" = 'dir/'
ok 18 - normalize path: dir//sub/.. => dir/
expecting success: test "$(test-tool path-utils normalize_path_copy 'dir/sub/../')" = 'dir/'
ok 19 - normalize path: dir/sub/../ => dir/
expecting success: test "$(test-tool path-utils normalize_path_copy 'dir/sub/../.')" = 'dir/'
ok 20 - normalize path: dir/sub/../. => dir/
expecting success: test "$(test-tool path-utils normalize_path_copy 'dir/s1/../s2/')" = 'dir/s2/'
ok 21 - normalize path: dir/s1/../s2/ => dir/s2/
expecting success: test "$(test-tool path-utils normalize_path_copy 'd1/s1///s2/..//../s3/')" = 'd1/s3/'
ok 22 - normalize path: d1/s1///s2/..//../s3/ => d1/s3/
expecting success: test "$(test-tool path-utils normalize_path_copy 'd1/s1//../s2/../../d2')" = 'd2'
ok 23 - normalize path: d1/s1//../s2/../../d2 => d2
expecting success: test "$(test-tool path-utils normalize_path_copy 'd1/.../d2')" = 'd1/.../d2'
ok 24 - normalize path: d1/.../d2 => d1/.../d2
expecting success: test "$(test-tool path-utils normalize_path_copy 'd1/..././../d2')" = 'd1/d2'
ok 25 - normalize path: d1/..././../d2 => d1/d2
expecting success: test "$(test-tool path-utils normalize_path_copy '/')" = '/'
ok 26 - normalize path: / => /
expecting success: test "$(test-tool path-utils normalize_path_copy '//')" = '/'
ok 27 - normalize path: // => /
expecting success: test "$(test-tool path-utils normalize_path_copy '///')" = '/'
ok 28 - normalize path: /// => /
expecting success: test "$(test-tool path-utils normalize_path_copy '/.')" = '/'
ok 29 - normalize path: /. => /
expecting success: test "$(test-tool path-utils normalize_path_copy '/./')" = '/'
ok 30 - normalize path: /./ => /
expecting success: test "$(test-tool path-utils normalize_path_copy '/./..')" = '++failed++'
ok 31 - normalize path: /./.. => ++failed++
expecting success: test "$(test-tool path-utils normalize_path_copy '/../.')" = '++failed++'
ok 32 - normalize path: /../. => ++failed++
expecting success: test "$(test-tool path-utils normalize_path_copy '/./.././/')" = '++failed++'
ok 33 - normalize path: /./../.// => ++failed++
expecting success: test "$(test-tool path-utils normalize_path_copy '/dir/..')" = '/'
ok 34 - normalize path: /dir/.. => /
expecting success: test "$(test-tool path-utils normalize_path_copy '/dir/sub/../..')" = '/'
ok 35 - normalize path: /dir/sub/../.. => /
expecting success: test "$(test-tool path-utils normalize_path_copy '/dir/sub/../../..')" = '++failed++'
ok 36 - normalize path: /dir/sub/../../.. => ++failed++
expecting success: test "$(test-tool path-utils normalize_path_copy '/dir')" = '/dir'
ok 37 - normalize path: /dir => /dir
expecting success: test "$(test-tool path-utils normalize_path_copy '/dir//')" = '/dir/'
ok 38 - normalize path: /dir// => /dir/
expecting success: test "$(test-tool path-utils normalize_path_copy '/./dir')" = '/dir'
ok 39 - normalize path: /./dir => /dir
expecting success: test "$(test-tool path-utils normalize_path_copy '/dir/.')" = '/dir/'
ok 40 - normalize path: /dir/. => /dir/
expecting success: test "$(test-tool path-utils normalize_path_copy '/dir///./')" = '/dir/'
ok 41 - normalize path: /dir///./ => /dir/
expecting success: test "$(test-tool path-utils normalize_path_copy '/dir//sub/..')" = '/dir/'
ok 42 - normalize path: /dir//sub/.. => /dir/
expecting success: test "$(test-tool path-utils normalize_path_copy '/dir/sub/../')" = '/dir/'
ok 43 - normalize path: /dir/sub/../ => /dir/
expecting success: test "$(test-tool path-utils normalize_path_copy '//dir/sub/../.')" = '/dir/'
ok 44 - normalize path: //dir/sub/../. => /dir/
expecting success: test "$(test-tool path-utils normalize_path_copy '/dir/s1/../s2/')" = '/dir/s2/'
ok 45 - normalize path: /dir/s1/../s2/ => /dir/s2/
expecting success: test "$(test-tool path-utils normalize_path_copy '/d1/s1///s2/..//../s3/')" = '/d1/s3/'
ok 46 - normalize path: /d1/s1///s2/..//../s3/ => /d1/s3/
expecting success: test "$(test-tool path-utils normalize_path_copy '/d1/s1//../s2/../../d2')" = '/d2'
ok 47 - normalize path: /d1/s1//../s2/../../d2 => /d2
expecting success: test "$(test-tool path-utils normalize_path_copy '/d1/.../d2')" = '/d1/.../d2'
ok 48 - normalize path: /d1/.../d2 => /d1/.../d2
expecting success: test "$(test-tool path-utils normalize_path_copy '/d1/..././../d2')" = '/d1/d2'
ok 49 - normalize path: /d1/..././../d2 => /d1/d2
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/' '/') &&
test "$actual" = '-1'
ok 50 - longest ancestor: / / => -1
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo' '/') &&
test "$actual" = '0'
ok 51 - longest ancestor: /foo / => 0
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo' '/fo') &&
test "$actual" = '-1'
ok 52 - longest ancestor: /foo /fo => -1
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo' '/foo') &&
test "$actual" = '-1'
ok 53 - longest ancestor: /foo /foo => -1
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo' '/bar') &&
test "$actual" = '-1'
ok 54 - longest ancestor: /foo /bar => -1
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo' '/foo/bar') &&
test "$actual" = '-1'
ok 55 - longest ancestor: /foo /foo/bar => -1
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo' '/foo:/bar') &&
test "$actual" = '-1'
ok 56 - longest ancestor: /foo /foo:/bar => -1
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo' '/:/foo:/bar') &&
test "$actual" = '0'
ok 57 - longest ancestor: /foo /:/foo:/bar => 0
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo' '/foo:/:/bar') &&
test "$actual" = '0'
ok 58 - longest ancestor: /foo /foo:/:/bar => 0
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo' '/:/bar:/foo') &&
test "$actual" = '0'
ok 59 - longest ancestor: /foo /:/bar:/foo => 0
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo/bar' '/') &&
test "$actual" = '0'
ok 60 - longest ancestor: /foo/bar / => 0
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo/bar' '/fo') &&
test "$actual" = '-1'
ok 61 - longest ancestor: /foo/bar /fo => -1
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo/bar' '/foo') &&
test "$actual" = '4'
ok 62 - longest ancestor: /foo/bar /foo => 4
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo/bar' '/foo/ba') &&
test "$actual" = '-1'
ok 63 - longest ancestor: /foo/bar /foo/ba => -1
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo/bar' '/:/fo') &&
test "$actual" = '0'
ok 64 - longest ancestor: /foo/bar /:/fo => 0
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo/bar' '/foo:/foo/ba') &&
test "$actual" = '4'
ok 65 - longest ancestor: /foo/bar /foo:/foo/ba => 4
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo/bar' '/bar') &&
test "$actual" = '-1'
ok 66 - longest ancestor: /foo/bar /bar => -1
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo/bar' '/fo') &&
test "$actual" = '-1'
ok 67 - longest ancestor: /foo/bar /fo => -1
expecting success: actual=$(test-tool 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-tool path-utils longest_ancestor_length '/foo/bar' '/:/foo:/bar') &&
test "$actual" = '4'
ok 69 - longest ancestor: /foo/bar /:/foo:/bar => 4
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo/bar' '/foo:/:/bar') &&
test "$actual" = '4'
ok 70 - longest ancestor: /foo/bar /foo:/:/bar => 4
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo/bar' '/:/bar:/fo') &&
test "$actual" = '0'
ok 71 - longest ancestor: /foo/bar /:/bar:/fo => 0
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo/bar' '/:/bar') &&
test "$actual" = '0'
ok 72 - longest ancestor: /foo/bar /:/bar => 0
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo/bar' '/foo') &&
test "$actual" = '4'
ok 73 - longest ancestor: /foo/bar /foo => 4
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo/bar' '/foo:/bar') &&
test "$actual" = '4'
ok 74 - longest ancestor: /foo/bar /foo:/bar => 4
expecting success: actual=$(test-tool path-utils longest_ancestor_length '/foo/bar' '/bar') &&
test "$actual" = '-1'
ok 75 - longest ancestor: /foo/bar /bar => -1
expecting success:
test c:/msysgit = $(test-tool path-utils strip_path_suffix \
c:/msysgit/libexec//git-core libexec/git-core)
ok 76 - strip_path_suffix
expecting success:
test_must_fail test-tool path-utils absolute_path ""
fatal: The empty string is not a valid path
ok 77 - absolute path rejects the empty string
expecting success:
test_must_fail test-tool path-utils real_path ""
fatal: The empty string is not a valid path
ok 78 - real path rejects the empty string
expecting success:
nopath="hopefully-absent-path" &&
test "/" = "$(test-tool path-utils real_path "/")" &&
test "/$nopath" = "$(test-tool path-utils real_path "/$nopath")"
ok 79 - 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-tool path-utils real_path "$d")" &&
test "$d/$nopath" = "$(test-tool path-utils real_path "$d/$nopath")"
ok 80 - real path works on absolute paths 2
expecting success:
nopath="hopefully-absent-path" &&
test "/" = "$(test-tool path-utils real_path "///")" &&
test "/$nopath" = "$(test-tool 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-tool path-utils real_path "//$d")" &&
test "$d/$nopath" = "$(test-tool path-utils real_path "//$d/$nopath")"
ok 81 - 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-tool path-utils real_path "$d///")" &&
test "$d/$nopath" = "$(test-tool path-utils real_path "$d///$nopath")"
ok 82 - 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
)
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-tool path-utils real_path $dir2)" &&
file="$dir"/index &&
test "$file" = "$(test-tool path-utils real_path $dir2/index)" &&
basename=blub &&
test "$dir/$basename" = "$(cd .git && test-tool path-utils real_path "$basename")" &&
ln -s ../first/file .git/syml &&
sym="$(cd first; pwd -P)"/file &&
test "$sym" = "$(test-tool path-utils real_path "$dir2/syml")"
ok 83 - real path works on symlinks
expecting success:
ln -s target symlink &&
test "$(test-tool path-utils prefix_path prefix "$(pwd)/symlink")" = "symlink"
ok 84 - prefix_path works with absolute paths to work tree symlinks
expecting success:
echo "" >expected &&
test-tool path-utils prefix_path prefix "$(pwd)" >actual &&
test_cmp expected actual
ok 85 - prefix_path works with only absolute path to work tree
expecting success:
test_must_fail test-tool path-utils prefix_path prefix "$(pwd)a"
fatal: '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utilsa' is outside repository
ok 86 - prefix_path rejects absolute path to dir with same beginning as work tree
expecting success:
git init repo &&
ln -s repo repolink &&
test "a" = "$(cd repo && test-tool path-utils prefix_path prefix "$(pwd)/../repolink/a")"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/repo/.git/
ok 87 - prefix_path works with absolute path to a symlink to work tree having same beginning as work tree
expecting success: test "$(test-tool 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-tool path-utils relative_path '/foo/a/b/c/' '/foo/a/b')" = 'c/'
ok 89 - relative path: /foo/a/b/c/ /foo/a/b => c/
expecting success: test "$(test-tool path-utils relative_path '/foo/a//b//c/' '///foo/a/b//')" = 'c/'
ok 90 - relative path: /foo/a//b//c/ ///foo/a/b// => c/
expecting success: test "$(test-tool path-utils relative_path '/foo/a/b' '/foo/a/b')" = './'
ok 91 - relative path: /foo/a/b /foo/a/b => ./
expecting success: test "$(test-tool path-utils relative_path '/foo/a/b/' '/foo/a/b')" = './'
ok 92 - relative path: /foo/a/b/ /foo/a/b => ./
expecting success: test "$(test-tool path-utils relative_path '/foo/a' '/foo/a/b')" = '../'
ok 93 - relative path: /foo/a /foo/a/b => ../
expecting success: test "$(test-tool path-utils relative_path '/' '/foo/a/b/')" = '../../../'
ok 94 - relative path: / /foo/a/b/ => ../../../
expecting success: test "$(test-tool path-utils relative_path '/foo/a/c' '/foo/a/b/')" = '../c'
ok 95 - relative path: /foo/a/c /foo/a/b/ => ../c
expecting success: test "$(test-tool path-utils relative_path '/foo/a/c' '/foo/a/b')" = '../c'
ok 96 - relative path: /foo/a/c /foo/a/b => ../c
expecting success: test "$(test-tool path-utils relative_path '/foo/x/y' '/foo/a/b/')" = '../../x/y'
ok 97 - relative path: /foo/x/y /foo/a/b/ => ../../x/y
expecting success: test "$(test-tool path-utils relative_path '/foo/a/b' '<empty>')" = '/foo/a/b'
ok 98 - relative path: /foo/a/b <empty> => /foo/a/b
expecting success: test "$(test-tool path-utils relative_path '/foo/a/b' '<null>')" = '/foo/a/b'
ok 99 - relative path: /foo/a/b <null> => /foo/a/b
expecting success: test "$(test-tool path-utils relative_path 'foo/a/b/c/' 'foo/a/b/')" = 'c/'
ok 100 - relative path: foo/a/b/c/ foo/a/b/ => c/
expecting success: test "$(test-tool path-utils relative_path 'foo/a/b/c/' 'foo/a/b')" = 'c/'
ok 101 - relative path: foo/a/b/c/ foo/a/b => c/
expecting success: test "$(test-tool path-utils relative_path 'foo/a/b//c' 'foo/a//b')" = 'c'
ok 102 - relative path: foo/a/b//c foo/a//b => c
expecting success: test "$(test-tool path-utils relative_path 'foo/a/b/' 'foo/a/b/')" = './'
ok 103 - relative path: foo/a/b/ foo/a/b/ => ./
expecting success: test "$(test-tool path-utils relative_path 'foo/a/b/' 'foo/a/b')" = './'
ok 104 - relative path: foo/a/b/ foo/a/b => ./
expecting success: test "$(test-tool path-utils relative_path 'foo/a' 'foo/a/b')" = '../'
ok 105 - relative path: foo/a foo/a/b => ../
expecting success: test "$(test-tool path-utils relative_path 'foo/x/y' 'foo/a/b')" = '../../x/y'
ok 106 - relative path: foo/x/y foo/a/b => ../../x/y
expecting success: test "$(test-tool path-utils relative_path 'foo/a/c' 'foo/a/b')" = '../c'
ok 107 - relative path: foo/a/c foo/a/b => ../c
expecting success: test "$(test-tool path-utils relative_path 'foo/a/b' '/foo/x/y')" = 'foo/a/b'
ok 108 - relative path: foo/a/b /foo/x/y => foo/a/b
expecting success: test "$(test-tool path-utils relative_path '/foo/a/b' 'foo/x/y')" = '/foo/a/b'
ok 109 - relative path: /foo/a/b foo/x/y => /foo/a/b
skipping test: relative path: d:/a/b D:/a/c => ../b test "$(test-tool path-utils relative_path 'd:/a/b' 'D:/a/c')" = '../b'
ok 110 # skip relative path: d:/a/b D:/a/c => ../b (missing MINGW)
skipping test: relative path: C:/a/b D:/a/c => C:/a/b test "$(test-tool path-utils relative_path 'C:/a/b' 'D:/a/c')" = 'C:/a/b'
ok 111 # skip relative path: C:/a/b D:/a/c => C:/a/b (missing MINGW)
expecting success: test "$(test-tool path-utils relative_path 'foo/a/b' '<empty>')" = 'foo/a/b'
ok 112 - relative path: foo/a/b <empty> => foo/a/b
expecting success: test "$(test-tool path-utils relative_path 'foo/a/b' '<null>')" = 'foo/a/b'
ok 113 - relative path: foo/a/b <null> => foo/a/b
expecting success: test "$(test-tool path-utils relative_path '<empty>' '/foo/a/b')" = './'
ok 114 - relative path: <empty> /foo/a/b => ./
expecting success: test "$(test-tool path-utils relative_path '<empty>' '<empty>')" = './'
ok 115 - relative path: <empty> <empty> => ./
expecting success: test "$(test-tool path-utils relative_path '<empty>' '<null>')" = './'
ok 116 - relative path: <empty> <null> => ./
expecting success: test "$(test-tool path-utils relative_path '<null>' '<empty>')" = './'
ok 117 - relative path: <null> <empty> => ./
expecting success: test "$(test-tool path-utils relative_path '<null>' '<null>')" = './'
ok 118 - relative path: <null> <null> => ./
expecting success: test "$(test-tool path-utils relative_path '<null>' '/foo/a/b')" = './'
ok 119 - 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 120 - 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 121 - 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 122 - 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
ok 123 - 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 124 - 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 125 - git-path GIT_INDEX_FILE=foo index2 => .git/index2
expecting success: mkdir foo
ok 126 - 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 127 - 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 128 - 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 129 - git-path GIT_OBJECT_DIRECTORY=foo objects2 => .git/objects2
expecting success: git --git-dir=bar init
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/bar/
ok 130 - setup common repository
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path index >actual &&
echo .git/index >expect &&
test_cmp expect actual
ok 131 - 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 132 - 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 133 - git-path GIT_COMMON_DIR=bar logs/HEAD => .git/logs/HEAD
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path logs/refs/bisect/foo >actual &&
echo .git/logs/refs/bisect/foo >expect &&
test_cmp expect actual
ok 134 - git-path GIT_COMMON_DIR=bar logs/refs/bisect/foo => .git/logs/refs/bisect/foo
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path logs/refs/bisec/foo >actual &&
echo bar/logs/refs/bisec/foo >expect &&
test_cmp expect actual
ok 135 - git-path GIT_COMMON_DIR=bar logs/refs/bisec/foo => bar/logs/refs/bisec/foo
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path logs/refs/bisec >actual &&
echo bar/logs/refs/bisec >expect &&
test_cmp expect actual
ok 136 - git-path GIT_COMMON_DIR=bar logs/refs/bisec => bar/logs/refs/bisec
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path logs/refs/bisectfoo >actual &&
echo bar/logs/refs/bisectfoo >expect &&
test_cmp expect actual
ok 137 - git-path GIT_COMMON_DIR=bar logs/refs/bisectfoo => bar/logs/refs/bisectfoo
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path objects >actual &&
echo bar/objects >expect &&
test_cmp expect actual
ok 138 - git-path GIT_COMMON_DIR=bar objects => bar/objects
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path objects/bar >actual &&
echo bar/objects/bar >expect &&
test_cmp expect actual
ok 139 - 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 140 - 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 141 - 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
ok 142 - git-path GIT_COMMON_DIR=bar info/sparse-checkout => .git/info/sparse-checkout
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
ok 143 - 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
ok 144 - 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 145 - 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 146 - 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
ok 147 - git-path GIT_COMMON_DIR=bar refs/heads/master => bar/refs/heads/master
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path refs/bisect/foo >actual &&
echo .git/refs/bisect/foo >expect &&
test_cmp expect actual
ok 148 - git-path GIT_COMMON_DIR=bar refs/bisect/foo => .git/refs/bisect/foo
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path hooks/me >actual &&
echo bar/hooks/me >expect &&
test_cmp expect actual
ok 149 - 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 150 - 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 151 - 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 152 - git-path GIT_COMMON_DIR=bar shallow => bar/shallow
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path common >actual &&
echo bar/common >expect &&
test_cmp expect actual
ok 153 - git-path GIT_COMMON_DIR=bar common => bar/common
expecting success:
GIT_COMMON_DIR=bar git rev-parse --git-path common/file >actual &&
echo bar/common/file >expect &&
test_cmp expect actual
ok 154 - git-path GIT_COMMON_DIR=bar common/file => bar/common/file
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '../' '../foo' '../submodule') &&
test "$actual" = '../../submodule'
ok 155 - test_submodule_relative_url: ../ ../foo ../submodule => ../../submodule
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '../' '../foo/bar' '../submodule') &&
test "$actual" = '../../foo/submodule'
ok 156 - test_submodule_relative_url: ../ ../foo/bar ../submodule => ../../foo/submodule
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '../' '../foo/submodule' '../submodule') &&
test "$actual" = '../../foo/submodule'
ok 157 - test_submodule_relative_url: ../ ../foo/submodule ../submodule => ../../foo/submodule
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '../' './foo' '../submodule') &&
test "$actual" = '../submodule'
ok 158 - test_submodule_relative_url: ../ ./foo ../submodule => ../submodule
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '../' './foo/bar' '../submodule') &&
test "$actual" = '../foo/submodule'
ok 159 - test_submodule_relative_url: ../ ./foo/bar ../submodule => ../foo/submodule
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '../../../' '../foo/bar' '../sub/a/b/c') &&
test "$actual" = '../../../../foo/sub/a/b/c'
ok 160 - test_submodule_relative_url: ../../../ ../foo/bar ../sub/a/b/c => ../../../../foo/sub/a/b/c
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '../' '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/addtest' '../repo') &&
test "$actual" = '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/repo'
ok 161 - test_submodule_relative_url: ../ /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/addtest ../repo => /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/repo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '../' 'foo/bar' '../submodule') &&
test "$actual" = '../foo/submodule'
ok 162 - test_submodule_relative_url: ../ foo/bar ../submodule => ../foo/submodule
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '../' 'foo' '../submodule') &&
test "$actual" = '../submodule'
ok 163 - test_submodule_relative_url: ../ foo ../submodule => ../submodule
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '../foo/bar' '../sub/a/b/c') &&
test "$actual" = '../foo/sub/a/b/c'
ok 164 - test_submodule_relative_url: (null) ../foo/bar ../sub/a/b/c => ../foo/sub/a/b/c
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '../foo/bar' '../sub/a/b/c/') &&
test "$actual" = '../foo/sub/a/b/c'
ok 165 - test_submodule_relative_url: (null) ../foo/bar ../sub/a/b/c/ => ../foo/sub/a/b/c
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '../foo/bar/' '../sub/a/b/c') &&
test "$actual" = '../foo/sub/a/b/c'
ok 166 - test_submodule_relative_url: (null) ../foo/bar/ ../sub/a/b/c => ../foo/sub/a/b/c
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '../foo/bar' '../submodule') &&
test "$actual" = '../foo/submodule'
ok 167 - test_submodule_relative_url: (null) ../foo/bar ../submodule => ../foo/submodule
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '../foo/submodule' '../submodule') &&
test "$actual" = '../foo/submodule'
ok 168 - test_submodule_relative_url: (null) ../foo/submodule ../submodule => ../foo/submodule
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '../foo' '../submodule') &&
test "$actual" = '../submodule'
ok 169 - test_submodule_relative_url: (null) ../foo ../submodule => ../submodule
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' './foo/bar' '../submodule') &&
test "$actual" = 'foo/submodule'
ok 170 - test_submodule_relative_url: (null) ./foo/bar ../submodule => foo/submodule
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' './foo' '../submodule') &&
test "$actual" = 'submodule'
ok 171 - test_submodule_relative_url: (null) ./foo ../submodule => submodule
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '//somewhere else/repo' '../subrepo') &&
test "$actual" = '//somewhere else/subrepo'
ok 172 - test_submodule_relative_url: (null) //somewhere else/repo ../subrepo => //somewhere else/subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '//somewhere else/repo' '../../subrepo') &&
test "$actual" = '//subrepo'
ok 173 - test_submodule_relative_url: (null) //somewhere else/repo ../../subrepo => //subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '//somewhere else/repo' '../../../subrepo') &&
test "$actual" = '/subrepo'
ok 174 - test_submodule_relative_url: (null) //somewhere else/repo ../../../subrepo => /subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '//somewhere else/repo' '../../../../subrepo') &&
test "$actual" = 'subrepo'
ok 175 - test_submodule_relative_url: (null) //somewhere else/repo ../../../../subrepo => subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/subsuper_update_r' '../subsubsuper_update_r') &&
test "$actual" = '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/subsubsuper_update_r'
ok 176 - test_submodule_relative_url: (null) /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/subsuper_update_r ../subsubsuper_update_r => /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/subsubsuper_update_r
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/super_update_r2' '../subsuper_update_r') &&
test "$actual" = '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/subsuper_update_r'
ok 177 - test_submodule_relative_url: (null) /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/super_update_r2 ../subsuper_update_r => /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/subsuper_update_r
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/.' '../.') &&
test "$actual" = '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/.'
ok 178 - test_submodule_relative_url: (null) /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/. ../. => /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/.
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils' './.') &&
test "$actual" = '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/.'
ok 179 - test_submodule_relative_url: (null) /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils ./. => /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/.
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/addtest' '../repo') &&
test "$actual" = '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/repo'
ok 180 - test_submodule_relative_url: (null) /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/addtest ../repo => /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/repo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils' './å äö') &&
test "$actual" = '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/å äö'
ok 181 - test_submodule_relative_url: (null) /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils ./å äö => /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/å äö
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/.' '../submodule') &&
test "$actual" = '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/submodule'
ok 182 - test_submodule_relative_url: (null) /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/. ../submodule => /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/submodule
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/submodule' '../submodule') &&
test "$actual" = '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/submodule'
ok 183 - test_submodule_relative_url: (null) /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/submodule ../submodule => /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/submodule
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/home2/../remote' '../bundle1') &&
test "$actual" = '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/home2/../bundle1'
ok 184 - test_submodule_relative_url: (null) /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/home2/../remote ../bundle1 => /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/home2/../bundle1
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/submodule_update_repo' './.') &&
test "$actual" = '/<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/submodule_update_repo/.'
ok 185 - test_submodule_relative_url: (null) /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/submodule_update_repo ./. => /<<PKGBUILDDIR>>/t/trash directory.t0060-path-utils/submodule_update_repo/.
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' 'file:///tmp/repo' '../subrepo') &&
test "$actual" = 'file:///tmp/subrepo'
ok 186 - test_submodule_relative_url: (null) file:///tmp/repo ../subrepo => file:///tmp/subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' 'foo/bar' '../submodule') &&
test "$actual" = 'foo/submodule'
ok 187 - test_submodule_relative_url: (null) foo/bar ../submodule => foo/submodule
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' 'foo' '../submodule') &&
test "$actual" = 'submodule'
ok 188 - test_submodule_relative_url: (null) foo ../submodule => submodule
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' 'helper:://hostname/repo' '../subrepo') &&
test "$actual" = 'helper:://hostname/subrepo'
ok 189 - test_submodule_relative_url: (null) helper:://hostname/repo ../subrepo => helper:://hostname/subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' 'helper:://hostname/repo' '../../subrepo') &&
test "$actual" = 'helper:://subrepo'
ok 190 - test_submodule_relative_url: (null) helper:://hostname/repo ../../subrepo => helper:://subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' 'helper:://hostname/repo' '../../../subrepo') &&
test "$actual" = 'helper::/subrepo'
ok 191 - test_submodule_relative_url: (null) helper:://hostname/repo ../../../subrepo => helper::/subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' 'helper:://hostname/repo' '../../../../subrepo') &&
test "$actual" = 'helper::subrepo'
ok 192 - test_submodule_relative_url: (null) helper:://hostname/repo ../../../../subrepo => helper::subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' 'helper:://hostname/repo' '../../../../../subrepo') &&
test "$actual" = 'helper:subrepo'
ok 193 - test_submodule_relative_url: (null) helper:://hostname/repo ../../../../../subrepo => helper:subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' 'helper:://hostname/repo' '../../../../../../subrepo') &&
test "$actual" = '.:subrepo'
ok 194 - test_submodule_relative_url: (null) helper:://hostname/repo ../../../../../../subrepo => .:subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' 'ssh://hostname/repo' '../subrepo') &&
test "$actual" = 'ssh://hostname/subrepo'
ok 195 - test_submodule_relative_url: (null) ssh://hostname/repo ../subrepo => ssh://hostname/subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' 'ssh://hostname/repo' '../../subrepo') &&
test "$actual" = 'ssh://subrepo'
ok 196 - test_submodule_relative_url: (null) ssh://hostname/repo ../../subrepo => ssh://subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' 'ssh://hostname/repo' '../../../subrepo') &&
test "$actual" = 'ssh:/subrepo'
ok 197 - test_submodule_relative_url: (null) ssh://hostname/repo ../../../subrepo => ssh:/subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' 'ssh://hostname/repo' '../../../../subrepo') &&
test "$actual" = 'ssh:subrepo'
ok 198 - test_submodule_relative_url: (null) ssh://hostname/repo ../../../../subrepo => ssh:subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' 'ssh://hostname/repo' '../../../../../subrepo') &&
test "$actual" = '.:subrepo'
ok 199 - test_submodule_relative_url: (null) ssh://hostname/repo ../../../../../subrepo => .:subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' 'ssh://hostname:22/repo' '../subrepo') &&
test "$actual" = 'ssh://hostname:22/subrepo'
ok 200 - test_submodule_relative_url: (null) ssh://hostname:22/repo ../subrepo => ssh://hostname:22/subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' 'user@host:path/to/repo' '../subrepo') &&
test "$actual" = 'user@host:path/to/subrepo'
ok 201 - test_submodule_relative_url: (null) user@host:path/to/repo ../subrepo => user@host:path/to/subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' 'user@host:repo' '../subrepo') &&
test "$actual" = 'user@host:subrepo'
ok 202 - test_submodule_relative_url: (null) user@host:repo ../subrepo => user@host:subrepo
expecting success:
actual=$(git submodule--helper resolve-relative-url-test '(null)' 'user@host:repo' '../../subrepo') &&
test "$actual" = '.:subrepo'
ok 203 - test_submodule_relative_url: (null) user@host:repo ../../subrepo => .:subrepo
expecting success:
test-tool path-utils is_dotgitmodules \
.gitmodules \
\
.git${u200c}modules \
\
.Gitmodules \
.gitmoduleS \
\
".gitmodules " \
".gitmodules." \
".gitmodules " \
".gitmodules. " \
".gitmodules ." \
".gitmodules.." \
".gitmodules " \
".gitmodules. " \
".gitmodules . " \
".gitmodules ." \
\
".Gitmodules " \
".Gitmodules." \
".Gitmodules " \
".Gitmodules. " \
".Gitmodules ." \
".Gitmodules.." \
".Gitmodules " \
".Gitmodules. " \
".Gitmodules . " \
".Gitmodules ." \
\
GITMOD~1 \
gitmod~1 \
GITMOD~2 \
gitmod~3 \
GITMOD~4 \
\
"GITMOD~1 " \
"gitmod~2." \
"GITMOD~3 " \
"gitmod~4. " \
"GITMOD~1 ." \
"gitmod~2 " \
"GITMOD~3. " \
"gitmod~4 . " \
\
GI7EBA~1 \
gi7eba~9 \
\
GI7EB~10 \
GI7EB~11 \
GI7EB~99 \
GI7EB~10 \
GI7E~100 \
GI7E~101 \
GI7E~999 \
~1000000 \
~9999999 \
\
--not \
".gitmodules x" \
".gitmodules .x" \
\
" .gitmodules" \
\
..gitmodules \
\
gitmodules \
\
.gitmodule \
\
".gitmodules x " \
".gitmodules .x" \
\
GI7EBA~ \
GI7EBA~0 \
GI7EBA~~1 \
GI7EBA~X \
Gx7EBA~1 \
GI7EBX~1 \
\
GI7EB~1 \
GI7EB~01 \
GI7EB~1X
ok: '.gitmodules' is .gitmodules
ok: '.gitmodules' is .gitmodules
ok: '.Gitmodules' is .gitmodules
ok: '.gitmoduleS' is .gitmodules
ok: '.gitmodules ' is .gitmodules
ok: '.gitmodules.' is .gitmodules
ok: '.gitmodules ' is .gitmodules
ok: '.gitmodules. ' is .gitmodules
ok: '.gitmodules .' is .gitmodules
ok: '.gitmodules..' is .gitmodules
ok: '.gitmodules ' is .gitmodules
ok: '.gitmodules. ' is .gitmodules
ok: '.gitmodules . ' is .gitmodules
ok: '.gitmodules .' is .gitmodules
ok: '.Gitmodules ' is .gitmodules
ok: '.Gitmodules.' is .gitmodules
ok: '.Gitmodules ' is .gitmodules
ok: '.Gitmodules. ' is .gitmodules
ok: '.Gitmodules .' is .gitmodules
ok: '.Gitmodules..' is .gitmodules
ok: '.Gitmodules ' is .gitmodules
ok: '.Gitmodules. ' is .gitmodules
ok: '.Gitmodules . ' is .gitmodules
ok: '.Gitmodules .' is .gitmodules
ok: 'GITMOD~1' is .gitmodules
ok: 'gitmod~1' is .gitmodules
ok: 'GITMOD~2' is .gitmodules
ok: 'gitmod~3' is .gitmodules
ok: 'GITMOD~4' is .gitmodules
ok: 'GITMOD~1 ' is .gitmodules
ok: 'gitmod~2.' is .gitmodules
ok: 'GITMOD~3 ' is .gitmodules
ok: 'gitmod~4. ' is .gitmodules
ok: 'GITMOD~1 .' is .gitmodules
ok: 'gitmod~2 ' is .gitmodules
ok: 'GITMOD~3. ' is .gitmodules
ok: 'gitmod~4 . ' is .gitmodules
ok: 'GI7EBA~1' is .gitmodules
ok: 'gi7eba~9' is .gitmodules
ok: 'GI7EB~10' is .gitmodules
ok: 'GI7EB~11' is .gitmodules
ok: 'GI7EB~99' is .gitmodules
ok: 'GI7EB~10' is .gitmodules
ok: 'GI7E~100' is .gitmodules
ok: 'GI7E~101' is .gitmodules
ok: 'GI7E~999' is .gitmodules
ok: '~1000000' is .gitmodules
ok: '~9999999' is .gitmodules
ok: '.gitmodules x' is not .gitmodules
ok: '.gitmodules .x' is not .gitmodules
ok: ' .gitmodules' is not .gitmodules
ok: '..gitmodules' is not .gitmodules
ok: 'gitmodules' is not .gitmodules
ok: '.gitmodule' is not .gitmodules
ok: '.gitmodules x ' is not .gitmodules
ok: '.gitmodules .x' is not .gitmodules
ok: 'GI7EBA~' is not .gitmodules
ok: 'GI7EBA~0' is not .gitmodules
ok: 'GI7EBA~~1' is not .gitmodules
ok: 'GI7EBA~X' is not .gitmodules
ok: 'Gx7EBA~1' is not .gitmodules
ok: 'GI7EBX~1' is not .gitmodules
ok: 'GI7EB~1' is not .gitmodules
ok: 'GI7EB~01' is not .gitmodules
ok: 'GI7EB~1X' is not .gitmodules
ok 204 - match .gitmodules
# passed all 204 test(s)
1..204
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0100-previous.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0100-previous/.git/
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
[master (root-commit) 0ddfaf1] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
Switched to a new branch 'junk'
Switched to branch 'master'
Deleted branch junk (was 0ddfaf1).
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
Switched to a new branch 'junk2'
Switched to branch 'master'
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'"
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 0ddfaf1 A
[detached HEAD d9df450] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B.t
Previous HEAD position was d9df450 B
HEAD is now at 0ddfaf1 A
[detached HEAD 5dee784] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C.t
[detached HEAD 12bd07b] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D.t
Switched to branch 'other'
Switched to branch 'master'
Merging:
d9df450 B
virtual @{-1}
found 1 common ancestor:
0ddfaf1 A
Merge made by the 'recursive' strategy.
C.t | 1 +
D.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 C.t
create mode 100644 D.t
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
Already on 'master'
HEAD is now at d9df450 B
Switched to branch 'other'
Switched to branch 'master'
Merging:
d9df450 B
virtual @{-1}~1
found 1 common ancestor:
0ddfaf1 A
Merge made by the 'recursive' strategy.
C.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 C.t
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}
Already on 'master'
HEAD is now at d9df450 B
Switched to branch 'other'
Switched to branch 'master'
merge: @{-100} - not something we can merge
ok 5 - merge @{-100} before checking out that many branches yet
expecting success:
git checkout -b last_branch &&
git checkout -b new_branch &&
echo "last_branch@{0}" >expect &&
git log -g --format=%gd @{-1} >actual &&
test_cmp expect actual
Switched to a new branch 'last_branch'
Switched to a new branch 'new_branch'
ok 6 - log -g @{-1}
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0101-at-syntax.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0101-at-syntax/.git/
expecting success:
test_commit one &&
test_commit two
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
ok 1 - setup
expecting success:
check_at @{0} two
ok 2 - @{0} shows current
expecting success:
check_at @{1} one
ok 3 - @{1} shows old
expecting success:
check_at @{now} two
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 5 - @{2001-09-17} (before the first commit) shows old
expecting success:
check_at @{3.hot.dogs.on.2001-09-17} one
warning: Log for 'master' only goes back to Thu, 7 Apr 2005 15:13:13 -0700.
ok 6 - silly approxidates work
expecting success:
test_must_fail git log -1 --format=%s @{usptream}
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}
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 8 - complain about total nonsense
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0021-conversion.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0021-conversion/.git/
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 &&
echo "content-test2" >test2.o &&
echo "content-test3 - filename with special characters" >"test3 'sq',\$x=.o"
ok 1 - setup
expecting success:
test_cmp test.o test &&
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 &&
test_cmp test.r test.t
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 expected-output expanded-keywords &&
git checkout -- expanded-keywords-crlf &&
test_cmp expected-output-crlf expanded-keywords-crlf
[master (root-commit) b5caeab] 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 3 - expanded_in_repo
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
test_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
test_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" &&
:
ok 4 - filter shell-escaped filenames
expecting success:
test_config filter.required.smudge ./rot13.sh &&
test_config filter.required.clean ./rot13.sh &&
test_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 &&
test_cmp test.o test.r &&
./rot13.sh <test.o >expected &&
git cat-file blob :test.r >actual &&
test_cmp expected actual
ok 5 - required filter should filter data
expecting success:
test_config filter.failsmudge.smudge false &&
test_config filter.failsmudge.clean cat &&
test_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
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:
test_config filter.failclean.smudge cat &&
test_config filter.failclean.clean false &&
test_config filter.failclean.required true &&
echo "*.fc filter=failclean" >.gitattributes &&
echo test >test.fc &&
test_must_fail git add test.fc
error: external filter 'false' failed 1
error: external filter 'false' failed
fatal: test.fc: clean filter 'failclean' failed
ok 7 - required filter clean failure
expecting success:
test_config filter.devnull.clean "cat >/dev/null" &&
test_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
ok 8 - filtering large input to small output should use little memory
expecting success:
test-tool genrandom foo $((128 * 1024 + 1)) >big &&
echo "big filter=epipe" >.gitattributes &&
test_config filter.epipe.clean "echo xyzzy" &&
git add big &&
git cat-file blob :big >actual &&
echo xyzzy >expect &&
test_cmp expect actual
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"
)
prerequisite EXPENSIVE not satisfied
skipping test: filter large file
test_config filter.largefile.smudge cat &&
test_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_must_be_empty err &&
rm -f 2GB &&
git checkout -- 2GB 2>err &&
test_must_be_empty err
ok 10 # skip filter large file (missing EXPENSIVE)
expecting success:
test_config filter.in-repo-header.clean "echo cleaned && cat" &&
test_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 11 - filter: clean empty file
expecting success:
test_config filter.empty-in-repo.clean "cat >/dev/null" &&
test_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 12 - filter: smudge empty file
expecting success:
test_config_global filter.disable.smudge false &&
test_config_global filter.disable.clean false &&
test_config filter.disable.smudge false &&
test_config filter.disable.clean false &&
echo "*.disable filter=disable" >.gitattributes &&
echo test >test.disable &&
git -c filter.disable.clean= add test.disable 2>err &&
test_must_be_empty err &&
rm -f test.disable &&
git -c filter.disable.smudge= checkout -- test.disable 2>err &&
test_must_be_empty err
ok 13 - disable filter with empty override
expecting success:
test_config filter.counter.clean "echo . >>count; sed s/^/clean:/" &&
echo "file filter=counter" >.gitattributes &&
test_commit one file &&
test_commit two file &&
>count &&
git diff-tree -p HEAD &&
test_line_count = 0 count
[master 16870fc] one
Author: A U Thor <author@example.com>
8 files changed, 7 insertions(+)
create mode 100644 30MB
create mode 100644 big
create mode 100644 empty-in-repo
create mode 100644 empty-in-worktree
create mode 100644 file
create mode 100644 test.disable
create mode 100644 test.fs
create mode 100644 test.r
[master 8ecdf60] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
8ecdf60762d789f92c2d724ebc43df38ef9b929a
diff --git a/file b/file
index e4a1655..0c54b7b 100644
--- a/file
+++ b/file
@@ -1 +1 @@
-clean:one
+clean:two
ok 14 - diff does not reuse worktree files that need cleaning
expecting success:
test_config_global filter.protocol.process "rot13-filter.pl debug.log clean smudge" &&
test_config_global filter.protocol.required true &&
rm -rf repo &&
mkdir repo &&
(
cd repo &&
git init &&
echo "*.r filter=protocol" >.gitattributes &&
git add . &&
git commit -m "test commit 1" &&
git branch empty-branch &&
cp "$TEST_ROOT/test.o" test.r &&
cp "$TEST_ROOT/test2.o" test2.r &&
mkdir testsubdir &&
cp "$TEST_ROOT/test3 'sq',\$x=.o" "testsubdir/test3 'sq',\$x=.r" &&
>test4-empty.r &&
S=$(file_size test.r) &&
S2=$(file_size test2.r) &&
S3=$(file_size "testsubdir/test3 'sq',\$x=.r") &&
filter_git add . &&
cat >expected.log <<-EOF &&
START
init handshake complete
IN: clean test.r $S [OK] -- OUT: $S . [OK]
IN: clean test2.r $S2 [OK] -- OUT: $S2 . [OK]
IN: clean test4-empty.r 0 [OK] -- OUT: 0 [OK]
IN: clean testsubdir/test3 'sq',\$x=.r $S3 [OK] -- OUT: $S3 . [OK]
STOP
EOF
test_cmp_count expected.log debug.log &&
git commit -m "test commit 2" &&
rm -f test2.r "testsubdir/test3 'sq',\$x=.r" &&
filter_git checkout --quiet --no-progress . &&
cat >expected.log <<-EOF &&
START
init handshake complete
IN: smudge test2.r $S2 [OK] -- OUT: $S2 . [OK]
IN: smudge testsubdir/test3 'sq',\$x=.r $S3 [OK] -- OUT: $S3 . [OK]
STOP
EOF
test_cmp_exclude_clean expected.log debug.log &&
filter_git checkout --quiet --no-progress empty-branch &&
cat >expected.log <<-EOF &&
START
init handshake complete
IN: clean test.r $S [OK] -- OUT: $S . [OK]
STOP
EOF
test_cmp_exclude_clean expected.log debug.log &&
filter_git checkout --quiet --no-progress master &&
cat >expected.log <<-EOF &&
START
init handshake complete
IN: smudge test.r $S [OK] -- OUT: $S . [OK]
IN: smudge test2.r $S2 [OK] -- OUT: $S2 . [OK]
IN: smudge test4-empty.r 0 [OK] -- OUT: 0 [OK]
IN: smudge testsubdir/test3 'sq',\$x=.r $S3 [OK] -- OUT: $S3 . [OK]
STOP
EOF
test_cmp_exclude_clean expected.log debug.log &&
test_cmp_committed_rot13 "$TEST_ROOT/test.o" test.r &&
test_cmp_committed_rot13 "$TEST_ROOT/test2.o" test2.r &&
test_cmp_committed_rot13 "$TEST_ROOT/test3 'sq',\$x=.o" "testsubdir/test3 'sq',\$x=.r"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0021-conversion/repo/.git/
[master (root-commit) 56d459b] test commit 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 .gitattributes
[master 9ea74df] test commit 2
Author: A U Thor <author@example.com>
4 files changed, 5 insertions(+)
create mode 100644 test.r
create mode 100644 test2.r
create mode 100644 test4-empty.r
create mode 100644 testsubdir/test3 'sq',$x=.r
ok 15 - required process filter should filter data
expecting success:
test_config_global filter.protocol.clean false &&
test_config_global filter.protocol.process "rot13-filter.pl debug.log clean" &&
test_config_global filter.protocol.required true &&
rm -rf repo &&
mkdir repo &&
(
cd repo &&
git init &&
echo "*.r filter=protocol" >.gitattributes &&
cp "$TEST_ROOT/test.o" test.r &&
S=$(file_size test.r) &&
# Check that the process filter is invoked here
filter_git add . &&
cat >expected.log <<-EOF &&
START
init handshake complete
IN: clean test.r $S [OK] -- OUT: $S . [OK]
STOP
EOF
test_cmp_count expected.log debug.log
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0021-conversion/repo/.git/
ok 16 - required process filter takes precedence
expecting success:
test_config_global filter.protocol.process "rot13-filter.pl debug.log clean" &&
rm -rf repo &&
mkdir repo &&
(
cd repo &&
git init &&
echo "*.r filter=protocol" >.gitattributes &&
cp "$TEST_ROOT/test.o" test.r &&
S=$(file_size test.r) &&
filter_git add . &&
cat >expected.log <<-EOF &&
START
init handshake complete
IN: clean test.r $S [OK] -- OUT: $S . [OK]
STOP
EOF
test_cmp_count expected.log debug.log &&
rm test.r &&
filter_git checkout --quiet --no-progress . &&
# If the filter would be used for "smudge", too, we would see
# "IN: smudge test.r 57 [OK] -- OUT: 57 . [OK]" here
cat >expected.log <<-EOF &&
START
init handshake complete
STOP
EOF
test_cmp_exclude_clean expected.log debug.log
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0021-conversion/repo/.git/
ok 17 - required process filter should be used only for "clean" operation only
expecting success:
test_config_global filter.protocol.process "rot13-filter.pl debug.log clean smudge" &&
test_config_global filter.protocol.required true &&
rm -rf repo &&
mkdir repo &&
(
cd repo &&
git init &&
# Generate data requiring 1, 2, 3 packets
S=65516 && # PKTLINE_DATA_MAXLEN -> Maximal size of a packet
generate_random_characters $(($S )) 1pkt_1__.file &&
generate_random_characters $(($S +1)) 2pkt_1+1.file &&
generate_random_characters $(($S*2-1)) 2pkt_2-1.file &&
generate_random_characters $(($S*2 )) 2pkt_2__.file &&
generate_random_characters $(($S*2+1)) 3pkt_2+1.file &&
for FILE in "$TEST_ROOT"/*.file
do
cp "$FILE" . &&
rot13.sh <"$FILE" >"$FILE.rot13"
done &&
echo "*.file filter=protocol" >.gitattributes &&
filter_git add *.file .gitattributes &&
cat >expected.log <<-EOF &&
START
init handshake complete
IN: clean 1pkt_1__.file $(($S )) [OK] -- OUT: $(($S )) . [OK]
IN: clean 2pkt_1+1.file $(($S +1)) [OK] -- OUT: $(($S +1)) .. [OK]
IN: clean 2pkt_2-1.file $(($S*2-1)) [OK] -- OUT: $(($S*2-1)) .. [OK]
IN: clean 2pkt_2__.file $(($S*2 )) [OK] -- OUT: $(($S*2 )) .. [OK]
IN: clean 3pkt_2+1.file $(($S*2+1)) [OK] -- OUT: $(($S*2+1)) ... [OK]
STOP
EOF
test_cmp_count expected.log debug.log &&
rm -f *.file &&
filter_git checkout --quiet --no-progress -- *.file &&
cat >expected.log <<-EOF &&
START
init handshake complete
IN: smudge 1pkt_1__.file $(($S )) [OK] -- OUT: $(($S )) . [OK]
IN: smudge 2pkt_1+1.file $(($S +1)) [OK] -- OUT: $(($S +1)) .. [OK]
IN: smudge 2pkt_2-1.file $(($S*2-1)) [OK] -- OUT: $(($S*2-1)) .. [OK]
IN: smudge 2pkt_2__.file $(($S*2 )) [OK] -- OUT: $(($S*2 )) .. [OK]
IN: smudge 3pkt_2+1.file $(($S*2+1)) [OK] -- OUT: $(($S*2+1)) ... [OK]
STOP
EOF
test_cmp_exclude_clean expected.log debug.log &&
for FILE in *.file
do
test_cmp_committed_rot13 "$TEST_ROOT/$FILE" $FILE
done
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0021-conversion/repo/.git/
ok 18 - required process filter should process multiple packets
expecting success:
test_config_global filter.protocol.process "rot13-filter.pl debug.log clean smudge" &&
test_config_global filter.protocol.required true &&
rm -rf repo &&
mkdir repo &&
(
cd repo &&
git init &&
echo "*.r filter=protocol" >.gitattributes &&
cp "$TEST_ROOT/test.o" test.r &&
echo "this is going to fail" >clean-write-fail.r &&
echo "content-test3-subdir" >test3.r &&
test_must_fail git add .
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0021-conversion/repo/.git/
clean write error at /<<PKGBUILDDIR>>/t/trash directory.t0021-conversion/rot13-filter.pl line 204.
error: external filter 'rot13-filter.pl debug.log clean smudge' failed
fatal: clean-write-fail.r: clean filter 'protocol' failed
ok 19 - required process filter with clean error should fail
expecting success:
test_config_global filter.protocol.process "rot13-filter.pl debug.log clean smudge" &&
rm -rf repo &&
mkdir repo &&
(
cd repo &&
git init &&
echo "*.r filter=protocol" >.gitattributes &&
cp "$TEST_ROOT/test.o" test.r &&
cp "$TEST_ROOT/test2.o" test2.r &&
echo "this is going to fail" >smudge-write-fail.o &&
cp smudge-write-fail.o smudge-write-fail.r &&
S=$(file_size test.r) &&
S2=$(file_size test2.r) &&
SF=$(file_size smudge-write-fail.r) &&
git add . &&
rm -f *.r &&
rm -f debug.log &&
git checkout --quiet --no-progress . 2>git-stderr.log &&
grep "smudge write error at" git-stderr.log &&
test_i18ngrep "error: external filter" git-stderr.log &&
cat >expected.log <<-EOF &&
START
init handshake complete
IN: smudge smudge-write-fail.r $SF [OK] -- [WRITE FAIL]
START
init handshake complete
IN: smudge test.r $S [OK] -- OUT: $S . [OK]
IN: smudge test2.r $S2 [OK] -- OUT: $S2 . [OK]
STOP
EOF
test_cmp_exclude_clean expected.log debug.log &&
test_cmp_committed_rot13 "$TEST_ROOT/test.o" test.r &&
test_cmp_committed_rot13 "$TEST_ROOT/test2.o" test2.r &&
# Smudge failed
! test_cmp smudge-write-fail.o smudge-write-fail.r &&
rot13.sh <smudge-write-fail.o >expected &&
git cat-file blob :smudge-write-fail.r >actual &&
test_cmp expected actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0021-conversion/repo/.git/
smudge write error at /<<PKGBUILDDIR>>/t/trash directory.t0021-conversion/rot13-filter.pl line 204.
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: external filter 'rot13-filter.pl debug.log clean smudge' failed
--- smudge-write-fail.o 2019-08-14 07:23:39.332652527 +0000
+++ smudge-write-fail.r 2019-08-14 07:23:39.852657184 +0000
@@ -1 +1 @@
-this is going to fail
+guvf vf tbvat gb snvy
ok 20 - process filter should restart after unexpected write failure
expecting success:
test_config_global filter.protocol.process "rot13-filter.pl debug.log clean smudge" &&
rm -rf repo &&
mkdir repo &&
(
cd repo &&
git init &&
echo "*.r filter=protocol" >.gitattributes &&
cp "$TEST_ROOT/test.o" test.r &&
cp "$TEST_ROOT/test2.o" test2.r &&
echo "this will cause an error" >error.o &&
cp error.o error.r &&
S=$(file_size test.r) &&
S2=$(file_size test2.r) &&
SE=$(file_size error.r) &&
git add . &&
rm -f *.r &&
filter_git checkout --quiet --no-progress . &&
cat >expected.log <<-EOF &&
START
init handshake complete
IN: smudge error.r $SE [OK] -- [ERROR]
IN: smudge test.r $S [OK] -- OUT: $S . [OK]
IN: smudge test2.r $S2 [OK] -- OUT: $S2 . [OK]
STOP
EOF
test_cmp_exclude_clean expected.log debug.log &&
test_cmp_committed_rot13 "$TEST_ROOT/test.o" test.r &&
test_cmp_committed_rot13 "$TEST_ROOT/test2.o" test2.r &&
test_cmp error.o error.r
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0021-conversion/repo/.git/
ok 21 - process filter should not be restarted if it signals an error
expecting success:
test_config_global filter.protocol.process "rot13-filter.pl debug.log clean smudge" &&
rm -rf repo &&
mkdir repo &&
(
cd repo &&
git init &&
echo "*.r filter=protocol" >.gitattributes &&
cp "$TEST_ROOT/test.o" test.r &&
cp "$TEST_ROOT/test2.o" test2.r &&
echo "error this blob and all future blobs" >abort.o &&
cp abort.o abort.r &&
SA=$(file_size abort.r) &&
git add . &&
rm -f *.r &&
# Note: This test assumes that Git filters files in alphabetical
# order ("abort.r" before "test.r").
filter_git checkout --quiet --no-progress . &&
cat >expected.log <<-EOF &&
START
init handshake complete
IN: smudge abort.r $SA [OK] -- [ABORT]
STOP
EOF
test_cmp_exclude_clean expected.log debug.log &&
test_cmp "$TEST_ROOT/test.o" test.r &&
test_cmp "$TEST_ROOT/test2.o" test2.r &&
test_cmp abort.o abort.r
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0021-conversion/repo/.git/
ok 22 - process filter abort stops processing of all further files
expecting success:
test_config_global filter.protocol.process cat &&
test_config_global filter.protocol.required true &&
rm -rf repo &&
mkdir repo &&
(
cd repo &&
git init &&
echo "*.r filter=protocol" >.gitattributes &&
cp "$TEST_ROOT/test.o" test.r &&
test_must_fail git add . 2>git-stderr.log &&
grep "expected git-filter-server" git-stderr.log
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0021-conversion/repo/.git/
error: Unexpected line 'git-filter-client', expected git-filter-server
ok 23 - invalid process filter must fail (and not hang!)
expecting success:
test_config_global filter.a.process "rot13-filter.pl a.log clean smudge delay" &&
test_config_global filter.a.required true &&
test_config_global filter.b.process "rot13-filter.pl b.log clean smudge delay" &&
test_config_global filter.b.required true &&
rm -rf repo &&
mkdir repo &&
(
cd repo &&
git init &&
echo "*.a filter=a" >.gitattributes &&
echo "*.b filter=b" >>.gitattributes &&
cp "$TEST_ROOT/test.o" test.a &&
cp "$TEST_ROOT/test.o" test-delay10.a &&
cp "$TEST_ROOT/test.o" test-delay11.a &&
cp "$TEST_ROOT/test.o" test-delay20.a &&
cp "$TEST_ROOT/test.o" test-delay10.b &&
git add . &&
git commit -m "test commit"
) &&
S=$(file_size "$TEST_ROOT/test.o") &&
cat >a.exp <<-EOF &&
START
init handshake complete
IN: smudge test.a $S [OK] -- OUT: $S . [OK]
IN: smudge test-delay10.a $S [OK] -- [DELAYED]
IN: smudge test-delay11.a $S [OK] -- [DELAYED]
IN: smudge test-delay20.a $S [OK] -- [DELAYED]
IN: list_available_blobs test-delay10.a test-delay11.a [OK]
IN: smudge test-delay10.a 0 [OK] -- OUT: $S . [OK]
IN: smudge test-delay11.a 0 [OK] -- OUT: $S . [OK]
IN: list_available_blobs test-delay20.a [OK]
IN: smudge test-delay20.a 0 [OK] -- OUT: $S . [OK]
IN: list_available_blobs [OK]
STOP
EOF
cat >b.exp <<-EOF &&
START
init handshake complete
IN: smudge test-delay10.b $S [OK] -- [DELAYED]
IN: list_available_blobs test-delay10.b [OK]
IN: smudge test-delay10.b 0 [OK] -- OUT: $S . [OK]
IN: list_available_blobs [OK]
STOP
EOF
rm -rf repo-cloned &&
filter_git clone repo repo-cloned &&
test_cmp_count a.exp repo-cloned/a.log &&
test_cmp_count b.exp repo-cloned/b.log &&
(
cd repo-cloned &&
test_cmp_committed_rot13 "$TEST_ROOT/test.o" test.a &&
test_cmp_committed_rot13 "$TEST_ROOT/test.o" test-delay10.a &&
test_cmp_committed_rot13 "$TEST_ROOT/test.o" test-delay11.a &&
test_cmp_committed_rot13 "$TEST_ROOT/test.o" test-delay20.a &&
test_cmp_committed_rot13 "$TEST_ROOT/test.o" test-delay10.b &&
rm *.a *.b &&
filter_git checkout . &&
test_cmp_count ../a.exp a.log &&
test_cmp_count ../b.exp b.log &&
test_cmp_committed_rot13 "$TEST_ROOT/test.o" test.a &&
test_cmp_committed_rot13 "$TEST_ROOT/test.o" test-delay10.a &&
test_cmp_committed_rot13 "$TEST_ROOT/test.o" test-delay11.a &&
test_cmp_committed_rot13 "$TEST_ROOT/test.o" test-delay20.a &&
test_cmp_committed_rot13 "$TEST_ROOT/test.o" test-delay10.b
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0021-conversion/repo/.git/
[master (root-commit) 27d7fe8] test commit
Author: A U Thor <author@example.com>
6 files changed, 17 insertions(+)
create mode 100644 .gitattributes
create mode 100644 test-delay10.a
create mode 100644 test-delay10.b
create mode 100644 test-delay11.a
create mode 100644 test-delay20.a
create mode 100644 test.a
Cloning into 'repo-cloned'...
done.
Updated 9 paths from the index
ok 24 - delayed checkout in process filter
expecting success:
test_config_global filter.bug.process "rot13-filter.pl bug.log clean smudge delay" &&
test_config_global filter.bug.required true &&
rm -rf repo &&
mkdir repo &&
(
cd repo &&
git init &&
echo "*.a filter=bug" >.gitattributes &&
cp "$TEST_ROOT/test.o" missing-delay.a &&
git add . &&
git commit -m "test commit"
) &&
rm -rf repo-cloned &&
test_must_fail git clone repo repo-cloned 2>git-stderr.log &&
cat git-stderr.log &&
grep "error: .missing-delay\.a. was not filtered properly" git-stderr.log
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0021-conversion/repo/.git/
[master (root-commit) 5567259] test commit
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitattributes
create mode 100644 missing-delay.a
Cloning into 'repo-cloned'...
done.
error: 'missing-delay.a' was not filtered properly
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
error: 'missing-delay.a' was not filtered properly
ok 25 - missing file in delayed checkout
expecting success:
test_config_global filter.bug.process "rot13-filter.pl bug.log clean smudge delay" &&
test_config_global filter.bug.required true &&
rm -rf repo &&
mkdir repo &&
(
cd repo &&
git init &&
echo "*.a filter=bug" >.gitattributes &&
cp "$TEST_ROOT/test.o" invalid-delay.a &&
cp "$TEST_ROOT/test.o" unfiltered &&
git add . &&
git commit -m "test commit"
) &&
rm -rf repo-cloned &&
test_must_fail git clone repo repo-cloned 2>git-stderr.log &&
grep "error: external filter .* signaled that .unfiltered. is now available although it has not been delayed earlier" git-stderr.log
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0021-conversion/repo/.git/
[master (root-commit) 636012f] test commit
Author: A U Thor <author@example.com>
3 files changed, 7 insertions(+)
create mode 100644 .gitattributes
create mode 100644 invalid-delay.a
create mode 100644 unfiltered
error: external filter 'rot13-filter.pl bug.log clean smudge delay' signaled that 'unfiltered' is now available although it has not been delayed earlier
ok 26 - invalid file in delayed checkout
# passed all 26 test(s)
1..26
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0200-gettext-basic.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0200-gettext-basic/.git/
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
# 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
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 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 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)
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)
# passed all 16 test(s)
1..16
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0110-urlmatch-normalization.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0110-urlmatch-normalization/.git/
expecting success:
! test-tool urlmatch-normalization "" &&
! test-tool urlmatch-normalization "_" &&
! test-tool urlmatch-normalization "scheme" &&
! test-tool urlmatch-normalization "scheme:" &&
! test-tool urlmatch-normalization "scheme:/" &&
! test-tool urlmatch-normalization "scheme://" &&
! test-tool urlmatch-normalization "file" &&
! test-tool urlmatch-normalization "file:" &&
! test-tool urlmatch-normalization "file:/" &&
test-tool urlmatch-normalization "file://" &&
! test-tool urlmatch-normalization "://acme.co" &&
! test-tool urlmatch-normalization "x_test://acme.co" &&
! test-tool urlmatch-normalization "-test://acme.co" &&
! test-tool urlmatch-normalization "0test://acme.co" &&
! test-tool urlmatch-normalization "+test://acme.co" &&
! test-tool urlmatch-normalization ".test://acme.co" &&
! test-tool urlmatch-normalization "schem%6e://" &&
test-tool urlmatch-normalization "x-Test+v1.0://acme.co" &&
test "$(test-tool urlmatch-normalization -p "AbCdeF://x.Y")" = "abcdef://x.y/"
ok 1 - url scheme
expecting success:
! test-tool urlmatch-normalization "scheme://user:pass@" &&
! test-tool urlmatch-normalization "scheme://?" &&
! test-tool urlmatch-normalization "scheme://#" &&
! test-tool urlmatch-normalization "scheme:///" &&
! test-tool urlmatch-normalization "scheme://:" &&
! test-tool urlmatch-normalization "scheme://:555" &&
test-tool urlmatch-normalization "file://user:pass@" &&
test-tool urlmatch-normalization "file://?" &&
test-tool urlmatch-normalization "file://#" &&
test-tool urlmatch-normalization "file:///" &&
test-tool urlmatch-normalization "file://:" &&
! test-tool urlmatch-normalization "file://:555" &&
test-tool urlmatch-normalization "scheme://user:pass@host" &&
test-tool urlmatch-normalization "scheme://@host" &&
test-tool urlmatch-normalization "scheme://%00@host" &&
! test-tool urlmatch-normalization "scheme://%%@host" &&
! test-tool urlmatch-normalization "scheme://host_" &&
test-tool urlmatch-normalization "scheme://user:pass@host/" &&
test-tool urlmatch-normalization "scheme://@host/" &&
test-tool urlmatch-normalization "scheme://host/" &&
test-tool urlmatch-normalization "scheme://host?x" &&
test-tool urlmatch-normalization "scheme://host#x" &&
test-tool urlmatch-normalization "scheme://host/@" &&
test-tool urlmatch-normalization "scheme://host?@x" &&
test-tool urlmatch-normalization "scheme://host#@x" &&
test-tool urlmatch-normalization "scheme://[::1]" &&
test-tool urlmatch-normalization "scheme://[::1]/" &&
! test-tool urlmatch-normalization "scheme://hos%41/" &&
test-tool urlmatch-normalization "scheme://[invalid....:/" &&
test-tool urlmatch-normalization "scheme://invalid....:]/" &&
! test-tool urlmatch-normalization "scheme://invalid....:[/" &&
! test-tool urlmatch-normalization "scheme://invalid....:["
ok 2 - url authority
expecting success:
test-tool urlmatch-normalization "xyz://q@some.host:" &&
test-tool urlmatch-normalization "xyz://q@some.host:456/" &&
! test-tool urlmatch-normalization "xyz://q@some.host:0" &&
! test-tool urlmatch-normalization "xyz://q@some.host:0000000" &&
test-tool urlmatch-normalization "xyz://q@some.host:0000001?" &&
test-tool urlmatch-normalization "xyz://q@some.host:065535#" &&
test-tool urlmatch-normalization "xyz://q@some.host:65535" &&
! test-tool urlmatch-normalization "xyz://q@some.host:65536" &&
! test-tool urlmatch-normalization "xyz://q@some.host:99999" &&
! test-tool urlmatch-normalization "xyz://q@some.host:100000" &&
! test-tool urlmatch-normalization "xyz://q@some.host:100001" &&
test-tool urlmatch-normalization "http://q@some.host:80" &&
test-tool urlmatch-normalization "https://q@some.host:443" &&
test-tool urlmatch-normalization "http://q@some.host:80/" &&
test-tool urlmatch-normalization "https://q@some.host:443?" &&
! test-tool urlmatch-normalization "http://q@:8008" &&
! test-tool urlmatch-normalization "http://:8080" &&
! test-tool urlmatch-normalization "http://:" &&
test-tool urlmatch-normalization "xyz://q@some.host:456/" &&
test-tool urlmatch-normalization "xyz://[::1]:456/" &&
test-tool urlmatch-normalization "xyz://[::1]:/" &&
! test-tool urlmatch-normalization "xyz://[::1]:000/" &&
! test-tool urlmatch-normalization "xyz://[::1]:0%300/" &&
! test-tool urlmatch-normalization "xyz://[::1]:0x80/" &&
! test-tool urlmatch-normalization "xyz://[::1]:4294967297/" &&
! test-tool urlmatch-normalization "xyz://[::1]:030f/"
ok 3 - url port checks
expecting success:
test "$(test-tool urlmatch-normalization -p "http://x:800")" = "http://x:800/" &&
test "$(test-tool urlmatch-normalization -p "http://x:0800")" = "http://x:800/" &&
test "$(test-tool urlmatch-normalization -p "http://x:00000800")" = "http://x:800/" &&
test "$(test-tool urlmatch-normalization -p "http://x:065535")" = "http://x:65535/" &&
test "$(test-tool urlmatch-normalization -p "http://x:1")" = "http://x:1/" &&
test "$(test-tool urlmatch-normalization -p "http://x:80")" = "http://x/" &&
test "$(test-tool urlmatch-normalization -p "http://x:080")" = "http://x/" &&
test "$(test-tool urlmatch-normalization -p "http://x:000000080")" = "http://x/" &&
test "$(test-tool urlmatch-normalization -p "https://x:443")" = "https://x/" &&
test "$(test-tool urlmatch-normalization -p "https://x:0443")" = "https://x/" &&
test "$(test-tool urlmatch-normalization -p "https://x:000000443")" = "https://x/"
ok 4 - url port normalization
expecting success:
! test-tool urlmatch-normalization "http://x.y?%fg" &&
test "$(test-tool urlmatch-normalization -p "X://W/%7e%41^%3a")" = "x://w/~A%5E%3A" &&
test "$(test-tool urlmatch-normalization -p "X://W/:/?#[]@")" = "x://w/:/?#[]@" &&
test "$(test-tool urlmatch-normalization -p "X://W/$&()*+,;=")" = "x://w/$&()*+,;=" &&
test "$(test-tool urlmatch-normalization -p "X://W/'")" = "x://w/'" &&
test "$(test-tool urlmatch-normalization -p "X://W?!")" = "x://w/?!"
ok 5 - url general escapes
expecting success:
test "$(test-tool urlmatch-normalization -p "$(cat "$tu-1")")" = "x://q/%01%02%03%04%05%06%07%08%0E%0F%10%11%12" &&
test "$(test-tool urlmatch-normalization -p "$(cat "$tu-2")")" = "x://q/%13%14%15%16%17%18%19%1B%1C%1D%1E%1F%7F" &&
test "$(test-tool 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-tool 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-tool 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-tool 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-tool 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-tool 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-tool 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-tool 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 6 - url high-bit escapes
expecting success:
test "$(test-tool 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"
ok 7 - url utf-8 escapes
expecting success:
test "$(test-tool 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-tool urlmatch-normalization -l "Http://%4d%65:%4d^%70@The.Host")" = 25 &&
test "$(test-tool urlmatch-normalization -l "http://%41:%42@x.y/%61/")" = 17 &&
test "$(test-tool urlmatch-normalization -l "http://@x.y/^")" = 15
ok 9 - url normalized lengths
expecting success:
test "$(test-tool urlmatch-normalization -p "x://y/.")" = "x://y/" &&
test "$(test-tool urlmatch-normalization -p "x://y/./")" = "x://y/" &&
test "$(test-tool urlmatch-normalization -p "x://y/a/.")" = "x://y/a" &&
test "$(test-tool urlmatch-normalization -p "x://y/a/./")" = "x://y/a/" &&
test "$(test-tool urlmatch-normalization -p "x://y/.?")" = "x://y/?" &&
test "$(test-tool urlmatch-normalization -p "x://y/./?")" = "x://y/?" &&
test "$(test-tool urlmatch-normalization -p "x://y/a/.?")" = "x://y/a?" &&
test "$(test-tool urlmatch-normalization -p "x://y/a/./?")" = "x://y/a/?" &&
test "$(test-tool urlmatch-normalization -p "x://y/a/./b/.././../c")" = "x://y/c" &&
test "$(test-tool urlmatch-normalization -p "x://y/a/./b/../.././c/")" = "x://y/c/" &&
test "$(test-tool urlmatch-normalization -p "x://y/a/./b/.././../c/././.././.")" = "x://y/" &&
! test-tool urlmatch-normalization "x://y/a/./b/.././../c/././.././.." &&
test "$(test-tool urlmatch-normalization -p "x://y/a/./?/././..")" = "x://y/a/?/././.." &&
test "$(test-tool urlmatch-normalization -p "x://y/%2e/")" = "x://y/" &&
test "$(test-tool urlmatch-normalization -p "x://y/%2E/")" = "x://y/" &&
test "$(test-tool urlmatch-normalization -p "x://y/a/%2e./")" = "x://y/" &&
test "$(test-tool urlmatch-normalization -p "x://y/b/.%2E/")" = "x://y/" &&
test "$(test-tool urlmatch-normalization -p "x://y/c/%2e%2E/")" = "x://y/"
ok 10 - url . and .. segments
expecting success:
test-tool urlmatch-normalization "httP://x" "Http://X/" &&
test-tool urlmatch-normalization "Http://%4d%65:%4d^%70@The.Host" "hTTP://Me:%4D^p@the.HOST:80/" &&
! test-tool urlmatch-normalization "https://@x.y/^" "httpS://x.y:443/^" &&
test-tool urlmatch-normalization "https://@x.y/^" "httpS://@x.y:0443/^" &&
test-tool urlmatch-normalization "https://@x.y/^/../abc" "httpS://@x.y:0443/abc" &&
test-tool urlmatch-normalization "https://@x.y/^/.." "httpS://@x.y:0443/"
ok 11 - url equivalents
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0201-gettext-fallbacks.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0201-gettext-fallbacks/.git/
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
# 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
expecting success:
echo fallthrough >expect &&
echo $GIT_INTERNAL_GETTEXT_SH_SCHEME >actual &&
test_cmp expect actual
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 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
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 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 8 - eval_gettext: our eval_gettext() fallback can interpolate variables with spaces and quotes
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0203-gettext-setlocale-sanity.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0203-gettext-setlocale-sanity/.git/
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
# 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_must_be_empty err &&
grep -q "iso-c-commit" out
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.
[master (root-commit) f2030b4] iso-c-commit
Author: Áéí óú <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 iso-under-c
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_must_be_empty 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
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0204-gettext-reencode-sanity.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0204-gettext-reencode-sanity/.git/
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
# 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)
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)
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)
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
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0202-gettext-perl.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0202-gettext-perl/.git/
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
# lib-gettext: No is_IS UTF-8 locale available
# lib-gettext: No is_IS ISO-8859-1 locale available
# run 0: Perl Git::I18N API (perl /<<PKGBUILDDIR>>/t/t0202/test.pl)
1..13
ok 1 - Testing Git::I18N with NO Perl gettext library
ok 2 - Git::I18N is located at /<<PKGBUILDDIR>>/t/../perl/build/lib/Git/I18N.pm
ok 3 - sanity: Git::I18N has 3 export(s)
ok 4 - sanity: Git::I18N exports everything by default
ok 5 - sanity: __n has a $$$ prototype
ok 6 - sanity: __ has a $ prototype
ok 7 - sanity: N__ has a $ prototype
ok 8 - Passing a string through __() in the C locale works
ok 9 - Get singular string through __n() in C locale
ok 10 - Get plural string through __n() in C locale
ok 11 - Passing a string through N__() in the C locale works
ok 12 # skip GETTEXT_LOCALE must be set by lib-gettext.sh for exhaustive Git::I18N tests
ok 13 # skip GETTEXT_LOCALE must be set by lib-gettext.sh for exhaustive Git::I18N tests
# test_external test Perl Git::I18N API was ok
# expecting no stderr from previous command
# test_external_without_stderr test no stderr: Perl Git::I18N API was ok
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0205-gettext-poison.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0205-gettext-poison/.git/
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT not satisfied
expecting success:
test "$GIT_INTERNAL_GETTEXT_SH_SCHEME" = "poison"
ok 1 - sanity: $GIT_INTERNAL_GETTEXT_SH_SCHEME" is poison
expecting success:
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 2 - gettext: our gettext() fallback has poison semantics
expecting success:
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 3 - eval_gettext: our eval_gettext() fallback has poison semantics
expecting success:
test_must_fail env GIT_TEST_GETTEXT_POISON=xyz git version 2>error &&
grep "fatal: bad numeric config value 'xyz' for 'GIT_TEST_GETTEXT_POISON': invalid unit" error
fatal: bad numeric config value 'xyz' for 'GIT_TEST_GETTEXT_POISON': invalid unit
ok 4 - gettext: invalid GIT_TEST_GETTEXT_POISON value doesn't infinitely loop
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0090-cache-tree.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0090-cache-tree/.git/
expecting success:
test_commit foo &&
test_cache_tree
[master (root-commit) ddd63c9] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
ok 1 - initial commit has cache-tree
expecting success:
git read-tree HEAD &&
test_cache_tree
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
HEAD is now at ddd63c9 foo
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
error: invalid object 040000 59d259507ddf2acc00997a8b70c61d7bdc240440 for 'dirx'
HEAD is now at ddd63c9 foo
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
[master 365c8fc] dir1/a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dir1/a.t
[master 8be4607] dir2/b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dir2/b.t
error: invalid object 040000 3b5b859722b671676295bf3795f34b8c6f2393f5 for 'dir1'
HEAD is now at ddd63c9 foo
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
HEAD is now at ddd63c9 foo
ok 6 - update-index invalidates cache-tree
expecting success:
test-tool scrap-cache-tree &&
git write-tree &&
test_cache_tree
64fd3796c57084e7b8cbae358ce37970b8e954f6
ok 7 - write-tree establishes cache-tree
expecting success:
git read-tree HEAD &&
test-tool scrap-cache-tree &&
test_no_cache_tree
ok 8 - test-tool scrap-cache-tree works
expecting success:
test_commit bar &&
test_cache_tree
[master eeeeed8] bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar.t
ok 9 - second commit has cache-tree
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
test_write_lines p 1 "" s n y q |
git commit --interactive -m foo &&
test_cache_tree
[master d1075a6] add a file
Author: A U Thor <author@example.com>
1 file changed, 8 insertions(+)
create mode 100644 foo.c
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> staged unstaged path
1: unchanged +2/-2 [f]oo.c
Patch update>> staged unstaged path
* 1: unchanged +2/-2 [f]oo.c
Patch update>> 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,?]?
*** 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.
[master 65d7dde] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 10 - commit --interactive gives cache-tree on partial commit
expecting success:
mkdir -p deep/very-long-subdir &&
echo content >deep/very-long-subdir/file &&
git add deep &&
git commit -m add &&
git rm -r deep &&
before=$(wc -c <.git/index) &&
git commit -m delete -p &&
after=$(wc -c <.git/index) &&
# double check that the index shrank
test $before -gt $after &&
# and that our index was not corrupted
git fsck
[master 10c383a] add
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 deep/very-long-subdir/file
rm 'deep/very-long-subdir/file'
diff --git a/foo.c b/foo.c
index f0f3133..3f7f049 100644
--- a/foo.c
+++ b/foo.c
@@ -1,6 +1,6 @@
int foo()
{
-return 42;
+return 43;
}
int bar()
{
Stage this hunk [y,n,q,a,d,e,?]?
[master 73c66c3] delete
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 deep/very-long-subdir/file
dangling blob d238b40d1657b1cc3ebd9a3c55ef04f303c694ae
ok 11 - commit -p with shrinking cache-tree
expecting success:
mkdir dir &&
>dir/child.t &&
git add dir/child.t &&
git commit -m dir/child.t &&
test_cache_tree
[master d3413ee] dir/child.t
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 dir/child.t
ok 12 - commit in child dir has cache-tree
expecting success:
test-tool scrap-cache-tree &&
git reset --hard &&
test_cache_tree
HEAD is now at d3413ee dir/child.t
ok 13 - reset --hard gives cache-tree
expecting success:
rm -f .git/index &&
git reset --hard &&
test_cache_tree
HEAD is now at d3413ee dir/child.t
ok 14 - reset --hard without index gives cache-tree
expecting success:
git tag current &&
git checkout HEAD^ &&
test_cache_tree
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 73c66c3 delete
ok 15 - checkout gives cache-tree
expecting success:
git checkout current &&
git checkout -b prev HEAD^ &&
test_cache_tree
Previous HEAD position was 73c66c3 delete
HEAD is now at d3413ee dir/child.t
Previous HEAD position was d3413ee dir/child.t
Switched to a new branch 'prev'
ok 16 - checkout -b gives cache-tree
expecting success:
git checkout current &&
git checkout -B prev HEAD^ &&
test_cache_tree
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d3413ee dir/child.t
Previous HEAD position was d3413ee dir/child.t
Switched to and reset branch 'prev'
ok 17 - 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
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d3413ee dir/child.t
Switched to a new branch 'changes'
[changes 229c856] llamas
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 llamas.t
[changes f10d9f3] pachyderm
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 pachyderm.t
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d3413ee dir/child.t
Updating d3413ee..f10d9f3
Fast-forward
llamas.t | 1 +
pachyderm.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 llamas.t
create mode 100644 pachyderm.t
ok 18 - 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
Previous HEAD position was f10d9f3 pachyderm
HEAD is now at d3413ee dir/child.t
Switched to a new branch 'changes2'
[changes2 4b1575a] alpacas
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 alpacas.t
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d3413ee dir/child.t
[detached HEAD 5a63c6d] struthio
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 struthio.t
Merging:
5a63c6d struthio
virtual changes2
found 1 common ancestor:
d3413ee dir/child.t
Merge made by the 'recursive' strategy.
alpacas.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 alpacas.t
ok 19 - 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
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
e104fa1 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> e104fa1
Switched to a new branch 'partial'
[partial 6771940] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[partial cd7fad9] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[partial f24c7c2] partial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 20 - partial commit gives cache-tree
expecting success:
mkdir newdir &&
>newdir/one &&
git add newdir/one &&
git checkout 2>errors &&
test_must_be_empty errors
A newdir/one
M one.t
ok 21 - no phantom error when switching trees
expecting success:
(
sane_unset GIT_TEST_SPLIT_INDEX &&
git update-index --split-index &&
>split &&
git add split &&
test-tool dump-split-index .git/index | grep -v ^own >before &&
git commit -m "as-is" &&
test-tool dump-split-index .git/index | grep -v ^own >after &&
test_cmp before after
)
[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 22 - switching trees does not invalidate shared index
# passed all 22 test(s)
1..22
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0210-trace2-normal.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0210-trace2-normal/.git/
expecting success:
test_when_finished "rm trace.normal actual expect" &&
GIT_TRACE2="$(pwd)/trace.normal" test-tool trace2 001return 0 &&
perl "$TEST_DIRECTORY/t0210/scrub_normal.perl" <trace.normal >actual &&
cat >expect <<-EOF &&
version $V
start _EXE_ trace2 001return 0
cmd_name trace2 (trace2)
exit elapsed:_TIME_ code:0
atexit elapsed:_TIME_ code:0
EOF
test_cmp expect actual
ok 1 - normal stream, return code 0
expecting success:
test_when_finished "rm trace.normal actual expect" &&
test_must_fail env GIT_TRACE2="$(pwd)/trace.normal" test-tool trace2 001return 1 &&
perl "$TEST_DIRECTORY/t0210/scrub_normal.perl" <trace.normal >actual &&
cat >expect <<-EOF &&
version $V
start _EXE_ trace2 001return 1
cmd_name trace2 (trace2)
exit elapsed:_TIME_ code:1
atexit elapsed:_TIME_ code:1
EOF
test_cmp expect actual
ok 2 - normal stream, return code 1
expecting success:
test_when_finished "rm -r traces actual expect" &&
mkdir traces &&
GIT_TRACE2="$(pwd)/traces" test-tool trace2 001return 0 &&
perl "$TEST_DIRECTORY/t0210/scrub_normal.perl" <"$(ls traces/*)" >actual &&
cat >expect <<-EOF &&
version $V
start _EXE_ trace2 001return 0
cmd_name trace2 (trace2)
exit elapsed:_TIME_ code:0
atexit elapsed:_TIME_ code:0
EOF
test_cmp expect actual
ok 3 - automatic filename
expecting success:
test_when_finished "rm trace.normal actual expect" &&
GIT_TRACE2="$(pwd)/trace.normal" test-tool trace2 002exit 0 &&
perl "$TEST_DIRECTORY/t0210/scrub_normal.perl" <trace.normal >actual &&
cat >expect <<-EOF &&
version $V
start _EXE_ trace2 002exit 0
cmd_name trace2 (trace2)
exit elapsed:_TIME_ code:0
atexit elapsed:_TIME_ code:0
EOF
test_cmp expect actual
ok 4 - normal stream, exit code 0
expecting success:
test_when_finished "rm trace.normal actual expect" &&
test_must_fail env GIT_TRACE2="$(pwd)/trace.normal" test-tool trace2 002exit 1 &&
perl "$TEST_DIRECTORY/t0210/scrub_normal.perl" <trace.normal >actual &&
cat >expect <<-EOF &&
version $V
start _EXE_ trace2 002exit 1
cmd_name trace2 (trace2)
exit elapsed:_TIME_ code:1
atexit elapsed:_TIME_ code:1
EOF
test_cmp expect actual
ok 5 - normal stream, exit code 1
expecting success:
test_when_finished "rm trace.normal actual expect" &&
GIT_TRACE2="$(pwd)/trace.normal" test-tool trace2 003error "hello world" "this is a test" &&
perl "$TEST_DIRECTORY/t0210/scrub_normal.perl" <trace.normal >actual &&
cat >expect <<-EOF &&
version $V
start _EXE_ trace2 003error 'hello world' 'this is a test'
cmd_name trace2 (trace2)
error hello world
error this is a test
exit elapsed:_TIME_ code:0
atexit elapsed:_TIME_ code:0
EOF
test_cmp expect actual
error: hello world
error: this is a test
ok 6 - normal stream, error event
expecting success:
test_when_finished "rm trace.normal actual expect" &&
test_config_global trace2.normalBrief 1 &&
test_config_global trace2.normalTarget "$(pwd)/trace.normal" &&
test-tool trace2 001return 0 &&
perl "$TEST_DIRECTORY/t0210/scrub_normal.perl" <trace.normal >actual &&
cat >expect <<-EOF &&
version $V
start _EXE_ trace2 001return 0
cmd_name trace2 (trace2)
exit elapsed:_TIME_ code:0
atexit elapsed:_TIME_ code:0
EOF
test_cmp expect actual
ok 7 - using global config, normal stream, return code 0
expecting success:
test_when_finished "rm trace.normal actual expect real.gitconfig" &&
test_config_global trace2.normalBrief 1 &&
test_config_global trace2.normalTarget "$(pwd)/trace.normal" &&
mv "$(pwd)/.gitconfig" "$(pwd)/real.gitconfig" &&
test_config_global include.path "$(pwd)/real.gitconfig" &&
test-tool trace2 001return 0 &&
perl "$TEST_DIRECTORY/t0210/scrub_normal.perl" <trace.normal >actual &&
cat >expect <<-EOF &&
version $V
start _EXE_ trace2 001return 0
cmd_name trace2 (trace2)
exit elapsed:_TIME_ code:0
atexit elapsed:_TIME_ code:0
EOF
test_cmp expect actual
ok 8 - using global config with include
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0211-trace2-perf.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0211-trace2-perf/.git/
expecting success:
test_when_finished "rm trace.perf actual expect" &&
GIT_TRACE2_PERF="$(pwd)/trace.perf" test-tool trace2 001return 0 &&
perl "$TEST_DIRECTORY/t0211/scrub_perf.perl" <trace.perf >actual &&
cat >expect <<-EOF &&
d0|main|version|||||$V
d0|main|start||_T_ABS_|||_EXE_ trace2 001return 0
d0|main|cmd_name|||||trace2 (trace2)
d0|main|exit||_T_ABS_|||code:0
d0|main|atexit||_T_ABS_|||code:0
EOF
test_cmp expect actual
ok 1 - perf stream, return code 0
expecting success:
test_when_finished "rm trace.perf actual expect" &&
test_must_fail env GIT_TRACE2_PERF="$(pwd)/trace.perf" test-tool trace2 001return 1 &&
perl "$TEST_DIRECTORY/t0211/scrub_perf.perl" <trace.perf >actual &&
cat >expect <<-EOF &&
d0|main|version|||||$V
d0|main|start||_T_ABS_|||_EXE_ trace2 001return 1
d0|main|cmd_name|||||trace2 (trace2)
d0|main|exit||_T_ABS_|||code:1
d0|main|atexit||_T_ABS_|||code:1
EOF
test_cmp expect actual
ok 2 - perf stream, return code 1
expecting success:
test_when_finished "rm trace.perf actual expect" &&
GIT_TRACE2_PERF="$(pwd)/trace.perf" test-tool trace2 003error "hello world" "this is a test" &&
perl "$TEST_DIRECTORY/t0211/scrub_perf.perl" <trace.perf >actual &&
cat >expect <<-EOF &&
d0|main|version|||||$V
d0|main|start||_T_ABS_|||_EXE_ trace2 003error 'hello world' 'this is a test'
d0|main|cmd_name|||||trace2 (trace2)
d0|main|error|||||hello world
d0|main|error|||||this is a test
d0|main|exit||_T_ABS_|||code:0
d0|main|atexit||_T_ABS_|||code:0
EOF
test_cmp expect actual
error: hello world
error: this is a test
ok 3 - perf stream, error event
expecting success:
test_when_finished "rm trace.perf actual expect" &&
GIT_TRACE2_PERF="$(pwd)/trace.perf" test-tool trace2 004child test-tool trace2 004child test-tool trace2 001return 0 &&
perl "$TEST_DIRECTORY/t0211/scrub_perf.perl" <trace.perf >actual &&
cat >expect <<-EOF &&
d0|main|version|||||$V
d0|main|start||_T_ABS_|||_EXE_ trace2 004child test-tool trace2 004child test-tool trace2 001return 0
d0|main|cmd_name|||||trace2 (trace2)
d0|main|child_start||_T_ABS_|||[ch0] class:? argv: test-tool trace2 004child test-tool trace2 001return 0
d1|main|version|||||$V
d1|main|start||_T_ABS_|||_EXE_ trace2 004child test-tool trace2 001return 0
d1|main|cmd_name|||||trace2 (trace2/trace2)
d1|main|child_start||_T_ABS_|||[ch0] class:? argv: test-tool trace2 001return 0
d2|main|version|||||$V
d2|main|start||_T_ABS_|||_EXE_ trace2 001return 0
d2|main|cmd_name|||||trace2 (trace2/trace2/trace2)
d2|main|exit||_T_ABS_|||code:0
d2|main|atexit||_T_ABS_|||code:0
d1|main|child_exit||_T_ABS_|_T_REL_||[ch0] pid:_PID_ code:0
d1|main|exit||_T_ABS_|||code:0
d1|main|atexit||_T_ABS_|||code:0
d0|main|child_exit||_T_ABS_|_T_REL_||[ch0] pid:_PID_ code:0
d0|main|exit||_T_ABS_|||code:0
d0|main|atexit||_T_ABS_|||code:0
EOF
test_cmp expect actual
ok 4 - perf stream, child processes
expecting success:
test_when_finished "rm trace.perf actual expect" &&
test_config_global trace2.perfBrief 1 &&
test_config_global trace2.perfTarget "$(pwd)/trace.perf" &&
test-tool trace2 001return 0 &&
perl "$TEST_DIRECTORY/t0211/scrub_perf.perl" <trace.perf >actual &&
cat >expect <<-EOF &&
d0|main|version|||||$V
d0|main|start||_T_ABS_|||_EXE_ trace2 001return 0
d0|main|cmd_name|||||trace2 (trace2)
d0|main|exit||_T_ABS_|||code:0
d0|main|atexit||_T_ABS_|||code:0
EOF
test_cmp expect actual
ok 5 - using global config, perf stream, return code 0
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0300-credentials.sh ***
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"
ok 1 - setup helper scripts
expecting success:
check fill "verbatim foo bar" <<-\EOF
--
username=foo
password=bar
--
verbatim: get
EOF
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 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 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
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 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 7 - credential_approve calls all helpers
expecting success:
check approve useless <<-\EOF
username=foo
--
--
EOF
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
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 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 11 - usernames can be overridden
expecting success:
check fill "verbatim three four" <<-\EOF
username=one
password=two
--
username=one
password=two
--
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 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 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 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 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 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 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 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 &&
test_must_be_empty stdout
fatal: credential helper '!f() { echo quit=1; }; f' told us to quit
ok 20 - helpers can abort the process
expecting success:
test_config credential.helper "verbatim file file" &&
check fill "" "verbatim cmdline cmdline" <<-\EOF
--
username=cmdline
password=cmdline
--
verbatim: get
EOF
ok 21 - empty helper spec resets helper list
# passed all 21 test(s)
1..21
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0212-trace2-event.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0212-trace2-event/.git/
expecting success:
test_when_finished "rm trace.event actual expect" &&
GIT_TRACE2_EVENT="$(pwd)/trace.event" test-tool trace2 003error "hello world" "this is a test" &&
perl "$TEST_DIRECTORY/t0212/parse_events.perl" <trace.event >actual &&
sed -e "s/^|//" >expect <<-EOF &&
|VAR1 = {
| "_SID0_":{
| "argv":[
| "_EXE_",
| "trace2",
| "003error",
| "hello world",
| "this is a test"
| ],
| "errors":[
| "%s",
| "%s"
| ],
| "exit_code":0,
| "hierarchy":"trace2",
| "name":"trace2",
| "version":"$V"
| }
|};
EOF
test_cmp expect actual
error: hello world
error: this is a test
ok 1 - event stream, error event
expecting success:
test_when_finished "rm trace.event actual expect" &&
GIT_TRACE2_EVENT="$(pwd)/trace.event" test-tool trace2 004child test-tool trace2 004child test-tool trace2 001return 0 &&
perl "$TEST_DIRECTORY/t0212/parse_events.perl" <trace.event >actual &&
sed -e "s/^|//" >expect <<-EOF &&
|VAR1 = {
| "_SID0_":{
| "argv":[
| "_EXE_",
| "trace2",
| "004child",
| "test-tool",
| "trace2",
| "004child",
| "test-tool",
| "trace2",
| "001return",
| "0"
| ],
| "child":{
| "0":{
| "child_argv":[
| "_EXE_",
| "trace2",
| "004child",
| "test-tool",
| "trace2",
| "001return",
| "0"
| ],
| "child_class":"?",
| "child_code":0,
| "use_shell":0
| }
| },
| "exit_code":0,
| "hierarchy":"trace2",
| "name":"trace2",
| "version":"$V"
| },
| "_SID0_/_SID1_":{
| "argv":[
| "_EXE_",
| "trace2",
| "004child",
| "test-tool",
| "trace2",
| "001return",
| "0"
| ],
| "child":{
| "0":{
| "child_argv":[
| "_EXE_",
| "trace2",
| "001return",
| "0"
| ],
| "child_class":"?",
| "child_code":0,
| "use_shell":0
| }
| },
| "exit_code":0,
| "hierarchy":"trace2/trace2",
| "name":"trace2",
| "version":"$V"
| },
| "_SID0_/_SID1_/_SID2_":{
| "argv":[
| "_EXE_",
| "trace2",
| "001return",
| "0"
| ],
| "exit_code":0,
| "hierarchy":"trace2/trace2/trace2",
| "name":"trace2",
| "version":"$V"
| }
|};
EOF
test_cmp expect actual
ok 2 - event stream, return code 0
expecting success:
test_when_finished "rm trace.event actual expect" &&
git config --local t0212.abc 1 &&
git config --local t0212.def "hello world" &&
GIT_TRACE2_EVENT="$(pwd)/trace.event" GIT_TRACE2_CONFIG_PARAMS="t0212.*" test-tool trace2 001return 0 &&
perl "$TEST_DIRECTORY/t0212/parse_events.perl" <trace.event >actual &&
sed -e "s/^|//" >expect <<-EOF &&
|VAR1 = {
| "_SID0_":{
| "argv":[
| "_EXE_",
| "trace2",
| "001return",
| "0"
| ],
| "exit_code":0,
| "hierarchy":"trace2",
| "name":"trace2",
| "params":[
| {
| "param":"t0212.abc",
| "value":"1"
| },
| {
| "param":"t0212.def",
| "value":"hello world"
| }
| ],
| "version":"$V"
| }
|};
EOF
test_cmp expect actual
ok 3 - event stream, list config
expecting success:
test_when_finished "rm trace.event actual expect" &&
GIT_TRACE2_EVENT="$(pwd)/trace.event" test-tool trace2 006data test_category k1 v1 test_category k2 v2 &&
perl "$TEST_DIRECTORY/t0212/parse_events.perl" <trace.event >actual &&
sed -e "s/^|//" >expect <<-EOF &&
|VAR1 = {
| "_SID0_":{
| "argv":[
| "_EXE_",
| "trace2",
| "006data",
| "test_category",
| "k1",
| "v1",
| "test_category",
| "k2",
| "v2"
| ],
| "data":{
| "test_category":{
| "k1":"v1",
| "k2":"v2"
| }
| },
| "exit_code":0,
| "hierarchy":"trace2",
| "name":"trace2",
| "version":"$V"
| }
|};
EOF
test_cmp expect actual
ok 4 - basic trace2_data
expecting success:
test_when_finished "rm trace.event actual expect" &&
test_config_global trace2.eventTarget "$(pwd)/trace.event" &&
test-tool trace2 003error "hello world" "this is a test" &&
perl "$TEST_DIRECTORY/t0212/parse_events.perl" <trace.event >actual &&
sed -e "s/^|//" >expect <<-EOF &&
|VAR1 = {
| "_SID0_":{
| "argv":[
| "_EXE_",
| "trace2",
| "003error",
| "hello world",
| "this is a test"
| ],
| "errors":[
| "%s",
| "%s"
| ],
| "exit_code":0,
| "hierarchy":"trace2",
| "name":"trace2",
| "version":"$V"
| }
|};
EOF
test_cmp expect actual
error: hello world
error: this is a test
ok 5 - using global config, event stream, error event
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0303-credential-external.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0303-credential-external/.git/
1..0 # SKIP used to test external credential helpers
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0302-credential-store.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0302-credential-store/.git/
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 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
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 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 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 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 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 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 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
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
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
ok 11 - helper (store) remembers other user
expecting success:
check approve $HELPER <<-\EOF &&
protocol=https
host=sso.tld
username=
password=
EOF
check fill $HELPER <<-\EOF
protocol=https
host=sso.tld
--
protocol=https
host=sso.tld
username=
password=
EOF
ok 12 - helper (store) can store empty username
expecting success:
test_path_is_missing "$HOME/.config/git/credentials" &&
test -s "$HOME/.git-credentials"
ok 13 - 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 14 - 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 15 - helper (store) has no existing data
expecting success:
check approve $HELPER <<-\EOF
protocol=https
host=example.com
username=store-user
password=store-pass
EOF
ok 16 - 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 17 - 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 18 - 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 19 - 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 20 - 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 21 - 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 22 - 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 23 - 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 24 - 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 25 - helper (store) remembers other user
expecting success:
check approve $HELPER <<-\EOF &&
protocol=https
host=sso.tld
username=
password=
EOF
check fill $HELPER <<-\EOF
protocol=https
host=sso.tld
--
protocol=https
host=sso.tld
username=
password=
EOF
ok 26 - helper (store) can store empty username
expecting success:
test -s "$HOME/.config/git/credentials" &&
test_path_is_missing "$HOME/.git-credentials"
ok 27 - when xdg file exists, home file not created
expecting success:
rm -f "$HOME/.git-credentials" &&
rm -f "$HOME/.config/git/credentials" &&
mkdir -p "$HOME/xdg/git" &&
>"$HOME/xdg/git/credentials"
ok 28 - 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 29 - helper (store) has no existing data
expecting success:
check approve $HELPER <<-\EOF
protocol=https
host=example.com
username=store-user
password=store-pass
EOF
ok 30 - 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 31 - 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 32 - 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 33 - 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 34 - 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 35 - 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 36 - 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 37 - 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 38 - 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 39 - helper (store) remembers other user
expecting success:
check approve $HELPER <<-\EOF &&
protocol=https
host=sso.tld
username=
password=
EOF
check fill $HELPER <<-\EOF
protocol=https
host=sso.tld
--
protocol=https
host=sso.tld
username=
password=
EOF
ok 40 - helper (store) can store empty username
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 41 - 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
ok 42 - 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 43 - get: use xdg file if home file has no matches
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 -r SANETESTD.1/x &&
chmod -rx SANETESTD.2 ||
BUG "cannot prepare SANETESTD"
! test -r SANETESTD.1/x &&
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
BUG "cannot clean SANETESTD"
return $status
)
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 44 - 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"
ok 45 - 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"
ok 46 - erase: erase matching credentials from both xdg and home files
# passed all 46 test(s)
1..46
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0301-credential-cache.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0301-credential-cache/.git/
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 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 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 - 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
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 - 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 - 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 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 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 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 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 11 - helper (cache) remembers other user
expecting success:
check approve $HELPER <<-\EOF &&
protocol=https
host=sso.tld
username=
password=
EOF
check fill $HELPER <<-\EOF
protocol=https
host=sso.tld
--
protocol=https
host=sso.tld
username=
password=
EOF
ok 12 - helper (cache) can store empty username
expecting success:
test_when_finished "
git credential-cache exit &&
rmdir -p .cache/git/credential/
" &&
test_path_is_missing "$HOME/.git-credential-cache" &&
test -S "$HOME/.cache/git/credential/socket"
ok 13 - socket defaults to ~/.cache/git/credential/socket
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 14 - 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 15 - 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 16 - 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
ok 17 - 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 18 - 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 19 - 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 20 - 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 21 - 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 22 - 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 23 - 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 24 - helper (cache) remembers other user
expecting success:
check approve $HELPER <<-\EOF &&
protocol=https
host=sso.tld
username=
password=
EOF
check fill $HELPER <<-\EOF
protocol=https
host=sso.tld
--
protocol=https
host=sso.tld
username=
password=
EOF
ok 25 - helper (cache) can store empty username
expecting success:
test_when_finished "git credential-cache exit" &&
test -S "$XDG_CACHE_HOME/git/credential/socket" &&
test_path_is_missing "$HOME/.git-credential-cache/socket" &&
test_path_is_missing "$HOME/.cache/git/credential/socket"
ok 26 - use custom XDG_CACHE_HOME if set and default sockets are not created
expecting success:
test_when_finished "
git credential-cache exit --socket \"\$HOME/dir/socket\" &&
rmdir \"\$HOME/dir\"
" &&
check approve "cache --socket \"\$HOME/dir/socket\"" <<-\EOF &&
protocol=https
host=example.com
username=store-user
password=store-pass
EOF
test -S "$HOME/dir/socket"
ok 27 - credential-cache --socket option overrides default location
expecting success:
test_when_finished "
git credential-cache exit &&
sane_unset XDG_CACHE_HOME
" &&
check approve cache <<-\EOF &&
protocol=https
host=example.com
username=store-user
password=store-pass
EOF
test -S "$HOME/.cache/git/credential/socket" &&
XDG_CACHE_HOME="$HOME/xdg" &&
export XDG_CACHE_HOME &&
check approve cache <<-\EOF &&
protocol=https
host=example.com
username=store-user
password=store-pass
EOF
test -S "$XDG_CACHE_HOME/git/credential/socket"
ok 28 - use custom XDG_CACHE_HOME even if xdg socket exists
expecting success:
test_when_finished "
git credential-cache exit &&
rmdir \"\$HOME/.git-credential-cache/\"
" &&
mkdir -p -m 700 "$HOME/.git-credential-cache/" &&
check approve cache <<-\EOF &&
protocol=https
host=example.com
username=store-user
password=store-pass
EOF
test -S "$HOME/.git-credential-cache/socket"
ok 29 - use user socket if user directory exists
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:
test_when_finished "
git credential-cache exit &&
rmdir \"\$HOME/dir/\" &&
rm \"\$HOME/.git-credential-cache\"
" &&
mkdir -p -m 700 "$HOME/dir/" &&
ln -s "$HOME/dir" "$HOME/.git-credential-cache" &&
check approve cache <<-\EOF &&
protocol=https
host=example.com
username=store-user
password=store-pass
EOF
test -S "$HOME/.git-credential-cache/socket"
ok 30 - use user socket if user directory is a symlink to a directory
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 31 - helper (cache --timeout=1) times out
# passed all 31 test(s)
1..31
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1001-read-tree-m-2way.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1001-read-tree-m-2way/.git/
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
treeH ca3aa9e6ee09349df7db6f0de15016afcdf5d9e4
100644 blob 3e8d9abb979a4fbdc93309f457a5496bc41ba6ab bozbar
100644 blob dca6b92303befc93086aa025d90a5facd7eb2812 nitfol
100644 blob 766498d93a4b06057a8e49d23f4068f1170ff38f rezrov
treeM d2c045ead2ecb56f2632385a395918bf21816c12
100644 blob 346d4e61f111336a1443ef6b2e834aa5b1a7f91a bozbar
100644 blob 8e4020bb5a8d8c873b25de15933e75cc0fc275df frotz
100644 blob dca6b92303befc93086aa025d90a5facd7eb2812 nitfol
: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
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
bozbar: dirty
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
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
100644 0a41e115ab61be0328a19b29f18cdcb49338d516 0 yomin
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
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
100644 0a41e115ab61be0328a19b29f18cdcb49338d516 0 yomin
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
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
frotz: clean
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
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
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
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
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
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
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
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
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
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
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 7e1bf714fb103c778a21dd67411666901222425a 0 nitfol
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
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 7e1bf714fb103c778a21dd67411666901222425a 0 nitfol
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
error: Entry 'bozbar' 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
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
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
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
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
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
100644 346d4e61f111336a1443ef6b2e834aa5b1a7f91a 0 bozbar
100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0 frotz
100644 dca6b92303befc93086aa025d90a5facd7eb2812 0 nitfol
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
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
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
treeDF 6bf22db9043f2b5821c019d0ce0f2605421affcb
100644 blob 052efc3abbc31348f7abd34535b1953d38273257 DF
treeDFDF c38e296263d024b0f48c4a728d293232ac6c5443
040000 tree 90bbead36f4d6a7c325fd450e6cfbcc7479d421a DF
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 &&
:
100644 b90ea14b2dd74b6f377c10870b3757344bbe077c 0 DF/DF
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
treeM 496d6428b9cf92981dc9495211e6e1120fb6f2ba
100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 a
treeH 4b825dc642cb6eb9a060e54bf8d69288fbee4904
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: Updating 'a' would lose untracked files in it
error: Updating 'a' would lose untracked files in it
ok 25 - a/b (untracked) vs a, plus c/d case test.
expecting success:
cat <<-EOF >expect &&
error: Updating 'fictional/a' would lose untracked files in it
EOF
test_must_fail git --super-prefix fictional/ read-tree -u -m "$treeH" "$treeM" 2>actual &&
test_cmp expect actual
ok 26 - read-tree supports the super-prefix
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
treeM 3e82e8b9894d6c7982dcd25a6dad66400d52735f
100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 a
040000 tree 2a26db49a6962700da5bd4084ae0e5a22d6583ee c
treeH 02c6f058fb950781e5b773c21e4c237db1ff4d5a
040000 tree 4277b6e69d25e5efa77c455340557b384a4c018a a
040000 tree 2a26db49a6962700da5bd4084ae0e5a22d6583ee c
ok 27 - 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
ok 28 - 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
[master (root-commit) f8412cc] 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
[master 72df7b8] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 29 - -m references the correct modified tree
# passed all 29 test(s)
1..29
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1000-read-tree-m-3way.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1000-read-tree-m-3way/.git/
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 1 - adding test file NN and Z/NN
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 2 - adding test file ND and Z/ND
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 3 - adding test file NM and Z/NM
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 4 - adding test file DN and Z/DN
expecting success: git update-index --add $p &&
git update-index --add Z/$p
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 7 - adding test file MN and Z/MN
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 8 - adding test file MD and Z/MD
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 9 - adding test file MM and Z/MM
expecting success: git update-index --add SS
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)
ok 12 - prepare initial tree
expecting success: git update-index --remove $to_remove
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
ok 15 - change in branch A (modification)
expecting success: git update-index MN
ok 16 - change in branch A (modification)
expecting success: git update-index Z/MD
ok 17 - change in branch A (modification)
expecting success: git update-index Z/MM
ok 18 - change in branch A (modification)
expecting success: git update-index Z/MN
ok 19 - change in branch A (modification)
expecting success: git update-index --add AN
ok 20 - change in branch A (addition)
expecting success: git update-index --add AA
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)
expecting success: git update-index TT
ok 25 - change in branch A (edit)
expecting success: git update-index --add DF/DF
ok 26 - change in branch A (change file to directory)
expecting success: tree_A=$(git write-tree)
ok 27 - recording branch A tree
expecting success: git read-tree $tree_O &&
git checkout-index -a
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
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
ok 35 - change in branch B (modification)
expecting success: git update-index --add NA
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 38 - change in branch B (addition)
expecting success: git update-index --add Z/AA
ok 39 - change in branch B (addition)
expecting success: git update-index --add LL &&
git update-index SS
ok 40 - change in branch B (addition and modification)
expecting success: git update-index TT
ok 41 - change in branch B (modification)
expecting success: git update-index --add DF
ok 42 - change in branch B (addition of a file to conflict with directory)
expecting success: tree_B=$(git write-tree)
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
ok 44 - keep contents of 3 trees for easy access
expecting success:
rm -fr [NDMALTS][NDMALTSF] Z &&
rm .git/index &&
read_tree_must_succeed -m $tree_O $tree_A $tree_B &&
check_result
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 $tree_A &&
git checkout-index -f -u -a &&
read_tree_must_succeed -m $tree_O $tree_A $tree_B &&
check_result
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 $tree_O $tree_A $tree_B
error: Entry 'XX' would be overwritten by merge. Cannot merge.
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 $tree_O $tree_A $tree_B
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 $tree_O $tree_A $tree_B
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 $tree_O $tree_A $tree_B &&
check_result
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 $tree_O $tree_A $tree_B
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 $tree_O $tree_A $tree_B
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 $tree_O $tree_A $tree_B &&
check_result
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 $tree_O $tree_A $tree_B
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 $tree_O $tree_A $tree_B
error: Entry 'AA' would be overwritten by merge. Cannot merge.
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 $tree_O $tree_A $tree_B &&
check_result
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 $tree_O $tree_A $tree_B &&
check_result
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 $tree_O $tree_A $tree_B
error: Entry 'LL' would be overwritten by merge. Cannot merge.
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 $tree_O $tree_A $tree_B
error: Entry 'DD' would be overwritten by merge. Cannot merge.
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 $tree_O $tree_A $tree_B
error: Entry 'DM' would be overwritten by merge. Cannot merge.
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 $tree_O $tree_A $tree_B
error: Entry 'DN' would be overwritten by merge. Cannot merge.
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 $tree_O $tree_A $tree_B &&
check_result
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 $tree_O $tree_A $tree_B
error: Entry 'MD' not uptodate. Cannot merge.
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 $tree_O $tree_A $tree_B
error: Entry 'MD' would be overwritten by merge. Cannot merge.
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 $tree_O $tree_A $tree_B &&
check_result
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 $tree_O $tree_A $tree_B
error: Entry 'ND' not uptodate. Cannot merge.
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 $tree_O $tree_A $tree_B
error: Entry 'ND' would be overwritten by merge. Cannot merge.
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 $tree_O $tree_A $tree_B &&
check_result
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 $tree_O $tree_A $tree_B
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 $tree_O $tree_A $tree_B
error: Entry 'MM' would be overwritten by merge. Cannot merge.
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 $tree_O $tree_A $tree_B &&
check_result
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 $tree_O $tree_A $tree_B &&
check_result
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 $tree_O $tree_A $tree_B
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 $tree_O $tree_A $tree_B &&
check_result
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 $tree_O $tree_A $tree_B &&
check_result
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 $tree_O $tree_A $tree_B &&
check_result
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 $tree_O $tree_A $tree_B &&
check_result
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 $tree_O $tree_A $tree_B
error: Entry 'NM' not uptodate. Cannot merge.
error: Entry 'NM' not uptodate. Cannot merge.
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 $tree_O $tree_A $tree_B
error: Entry 'NM' would be overwritten by merge. Cannot 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 $tree_O $tree_A $tree_B &&
check_result
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 $tree_O $tree_A $tree_B &&
check_result
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 $tree_O $tree_A $tree_B
error: Entry 'NN' would be overwritten by merge. Cannot merge.
error: Entry 'NN' would be overwritten by merge. Cannot merge.
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
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
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1003-read-tree-prefix.sh ***
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
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
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1002-read-tree-m-u-2way.sh ***
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 &&
cp bozbar bozbar.M &&
cp frotz frotz.M &&
cp nitfol nitfol.M &&
git diff-tree $treeH $treeM
treeH 661afa9096b7e2d4b9a28a6e43736cd0b06d1308
100644 blob 78d812a2124ff980a1a70f8cca493698d643d242 bozbar
100644 blob dca6b92303befc93086aa025d90a5facd7eb2812 nitfol
100644 blob 766498d93a4b06057a8e49d23f4068f1170ff38f rezrov
treeM 05bf9652e9b06473d6ca2f32ff60e2401e59bfa6
100644 blob bb3b2cd2e136e1e4e7ecdf10068e246196dd8294 bozbar
100644 blob 8e4020bb5a8d8c873b25de15933e75cc0fc275df frotz
100644 blob dca6b92303befc93086aa025d90a5facd7eb2812 nitfol
: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 &&
test_cmp bozbar.M bozbar &&
test_cmp frotz.M frotz &&
test_cmp nitfol.M nitfol &&
check_cache_at bozbar clean &&
check_cache_at frotz clean &&
check_cache_at nitfol clean
bozbar: clean
frotz: clean
nitfol: clean
ok 2 - 1, 2, 3 - no carry forward
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 &&
test_cmp bozbar.M bozbar &&
test_cmp frotz.M frotz &&
test_cmp nitfol.M nitfol &&
echo yomin >yomin1 &&
diff yomin yomin1 &&
rm -f yomin1
yomin: clean
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 &&
test_cmp bozbar.M bozbar &&
test_cmp frotz.M frotz &&
test_cmp nitfol.M nitfol &&
: dirty index should have prevented -u from checking it out. &&
echo yomin yomin >yomin1 &&
diff yomin yomin1 &&
rm -f yomin1
yomin: dirty
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 &&
test_cmp bozbar.M bozbar &&
test_cmp frotz.M frotz &&
test_cmp nitfol.M nitfol &&
echo frotz >frotz1 &&
diff frotz frotz1 &&
rm -f frotz1
frotz: clean
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 &&
test_cmp bozbar.M bozbar &&
test_cmp nitfol.M nitfol &&
: dirty index should have prevented -u from checking it out. &&
echo frotz frotz >frotz1 &&
diff frotz frotz1 &&
rm -f frotz1
frotz: dirty
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
error: Entry 'frotz' would be overwritten by merge. Cannot merge.
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
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 &&
test_cmp bozbar.M bozbar &&
test_cmp frotz.M frotz &&
test_cmp nitfol.M nitfol
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
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
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
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 &&
test_cmp bozbar.M bozbar &&
test_cmp frotz.M frotz &&
check_cache_at nitfol clean &&
echo nitfol nitfol >nitfol1 &&
diff nitfol nitfol1 &&
rm -f nitfol1
nitfol: clean
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 &&
test_cmp bozbar.M bozbar &&
test_cmp frotz.M frotz &&
echo nitfol nitfol nitfol >nitfol1 &&
diff nitfol nitfol1 &&
rm -f nitfol1
nitfol: dirty
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
error: Entry 'bozbar' would be overwritten by merge. Cannot merge.
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
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 &&
test_cmp bozbar.M bozbar &&
test_cmp frotz.M frotz &&
test_cmp nitfol.M nitfol
bozbar: clean
ok 17 - 18 - local change already having a good result.
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 &&
test_cmp frotz.M frotz &&
test_cmp nitfol.M nitfol &&
echo gnusto gnusto >bozbar1 &&
diff bozbar bozbar1 &&
rm -f bozbar1
bozbar: dirty
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 &&
test_cmp bozbar.M bozbar &&
test_cmp frotz.M frotz &&
test_cmp nitfol.M nitfol
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
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
treeDF 6bf22db9043f2b5821c019d0ce0f2605421affcb
100644 blob 052efc3abbc31348f7abd34535b1953d38273257 DF
treeDFDF c38e296263d024b0f48c4a728d293232ac6c5443
040000 tree 90bbead36f4d6a7c325fd450e6cfbcc7479d421a DF
ok 21 - 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_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
DF/DF: clean
ok 22 - DF vs DF/DF case test.
# passed all 22 test(s)
1..22
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1004-read-tree-m-u-wf.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1004-read-tree-m-u-wf/.git/
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"
[master (root-commit) 55193a2] 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
file2 is not tracked on the master anymore
[master 12f45b3] master removes file2 and subdir/file2
Author: A U Thor <author@example.com>
2 files changed, 2 deletions(-)
delete mode 100644 file2
delete mode 100644 subdir/file2
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
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
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
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
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
Switched to branch 'side'
D file2
D subdir/file2
[side 90a9d7e] 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
Switched to branch 'master'
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
HEAD is now at 12f45b3 master removes file2 and subdir/file2
Already on 'master'
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
HEAD is now at 12f45b3 master removes file2 and subdir/file2
Already on 'master'
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
HEAD is now at 12f45b3 master removes file2 and subdir/file2
Switched to a new branch 'side-a'
[side-a 825abba] side-a changes file1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to a new branch 'side-b'
[side-b 43a66f1] side-b changes file2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'side-a'
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
HEAD is now at 825abba side-a changes file1
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
HEAD is now at 825abba side-a changes file1
error: Entry 'file2' not uptodate. Cannot merge.
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
HEAD is now at 825abba side-a changes file1
Switched to a new branch 'sym-b'
[sym-b 1ccea4c] side adds a/b
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a/b
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
[sym-a 67d7a5b] we add a/b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 120000 a/b
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 -r SANETESTD.1/x &&
chmod -rx SANETESTD.2 ||
BUG "cannot prepare SANETESTD"
! test -r SANETESTD.1/x &&
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
BUG "cannot clean SANETESTD"
return $status
)
rm: cannot remove 'SANETESTD.1/x': Permission denied
prerequisite SANITY ok
expecting success:
test_when_finished "chmod u+w a 2>/dev/null; rm -fr a b" &&
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 67d7a5b we add a/b
Already on 'sym-a'
error: unable to unlink old 'a/b': Permission denied
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 67d7a5b we add a/b
Switched to branch 'side-a'
[side-a ac1c73d] 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 expect actual
Switched to branch 'side-b'
ok 15 - D/F
expecting success:
git reset --hard &&
git checkout side-b &&
git merge-resolve branch-point -- side-b side-a
warning: unable to unlink 'subdir/file2/another': Not a directory
HEAD is now at 43a66f1 side-b changes file2
Already on 'side-b'
Trying simple merge.
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 43a66f1 side-b changes file2
Already on 'side-b'
Merging side-b with side-a
Merging:
43a66f1 side-b changes file2
ac1c73d side-a changes file2 to directory
found 1 common ancestor:
55193a2 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
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1005-read-tree-reset.sh ***
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
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1005-read-tree-reset/.git/
[master (root-commit) e85fc2d] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 df/file
[master cf9bf70] 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
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
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 df
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 new
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 1 old
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 3 old
ok 3 - reset should remove remnants from a failed merge
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
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 df
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 new
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 1 old
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 3 old
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
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 df
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 new
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 1 old
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 3 old
HEAD is now at cf9bf70 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
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 df
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 new
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 1 old
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 3 old
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
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 df
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 new
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 1 old
100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 3 old
ok 7 - Porcelain checkout -f HEAD should remove remnants too
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0410-partial-clone.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/.git/
expecting success:
test_create_repo server &&
git clone --filter="blob:none" "file://$(pwd)/server" client &&
git -C client config --unset core.partialclonefilter &&
git -C client fetch origin
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/server/.git/
Cloning into 'client'...
warning: You appear to have cloned an empty repository.
ok 1 - extensions.partialclone without filter
expecting success:
rm -rf repo &&
test_create_repo repo &&
test_commit -C repo my_commit &&
A=$(git -C repo commit-tree -m a HEAD^{tree}) &&
C=$(git -C repo commit-tree -m c -p $A HEAD^{tree}) &&
# Reference $A only from reflog, and delete it
git -C repo branch my_branch "$A" &&
git -C repo branch -f my_branch my_commit &&
delete_object repo "$A" &&
# State that we got $C, which refers to $A, from promisor
printf "$C\n" | pack_as_from_promisor &&
# Normally, it fails
test_must_fail git -C repo fsck &&
# But with the extension, it succeeds
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "arbitrary string" &&
git -C repo fsck
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/repo/.git/
[master (root-commit) f875b73] my_commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 my_commit.t
738adde9f5fe99553a2e3813bb92cbbbdef79ef1
error: refs/heads/my_branch: invalid reflog entry 31566d0be6253fd37a1ef5087a6d3933a45883a0
error: refs/heads/my_branch: invalid reflog entry 31566d0be6253fd37a1ef5087a6d3933a45883a0
dangling commit 4a7ce5332e0d121c1ab9428e15a83f4bb770acd7
dangling commit 4a7ce5332e0d121c1ab9428e15a83f4bb770acd7
ok 2 - missing reflog object, but promised by a commit, passes fsck
expecting success:
rm -rf repo &&
test_create_repo repo &&
test_commit -C repo my_commit &&
A=$(git -C repo commit-tree -m a HEAD^{tree}) &&
git -C repo tag -a -m d my_tag_name $A &&
T=$(git -C repo rev-parse my_tag_name) &&
git -C repo tag -d my_tag_name &&
# Reference $A only from reflog, and delete it
git -C repo branch my_branch "$A" &&
git -C repo branch -f my_branch my_commit &&
delete_object repo "$A" &&
# State that we got $T, which refers to $A, from promisor
printf "$T\n" | pack_as_from_promisor &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "arbitrary string" &&
git -C repo fsck
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/repo/.git/
[master (root-commit) 4ce2b9b] my_commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 my_commit.t
Deleted tag 'my_tag_name' (was 7a32993)
7fd8925735cc15e2e2034644b64afda491571ff8
dangling tag 7a329936d66f427bedc89d9ab903f38b07d44de7
ok 3 - missing reflog object, but promised by a tag, passes fsck
expecting success:
rm -rf repo &&
test_create_repo repo &&
test_commit -C repo my_commit &&
A=$(git -C repo commit-tree -m a HEAD^{tree}) &&
B=$(git -C repo commit-tree -m b HEAD^{tree}) &&
# Reference $A only from reflog, and delete it
git -C repo branch my_branch "$A" &&
git -C repo branch -f my_branch my_commit &&
delete_object repo "$A" &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "arbitrary string" &&
test_must_fail git -C repo fsck
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/repo/.git/
[master (root-commit) 2f3d175] my_commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 my_commit.t
error: refs/heads/my_branch: invalid reflog entry c51de19226c13fa1daecab9e08d2f0b99a29784c
error: refs/heads/my_branch: invalid reflog entry c51de19226c13fa1daecab9e08d2f0b99a29784c
dangling commit e376c76e48cd8763bb0961aa8f03e5b8642908a8
ok 4 - missing reflog object alone fails fsck, even with extension set
expecting success:
rm -rf repo &&
test_create_repo repo &&
test_commit -C repo my_commit &&
A=$(git -C repo commit-tree -m a HEAD^{tree}) &&
# Reference $A only from ref
git -C repo branch my_branch "$A" &&
promise_and_delete "$A" &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "arbitrary string" &&
git -C repo fsck
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/repo/.git/
[master (root-commit) 9df77b9] my_commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 my_commit.t
a391e3e0447189aa0050c8f206462a1b0530a34a
dangling tag e5f4cb9fd329c512b08fb81a8e6b1f5e27658263
ok 5 - missing ref object, but promised, passes fsck
expecting success:
rm -rf repo &&
test_create_repo repo &&
test_commit -C repo 1 &&
test_commit -C repo 2 &&
test_commit -C repo 3 &&
git -C repo tag -a annotated_tag -m "annotated tag" &&
C=$(git -C repo rev-parse 1) &&
T=$(git -C repo rev-parse 2^{tree}) &&
B=$(git hash-object repo/3.t) &&
AT=$(git -C repo rev-parse annotated_tag) &&
promise_and_delete "$C" &&
promise_and_delete "$T" &&
promise_and_delete "$B" &&
promise_and_delete "$AT" &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "arbitrary string" &&
git -C repo fsck
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/repo/.git/
[master (root-commit) 6591d03] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1.t
[master 5355e57] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2.t
[master a3007a6] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 3.t
fa10eb4e855a356f0abe9c352b62b71d481918b1
error: refs/tags/1 does not point to a valid object!
7f935f1293a005998d684b122686a1125dc47996
error: refs/tags/1 does not point to a valid object!
43db30889c483ee89571157f1466e2809e137c7d
hint: You have created a nested tag. The object referred to by your new tag is
hint: already a tag. If you meant to tag the object that it points to, use:
hint:
hint: git tag -f my_annotated_tag 3936a07032bfd1b3a5ba103a4a94cd2be57b9ce4^{}
error: refs/tags/1 does not point to a valid object!
544d2af112f571c9dceb598e755c68cb22911767
dangling tag 8e5058c0196ed6a9b285609a259f40e05437cfad
dangling tag 4ff31e389c270b26919d9e89e743f1bc4e9d1907
dangling tree dcf3d5d7c6d10fb961287ca9bc59a5bf8a4b2afc
dangling tag 5d1357650c0c7fa7890a88ef5f3b44637843a883
dangling tag be645be2ea79274538b1d7a002db7f261d7dc509
ok 6 - missing object, but promised, passes fsck
expecting success:
rm -rf repo &&
test_create_repo repo &&
test_commit -C repo my_commit &&
A=$(git -C repo commit-tree -m a HEAD^{tree}) &&
promise_and_delete "$A" &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "arbitrary string" &&
git -C repo fsck "$A"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/repo/.git/
[master (root-commit) da2e7de] my_commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 my_commit.t
4337bf55380117d69ad62e8b0aa5d048dce2f274
dangling tag 802319328bf3f4f53ce55aecd93e94ecf6f26c32
dangling commit da2e7de93032e847edfceb74ec173302d3f32ceb
ok 7 - missing CLI object, but promised, passes fsck
expecting success:
rm -rf repo &&
test_create_repo server &&
test_commit -C server foo &&
git -C server repack -a -d --write-bitmap-index &&
git clone "file://$(pwd)/server" repo &&
HASH=$(git -C repo rev-parse foo) &&
rm -rf repo/.git/objects/* &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "origin" &&
git -C repo cat-file -p "$HASH" &&
# Ensure that the .promisor file is written, and check that its
# associated packfile contains the object
ls repo/.git/objects/pack/pack-*.promisor >promisorlist &&
test_line_count = 1 promisorlist &&
IDX=$(cat promisorlist | sed "s/promisor$/idx/") &&
git verify-pack --verbose "$IDX" | grep "$HASH"
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/server/.git/
[master (root-commit) 92a62de] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
Cloning into 'repo'...
warning: filtering not recognized by server, ignoring
tree 64fd3796c57084e7b8cbae358ce37970b8e954f6
author A U Thor <author@example.com> 1112912473 -0700
committer C O Mitter <committer@example.com> 1112912473 -0700
foo
92a62decadb5642314a1fd56b51afd125b27f208 commit 167 126 12
ok 8 - fetching of missing objects
expecting success:
# ref-in-want requires protocol version 2
git -C server config protocol.version 2 &&
git -C server config uploadpack.allowrefinwant 1 &&
git -C repo config protocol.version 2 &&
rm -rf repo/.git/objects/* &&
rm -f trace &&
GIT_TRACE_PACKET="$(pwd)/trace" git -C repo cat-file -p "$HASH" &&
grep "git< fetch=.*ref-in-want" trace
warning: filtering not recognized by server, ignoring
tree 64fd3796c57084e7b8cbae358ce37970b8e954f6
author A U Thor <author@example.com> 1112912473 -0700
committer C O Mitter <committer@example.com> 1112912473 -0700
foo
packet: git< fetch=shallow ref-in-want
ok 9 - fetching of missing objects works with ref-in-want enabled
expecting success:
rm -rf server repo &&
test_create_repo server &&
test_commit -C server foo &&
git -C server repack -a -d --write-bitmap-index &&
git clone "file://$(pwd)/server" repo &&
git hash-object repo/foo.t >blobhash &&
rm -rf repo/.git/objects/* &&
git -C server config uploadpack.allowanysha1inwant 1 &&
git -C server config uploadpack.allowfilter 1 &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "origin" &&
git -C repo cat-file -p $(cat blobhash)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/server/.git/
[master (root-commit) 1463a05] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
Cloning into 'repo'...
foo
ok 10 - fetching of missing blobs works
expecting success:
rm -rf server repo &&
test_create_repo server &&
test_commit -C server foo &&
git -C server repack -a -d --write-bitmap-index &&
git clone "file://$(pwd)/server" repo &&
git -C repo rev-parse foo^{tree} >treehash &&
git hash-object repo/foo.t >blobhash &&
rm -rf repo/.git/objects/* &&
git -C server config uploadpack.allowanysha1inwant 1 &&
git -C server config uploadpack.allowfilter 1 &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "origin" &&
git -C repo cat-file -p $(cat treehash) &&
# Ensure that the tree, but not the blob, is fetched
git -C repo rev-list --objects --missing=print $(cat treehash) >objects &&
grep "^$(cat treehash)" objects &&
grep "^[?]$(cat blobhash)" objects
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/server/.git/
[master (root-commit) af4983b] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
Cloning into 'repo'...
100644 blob 257cc5642cb1a054f08cc83f2d943e56fd3ebe99 foo.t
64fd3796c57084e7b8cbae358ce37970b8e954f6
?257cc5642cb1a054f08cc83f2d943e56fd3ebe99
ok 11 - fetching of missing trees does not fetch blobs
expecting success:
rm -rf repo &&
test_create_repo repo &&
test_commit -C repo foo &&
test_commit -C repo bar &&
FOO=$(git -C repo rev-parse foo) &&
promise_and_delete "$FOO" &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "arbitrary string" &&
GIT_TEST_COMMIT_GRAPH=0 git -C repo rev-list --exclude-promisor-objects --objects bar >out &&
grep $(git -C repo rev-parse bar) out &&
! grep $FOO out
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/repo/.git/
[master (root-commit) 7745948] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
[master e514b54] bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar.t
2b7df34bc09be010087307b898e994ce709c0db1
e514b54fb79193e76be659c0567b436ac8d10232
ok 12 - rev-list stops traversal at missing and promised commit
expecting success:
rm -rf repo &&
test_create_repo repo &&
test_commit -C repo foo &&
test_commit -C repo bar &&
test_commit -C repo baz &&
promise_and_delete $(git -C repo rev-parse bar^{tree}) &&
promise_and_delete $(git -C repo rev-parse foo^{tree}) &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "arbitrary string" &&
git -C repo rev-list --missing=allow-promisor --objects HEAD >objs 2>rev_list_err &&
test_must_be_empty rev_list_err &&
# 3 commits, 3 blobs, and 1 tree
test_line_count = 7 objs &&
# Do the same for --exclude-promisor-objects, but with all trees gone.
promise_and_delete $(git -C repo rev-parse baz^{tree}) &&
git -C repo rev-list --exclude-promisor-objects --objects HEAD >objs 2>rev_list_err &&
test_must_be_empty rev_list_err &&
# 3 commits, no blobs or trees
test_line_count = 3 objs
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/repo/.git/
[master (root-commit) 04ebf83] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
[master 5d5378c] bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar.t
[master 403f8b0] baz
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 baz.t
0b80a4a4c757c906c0610b334ecc13c1f548f26c
4e80f36effe3aa9dd9f1a8d0e85f678beada4e19
29e6ce195f02e80b806c775b2e0f16fa4a6e50ac
ok 13 - missing tree objects with --missing=allow-promisor and --exclude-promisor-objects
expecting success:
rm -rf repo &&
test_create_repo repo &&
mkdir repo/dir &&
echo foo >repo/dir/foo &&
git -C repo add dir/foo &&
git -C repo commit -m "commit dir/foo" &&
promise_and_delete $(git -C repo rev-parse HEAD:dir) &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "arbitrary string" &&
git -C repo rev-list --missing=allow-any --objects HEAD >objs 2>rev_list_err &&
test_must_be_empty rev_list_err &&
# 1 commit and 1 tree
test_line_count = 2 objs
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/repo/.git/
[master (root-commit) fc3d893] commit dir/foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dir/foo
6701d28601ab148de66e908befaa9f313f9670ed
ok 14 - missing non-root tree object and rev-list
expecting success:
rm -rf repo &&
test_create_repo repo &&
test_commit -C repo foo &&
mkdir repo/a_dir &&
echo something >repo/a_dir/something &&
git -C repo add a_dir/something &&
git -C repo commit -m bar &&
# foo^{tree} (tree referenced from commit)
TREE=$(git -C repo rev-parse foo^{tree}) &&
# a tree referenced by HEAD^{tree} (tree referenced from tree)
TREE2=$(git -C repo ls-tree HEAD^{tree} | grep " tree " | head -1 | cut -b13-52) &&
promise_and_delete "$TREE" &&
promise_and_delete "$TREE2" &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "arbitrary string" &&
git -C repo rev-list --exclude-promisor-objects --objects HEAD >out &&
grep $(git -C repo rev-parse foo) out &&
! grep $TREE out &&
grep $(git -C repo rev-parse HEAD) out &&
! grep $TREE2 out
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/repo/.git/
[master (root-commit) b259608] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
[master 2b50f7e] bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a_dir/something
c847e09064df2c3060b894adee7d1fcbdc41d77e
053da52d70d31500a108f08bc31d5a72f5db7bc7
b259608956a9de662b43c93c18f15e427dcac80e
2b50f7eb48302601d810b4c1627ad25f05e81216
ok 15 - rev-list stops traversal at missing and promised tree
expecting success:
rm -rf repo &&
test_create_repo repo &&
echo something >repo/something &&
git -C repo add something &&
git -C repo commit -m foo &&
BLOB=$(git -C repo hash-object -w something) &&
promise_and_delete "$BLOB" &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "arbitrary string" &&
git -C repo rev-list --exclude-promisor-objects --objects HEAD >out &&
grep $(git -C repo rev-parse HEAD) out &&
! grep $BLOB out
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/repo/.git/
[master (root-commit) 9aebf3f] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 something
159a5b25735cb846bca3d8d102a38e273eb423d5
9aebf3fc471ba852071c23be641e3c8273d6ee27
ok 16 - rev-list stops traversal at missing and promised blob
expecting success:
rm -rf repo &&
test_create_repo repo &&
test_commit -C repo foo &&
test_commit -C repo bar &&
test_commit -C repo baz &&
COMMIT=$(git -C repo rev-parse foo) &&
TREE=$(git -C repo rev-parse bar^{tree}) &&
BLOB=$(git hash-object repo/baz.t) &&
printf "%s\n%s\n%s\n" $COMMIT $TREE $BLOB | pack_as_from_promisor &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "arbitrary string" &&
git -C repo rev-list --exclude-promisor-objects --objects HEAD >out &&
! grep $COMMIT out &&
! grep $TREE out &&
! grep $BLOB out &&
grep $(git -C repo rev-parse bar) out # sanity check that some walking was done
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/repo/.git/
[master (root-commit) a4efc16] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
[master b3b6050] bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar.t
[master 70d6cfa] baz
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 baz.t
03f058b726123c4f1ef352333fd9c0c557466ad4
b3b6050676a5798a4107f8ec799fe53b4ecd55b1
ok 17 - rev-list stops traversal at promisor commit, tree, and blob
expecting success:
rm -rf repo &&
test_create_repo repo &&
test_commit -C repo foo &&
test_commit -C repo bar &&
test_commit -C repo baz &&
COMMIT=$(git -C repo rev-parse foo) &&
TREE=$(git -C repo rev-parse bar^{tree}) &&
BLOB=$(git hash-object repo/baz.t) &&
promise_and_delete $COMMIT &&
promise_and_delete $TREE &&
promise_and_delete $BLOB &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "arbitrary string" &&
for OBJ in "$COMMIT" "$TREE" "$BLOB"; do
test_must_fail git -C repo rev-list --objects \
--exclude-promisor-objects "$OBJ" &&
test_must_fail git -C repo rev-list --objects-edge-aggressive \
--exclude-promisor-objects "$OBJ" &&
# Do not die or crash when --ignore-missing is passed.
git -C repo rev-list --ignore-missing --objects \
--exclude-promisor-objects "$OBJ" &&
git -C repo rev-list --ignore-missing --objects-edge-aggressive \
--exclude-promisor-objects "$OBJ"
done
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/repo/.git/
[master (root-commit) 9221471] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
[master ff8c8be] bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar.t
[master aa6395a] baz
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 baz.t
40181af12b32f68a435aa73643389d18023d886f
error: refs/tags/foo does not point to a valid object!
e3ac27606f214fe554908dcfb180e5adc75c16e7
error: refs/tags/foo does not point to a valid object!
2188d83092576306608ebcdf2c84441aa35221fb
fatal: ambiguous argument '9221471278ac913fe63702a510a45b08f3048146': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument '9221471278ac913fe63702a510a45b08f3048146': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument '12e519f9839344d0202cbb4a0286099ef31e2196': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument '12e519f9839344d0202cbb4a0286099ef31e2196': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument '76018072e09c5d31c8c6e3113b8aa0fe625195ca': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument '76018072e09c5d31c8c6e3113b8aa0fe625195ca': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ok 18 - rev-list dies for missing objects on cmd line
expecting success:
rm -rf repo &&
test_create_repo repo &&
test_commit -C repo one &&
test_commit -C repo two &&
TREE_ONE=$(git -C repo rev-parse one^{tree}) &&
printf "$TREE_ONE\n" | pack_as_from_promisor &&
TREE_TWO=$(git -C repo rev-parse two^{tree}) &&
printf "$TREE_TWO\n" | pack_as_from_promisor &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "arbitrary string" &&
git -C repo gc &&
# Ensure that exactly one promisor packfile exists, and that it
# contains the trees but not the commits
ls repo/.git/objects/pack/pack-*.promisor >promisorlist &&
test_line_count = 1 promisorlist &&
PROMISOR_PACKFILE=$(sed "s/.promisor/.pack/" <promisorlist) &&
git verify-pack $PROMISOR_PACKFILE -v >out &&
grep "$TREE_ONE" out &&
grep "$TREE_TWO" out &&
! grep "$(git -C repo rev-parse one)" out &&
! grep "$(git -C repo rev-parse two)" out &&
# Remove the promisor packfile and associated files
rm $(sed "s/.promisor//" <promisorlist).* &&
# Ensure that the single other pack contains the commits, but not the
# trees
ls repo/.git/objects/pack/pack-*.pack >packlist &&
test_line_count = 1 packlist &&
git verify-pack repo/.git/objects/pack/pack-*.pack -v >out &&
grep "$(git -C repo rev-parse one)" out &&
grep "$(git -C repo rev-parse two)" out &&
! grep "$TREE_ONE" out &&
! grep "$TREE_TWO" out
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/repo/.git/
[master (root-commit) 6d3dd09] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 22004c9] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
80b0d61182f42d417d3f1080999c86acd16276f7
4f4b1c441e35611dff006a309fbda4370b40fc90
a7cddf35737959e1438bc929b665619e9e79bfee tree 33 44 85
2f00a404aed7e63d867313d504bd0fccea53fd25 tree 66 73 12
6d3dd09ab2409ace50d451184915bd38484087c9 commit 167 126 169
22004c9d096c64b8edacd5e5aa8119ba60f89b35 commit 215 157 12
ok 19 - gc repacks promisor objects separately from non-promisor objects
expecting success:
rm -rf repo &&
test_create_repo repo &&
test_commit -C repo one &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "arbitrary string" &&
git -C repo gc &&
# Ensure that only one pack exists
ls repo/.git/objects/pack/pack-*.pack >packlist &&
test_line_count = 1 packlist
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/repo/.git/
[master (root-commit) 46d8c68] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 20 - gc does not repack promisor objects if there are none
expecting success:
rm -rf repo &&
test_create_repo repo &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "arbitrary string" &&
git -C repo commit --allow-empty -m one &&
git -C repo commit --allow-empty -m two &&
git -C repo commit --allow-empty -m three &&
git -C repo commit --allow-empty -m four &&
ONE=$(git -C repo rev-parse HEAD^^^) &&
TWO=$(git -C repo rev-parse HEAD^^) &&
THREE=$(git -C repo rev-parse HEAD^) &&
printf "$TWO\n" | pack_as_from_promisor &&
printf "$THREE\n" | pack_as_from_promisor &&
delete_object repo "$ONE" &&
repack_and_check -a "$TWO" "$THREE" &&
repack_and_check -A "$TWO" "$THREE" &&
repack_and_check -l "$TWO" "$THREE"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/repo/.git/
[master (root-commit) 95edc28] one
Author: A U Thor <author@example.com>
[master 114744c] two
Author: A U Thor <author@example.com>
[master e00c151] three
Author: A U Thor <author@example.com>
[master 9a209d2] four
Author: A U Thor <author@example.com>
c3a7ba83b6f7f6d5eb1b78f6a97d86d8c857112b
9999d8693559878e42c5d6a9cc38dcc697697f83
warning: reflog of 'HEAD' references pruned commits
warning: reflog of 'refs/heads/master' references pruned commits
warning: reflog of 'HEAD' references pruned commits
warning: reflog of 'refs/heads/master' references pruned commits
warning: reflog of 'HEAD' references pruned commits
warning: reflog of 'refs/heads/master' references pruned commits
ok 21 - repack -d does not irreversibly delete promisor objects
expecting success:
rm -rf repo &&
test_create_repo repo &&
test_commit -C repo my_commit &&
TREE_HASH=$(git -C repo rev-parse HEAD^{tree}) &&
HASH=$(promise_and_delete $TREE_HASH) &&
git -C repo config core.repositoryformatversion 1 &&
git -C repo config extensions.partialclone "arbitrary string" &&
git -C repo gc &&
# Ensure that the promisor packfile still exists, and remove it
test -e repo/.git/objects/pack/pack-$HASH.pack &&
rm repo/.git/objects/pack/pack-$HASH.* &&
# Ensure that the single other pack contains the commit, but not the tree
ls repo/.git/objects/pack/pack-*.pack >packlist &&
test_line_count = 1 packlist &&
git verify-pack repo/.git/objects/pack/pack-*.pack -v >out &&
grep "$(git -C repo rev-parse HEAD)" out &&
! grep "$TREE_HASH" out
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0410-partial-clone/repo/.git/
[master (root-commit) b740cae] my_commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 my_commit.t
b740cae5ace132631585f8db5f228adf51170f3b commit 173 129 12
ok 22 - gc stops traversal when a missing but promised object is reached
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
# passed all 22 test(s)
# SKIP no web server found at '/usr/sbin/apache2'
1..22
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1008-read-tree-overlay.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1008-read-tree-overlay/.git/
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
[master (root-commit) e44cbd2] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
[master 07b16f1] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b
Switched to a new branch 'side'
[side f53b52f] 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 &&
test_write_lines a b/c >expect &&
git ls-files >actual &&
test_cmp expect actual
ok 2 - multi-read
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1009-read-tree-new-index.sh ***
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
[master (root-commit) 5f50aff] 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 2 - non-existent index file
expecting success:
rm -f new-index &&
> new-index &&
GIT_INDEX_FILE=new-index git read-tree master
ok 3 - empty index file
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1007-hash-object.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1007-hash-object/.git/
expecting success:
setup_repo &&
test_oid_cache <<-EOF
hello sha1:5e1c309dae7f45e0f39b1bf3ac3cd9db12e7d689
hello sha256:1e3b6c04d2eeb2b3e45c8a330445404c0b7cc7b257e2b097167d26f5230090c4
example sha1:ddd3f836d3e3fbb7ae289aa9ae83536f76956399
example sha256:b44fe1fe65589848253737db859bd490453510719d7424daab03daf0767b85ae
EOF
ok 1 - setup
expecting success:
echo example | test_must_fail git hash-object --stdin --stdin
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 2 - 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
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
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
ok 3 - Can't use --stdin and --stdin-paths together
expecting success:
echo example | test_must_fail git hash-object --stdin-paths hello
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 4 - 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
-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 --stdin-paths
expecting success:
test_must_fail git hash-object --no-filters --path=foo
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 6 - Can't use --path with --no-filters
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1007-hash-object/test/.git/
expecting success:
test "$(test_oid hello)" = $(git hash-object hello)
ok 7 - hash a file
expecting success:
test_must_fail git cat-file blob 5e1c309dae7f45e0f39b1bf3ac3cd9db12e7d689
fatal: git cat-file 5e1c309dae7f45e0f39b1bf3ac3cd9db12e7d689: bad file
ok 8 - blob does not exist in database
expecting success:
test "$(test_oid example)" = $(git hash-object --stdin < example)
ok 9 - hash from stdin
expecting success:
test_must_fail git cat-file blob ddd3f836d3e3fbb7ae289aa9ae83536f76956399
fatal: git cat-file ddd3f836d3e3fbb7ae289aa9ae83536f76956399: bad file
ok 10 - blob does not exist in database
expecting success:
test "$(test_oid hello)" = $(git hash-object -w hello)
ok 11 - hash a file and write to database
expecting success:
git cat-file blob 5e1c309dae7f45e0f39b1bf3ac3cd9db12e7d689
Hello Worldok 12 - blob exists in database
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"
ok 13 - 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"
ok 14 - set up crlf tests
expecting success:
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"
ok 15 - check that appropriate filter is invoke when --path is used
expecting success:
mkdir subdir &&
(
cd subdir &&
subdir_sha0=$(git hash-object ../file0) &&
subdir_sha1=$(git hash-object ../file1) &&
test "$file0_sha" = "$subdir_sha0" &&
test "$file1_sha" = "$subdir_sha1"
)
ok 16 - gitattributes also work in a subdirectory
expecting success:
(
cd subdir &&
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"
)
ok 17 - --path works in a subdirectory
expecting success:
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"
ok 18 - check that --no-filters option works
expecting success:
nofilters_file1=$(echo "file1" | git hash-object --stdin-paths --no-filters) &&
test "$file0_sha" = "$nofilters_file1"
ok 19 - check that --no-filters option works with --stdin-paths
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1007-hash-object/test/.git/
expecting success:
test "$(test_oid example)" = $(git hash-object $args < example)
ok 20 - hash from stdin and write to database (-w --stdin)
expecting success:
git cat-file blob ddd3f836d3e3fbb7ae289aa9ae83536f76956399
This is an exampleok 21 - blob exists in database
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1007-hash-object/test/.git/
expecting success:
test "$(test_oid example)" = $(git hash-object $args < example)
ok 22 - hash from stdin and write to database (--stdin -w)
expecting success:
git cat-file blob ddd3f836d3e3fbb7ae289aa9ae83536f76956399
This is an exampleok 23 - blob exists in database
expecting success:
test "$oids" = "$(echo_without_newline "$filenames" | git hash-object --stdin-paths)"
ok 24 - hash two files with names on stdin
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1007-hash-object/test/.git/
expecting success:
test "$oids" = "$(echo_without_newline "$filenames" | git hash-object $args)"
ok 25 - hash two files with names on stdin and write to database (-w --stdin-paths)
expecting success:
git cat-file blob 5e1c309dae7f45e0f39b1bf3ac3cd9db12e7d689
Hello Worldok 26 - blob exists in database
expecting success:
git cat-file blob ddd3f836d3e3fbb7ae289aa9ae83536f76956399
This is an exampleok 27 - blob exists in database
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1007-hash-object/test/.git/
expecting success:
test "$oids" = "$(echo_without_newline "$filenames" | git hash-object $args)"
ok 28 - hash two files with names on stdin and write to database (--stdin-paths -w)
expecting success:
git cat-file blob 5e1c309dae7f45e0f39b1bf3ac3cd9db12e7d689
Hello Worldok 29 - blob exists in database
expecting success:
git cat-file blob ddd3f836d3e3fbb7ae289aa9ae83536f76956399
This is an exampleok 30 - blob exists in database
expecting success:
echo abc >malformed-tree &&
test_must_fail git hash-object -t tree malformed-tree 2>err &&
test_i18ngrep "too-short tree object" err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: too-short tree object
ok 31 - too-short tree
expecting success:
hex_sha1=$(echo foo | git hash-object --stdin -w) &&
bin_sha1=$(echo $hex_sha1 | hex2oct) &&
printf "9100644 \0$bin_sha1" >tree-with-malformed-mode &&
test_must_fail git hash-object -t tree tree-with-malformed-mode 2>err &&
test_i18ngrep "malformed mode in tree entry" err
fatal: malformed mode in tree entry
ok 32 - malformed mode in tree
expecting success:
hex_sha1=$(echo foo | git hash-object --stdin -w) &&
bin_sha1=$(echo $hex_sha1 | hex2oct) &&
printf "100644 \0$bin_sha1" >tree-with-empty-filename &&
test_must_fail git hash-object -t tree tree-with-empty-filename 2>err &&
test_i18ngrep "empty filename in tree entry" err
fatal: empty filename in tree entry
ok 33 - empty filename in tree
expecting success:
test_must_fail git hash-object -t commit --stdin </dev/null
error: bogus commit object 0000000000000000000000000000000000000000
fatal: corrupt commit
ok 34 - corrupt commit
expecting success:
test_must_fail git hash-object -t tag --stdin </dev/null
fatal: corrupt tag
ok 35 - corrupt tag
expecting success:
test_must_fail git hash-object -t bogus --stdin </dev/null
fatal: invalid object type "bogus"
ok 36 - hash-object complains about bogus type name
expecting success:
test_must_fail git hash-object -t bl --stdin </dev/null
fatal: invalid object type "bl"
ok 37 - hash-object complains about truncated type name
expecting success:
t=1234567890 &&
echo example | git hash-object -t $t --literally --stdin
f78b23c3f872d473c764d5fcf4fb39af8bbf2123
ok 38 - --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
2a881776ee43e849175ee7158075560ca0ae7692
ok 39 - --literally with extra-long type
# passed all 39 test(s)
1..39
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1010-mktree.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1010-mktree/.git/
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
ok 1 - setup
expecting success:
git mktree <top >actual &&
test_cmp tree actual
ok 2 - ls-tree piped to mktree (1)
expecting success:
git mktree <top.withsub >actual &&
test_cmp tree.withsub actual
ok 3 - ls-tree piped to mktree (2)
expecting success:
perl -e "print reverse <>" <top |
git mktree >actual &&
test_cmp tree actual
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 5 - ls-tree output in wrong order given to mktree (2)
expecting success:
git mktree --missing <top.missing >actual &&
test_cmp tree.missing actual
ok 6 - allow missing object with --missing
expecting success:
test_must_fail git mktree <all >actual
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
fatal: path a./one contains slash
ok 8 - mktree refuses to read ls-tree -r output (2)
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1012-read-tree-df.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1012-read-tree-df/.git/
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 &&
:
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 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
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
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
ok 5 - 2-way (1)
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1011-read-tree-sparse-checkout.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1011-read-tree-sparse-checkout/.git/
expecting success:
test_commit init &&
echo modified >>init.t &&
cat >expected <<-EOF &&
100644 $(git hash-object init.t) 0 init.t
100644 $EMPTY_BLOB 0 sub/added
100644 $EMPTY_BLOB 0 sub/addedtoo
100644 $EMPTY_BLOB 0 subsub/added
EOF
cat >expected.swt <<-\EOF &&
H init.t
H sub/added
H sub/addedtoo
H subsub/added
EOF
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
[master (root-commit) 2519212] init
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 init.t
[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
rm 'sub/added'
[master de70956] removed
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 sub/added
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 9598e22 modified and added
ok 1 - setup
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
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
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
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
error: Sparse checkout leaves no entry on working directory
error: Sparse checkout leaves no entry on working directory
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
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 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 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
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
ok 11 - checkout area changes
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
HEAD is now at 9598e22 modified and added
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
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
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
HEAD is now at de70956 removed
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
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:
echo init.t >.git/info/sparse-checkout &&
git checkout -f top &&
git reset --hard removed &&
git ls-files sub/added >result &&
test_must_be_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 switch branches.
Aborting
EOF
test_i18ncmp expected actual
Previous HEAD position was de70956 removed
HEAD is now at 2519212 init
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
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
HEAD is now at 9598e22 modified and added
Updated 1 path from the index
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
HEAD is now at 9598e22 modified and added
Updated 3 paths from the index
ok 21 - checkout with --ignore-skip-worktree-bits
# passed all 21 test(s)
1..21
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1006-cat-file.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1006-cat-file/.git/
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
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
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
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
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
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 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
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
ok 15 - --batch-check without %(rest) considers whole line
expecting success:
git cat-file -e $sha1
ok 16 - tree exists
expecting success:
echo $type >expect &&
git cat-file -t $sha1 >actual &&
test_cmp expect actual
ok 17 - Type of tree is correct
expecting success:
echo $size >expect &&
git cat-file -s $sha1 >actual &&
test_cmp expect actual
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
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
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 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
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
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 24 - --batch-check with %(rest)
expecting success:
git cat-file -e $sha1
ok 25 - commit exists
expecting success:
echo $type >expect &&
git cat-file -t $sha1 >actual &&
test_cmp expect actual
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
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
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
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
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
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 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 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
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 37 - --batch without size (commit)
expecting success:
git cat-file -e $sha1
ok 38 - tag exists
expecting success:
echo $type >expect &&
git cat-file -t $sha1 >actual &&
test_cmp expect actual
ok 39 - Type of tag is correct
expecting success:
echo $size >expect &&
git cat-file -s $sha1 >actual &&
test_cmp expect actual
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
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 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
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 44 - Pretty content of tag 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 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
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
ok 48 - --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 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
ok 50 - --batch without size (tag)
expecting success: test 'Hello World' = "$(git cat-file blob bb50ec8a71343279c59ba488a3445888e3fb624b)"
ok 51 - Reach a blob from a tag pointing to it
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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
ok 52 - Passing -t 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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
ok 53 - Passing --batch 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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
ok 54 - Passing -s 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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
ok 55 - Passing --batch with -s 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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
ok 57 - Passing --batch 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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
ok 58 - Passing -p 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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
ok 59 - Passing --batch with -p fails
expecting success:
test_must_fail git cat-file --$batch blob $hello_sha1
usage: git cat-file (-t [--allow-unknown-type] | -s [--allow-unknown-type] | -e | -p | <type> | --textconv | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
ok 62 - Passing sha1 with --batch 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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
ok 66 - Passing --batch-check with -s 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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
ok 67 - Passing -e 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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
ok 69 - Passing -p 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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
ok 70 - Passing --batch-check with -p fails
expecting success:
test_must_fail git cat-file --$batch blob $hello_sha1
usage: git cat-file (-t [--allow-unknown-type] | -s [--allow-unknown-type] | -e | -p | <type> | --textconv | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
ok 74 - Passing -t 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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
ok 75 - Passing -s 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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
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 | --filters) [--path=<path>] <object>
or: git cat-file (--batch | --batch-check) [--follow-symlinks] [--textconv | --filters]
<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
--filters for blob objects, run filters on object's content
--path <blob> use a specific path for --textconv/--filters
--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
--unordered do not order --batch-all-objects output
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 empty line
expecting success:
echo "$ZERO_OID missing" >expect &&
echo "$ZERO_OID" | 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 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)"
ok 84 - --batch-check with multiple sha1s gives correct format
expecting success:
test-tool 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
[master (root-commit) f9fb536] 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 &&
$ZERO_OID
$ZERO_OID
EOF
git cat-file --batch-check="%(deltabase)" <blobs >actual &&
test_cmp expect actual
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
}
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
ok 88 - Type of broken object is correct
expecting success:
echo $bogus_size >expect &&
git cat-file -s --allow-unknown-type $bogus_sha1 >actual &&
test_cmp expect actual
ok 89 - Size of broken object is correct
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
[master 0193850] 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 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
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
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
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 98 - git cat-file --batch-check --follow-symlinks works for parent-dir links
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
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
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
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 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
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
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
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
ok 106 - git cat-file --batch-check --follow-symlinks works for out-of-repo symlinks in subdirs
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
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 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
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, some duplicates, 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 &&
git -C all-two rev-parse HEAD:file |
git -C all-two pack-objects .git/objects/pack/pack &&
sort <expect.unsorted >expect &&
git -C all-two cat-file --batch-all-objects \
--batch-check="%(objectname)" >actual &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1006-cat-file/all-one/.git/
Cloning into 'all-two'...
done.
2d40090ddd2c612f2679520aaab9f69d52e41628
ok 110 - cat-file --batch-all-objects shows all objects
expecting success:
git -C all-two cat-file --batch-all-objects --unordered \
--batch-check="%(objectname)" >actual.unsorted &&
sort <actual.unsorted >actual &&
test_cmp expect actual
ok 111 - cat-file --unordered works
# passed all 111 test(s)
1..111
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1014-read-tree-confusing.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1014-read-tree-confusing/.git/
expecting success:
echo content >file &&
git add file &&
git commit -m base &&
blob=$(git rev-parse HEAD:file) &&
tree=$(git rev-parse HEAD^{tree})
[master (root-commit) e45f078] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 1 - create base tree
expecting success:
git config core.protectHFS true
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
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
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
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
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
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
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
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
error: invalid path '.GIT/file'
ok 11 - 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
error: invalid path '.Git'
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
error: invalid path '.Git/file'
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
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
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
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
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
error: invalid path '.git\foobar'
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
error: invalid path '.git\foobar/file'
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 26 - utf-8 paths allowed with core.protectHFS off
# passed all 26 test(s)
1..26
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1015-read-index-unmerged.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1015-read-index-unmerged/.git/
expecting success:
test_create_repo df_plus_modify_delete &&
(
cd df_plus_modify_delete &&
test_write_lines a b c d e f g h >letters &&
git add letters &&
git commit -m initial &&
git checkout -b modify &&
# Throw in letters.txt for sorting order fun
# ("letters.txt" sorts between "letters" and "letters/file")
echo i >>letters &&
echo "version 2" >letters.txt &&
git add letters letters.txt &&
git commit -m modified &&
git checkout -b delete HEAD^ &&
git rm letters &&
mkdir letters &&
>letters/file &&
echo "version 1" >letters.txt &&
git add letters letters.txt &&
git commit -m deleted
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1015-read-index-unmerged/df_plus_modify_delete/.git/
[master (root-commit) 28ebf81] initial
Author: A U Thor <author@example.com>
1 file changed, 8 insertions(+)
create mode 100644 letters
Switched to a new branch 'modify'
[modify 976333a] modified
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 letters.txt
Switched to a new branch 'delete'
rm 'letters'
[delete f660e3d] deleted
Author: A U Thor <author@example.com>
3 files changed, 1 insertion(+), 8 deletions(-)
delete mode 100644 letters
create mode 100644 letters.txt
create mode 100644 letters/file
ok 1 - setup modify/delete + directory/file conflict
expecting success:
test_when_finished "git -C df_plus_modify_delete clean -f" &&
test_when_finished "git -C df_plus_modify_delete reset --hard" &&
(
cd df_plus_modify_delete &&
git checkout delete^0 &&
test_must_fail git merge modify &&
git read-tree --reset HEAD &&
git ls-files -u >conflicts &&
test_must_be_empty conflicts
)
Note: switching to 'delete^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at f660e3d deleted
Merging:
f660e3d deleted
virtual modify
found 1 common ancestor:
28ebf81 initial
Adding letters/file
CONFLICT (add/add): Merge conflict in letters.txt
Auto-merging letters.txt
CONFLICT (modify/delete): letters deleted in HEAD and modified in modify. Version modify of letters left in tree at letters~modify.
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at f660e3d deleted
Removing conflicts
Removing letters~modify
ok 2 - read-tree --reset cleans unmerged entries
expecting success:
test_when_finished "git -C df_plus_modify_delete clean -f" &&
test_when_finished "git -C df_plus_modify_delete reset --hard" &&
(
cd df_plus_modify_delete &&
git checkout delete^0 &&
test_must_fail git merge modify &&
git reset --hard &&
test_path_is_missing .git/MERGE_HEAD &&
git ls-files -u >conflicts &&
test_must_be_empty conflicts
)
HEAD is now at f660e3d deleted
Merging:
f660e3d deleted
virtual modify
found 1 common ancestor:
28ebf81 initial
Adding letters/file
CONFLICT (add/add): Merge conflict in letters.txt
Auto-merging letters.txt
CONFLICT (modify/delete): letters deleted in HEAD and modified in modify. Version modify of letters left in tree at letters~modify.
Automatic merge failed; fix conflicts and then commit the result.
warning: unable to unlink 'letters': Is a directory
HEAD is now at f660e3d deleted
HEAD is now at f660e3d deleted
Removing conflicts
Removing letters~modify
ok 3 - One reset --hard cleans unmerged entries
expecting success:
test_create_repo df_plus_edit_edit &&
(
cd df_plus_edit_edit &&
test_seq 1 10 >numbers &&
git add numbers &&
git commit -m initial &&
git checkout -b d-edit &&
mkdir foo &&
echo content >foo/bar &&
git add foo &&
echo 11 >>numbers &&
git add numbers &&
git commit -m "directory and edit" &&
git checkout -b f-edit d-edit^1 &&
echo content >foo &&
git add foo &&
echo eleven >>numbers &&
git add numbers &&
git commit -m "file and edit"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1015-read-index-unmerged/df_plus_edit_edit/.git/
[master (root-commit) 11e1795] initial
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 numbers
Switched to a new branch 'd-edit'
[d-edit 0b1fe15] directory and edit
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 foo/bar
Switched to a new branch 'f-edit'
[f-edit e7b5edd] file and edit
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 foo
ok 4 - setup directory/file conflict + simple edit/edit
expecting success:
test_when_finished "git -C df_plus_edit_edit clean -f" &&
test_when_finished "git -C df_plus_edit_edit reset --hard" &&
(
cd df_plus_edit_edit &&
git checkout f-edit^0 &&
test_must_fail git merge d-edit^0 &&
git merge --abort &&
test_path_is_missing .git/MERGE_HEAD &&
git ls-files -u >conflicts &&
test_must_be_empty conflicts
)
Note: switching to 'f-edit^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at e7b5edd file and edit
Merging:
e7b5edd file and edit
virtual d-edit^0
found 1 common ancestor:
11e1795 initial
Auto-merging numbers
CONFLICT (content): Merge conflict in numbers
Adding foo/bar
Removing foo to make room for subdirectory
CONFLICT (file/directory): There is a directory with name foo in d-edit^0. Adding foo as foo~HEAD
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at e7b5edd file and edit
Removing conflicts
Removing foo~HEAD
ok 5 - git merge --abort succeeds despite D/F conflict
expecting success:
test_when_finished "git -C df_plus_edit_edit clean -f" &&
test_when_finished "git -C df_plus_edit_edit reset --hard" &&
(
cd df_plus_edit_edit &&
git checkout f-edit^0 &&
git format-patch -1 d-edit &&
test_must_fail git am -3 0001*.patch &&
git am --skip &&
test_path_is_missing .git/rebase-apply &&
git ls-files -u >conflicts &&
test_must_be_empty conflicts
)
HEAD is now at e7b5edd file and edit
0001-directory-and-edit.patch
Applying: directory and edit
Using index info to reconstruct a base tree...
M numbers
Falling back to patching base and 3-way merge...
Merging:
e7b5edd file and edit
virtual directory and edit
found 1 common ancestor:
virtual 75a3e2be4ba4a7062d21fba0206758f5518d6ead
Auto-merging numbers
CONFLICT (content): Merge conflict in numbers
Adding foo/bar
Removing foo to make room for subdirectory
CONFLICT (file/directory): There is a directory with name foo in directory and edit. Adding foo as foo~HEAD
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 directory and edit
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
HEAD is now at e7b5edd file and edit
Removing 0001-directory-and-edit.patch
Removing conflicts
Removing foo~HEAD
ok 6 - git am --skip succeeds despite D/F conflict
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1020-subdirectory.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1020-subdirectory/.git/
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
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
pass one
pass two
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
)
c1144d0671912dd26751c1fbf1eac57a907f82c7
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
)
pass top
pass subdir
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"
)
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
)
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
)
ok 7 - read-tree
expecting success:
(
git config alias.test-status-alias status &&
cd dir &&
git status &&
git test-status-alias
)
On branch master
No commits yet
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
On branch master
No commits yet
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 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
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 10 - GIT_PREFIX for !alias
expecting success:
# Use GIT_EXTERNAL_DIFF to test that the "diff" built-in
# receives the GIT_PREFIX variable.
echo "dir/" >expect &&
write_script diff <<-\EOF &&
printf "%s\n" "$GIT_PREFIX"
EOF
(
cd dir &&
echo "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
)
[master (root-commit) a53077b] 1
Author: A U Thor <author@example.com>
2 files changed, 58 insertions(+)
create mode 100644 dir/two
create mode 100644 one
commit a53077b34357332021d42a25cfa953d2f2b00e07
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:24:10 2019 +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.
commit a53077b34357332021d42a25cfa953d2f2b00e07
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:24:10 2019 +0000
1
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'...
done.
commit a53077b34357332021d42a25cfa953d2f2b00e07
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:24:10 2019 +0000
1
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
)
Cloning into 'another'...
done.
commit a53077b34357332021d42a25cfa953d2f2b00e07
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:24:10 2019 +0000
1
ok 15 - detection should not be fooled by a symlink
# passed all 15 test(s)
1..15
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1021-rerere-in-workdir.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1021-rerere-in-workdir/.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
)
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
[master (root-commit) 21975ff] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 world
[master 02943d2] hello
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to a new branch 'side'
[side 5611ff9] goodbye
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'master'
ok 1 - setup
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
)
Merging:
02943d2 hello
virtual side
found 1 common ancestor:
21975ff initial
Auto-merging world
CONFLICT (content): Merge conflict in world
Recorded preimage for 'world'
Automatic merge failed; fix conflicts and then commit the result.
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
)
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'
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
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1051-large-conversion.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1051-large-conversion/.git/
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
ok 2 - autocrlf=true converts on input
expecting success:
set_attr eol=crlf &&
check_input
ok 3 - eol=crlf converts on input
expecting success:
set_attr ident &&
check_input
ok 4 - ident converts on input
expecting success:
set_attr filter=test &&
check_input
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/"
ok 6 - setup output tests
expecting success:
test_config core.autocrlf true &&
check_output
Updated 2 paths from the index
ok 7 - autocrlf=true converts on output
expecting success:
set_attr eol=crlf &&
check_output
Updated 2 paths from the index
ok 8 - eol=crlf converts on output
expecting success:
set_attr filter=test &&
check_output
Updated 2 paths from the index
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
Updated 2 paths from the index
ok 10 - ident converts on output
# passed all 10 test(s)
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1060-object-corruption.sh ***
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
) &&
git init no-bit-error &&
(
# distinct commit from bit-error, but containing a
# non-corrupted version of the same blob
cd no-bit-error &&
test_tick &&
test_commit content
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1060-object-corruption/bit-error/.git/
[master (root-commit) 0df6d69] content
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 content.t
1+0 records in
1+0 records out
1 byte copied, 0.000129341 s, 7.7 kB/s
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1060-object-corruption/no-bit-error/.git/
[master (root-commit) f374eba] content
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 content.t
ok 1 - setup corrupt repo
expecting success:
git init missing &&
(
cd missing &&
test_commit content &&
rm -f "$(obj_to_file HEAD:content.t)"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1060-object-corruption/missing/.git/
[master (root-commit) 0df6d69] content
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 content.t
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"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1060-object-corruption/misnamed/.git/
[master (root-commit) 0df6d69] content
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 content.t
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)
error: unable to unpack d95f3ad14dee633a758d2e331151e950dd13e4ed header
fatal: loose object d95f3ad14dee633a758d2e331151e950dd13e4ed (stored in .git/objects/d9/5f3ad14dee633a758d2e331151e950dd13e4ed) is corrupt
ok 4 - streaming a corrupt blob fails
expecting success:
(
cd bit-error &&
test_must_fail git cat-file -s HEAD:content.t
)
error: inflate: data stream error (invalid distance too far back)
error: unable to unpack d95f3ad14dee633a758d2e331151e950dd13e4ed header
fatal: git cat-file: could not get object info
ok 5 - getting type of a corrupt blob fails
expecting success:
(
cd bit-error &&
rm -f content.t &&
test_must_fail git read-tree --reset -u HEAD
)
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
fatal: loose object d95f3ad14dee633a758d2e331151e950dd13e4ed (stored in .git/objects/d9/5f3ad14dee633a758d2e331151e950dd13e4ed) is corrupt
ok 6 - read-tree -u detects bit-errors in blobs
expecting success:
(
cd missing &&
rm -f content.t &&
test_must_fail git read-tree --reset -u HEAD
)
error: unable to read sha1 file of content.t (d95f3ad14dee633a758d2e331151e950dd13e4ed)
ok 7 - 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'...
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: error: unable to unpack d95f3ad14dee633a758d2e331151e950dd13e4ed header
remote: fatal: loose object d95f3ad14dee633a758d2e331151e950dd13e4ed (stored in ./objects/d9/5f3ad14dee633a758d2e331151e950dd13e4ed) is corrupt
error: git upload-pack: git-pack-objects died with error.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
ok 8 - 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'...
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: fatal: unable to read d95f3ad14dee633a758d2e331151e950dd13e4ed
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed
ok 9 - clone --no-local --bare detects missing object
expecting success:
test_must_fail git clone --no-local --bare misnamed misnamed-transport
Cloning into bare repository 'misnamed-transport'...
fatal: did not receive expected object d95f3ad14dee633a758d2e331151e950dd13e4ed
fatal: index-pack failed
ok 10 - clone --no-local --bare detects misnamed object
expecting success:
test_must_fail git clone --local bit-error corrupt-checkout
Cloning into 'corrupt-checkout'...
done.
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
fatal: loose object d95f3ad14dee633a758d2e331151e950dd13e4ed (stored in /<<PKGBUILDDIR>>/t/trash directory.t1060-object-corruption/corrupt-checkout/.git/objects/d9/5f3ad14dee633a758d2e331151e950dd13e4ed) is corrupt
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
ok 11 - clone --local detects corruption
expecting success:
test_path_is_dir corrupt-checkout/.git
ok 12 - error detected during checkout leaves repo intact
expecting success:
test_must_fail git clone --local missing missing-checkout
Cloning into 'missing-checkout'...
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 with 'git restore --source=HEAD :/'
ok 13 - clone --local detects missing objects
checking known breakage:
test_must_fail git clone --local misnamed misnamed-checkout
Cloning into 'misnamed-checkout'...
done.
test_must_fail: command succeeded: git clone --local misnamed misnamed-checkout
not ok 14 - clone --local detects misnamed objects # TODO known breakage
expecting success:
cp -R bit-error bit-error-cp &&
test_when_finished "rm -rf bit-error-cp" &&
(
cd bit-error-cp &&
test_must_fail git -c transfer.unpackLimit=1 \
fetch ../no-bit-error 2>stderr &&
test_i18ngrep ! -i collision stderr
)
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 15 - fetch into corrupted repo with index-pack
expecting success:
git init missing-empty &&
(
cd missing-empty &&
empty_tree=$(git hash-object -t tree /dev/null) &&
commit=$(echo foo | git commit-tree $empty_tree) &&
git rev-list --objects $commit
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1060-object-corruption/missing-empty/.git/
2606540bd212f180d303aad6db1a459fd838aa51
4b825dc642cb6eb9a060e54bf8d69288fbee4904
ok 16 - internal tree objects are not "missing"
# still have 1 known breakage(s)
# passed all remaining 15 test(s)
1..16
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1090-sparse-checkout-scope.sh ***
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"
[master (root-commit) 3f0e4d3] 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"
Switched to a new branch 'feature'
[feature 04dc62e] 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
Switched to branch 'master'
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"
Updating 3f0e4d3..04dc62e
Fast-forward
b | 2 +-
c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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'
Switched to branch 'master'
ok 5 - return to full checkout of master
expecting success:
test_create_repo server &&
git clone "file://$(pwd)/server" client &&
test_config -C server uploadpack.allowfilter 1 &&
test_config -C server uploadpack.allowanysha1inwant 1 &&
echo a >server/a &&
echo bb >server/b &&
mkdir server/c &&
echo ccc >server/c/c &&
git -C server add a b c/c &&
git -C server commit -m message &&
test_config -C client core.sparsecheckout 1 &&
test_config -C client extensions.partialclone origin &&
echo "!/*" >client/.git/info/sparse-checkout &&
echo "/a" >>client/.git/info/sparse-checkout &&
git -C client fetch --filter=blob:none origin &&
git -C client checkout FETCH_HEAD &&
git -C client rev-list HEAD \
--quiet --objects --missing=print >unsorted_actual &&
(
printf "?" &&
git hash-object server/b &&
printf "?" &&
git hash-object server/c/c
) >unsorted_expect &&
sort unsorted_actual >actual &&
sort unsorted_expect >expect &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1090-sparse-checkout-scope/server/.git/
Cloning into 'client'...
warning: You appear to have cloned an empty repository.
[master (root-commit) c2ab49b] message
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 a
create mode 100644 b
create mode 100644 c/c
From file:///<<PKGBUILDDIR>>/t/trash directory.t1090-sparse-checkout-scope/server
* [new branch] master -> origin/master
Note: switching to 'FETCH_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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at c2ab49b message
ok 6 - in partial clone, sparse checkout only fetches needed blobs
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1100-commit-tree-options.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1100-commit-tree-options/.git/
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 2 - construct commit
expecting success: git cat-file commit $(cat commitid) >commit
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
ok 5 - flags and then non flags
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1050-large.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1050-large/.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
ok 1 - setup
expecting success:
test_when_finished "rm -f .git/objects/pack/pack-*.* .git/index" &&
git $config add large1 &&
sz=$(file_size .git/objects/pack/pack-*.pack) &&
case "$expect" in
small) test "$sz" -le 100000 ;;
large) test "$sz" -ge 100000 ;;
esac
ok 2 - add with -c core.compression=0
expecting success:
test_when_finished "rm -f .git/objects/pack/pack-*.* .git/index" &&
git $config add large1 &&
sz=$(file_size .git/objects/pack/pack-*.pack) &&
case "$expect" in
small) test "$sz" -le 100000 ;;
large) test "$sz" -ge 100000 ;;
esac
ok 3 - add with -c core.compression=9
expecting success:
test_when_finished "rm -f .git/objects/pack/pack-*.* .git/index" &&
git $config add large1 &&
sz=$(file_size .git/objects/pack/pack-*.pack) &&
case "$expect" in
small) test "$sz" -le 100000 ;;
large) test "$sz" -ge 100000 ;;
esac
ok 4 - add with -c core.compression=0 -c pack.compression=0
expecting success:
test_when_finished "rm -f .git/objects/pack/pack-*.* .git/index" &&
git $config add large1 &&
sz=$(file_size .git/objects/pack/pack-*.pack) &&
case "$expect" in
small) test "$sz" -le 100000 ;;
large) test "$sz" -ge 100000 ;;
esac
ok 5 - add with -c core.compression=9 -c pack.compression=0
expecting success:
test_when_finished "rm -f .git/objects/pack/pack-*.* .git/index" &&
git $config add large1 &&
sz=$(file_size .git/objects/pack/pack-*.pack) &&
case "$expect" in
small) test "$sz" -le 100000 ;;
large) test "$sz" -ge 100000 ;;
esac
ok 6 - add with -c core.compression=0 -c pack.compression=9
expecting success:
test_when_finished "rm -f .git/objects/pack/pack-*.* .git/index" &&
git $config add large1 &&
sz=$(file_size .git/objects/pack/pack-*.pack) &&
case "$expect" in
small) test "$sz" -le 100000 ;;
large) test "$sz" -ge 100000 ;;
esac
ok 7 - add with -c core.compression=9 -c pack.compression=9
expecting success:
test_when_finished "rm -f .git/objects/pack/pack-*.* .git/index" &&
git $config add large1 &&
sz=$(file_size .git/objects/pack/pack-*.pack) &&
case "$expect" in
small) test "$sz" -le 100000 ;;
large) test "$sz" -ge 100000 ;;
esac
ok 8 - add with -c pack.compression=0
expecting success:
test_when_finished "rm -f .git/objects/pack/pack-*.* .git/index" &&
git $config add large1 &&
sz=$(file_size .git/objects/pack/pack-*.pack) &&
case "$expect" in
small) test "$sz" -le 100000 ;;
large) test "$sz" -ge 100000 ;;
esac
ok 9 - add with -c pack.compression=9
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
ok 10 - 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
Updated 1 path from the index
ok 11 - 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-tool genrandom "a" $(( 66 * 1024 )) >mid1 &&
test-tool genrandom "b" $(( 80 * 1024 )) >mid2 &&
test-tool 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
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1050-large/mid/.git/
ok 12 - packsize limit
expecting success:
git commit -q -m initial &&
echo modified >>large1 &&
git add large1 &&
git commit -q -m modified &&
git diff --raw HEAD^
:100644 100644 6cef6d8 171a2cf M large1
ok 13 - diff --raw
expecting success:
git diff --stat HEAD^ HEAD
large1 | Bin 2000000 -> 2000009 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
ok 14 - diff --stat
expecting success:
git diff HEAD^ HEAD >actual &&
grep "Binary files.*differ" actual
Binary files a/large1 and b/large1 differ
ok 15 - diff
expecting success:
git diff --cached HEAD^ >actual &&
grep "Binary files.*differ" actual
Binary files a/large1 and b/large1 differ
ok 16 - diff --cached
expecting success:
git hash-object large1
171a2cf5cd75bd8d405266c986591716925e9712
ok 17 - hash-object
expecting success:
git cat-file blob :large1 >/dev/null
ok 18 - cat-file a large file
expecting success:
git tag -m largefile largefiletag :large1 &&
git cat-file blob largefiletag >/dev/null
ok 19 - cat-file a large file from a tag
expecting success:
git show :large1 >/dev/null
ok 20 - 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
Cloning into 'foo'...
ok 21 - index-pack
expecting success:
git repack -ad
ok 22 - 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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1050-large/loose/.git/
dc5b4c5413c9a2a6ca4f121474e1c9c8ea086153
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1050-large/packed/.git/
ok 23 - pack-objects with large loose object
expecting success:
git archive --format=tar HEAD >/dev/null
ok 24 - tar achiving
expecting success:
git archive --format=zip -0 HEAD >/dev/null
ok 25 - zip achiving, store only
expecting success:
git archive --format=zip HEAD >/dev/null
ok 26 - zip achiving, deflate
expecting success:
git fsck 2>err &&
test_must_be_empty err
ok 27 - fsck large blobs
# passed all 27 test(s)
1..27
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1301-shared-repo.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1301-shared-repo/.git/
expecting success:
test_when_finished "rm -rf sub" &&
mkdir sub && (
cd sub &&
test_must_fail git init --shared=0400
)
fatal: problem with core.sharedRepository filemode value (0400).
The owner of files must always have read and write permissions.
ok 1 - shared = 0400 (faulty permission u-w)
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
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
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
Initialized empty shared Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1301-shared-repo/sub/.git/
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)
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
[master (root-commit) a2bd363] a1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a1
ok 5 - update-server-info honors core.sharedRepository
expecting success:
rm -f .git/info/refs &&
git update-server-info &&
actual="$(test_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="$(test_modebits .git/info/refs)" &&
verbose test "x$actual" = "x-$x"
ok 7 - shared = 0660 (rw-rw----) rw
expecting success:
rm -f .git/info/refs &&
git update-server-info &&
actual="$(test_modebits .git/info/refs)" &&
verbose test "x$actual" = "x-$y"
ok 8 - shared = 0640 (r--r-----) ro
expecting success:
rm -f .git/info/refs &&
git update-server-info &&
actual="$(test_modebits .git/info/refs)" &&
verbose test "x$actual" = "x-$x"
ok 9 - shared = 0640 (rw-r-----) rw
expecting success:
rm -f .git/info/refs &&
git update-server-info &&
actual="$(test_modebits .git/info/refs)" &&
verbose test "x$actual" = "x-$y"
ok 10 - shared = 0600 (r--------) ro
expecting success:
rm -f .git/info/refs &&
git update-server-info &&
actual="$(test_modebits .git/info/refs)" &&
verbose test "x$actual" = "x-$x"
ok 11 - shared = 0600 (rw-------) rw
expecting success:
rm -f .git/info/refs &&
git update-server-info &&
actual="$(test_modebits .git/info/refs)" &&
verbose test "x$actual" = "x-$y"
ok 12 - shared = 0666 (r--r--r--) ro
expecting success:
rm -f .git/info/refs &&
git update-server-info &&
actual="$(test_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="$(test_modebits .git/info/refs)" &&
verbose test "x$actual" = "x-$y"
ok 14 - shared = 0664 (r--r--r--) ro
expecting success:
rm -f .git/info/refs &&
git update-server-info &&
actual="$(test_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 &&
test_modebits .git/info/refs >actual &&
test_cmp expect actual
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 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)"
warning: templates not found in /<<PKGBUILDDIR>>/t/trash directory.t1301-shared-repo/sub/new/templates
Initialized empty shared Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1301-shared-repo/sub/new/.git/
[master (root-commit) e4c5dc6] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 frotz
ok 18 - forced modes
expecting success:
git config core.sharedrepository 0666 &&
umask 0022 &&
git init --bare child.git &&
echo "-rw-r--r--" >expect &&
test_modebits child.git/config >actual &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1301-shared-repo/sub/child.git/
ok 19 - remote init does not use config from cwd
expecting success:
git config core.sharedrepository 0666 &&
umask 0022 &&
echo whatever >templates/foo &&
git init --template=templates &&
echo "-rw-rw-rw-" >expect &&
test_modebits .git/foo >actual &&
test_cmp expect actual
Reinitialized existing shared Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1301-shared-repo/sub/.git/
ok 20 - re-init respects core.sharedrepository (local)
expecting success:
rm -rf child.git &&
umask 0022 &&
git init --bare --shared=0666 child.git &&
test_path_is_missing child.git/foo &&
git init --bare --template=templates child.git &&
echo "-rw-rw-rw-" >expect &&
test_modebits child.git/foo >actual &&
test_cmp expect actual
Initialized empty shared Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1301-shared-repo/sub/child.git/
Reinitialized existing shared Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1301-shared-repo/sub/child.git/
ok 21 - re-init respects core.sharedrepository (remote)
expecting success:
rm -rf child.git &&
umask 0022 &&
git config core.sharedrepository 0666 &&
cp .git/config templates/config &&
git init --bare --template=templates child.git &&
echo "-rw-rw-rw-" >expect &&
test_modebits child.git/HEAD >actual &&
test_cmp expect actual
Initialized empty shared Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1301-shared-repo/sub/child.git/
ok 22 - template can set core.sharedrepository
# passed all 22 test(s)
1..22
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1302-repo-version.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1302-repo-version/.git/
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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1302-repo-version/test/.git/
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 &&
git -C test config core.repositoryformatversion >actual2 &&
test_cmp expect actual &&
test_cmp expect actual2
ok 2 - gitdir selection on normal repos
expecting success:
# Make sure it would stop at test2, not trash
test_expect_code 1 git -C test2 config core.repositoryformatversion >actual
warning: Expected git repo version <= 1, found 99
ok 3 - gitdir selection on unsupported repo
expecting success:
git apply --stat test.patch &&
git -C test apply --stat ../test.patch &&
git -C test2 apply --stat ../test.patch
test.txt | 1 +
1 file changed, 1 insertion(+)
test.txt | 1 +
1 file changed, 1 insertion(+)
warning: Expected git repo version <= 1, found 99
warning: ignoring git dir '.git': Expected git repo version <= 1, found 99
test.txt | 1 +
1 file changed, 1 insertion(+)
ok 4 - gitdir not required mode
expecting success:
git apply --check --index test.patch &&
git -C test apply --check --index ../test.patch &&
test_must_fail git -C test2 apply --check --index ../test.patch
warning: Expected git repo version <= 1, found 99
warning: ignoring git dir '.git': Expected git repo version <= 1, found 99
error: --index outside a repository
ok 5 - gitdir required mode
expecting success:
mkconfig 0 >.git/config &&
check_allow
ok 6 - allow version=0
expecting success:
mkconfig 1 >.git/config &&
check_allow
ok 7 - allow version=1
expecting success:
mkconfig 1 noop >.git/config &&
check_allow
ok 8 - allow version=1 noop
expecting success:
mkconfig 1 no-such-extension >.git/config &&
check_abort
fatal: unknown repository extensions found:
no-such-extension
ok 9 - abort version=1 no-such-extension
expecting success:
mkconfig 0 no-such-extension >.git/config &&
check_allow
ok 10 - allow version=0 no-such-extension
expecting success:
mkconfig 1 preciousObjects >.git/config &&
check_allow
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
[master (root-commit) ddd63c9] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
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 15 - gc runs without complaint
# passed all 15 test(s)
1..15
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1303-wacky-config.sh ***
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 1 - modify same key
expecting success:
setup &&
git config section.other bar &&
check section.key foo &&
check section.other bar
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
expecting success:
setup &&
git config section.key "$LONG_VALUE" &&
check section.key "$LONG_VALUE"
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
ok 6 - get many entries
expecting success:
setup_many &&
git config --get-regexp "sec.*ke." >actual &&
test_line_count = 3126 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 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 - replace many entries
expecting success:
setup_many &&
git config --unset-all section.key &&
test_must_fail git config section.key
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
ok 11 - --add appends new value after existing empty value
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1304-default-acl.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1304-default-acl/.git/
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)
skipping test: Objects creation does not break ACLs with restrictive umask
# SHA1 for empty blob
check_perms_and_acl .git/objects/$(echo $EMPTY_BLOB | sed -e "s,^\(..\),\1/,")
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
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1300-config.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1300-config/.git/
expecting success:
rm -f .git/config
ok 1 - clear default config
expecting success:
git config core.penguin "little blue" &&
test_cmp expect .git/config
ok 2 - initial
expecting success:
git config Core.Movie BadPhysics &&
test_cmp expect .git/config
ok 3 - mixed case
expecting success:
git config Cores.WhatEver Second &&
test_cmp expect .git/config
ok 4 - similar section
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 8 - non-match result
expecting success:
test_cmp_config Second cores.whatever
ok 9 - find mixed-case key by canonical name
expecting success:
test_cmp_config Second CoReS.WhAtEvEr
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
test_cmp_config one section.subsection.key &&
test_cmp_config two section.SubSection.key
ok 11 - subsections are not canonicalized by git-config
expecting success:
git config --unset beta.baz
ok 12 - unset with cont. lines
expecting success: test_cmp expect .git/config
ok 13 - unset with cont. lines is correct
expecting success:
git config --unset-all beta.haha
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
error: wrong number of arguments, should be from 2 to 3
usage: git config [<options>]
Config file location
--global use global config file
--system use system config file
--local use repository config file
--worktree use per-worktree 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
-t, --type <> value is given this 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)
--expiry-date value is an expiry date
Other
-z, --null terminate values with NUL byte
--name-only show variable names only
--includes respect include directives on lookup
--show-origin show origin of config (file, standard input, blob, command line)
--default <value> with --get, use default value when missing entry
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
ok 18 - all replaced
expecting success:
git config beta.haha alpha &&
test_cmp expect .git/config
ok 19 - really mean test
expecting success:
git config nextsection.nonewline wow &&
test_cmp expect .git/config
ok 20 - really really mean test
expecting success:
test_cmp_config alpha beta.haha
ok 21 - get value
expecting success:
git config --unset beta.haha &&
test_cmp expect .git/config
ok 22 - unset
expecting success:
git config nextsection.NoNewLine "wow2 for me" "for me$" &&
test_cmp expect .git/config
ok 23 - multivar
expecting success:
git config --get nextsection.nonewline !for
wow
ok 24 - non-match
expecting success:
test_cmp_config wow --get nextsection.nonewline !for
ok 25 - non-match value
expecting success:
test_cmp_config "wow2 for me" --get nextsection.nonewline
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 27 - multi-valued get-all returns all
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
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 31 - multivar unset
expecting success: test_must_fail git config inval.2key blabla
error: invalid key: inval.2key
ok 32 - invalid key
expecting success: git config 123456.a123 987
ok 33 - correct key
expecting success:
git config Version.1.2.3eX.Alpha beta
ok 34 - hierarchical section
expecting success:
test_cmp expect .git/config
ok 35 - hierarchical section value
expecting success:
git config --list > output &&
test_cmp expect output
ok 36 - working --list
expecting success:
git --git-dir=nonexistent config --list >output &&
test_must_be_empty output
ok 37 - --list without repo produces empty output
expecting success:
git config --name-only --list >output &&
test_cmp expect output
ok 38 - --name-only --list
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
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
ok 41 - --add
expecting success:
git config --get novalue.variable ^$
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
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
ok 47 - get bool variable with no value
expecting success:
git config --bool emptyvalue.variable > output &&
test_cmp expect output
ok 48 - get bool variable with empty value
expecting success:
test_must_fail git config >output 2>&1 &&
test_i18ngrep usage output
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
usage: git config [<options>]
ok 49 - no arguments, but no crash
expecting success:
git config a.x y &&
test_cmp expect .git/config
ok 50 - new section is partial match of another
expecting success:
git config b.x y &&
git config a.b c &&
test_cmp expect .git/config
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 55 - alternative GIT_CONFIG (--file=-)
expecting success:
test_must_fail git config --file - some.value foo
fatal: writing to stdin is not supported
ok 56 - setting a value in stdin is an error
expecting success:
test_must_fail git config --file - --edit
fatal: editing stdin is not supported
ok 57 - editing stdin is an error
expecting success:
mkdir x &&
test_cmp_config -C x strasse --get --file ../other-config ein.bahn
ok 58 - refer config from subdirectory
expecting success:
test_cmp_config -C x strasse --file=../other-config --get ein.bahn
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
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: branch.world domination
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
expecting success:
test_cmp expect .git/config
ok 66 - rename succeeded
expecting success:
git config --rename-section branch.vier branch.zwei
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 ""
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"
error: invalid section name: bogus name
ok 70 - renaming to bogus section is rejected
expecting success:
git config --remove-section branch.zwei
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
ok 73 - section ending
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
ok 74 - numbers
expecting success:
git config giga.watts 121g &&
echo >expect &&
test_cmp_config 129922760704 --int --get giga.watts
ok 75 - --int is at least 64 bits
expecting success:
git config aninvalid.unit "1auto" &&
test_cmp_config 1auto aninvalid.unit &&
test_must_fail git config --int --get aninvalid.unit 2>actual &&
test_i18ngrep "bad numeric config value .1auto. for .aninvalid.unit. in file .git/config: invalid unit" actual
fatal: bad numeric config value '1auto' for 'aninvalid.unit' in file .git/config: invalid unit
ok 76 - invalid unit
expecting success:
printf "[bool]\n\tvar\n" >invalid &&
test_must_fail git config -f invalid --path bool.var 2>actual &&
test_i18ngrep "line 2" actual
fatal: bad config line 2 in file invalid
ok 77 - line number is reported correctly
expecting success:
echo "[broken" | test_must_fail git config --list --file - >output 2>&1 &&
test_i18ngrep "bad config line 1 in standard input" output
fatal: bad config line 1 in standard input
ok 78 - invalid stdin config
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
ok 79 - bool
expecting success:
git config bool.nobool foobar &&
test_must_fail git config --bool --get bool.nobool
fatal: bad numeric config value 'foobar' for 'bool.nobool' in file .git/config: invalid unit
ok 80 - 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 81 - 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 82 - set --bool
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
ok 83 - 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 84 - 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 85 - set --bool-or-int
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
ok 86 - 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 87 - get --path
expecting success:
(
sane_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
) &&
test_i18ngrep "[Ff]ailed to expand.*~/" msg &&
test_cmp expect result
fatal: failed to expand user dir in: '~/'
ok 88 - 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 line 1 in file .git/config
ok 89 - get --path barfs on boolean variable
expecting success:
rel="3.weeks.5.days.00:00" &&
rel_out="$rel ->" &&
cat >.git/config <<-\EOF &&
[date]
valid1 = "3.weeks.5.days 00:00"
valid2 = "Fri Jun 4 15:46:55 2010"
valid3 = "2017/11/11 11:11:11PM"
valid4 = "2017/11/10 09:08:07 PM"
valid5 = "never"
invalid1 = "abc"
EOF
cat >expect <<-EOF &&
$(test-tool date timestamp $rel)
1275666415
1510441871
1510348087
0
EOF
: "work around heredoc parsing bug fixed in dash 0.5.7 (in ec2c84d)" &&
{
echo "$rel_out $(git config --expiry-date date.valid1)"
git config --expiry-date date.valid2 &&
git config --expiry-date date.valid3 &&
git config --expiry-date date.valid4 &&
git config --expiry-date date.valid5
} >actual &&
test_cmp expect actual &&
test_must_fail git config --expiry-date date.invalid1
error: 'abc' for 'date.invalid1' is not a valid timestamp
fatal: bad config line 7 in file .git/config
ok 90 - get --expiry-date
expecting success:
rm .git/config &&
git config foo.color "red" &&
git config --get --type=color foo.color >actual.raw &&
test_decode_color <actual.raw >actual &&
echo "<RED>" >expect &&
test_cmp expect actual
ok 91 - get --type=color
expecting success:
rm .git/config &&
git config --type=color foo.color "red" &&
test_cmp expect .git/config
ok 92 - set --type=color
expecting success:
echo "[foo]bar=not-a-color" >.git/config &&
test_must_fail git config --get --type=color foo.bar
error: invalid color value: not-a-color
fatal: bad config line 1 in file .git/config
ok 93 - get --type=color barfs on non-color
expecting success:
test_must_fail git config --type=color foo.color "not-a-color" 2>error &&
test_i18ngrep "cannot parse color" error
fatal: cannot parse color 'not-a-color'
ok 94 - set --type=color barfs on non-color
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
ok 95 - quoting
expecting success:
test_must_fail git config "key.with
newline" 123
error: invalid key: key.with
newline
ok 96 - key with newline
expecting success: git config key.sub value.with\\\
newline
ok 97 - value with newline
expecting success:
git config --list > result &&
test_cmp expect result
ok 98 - value continued on next line
expecting success:
git config --null --list >result.raw &&
nul_to_q <result.raw >result &&
echo >>result &&
test_cmp expect result
ok 99 - --null --list
expecting success:
git config --null --get-regexp "val[0-9]" >result.raw &&
nul_to_q <result.raw >result &&
echo >>result &&
test_cmp expect result
ok 100 - --null --get-regexp
expecting success:
git config section.val "foo bar" &&
test_cmp_config "foo bar" section.val
ok 101 - 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
)
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
ok 102 - 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
ok 103 - 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
fatal: unable to read config file 'linktolinktonada': No such file or directory
ok 104 - 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
fatal: bad alias.split-cmdline-fix string: unclosed quote
[master (root-commit) 5d74a41] initial commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
fatal: Bad branch.master.mergeoptions string: unclosed quote
ok 105 - 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
error: key does not contain a section: name
fatal: unable to parse command-line config
ok 106 - git -c "key=value" support
expecting success:
echo >expect &&
git -c foo.empty= config --path foo.empty >actual &&
test_cmp expect actual
ok 107 - 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
error: key does not contain a section: foo=bar
error: invalid key: foo=.bar
error: invalid key: foo.ba=r
error: invalid key: foo.1bar
error: invalid key (newline): foo.ba
z.bar
error: key does not contain a section: .
error: key does not contain a section: .foo
error: key does not contain variable name: foo.
error: key does not contain variable name: .foo.
ok 108 - 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
ok 109 - git -c works with aliases of builtins
expecting success:
test_config alias.CamelCased "rev-parse HEAD" &&
git CamelCased >out &&
git rev-parse HEAD >expect &&
test_cmp expect out
ok 110 - aliases can be CamelCased
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 111 - 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 112 - 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 113 - 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 114 - git -c complains about empty key and value
expecting success:
test_config alias.x "!git -c x.two=2 config --get-regexp ^x\.*" &&
cat >expect <<-\EOF &&
x.one 1
x.two 2
EOF
git -c x.one=1 x >actual &&
test_cmp expect actual
ok 115 - multiple git -c appends config
expecting success:
# sec.var and sec.VAR are the same variable, as the first
# and the last level of a configuration variable name is
# case insensitive.
echo VAL >expect &&
git -c sec.var=val -c sec.VAR=VAL config --get sec.var >actual &&
test_cmp expect actual &&
git -c SEC.var=val -c sec.var=VAL config --get sec.var >actual &&
test_cmp expect actual &&
git -c sec.var=val -c sec.VAR=VAL config --get SEC.var >actual &&
test_cmp expect actual &&
git -c SEC.var=val -c sec.var=VAL config --get sec.VAR >actual &&
test_cmp expect actual
ok 116 - last one wins: two level vars
expecting success:
# v.a.r and v.A.r are not the same variable, as the middle
# level of a three-level configuration variable name is
# case sensitive.
echo val >expect &&
git -c v.a.r=val -c v.A.r=VAL config --get v.a.r >actual &&
test_cmp expect actual &&
git -c v.a.r=val -c v.A.r=VAL config --get V.a.R >actual &&
test_cmp expect actual &&
# v.a.r and V.a.R are the same variable, as the first
# and the last level of a configuration variable name is
# case insensitive.
echo VAL >expect &&
git -c v.a.r=val -c v.a.R=VAL config --get v.a.r >actual &&
test_cmp expect actual &&
git -c v.a.r=val -c V.a.r=VAL config --get v.a.r >actual &&
test_cmp expect actual &&
git -c v.a.r=val -c v.a.R=VAL config --get V.a.R >actual &&
test_cmp expect actual &&
git -c v.a.r=val -c V.a.r=VAL config --get V.a.R >actual &&
test_cmp expect actual
ok 117 - last one wins: three level vars
expecting success:
test_when_finished "rm -f testConfig testConfig_expect testConfig_actual" &&
cat >testConfig_actual <<-EOF &&
[V.A]
r = value1
EOF
q_to_tab >testConfig_expect <<-EOF &&
[V.A]
Qr = value2
EOF
git config -f testConfig_actual "v.a.r" value2 &&
test_cmp testConfig_expect testConfig_actual &&
cat >testConfig_actual <<-EOF &&
[V.A]
r = value1
EOF
q_to_tab >testConfig_expect <<-EOF &&
[V.A]
QR = value2
EOF
git config -f testConfig_actual "V.a.R" value2 &&
test_cmp testConfig_expect testConfig_actual &&
cat >testConfig_actual <<-EOF &&
[V.A]
r = value1
EOF
q_to_tab >testConfig_expect <<-EOF &&
[V.A]
r = value1
Qr = value2
EOF
git config -f testConfig_actual "V.A.r" value2 &&
test_cmp testConfig_expect testConfig_actual &&
cat >testConfig_actual <<-EOF &&
[V.A]
r = value1
EOF
q_to_tab >testConfig_expect <<-EOF &&
[V.A]
r = value1
Qr = value2
EOF
git config -f testConfig_actual "v.A.r" value2 &&
test_cmp testConfig_expect testConfig_actual
ok 118 - old-fashioned settings are case insensitive
expecting success:
test_when_finished "rm -f testConfig testConfig_expect testConfig_actual" &&
cat >testConfig_actual <<-EOF &&
[V "A"]
R = v1
[K "E"]
Y = v1
[a "b"]
c = v1
[d "e"]
f = v1
EOF
q_to_tab >testConfig_expect <<-EOF &&
[V "A"]
Qr = v2
[K "E"]
Qy = v2
[a "b"]
Qc = v2
[d "e"]
f = v1
[d "E"]
Qf = v2
EOF
# exact match
git config -f testConfig_actual a.b.c v2 &&
# match section and subsection, key is cased differently.
git config -f testConfig_actual K.E.y v2 &&
# section and key are matched case insensitive, but subsection needs
# to match; When writing out new values only the key is adjusted
git config -f testConfig_actual v.A.r v2 &&
# subsection is not matched:
git config -f testConfig_actual d.E.f v2 &&
test_cmp testConfig_expect testConfig_actual
ok 119 - setting different case sensitive subsections
expecting success:
test_must_fail git -c "$VAR=VAL" config -l
error: key does not contain a section: a
fatal: unable to parse command-line config
ok 120 - git -c a=VAL rejects invalid 'a'
expecting success:
test_must_fail git -c "$VAR=VAL" config -l
error: key does not contain a section: .a
fatal: unable to parse command-line config
ok 121 - git -c .a=VAL rejects invalid '.a'
expecting success:
test_must_fail git -c "$VAR=VAL" config -l
error: key does not contain variable name: a.
fatal: unable to parse command-line config
ok 122 - git -c a.=VAL rejects invalid 'a.'
expecting success:
test_must_fail git -c "$VAR=VAL" config -l
error: invalid key: a.0b
fatal: unable to parse command-line config
ok 123 - git -c a.0b=VAL rejects invalid 'a.0b'
expecting success:
test_must_fail git -c "$VAR=VAL" config -l
error: key does not contain variable name: a.b c.
fatal: unable to parse command-line config
ok 124 - git -c a.b c.=VAL rejects invalid 'a.b c.'
expecting success:
test_must_fail git -c "$VAR=VAL" config -l
error: invalid key: a.b c.0d
fatal: unable to parse command-line config
ok 125 - git -c a.b c.0d=VAL rejects invalid 'a.b c.0d'
expecting success:
echo VAL >expect &&
git -c "$VAR=VAL" config --get "$VAR" >actual &&
test_cmp expect actual
ok 126 - git -c a.b=VAL works with valid 'a.b'
expecting success:
echo VAL >expect &&
git -c "$VAR=VAL" config --get "$VAR" >actual &&
test_cmp expect actual
ok 127 - git -c a.b c.d=VAL works with valid 'a.b c.d'
expecting success:
GIT_CONFIG_PARAMETERS="" git -c x.one=1 config --list
section.sub=section.val1=foo=bar
section.sub=section.val2=foo
bar
section.sub=section.val3=
section.sub=section.val4=
section.sub=section.val5
section.val=foo bar
alias.split-cmdline-fix=echo "
alias.checkconfig=-c foo.check=bar config foo.check
branch.master.mergeoptions=echo "
foo.bar=true
foo.ba =z.bar=false
x.one=1
ok 128 - git -c is not confused by empty environment
expecting success:
cat >expect <<-\EOF &&
env.one one
env.two two
EOF
GIT_CONFIG_PARAMETERS="${sq}env.one=one${sq} ${sq}env.two=two${sq}" \
git config --get-regexp "env.*" >actual &&
test_cmp expect actual &&
cat >expect <<-EOF &&
env.one one${sq}
env.two two
EOF
GIT_CONFIG_PARAMETERS="${sq}env.one=one${sq}\\$sq$sq$sq ${sq}env.two=two${sq}" \
git config --get-regexp "env.*" >actual &&
test_cmp expect actual &&
test_must_fail env \
GIT_CONFIG_PARAMETERS="${sq}env.one=one${sq}\\$sq ${sq}env.two=two${sq}" \
git config --get-regexp "env.*"
error: bogus format in GIT_CONFIG_PARAMETERS
fatal: unable to parse command-line config
ok 129 - detect bogus GIT_CONFIG_PARAMETERS
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 130 - 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
ok 131 - 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 &&
test_i18ngrep " line 3 " error
fatal: bad config line 3 in file .git/config
ok 132 - 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 &&
test_i18ngrep " line 2 " error
fatal: bad config line 2 in file .git/config
ok 133 - 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 &&
test_i18ngrep " line 3 " error
fatal: bad config line 3 in file .git/config
ok 134 - barf on incomplete string
expecting success:
cat >.git/config <<-\EOF &&
[http]
sslVerify
[http "https://weak.example.com"]
sslVerify = false
cookieFile = /tmp/cookie.txt
EOF
test_expect_code 1 git config --bool --get-urlmatch doesnt.exist https://good.example.com >actual &&
test_must_be_empty actual &&
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
ok 135 - urlmatch
expecting success:
cat >.git/config <<-\EOF &&
[http "https://example.com/"]
cookieFile = /tmp/root.txt
[http "https://example.com/subdirectory"]
cookieFile = /tmp/subdirectory.txt
[http "https://user@example.com/"]
cookieFile = /tmp/user.txt
[http "https://averylonguser@example.com/"]
cookieFile = /tmp/averylonguser.txt
[http "https://preceding.example.com"]
cookieFile = /tmp/preceding.txt
[http "https://*.example.com"]
cookieFile = /tmp/wildcard.txt
[http "https://*.example.com/wildcardwithsubdomain"]
cookieFile = /tmp/wildcardwithsubdomain.txt
[http "https://trailing.example.com"]
cookieFile = /tmp/trailing.txt
[http "https://user@*.example.com/"]
cookieFile = /tmp/wildcardwithuser.txt
[http "https://sub.example.com/"]
cookieFile = /tmp/sub.txt
EOF
echo http.cookiefile /tmp/root.txt >expect &&
git config --get-urlmatch HTTP https://example.com >actual &&
test_cmp expect actual &&
echo http.cookiefile /tmp/subdirectory.txt >expect &&
git config --get-urlmatch HTTP https://example.com/subdirectory >actual &&
test_cmp expect actual &&
echo http.cookiefile /tmp/subdirectory.txt >expect &&
git config --get-urlmatch HTTP https://example.com/subdirectory/nested >actual &&
test_cmp expect actual &&
echo http.cookiefile /tmp/user.txt >expect &&
git config --get-urlmatch HTTP https://user@example.com/ >actual &&
test_cmp expect actual &&
echo http.cookiefile /tmp/subdirectory.txt >expect &&
git config --get-urlmatch HTTP https://averylonguser@example.com/subdirectory >actual &&
test_cmp expect actual &&
echo http.cookiefile /tmp/preceding.txt >expect &&
git config --get-urlmatch HTTP https://preceding.example.com >actual &&
test_cmp expect actual &&
echo http.cookiefile /tmp/wildcard.txt >expect &&
git config --get-urlmatch HTTP https://wildcard.example.com >actual &&
test_cmp expect actual &&
echo http.cookiefile /tmp/sub.txt >expect &&
git config --get-urlmatch HTTP https://sub.example.com/wildcardwithsubdomain >actual &&
test_cmp expect actual &&
echo http.cookiefile /tmp/trailing.txt >expect &&
git config --get-urlmatch HTTP https://trailing.example.com >actual &&
test_cmp expect actual &&
echo http.cookiefile /tmp/sub.txt >expect &&
git config --get-urlmatch HTTP https://user@sub.example.com >actual &&
test_cmp expect actual
ok 136 - urlmatch favors more specific URLs
expecting success:
cat >.git/config <<-\EOF &&
[http]
sslVerify
[http "https://*.example.com"]
sslVerify = false
cookieFile = /tmp/cookie.txt
EOF
test_expect_code 1 git config --bool --get-urlmatch doesnt.exist https://good.example.com >actual &&
test_must_be_empty actual &&
echo true >expect &&
git config --bool --get-urlmatch http.SSLverify https://example.com >actual &&
test_cmp expect actual &&
echo true >expect &&
git config --bool --get-urlmatch http.SSLverify https://good-example.com >actual &&
test_cmp expect actual &&
echo true >expect &&
git config --bool --get-urlmatch http.sslverify https://deep.nested.example.com >actual &&
test_cmp expect actual &&
echo false >expect &&
git config --bool --get-urlmatch http.sslverify https://good.example.com >actual &&
test_cmp expect actual &&
{
echo http.cookiefile /tmp/cookie.txt &&
echo http.sslverify false
} >expect &&
git config --get-urlmatch HTTP https://good.example.com >actual &&
test_cmp expect actual &&
echo http.sslverify >expect &&
git config --get-urlmatch HTTP https://more.example.com.au >actual &&
test_cmp expect actual
ok 137 - urlmatch with wildcard
expecting success:
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
# 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
EOF
git config --unset section.key &&
test_cmp expect .git/config &&
cat >.git/config <<-\EOF &&
[section]
key = value
[next-section]
EOF
cat >expect <<-\EOF &&
[next-section]
EOF
git config --unset section.key &&
test_cmp expect .git/config &&
q_to_tab >.git/config <<-\EOF &&
[one]
Qkey = "multiline \
QQ# with comment"
[two]
key = true
EOF
git config --unset two.key &&
! grep two .git/config &&
q_to_tab >.git/config <<-\EOF &&
[one]
Qkey = "multiline \
QQ# with comment"
[one]
key = true
EOF
git config --unset-all one.key &&
test_line_count = 0 .git/config &&
q_to_tab >.git/config <<-\EOF &&
[one]
Qkey = true
Q# a comment not at the start
[two]
Qkey = true
EOF
git config --unset two.key &&
grep two .git/config &&
q_to_tab >.git/config <<-\EOF &&
[one]
Qkey = not [two "subsection"]
[two "subsection"]
[two "subsection"]
Qkey = true
[TWO "subsection"]
[one]
EOF
git config --unset two.subsection.key &&
test "not [two subsection]" = "$(git config one.key)" &&
test_line_count = 3 .git/config
[two]
ok 138 - --unset last key removes section (except if commented)
expecting success:
cat >.git/config <<-\EOF &&
[section]
key = value1
key = value2
EOF
git config --unset-all section.key &&
test_line_count = 0 .git/config
ok 139 - --unset-all removes section if empty & uncommented
expecting success:
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
ok 140 - adding a key into an empty section reuses header
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"
ok 141 - preserves existing permissions
expecting success:
INCLUDE_DIR="$HOME/include" &&
mkdir -p "$INCLUDE_DIR" &&
cat >"$INCLUDE_DIR"/absolute.include <<-\EOF &&
[user]
absolute = include
EOF
cat >"$INCLUDE_DIR"/relative.include <<-\EOF &&
[user]
relative = include
EOF
cat >"$HOME"/.gitconfig <<-EOF &&
[user]
global = true
override = global
[include]
path = "$INCLUDE_DIR/absolute.include"
EOF
cat >.git/config <<-\EOF
[user]
local = true
override = local
[include]
path = ../include/relative.include
EOF
ok 142 - set up --show-origin tests
expecting success:
cat >expect <<-EOF &&
file:$HOME/.gitconfig user.global=true
file:$HOME/.gitconfig user.override=global
file:$HOME/.gitconfig include.path=$INCLUDE_DIR/absolute.include
file:$INCLUDE_DIR/absolute.include user.absolute=include
file:.git/config user.local=true
file:.git/config user.override=local
file:.git/config include.path=../include/relative.include
file:.git/../include/relative.include user.relative=include
command line: user.cmdline=true
EOF
git -c user.cmdline=true config --list --show-origin >output &&
test_cmp expect output
ok 143 - --show-origin with --list
expecting success:
cat >expect <<-EOF &&
file:$HOME/.gitconfigQuser.global
trueQfile:$HOME/.gitconfigQuser.override
globalQfile:$HOME/.gitconfigQinclude.path
$INCLUDE_DIR/absolute.includeQfile:$INCLUDE_DIR/absolute.includeQuser.absolute
includeQfile:.git/configQuser.local
trueQfile:.git/configQuser.override
localQfile:.git/configQinclude.path
../include/relative.includeQfile:.git/../include/relative.includeQuser.relative
includeQcommand line:Quser.cmdline
trueQ
EOF
git -c user.cmdline=true config --null --list --show-origin >output.raw &&
nul_to_q <output.raw >output &&
# The here-doc above adds a newline that the --null output would not
# include. Add it here to make the two comparable.
echo >>output &&
test_cmp expect output
ok 144 - --show-origin with --list --null
expecting success:
cat >expect <<-\EOF &&
file:.git/config user.local=true
file:.git/config user.override=local
file:.git/config include.path=../include/relative.include
EOF
git config --local --list --show-origin >output &&
test_cmp expect output
ok 145 - --show-origin with single file
expecting success:
cat >expect <<-EOF &&
file:$HOME/.gitconfig user.global true
file:.git/config user.local true
EOF
git config --show-origin --get-regexp "user\.[g|l].*" >output &&
test_cmp expect output
ok 146 - --show-origin with --get-regexp
expecting success:
cat >expect <<-\EOF &&
file:.git/config local
EOF
git config --show-origin user.override >output &&
test_cmp expect output
ok 147 - --show-origin getting a single key
expecting success:
CUSTOM_CONFIG_FILE="file\" (dq) and spaces.conf" &&
cat >"$CUSTOM_CONFIG_FILE" <<-\EOF
[user]
custom = true
EOF
ok 148 - set up custom config file
expecting success:
cat >expect <<-\EOF &&
file:"file\" (dq) and spaces.conf" user.custom=true
EOF
git config --file "$CUSTOM_CONFIG_FILE" --show-origin --list >output &&
test_cmp expect output
ok 149 - --show-origin escape special file name characters
expecting success:
cat >expect <<-\EOF &&
standard input: user.custom=true
EOF
git config --file - --show-origin --list <"$CUSTOM_CONFIG_FILE" >output &&
test_cmp expect output
ok 150 - --show-origin stdin
expecting success:
cat >"$INCLUDE_DIR"/stdin.include <<-EOF &&
[user]
stdin = include
EOF
cat >expect <<-EOF &&
file:$INCLUDE_DIR/stdin.include include
EOF
echo "[include]path=\"$INCLUDE_DIR\"/stdin.include" |
git config --show-origin --includes --file - user.stdin >output &&
test_cmp expect output
ok 151 - --show-origin stdin with file include
expecting success:
blob=$(git hash-object -w "$CUSTOM_CONFIG_FILE") &&
cat >expect <<-EOF &&
blob:$blob user.custom=true
EOF
git config --blob=$blob --show-origin --list >output &&
test_cmp expect output
ok 152 - --show-origin blob
expecting success:
cat >expect <<-\EOF &&
blob:"master:file\" (dq) and spaces.conf" user.custom=true
EOF
git add "$CUSTOM_CONFIG_FILE" &&
git commit -m "new config file" &&
git config --blob=master:"$CUSTOM_CONFIG_FILE" --show-origin --list >output &&
test_cmp expect output
[master 3bd7610] new config file
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
create mode 100644 "file\" (dq) and spaces.conf"
ok 153 - --show-origin blob ref
expecting success:
# we expect 128 to ensure that we do not simply
# fail to find anything and return code "1"
test_expect_code 128 nongit git config --local foo.bar
fatal: --local can only be used inside a git repository
ok 154 - --local requires a repo
expecting success:
test_cmp_config 1048576 --type=int --type=int core.big
ok 155 - identical modern --type specifiers are allowed
expecting success:
test_cmp_config 1048576 --int --int core.big
ok 156 - identical legacy --type specifiers are allowed
expecting success:
test_cmp_config 1048576 --int --type=int core.big
ok 157 - identical mixed --type specifiers are allowed
expecting success:
test_must_fail git config --type=int --type=bool core.big 2>error &&
test_i18ngrep "only one type at a time" error
error: only one type at a time
ok 158 - non-identical modern --type specifiers are not allowed
expecting success:
test_must_fail git config --int --bool core.big 2>error &&
test_i18ngrep "only one type at a time" error
error: only one type at a time
ok 159 - non-identical legacy --type specifiers are not allowed
expecting success:
test_must_fail git config --type=int --bool core.big 2>error &&
test_i18ngrep "only one type at a time" error
error: only one type at a time
ok 160 - non-identical mixed --type specifiers are not allowed
expecting success:
test_cmp_config true --type=bool core.foo
ok 161 - --type allows valid type specifiers
expecting success:
test_cmp_config 10 --type=bool --no-type core.number
ok 162 - --no-type unsets type specifiers
expecting success:
test_cmp_config 1048576 --type=bool --no-type --type=int core.big
ok 163 - unset type specifiers may be reset to conflicting ones
expecting success:
test_must_fail git config --type=nonsense core.foo 2>error &&
test_i18ngrep "unrecognized --type argument" error
fatal: unrecognized --type argument, nonsense
ok 164 - --type rejects unknown specifiers
expecting success:
q_to_tab >.git/config <<-\EOF &&
[abc]key
QkeepSection
[xyz]
Qkey = 1
[abc]
Qkey = a
EOF
q_to_tab >expect <<-\EOF &&
[abc]
QkeepSection
[xyz]
Qkey = 1
[abc]
Qkey = b
EOF
git config --replace-all abc.key b &&
test_cmp expect .git/config
ok 165 - --replace-all does not invent newlines
# passed all 165 test(s)
1..165
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1305-config-include.sh ***
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 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 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
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
ok 10 - config modification does not affect includes
expecting success:
cat >.gitconfig <<-\EOF &&
[include]path = non-existent
[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
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 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
error: relative config includes must come from files
error: bad config line 1 in blob 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
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 line 1 in standard input
ok 17 - relative includes from stdin line fail
expecting success:
git init foo &&
(
cd foo &&
echo "[includeIf \"gitdir:foo/\"]path=bar" >>.git/config &&
echo "[test]one=1" >.git/bar &&
echo 1 >expect &&
git config test.one >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1305-config-include/foo/.git/
ok 18 - conditional include, both unanchored
expecting success:
(
cd foo &&
echo "[includeIf \"gitdir:~/foo/\"]path=bar2" >>.git/config &&
echo "[test]two=2" >.git/bar2 &&
echo 2 >expect &&
git config test.two >actual &&
test_cmp expect actual
)
ok 19 - conditional include, $HOME expansion
expecting success:
(
cd foo &&
echo "[includeIf \"gitdir:**/foo/**\"]path=bar3" >>.git/config &&
echo "[test]three=3" >.git/bar3 &&
echo 3 >expect &&
git config test.three >actual &&
test_cmp expect actual
)
ok 20 - conditional include, full pattern
expecting success:
echo "[includeIf \"gitdir:./foo/.git\"]path=bar4" >>.gitconfig &&
echo "[test]four=4" >bar4 &&
(
cd foo &&
echo 4 >expect &&
git config test.four >actual &&
test_cmp expect actual
)
ok 21 - conditional include, relative path
expecting success:
(
cd foo &&
echo "[includeIf \"gitdir/i:FOO/\"]path=bar5" >>.git/config &&
echo "[test]five=5" >.git/bar5 &&
echo 5 >expect &&
git config test.five >actual &&
test_cmp expect actual
)
ok 22 - conditional include, both unanchored, icase
expecting success:
(
cd foo &&
echo "[includeIf \"gitdir:foo/\"]path=bar6" >>.git/config &&
echo "[test]six=6" >.git/bar6 &&
echo 6 >expect &&
test-tool config read_early_config test.six >actual &&
test_cmp expect actual
)
ok 23 - conditional include, early config reading
expecting success:
REPO=foo/bar/repo &&
git init $REPO &&
cat >>$REPO/.git/config <<-\EOF &&
[includeIf "gitdir:**/foo/**/bar/**"]
path=bar7
EOF
echo "[test]seven=7" >$REPO/.git/bar7 &&
echo 7 >expect &&
git -C $REPO config test.seven >actual &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1305-config-include/foo/bar/repo/.git/
ok 24 - conditional include with /**/
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:
mkdir real-home &&
ln -s real-home home &&
(
HOME="$TRASH_DIRECTORY/home" &&
export HOME &&
cd "$HOME" &&
git init foo &&
cd foo &&
mkdir sub
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1305-config-include/real-home/foo/.git/
ok 25 - conditional include, set up symlinked $HOME
expecting success:
(
HOME="$TRASH_DIRECTORY/home" &&
export HOME &&
cd "$HOME"/foo &&
echo "[includeIf \"gitdir:~/foo/\"]path=bar2" >>.git/config &&
echo "[test]two=2" >.git/bar2 &&
echo 2 >expect &&
force_setup_explicit_git_dir &&
git -C sub config test.two >actual &&
test_cmp expect actual
)
ok 26 - conditional include, $HOME expansion with symlinks
expecting success:
echo "[includeIf \"gitdir:./foo/.git\"]path=bar4" >home/.gitconfig &&
echo "[test]four=4" >home/bar4 &&
(
HOME="$TRASH_DIRECTORY/home" &&
export HOME &&
cd "$HOME"/foo &&
echo 4 >expect &&
force_setup_explicit_git_dir &&
git -C sub config test.four >actual &&
test_cmp expect actual
)
ok 27 - conditional include, relative path with symlinks
expecting success:
ln -s foo bar &&
(
cd bar &&
echo "[includeIf \"gitdir:bar/\"]path=bar7" >>.git/config &&
echo "[test]seven=7" >.git/bar7 &&
echo 7 >expect &&
git config test.seven >actual &&
test_cmp expect actual
)
ok 28 - conditional include, gitdir matching symlink
expecting success:
(
cd bar &&
echo "[includeIf \"gitdir/i:BAR/\"]path=bar8" >>.git/config &&
echo "[test]eight=8" >.git/bar8 &&
echo 8 >expect &&
git config test.eight >actual &&
test_cmp expect actual
)
ok 29 - conditional include, gitdir matching symlink, icase
expecting success:
echo "[includeIf \"onbranch:foo-branch\"]path=bar9" >>.git/config &&
echo "[test]nine=9" >.git/bar9 &&
git checkout -b master &&
test_must_fail git config test.nine &&
git checkout -b foo-branch &&
echo 9 >expect &&
git config test.nine >actual &&
test_cmp expect actual
Switched to a new branch 'master'
Switched to a new branch 'foo-branch'
ok 30 - conditional include, onbranch
expecting success:
echo "[includeIf \"onbranch:?oo-*/**\"]path=bar10" >>.git/config &&
echo "[test]ten=10" >.git/bar10 &&
git checkout -b not-foo-branch/a &&
test_must_fail git config test.ten &&
echo 10 >expect &&
git checkout -b foo-branch/a/b/c &&
git config test.ten >actual &&
test_cmp expect actual &&
git checkout -b moo-bar/a &&
git config test.ten >actual &&
test_cmp expect actual
Switched to a new branch 'not-foo-branch/a'
Switched to a new branch 'foo-branch/a/b/c'
Switched to a new branch 'moo-bar/a'
ok 31 - conditional include, onbranch, wildcard
expecting success:
echo "[includeIf \"onbranch:foo-dir/\"]path=bar11" >>.git/config &&
echo "[test]eleven=11" >.git/bar11 &&
git checkout -b not-foo-dir/a &&
test_must_fail git config test.eleven &&
echo 11 >expect &&
git checkout -b foo-dir/a/b/c &&
git config test.eleven >actual &&
test_cmp expect actual
Switched to a new branch 'not-foo-dir/a'
Switched to a new branch 'foo-dir/a/b/c'
ok 32 - conditional include, onbranch, implicit /** for /
expecting success:
git init --bare cycle &&
git -C cycle config include.path cycle &&
git config -f cycle/cycle include.path config &&
test_must_fail \
env GIT_TEST_GETTEXT_POISON=false \
git -C cycle config --get-all test.value 2>stderr &&
grep "exceeded maximum include depth" stderr
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1305-config-include/cycle/
fatal: exceeded maximum include depth (10) while including
ok 33 - include cycles are detected
# passed all 33 test(s)
1..33
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1306-xdg-files.sh ***
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
ok 1 - read config: xdg file exists and ~/.gitconfig doesn't
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 - 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
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 - "$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 5 - read with --get: xdg file exists and ~/.gitconfig exists
expecting success:
rm .gitconfig &&
echo user.name=read_config >expected &&
git config --global --list >actual &&
test_cmp expected actual
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
ok 7 - read with --list: xdg file exists and ~/.gitconfig exists
expecting success:
git init git &&
cd git &&
echo foo >to_be_excluded
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
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
)
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 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
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:
(sane_unset HOME &&
git config --unset core.excludesfile &&
git ls-files --exclude-standard --ignored >actual) &&
test_must_be_empty actual
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
ok 14 - Checking attributes in the XDG attributes file
expecting success:
(sane_unset HOME &&
git check-attr -a f >actual) &&
test_must_be_empty actual
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 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 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 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
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
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1307-config-blob.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1307-config-blob/.git/
expecting success:
cat >config <<-\EOF &&
[some]
value = 1
EOF
git add config &&
git commit -m foo
[master (root-commit) 5392342] 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 2 - list config blob contents
expecting success:
echo true >expect &&
git config --blob=HEAD:config --bool some.value >actual &&
test_cmp expect actual
ok 3 - fetch value from blob
expecting success:
test_must_fail git config --blob=HEAD:config non.existing
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
--worktree use per-worktree 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
-t, --type <> value is given this 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)
--expiry-date value is an expiry date
Other
-z, --null terminate values with NUL byte
--name-only show variable names only
--includes respect include directives on lookup
--show-origin show origin of config (file, standard input, blob, command line)
--default <value> with --get, use default value when missing entry
ok 5 - reading from blob and file is an error
expecting success:
test_must_fail git config --blob=HEAD:doesnotexist --list
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
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
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
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
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 &&
test_i18ngrep "HEAD:config" err
[master d86e7cb] broken
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: bad config line 2 in blob 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
[master 503cd7a] CR
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 2 deletions(-)
ok 12 - can parse blob ending with CR
expecting success:
test_must_fail nongit git config --blob=foo --list
fatal: --blob can only be used inside a git repository
ok 13 - config --blob outside of a repository is an error
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1309-early-config.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1309-early-config/.git/
expecting success:
test_config early.config correct &&
test-tool config read_early_config early.config >output &&
test correct = "$(cat output)"
ok 1 - read early config
expecting success:
test_config early.config sub &&
mkdir -p sub &&
(
cd sub &&
test-tool config read_early_config early.config
) >output &&
test sub = "$(cat output)"
ok 2 - in a sub-directory
expecting success:
test_config early.config ceiling &&
mkdir -p sub &&
(
GIT_CEILING_DIRECTORIES="$PWD" &&
export GIT_CEILING_DIRECTORIES &&
cd sub &&
test-tool config read_early_config early.config
) >output &&
test -z "$(cat output)"
ok 3 - ceiling
expecting success:
mkdir -p xdg/git &&
git config -f xdg/git/config early.config xdg &&
test_config early.config ceiling &&
mkdir -p sub &&
(
XDG_CONFIG_HOME="$PWD"/xdg &&
GIT_CEILING_DIRECTORIES="$PWD" &&
export GIT_CEILING_DIRECTORIES XDG_CONFIG_HOME &&
cd sub &&
test-tool config read_early_config early.config
) >output &&
test xdg = "$(cat output)"
ok 4 - ceiling #2
expecting success:
echo "[test]source = home" >>.gitconfig &&
git init foo &&
(
cd foo &&
echo "[test]source = repo" >>.git/config &&
GIT_CONFIG_PARAMETERS=$cmdline_config test-tool config \
read_early_config test.source >actual &&
cat >expected <<-\EOF &&
home
repo
cmdline
EOF
test_cmp expected actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1309-early-config/foo/.git/
ok 5 - read config file in right order
expecting success:
test_with_config "[core]repositoryformatversion = 999999" 2>err &&
test_i18ngrep "warning:.* Expected git repo version <= [1-9]" err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1309-early-config/throwaway/.git/
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
warning: ignoring git dir '.git': Expected git repo version <= 1, found 999999
ok 6 - ignore .git/ with incompatible repository version
checking known breakage:
test_with_config "[core]repositoryformatversion = invalid"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1309-early-config/throwaway/.git/
fatal: bad numeric config value 'invalid' for 'core.repositoryformatversion' in file .git/config: invalid unit
not ok 7 - ignore .git/ with invalid repository version # TODO known breakage
checking known breakage:
test_with_config "["
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1309-early-config/throwaway/.git/
fatal: bad config line 1 in file .git/config
not ok 8 - ignore .git/ with invalid config # TODO known breakage
expecting success:
echo "[broken" >broken &&
test_with_config "[includeif \"onbranch:refs/heads/master\"]path=../broken"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1309-early-config/throwaway/.git/
ok 9 - early config and onbranch
# still have 2 known breakage(s)
# passed all remaining 7 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1310-config-default.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1310-config-default/.git/
expecting success:
echo quux >expect &&
git config -f config --default=quux core.foo >actual &&
test_cmp expect actual
ok 1 - uses --default when entry missing
expecting success:
echo bar >expect &&
git -c core.foo=bar config --default=baz core.foo >actual &&
test_cmp expect actual
ok 2 - does not use --default when entry present
expecting success:
echo true >expect &&
git config -f config --default=yes --bool core.foo >actual &&
test_cmp expect actual
ok 3 - canonicalizes --default with appropriate type
expecting success:
test_must_fail git config -f config --type=expiry-date --default=x --get \
not.a.section 2>error &&
test_i18ngrep "failed to format default config value" error
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: failed to format default config value: x
ok 4 - dies when --default cannot be parsed
expecting success:
test_must_fail git config --default=quux --unset a.section >output 2>&1 &&
test_i18ngrep "\-\-default is only applicable to" output
error: --default is only applicable to --get
ok 5 - does not allow --default without --get
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1308-config-set.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1308-config-set/.git/
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 - setup default config
expecting success:
check_config get_value case.penguin "very blue"
ok 2 - get value for a simple key
expecting success:
check_config get_value case.my ""
ok 3 - get value for a key with value as an empty string
expecting success:
check_config get_value case.foo "(NULL)"
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 5 - upper case key
expecting success:
check_config get_value case.MixedCase "true" &&
check_config get_value case.MIXEDCASE "true" &&
check_config get_value case.mixedcase "true"
ok 6 - mixed case key
expecting success:
check_config get_value case.Movie "BadPhysics"
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"
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"
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"
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 11 - find value with misspelled key
expecting success:
check_config get_value case.baz "hask"
ok 12 - find value with the highest priority
expecting success:
check_config get_int lamb.chop 65
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 14 - find string value for a key
expecting success:
test_expect_code 128 test-tool config get_string case.foo 2>result &&
test_i18ngrep "fatal: .*case\.foo.*\.git/config.*line 7" result
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
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
fatal: bad numeric config value 'none' for 'lamb.head': invalid unit
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 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-tool config configset_get_value my.new config2 .git/config >actual &&
test_cmp expect actual
ok 19 - find value from a configset
expecting success:
echo hask >expect &&
test-tool config configset_get_value case.baz config2 .git/config >actual &&
test_cmp expect actual
ok 20 - find value with highest priority from a configset
expecting success:
cat >except <<-\EOF &&
sam
bat
hask
lama
ball
EOF
test-tool 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-tool config configset_get_value foo.bar non-existent-file 2>actual &&
test_cmp expect actual
ok 22 - proper error on non-existent files
expecting success:
echo "Error (-1) reading configuration file a-directory." >expect &&
mkdir a-directory &&
test_expect_code 2 test-tool config configset_get_value foo.bar a-directory 2>output &&
grep "^warning:" output &&
grep "^Error" output >actual &&
test_cmp expect actual
warning: unable to access 'a-directory': Is a directory
ok 23 - proper error on directory "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 -r SANETESTD.1/x &&
chmod -rx SANETESTD.2 ||
BUG "cannot prepare SANETESTD"
! test -r SANETESTD.1/x &&
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
BUG "cannot clean SANETESTD"
return $status
)
rm: cannot remove 'SANETESTD.1/x': Permission denied
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-tool config configset_get_value foo.bar .git/config 2>output &&
grep "^warning:" output &&
grep "^Error" output >actual &&
test_cmp expect actual
warning: unable to access '.git/config': Permission denied
warning: unable to access '.git/config': Permission denied
ok 24 - 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 line 34 in file .git/config" >expect &&
test_expect_code 128 test-tool config get_value foo.bar 2>actual &&
test_i18ncmp expect actual
ok 25 - proper error on error in default config files
expecting success:
echo "[" >>syntax-error &&
echo "fatal: bad config line 1 in file syntax-error" >expect &&
test_expect_code 128 test-tool config configset_get_value foo.bar syntax-error 2>actual &&
test_i18ncmp expect actual
ok 26 - proper error on error in custom config files
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 "missing value for .alias\.br" result &&
test_i18ngrep "fatal: .*\.git/config" result &&
test_i18ngrep "fatal: .*line 2" result
error: missing value for 'alias.br'
fatal: bad config line 2 in file .git/config
fatal: bad config line 2 in file .git/config
ok 27 - check line errors for malformed values
expecting success:
nongit test_must_fail git config a.b c 2>err &&
test_i18ngrep "not in a git directory" err
fatal: not in a git directory
ok 28 - error on modifying repo config without repo
expecting success:
echo "[foo]bar = from-repo" >.git/config &&
echo "[foo]bar = from-home" >.gitconfig &&
if test_have_prereq MINGW
then
# Use Windows path (i.e. *not* $HOME)
HOME_GITCONFIG=$(pwd)/.gitconfig
else
# Do not get fooled by symbolic links, i.e. $HOME != $(pwd)
HOME_GITCONFIG=$HOME/.gitconfig
fi &&
cat >expect <<-EOF &&
key=foo.bar
value=from-home
origin=file
name=$HOME_GITCONFIG
scope=global
key=foo.bar
value=from-repo
origin=file
name=.git/config
scope=repo
key=foo.bar
value=from-cmdline
origin=command line
name=
scope=cmdline
EOF
GIT_CONFIG_PARAMETERS=$cmdline_config test-tool config iterate >actual &&
test_cmp expect actual
ok 29 - iteration shows correct origins
# passed all 29 test(s)
1..29
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1350-config-hooks-path.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1350-config-hooks-path/.git/
expecting success:
mkdir -p .git/custom-hooks .git/hooks &&
write_script .git/custom-hooks/pre-commit <<-\EOF &&
echo CUSTOM >>actual
EOF
write_script .git/hooks/pre-commit <<-\EOF
echo NORMAL >>actual
EOF
ok 1 - set up a pre-commit hook in core.hooksPath
expecting success:
test_commit no_custom_hook &&
git config core.hooksPath .git/custom-hooks &&
test_commit have_custom_hook &&
git config core.hooksPath .git/custom-hooks/ &&
test_commit have_custom_hook_trailing_slash &&
git config core.hooksPath "$PWD/.git/custom-hooks" &&
test_commit have_custom_hook_abs_path &&
git config core.hooksPath "$PWD/.git/custom-hooks/" &&
test_commit have_custom_hook_abs_path_trailing_slash &&
cat >expect <<-\EOF &&
NORMAL
CUSTOM
CUSTOM
CUSTOM
CUSTOM
EOF
test_cmp expect actual
[master (root-commit) 51fec20] no_custom_hook
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 no_custom_hook.t
[master d6f765a] have_custom_hook
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 have_custom_hook.t
[master c8447a6] have_custom_hook_trailing_slash
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 have_custom_hook_trailing_slash.t
[master acc1a92] have_custom_hook_abs_path
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 have_custom_hook_abs_path.t
[master 3a47fb1] have_custom_hook_abs_path_trailing_slash
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 have_custom_hook_abs_path_trailing_slash.t
ok 2 - Check that various forms of specifying core.hooksPath work
expecting success:
git config core.hooksPath .git/custom-hooks &&
git rev-parse --git-path hooks/abc >actual &&
test .git/custom-hooks/abc = "$(cat actual)"
ok 3 - git rev-parse --git-path hooks
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1401-symbolic-ref.sh ***
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 1 - symbolic-ref writes HEAD
expecting success:
echo refs/heads/foo >expect &&
git symbolic-ref HEAD >actual &&
test_cmp expect actual
ok 2 - symbolic-ref reads HEAD
expecting success:
test_must_fail git symbolic-ref HEAD foo
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)
[foo (root-commit) 3f77d99] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
fatal: Refusing to point HEAD outside of refs/
ok 4 - symbolic-ref refuses bare sha1
expecting success:
test_must_fail git symbolic-ref -d HEAD
fatal: deleting 'HEAD' is not allowed
ok 5 - HEAD cannot be removed
expecting success:
git symbolic-ref NOTHEAD refs/heads/foo &&
git symbolic-ref -d NOTHEAD &&
test_path_is_file .git/refs/heads/foo &&
test_path_is_missing .git/NOTHEAD
ok 6 - symbolic-ref can be deleted
expecting success:
git symbolic-ref NOTHEAD refs/heads/missing &&
git symbolic-ref -d NOTHEAD &&
test_path_is_missing .git/refs/heads/missing &&
test_path_is_missing .git/NOTHEAD
ok 7 - symbolic-ref can delete dangling symref
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 8 - 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 &&
git rev-parse --verify refs/heads/foo &&
test_cmp expect actual
3f77d992706538dd02dc6fdc7473e0c2290f8b95
ok 9 - symbolic-ref fails to delete real ref
expecting success:
# make 256+ character ref; some systems may not handle that,
# so be gentle
long=0123456789abcdef &&
long=$long/$long/$long/$long &&
long=$long/$long/$long/$long &&
long_ref=refs/heads/$long &&
tree=$(git write-tree) &&
commit=$(echo foo | git commit-tree $tree) &&
if git update-ref $long_ref $commit; then
test_set_prereq LONG_REF
else
echo >&2 "long refs not supported"
fi
ok 10 - create large ref name
expecting success:
git symbolic-ref HEAD $long_ref &&
echo $long_ref >expect &&
git symbolic-ref HEAD >actual &&
test_cmp expect actual
ok 11 - symbolic-ref can point to large ref name
expecting success:
echo $commit >expect &&
git rev-parse --verify HEAD >actual &&
test_cmp expect actual
ok 12 - we can parse long symbolic ref
expecting success:
test_when_finished "rm -f .git/HEAD.lock" &&
>.git/HEAD.lock &&
test_must_fail git symbolic-ref HEAD refs/heads/whatever
error: Unable to create '/<<PKGBUILDDIR>>/t/trash directory.t1401-symbolic-ref/.git/HEAD.lock': File exists.
Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
ok 13 - symbolic-ref reports failure in exit code
expecting success:
git checkout -b log1 &&
test_commit one &&
git checkout -b log2 &&
test_commit two &&
git checkout --orphan orphan &&
git symbolic-ref -m create HEAD refs/heads/log1 &&
git symbolic-ref -m update HEAD refs/heads/log2 &&
cat >expect <<-\EOF &&
update
create
EOF
git log --format=%gs -g -2 >actual &&
test_cmp expect actual
Switched to a new branch 'log1'
[log1 60a3cb9] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Switched to a new branch 'log2'
[log2 c66b8ec] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
Switched to a new branch 'orphan'
ok 14 - symbolic-ref writes reflog entry
expecting success:
git checkout -b df &&
test_commit df &&
test_must_fail git symbolic-ref refs/heads/df/conflict refs/heads/df &&
git pack-refs --all --prune &&
test_must_fail git symbolic-ref refs/heads/df/conflict refs/heads/df
Switched to a new branch 'df'
[df d657808] df
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 df.t
error: Unable to create '/<<PKGBUILDDIR>>/t/trash directory.t1401-symbolic-ref/.git/refs/heads/df/conflict.lock': Not a directory
error: 'refs/heads/df' exists; cannot create 'refs/heads/df/conflict'
ok 15 - symbolic-ref does not create ref d/f conflicts
expecting success:
test_when_finished reset_to_sane &&
head=$(git rev-parse HEAD) &&
git symbolic-ref HEAD refs/heads/outer &&
test_when_finished "git update-ref -d refs/heads/outer/inner" &&
git update-ref refs/heads/outer/inner $head &&
git symbolic-ref HEAD refs/heads/unrelated
ok 16 - symbolic-ref can overwrite pointer to invalid name
expecting success:
test_when_finished reset_to_sane &&
head=$(git rev-parse HEAD) &&
git symbolic-ref HEAD refs/heads/outer/inner &&
test_when_finished "git update-ref -d refs/heads/outer" &&
git update-ref refs/heads/outer $head &&
echo refs/heads/outer/inner >expect &&
git symbolic-ref HEAD >actual &&
test_cmp expect actual
ok 17 - symbolic-ref can resolve d/f name (EISDIR)
expecting success:
test_when_finished reset_to_sane &&
head=$(git rev-parse HEAD) &&
git symbolic-ref HEAD refs/heads/outer &&
test_when_finished "git update-ref -d refs/heads/outer/inner" &&
git update-ref refs/heads/outer/inner $head &&
echo refs/heads/outer >expect &&
git symbolic-ref HEAD >actual &&
test_cmp expect actual
ok 18 - symbolic-ref can resolve d/f name (ENOTDIR)
# passed all 18 test(s)
1..18
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1402-check-ref-format.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1402-check-ref-format/.git/
expecting success:
test_must_fail git check-ref-format ''
ok 1 - ref name '' is invalid
expecting success:
test_must_fail git check-ref-format '/'
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
expecting success:
test_must_fail git check-ref-format --normalize '/'
ok 4 - ref name '/' is invalid with options --normalize
expecting success:
test_must_fail git check-ref-format --allow-onelevel --normalize '/'
ok 5 - ref name '/' is invalid with options --allow-onelevel --normalize
expecting success:
git check-ref-format 'foo/bar/baz'
ok 6 - ref name 'foo/bar/baz' is valid
expecting success:
git check-ref-format --normalize 'foo/bar/baz'
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 8 - ref name 'refs///heads/foo' is invalid
expecting success:
git check-ref-format --normalize 'refs///heads/foo'
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 10 - ref name 'heads/foo/' is invalid
expecting success:
test_must_fail git check-ref-format '/heads/foo'
ok 11 - ref name '/heads/foo' is invalid
expecting success:
git check-ref-format --normalize '/heads/foo'
heads/foo
ok 12 - ref name '/heads/foo' is valid with options --normalize
expecting success:
test_must_fail git check-ref-format '///heads/foo'
ok 13 - ref name '///heads/foo' is invalid
expecting success:
git check-ref-format --normalize '///heads/foo'
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'
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 - 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:
test_must_fail git check-ref-format 'heads/foo..bar'
ok 21 - ref name 'heads/foo..bar' is invalid
expecting success:
test_must_fail git check-ref-format 'heads/foo?bar'
ok 22 - ref name 'heads/foo?bar' is invalid
expecting success:
git check-ref-format 'foo./bar'
ok 23 - ref name 'foo./bar' is valid
expecting success:
test_must_fail git check-ref-format 'heads/foo.lock'
ok 24 - ref name 'heads/foo.lock' is invalid
expecting success:
test_must_fail git check-ref-format 'heads///foo.lock'
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 28 - ref name 'heads/foo@bar' is valid
expecting success:
test_must_fail git check-ref-format 'heads/v@{ation'
ok 29 - ref name 'heads/v@{ation' is invalid
expecting success:
test_must_fail git check-ref-format 'heads/foo\bar'
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 32 - ref name 'heads/foo' is invalid
expecting success:
git check-ref-format 'heads/fuß'
ok 33 - ref name 'heads/fuß' is valid
expecting success:
git check-ref-format --refspec-pattern 'heads/*foo/bar'
ok 34 - ref name 'heads/*foo/bar' is valid with options --refspec-pattern
expecting success:
git check-ref-format --refspec-pattern 'heads/foo*/bar'
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'
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 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*'
ok 38 - ref name 'heads/foo*/bar*' is invalid with options --refspec-pattern
expecting success:
test_must_fail git check-ref-format 'foo'
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 41 - ref name 'foo' is invalid with options --refspec-pattern
expecting success:
git check-ref-format --refspec-pattern --allow-onelevel 'foo'
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'
foo
ok 44 - ref name 'foo' is valid with options --allow-onelevel --normalize
expecting success:
git check-ref-format 'foo/bar'
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 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'
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 51 - ref name 'foo/*' is invalid with options --allow-onelevel
expecting success:
git check-ref-format --refspec-pattern 'foo/*'
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'
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 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'
ok 58 - ref name '*/foo' is invalid with options --normalize
expecting success:
git check-ref-format --refspec-pattern --normalize '*/foo'
*/foo
ok 59 - ref name '*/foo' is valid with options --refspec-pattern --normalize
expecting success:
test_must_fail git check-ref-format 'foo/*/bar'
ok 60 - ref name 'foo/*/bar' is invalid
expecting success:
test_must_fail git check-ref-format --allow-onelevel 'foo/*/bar'
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'
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
expecting success:
test_must_fail git check-ref-format --refspec-pattern '*'
ok 66 - ref name '*' is invalid with options --refspec-pattern
expecting success:
git check-ref-format --refspec-pattern --allow-onelevel '*'
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 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 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'
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
expecting success:
test_must_fail git check-ref-format --allow-onelevel '/foo'
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
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'
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 80 - ref name '/foo' is invalid with options --refspec-pattern --normalize
expecting success:
git check-ref-format --refspec-pattern --allow-onelevel --normalize '/foo'
foo
ok 81 - ref name '/foo' is valid with options --refspec-pattern --allow-onelevel --normalize
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
Already on 'master'
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8c972da A
Switched to branch 'master'
ok 82 - check-ref-format --branch @{-1}
expecting success:
test_must_fail git check-ref-format --branch -naster >actual &&
test_must_be_empty actual
fatal: '-naster' is not a valid branch name
ok 83 - check-ref-format --branch -naster
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"
Already on 'master'
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8c972da A
Switched to branch 'master'
ok 84 - check-ref-format --branch from subdir
expecting success:
nongit test_must_fail git check-ref-format --branch @{-1} >actual &&
test_must_be_empty actual
fatal: '@{-1}' is not a valid branch name
ok 85 - check-ref-format --branch @{-1} from non-repo
expecting success:
echo master >expect &&
nongit git check-ref-format --branch master >actual &&
test_cmp expect actual
ok 86 - check-ref-format --branch master from non-repo
expecting success:
refname=$(git check-ref-format --normalize 'heads/foo') &&
test "$refname" = 'heads/foo'
ok 87 - ref name 'heads/foo' simplifies to 'heads/foo'
expecting success:
refname=$(git check-ref-format --normalize 'refs///heads/foo') &&
test "$refname" = 'refs/heads/foo'
ok 88 - ref name 'refs///heads/foo' simplifies to 'refs/heads/foo'
expecting success:
refname=$(git check-ref-format --normalize '/heads/foo') &&
test "$refname" = 'heads/foo'
ok 89 - ref name '/heads/foo' simplifies to 'heads/foo'
expecting success:
refname=$(git check-ref-format --normalize '///heads/foo') &&
test "$refname" = 'heads/foo'
ok 90 - ref name '///heads/foo' simplifies to 'heads/foo'
expecting success:
test_must_fail git check-ref-format --normalize 'foo'
ok 91 - check-ref-format --normalize rejects 'foo'
expecting success:
test_must_fail git check-ref-format --normalize '/foo'
ok 92 - check-ref-format --normalize rejects '/foo'
expecting success:
test_must_fail git check-ref-format --normalize 'heads/foo/../bar'
ok 93 - check-ref-format --normalize rejects 'heads/foo/../bar'
expecting success:
test_must_fail git check-ref-format --normalize 'heads/./foo'
ok 94 - check-ref-format --normalize rejects 'heads/./foo'
expecting success:
test_must_fail git check-ref-format --normalize 'heads\foo'
ok 95 - check-ref-format --normalize rejects 'heads\foo'
expecting success:
test_must_fail git check-ref-format --normalize 'heads/foo.lock'
ok 96 - check-ref-format --normalize rejects 'heads/foo.lock'
expecting success:
test_must_fail git check-ref-format --normalize 'heads///foo.lock'
ok 97 - check-ref-format --normalize rejects 'heads///foo.lock'
expecting success:
test_must_fail git check-ref-format --normalize 'foo.lock/bar'
ok 98 - check-ref-format --normalize rejects 'foo.lock/bar'
expecting success:
test_must_fail git check-ref-format --normalize 'foo.lock///bar'
ok 99 - check-ref-format --normalize rejects 'foo.lock///bar'
# passed all 99 test(s)
1..99
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1403-show-ref.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1403-show-ref/.git/
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
[master (root-commit) 0ddfaf1] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
Updated tag 'A' (was 0ddfaf1)
Switched to a new branch 'side'
[side d9df450] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B.t
Updated tag 'B' (was d9df450)
Switched to branch 'master'
[master 5dee784] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C.t
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 &&
test_must_fail git show-ref D >actual &&
test_must_be_empty actual
ok 2 - show-ref
expecting success:
git show-ref -q A >actual &&
test_must_be_empty actual &&
git show-ref -q tags/A >actual &&
test_must_be_empty actual &&
git show-ref -q refs/tags/A >actual &&
test_must_be_empty actual &&
test_must_fail git show-ref -q D >actual &&
test_must_be_empty actual
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 &&
test_must_fail git show-ref --verify A >actual &&
test_must_be_empty actual &&
test_must_fail git show-ref --verify tags/A >actual &&
test_must_be_empty actual &&
test_must_fail git show-ref --verify D >actual &&
test_must_be_empty actual
fatal: 'A' - not a valid ref
fatal: 'tags/A' - not a valid ref
fatal: 'D' - not a valid ref
ok 4 - show-ref --verify
expecting success:
git show-ref --verify -q refs/tags/A >actual &&
test_must_be_empty actual &&
test_must_fail git show-ref --verify -q A >actual &&
test_must_be_empty actual &&
test_must_fail git show-ref --verify -q tags/A >actual &&
test_must_be_empty actual &&
test_must_fail git show-ref --verify -q D >actual &&
test_must_be_empty actual
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 &&
git show-ref --verify -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 &&
test_must_fail git show-ref -d --verify master >actual &&
test_must_be_empty actual &&
test_must_fail git show-ref -d --verify heads/master >actual &&
test_must_be_empty actual &&
test_must_fail git show-ref --verify -d A C >actual &&
test_must_be_empty actual &&
test_must_fail git show-ref --verify -d tags/A tags/C >actual &&
test_must_be_empty actual
fatal: 'master' - not a valid ref
fatal: 'heads/master' - not a valid ref
fatal: 'A' - not a valid ref
fatal: 'tags/A' - 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 7 - show-ref --heads, --tags, --head, pattern
expecting success:
echo $(git rev-parse HEAD) HEAD >expect &&
git show-ref --verify HEAD >actual &&
test_cmp expect actual &&
git show-ref --verify -q HEAD >actual &&
test_must_be_empty actual
ok 8 - show-ref --verify HEAD
expecting success:
sha1_file() {
echo "$*" | sed "s#..#.git/objects/&/#"
} &&
remove_object() {
file=$(sha1_file "$*") &&
test -e "$file" &&
rm -f "$file"
} &&
test_when_finished "rm -rf dangling" &&
(
git init dangling &&
cd dangling &&
test_commit dangling &&
sha=$(git rev-parse refs/tags/dangling) &&
remove_object $sha &&
test_must_fail git show-ref --verify refs/tags/dangling
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1403-show-ref/dangling/.git/
[master (root-commit) ceb9007] dangling
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dangling.t
fatal: git show-ref: bad ref refs/tags/dangling (ceb9007ddae8b252f505d0ef9dcf579bfda7e91c)
ok 9 - show-ref --verify with dangling ref
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1400-update-ref.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1400-update-ref/.git/
expecting success:
create_test_commits "" &&
mkdir $bare &&
cd $bare &&
git init --bare &&
create_test_commits "bare" &&
cd -
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1400-update-ref/bare-repo/
/<<PKGBUILDDIR>>/t/trash directory.t1400-update-ref
ok 1 - setup
expecting success:
git update-ref $m $A &&
test $A = $(cat .git/$m)
ok 2 - create refs/heads/master
expecting success:
git update-ref $m $B $A &&
test $B = $(cat .git/$m)
ok 3 - create refs/heads/master with oldvalue verification
expecting success:
test_must_fail git update-ref -d $m $A &&
test $B = "$(cat .git/$m)"
error: cannot lock ref 'refs/heads/master': is at 56d5c1374e8028a1e122ab046ab7b98165342dc4 but expected 102939797ab91a4f201d131418d2c9d919dcdd2c
ok 4 - fail to delete refs/heads/master with stale ref
expecting success:
test_when_finished "rm -f .git/$m" &&
git update-ref -d $m $B &&
test_path_is_missing .git/$m
ok 5 - delete refs/heads/master
expecting success:
test_when_finished "rm -f .git/$m" &&
git update-ref $m $A &&
test $A = $(cat .git/$m) &&
git update-ref -d $m &&
test_path_is_missing .git/$m
ok 6 - delete refs/heads/master without oldvalue verification
expecting success:
test_when_finished "rm -f .git/$n_dir" &&
touch .git/$n_dir &&
test_must_fail git update-ref $n $A
fatal: update_ref failed for ref 'refs/heads/gu/fixes': cannot lock ref 'refs/heads/gu/fixes': unable to create lock file .git/refs/heads/gu/fixes.lock; non-directory in the way
ok 7 - fail to create refs/heads/gu/fixes
expecting success:
git update-ref HEAD $A &&
test $A = $(cat .git/$m)
ok 8 - create refs/heads/master (by HEAD)
expecting success:
git update-ref HEAD $B $A &&
test $B = $(cat .git/$m)
ok 9 - create refs/heads/master (by HEAD) with oldvalue verification
expecting success:
test_must_fail git update-ref -d HEAD $A &&
test $B = $(cat .git/$m)
error: cannot lock ref 'HEAD': is at 56d5c1374e8028a1e122ab046ab7b98165342dc4 but expected 102939797ab91a4f201d131418d2c9d919dcdd2c
ok 10 - fail to delete refs/heads/master (by HEAD) with stale ref
expecting success:
test_when_finished "rm -f .git/$m" &&
git update-ref -d HEAD $B &&
test_path_is_missing .git/$m
ok 11 - delete refs/heads/master (by HEAD)
expecting success:
test_when_finished "rm -f .git/$m" &&
git update-ref $m $A &&
git symbolic-ref HEAD $m &&
git update-ref -m delete-$m -d $m &&
test_path_is_missing .git/$m &&
grep "delete-$m$" .git/logs/HEAD
102939797ab91a4f201d131418d2c9d919dcdd2c 0000000000000000000000000000000000000000 C O Mitter <committer@example.com> 1112912653 -0700 delete-refs/heads/master
ok 12 - deleting current branch adds message to HEAD's log
expecting success:
test_when_finished "rm -f .git/$m" &&
git update-ref $m $A &&
git symbolic-ref HEAD $m &&
git update-ref -m delete-by-head -d HEAD &&
test_path_is_missing .git/$m &&
grep "delete-by-head$" .git/logs/HEAD
102939797ab91a4f201d131418d2c9d919dcdd2c 0000000000000000000000000000000000000000 C O Mitter <committer@example.com> 1112912653 -0700 delete-by-head
ok 13 - deleting by HEAD adds message to HEAD's log
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
ok 14 - 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
ok 15 - update-ref creates reflogs with --create-reflog
expecting success:
git -C $bare update-ref $m $bareA &&
git -C $bare rev-parse $bareA >expect &&
git -C $bare rev-parse $m >actual &&
test_cmp expect actual &&
test_must_fail git -C $bare reflog exists $m
ok 16 - creates no reflog in bare repository
expecting success:
test_when_finished "git -C $bare config --unset core.logAllRefUpdates && \
rm $bare/logs/$m" &&
git -C $bare config core.logAllRefUpdates true &&
git -C $bare update-ref $m $bareB &&
git -C $bare rev-parse $bareB >expect &&
git -C $bare rev-parse $m >actual &&
test_cmp expect actual &&
git -C $bare reflog exists $m
ok 17 - core.logAllRefUpdates=true creates reflog in bare repository
expecting success:
test_config core.logAllRefUpdates true &&
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
ok 18 - core.logAllRefUpdates=true does not create reflog by default
expecting success:
test_config core.logAllRefUpdates always &&
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 &&
git reflog exists $outside
ok 19 - core.logAllRefUpdates=always creates reflog by default
expecting success:
test_config core.logAllRefUpdates always &&
git update-ref ORIG_HEAD $A &&
test_must_fail git reflog exists ORIG_HEAD
ok 20 - core.logAllRefUpdates=always creates no reflog for ORIG_HEAD
expecting success:
test_config core.logAllRefUpdates true &&
test_when_finished "git update-ref -d $outside" &&
git update-ref --no-create-reflog $outside $A &&
git rev-parse $A >expect &&
git rev-parse $outside >actual &&
test_cmp expect actual &&
test_must_fail git reflog exists $outside
ok 21 - --no-create-reflog overrides core.logAllRefUpdates=always
expecting success:
git update-ref HEAD $A &&
test $A = $(cat .git/$m)
ok 22 - create refs/heads/master (by HEAD)
expecting success:
git pack-refs --all
ok 23 - pack refs
expecting success:
git update-ref HEAD $B $A &&
test $B = $(cat .git/$m)
ok 24 - move refs/heads/master (by HEAD)
expecting success:
test_when_finished "rm -f .git/$m" &&
git update-ref -d HEAD $B &&
! grep "$m" .git/packed-refs &&
test_path_is_missing .git/$m
ok 25 - delete refs/heads/master (by HEAD) should remove both packed and loose refs/heads/master
expecting success:
test_when_finished "cp -f .git/HEAD.orig .git/HEAD" &&
git update-ref --no-deref -d HEAD &&
test_path_is_missing .git/HEAD
ok 26 - delete symref without dereference
expecting success:
test_when_finished "cp -f .git/HEAD.orig .git/HEAD" &&
echo foo >foo.c &&
git add foo.c &&
git commit -m foo &&
git pack-refs --all &&
git update-ref --no-deref -d HEAD &&
test_path_is_missing .git/HEAD
[master (root-commit) fc83d41] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.c
ok 27 - delete symref without dereference when the referred ref is packed
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
error: multiple updates for 'refs/heads/self' (including one via symref 'refs/heads/self') are not allowed
ok 28 - 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 29 - 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 30 - update-ref --no-deref -d can delete reference to bad ref
expecting success:
test_must_fail git update-ref HEAD $A $B
fatal: update_ref failed for ref 'HEAD': cannot lock ref 'HEAD': unable to resolve reference 'refs/heads/master'
ok 31 - (not) create HEAD with old sha1
expecting success:
test_when_finished "rm -f .git/$m" &&
test_path_is_missing .git/$m
ok 32 - (not) prior created .git/refs/heads/master
expecting success:
git update-ref HEAD $A
ok 33 - create HEAD
expecting success:
test_must_fail git update-ref HEAD $B $Z
fatal: update_ref failed for ref 'HEAD': cannot lock ref 'HEAD': reference already exists
ok 34 - (not) change HEAD with wrong SHA1
expecting success:
test_when_finished "rm -f .git/$m" &&
! test $B = $(cat .git/$m)
ok 35 - (not) changed .git/refs/heads/master
expecting success:
test_config core.logAllRefUpdates false &&
GIT_COMMITTER_DATE="2005-05-26 23:30" \
git update-ref --create-reflog HEAD $A -m "Initial Creation" &&
test $A = $(cat .git/$m)
ok 36 - create refs/heads/master (logged by touch)
expecting success:
test_config core.logAllRefUpdates false &&
GIT_COMMITTER_DATE="2005-05-26 23:31" \
git update-ref HEAD $B $A -m "Switch" &&
test $B = $(cat .git/$m)
ok 37 - update refs/heads/master (logged by touch)
expecting success:
test_config core.logAllRefUpdates false &&
GIT_COMMITTER_DATE="2005-05-26 23:41" \
git update-ref HEAD $A &&
test $A = $(cat .git/$m)
ok 38 - set refs/heads/master (logged by touch)
expecting success:
git branch d1/d2/r1 HEAD &&
git branch d1/r2 HEAD &&
test_path_is_file .git/refs/heads/d1/d2/r1 &&
test_path_is_file .git/logs/refs/heads/d1/d2/r1 &&
git branch -d d1/d2/r1 &&
test_path_is_missing .git/refs/heads/d1/d2 &&
test_path_is_missing .git/logs/refs/heads/d1/d2 &&
test_path_is_file .git/refs/heads/d1/r2 &&
test_path_is_file .git/logs/refs/heads/d1/r2
Deleted branch d1/d2/r1 (was 1029397).
ok 39 - empty directory removal
expecting success:
git branch e1/e2/r1 HEAD &&
git branch e1/r2 HEAD &&
git checkout e1/e2/r1 &&
test_when_finished "git checkout master" &&
test_path_is_file .git/refs/heads/e1/e2/r1 &&
test_path_is_file .git/logs/refs/heads/e1/e2/r1 &&
git update-ref -d HEAD &&
test_path_is_missing .git/refs/heads/e1/e2 &&
test_path_is_missing .git/logs/refs/heads/e1/e2 &&
test_path_is_file .git/refs/heads/e1/r2 &&
test_path_is_file .git/logs/refs/heads/e1/r2 &&
test_path_is_file .git/logs/HEAD
Switched to branch 'e1/e2/r1'
A foo.c
Switched to branch 'master'
A foo.c
ok 40 - symref empty directory removal
expecting success:
test_when_finished "rm -rf .git/$m .git/logs expect" &&
test_cmp expect .git/logs/$m
ok 41 - verifying refs/heads/master's log (logged by touch)
expecting success:
test_config core.logAllRefUpdates true &&
GIT_COMMITTER_DATE="2005-05-26 23:32" \
git update-ref HEAD $A -m "Initial Creation" &&
test $A = $(cat .git/$m)
ok 42 - create refs/heads/master (logged by config)
expecting success:
test_config core.logAllRefUpdates true &&
GIT_COMMITTER_DATE="2005-05-26 23:33" \
git update-ref HEAD 56d5c1374e8028a1e122ab046ab7b98165342dc4 102939797ab91a4f201d131418d2c9d919dcdd2c -m "Switch" &&
test $B = $(cat .git/$m)
ok 43 - update refs/heads/master (logged by config)
expecting success:
test_config core.logAllRefUpdates true &&
GIT_COMMITTER_DATE="2005-05-26 23:43" \
git update-ref HEAD $A &&
test $A = $(cat .git/$m)
ok 44 - set refs/heads/master (logged by config)
expecting success:
test_when_finished "rm -f .git/$m .git/logs/$m expect" &&
test_cmp expect .git/logs/$m
ok 45 - verifying refs/heads/master's log (logged by config)
expecting success:
test_when_finished "rm -f o e" &&
git rev-parse --verify "master@{May 25 2005}" >o 2>e &&
test $C = $(cat o) &&
test "warning: Log for 'master' only goes back to $ed." = "$(cat e)"
ok 46 - Query "master@{May 25 2005}" (before history)
expecting success:
test_when_finished "rm -f o e" &&
git rev-parse --verify master@{2005-05-25} >o 2>e &&
test $C = $(cat o) &&
test "warning: Log for 'master' only goes back to $ed." = "$(cat e)"
ok 47 - Query master@{2005-05-25} (before history)
expecting success:
test_when_finished "rm -f o e" &&
git rev-parse --verify "master@{May 26 2005 23:31:59}" >o 2>e &&
test $C = $(cat o) &&
test "warning: Log for 'master' only goes back to $ed." = "$(cat e)"
ok 48 - Query "master@{May 26 2005 23:31:59}" (1 second before history)
expecting success:
test_when_finished "rm -f o e" &&
git rev-parse --verify "master@{May 26 2005 23:32:00}" >o 2>e &&
test $C = $(cat o) &&
test "" = "$(cat e)"
ok 49 - Query "master@{May 26 2005 23:32:00}" (exactly history start)
expecting success:
test_when_finished "rm -f o e" &&
git rev-parse --verify "master@{May 26 2005 23:32:30}" >o 2>e &&
test $A = $(cat o) &&
test "" = "$(cat e)"
ok 50 - Query "master@{May 26 2005 23:32:30}" (first non-creation change)
expecting success:
test_when_finished "rm -f o e" &&
git rev-parse --verify "master@{2005-05-26 23:33:01}" >o 2>e &&
test $B = $(cat o) &&
test_i18ngrep -F "warning: log for ref $m has gap after $gd" e
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
warning: log for ref refs/heads/master has gap after Thu, 26 May 2005 18:33:00 -0500
ok 51 - Query "master@{2005-05-26 23:33:01}" (middle of history with gap)
expecting success:
test_when_finished "rm -f o e" &&
git rev-parse --verify "master@{2005-05-26 23:38:00}" >o 2>e &&
test $Z = $(cat o) &&
test "" = "$(cat e)"
ok 52 - Query "master@{2005-05-26 23:38:00}" (middle of history)
expecting success:
test_when_finished "rm -f o e" &&
git rev-parse --verify "master@{2005-05-26 23:43:00}" >o 2>e &&
test $E = $(cat o) &&
test "" = "$(cat e)"
ok 53 - Query "master@{2005-05-26 23:43:00}" (exact end of history)
expecting success:
test_when_finished "rm -f o e" &&
git rev-parse --verify "master@{2005-05-28}" >o 2>e &&
test $D = $(cat o) &&
test_i18ngrep -F "warning: log for ref $m unexpectedly ended on $ld" e
warning: log for ref refs/heads/master unexpectedly ended on Thu, 26 May 2005 18:43:00 -0500
ok 54 - Query "master@{2005-05-28}" (past end of history)
expecting success:
test_when_finished rm -f M &&
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)
[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
[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(-)
[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(-)
[master 29d1ccd] Merged initial commit and a later commit.
Author: A U Thor <author@example.com>
ok 55 - creating initial files
expecting success:
test_cmp expect .git/logs/$m
ok 56 - git commit logged updates
expecting success:
test OTHER = $(git cat-file blob master:F)
ok 57 - git cat-file blob master:F (expect OTHER)
expecting success:
test TEST = $(git cat-file blob "master@{2005-05-26 23:30}:F")
ok 58 - 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")
ok 59 - git cat-file blob master@{2005-05-26 23:42}:F (expect OTHER)
expecting success:
test_must_fail git update-ref PSEUDOREF $A $B 2>err &&
test_path_is_missing .git/PSEUDOREF &&
test_i18ngrep "could not read ref" err
fatal: update_ref failed for ref 'PSEUDOREF': could not read ref 'PSEUDOREF'
ok 60 - given old value for missing pseudoref, do not create
expecting success:
git update-ref PSEUDOREF $A &&
test $A = $(cat .git/PSEUDOREF)
ok 61 - create pseudoref
expecting success:
git update-ref PSEUDOREF $B &&
test $B = $(cat .git/PSEUDOREF)
ok 62 - overwrite pseudoref with no old value given
expecting success:
git update-ref PSEUDOREF $C $B &&
test $C = $(cat .git/PSEUDOREF)
ok 63 - overwrite pseudoref with correct old value
expecting success:
test_must_fail git update-ref PSEUDOREF $D $E 2>err &&
test $C = $(cat .git/PSEUDOREF) &&
test_i18ngrep "unexpected object ID" err
fatal: update_ref failed for ref 'PSEUDOREF': unexpected object ID when writing 'PSEUDOREF'
ok 64 - do not overwrite pseudoref with wrong old value
expecting success:
git update-ref -d PSEUDOREF &&
test_path_is_missing .git/PSEUDOREF
ok 65 - delete pseudoref
expecting success:
git update-ref PSEUDOREF $A &&
test_must_fail git update-ref -d PSEUDOREF $B 2>err &&
test $A = $(cat .git/PSEUDOREF) &&
test_i18ngrep "unexpected object ID" err
error: unexpected object ID when deleting 'PSEUDOREF'
ok 66 - do not delete pseudoref with wrong old value
expecting success:
git update-ref -d PSEUDOREF $A &&
test_path_is_missing .git/PSEUDOREF
ok 67 - delete pseudoref with correct old value
expecting success:
git update-ref PSEUDOREF $A $Z &&
test $A = $(cat .git/PSEUDOREF)
ok 68 - create pseudoref with old OID zero
expecting success:
test_when_finished git update-ref -d PSEUDOREF &&
test_must_fail git update-ref PSEUDOREF $B $Z 2>err &&
test $A = $(cat .git/PSEUDOREF) &&
test_i18ngrep "already exists" err
fatal: update_ref failed for ref 'PSEUDOREF': ref 'PSEUDOREF' already exists
ok 69 - do not overwrite pseudoref with old OID zero
expecting success:
echo "$pws" >"$pws" &&
git add -- "$pws" &&
git commit -m "$pws"
[master 536da9b] path with space
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 path with space
ok 70 - stdin test setup
expecting success:
test_must_fail git update-ref -z $m $m $m 2>err &&
test_i18ngrep "usage: git update-ref" err
usage: git update-ref [<options>] -d <refname> [<old-val>]
ok 71 - -z fails without --stdin
expecting success:
>stdin &&
git update-ref --stdin <stdin &&
git rev-parse --verify -q $m
536da9bc9e8e6d0baf01b41cf3cc49bb819559e6
ok 72 - 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: empty command in input
ok 73 - 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
fatal: whitespace before command:
ok 74 - 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
fatal: whitespace before command: create refs/heads/a refs/heads/master
ok 75 - 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
fatal: unknown command: unknown refs/heads/a
ok 76 - 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
fatal: badly quoted argument: "master
ok 77 - 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
fatal: badly quoted argument: "ma\zter"
ok 78 - 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
fatal: unexpected character after quoted argument: "refs/heads/a"master
ok 79 - 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
fatal: create: missing <ref>
ok 80 - 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
fatal: create refs/heads/a: missing <newvalue>
ok 81 - 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
fatal: create refs/heads/a: extra input: refs/heads/master
ok 82 - 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
fatal: update: missing <ref>
ok 83 - 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
fatal: update refs/heads/a: missing <newvalue>
ok 84 - 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 85 - 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
fatal: delete: missing <ref>
ok 86 - 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 87 - 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: verify refs/heads/a: extra input: refs/heads/master
ok 88 - 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
fatal: option unknown: unknown
ok 89 - 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 &&
test_i18ngrep "fatal: multiple updates for ref '$a' not allowed" err
fatal: multiple updates for ref 'refs/heads/a' not allowed
ok 90 - 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
ok 91 - 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 92 - stdin does not create reflogs by default
expecting success:
test_when_finished "git update-ref -d $outside" &&
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
ok 93 - 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
ok 94 - 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 95 - 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
ok 96 - 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 97 - 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
ok 98 - 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
fatal: cannot lock ref 'refs/heads/c': unable to resolve reference 'refs/heads/c'
ok 99 - 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
fatal: update refs/heads/c: invalid <oldvalue>: does-not-exist
ok 100 - 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
fatal: create refs/heads/c: invalid <newvalue>: does-not-exist
ok 101 - 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
fatal: create refs/heads/c: zero <newvalue>
ok 102 - 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
ok 103 - 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
fatal: cannot lock ref 'refs/heads/a': is at 536da9bc9e8e6d0baf01b41cf3cc49bb819559e6 but expected 29d1ccdc7ee9fe415beb2415b6206b8a20f76b1c
ok 104 - 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
fatal: delete refs/heads/a: zero <oldvalue>
ok 105 - 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
ok 106 - 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 107 - stdin delete symref works option no-deref
expecting success:
git symbolic-ref TESTSYMREFONE $b &&
git symbolic-ref TESTSYMREFTWO $b &&
cat >stdin <<-EOF &&
update TESTSYMREFONE $a $b
update TESTSYMREFTWO $a $b
EOF
git update-ref --no-deref --stdin <stdin &&
git rev-parse TESTSYMREFONE TESTSYMREFTWO >expect &&
git rev-parse $a $a >actual &&
test_cmp expect actual &&
git rev-parse $m~1 >expect &&
git rev-parse $b >actual &&
test_cmp expect actual
ok 108 - stdin update symref works flag --no-deref
expecting success:
git symbolic-ref TESTSYMREFONE $b &&
git symbolic-ref TESTSYMREFTWO $b &&
cat >stdin <<-EOF &&
delete TESTSYMREFONE $b
delete TESTSYMREFTWO $b
EOF
git update-ref --no-deref --stdin <stdin &&
test_must_fail git rev-parse --verify -q TESTSYMREFONE &&
test_must_fail git rev-parse --verify -q TESTSYMREFTWO &&
git rev-parse $m~1 >expect &&
git rev-parse $b >actual &&
test_cmp expect actual
ok 109 - stdin delete symref works flag --no-deref
expecting success:
echo "delete $b $m~1" >stdin &&
git update-ref --stdin <stdin &&
test_must_fail git rev-parse --verify -q $b
ok 110 - 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
ok 111 - 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
ok 112 - 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
ok 113 - 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
ok 114 - 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
fatal: cannot lock ref 'refs/heads/master': is at 536da9bc9e8e6d0baf01b41cf3cc49bb819559e6 but expected 29d1ccdc7ee9fe415beb2415b6206b8a20f76b1c
ok 115 - 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
fatal: cannot lock ref 'refs/heads/master': reference already exists
ok 116 - 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
fatal: cannot lock ref 'refs/heads/master': reference already exists
ok 117 - 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
ok 118 - 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
fatal: cannot lock ref 'refs/heads/c': reference already exists
ok 119 - stdin update refs fails with wrong old value
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
ok 120 - stdin delete refs works with packed and loose refs
expecting success:
>stdin &&
git update-ref -z --stdin <stdin &&
git rev-parse --verify -q $m
536da9bc9e8e6d0baf01b41cf3cc49bb819559e6
ok 121 - 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
fatal: whitespace before command:
ok 122 - 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
fatal: empty command in input
ok 123 - 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: whitespace before command:
ok 124 - 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: whitespace before command: create refs/heads/a
ok 125 - 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
fatal: unknown command: unknown refs/heads/a
ok 126 - 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
fatal: create: missing <ref>
ok 127 - 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
fatal: create refs/heads/a: unexpected end of input when reading <newvalue>
ok 128 - 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
fatal: unknown command: refs/heads/master
ok 129 - 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
fatal: update: missing <ref>
ok 130 - 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
fatal: update refs/heads/a: unexpected end of input when reading <oldvalue>
ok 131 - 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
warning: update refs/heads/a: missing <newvalue>, treating as zero
ok 132 - 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 133 - 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
fatal: update refs/heads/a: unexpected end of input when reading <oldvalue>
ok 134 - 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
fatal: unknown command: refs/heads/master
ok 135 - 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 136 - 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
fatal: delete refs/heads/a: unexpected end of input when reading <oldvalue>
ok 137 - 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 138 - 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
fatal: unknown command: refs/heads/master
ok 139 - 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
fatal: verify refs/heads/a: unexpected end of input when reading <oldvalue>
ok 140 - 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
fatal: option unknown: unknown
ok 141 - 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 &&
test_i18ngrep "fatal: multiple updates for ref '$a' not allowed" err
fatal: multiple updates for ref 'refs/heads/a' not allowed
ok 142 - 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
ok 143 - 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
ok 144 - 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 145 - 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 146 - 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'
ok 147 - 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
fatal: update refs/heads/c: invalid <oldvalue>: does-not-exist
ok 148 - 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
fatal: cannot lock ref 'refs/heads/c': reference already exists
ok 149 - 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
fatal: create refs/heads/c: invalid <newvalue>: does-not-exist
ok 150 - 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
fatal: create refs/heads/c: missing <newvalue>
ok 151 - 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
ok 152 - 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': is at 536da9bc9e8e6d0baf01b41cf3cc49bb819559e6 but expected 29d1ccdc7ee9fe415beb2415b6206b8a20f76b1c
ok 153 - 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>
ok 154 - 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
ok 155 - 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 156 - 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
ok 157 - 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
ok 158 - 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 159 - 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
ok 160 - 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
ok 161 - 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
fatal: cannot lock ref 'refs/heads/master': is at 536da9bc9e8e6d0baf01b41cf3cc49bb819559e6 but expected 29d1ccdc7ee9fe415beb2415b6206b8a20f76b1c
ok 162 - 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
fatal: cannot lock ref 'refs/heads/master': reference already exists
ok 163 - 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
fatal: cannot lock ref 'refs/heads/master': reference already exists
ok 164 - 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
ok 165 - 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
fatal: cannot lock ref 'refs/heads/c': reference already exists
ok 166 - 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
warning: update refs/heads/c: missing <newvalue>, treating as zero
ok 167 - stdin -z delete refs works with packed and loose refs
expecting success:
git branch target1 $A &&
git checkout target1 &&
cat >stdin <<-EOF &&
update refs/heads/target1 $C
option no-deref
update HEAD $B
EOF
test_must_fail git update-ref --stdin <stdin 2>err &&
test_i18ngrep "fatal: multiple updates for 'HEAD' (including one via its referent .refs/heads/target1.) are not allowed" err &&
echo "refs/heads/target1" >expect &&
git symbolic-ref HEAD >actual &&
test_cmp expect actual &&
echo "$A" >expect &&
git rev-parse refs/heads/target1 >actual &&
test_cmp expect actual
Switched to branch 'target1'
fatal: multiple updates for 'HEAD' (including one via its referent 'refs/heads/target1') are not allowed
ok 168 - fails with duplicate HEAD update
expecting success:
git branch target2 $A &&
git symbolic-ref refs/heads/symref2 refs/heads/target2 &&
cat >stdin <<-EOF &&
update refs/heads/target2 $C
update refs/heads/symref2 $B
EOF
test_must_fail git update-ref --stdin <stdin 2>err &&
test_i18ngrep "fatal: multiple updates for 'refs/heads/target2' (including one via symref .refs/heads/symref2.) are not allowed" err &&
echo "refs/heads/target2" >expect &&
git symbolic-ref refs/heads/symref2 >actual &&
test_cmp expect actual &&
echo "$A" >expect &&
git rev-parse refs/heads/target2 >actual &&
test_cmp expect actual
fatal: multiple updates for 'refs/heads/target2' (including one via symref 'refs/heads/symref2') are not allowed
ok 169 - fails with duplicate ref update via symref
checking prerequisite: ULIMIT_FILE_DESCRIPTORS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq !MINGW,!CYGWIN &&
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
)
102939797ab91a4f201d131418d2c9d919dcdd2c
ok 170 - 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
)
ok 171 - large transaction deleting branches does not burst open file limit
expecting success:
git commit --allow-empty -m "initial commit" &&
git worktree add -b branch worktree &&
(
cd worktree &&
git commit --allow-empty -m "test commit" &&
git for-each-ref >for-each-ref.out &&
! grep refs/bisect for-each-ref.out &&
git update-ref refs/bisect/something HEAD &&
git rev-parse refs/bisect/something >../worktree-head &&
git for-each-ref | grep refs/bisect/something
) &&
test_path_is_missing .git/refs/bisect &&
test_must_fail git rev-parse refs/bisect/something &&
git update-ref refs/bisect/something HEAD &&
git rev-parse refs/bisect/something >main-head &&
! test_cmp main-head worktree-head
[target1 58a0522] initial commit
Author: A U Thor <author@example.com>
Preparing worktree (new branch 'branch')
HEAD is now at 58a0522 initial commit
[branch b62e0cb] test commit
Author: A U Thor <author@example.com>
b62e0cb4990da3244885da90fe7d493334cca9f5 commit refs/bisect/something
fatal: ambiguous argument 'refs/bisect/something': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
refs/bisect/something
--- main-head 2019-08-14 07:24:35.181243296 +0000
+++ worktree-head 2019-08-14 07:24:35.145242895 +0000
@@ -1 +1 @@
-58a052250c09f010b95ad9bfe32f35d704eda1a0
+b62e0cb4990da3244885da90fe7d493334cca9f5
ok 172 - handle per-worktree refs in refs/bisect
# passed all 172 test(s)
1..172
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1405-main-ref-store.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1405-main-ref-store/.git/
expecting success:
test_commit one &&
N=`find .git/refs -type f | wc -l` &&
test "$N" != 0 &&
$RUN pack-refs 3 &&
N=`find .git/refs -type f | wc -l`
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 1 - pack_refs(PACK_REFS_ALL | PACK_REFS_PRUNE)
expecting success:
git rev-parse HEAD >expected &&
git tag -a -m new-tag new-tag HEAD &&
$RUN peel-ref refs/tags/new-tag >actual &&
test_cmp expected actual
ok 2 - peel_ref(new-tag)
expecting success:
$RUN create-symref FOO refs/heads/master nothing &&
echo refs/heads/master >expected &&
git symbolic-ref FOO >actual &&
test_cmp expected actual
ok 3 - create_symref(FOO, refs/heads/master)
expecting success:
git rev-parse FOO -- &&
git rev-parse refs/tags/new-tag -- &&
$RUN delete-refs 0 nothing FOO refs/tags/new-tag &&
test_must_fail git rev-parse FOO -- &&
test_must_fail git rev-parse refs/tags/new-tag --
d79ce1670bdcb76e6d1da2ae095e890ccb326ae9
--
407ffbd56c168afa4e9302a7cdfe469155f84482
--
fatal: bad revision 'FOO'
fatal: bad revision 'refs/tags/new-tag'
ok 4 - delete_refs(FOO, refs/tags/new-tag)
expecting success:
git rev-parse master >expected &&
$RUN rename-ref refs/heads/master refs/heads/new-master &&
git rev-parse new-master >actual &&
test_cmp expected actual &&
test_commit recreate-master
[master (root-commit) c90e4dc] recreate-master
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 one.t
create mode 100644 recreate-master.t
ok 5 - rename_refs(master, new-master)
expecting success:
$RUN for-each-ref refs/heads/ | cut -d" " -f 2- >actual &&
cat >expected <<-\EOF &&
master 0x0
new-master 0x0
EOF
test_cmp expected actual
ok 6 - for_each_ref(refs/heads/)
expecting success:
$RUN for-each-ref refs/heads/ | cut -d" " -f 2- >actual &&
sort actual > expected &&
test_cmp expected actual
ok 7 - for_each_ref() is sorted
expecting success:
SHA1=`git rev-parse new-master` &&
echo "$SHA1 refs/heads/new-master 0x0" >expected &&
$RUN resolve-ref refs/heads/new-master 0 >actual &&
test_cmp expected actual
ok 8 - resolve_ref(new-master)
expecting success:
$RUN verify-ref refs/heads/new-master
ok 9 - verify_ref(new-master)
expecting success:
$RUN for-each-reflog | sort -k2 | cut -d" " -f 2- >actual &&
cat >expected <<-\EOF &&
HEAD 0x1
refs/heads/master 0x0
refs/heads/new-master 0x0
EOF
test_cmp expected actual
ok 10 - for_each_reflog()
expecting success:
$RUN for-each-reflog-ent HEAD >actual &&
head -n1 actual | grep one &&
tail -n2 actual | head -n1 | grep recreate-master
0000000000000000000000000000000000000000 d79ce1670bdcb76e6d1da2ae095e890ccb326ae9 C O Mitter <committer@example.com> 1112911993 -700 commit (initial): one
0000000000000000000000000000000000000000 c90e4dc5e12224a428dedfbd45ba11e5531706a2 C O Mitter <committer@example.com> 1112912053 -700 commit (initial): recreate-master
ok 11 - for_each_reflog_ent()
expecting success:
$RUN for-each-reflog-ent-reverse HEAD >actual &&
head -n1 actual | grep recreate-master &&
tail -n2 actual | head -n1 | grep one
0000000000000000000000000000000000000000 c90e4dc5e12224a428dedfbd45ba11e5531706a2 C O Mitter <committer@example.com> 1112912053 -700 commit (initial): recreate-master
0000000000000000000000000000000000000000 d79ce1670bdcb76e6d1da2ae095e890ccb326ae9 C O Mitter <committer@example.com> 1112911993 -700 commit (initial): one
ok 12 - for_each_reflog_ent_reverse()
expecting success:
$RUN reflog-exists HEAD
ok 13 - reflog_exists(HEAD)
expecting success:
$RUN delete-reflog HEAD &&
! test -f .git/logs/HEAD
ok 14 - delete_reflog(HEAD)
expecting success:
$RUN create-reflog HEAD 1 &&
test -f .git/logs/HEAD
ok 15 - create-reflog(HEAD)
expecting success:
git checkout -b foo &&
FOO_SHA1=`git rev-parse foo` &&
git checkout --detach &&
test_commit bar-commit &&
git checkout -b bar &&
BAR_SHA1=`git rev-parse bar` &&
$RUN update-ref updating refs/heads/foo $BAR_SHA1 $FOO_SHA1 0 &&
echo $BAR_SHA1 >expected &&
git rev-parse refs/heads/foo >actual &&
test_cmp expected actual
Switched to a new branch 'foo'
HEAD is now at c90e4dc recreate-master
[detached HEAD 1e995a9] bar-commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar-commit.t
Switched to a new branch 'bar'
ok 16 - delete_ref(refs/heads/foo)
expecting success:
SHA1=`git rev-parse foo` &&
git checkout --detach &&
$RUN delete-ref msg refs/heads/foo $SHA1 0 &&
test_must_fail git rev-parse refs/heads/foo --
HEAD is now at 1e995a9 bar-commit
fatal: bad revision 'refs/heads/foo'
ok 17 - delete_ref(refs/heads/foo)
# passed all 17 test(s)
1..17
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1406-submodule-ref-store.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1406-submodule-ref-store/.git/
expecting success:
git init sub &&
(
cd sub &&
test_commit first &&
git checkout -b new-master
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1406-submodule-ref-store/sub/.git/
[master (root-commit) 50e526b] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 first.t
Switched to a new branch 'new-master'
ok 1 - setup
expecting success:
test_must_fail $RUN pack-refs 3
BUG: refs/files-backend.c:148: operation pack_refs requires abilities 0x6, but only have 0x5
ok 2 - pack_refs() not allowed
expecting success:
git -C sub rev-parse HEAD >expected &&
git -C sub tag -a -m new-tag new-tag HEAD &&
$RUN peel-ref refs/tags/new-tag >actual &&
test_cmp expected actual
ok 3 - peel_ref(new-tag)
expecting success:
test_must_fail $RUN create-symref FOO refs/heads/master nothing
BUG: refs/files-backend.c:148: operation create_symref requires abilities 0x2, but only have 0x5
ok 4 - create_symref() not allowed
expecting success:
test_must_fail $RUN delete-refs 0 nothing FOO refs/tags/new-tag
BUG: refs/files-backend.c:148: operation delete_refs requires abilities 0x2, but only have 0x5
ok 5 - delete_refs() not allowed
expecting success:
test_must_fail $RUN rename-ref refs/heads/master refs/heads/new-master
BUG: refs/files-backend.c:148: operation rename_ref requires abilities 0x2, but only have 0x5
ok 6 - rename_refs() not allowed
expecting success:
$RUN for-each-ref refs/heads/ | cut -d" " -f 2- >actual &&
cat >expected <<-\EOF &&
master 0x0
new-master 0x0
EOF
test_cmp expected actual
ok 7 - for_each_ref(refs/heads/)
expecting success:
$RUN for-each-ref refs/heads/ | cut -d" " -f 2- >actual &&
sort actual > expected &&
test_cmp expected actual
ok 8 - for_each_ref() is sorted
expecting success:
SHA1=`git -C sub rev-parse master` &&
echo "$SHA1 refs/heads/master 0x0" >expected &&
$RUN resolve-ref refs/heads/master 0 >actual &&
test_cmp expected actual
ok 9 - resolve_ref(master)
expecting success:
$RUN verify-ref refs/heads/new-master
ok 10 - verify_ref(new-master)
expecting success:
$RUN for-each-reflog | sort | cut -d" " -f 2- >actual &&
cat >expected <<-\EOF &&
HEAD 0x1
refs/heads/master 0x0
refs/heads/new-master 0x0
EOF
test_cmp expected actual
ok 11 - for_each_reflog()
expecting success:
$RUN for-each-reflog-ent HEAD >actual && cat actual &&
head -n1 actual | grep first &&
tail -n2 actual | head -n1 | grep master.to.new
0000000000000000000000000000000000000000 50e526bb426771f6036ad3a8b0c81d511d91fc2a C O Mitter <committer@example.com> 1112911993 -700 commit (initial): first
50e526bb426771f6036ad3a8b0c81d511d91fc2a 50e526bb426771f6036ad3a8b0c81d511d91fc2a C O Mitter <committer@example.com> 1112911993 -700 checkout: moving from master to new-master
0000000000000000000000000000000000000000 50e526bb426771f6036ad3a8b0c81d511d91fc2a C O Mitter <committer@example.com> 1112911993 -700 commit (initial): first
50e526bb426771f6036ad3a8b0c81d511d91fc2a 50e526bb426771f6036ad3a8b0c81d511d91fc2a C O Mitter <committer@example.com> 1112911993 -700 checkout: moving from master to new-master
ok 12 - for_each_reflog_ent()
expecting success:
$RUN for-each-reflog-ent-reverse HEAD >actual &&
head -n1 actual | grep master.to.new &&
tail -n2 actual | head -n1 | grep first
50e526bb426771f6036ad3a8b0c81d511d91fc2a 50e526bb426771f6036ad3a8b0c81d511d91fc2a C O Mitter <committer@example.com> 1112911993 -700 checkout: moving from master to new-master
0000000000000000000000000000000000000000 50e526bb426771f6036ad3a8b0c81d511d91fc2a C O Mitter <committer@example.com> 1112911993 -700 commit (initial): first
ok 13 - for_each_reflog_ent_reverse()
expecting success:
$RUN reflog-exists HEAD
ok 14 - reflog_exists(HEAD)
expecting success:
test_must_fail $RUN delete-reflog HEAD
BUG: refs/files-backend.c:148: operation delete_reflog requires abilities 0x2, but only have 0x5
ok 15 - delete_reflog() not allowed
expecting success:
test_must_fail $RUN create-reflog HEAD 1
BUG: refs/files-backend.c:148: operation create_reflog requires abilities 0x2, but only have 0x5
ok 16 - create-reflog() not allowed
# passed all 16 test(s)
1..16
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1407-worktree-ref-store.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1407-worktree-ref-store/.git/
expecting success:
test_commit first &&
git worktree add -b wt-master wt &&
(
cd wt &&
test_commit second
)
[master (root-commit) 50e526b] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 first.t
Preparing worktree (new branch 'wt-master')
HEAD is now at 50e526b first
[wt-master d662100] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 second.t
ok 1 - setup
expecting success:
SHA1=`git rev-parse master` &&
echo "$SHA1 refs/heads/master 0x0" >expected &&
$RWT resolve-ref refs/heads/master 0 >actual &&
test_cmp expected actual &&
$RMAIN resolve-ref refs/heads/master 0 >actual &&
test_cmp expected actual
ok 2 - resolve_ref(<shared-ref>)
expecting success:
SHA1=`git -C wt rev-parse HEAD` &&
echo "$SHA1 refs/heads/wt-master 0x1" >expected &&
$RWT resolve-ref HEAD 0 >actual &&
test_cmp expected actual &&
SHA1=`git rev-parse HEAD` &&
echo "$SHA1 refs/heads/master 0x1" >expected &&
$RMAIN resolve-ref HEAD 0 >actual &&
test_cmp expected actual
ok 3 - resolve_ref(<per-worktree-ref>)
expecting success:
$RWT create-symref FOO refs/heads/master nothing &&
echo refs/heads/master >expected &&
git -C wt symbolic-ref FOO >actual &&
test_cmp expected actual &&
$RMAIN create-symref FOO refs/heads/wt-master nothing &&
echo refs/heads/wt-master >expected &&
git symbolic-ref FOO >actual &&
test_cmp expected actual
ok 4 - create_symref(FOO, refs/heads/master)
expecting success:
echo $ZERO_OID > .git/logs/PSEUDO-MAIN &&
mkdir -p .git/logs/refs/bisect &&
echo $ZERO_OID > .git/logs/refs/bisect/random &&
echo $ZERO_OID > .git/worktrees/wt/logs/PSEUDO-WT &&
mkdir -p .git/worktrees/wt/logs/refs/bisect &&
echo $ZERO_OID > .git/worktrees/wt/logs/refs/bisect/wt-random &&
$RWT for-each-reflog | cut -d" " -f 2- | sort >actual &&
cat >expected <<-\EOF &&
HEAD 0x1
PSEUDO-WT 0x0
refs/bisect/wt-random 0x0
refs/heads/master 0x0
refs/heads/wt-master 0x0
EOF
test_cmp expected actual &&
$RMAIN for-each-reflog | cut -d" " -f 2- | sort >actual &&
cat >expected <<-\EOF &&
HEAD 0x1
PSEUDO-MAIN 0x0
refs/bisect/random 0x0
refs/heads/master 0x0
refs/heads/wt-master 0x0
EOF
test_cmp expected actual
ok 5 - for_each_reflog()
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1408-packed-refs.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1408-packed-refs/.git/
expecting success:
test_tick &&
git commit --allow-empty -m one &&
one=$(git rev-parse HEAD) &&
git for-each-ref >actual &&
echo "$one commit refs/heads/master" >expect &&
test_cmp expect actual &&
git pack-refs --all &&
git for-each-ref >actual &&
echo "$one commit refs/heads/master" >expect &&
test_cmp expect actual &&
git checkout --orphan another &&
test_tick &&
git commit --allow-empty -m two &&
two=$(git rev-parse HEAD) &&
git checkout -B master &&
git branch -D another &&
git for-each-ref >actual &&
echo "$two commit refs/heads/master" >expect &&
test_cmp expect actual &&
git reflog expire --expire=now --all &&
git prune &&
git tag -m v1.0 v1.0 master
[master (root-commit) 76a57ce] one
Author: A U Thor <author@example.com>
Switched to a new branch 'another'
[another (root-commit) 169e1dc] two
Author: A U Thor <author@example.com>
Switched to and reset branch 'master'
Deleted branch another (was 169e1dc).
ok 1 - setup
expecting success:
git describe master >actual 2>&1 &&
echo "v1.0" >expect &&
test_cmp expect actual
ok 2 - no error from stale entry in packed-refs
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1404-update-ref-errors.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1404-update-ref-errors/.git/
expecting success:
git commit --allow-empty -m Initial &&
C=$(git rev-parse HEAD) &&
git commit --allow-empty -m Second &&
D=$(git rev-parse HEAD) &&
git commit --allow-empty -m Third &&
E=$(git rev-parse HEAD)
[master (root-commit) 85a23c4] Initial
Author: A U Thor <author@example.com>
[master ab9245d] Second
Author: A U Thor <author@example.com>
[master e52be8c] Third
Author: A U Thor <author@example.com>
ok 1 - setup
expecting success:
prefix=refs/1l &&
test_update_rejected "a c e" false "b c/x d" \
"$Q$prefix/c$Q exists; cannot create $Q$prefix/c/x$Q"
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: cannot lock ref 'refs/1l/c/x': 'refs/1l/c' exists; cannot create 'refs/1l/c/x'
ok 2 - existing loose ref is a simple prefix of new
expecting success:
prefix=refs/1p &&
test_update_rejected "a c e" true "b c/x d" \
"$Q$prefix/c$Q exists; cannot create $Q$prefix/c/x$Q"
fatal: cannot lock ref 'refs/1p/c/x': 'refs/1p/c' exists; cannot create 'refs/1p/c/x'
ok 3 - existing packed ref is a simple prefix of new
expecting success:
prefix=refs/2l &&
test_update_rejected "a c e" false "b c/x/y d" \
"$Q$prefix/c$Q exists; cannot create $Q$prefix/c/x/y$Q"
fatal: cannot lock ref 'refs/2l/c/x/y': 'refs/2l/c' exists; cannot create 'refs/2l/c/x/y'
ok 4 - existing loose ref is a deeper prefix of new
expecting success:
prefix=refs/2p &&
test_update_rejected "a c e" true "b c/x/y d" \
"$Q$prefix/c$Q exists; cannot create $Q$prefix/c/x/y$Q"
fatal: cannot lock ref 'refs/2p/c/x/y': 'refs/2p/c' exists; cannot create 'refs/2p/c/x/y'
ok 5 - existing packed ref is a deeper prefix of new
expecting success:
prefix=refs/3l &&
test_update_rejected "a c/x e" false "b c d" \
"$Q$prefix/c/x$Q exists; cannot create $Q$prefix/c$Q"
fatal: cannot lock ref 'refs/3l/c': 'refs/3l/c/x' exists; cannot create 'refs/3l/c'
ok 6 - new ref is a simple prefix of existing loose
expecting success:
prefix=refs/3p &&
test_update_rejected "a c/x e" true "b c d" \
"$Q$prefix/c/x$Q exists; cannot create $Q$prefix/c$Q"
fatal: cannot lock ref 'refs/3p/c': 'refs/3p/c/x' exists; cannot create 'refs/3p/c'
ok 7 - new ref is a simple prefix of existing packed
expecting success:
prefix=refs/4l &&
test_update_rejected "a c/x/y e" false "b c d" \
"$Q$prefix/c/x/y$Q exists; cannot create $Q$prefix/c$Q"
fatal: cannot lock ref 'refs/4l/c': 'refs/4l/c/x/y' exists; cannot create 'refs/4l/c'
ok 8 - new ref is a deeper prefix of existing loose
expecting success:
prefix=refs/4p &&
test_update_rejected "a c/x/y e" true "b c d" \
"$Q$prefix/c/x/y$Q exists; cannot create $Q$prefix/c$Q"
fatal: cannot lock ref 'refs/4p/c': 'refs/4p/c/x/y' exists; cannot create 'refs/4p/c'
ok 9 - new ref is a deeper prefix of existing packed
expecting success:
prefix=refs/5 &&
test_update_rejected "a e" false "b c c/x d" \
"cannot process $Q$prefix/c$Q and $Q$prefix/c/x$Q at the same time"
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
expecting success:
prefix=refs/e-rev-parse &&
git update-ref $prefix/foo $C &&
git pack-refs --all &&
mkdir -p .git/$prefix/foo/bar/baz &&
echo "$C" >expected &&
git rev-parse $prefix/foo >actual &&
test_cmp expected actual
ok 11 - empty directory should not fool rev-parse
expecting success:
prefix=refs/e-for-each-ref &&
git update-ref $prefix/foo $C &&
git for-each-ref $prefix >expected &&
git pack-refs --all &&
mkdir -p .git/$prefix/foo/bar/baz &&
git for-each-ref $prefix >actual &&
test_cmp expected actual
ok 12 - empty directory should not fool for-each-ref
expecting success:
prefix=refs/e-create &&
mkdir -p .git/$prefix/foo/bar/baz &&
printf "create %s $C\n" $prefix/foo |
git update-ref --stdin
ok 13 - empty directory should not fool create
expecting success:
prefix=refs/e-verify &&
git update-ref $prefix/foo $C &&
git pack-refs --all &&
mkdir -p .git/$prefix/foo/bar/baz &&
printf "verify %s $C\n" $prefix/foo |
git update-ref --stdin
ok 14 - empty directory should not fool verify
expecting success:
prefix=refs/e-update-1 &&
git update-ref $prefix/foo $C &&
git pack-refs --all &&
mkdir -p .git/$prefix/foo/bar/baz &&
printf "update %s $D\n" $prefix/foo |
git update-ref --stdin
ok 15 - empty directory should not fool 1-arg update
expecting success:
prefix=refs/e-update-2 &&
git update-ref $prefix/foo $C &&
git pack-refs --all &&
mkdir -p .git/$prefix/foo/bar/baz &&
printf "update %s $D $C\n" $prefix/foo |
git update-ref --stdin
ok 16 - empty directory should not fool 2-arg update
expecting success:
prefix=refs/e-delete-0 &&
git update-ref $prefix/foo $C &&
git pack-refs --all &&
mkdir -p .git/$prefix/foo/bar/baz &&
printf "delete %s\n" $prefix/foo |
git update-ref --stdin
ok 17 - empty directory should not fool 0-arg delete
expecting success:
prefix=refs/e-delete-1 &&
git update-ref $prefix/foo $C &&
git pack-refs --all &&
mkdir -p .git/$prefix/foo/bar/baz &&
printf "delete %s $C\n" $prefix/foo |
git update-ref --stdin
ok 18 - empty directory should not fool 1-arg delete
expecting success:
df_test refs/df-al-ds --add-del foo/bar foo
ok 19 - D/F conflict prevents add long + delete short
expecting success:
df_test refs/df-as-dl --add-del foo foo/bar
ok 20 - D/F conflict prevents add short + delete long
expecting success:
df_test refs/df-dl-as --del-add foo/bar foo
ok 21 - D/F conflict prevents delete long + add short
expecting success:
df_test refs/df-ds-al --del-add foo foo/bar
ok 22 - D/F conflict prevents delete short + add long
expecting success:
df_test refs/df-al-dsp --pack --add-del foo/bar foo
ok 23 - D/F conflict prevents add long + delete short packed
expecting success:
df_test refs/df-as-dlp --pack --add-del foo foo/bar
ok 24 - D/F conflict prevents add short + delete long packed
expecting success:
df_test refs/df-dlp-as --pack --del-add foo/bar foo
ok 25 - D/F conflict prevents delete long packed + add short
expecting success:
df_test refs/df-dsp-al --pack --del-add foo foo/bar
ok 26 - D/F conflict prevents delete short packed + add long
expecting success:
df_test refs/df-ial-ds --sym-add --add-del foo/bar foo
ok 27 - D/F conflict prevents indirect add long + delete short
expecting success:
df_test refs/df-ial-ids --sym-add --sym-del --add-del foo/bar foo
ok 28 - D/F conflict prevents indirect add long + indirect delete short
expecting success:
df_test refs/df-ias-idl --sym-add --sym-del --add-del foo foo/bar
ok 29 - D/F conflict prevents indirect add short + indirect delete long
expecting success:
df_test refs/df-idl-ias --sym-add --sym-del --del-add foo/bar foo
ok 30 - D/F conflict prevents indirect delete long + indirect add short
expecting success:
df_test refs/df-ial-dsp --sym-add --pack --add-del foo/bar foo
ok 31 - D/F conflict prevents indirect add long + delete short packed
expecting success:
df_test refs/df-ial-idsp --sym-add --sym-del --pack --add-del foo/bar foo
ok 32 - D/F conflict prevents indirect add long + indirect delete short packed
expecting success:
df_test refs/df-al-idsp --sym-del --pack --add-del foo/bar foo
ok 33 - D/F conflict prevents add long + indirect delete short packed
expecting success:
df_test refs/df-idlp-ias --sym-add --sym-del --pack --del-add foo/bar foo
ok 34 - D/F conflict prevents indirect delete long packed + indirect add short
expecting success:
prefix=refs/missing-update &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/foo$Q: unable to resolve reference $Q$prefix/foo$Q
EOF
printf "%s\n" "update $prefix/foo $E $D" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err
ok 35 - missing old value blocks update
expecting success:
prefix=refs/incorrect-update &&
git update-ref $prefix/foo $C &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/foo$Q: is at $C but expected $D
EOF
printf "%s\n" "update $prefix/foo $E $D" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err
ok 36 - incorrect old value blocks update
expecting success:
prefix=refs/existing-create &&
git update-ref $prefix/foo $C &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/foo$Q: reference already exists
EOF
printf "%s\n" "create $prefix/foo $E" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err
ok 37 - existing old value blocks create
expecting success:
prefix=refs/incorrect-delete &&
git update-ref $prefix/foo $C &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/foo$Q: is at $C but expected $D
EOF
printf "%s\n" "delete $prefix/foo $D" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err
ok 38 - incorrect old value blocks delete
expecting success:
prefix=refs/missing-indirect-update &&
git symbolic-ref $prefix/symref $prefix/foo &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/symref$Q: unable to resolve reference $Q$prefix/foo$Q
EOF
printf "%s\n" "update $prefix/symref $E $D" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err
ok 39 - missing old value blocks indirect update
expecting success:
prefix=refs/incorrect-indirect-update &&
git symbolic-ref $prefix/symref $prefix/foo &&
git update-ref $prefix/foo $C &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/symref$Q: is at $C but expected $D
EOF
printf "%s\n" "update $prefix/symref $E $D" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err
ok 40 - incorrect old value blocks indirect update
expecting success:
prefix=refs/existing-indirect-create &&
git symbolic-ref $prefix/symref $prefix/foo &&
git update-ref $prefix/foo $C &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/symref$Q: reference already exists
EOF
printf "%s\n" "create $prefix/symref $E" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err
ok 41 - existing old value blocks indirect create
expecting success:
prefix=refs/incorrect-indirect-delete &&
git symbolic-ref $prefix/symref $prefix/foo &&
git update-ref $prefix/foo $C &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/symref$Q: is at $C but expected $D
EOF
printf "%s\n" "delete $prefix/symref $D" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err
ok 42 - incorrect old value blocks indirect delete
expecting success:
prefix=refs/missing-noderef-update &&
git symbolic-ref $prefix/symref $prefix/foo &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/symref$Q: reference is missing but expected $D
EOF
printf "%s\n" "option no-deref" "update $prefix/symref $E $D" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err
ok 43 - missing old value blocks indirect no-deref update
expecting success:
prefix=refs/incorrect-noderef-update &&
git symbolic-ref $prefix/symref $prefix/foo &&
git update-ref $prefix/foo $C &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/symref$Q: is at $C but expected $D
EOF
printf "%s\n" "option no-deref" "update $prefix/symref $E $D" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err
ok 44 - incorrect old value blocks indirect no-deref update
expecting success:
prefix=refs/existing-noderef-create &&
git symbolic-ref $prefix/symref $prefix/foo &&
git update-ref $prefix/foo $C &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/symref$Q: reference already exists
EOF
printf "%s\n" "option no-deref" "create $prefix/symref $E" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err
ok 45 - existing old value blocks indirect no-deref create
expecting success:
prefix=refs/incorrect-noderef-delete &&
git symbolic-ref $prefix/symref $prefix/foo &&
git update-ref $prefix/foo $C &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/symref$Q: is at $C but expected $D
EOF
printf "%s\n" "option no-deref" "delete $prefix/symref $D" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err
ok 46 - incorrect old value blocks indirect no-deref delete
expecting success:
prefix=refs/ne-create &&
mkdir -p .git/$prefix/foo/bar &&
: >.git/$prefix/foo/bar/baz.lock &&
test_when_finished "rm -f .git/$prefix/foo/bar/baz.lock" &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/foo$Q: there is a non-empty directory $Q.git/$prefix/foo$Q blocking reference $Q$prefix/foo$Q
EOF
printf "%s\n" "update $prefix/foo $C" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/foo$Q: unable to resolve reference $Q$prefix/foo$Q
EOF
printf "%s\n" "update $prefix/foo $D $C" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err
ok 47 - non-empty directory blocks create
expecting success:
prefix=refs/broken-create &&
mkdir -p .git/$prefix &&
echo "gobbledigook" >.git/$prefix/foo &&
test_when_finished "rm -f .git/$prefix/foo" &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/foo$Q: unable to resolve reference $Q$prefix/foo$Q: reference broken
EOF
printf "%s\n" "update $prefix/foo $C" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/foo$Q: unable to resolve reference $Q$prefix/foo$Q: reference broken
EOF
printf "%s\n" "update $prefix/foo $D $C" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err
ok 48 - broken reference blocks create
expecting success:
prefix=refs/ne-indirect-create &&
git symbolic-ref $prefix/symref $prefix/foo &&
mkdir -p .git/$prefix/foo/bar &&
: >.git/$prefix/foo/bar/baz.lock &&
test_when_finished "rm -f .git/$prefix/foo/bar/baz.lock" &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/symref$Q: there is a non-empty directory $Q.git/$prefix/foo$Q blocking reference $Q$prefix/foo$Q
EOF
printf "%s\n" "update $prefix/symref $C" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/symref$Q: unable to resolve reference $Q$prefix/foo$Q
EOF
printf "%s\n" "update $prefix/symref $D $C" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err
ok 49 - non-empty directory blocks indirect create
expecting success:
prefix=refs/broken-indirect-create &&
git symbolic-ref $prefix/symref $prefix/foo &&
echo "gobbledigook" >.git/$prefix/foo &&
test_when_finished "rm -f .git/$prefix/foo" &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/symref$Q: unable to resolve reference $Q$prefix/foo$Q: reference broken
EOF
printf "%s\n" "update $prefix/symref $C" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err &&
cat >expected <<-EOF &&
fatal: cannot lock ref $Q$prefix/symref$Q: unable to resolve reference $Q$prefix/foo$Q: reference broken
EOF
printf "%s\n" "update $prefix/symref $D $C" |
test_must_fail git update-ref --stdin 2>output.err &&
test_cmp expected output.err
ok 50 - broken reference blocks indirect create
expecting success:
prefix=refs/slow-transaction &&
# Set up a reference with differing loose and packed versions:
git update-ref $prefix/foo $C &&
git pack-refs --all &&
git update-ref $prefix/foo $D &&
git for-each-ref $prefix >unchanged &&
# Now try to update the reference, but hold the `packed-refs` lock
# for a while to see what happens while the process is blocked:
: >.git/packed-refs.lock &&
test_when_finished "rm -f .git/packed-refs.lock" &&
{
# Note: the following command is intentionally run in the
# background. We increase the timeout so that `update-ref`
# attempts to acquire the `packed-refs` lock for much longer
# than it takes for us to do the check then delete it:
git -c core.packedrefstimeout=30000 update-ref -d $prefix/foo &
} &&
pid2=$! &&
# Give update-ref plenty of time to get to the point where it tries
# to lock packed-refs:
sleep 1 &&
# Make sure that update-ref did not complete despite the lock:
kill -0 $pid2 &&
# Verify that the reference still has its old value:
sha1=$(git rev-parse --verify --quiet $prefix/foo || echo undefined) &&
case "$sha1" in
$D)
# This is what we hope for; it means that nothing
# user-visible has changed yet.
: ;;
undefined)
# This is not correct; it means the deletion has happened
# already even though update-ref should not have been
# able to acquire the lock yet.
echo "$prefix/foo deleted prematurely" &&
break
;;
$C)
# This value should never be seen. Probably the loose
# reference has been deleted but the packed reference
# is still there:
echo "$prefix/foo incorrectly observed to be C" &&
break
;;
*)
# WTF?
echo "unexpected value observed for $prefix/foo: $sha1" &&
break
;;
esac >out &&
rm -f .git/packed-refs.lock &&
wait $pid2 &&
test_must_be_empty out &&
test_must_fail git rev-parse --verify --quiet $prefix/foo
ok 51 - no bogus intermediate values during delete
expecting success:
prefix=refs/locked-packed-refs &&
# Set up a reference with differing loose and packed versions:
git update-ref $prefix/foo $C &&
git pack-refs --all &&
git update-ref $prefix/foo $D &&
git for-each-ref $prefix >unchanged &&
# Now try to delete it while the `packed-refs` lock is held:
: >.git/packed-refs.lock &&
test_when_finished "rm -f .git/packed-refs.lock" &&
test_must_fail git update-ref -d $prefix/foo >out 2>err &&
git for-each-ref $prefix >actual &&
test_i18ngrep "Unable to create $Q.*packed-refs.lock$Q: " err &&
test_cmp unchanged actual
error: Unable to create '/<<PKGBUILDDIR>>/t/trash directory.t1404-update-ref-errors/.git/packed-refs.lock': File exists.
ok 52 - delete fails cleanly if packed-refs file is locked
expecting success:
# Setup and expectations are similar to the test above.
prefix=refs/failed-packed-refs &&
git update-ref $prefix/foo $C &&
git pack-refs --all &&
git update-ref $prefix/foo $D &&
git for-each-ref $prefix >unchanged &&
# This should not happen in practice, but it is an easy way to get a
# reliable error (we open with create_tempfile(), which uses O_EXCL).
: >.git/packed-refs.new &&
test_when_finished "rm -f .git/packed-refs.new" &&
test_must_fail git update-ref -d $prefix/foo &&
git for-each-ref $prefix >actual &&
test_cmp unchanged actual
error: unable to create file /<<PKGBUILDDIR>>/t/trash directory.t1404-update-ref-errors/.git/packed-refs.new: File exists
ok 53 - delete fails cleanly if packed-refs.new write fails
# passed all 53 test(s)
1..53
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1409-avoid-packing-refs.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1409-avoid-packing-refs/.git/
expecting success:
git commit --allow-empty -m "Commit A" &&
A=$(git rev-parse HEAD) &&
git commit --allow-empty -m "Commit B" &&
B=$(git rev-parse HEAD) &&
git commit --allow-empty -m "Commit C" &&
C=$(git rev-parse HEAD)
[master (root-commit) 3f45b58] Commit A
Author: A U Thor <author@example.com>
[master 41ce62f] Commit B
Author: A U Thor <author@example.com>
[master f22941f] Commit C
Author: A U Thor <author@example.com>
ok 1 - setup
expecting success:
test_must_fail test -f .git/packed-refs &&
git update-ref refs/heads/foo $A &&
test_must_fail test -f .git/packed-refs &&
git update-ref refs/heads/foo $B &&
test_must_fail test -f .git/packed-refs &&
git update-ref refs/heads/foo $C $B &&
test_must_fail test -f .git/packed-refs &&
git update-ref -d refs/heads/foo &&
test_must_fail test -f .git/packed-refs
ok 2 - do not create packed-refs file gratuitously
expecting success:
git for-each-ref >expected &&
git pack-refs --all &&
mark_packed_refs &&
check_packed_refs_marked &&
git for-each-ref >actual &&
test_cmp expected actual &&
git pack-refs --all &&
test_must_fail check_packed_refs_marked &&
git for-each-ref >actual2 &&
test_cmp expected actual2
ok 3 - check that marking the packed-refs file works
expecting success:
git update-ref refs/heads/packed-update $A &&
git pack-refs --all &&
mark_packed_refs &&
git update-ref refs/heads/packed-update $B &&
check_packed_refs_marked
ok 4 - leave packed-refs untouched on update of packed
expecting success:
git update-ref refs/heads/packed-checked-update $A &&
git pack-refs --all &&
mark_packed_refs &&
git update-ref refs/heads/packed-checked-update $B $A &&
check_packed_refs_marked
ok 5 - leave packed-refs untouched on checked update of packed
expecting success:
git update-ref refs/heads/packed-verify $A &&
git pack-refs --all &&
mark_packed_refs &&
echo "verify refs/heads/packed-verify $A" | git update-ref --stdin &&
check_packed_refs_marked
ok 6 - leave packed-refs untouched on verify of packed
expecting success:
git update-ref refs/heads/packed-delete $A &&
git pack-refs --all &&
mark_packed_refs &&
git update-ref -d refs/heads/packed-delete &&
test_must_fail check_packed_refs_marked
ok 7 - touch packed-refs on delete of packed
expecting success:
git pack-refs --all &&
git update-ref refs/heads/loose-update $A &&
mark_packed_refs &&
git update-ref refs/heads/loose-update $B &&
check_packed_refs_marked
ok 8 - leave packed-refs untouched on update of loose
expecting success:
git pack-refs --all &&
git update-ref refs/heads/loose-checked-update $A &&
mark_packed_refs &&
git update-ref refs/heads/loose-checked-update $B $A &&
check_packed_refs_marked
ok 9 - leave packed-refs untouched on checked update of loose
expecting success:
git pack-refs --all &&
git update-ref refs/heads/loose-verify $A &&
mark_packed_refs &&
echo "verify refs/heads/loose-verify $A" | git update-ref --stdin &&
check_packed_refs_marked
ok 10 - leave packed-refs untouched on verify of loose
expecting success:
git pack-refs --all &&
git update-ref refs/heads/loose-delete $A &&
mark_packed_refs &&
git update-ref -d refs/heads/loose-delete &&
check_packed_refs_marked
ok 11 - leave packed-refs untouched on delete of loose
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1411-reflog-show.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1411-reflog-show/.git/
expecting success:
echo content >file &&
git add file &&
test_tick &&
git commit -m one
[master (root-commit) e46513e] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 1 - setup
expecting success:
git log -g -1 >tmp &&
grep ^Reflog <tmp >actual &&
test_cmp expect actual
ok 2 - log -g shows reflog headers
expecting success:
git log -g -1 --oneline >actual &&
test_cmp expect actual
ok 3 - oneline reflog format
expecting success:
git reflog -1 >actual &&
test_cmp expect actual
ok 4 - reflog default format
expecting success:
git reflog --format=short -1 >actual &&
test_cmp expect actual
ok 5 - override reflog default format
expecting success:
git log -g -1 HEAD@{now} >tmp &&
grep ^Reflog <tmp >actual &&
test_cmp expect actual
ok 6 - using @{now} syntax shows reflog date (multiline)
expecting success:
git log -g -1 --oneline HEAD@{now} >actual &&
test_cmp expect actual
ok 7 - using @{now} syntax shows reflog date (oneline)
expecting success:
git log -g -1 --format=%gd HEAD@{now} >actual &&
test_cmp expect actual
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 9 - using --date= shows reflog date (multiline)
expecting success:
git log -g -1 --oneline --date=default >actual &&
test_cmp expect actual
ok 10 - using --date= shows reflog date (oneline)
expecting success:
git log -g -1 --format=%gd --date=raw >actual &&
test_cmp expect actual
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 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
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 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
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_must_be_empty actual
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
[master fc3e0aa] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
ok 17 - git log -g -p shows diffs vs. parents
expecting success:
git reflog exists refs/heads/master &&
! git reflog exists refs/heads/nonexistent
ok 18 - reflog exists works
# passed all 18 test(s)
1..18
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1412-reflog-loop.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1412-reflog-loop/.git/
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
[master (root-commit) e46513e] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 441e5e0] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup commits
expecting success:
git checkout -b topic &&
git reset one &&
git reset two &&
git reset one &&
git reset two
Switched to a new branch 'topic'
Unstaged changes after reset:
M file
Unstaged changes after reset:
M file
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 3 - reflog shows all entries
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1413-reflog-detach.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1413-reflog-detach/.git/
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
[master (root-commit) 66fe8b3] initial
Author: A U Thor <author@example.com>
[master 5ce2b00] second
Author: A U Thor <author@example.com>
ok 1 - setup
expecting success:
reset_state &&
git rev-parse master master^ >expect &&
git log -g --format=%H >actual &&
test_cmp expect actual
Already on 'master'
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
Already on 'master'
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
Switched to branch 'master'
Switched to branch 'side'
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 5ce2b00 second
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'
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 5ce2b00 second
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
Switched to branch 'master'
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 5ce2b00 second
Switched to branch 'master'
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'
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 5ce2b00 second
Previous HEAD position was 5ce2b00 second
Switched to branch 'side'
ok 7 - attach to other
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1414-reflog-walk.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1414-reflog-walk/.git/
expecting success:
test_commit one &&
test_commit two &&
git checkout -b side HEAD^ &&
test_commit three &&
git merge --no-commit master &&
echo evil-merge-content >>one.t &&
test_tick &&
git commit --no-edit -a
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
Switched to a new branch 'side'
[side 897c206] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
Merging:
897c206 three
virtual master
found 1 common ancestor:
d79ce16 one
Automatic merge went well; stopped before committing as requested
[side 0a3eb79] Merge branch 'master' into side
Author: A U Thor <author@example.com>
ok 1 - set up some reflog entries
expecting success:
cat >expect.all <<-EOF
HEAD@{0} commit (merge): Merge branch ${sq}master${sq} into side
HEAD@{1} commit: three
HEAD@{2} checkout: moving from master to side
HEAD@{3} commit: two
HEAD@{4} commit (initial): one
EOF
ok 2 - set up expected reflog
expecting success:
do_walk >actual &&
test_cmp expect.all actual
ok 3 - reflog walk shows expected logs
expecting success:
grep -v merge expect.all >expect &&
do_walk --no-merges >actual &&
test_cmp expect actual
ok 4 - reflog can limit with --no-merges
expecting success:
grep two expect.all >expect &&
do_walk -- two.t >actual &&
test_cmp expect actual
ok 5 - reflog can limit with pathspecs
expecting success:
# we pick up:
# - the initial commit of one
# - the checkout back to commit one
# - the evil merge which touched one
sed -n "1p;3p;5p" expect.all >expect &&
do_walk -- one.t >actual &&
test_cmp expect actual
ok 6 - pathspec limiting handles merges
expecting success:
# convert newlines to spaces
echo $(git rev-parse HEAD HEAD^1 HEAD^2) >expect &&
git rev-list -g --parents -1 HEAD >actual &&
test_cmp expect actual
ok 7 - --parents shows true parents
expecting success:
# We expect to see all entries for all reflogs, but interleaved by
# date, with order on the command line breaking ties. We
# can use "sort" on the separate lists to generate this,
# but note two tricks:
#
# 1. We use "{" as the delimiter, which lets us skip to the reflog
# date specifier as our second field, and then our "-n" numeric
# sort ignores the bits after the timestamp.
#
# 2. POSIX leaves undefined whether this is a stable sort or not. So
# we use "-k 1" to ensure that we see HEAD before master before
# side when breaking ties.
{
do_walk --date=unix HEAD &&
do_walk --date=unix side &&
do_walk --date=unix master
} >expect.raw &&
sort -t "{" -k 2nr -k 1 <expect.raw >expect &&
do_walk --date=unix HEAD master side >actual &&
test_cmp expect actual
ok 8 - walking multiple reflogs shows all
expecting success:
do_walk HEAD@{1979-01-01} HEAD >actual &&
test_cmp expect.all actual
warning: Log for 'HEAD' only goes back to Thu, 7 Apr 2005 15:13:13 -0700.
ok 9 - date-limiting does not interfere with other logs
expecting success:
# Flip between commits one and two so each ref update actually
# does something (and does not get optimized out). We know
# that the timestamps of those commits will be before our "min".
git update-ref -m before refs/heads/minmax one &&
test_tick &&
min=$test_tick &&
git update-ref -m min refs/heads/minmax two &&
test_tick &&
max=$test_tick &&
git update-ref -m max refs/heads/minmax one &&
test_tick &&
git update-ref -m after refs/heads/minmax two &&
cat >expect <<-\EOF &&
max
min
EOF
git log -g --since=$min --until=$max --format=%gs minmax >actual &&
test_cmp expect actual
ok 10 - min/max age uses entry date to limit
expecting success:
head=$(git rev-parse HEAD) &&
one=$(git rev-parse one) &&
ident="$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE" &&
echo "$head $one $ident broken reflog entry" >>.git/logs/HEAD &&
echo $one >expect &&
git log -g --format=%H -1 >actual &&
test_cmp expect actual
ok 11 - walk prefers reflog to ref tip
expecting success:
test_must_fail git rev-list -g
usage: git rev-list [OPTION] <commit-id>... [ -- paths... ]
limiting output:
--max-count=<n>
--max-age=<epoch>
--min-age=<epoch>
--sparse
--no-merges
--min-parents=<n>
--no-min-parents
--max-parents=<n>
--no-max-parents
--remove-empty
--all
--branches
--tags
--remotes
--stdin
--quiet
ordering output:
--topo-order
--date-order
--reverse
formatting output:
--parents
--children
--objects | --objects-edge
--unpacked
--header | --pretty
--[no-]object-names
--abbrev=<n> | --no-abbrev
--abbrev-commit
--left-right
--count
special purpose:
--bisect
--bisect-vars
--bisect-all
ok 12 - rev-list -g complains when there are no reflogs
# passed all 12 test(s)
1..12
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1410-reflog.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1410-reflog/.git/
expecting success:
test_oid_init &&
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
[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
[master 7d1a0b8] dragon
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 C
[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
[master 3ac530f] monkey
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 A/G
tree
tree
blob
blob
blob
blob
blob
commit
tree
commit
commit
commit
tree
tree
blob
blob
blob
blob
blob
commit
tree
commit
commit
commit
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
HEAD is now at 7d1a0b8 dragon
tree
tree
blob
blob
blob
blob
blob
commit
tree
commit
commit
commit
tree
tree
blob
blob
blob
blob
blob
commit
tree
commit
commit
commit
ok 2 - rewind
expecting success:
corrupt $F &&
check_fsck "missing blob $F"
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
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"
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
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
dangling commit 3ac530f2f6c3a45206a6b2d455baf89d1c8f672d
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
tree
tree
blob
blob
blob
commit
commit
fatal: git cat-file: could not get object info
fatal: git cat-file: could not get object info
fatal: git cat-file: could not get object info
fatal: git cat-file: could not get object info
fatal: git cat-file: could not get object info
ok 6 - prune and fsck
expecting success:
recover $F &&
check_fsck "dangling blob $F"
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
[master b60a214] rat
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 9908ef9] ox
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master b93561f] tiger
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 8 - delete
expecting success:
test_tick && git reset --hard HEAD~2 &&
git reflog refs/heads/master >output &&
test_line_count = 4 output
HEAD is now at b60a214 rat
ok 9 - rewind2
expecting success:
git reflog expire --verbose \
--expire=never \
--expire-unreachable=never \
--all &&
git reflog refs/heads/master >output &&
test_line_count = 4 output
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
ok 10 - --expire=never
expecting success:
test_config gc.reflogexpire never &&
test_config gc.reflogexpireunreachable never &&
git reflog expire --verbose --all >output &&
test_line_count = 9 output &&
git reflog refs/heads/master >output &&
test_line_count = 4 output
ok 11 - gc.reflogexpire=never
expecting success:
test_config gc.reflogexpire false &&
test_config gc.reflogexpireunreachable false &&
git reflog expire --verbose --all &&
git reflog refs/heads/master >output &&
test_line_count = 4 output
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
ok 12 - gc.reflogexpire=false
expecting success:
test_config gc.reflogexpire never &&
test_config gc.reflogexpireunreachable never &&
test_must_fail git reflog expire master@{123} 2>stderr &&
test_i18ngrep "points nowhere" stderr &&
test_must_fail git reflog expire does-not-exist 2>stderr &&
test_i18ngrep "points nowhere" stderr
error: master@{123} points nowhere!
error: does-not-exist points nowhere!
ok 13 - git reflog expire unknown reference
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
Switched to branch 'foo'
ok 14 - 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
Deleted branch one/two (was b60a214).
Deleted branch one (was b60a214).
ok 15 - 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 &&
git log -g --format="%gd %gs" one >actual &&
test_must_be_empty actual
Deleted branch one/two (was b60a214).
Deleted branch one (was b60a214).
ok 16 - stale dirs do not cause d/f conflicts (reflogs off)
checking prerequisite: SHA1
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test $(git hash-object /dev/null) = e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
)
prerequisite SHA1 ok
expecting success:
git checkout -b reflogskip &&
zf=$(test_oid zero_2) &&
ident="abc <xyz> 0000000001 +0000" &&
for i in $(test_seq 1 75); do
printf "$zf%02d $zf%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 ${zf}03 >expect &&
test_cmp expect actual
Switched to a new branch 'reflogskip'
ok 17 - parsing reverse reflogs at BUFSIZ boundaries
expecting success:
git update-ref --create-reflog -m "Creating ref" \
refs/tests/tree-in-reflog HEAD &&
git update-ref -m "Forcing tree" refs/tests/tree-in-reflog HEAD^{tree} &&
git update-ref -m "Restoring to commit" refs/tests/tree-in-reflog HEAD &&
git reflog refs/tests/tree-in-reflog
b60a214 refs/tests/tree-in-reflog@{0}: Restoring to commit
b60a214 refs/tests/tree-in-reflog@{2}: Creating ref
ok 18 - no segfaults for reflog containing non-commit sha1s
checking known breakage:
git reflog refs/tests/tree-in-reflog >actual &&
test_line_count = 3 actual
test_line_count: line count for actual != 3
b60a214 refs/tests/tree-in-reflog@{0}: Restoring to commit
b60a214 refs/tests/tree-in-reflog@{2}: Creating ref
not ok 19 - reflog with non-commit entries displays all entries # TODO known breakage
expecting success:
git branch --create-reflog the_symref &&
git branch --create-reflog referrent &&
git update-ref referrent HEAD &&
git symbolic-ref refs/heads/the_symref refs/heads/referrent &&
test_when_finished "rm -f .git/refs/heads/referrent.lock" &&
touch .git/refs/heads/referrent.lock &&
git reflog expire --expire=all the_symref
ok 20 - reflog expire operates on symref not referrent
expecting success:
git init orphanage &&
(
cd orphanage &&
cat >expect <<-\EOF &&
HEAD@{0} commit (initial): orphan2-1
HEAD@{1} commit: orphan1-2
HEAD@{2} commit (initial): orphan1-1
HEAD@{3} commit (initial): initial
EOF
test_commit initial &&
git checkout --orphan orphan1 &&
test_commit orphan1-1 &&
test_commit orphan1-2 &&
git checkout --orphan orphan2 &&
test_commit orphan2-1 &&
git log -g --format="%gd %gs" >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1410-reflog/orphanage/.git/
[master (root-commit) 2aabd22] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
Switched to a new branch 'orphan1'
[orphan1 (root-commit) e2a0da2] orphan1-1
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 initial.t
create mode 100644 orphan1-1.t
[orphan1 9bdda66] orphan1-2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 orphan1-2.t
Switched to a new branch 'orphan2'
[orphan2 (root-commit) b47ea8f] orphan2-1
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 initial.t
create mode 100644 orphan1-1.t
create mode 100644 orphan1-2.t
create mode 100644 orphan2-1.t
ok 21 - continue walking past root commits
expecting success:
git init main-wt &&
(
cd main-wt &&
test_tick &&
test_commit foo &&
git worktree add link-wt &&
test_tick &&
test_commit -C link-wt foobar &&
test_tick &&
git reflog expire --verbose --all --expire=$test_tick &&
test_must_be_empty .git/worktrees/link-wt/logs/HEAD
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1410-reflog/main-wt/.git/
[master (root-commit) af4983b] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
Preparing worktree (new branch 'link-wt')
HEAD is now at af4983b foo
[link-wt 7368abb] foobar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foobar.t
prune commit (initial): foo
prune commit (initial): foo
prune branch: Created from HEAD
prune commit: foobar
prune reset: moving to HEAD
prune commit: foobar
ok 22 - expire with multiple worktrees
# still have 1 known breakage(s)
# passed all remaining 21 test(s)
1..22
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1420-lost-found.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1420-lost-found/.git/
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
[master (root-commit) 9bb1ae9] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file1
[master 8ad33be] second
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 file2
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)
HEAD is now at 9bb1ae9 initial
dangling blob 00750edc07d6415dcc07ae0351e9397b0222b7ba
dangling commit 8ad33beea8de8e15812274614acd0a26d73b60f8
ok 2 - lost and found something
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1415-worktree-refs.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1415-worktree-refs/.git/
expecting success:
test_commit initial &&
test_commit wt1 &&
test_commit wt2 &&
git worktree add wt1 wt1 &&
git worktree add wt2 wt2 &&
git checkout initial &&
git update-ref refs/worktree/foo HEAD &&
git -C wt1 update-ref refs/worktree/foo HEAD &&
git -C wt2 update-ref refs/worktree/foo HEAD
[master (root-commit) 24b24cf] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
[master 42fba42] wt1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 wt1.t
[master 83df652] wt2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 wt2.t
Preparing worktree (detached HEAD 42fba42)
HEAD is now at 42fba42 wt1
Preparing worktree (detached HEAD 83df652)
HEAD is now at 83df652 wt2
Note: switching to 'initial'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 24b24cf initial
ok 1 - setup
expecting success:
git pack-refs --all &&
test_path_is_missing .git/refs/tags/wt1 &&
test_path_is_file .git/refs/worktree/foo &&
test_path_is_file .git/worktrees/wt1/refs/worktree/foo &&
test_path_is_file .git/worktrees/wt2/refs/worktree/foo
ok 2 - refs/worktree must not be packed
expecting success:
test_cmp_rev worktree/foo initial &&
( cd wt1 && test_cmp_rev worktree/foo wt1 ) &&
( cd wt2 && test_cmp_rev worktree/foo wt2 )
ok 3 - refs/worktree are per-worktree
expecting success:
test_cmp_rev main-worktree/HEAD initial &&
( cd wt1 && test_cmp_rev main-worktree/HEAD initial ) &&
( cd wt2 && test_cmp_rev main-worktree/HEAD initial )
ok 4 - resolve main-worktree/HEAD
expecting success:
mkdir -p .git/refs/heads/main-worktree &&
test_when_finished rm -f .git/refs/heads/main-worktree/HEAD &&
cp .git/HEAD .git/refs/heads/main-worktree/HEAD &&
git rev-parse main-worktree/HEAD 2>warn &&
grep "main-worktree/HEAD.*ambiguous" warn
24b24cf8a829f5b8c30dfc018b0a459a2ccaf380
warning: refname 'main-worktree/HEAD' is ambiguous.
ok 5 - ambiguous main-worktree/HEAD
expecting success:
test_cmp_rev worktrees/wt1/HEAD wt1 &&
( cd wt1 && test_cmp_rev worktrees/wt1/HEAD wt1 ) &&
( cd wt2 && test_cmp_rev worktrees/wt1/HEAD wt1 )
ok 6 - resolve worktrees/xx/HEAD
expecting success:
mkdir -p .git/refs/heads/worktrees/wt1 &&
test_when_finished rm -f .git/refs/heads/worktrees/wt1/HEAD &&
cp .git/HEAD .git/refs/heads/worktrees/wt1/HEAD &&
git rev-parse worktrees/wt1/HEAD 2>warn &&
grep "worktrees/wt1/HEAD.*ambiguous" warn
42fba42569eaa325aaade18832dfa5432d54ffd1
warning: refname 'worktrees/wt1/HEAD' is ambiguous.
ok 7 - ambiguous worktrees/xx/HEAD
expecting success:
git reflog HEAD | sed "s/HEAD/main-worktree\/HEAD/" >expected &&
git reflog main-worktree/HEAD >actual &&
test_cmp expected actual &&
git -C wt1 reflog main-worktree/HEAD >actual.wt1 &&
test_cmp expected actual.wt1
ok 8 - reflog of main-worktree/HEAD
expecting success:
git -C wt2 reflog HEAD | sed "s/HEAD/worktrees\/wt2\/HEAD/" >expected &&
git reflog worktrees/wt2/HEAD >actual &&
test_cmp expected actual &&
git -C wt1 reflog worktrees/wt2/HEAD >actual.wt1 &&
test_cmp expected actual.wt1 &&
git -C wt2 reflog worktrees/wt2/HEAD >actual.wt2 &&
test_cmp expected actual.wt2
ok 9 - reflog of worktrees/xx/HEAD
expecting success:
mkdir fer1 &&
git -C fer1 init repo &&
test_commit -C fer1/repo initial &&
git -C fer1/repo worktree add ../second &&
git -C fer1/repo update-ref refs/bisect/main HEAD &&
git -C fer1/repo update-ref refs/rewritten/main HEAD &&
git -C fer1/repo update-ref refs/worktree/main HEAD &&
git -C fer1/repo for-each-ref --format="%(refname)" | grep main >actual &&
cat >expected <<-\EOF &&
refs/bisect/main
refs/rewritten/main
refs/worktree/main
EOF
test_cmp expected actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1415-worktree-refs/fer1/repo/.git/
[master (root-commit) 1935181] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
Preparing worktree (new branch 'second')
HEAD is now at 1935181 initial
ok 10 - for-each-ref from main repo
expecting success:
mkdir fer2 &&
git -C fer2 init repo &&
test_commit -C fer2/repo initial &&
git -C fer2/repo worktree add ../second &&
git -C fer2/second update-ref refs/bisect/second HEAD &&
git -C fer2/second update-ref refs/rewritten/second HEAD &&
git -C fer2/second update-ref refs/worktree/second HEAD &&
git -C fer2/second for-each-ref --format="%(refname)" | grep second >actual &&
cat >expected <<-\EOF &&
refs/bisect/second
refs/heads/second
refs/rewritten/second
refs/worktree/second
EOF
test_cmp expected actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1415-worktree-refs/fer2/repo/.git/
[master (root-commit) 23fa7ba] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
Preparing worktree (new branch 'second')
HEAD is now at 23fa7ba initial
ok 11 - for-each-ref from linked repo
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1430-bad-ref-name.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1430-bad-ref-name/.git/
expecting success:
test_commit one &&
test_commit two
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
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
fatal: Branch name doesn't conform to GIT standards: .badbranchname
fast-import: dumping crash report to .git/fast_import_crash_11575
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
fatal: Branch name doesn't conform to GIT standards: bad[branch]name
fast-import: dumping crash report to .git/fast_import_crash_11619
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 2>error &&
test_i18ngrep -e "ignoring ref with broken name refs/heads/broken\.\.\.ref" error &&
! grep -e "broken\.\.\.ref" output
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
warning: ignoring ref with broken name refs/heads/broken...ref
ok 4 - git branch shows badly named ref as warning
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 2>error &&
! grep -e "broken\.\.\.ref" error &&
! grep -e "broken\.\.\.ref" output
Deleted branch broken...ref (was broken).
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 2>error &&
! grep -e "broken\.\.\.ref" error &&
! grep -e "broken\.\.\.ref" output
Deleted branch broken...ref (was broken).
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
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
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
error: branch '/<<PKGBUILDDIR>>/t/trash directory.t1430-bad-ref-name/.git/refs/heads/extra' not found.
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 2>error &&
! grep -e "broken\.\.\.ref" error &&
! grep -e "broken\.\.\.ref" output
fatal: 'broken...ref' is not a valid branch name.
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 2>error &&
! grep -e "broken\.\.\.ref" error &&
! grep -e "broken\.\.\.ref" output
error: branch 'goodref' not found.
fatal: 'broken...ref' is not a valid branch name.
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 2>error &&
! grep -e "broken\.\.\.ref" error &&
! grep -e "broken\.\.\.ref" output
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 2>error &&
! grep -e "broken\.\.\.ref" error &&
! grep -e "broken\.\.\.ref" output
fatal: invalid refspec 'HEAD:refs/heads/broken...ref'
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 2>error &&
! grep -e "broken\.\.\.ref" error &&
! grep -e "broken\.\.\.ref" output
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
[master (root-commit) 9db02ea] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
HEAD is now at 9db02ea two
remote: warning: ignoring ref with broken name refs/heads/broken...ref
To file:///<<PKGBUILDDIR>>/t/trash directory.t1430-bad-ref-name/dest
+ 9db02ea...4331c28 master -> master (forced update)
- [deleted] two
* [new tag] one -> one
warning: ignoring ref with broken name refs/heads/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 &&
printf "ref: refs/heads/broken...ref\n" >.git/refs/tags/shadow &&
test_when_finished "rm -f .git/refs/tags/shadow" &&
git rev-parse --verify one >expect &&
git rev-parse --verify shadow >actual 2>err &&
test_cmp expect actual &&
test_i18ngrep "ignoring dangling symref refs/tags/shadow" err
warning: ignoring dangling symref refs/tags/shadow
ok 15 - rev-parse skips symref pointing 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" &&
printf "ref: refs/heads/broken...ref\n" >.git/refs/heads/badname &&
test_when_finished "rm -f .git/refs/heads/badname" &&
printf "ref: refs/heads/master\n" >.git/refs/heads/broken...symref &&
test_when_finished "rm -f .git/refs/heads/broken...symref" &&
git for-each-ref >output 2>error &&
! grep -e "broken\.\.\.ref" output &&
! grep -e "badname" output &&
! grep -e "broken\.\.\.symref" output &&
test_i18ngrep "ignoring ref with broken name refs/heads/broken\.\.\.ref" error &&
test_i18ngrep "ignoring broken ref refs/heads/badname" error &&
test_i18ngrep "ignoring ref with broken name refs/heads/broken\.\.\.symref" error
warning: ignoring ref with broken name refs/heads/broken...ref
warning: ignoring broken ref refs/heads/badname
warning: ignoring ref with broken name refs/heads/broken...symref
ok 16 - for-each-ref emits warnings for broken names
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 >output 2>error &&
test_must_be_empty output &&
test_must_be_empty error &&
git branch >output 2>error &&
! grep -e "broken\.\.\.ref" error &&
! grep -e "broken\.\.\.ref" output
ok 17 - update-ref -d can delete 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 branch -d broken...ref >output 2>error &&
test_i18ngrep "Deleted branch broken...ref (was broken)" output &&
test_must_be_empty error &&
git branch >output 2>error &&
! grep -e "broken\.\.\.ref" error &&
! grep -e "broken\.\.\.ref" output
Deleted branch broken...ref (was broken).
ok 18 - branch -d can delete broken name
expecting success:
cp .git/refs/heads/master .git/refs/heads/broken...ref &&
test_when_finished "rm -f .git/refs/heads/broken...ref" &&
printf "ref: refs/heads/broken...ref\n" >.git/refs/heads/badname &&
test_when_finished "rm -f .git/refs/heads/badname" &&
git update-ref --no-deref -d refs/heads/badname >output 2>error &&
test_path_is_missing .git/refs/heads/badname &&
test_must_be_empty output &&
test_must_be_empty error
ok 19 - update-ref --no-deref -d can delete symref 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" &&
printf "ref: refs/heads/broken...ref\n" >.git/refs/heads/badname &&
test_when_finished "rm -f .git/refs/heads/badname" &&
git branch -d badname >output 2>error &&
test_path_is_missing .git/refs/heads/badname &&
test_i18ngrep "Deleted branch badname (was refs/heads/broken\.\.\.ref)" output &&
test_must_be_empty error
Deleted branch badname (was refs/heads/broken...ref).
ok 20 - branch -d can delete symref to broken name
expecting success:
printf "ref: refs/heads/broken...ref\n" >.git/refs/heads/badname &&
test_when_finished "rm -f .git/refs/heads/badname" &&
git update-ref --no-deref -d refs/heads/badname >output 2>error &&
test_path_is_missing .git/refs/heads/badname &&
test_must_be_empty output &&
test_must_be_empty error
ok 21 - update-ref --no-deref -d can delete dangling symref to broken name
expecting success:
printf "ref: refs/heads/broken...ref\n" >.git/refs/heads/badname &&
test_when_finished "rm -f .git/refs/heads/badname" &&
git branch -d badname >output 2>error &&
test_path_is_missing .git/refs/heads/badname &&
test_i18ngrep "Deleted branch badname (was refs/heads/broken\.\.\.ref)" output &&
test_must_be_empty error
Deleted branch badname (was refs/heads/broken...ref).
ok 22 - branch -d can delete dangling symref 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" &&
printf "ref: refs/heads/broken...ref\n" >.git/refs/heads/badname &&
test_when_finished "rm -f .git/refs/heads/badname" &&
git update-ref -d refs/heads/badname >output 2>error &&
test_path_is_missing .git/refs/heads/broken...ref &&
test_must_be_empty output &&
test_must_be_empty error
ok 23 - update-ref -d can delete broken name through symref
expecting success:
printf "ref: refs/heads/master\n" >.git/refs/heads/broken...symref &&
test_when_finished "rm -f .git/refs/heads/broken...symref" &&
git update-ref --no-deref -d refs/heads/broken...symref >output 2>error &&
test_path_is_missing .git/refs/heads/broken...symref &&
test_must_be_empty output &&
test_must_be_empty error
ok 24 - update-ref --no-deref -d can delete symref with broken name
expecting success:
printf "ref: refs/heads/master\n" >.git/refs/heads/broken...symref &&
test_when_finished "rm -f .git/refs/heads/broken...symref" &&
git branch -d broken...symref >output 2>error &&
test_path_is_missing .git/refs/heads/broken...symref &&
test_i18ngrep "Deleted branch broken...symref (was refs/heads/master)" output &&
test_must_be_empty error
Deleted branch broken...symref (was refs/heads/master).
ok 25 - branch -d can delete symref with broken name
expecting success:
printf "ref: refs/heads/idonotexist\n" >.git/refs/heads/broken...symref &&
test_when_finished "rm -f .git/refs/heads/broken...symref" &&
git update-ref --no-deref -d refs/heads/broken...symref >output 2>error &&
test_path_is_missing .git/refs/heads/broken...symref &&
test_must_be_empty output &&
test_must_be_empty error
ok 26 - update-ref --no-deref -d can delete dangling symref with broken name
expecting success:
printf "ref: refs/heads/idonotexist\n" >.git/refs/heads/broken...symref &&
test_when_finished "rm -f .git/refs/heads/broken...symref" &&
git branch -d broken...symref >output 2>error &&
test_path_is_missing .git/refs/heads/broken...symref &&
test_i18ngrep "Deleted branch broken...symref (was refs/heads/idonotexist)" output &&
test_must_be_empty error
Deleted branch broken...symref (was refs/heads/idonotexist).
ok 27 - branch -d can delete dangling symref with broken name
expecting success:
echo precious >.git/my-private-file &&
echo precious >expect &&
test_must_fail git update-ref -d my-private-file >output 2>error &&
test_must_be_empty output &&
test_i18ngrep -e "refusing to update ref with bad name" error &&
test_cmp expect .git/my-private-file
error: refusing to update ref with bad name 'my-private-file'
ok 28 - 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
error: refusing to update ref with bad name '/<<PKGBUILDDIR>>/t/trash directory.t1430-bad-ref-name/.git/refs/heads/extra'
ok 29 - 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
fatal: invalid ref format: ~a
ok 30 - 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
fatal: invalid ref format: ~a
ok 31 - update-ref --stdin fails update with bad ref name
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
fatal: invalid ref format: ~a
ok 32 - 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
fatal: invalid ref format: ~a
ok 33 - 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
fatal: invalid ref format: ~a
ok 34 - 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
fatal: invalid ref format: ~a
ok 35 - update-ref --stdin -z fails delete with bad ref name
expecting success:
test_must_fail git branch HEAD HEAD^ &&
test_must_fail git show-ref refs/heads/HEAD
fatal: 'HEAD' is not a valid branch name.
ok 36 - branch rejects HEAD as a branch name
expecting success:
test_must_fail git checkout -B HEAD HEAD^ &&
test_must_fail git show-ref refs/heads/HEAD
fatal: 'HEAD' is not a valid branch name.
ok 37 - checkout -b rejects HEAD as a branch name
expecting success:
git update-ref refs/heads/HEAD HEAD^ &&
git show-ref refs/heads/HEAD &&
git update-ref -d refs/heads/HEAD &&
test_must_fail git show-ref refs/heads/HEAD
d79ce1670bdcb76e6d1da2ae095e890ccb326ae9 refs/heads/HEAD
ok 38 - update-ref can operate on refs/heads/HEAD
expecting success:
git update-ref refs/heads/HEAD HEAD^ &&
git branch -d HEAD &&
test_must_fail git show-ref refs/heads/HEAD
Deleted branch HEAD (was d79ce16).
ok 39 - branch -d can remove refs/heads/HEAD
expecting success:
git update-ref refs/heads/HEAD HEAD^ &&
git branch -m HEAD tail &&
test_must_fail git show-ref refs/heads/HEAD &&
git show-ref refs/heads/tail
warning: Renamed a misnamed branch 'HEAD' away
d79ce1670bdcb76e6d1da2ae095e890ccb326ae9 refs/heads/tail
ok 40 - branch -m can rename refs/heads/HEAD
expecting success:
git update-ref refs/heads/-dash HEAD^ &&
git branch -d -- -dash &&
test_must_fail git show-ref refs/heads/-dash
Deleted branch -dash (was d79ce16).
ok 41 - branch -d can remove refs/heads/-dash
expecting success:
git update-ref refs/heads/-dash HEAD^ &&
git branch -m -- -dash dash &&
test_must_fail git show-ref refs/heads/-dash &&
git show-ref refs/heads/dash
warning: Renamed a misnamed branch '-dash' away
d79ce1670bdcb76e6d1da2ae095e890ccb326ae9 refs/heads/dash
ok 42 - branch -m can rename refs/heads/-dash
# still have 2 known breakage(s)
# passed all remaining 40 test(s)
1..42
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1500-rev-parse.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1500-rev-parse/.git/
expecting success:
mkdir -p sub/dir work &&
cp -R .git repo.git
ok 1 - setup
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 2 - toplevel: --is-bare-repository
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 3 - toplevel: --is-inside-git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 4 - toplevel: --is-inside-work-tree
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 5 - toplevel: --show-prefix
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 6 - toplevel: --git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 7 - toplevel: --absolute-git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 8 - .git/: --is-bare-repository
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 9 - .git/: --is-inside-git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 10 - .git/: --is-inside-work-tree
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 11 - .git/: --show-prefix
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 12 - .git/: --git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 13 - .git/: --absolute-git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 14 - .git/objects/: --is-bare-repository
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 15 - .git/objects/: --is-inside-git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 16 - .git/objects/: --is-inside-work-tree
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 17 - .git/objects/: --show-prefix
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 18 - .git/objects/: --git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 19 - .git/objects/: --absolute-git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 20 - subdirectory: --is-bare-repository
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 21 - subdirectory: --is-inside-git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 22 - subdirectory: --is-inside-work-tree
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 23 - subdirectory: --show-prefix
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 24 - subdirectory: --git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 25 - subdirectory: --absolute-git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 26 - core.bare = true: --is-bare-repository
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 27 - core.bare = true: --is-inside-git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 28 - core.bare = true: --is-inside-work-tree
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 29 - core.bare undefined: --is-bare-repository
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 30 - core.bare undefined: --is-inside-git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 31 - core.bare undefined: --is-inside-work-tree
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 32 - GIT_DIR=../.git, core.bare = false: --is-bare-repository
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 33 - GIT_DIR=../.git, core.bare = false: --is-inside-git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 34 - GIT_DIR=../.git, core.bare = false: --is-inside-work-tree
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 35 - GIT_DIR=../.git, core.bare = false: --show-prefix
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 36 - GIT_DIR=../.git, core.bare = false: --git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 37 - GIT_DIR=../.git, core.bare = false: --absolute-git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 38 - GIT_DIR=../.git, core.bare = true: --is-bare-repository
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 39 - GIT_DIR=../.git, core.bare = true: --is-inside-git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 40 - GIT_DIR=../.git, core.bare = true: --is-inside-work-tree
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 41 - GIT_DIR=../.git, core.bare = true: --show-prefix
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 42 - GIT_DIR=../.git, core.bare undefined: --is-bare-repository
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 43 - GIT_DIR=../.git, core.bare undefined: --is-inside-git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 44 - GIT_DIR=../.git, core.bare undefined: --is-inside-work-tree
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 45 - GIT_DIR=../.git, core.bare undefined: --show-prefix
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 46 - GIT_DIR=../repo.git, core.bare = false: --is-bare-repository
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 47 - GIT_DIR=../repo.git, core.bare = false: --is-inside-git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 48 - GIT_DIR=../repo.git, core.bare = false: --is-inside-work-tree
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 49 - GIT_DIR=../repo.git, core.bare = false: --show-prefix
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 50 - GIT_DIR=../repo.git, core.bare = false: --git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 51 - GIT_DIR=../repo.git, core.bare = false: --absolute-git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 52 - GIT_DIR=../repo.git, core.bare = true: --is-bare-repository
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 53 - GIT_DIR=../repo.git, core.bare = true: --is-inside-git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 54 - GIT_DIR=../repo.git, core.bare = true: --is-inside-work-tree
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 55 - GIT_DIR=../repo.git, core.bare = true: --show-prefix
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 56 - GIT_DIR=../repo.git, core.bare undefined: --is-bare-repository
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 57 - GIT_DIR=../repo.git, core.bare undefined: --is-inside-git-dir
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 58 - GIT_DIR=../repo.git, core.bare undefined: --is-inside-work-tree
expecting success:
if test -n "$gitdir"
then
test_when_finished "unset GIT_DIR" &&
GIT_DIR="$gitdir" &&
export GIT_DIR
fi &&
case "$bare" in
t*) test_config ${d:+-C} ${d:+"$d"} core.bare true ;;
f*) test_config ${d:+-C} ${d:+"$d"} core.bare false ;;
u*) test_unconfig ${d:+-C} ${d:+"$d"} core.bare ;;
esac &&
echo "$expect" >expect &&
git ${d:+-C} ${d:+"$d"} rev-parse $o >actual &&
test_cmp expect actual
ok 59 - GIT_DIR=../repo.git, core.bare undefined: --show-prefix
expecting success:
echo .git >expect &&
git rev-parse --git-common-dir >actual &&
test_cmp expect actual
ok 60 - git-common-dir from worktree root
expecting success:
mkdir -p path/to/child &&
test_when_finished "rm -rf path" &&
echo "$(git -C path/to/child rev-parse --show-cdup).git" >expect &&
git -C path/to/child rev-parse --git-common-dir >actual &&
test_cmp expect actual
ok 61 - git-common-dir inside sub-dir
expecting success:
echo .git/objects >expect &&
git rev-parse --git-path objects >actual &&
test_cmp expect actual
ok 62 - git-path from worktree root
expecting success:
mkdir -p path/to/child &&
test_when_finished "rm -rf path" &&
echo "$(git -C path/to/child rev-parse --show-cdup).git/objects" >expect &&
git -C path/to/child rev-parse --git-path objects >actual &&
test_cmp expect actual
ok 63 - git-path inside sub-dir
expecting success:
test_commit test_commit &&
echo true >expect &&
git clone --depth 1 --no-local . shallow &&
test_when_finished "rm -rf shallow" &&
git -C shallow rev-parse --is-shallow-repository >actual &&
test_cmp expect actual
[master (root-commit) 389d16e] test_commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 test_commit.t
Cloning into 'shallow'...
ok 64 - rev-parse --is-shallow-repository in shallow repo
expecting success:
echo false >expect &&
git rev-parse --is-shallow-repository >actual &&
test_cmp expect actual
ok 65 - rev-parse --is-shallow-repository in non-shallow repo
expecting success:
git rev-parse --show-superproject-working-tree >out &&
test_must_be_empty out &&
test_create_repo super &&
test_commit -C super test_commit &&
test_create_repo sub &&
test_commit -C sub test_commit &&
git -C super submodule add ../sub dir/sub &&
echo $(pwd)/super >expect &&
git -C super/dir/sub rev-parse --show-superproject-working-tree >out &&
test_cmp expect out &&
test_commit -C super submodule_add &&
git -C super checkout -b branch1 &&
git -C super/dir/sub checkout -b branch1 &&
test_commit -C super/dir/sub branch1_commit &&
git -C super add dir/sub &&
test_commit -C super branch1_commit &&
git -C super checkout -b branch2 master &&
git -C super/dir/sub checkout -b branch2 master &&
test_commit -C super/dir/sub branch2_commit &&
git -C super add dir/sub &&
test_commit -C super branch2_commit &&
test_must_fail git -C super merge branch1 &&
git -C super/dir/sub rev-parse --show-superproject-working-tree >out &&
test_cmp expect out
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1500-rev-parse/super/.git/
[master (root-commit) cbdc642] test_commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 test_commit.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1500-rev-parse/sub/.git/
[master (root-commit) 2eb1b96] test_commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 test_commit.t
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1500-rev-parse/super/dir/sub'...
done.
[master 7cabc11] submodule_add
Author: A U Thor <author@example.com>
3 files changed, 5 insertions(+)
create mode 100644 .gitmodules
create mode 160000 dir/sub
create mode 100644 submodule_add.t
Switched to a new branch 'branch1'
Switched to a new branch 'branch1'
[branch1 2aa4ded] branch1_commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 branch1_commit.t
[branch1 7e8b966] branch1_commit
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 branch1_commit.t
Switched to a new branch 'branch2'
M dir/sub
Switched to a new branch 'branch2'
[branch2 10a2528] branch2_commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 branch2_commit.t
[branch2 8d6224f] branch2_commit
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 branch2_commit.t
Merging:
8d6224f branch2_commit
virtual branch1
found 1 common ancestor:
7cabc11 submodule_add
Failed to merge submodule dir/sub (merge following commits not found)
Auto-merging dir/sub
CONFLICT (submodule): Merge conflict in dir/sub
Automatic merge failed; fix conflicts and then commit the result.
ok 66 - showing the superproject correctly
# passed all 66 test(s)
1..66
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1501-work-tree.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1501-work-tree/.git/
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 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_must_be_empty 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
ok 3 - setup: core.worktree = relative path
expecting success:
test_rev_parse false false false
ok 4 - outside
expecting success:
(
cd work &&
GIT_DIR=../repo.git &&
GIT_CONFIG="$(pwd)"/$GIT_DIR/config &&
test_rev_parse false false true ""
)
'actual.prefix' is not empty, it contains:
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 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 7 - subdir of work tree
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"
ok 8 - setup: core.worktree = absolute path
expecting success:
test_rev_parse false false false &&
(
cd work2 &&
test_rev_parse false false false
)
ok 9 - outside
expecting success:
(
cd work &&
test_rev_parse false false true ""
)
'actual.prefix' is not empty, it contains:
ok 10 - inside work tree
expecting success:
(
cd work/sub/dir &&
test_rev_parse false false true sub/dir/
)
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 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 13 - outside
expecting success:
(
cd work &&
GIT_WORK_TREE=. &&
test_rev_parse false false true ""
)
'actual.prefix' is not empty, it contains:
ok 14 - inside work tree
expecting success:
(
cd work/sub/dir &&
GIT_WORK_TREE=../.. &&
test_rev_parse false false true sub/dir/
)
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
ok 16 - setup: GIT_WORK_TREE=absolute, below git dir
expecting success:
echo outside &&
test_rev_parse false false false
outside
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
)
ok 18 - in repo.git
expecting success:
(
cd repo.git/work &&
test_rev_parse false true true ""
)
'actual.prefix' is not empty, it contains:
ok 19 - inside work tree
expecting success:
(
cd repo.git/work/sub/dir &&
test_rev_parse false true true sub/dir/
)
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
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
)
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 $ZERO_OID $EMPTY_BLOB A sub/dir/tracked
EOF
cat >diff-index.expected <<-EOF &&
:000000 100644 $ZERO_OID $ZERO_OID A sub/dir/tracked
EOF
(
GIT_DIR=repo.git &&
GIT_WORK_TREE=repo.git/work &&
export GIT_DIR GIT_WORK_TREE &&
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
ok 24 - diff-index respects work tree under .git dir
expecting success:
cat >diff-files.expected <<-EOF &&
:100644 100644 $EMPTY_BLOB $ZERO_OID 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
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 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
ok 27 - git grep
expecting success:
(
cd repo.git &&
GIT_DIR=. GIT_WORK_TREE=work git commit -a -m done
)
[master (root-commit) 524c6fd] done
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 sub/dir/tracked
ok 28 - git commit
expecting success:
(
cd repo.git &&
test_might_fail git config --unset core.worktree &&
test_must_fail git log HEAD -- /home
)
fatal: /home: '/home' is outside repository
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-work-tree//repo.git --work-tree=/<<PKGBUILDDIR>>/t/trash directory.t1501-work-tree add dummy_file
ok 30 - make_relative_path handles double slashes in GIT_DIR
expecting success:
GIT_DIR=repo.git GIT_WORK_TREE=repo.git/work \
test-tool subprocess --setup-work-tree rev-parse --show-toplevel >actual &&
echo "$(pwd)/repo.git/work" >expected &&
test_cmp expected actual
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
cp: cannot stat 'repo.git/sharedindex.*': No such file or directory
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-tool path-utils real_path "$TRASH_DIRECTORY/repo.git" >expect &&
test_cmp expect actual
)
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-tool path-utils real_path "$TRASH_DIRECTORY/repo.git" >expect &&
test_cmp expect actual
)
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-tool 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
)
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-tool 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
)
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 37 - $GIT_WORK_TREE overrides $GIT_DIR/common
expecting success:
(
GIT_WORK_TREE=/.invalid/work/tree &&
export GIT_WORK_TREE &&
test_expect_code 128 git rev-parse
)
fatal: Invalid path '/.invalid': No such file or directory
ok 38 - error out gracefully on invalid $GIT_WORK_TREE
expecting success:
git init relative &&
git -C relative commit --allow-empty -m one &&
git -C relative commit --allow-empty -m two &&
GIT_DIR=relative/.git GIT_WORK_TREE=relative git reset HEAD^ &&
git -C relative log -1 --format=%s >actual &&
echo one >expect &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1501-work-tree/relative/.git/
[master (root-commit) 206a9f7] one
Author: A U Thor <author@example.com>
[master 1ed1939] two
Author: A U Thor <author@example.com>
ok 39 - refs work with relative gitdir and work tree
# passed all 39 test(s)
1..39
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1502-rev-parse-parseopt.sh ***
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
|aswitch help te=t contains? fl*g characters!`
|bswitch=hint hint has trailing tab character
|cswitch switch has trailing tab character
|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/^|//" >optionspec_no_switches <<\EOF
|some-command [options] <args>...
|
|some-command does foo and bar!
|--
EOF
ok 2 - setup optionspec-no-switches
expecting success:
sed -e "s/^|//" >optionspec_only_hidden_switches <<\EOF
|some-command [options] <args>...
|
|some-command does foo and bar!
|--
|hidden1* A hidden switch
EOF
ok 3 - setup optionspec-only-hidden-switches
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
| --aswitch help te=t contains? fl*g characters!`
| --bswitch <hint> hint has trailing tab character
| --cswitch switch has trailing tab character
| --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
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 4 - test --parseopt help output
expecting success:
sed -e "s/^|//" >expect <<\END_EXPECT &&
|cat <<\EOF
|usage: some-command [options] <args>...
|
| some-command does foo and bar!
|
|EOF
END_EXPECT
test_expect_code 129 git rev-parse --parseopt -- -h > output < optionspec_no_switches &&
test_i18ncmp expect output
ok 5 - test --parseopt help output no switches
expecting success:
sed -e "s/^|//" >expect <<\END_EXPECT &&
|cat <<\EOF
|usage: some-command [options] <args>...
|
| some-command does foo and bar!
|
|EOF
END_EXPECT
test_expect_code 129 git rev-parse --parseopt -- -h > output < optionspec_only_hidden_switches &&
test_i18ncmp expect output
ok 6 - test --parseopt help output hidden switches
expecting success:
sed -e "s/^|//" >expect <<\END_EXPECT &&
|cat <<\EOF
|usage: some-command [options] <args>...
|
| some-command does foo and bar!
|
| --hidden1 A hidden switch
|
|EOF
END_EXPECT
test_expect_code 129 git rev-parse --parseopt -- --help-all > output < optionspec_only_hidden_switches &&
test_i18ncmp expect output
ok 7 - test --parseopt help-all output hidden switches
expecting success:
sed -e "s/^|//" >expect <<\END_EXPECT &&
|error: unknown option `does-not-exist'
|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
| --aswitch help te=t contains? fl*g characters!`
| --bswitch <hint> hint has trailing tab character
| --cswitch switch has trailing tab character
| --short-hint <a> with a one symbol hint
|
|Extras
| --extra1 line above used to cause a segfault but no longer does
|
END_EXPECT
test_expect_code 129 git rev-parse --parseopt -- --does-not-exist 1>/dev/null 2>output < optionspec &&
test_i18ncmp expect output
ok 8 - test --parseopt invalid switch help output
expecting success:
cat > expect <<EOF
set -- --foo --bar 'ham' -b --aswitch -- 'arg'
EOF
ok 9 - setup expect.1
expecting success:
git rev-parse --parseopt -- --foo --bar=ham --baz --aswitch arg < optionspec > output &&
test_cmp expect output
ok 10 - test --parseopt
expecting success:
git rev-parse --parseopt -- --foo arg --bar=ham --baz --aswitch < optionspec > output &&
test_cmp expect output
ok 11 - test --parseopt with mixed options and arguments
expecting success:
cat > expect <<EOF
set -- --foo -- 'arg' '--bar=ham'
EOF
ok 12 - setup expect.2
expecting success:
git rev-parse --parseopt -- --foo -- arg --bar=ham < optionspec > output &&
test_cmp expect output
ok 13 - test --parseopt with --
expecting success:
git rev-parse --parseopt --stop-at-non-option -- --foo arg --bar=ham < optionspec > output &&
test_cmp expect output
ok 14 - test --parseopt --stop-at-non-option
expecting success:
cat > expect <<EOF
set -- --foo -- '--' 'arg' '--bar=ham'
EOF
ok 15 - setup expect.3
expecting success:
git rev-parse --parseopt --keep-dashdash -- --foo -- arg --bar=ham < optionspec > output &&
test_cmp expect output
ok 16 - test --parseopt --keep-dashdash
expecting success:
cat >expect <<EOF
set -- --foo -- '--' 'arg' '--spam=ham'
EOF
ok 17 - 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 18 - test --parseopt --keep-dashdash --stop-at-non-option with --
expecting success:
cat > expect <<EOF
set -- --foo -- 'arg' '--spam=ham'
EOF
ok 19 - 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
ok 20 - 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 21 - 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 22 - test --parseopt --stuck-long
expecting success:
cat > expect <<EOF
set -- --data='' -C --baz -- 'arg'
EOF
ok 23 - setup expect.7
expecting success:
git rev-parse --parseopt --stuck-long -- --data= arg -C -b <optionspec >output &&
test_cmp expect output
ok 24 - test --parseopt --stuck-long and empty optional argument
expecting success:
cat > expect <<EOF
set -- --data --baz -- 'arg'
EOF
ok 25 - setup expect.8
expecting success:
git rev-parse --parseopt --stuck-long -- --data arg -b <optionspec >output &&
test_cmp expect output
ok 26 - 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
ok 27 - test --parseopt --stuck-long and short option with unset optional argument
# passed all 27 test(s)
1..27
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1450-fsck.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/.git/
expecting success:
test_oid_init &&
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
[master (root-commit) 1347563] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileA
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 1347563 A
[detached HEAD c9145d6] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileB
Deleted tag 'A' (was 1347563)
Deleted tag 'B' (was c9145d6)
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_must_be_empty actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/another/.git/
[master (root-commit) 1aac250] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileC
ok 2 - loose objects borrowed from alternate are not missing
expecting success:
git fsck >actual 2>&1 &&
test_must_be_empty actual
ok 3 - HEAD is part of refs, valid objects appear valid
expecting success:
sha1_file() {
remainder=${1#??} &&
firsttwo=${1%$remainder} &&
echo ".git/objects/$firsttwo/$remainder"
} &&
remove_object() {
rm "$(sha1_file "$1")"
}
ok 4 - setup: helpers for corruption tests
expecting success:
sha=$(echo blob | git hash-object -w --stdin) &&
old=$(test_oid_to_path "$sha") &&
new=$(dirname $old)/$(test_oid ff_2) &&
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 &&
test_i18ngrep "$sha.*corrupt" out
missing blob 63ffffffffffffffffffffffffffffffffffffff
error: hash mismatch for .git/objects/63/ffffffffffffffffffffffffffffffffffffff (expected 63ffffffffffffffffffffffffffffffffffffff)
error: 63ffffffffffffffffffffffffffffffffffffff: object corrupt or missing: .git/objects/63/ffffffffffffffffffffffffffffffffffffff
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: 63ffffffffffffffffffffffffffffffffffffff: object corrupt or missing: .git/objects/63/ffffffffffffffffffffffffffffffffffffff
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 &&
test_i18ngrep "not a commit" out
error: refs/heads/invalid: not a commit
error: refs/heads/invalid: not a commit
ok 6 - branch pointing to non-commit
expecting success:
test_when_finished "mv .git/SAVED_HEAD .git/HEAD" &&
mv .git/HEAD .git/SAVED_HEAD &&
echo $ZERO_OID >.git/HEAD &&
# avoid corrupt/broken HEAD from interfering with repo discovery
test_must_fail env GIT_DIR=.git git fsck 2>out &&
cat out &&
test_i18ngrep "detached HEAD points" out
dangling commit c9145d6720f85544cc4bb6009a2e541660aa156b
error: HEAD: detached HEAD points at nothing
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 &&
test_i18ngrep "HEAD points to something strange" out
dangling commit c9145d6720f85544cc4bb6009a2e541660aa156b
error: HEAD points to something strange (refs/funny/place)
error: HEAD points to something strange (refs/funny/place)
ok 8 - HEAD link pointing at a funny place
expecting success:
test_when_finished "mv .git/SAVED_HEAD .git/HEAD" &&
test_when_finished "rm -rf .git/worktrees wt" &&
git worktree add wt &&
mv .git/HEAD .git/SAVED_HEAD &&
echo $ZERO_OID >.git/HEAD &&
# avoid corrupt/broken HEAD from interfering with repo discovery
test_must_fail git -C wt fsck 2>out &&
test_i18ngrep "main-worktree/HEAD: detached HEAD points" out
Preparing worktree (new branch 'wt')
HEAD is now at c9145d6 B
error: main-worktree/HEAD: detached HEAD points at nothing
ok 9 - HEAD link pointing at a funny object (from different wt)
expecting success:
test_when_finished "rm -rf .git/worktrees other" &&
git worktree add other &&
echo $ZERO_OID >.git/worktrees/other/HEAD &&
test_must_fail git fsck 2>out &&
test_i18ngrep "worktrees/other/HEAD: detached HEAD points" out
Preparing worktree (new branch 'other')
HEAD is now at c9145d6 B
error: worktrees/other/HEAD: detached HEAD points at nothing
ok 10 - other worktree HEAD link pointing at a funny object
expecting success:
test_when_finished "rm -rf .git/worktrees other" &&
git worktree add other &&
echo "Contents missing from repo" | git hash-object --stdin >.git/worktrees/other/HEAD &&
test_must_fail git fsck 2>out &&
test_i18ngrep "worktrees/other/HEAD: invalid sha1 pointer" out
Preparing worktree (checking out 'other')
HEAD is now at c9145d6 B
error: worktrees/other/HEAD: invalid sha1 pointer 45ea5fdbd862b3f0e413a6c2c951347efa0bb114
ok 11 - other worktree HEAD link pointing at missing object
expecting success:
test_when_finished "rm -rf .git/worktrees other" &&
git worktree add other &&
echo "ref: refs/funny/place" >.git/worktrees/other/HEAD &&
test_must_fail git fsck 2>out &&
test_i18ngrep "worktrees/other/HEAD points to something strange" out
Preparing worktree (checking out 'other')
HEAD is now at c9145d6 B
error: worktrees/other/HEAD points to something strange (refs/funny/place)
ok 12 - other worktree HEAD link pointing at a funny place
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 - 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 &&
test_i18ngrep "error in commit $new" out
error in commit af421232fcba11d582d625f9041afbe3fccc01d9: missingSpaceBeforeDate: invalid author/committer line - missing space before date
error in commit af421232fcba11d582d625f9041afbe3fccc01d9: missingSpaceBeforeDate: invalid author/committer line - missing space before date
ok 14 - 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 &&
test_i18ngrep "error in commit $new.* - bad name" out
error in commit c4b6d356e934be1cc10cb58c734fbcc5fa3a5285: badName: invalid author/committer line - bad name
error in commit c4b6d356e934be1cc10cb58c734fbcc5fa3a5285: badName: invalid author/committer line - bad name
ok 15 - 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 &&
test_i18ngrep "error in commit $new.* - missing email" out
error in commit 35319efb0a67194811f8583362d460866d58b499: missingEmail: invalid author/committer line - missing email
error in commit 35319efb0a67194811f8583362d460866d58b499: missingEmail: invalid author/committer line - missing email
ok 16 - 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 &&
test_i18ngrep "error in commit $new" out
error in commit 301380051321b3e224015eea93b0ebc550c88198: badName: invalid author/committer line - bad name
error in commit 301380051321b3e224015eea93b0ebc550c88198: badName: invalid author/committer line - bad name
ok 17 - > 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 &&
test_i18ngrep "error in commit $new.*integer overflow" out
error in commit c8453435c3587d0404f88f925c28a5944b73be1a: badDateOverflow: invalid author/committer line - date causes integer overflow
error in commit c8453435c3587d0404f88f925c28a5944b73be1a: badDateOverflow: invalid author/committer line - date causes integer overflow
ok 18 - integer overflow in timestamps is reported
expecting success:
git cat-file commit HEAD >basis &&
sed "s/author ./author Q/" <basis | q_to_nul >commit-NUL-header &&
new=$(git hash-object -t commit -w --stdin <commit-NUL-header) &&
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 &&
test_i18ngrep "error in commit $new.*unterminated header: NUL at offset" out
error in commit b70520fa0e6346c648b4013350096f65f49946eb: nulInHeader: unterminated header: NUL at offset 101
error in commit b70520fa0e6346c648b4013350096f65f49946eb: nulInHeader: unterminated header: NUL at offset 101
ok 19 - commit with NUL in header
expecting success:
test_when_finished "for i in \$T; do remove_object \$i; done" &&
T=$(
GIT_INDEX_FILE=test-index &&
export GIT_INDEX_FILE &&
rm -f test-index &&
>x &&
git add x &&
git rev-parse :x &&
T=$(git write-tree) &&
echo $T &&
(
git cat-file tree $T &&
git cat-file tree $T
) |
git hash-object -w -t tree --stdin
) &&
test_must_fail git fsck 2>out &&
test_i18ngrep "error in tree .*contains duplicate file entries" out
dangling tree 5805b676e247eb9a8046ad0c4d249cd2fb2513df
dangling tree 7997631de77b8a212b5c3e01eff5e9cf1d3c7580
error in tree 7997631de77b8a212b5c3e01eff5e9cf1d3c7580: duplicateEntries: contains duplicate file entries
ok 20 - tree object with duplicate entries
expecting success:
test_oid_cache <<-\EOF &&
junk sha1:twenty-bytes-of-junk
junk sha256:twenty-bytes-of-junk-twelve-more
EOF
test_when_finished "git update-ref -d refs/heads/wrong" &&
test_when_finished "remove_object \$tree_sha1" &&
test_when_finished "remove_object \$commit_sha1" &&
junk=$(test_oid junk) &&
tree_sha1=$(printf "100644 \0$junk" | git hash-object -t tree --stdin -w --literally) &&
commit_sha1=$(git commit-tree $tree_sha1) &&
git update-ref refs/heads/wrong $commit_sha1 &&
test_must_fail git fsck 2>out &&
test_i18ngrep "error: empty filename in tree entry" out &&
test_i18ngrep "$tree_sha1" out &&
test_i18ngrep ! "fatal: empty filename in tree entry" out
error: empty filename in tree entry
error: empty filename in tree entry
error: empty filename in tree entry
error in tree b1b45dcb979335e5f09d3b756c4639cab166c243: broken links
error in tree b1b45dcb979335e5f09d3b756c4639cab166c243: badTree: cannot be parsed as a tree
ok 21 - unparseable tree object
expecting success:
test_when_finished "remove_object \$blob" &&
test_when_finished "remove_object \$tree" &&
test_when_finished "remove_object \$commit" &&
test_when_finished "git update-ref -d refs/heads/type_mismatch" &&
blob=$(echo blob | git hash-object -w --stdin) &&
blob_bin=$(echo $blob | hex2oct) &&
tree=$(
printf "40000 dir\0${blob_bin}100644 file\0${blob_bin}" |
git hash-object -t tree --stdin -w --literally
) &&
commit=$(git commit-tree $tree) &&
git update-ref refs/heads/type_mismatch $commit &&
test_must_fail git fsck >out 2>&1 &&
test_i18ngrep "is a blob, not a tree" out &&
test_i18ngrep ! "dangling blob" out
error: object 63499e4ea8e096b831515ceb1d5a7593e4d87ae5 is a blob, not a tree
error: object 63499e4ea8e096b831515ceb1d5a7593e4d87ae5 is a blob, not a tree
ok 22 - tree entry with type mismatch
expecting success:
badoid=$(test_oid deadbeef) &&
cat >invalid-tag <<-EOF &&
object $badoid
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 &&
test_i18ngrep "broken link" out
tagged commit deadbeefdeadbeefdeadbeefdeadbeefdeadbeef (invalid) in 5248b3501322f3dd3ac19713bbbe83f70183da53
broken link from tag 5248b3501322f3dd3ac19713bbbe83f70183da53
to commit deadbeefdeadbeefdeadbeefdeadbeefdeadbeef
missing commit deadbeefdeadbeefdeadbeefdeadbeefdeadbeef
broken link from tag 5248b3501322f3dd3ac19713bbbe83f70183da53
ok 23 - tag pointing to nonexistent
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
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 24 - 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_i18ncmp expect out
tagged commit c9145d6720f85544cc4bb6009a2e541660aa156b (wrong name format) in 6d73f1b4d41e4fdac4ba717a11e7409876bb75c3
ok 25 - 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 &&
test_i18ngrep "error in tag .*: invalid author/committer" out
error in tag d037dcc834669cc0c5d3416130c899572cb1aedd: missingEmail: invalid author/committer line - missing email
ok 26 - tag with bad tagger
expecting success:
sha=$(git rev-parse HEAD) &&
q_to_nul >tag-NUL-header <<-EOF &&
object $sha
type commit
tag contains-Q-in-header
tagger T A Gger <tagger@example.com> 1234567890 -0000
This is an invalid tag.
EOF
tag=$(git hash-object --literally -t tag -w --stdin <tag-NUL-header) &&
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 &&
cat out &&
test_i18ngrep "error in tag $tag.*unterminated header: NUL at offset" out
error in tag 6251166df5b0f4b7f840db1a9af555089418c925: nulInHeader: unterminated header: NUL at offset 73
error in tag 6251166df5b0f4b7f840db1a9af555089418c925: nulInHeader: unterminated header: NUL at offset 73
ok 27 - tag with NUL in header
expecting success:
git fsck >actual 2>&1 &&
test_must_be_empty actual
ok 28 - cleaned up
expecting success:
git rev-list --verify-objects --all >/dev/null 2>out &&
test_must_be_empty out
ok 29 - rev-list --verify-objects
expecting success:
sha=$(echo blob | git hash-object -w --stdin) &&
old=$(test_oid_to_path $sha) &&
new=$(dirname $old)/$(test_oid ff_2) &&
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 &&
test_i18ngrep -q "error: hash mismatch $(dirname $new)$(test_oid ff_2)" out
error: hash mismatch 63ffffffffffffffffffffffffffffffffffffff
ok 30 - 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
error in commit 3d94ae45b63882b239b90285e1f253e2d4cd5e9f: multipleAuthors: invalid format - multiple 'author' lines
ok 31 - force fsck to ignore double author
expecting success:
(git init null-blob &&
cd null-blob &&
sha=$(printf "100644 file$_bz$_bzoid" |
git hash-object -w --stdin -t tree) &&
git fsck 2>out &&
cat out &&
test_i18ngrep "warning.*null sha1" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/null-blob/.git/
dangling tree aaf928e9279b56c88bcc8d79f881e5c820ea23e8
warning in tree aaf928e9279b56c88bcc8d79f881e5c820ea23e8: nullSha1: contains entries pointing to null sha1
notice: HEAD points to an unborn branch (master)
notice: No default references
warning in tree aaf928e9279b56c88bcc8d79f881e5c820ea23e8: nullSha1: contains entries pointing to null sha1
ok 32 - fsck notices blob entry pointing to null sha1
expecting success:
(git init null-commit &&
cd null-commit &&
sha=$(printf "160000 submodule$_bz$_bzoid" |
git hash-object -w --stdin -t tree) &&
git fsck 2>out &&
cat out &&
test_i18ngrep "warning.*null sha1" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/null-commit/.git/
dangling tree f87f3eabd15018382578c00e3a71a46c842e17e6
warning in tree f87f3eabd15018382578c00e3a71a46c842e17e6: nullSha1: contains entries pointing to null sha1
notice: HEAD points to an unborn branch (master)
notice: No default references
warning in tree f87f3eabd15018382578c00e3a71a46c842e17e6: nullSha1: contains entries pointing to null sha1
ok 33 - 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dot-blob/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree 4d6a3deda84474ed5f701962ea9bf83c5fe08185
warning in tree 4d6a3deda84474ed5f701962ea9bf83c5fe08185: hasDot: contains '.'
warning in tree 4d6a3deda84474ed5f701962ea9bf83c5fe08185: hasDot: contains '.'
ok 34 - 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dot-tree/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree 8984d55df404e56c99a9c5a2e5a168084a913e8f
warning in tree 8984d55df404e56c99a9c5a2e5a168084a913e8f: hasDot: contains '.'
warning in tree 8984d55df404e56c99a9c5a2e5a168084a913e8f: hasDot: contains '.'
ok 35 - 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dotdot-blob/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree 879560d9e3297f45ca9c25d4eea563f8dd179a32
warning in tree 879560d9e3297f45ca9c25d4eea563f8dd179a32: hasDotdot: contains '..'
warning in tree 879560d9e3297f45ca9c25d4eea563f8dd179a32: hasDotdot: contains '..'
ok 36 - 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dotdot-tree/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree e704ff9811f799e752c8894dbc145bc74e4561fa
warning in tree e704ff9811f799e752c8894dbc145bc74e4561fa: hasDotdot: contains '..'
warning in tree e704ff9811f799e752c8894dbc145bc74e4561fa: hasDotdot: contains '..'
ok 37 - 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dotgit-blob/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree 8ac5f64528d35de17a03755d2f3387af1de58b5a
warning in tree 8ac5f64528d35de17a03755d2f3387af1de58b5a: hasDotgit: contains '.git'
warning in tree 8ac5f64528d35de17a03755d2f3387af1de58b5a: hasDotgit: contains '.git'
ok 38 - 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dotgit-tree/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree 69237360529ca48e6b6c1af14e753faabe339fb7
warning in tree 69237360529ca48e6b6c1af14e753faabe339fb7: hasDotgit: contains '.git'
warning in tree 69237360529ca48e6b6c1af14e753faabe339fb7: hasDotgit: contains '.git'
ok 39 - 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dotgit-case-blob/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree 56bac0d7a0a3c1451521352e3d40117e5ffc602e
warning in tree 56bac0d7a0a3c1451521352e3d40117e5ffc602e: hasDotgit: contains '.git'
warning in tree 56bac0d7a0a3c1451521352e3d40117e5ffc602e: 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dotgit-case-tree/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree 968a2dfde1e164e0513456c00ef656b2497434a3
warning in tree 968a2dfde1e164e0513456c00ef656b2497434a3: hasDotgit: contains '.git'
warning in tree 968a2dfde1e164e0513456c00ef656b2497434a3: 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dotgit-unicode-blob/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree 2b65491a1b39699fb2bffda8e997c85fcb9c7beb
warning in tree 2b65491a1b39699fb2bffda8e997c85fcb9c7beb: hasDotgit: contains '.git'
warning in tree 2b65491a1b39699fb2bffda8e997c85fcb9c7beb: hasDotgit: contains '.git'
ok 42 - 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dotgit-unicode-tree/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree 6a547d921721f1cf91601a53fcc7aae232947d23
warning in tree 6a547d921721f1cf91601a53fcc7aae232947d23: hasDotgit: contains '.git'
warning in tree 6a547d921721f1cf91601a53fcc7aae232947d23: hasDotgit: contains '.git'
ok 43 - 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dotgit-case2-blob/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree 3e29dd65f814deffead951c60da749fdf8a668c8
warning in tree 3e29dd65f814deffead951c60da749fdf8a668c8: hasDotgit: contains '.git'
warning in tree 3e29dd65f814deffead951c60da749fdf8a668c8: hasDotgit: contains '.git'
ok 44 - 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dotgit-case2-tree/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree 50c7c9624762f2fe0d4efe5cba98835f58822ef4
warning in tree 50c7c9624762f2fe0d4efe5cba98835f58822ef4: hasDotgit: contains '.git'
warning in tree 50c7c9624762f2fe0d4efe5cba98835f58822ef4: hasDotgit: contains '.git'
ok 45 - 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/git-tilde1-blob/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree 1206e1b64fcedc2a9e7b8195c1c4c1a278285b20
warning in tree 1206e1b64fcedc2a9e7b8195c1c4c1a278285b20: hasDotgit: contains '.git'
warning in tree 1206e1b64fcedc2a9e7b8195c1c4c1a278285b20: hasDotgit: contains '.git'
ok 46 - 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/git-tilde1-tree/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree 06f99accfb778f3318c72f3ae1c809cca146d27c
warning in tree 06f99accfb778f3318c72f3ae1c809cca146d27c: hasDotgit: contains '.git'
warning in tree 06f99accfb778f3318c72f3ae1c809cca146d27c: hasDotgit: contains '.git'
ok 47 - 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dotgitdot-blob/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree 08554698725ae2bc2c2ae0172779111c62bda7a2
warning in tree 08554698725ae2bc2c2ae0172779111c62bda7a2: hasDotgit: contains '.git'
warning in tree 08554698725ae2bc2c2ae0172779111c62bda7a2: hasDotgit: contains '.git'
ok 48 - 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dotgitdot-tree/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree 4d7df7e65b79aeef4640dbfba95705b94a2bc266
warning in tree 4d7df7e65b79aeef4640dbfba95705b94a2bc266: hasDotgit: contains '.git'
warning in tree 4d7df7e65b79aeef4640dbfba95705b94a2bc266: hasDotgit: contains '.git'
ok 49 - 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dot-backslash-case-blob/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree 4447c608c557aa9e2d0d226c7af1f06937133ea1
warning in tree 4447c608c557aa9e2d0d226c7af1f06937133ea1: hasDotgit: contains '.git'
warning in tree 4447c608c557aa9e2d0d226c7af1f06937133ea1: hasDotgit: contains '.git'
ok 50 - 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dot-backslash-case-tree/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree a8562dc6d26106f039fc8af6b2aa6fed2b1e14d4
warning in tree a8562dc6d26106f039fc8af6b2aa6fed2b1e14d4: hasDotgit: contains '.git'
warning in tree a8562dc6d26106f039fc8af6b2aa6fed2b1e14d4: hasDotgit: contains '.git'
ok 51 - 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dotgit-case-backslash-blob/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree 707c253cde8e3742e9f02a3cf02fdc4ca0f55652
warning in tree 707c253cde8e3742e9f02a3cf02fdc4ca0f55652: hasDotgit: contains '.git'
warning in tree 707c253cde8e3742e9f02a3cf02fdc4ca0f55652: hasDotgit: contains '.git'
ok 52 - 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 &&
test_i18ngrep "warning.*tree $bad_tree" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dotgit-case-backslash-tree/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree caa586f8ddde64c3fc9157a3a262c9bd6a6a41ff
warning in tree caa586f8ddde64c3fc9157a3a262c9bd6a6a41ff: hasDotgit: contains '.git'
warning in tree caa586f8ddde64c3fc9157a3a262c9bd6a6a41ff: hasDotgit: contains '.git'
ok 53 - 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
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/not-dotgit/.git/
[master (root-commit) ebd6d19] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
dangling tree b6cf3d0dca284724c6c6a7005056d573f86157d7
ok 54 - fsck allows .Ňit
expecting success:
rm -fr nul-in-commit &&
git init nul-in-commit &&
(
cd nul-in-commit &&
git commit --allow-empty -m "initial commitQNUL after message" &&
git cat-file commit HEAD >original &&
q_to_nul <original >munged &&
git hash-object -w -t commit --stdin <munged >name &&
git branch bad $(cat name) &&
test_must_fail git -c fsck.nulInCommit=error fsck 2>warn.1 &&
test_i18ngrep nulInCommit warn.1 &&
git fsck 2>warn.2 &&
test_i18ngrep nulInCommit warn.2
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/nul-in-commit/.git/
[master (root-commit) c31a7f2] initial commitQNUL after message
Author: A U Thor <author@example.com>
error in commit f2f2305a657f7e4cfa7cd358e43c37ab0394720d: nulInCommit: NUL byte in the commit object body
warning in commit f2f2305a657f7e4cfa7cd358e43c37ab0394720d: nulInCommit: NUL byte in the commit object body
ok 55 - NUL in commit
expecting success:
create_repo_missing HEAD:subdir/file &&
test_must_fail git -C missing fsck
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/missing/.git/
[master (root-commit) d38f542] one
Author: A U Thor <author@example.com>
[master ca32bda] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subdir/file
missing blob d95f3ad14dee633a758d2e331151e950dd13e4ed
ok 56 - fsck notices missing blob
expecting success:
create_repo_missing HEAD:subdir &&
test_must_fail git -C missing fsck
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/missing/.git/
[master (root-commit) d38f542] one
Author: A U Thor <author@example.com>
[master ca32bda] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subdir/file
error: 07753f428765ac1afe2020b24e40785869bd4a85: invalid sha1 pointer in cache-tree
broken link from tree 5f9d5fe4279246e5b2ddcd446efc2aed53a52304
to tree 07753f428765ac1afe2020b24e40785869bd4a85
missing tree 07753f428765ac1afe2020b24e40785869bd4a85
ok 57 - fsck notices missing subtree
expecting success:
create_repo_missing HEAD^{tree} &&
test_must_fail git -C missing fsck
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/missing/.git/
[master (root-commit) d38f542] one
Author: A U Thor <author@example.com>
[master ca32bda] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subdir/file
error: 5f9d5fe4279246e5b2ddcd446efc2aed53a52304: invalid sha1 pointer in cache-tree
broken link from commit ca32bdaaf4ee9eab00bafa6471c9a2fa98fc42c3
to tree 5f9d5fe4279246e5b2ddcd446efc2aed53a52304
dangling tree 07753f428765ac1afe2020b24e40785869bd4a85
missing tree 5f9d5fe4279246e5b2ddcd446efc2aed53a52304
ok 58 - fsck notices missing root tree
expecting success:
create_repo_missing HEAD^ &&
test_must_fail git -C missing fsck
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/missing/.git/
[master (root-commit) d38f542] one
Author: A U Thor <author@example.com>
[master ca32bda] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subdir/file
error: HEAD: invalid reflog entry d38f542f2d868bcbbb09173528a3bb403f53a0f0
error: HEAD: invalid reflog entry d38f542f2d868bcbbb09173528a3bb403f53a0f0
error: refs/heads/master: invalid reflog entry d38f542f2d868bcbbb09173528a3bb403f53a0f0
error: refs/heads/master: invalid reflog entry d38f542f2d868bcbbb09173528a3bb403f53a0f0
broken link from commit ca32bdaaf4ee9eab00bafa6471c9a2fa98fc42c3
to commit d38f542f2d868bcbbb09173528a3bb403f53a0f0
dangling tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
missing commit d38f542f2d868bcbbb09173528a3bb403f53a0f0
ok 59 - fsck notices missing parent
expecting success:
create_repo_missing tag^{blob} &&
test_must_fail git -C missing fsck
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/missing/.git/
[master (root-commit) d38f542] one
Author: A U Thor <author@example.com>
[master ca32bda] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subdir/file
broken link from tag 7c115056e13b1f41142fe9e6f6cb98a1c077facd
to blob c21c9352f7526e9576892a6631e0e8cf1fccd34d
missing blob c21c9352f7526e9576892a6631e0e8cf1fccd34d
ok 60 - 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.t1450-fsck/missing/.git/
[master (root-commit) d38f542] one
Author: A U Thor <author@example.com>
[master ca32bda] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subdir/file
error: refs/heads/master: invalid sha1 pointer ca32bdaaf4ee9eab00bafa6471c9a2fa98fc42c3
error: HEAD: invalid sha1 pointer ca32bdaaf4ee9eab00bafa6471c9a2fa98fc42c3
error: HEAD: invalid reflog entry ca32bdaaf4ee9eab00bafa6471c9a2fa98fc42c3
error: refs/heads/master: invalid reflog entry ca32bdaaf4ee9eab00bafa6471c9a2fa98fc42c3
ok 61 - fsck notices ref pointing to missing commit
expecting success:
create_repo_missing tag &&
test_must_fail git -C missing fsck
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/missing/.git/
[master (root-commit) d38f542] one
Author: A U Thor <author@example.com>
[master ca32bda] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subdir/file
error: refs/tags/tag: invalid sha1 pointer 7c115056e13b1f41142fe9e6f6cb98a1c077facd
dangling blob c21c9352f7526e9576892a6631e0e8cf1fccd34d
ok 62 - fsck notices ref pointing to missing tag
expecting success:
rm -rf connectivity-only &&
git init connectivity-only &&
(
cd connectivity-only &&
touch empty &&
git add empty &&
test_commit empty &&
# Drop the index now; we want to be sure that we
# recursively notice the broken objects
# because they are reachable from refs, not because
# they are in the index.
rm -f .git/index &&
# corrupt the blob, but in a way that we can still identify
# its type. That lets us see that --connectivity-only is
# not actually looking at the contents, but leaves it
# free to examine the type if it chooses.
empty=.git/objects/$(test_oid_to_path $EMPTY_BLOB) &&
blob=$(echo unrelated | git hash-object -w --stdin) &&
mv -f $(sha1_file $blob) $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
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/connectivity-only/.git/
[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
error: hash mismatch for .git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 (expected e69de29bb2d1d6434b8b29ae775ad8c2e48c5391)
error: e69de29bb2d1d6434b8b29ae775ad8c2e48c5391: object corrupt or missing: .git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
missing blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
error: inflate: data stream error (incorrect header check)
error: unable to unpack 0d3d3508cb204b9201d016862e6025a49e8c01d6 header
fatal: loose object 0d3d3508cb204b9201d016862e6025a49e8c01d6 (stored in .git/objects/0d/3d3508cb204b9201d016862e6025a49e8c01d6) is corrupt
ok 63 - fsck --connectivity-only
expecting success:
rm -rf connectivity-only &&
git init connectivity-only &&
(
cd connectivity-only &&
test_commit foo &&
rm -f .git/index &&
tree=$(git rev-parse HEAD^{tree}) &&
remove_object $(git rev-parse HEAD:foo.t) &&
test_must_fail git fsck --connectivity-only $tree
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/connectivity-only/.git/
[master (root-commit) 31f3b95] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
broken link from tree 64fd3796c57084e7b8cbae358ce37970b8e954f6
to blob 257cc5642cb1a054f08cc83f2d943e56fd3ebe99
missing blob 257cc5642cb1a054f08cc83f2d943e56fd3ebe99
dangling commit 31f3b953b325df75c7b6fbf854b59ac67382ac3b
ok 64 - fsck --connectivity-only with explicit head
expecting success:
rm -rf name-objects &&
git init name-objects &&
(
cd name-objects &&
test_commit julius caesar.t &&
test_commit augustus &&
test_commit caesar &&
remove_object $(git rev-parse julius:caesar.t) &&
test_must_fail git fsck --name-objects >out &&
tree=$(git rev-parse --verify julius:) &&
test_i18ngrep -E "$tree \((refs/heads/master|HEAD)@\{[0-9]*\}:" out
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/name-objects/.git/
[master (root-commit) 6ab43a8] julius
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 caesar.t
[master 14a9c9c] augustus
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 augustus.t
[master 2d3dc47] caesar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
broken link from tree c2fab98f409a47394d992eca10a20e0b22377c0c (refs/heads/master@{1112912113}:)
ok 65 - fsck --name-objects
expecting success:
test_when_finished "rm -rf alt.git .git/objects/info/alternates" &&
name=$(test_oid numeric) &&
path=$(test_oid_to_path "$name") &&
git init --bare alt.git &&
echo "../../alt.git/objects" >.git/objects/info/alternates &&
mkdir alt.git/objects/$(dirname $path) &&
>alt.git/objects/$(dirname $path)/$(basename $path) &&
test_must_fail git fsck >out 2>&1 &&
test_i18ngrep alt.git out
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/alt.git/
error: object file /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/alt.git/objects/01/23456789012345678901234567890123456789 is empty
error: unable to mmap /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/alt.git/objects/01/23456789012345678901234567890123456789: No such file or directory
error: 0123456789012345678901234567890123456789: object corrupt or missing: /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/alt.git/objects/01/23456789012345678901234567890123456789
ok 66 - alternate objects are correctly blamed
expecting success:
git cat-file commit HEAD >basis &&
sed "s/</one/" basis >one &&
sed "s/</foo/" basis >two &&
one=$(git hash-object -t commit -w one) &&
two=$(git hash-object -t commit -w two) &&
pack=$(
{
echo $one &&
echo $two
} | git pack-objects .git/objects/pack/pack
) &&
test_when_finished "rm -f .git/objects/pack/pack-$pack.*" &&
remove_object $one &&
remove_object $two &&
test_must_fail git fsck 2>out &&
test_i18ngrep "error in commit $one.* - bad name" out &&
test_i18ngrep "error in commit $two.* - bad name" out &&
! grep corrupt out
dangling commit a55646b2b4c741ed105e2e5c54365a5b4051c7e2
dangling commit e705fceb9d8aec1503002ea31f4f68ea707e88ef
error in commit e705fceb9d8aec1503002ea31f4f68ea707e88ef: badName: invalid author/committer line - bad name
error in commit a55646b2b4c741ed105e2e5c54365a5b4051c7e2: badName: invalid author/committer line - bad name
ok 67 - fsck errors in packed objects
expecting success:
hsh=$(git commit-tree -m mycommit HEAD^{tree}) &&
pack=$(echo $hsh | git pack-objects .git/objects/pack/pack) &&
# Corrupt the first byte of the first object. (It contains 3 type bits,
# at least one of which is not zero, so setting the first byte to 0 is
# sufficient.)
chmod a+w .git/objects/pack/pack-$pack.pack &&
printf 0 | dd of=.git/objects/pack/pack-$pack.pack bs=1 conv=notrunc seek=12 &&
test_when_finished "rm -f .git/objects/pack/pack-$pack.*" &&
remove_object $hsh &&
test_must_fail git fsck 2>out &&
test_i18ngrep "checksum mismatch" out
1+0 records in
1+0 records out
1 byte copied, 0.000396565 s, 2.5 kB/s
error: .git/objects/pack/pack-8be9f6a4139bcddd74c3d2ed343bb71e87863c4b.pack pack checksum mismatch
ok 68 - fsck fails on corrupt packfile
expecting success:
rm -rf broken-duplicate &&
git init broken-duplicate &&
(
cd broken-duplicate &&
test_commit duplicate &&
# no "-d" here, so we end up with duplicates
git repack &&
# now corrupt the loose copy
file=$(sha1_file "$(git rev-parse HEAD)") &&
rm "$file" &&
echo broken >"$file" &&
test_must_fail git fsck
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/broken-duplicate/.git/
[master (root-commit) d19e0e2] duplicate
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 duplicate.t
error: inflate: data stream error (incorrect header check)
error: unable to unpack header of .git/objects/d1/9e0e27f1e3e1ac93ebc6183333db3c4d9b00bd
error: d19e0e27f1e3e1ac93ebc6183333db3c4d9b00bd: object corrupt or missing: .git/objects/d1/9e0e27f1e3e1ac93ebc6183333db3c4d9b00bd
ok 69 - fsck finds problems in duplicate loose objects
expecting success:
git cat-file commit HEAD >basis &&
echo bump-commit-sha1 >>basis &&
commit=$(git hash-object -w -t commit basis) &&
file=$(sha1_file $commit) &&
test_when_finished "remove_object $commit" &&
chmod +w "$file" &&
echo garbage >>"$file" &&
test_must_fail git fsck 2>out &&
test_i18ngrep "garbage.*$commit" out
error: garbage at end of loose object '59ac8713639e31797addb7a886b8f5f6637bda3c'
ok 70 - fsck detects trailing loose garbage (commit)
expecting success:
blob=$(echo trailing | git hash-object -w --stdin) &&
file=$(sha1_file $blob) &&
test_when_finished "remove_object $blob" &&
chmod +w "$file" &&
echo garbage >>"$file" &&
test_must_fail git -c core.bigfilethreshold=5 fsck 2>out &&
test_i18ngrep "garbage.*$blob" out
error: garbage at end of loose object '1e285548b47be8577f0549b6ebcecb242e692df3'
ok 71 - fsck detects trailing loose garbage (large blob)
expecting success:
# make it big enough that we know we will truncate in the data
# portion, not the header
test-tool genrandom truncate 4096 >file &&
blob=$(git hash-object -w file) &&
file=$(sha1_file $blob) &&
test_when_finished "remove_object $blob" &&
test_copy_bytes 1024 <"$file" >tmp &&
rm "$file" &&
mv -f tmp "$file" &&
# check both regular and streaming code paths
test_must_fail git fsck 2>out &&
test_i18ngrep corrupt.*$blob out &&
test_must_fail git -c core.bigfilethreshold=128 fsck 2>out &&
test_i18ngrep corrupt.*$blob out
error: corrupt loose object 'a56f9fb3e06dcfb3e5088f319ee1d4ccd1e05098'
error: corrupt loose object 'a56f9fb3e06dcfb3e5088f319ee1d4ccd1e05098'
ok 72 - fsck detects truncated loose object
expecting success:
git init dangling &&
(
cd dangling &&
blob=$(echo not-dangling | git hash-object -w --stdin) &&
dblob=$(echo dangling | git hash-object -w --stdin) &&
tree=$(printf "100644 blob %s\t%s\n" $blob one | git mktree) &&
dtree=$(printf "100644 blob %s\t%s\n" $blob two | git mktree) &&
commit=$(git commit-tree $tree) &&
dcommit=$(git commit-tree -p $commit $tree) &&
cat >expect <<-EOF
dangling blob $dblob
dangling commit $dcommit
dangling tree $dtree
EOF
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1450-fsck/dangling/.git/
ok 73 - create dangling-object repository
expecting success:
(
cd dangling &&
git fsck >actual &&
# the output order is non-deterministic, as it comes from a hash
sort <actual >actual.sorted &&
test_i18ncmp expect actual.sorted
)
notice: HEAD points to an unborn branch (master)
notice: No default references
ok 74 - fsck notices dangling objects
expecting success:
(
cd dangling &&
git fsck --connectivity-only >actual &&
# the output order is non-deterministic, as it comes from a hash
sort <actual >actual.sorted &&
test_i18ncmp expect actual.sorted
)
notice: HEAD points to an unborn branch (master)
notice: No default references
ok 75 - fsck --connectivity-only notices dangling objects
expecting success:
test_must_fail git fsck bogus &&
test_must_fail git fsck $ZERO_OID
error: invalid parameter: expected sha1, got 'bogus'
dangling commit c9145d6720f85544cc4bb6009a2e541660aa156b
error: 0000000000000000000000000000000000000000: object missing
dangling commit c9145d6720f85544cc4bb6009a2e541660aa156b
ok 76 - fsck $name notices bogus $name
expecting success:
# set up a case that will cause a reachability complaint
echo to-be-deleted >foo &&
git add foo &&
blob=$(git rev-parse :foo) &&
test_when_finished "git rm --cached foo" &&
remove_object $blob &&
test_must_fail git fsck $ZERO_OID >out 2>&1 &&
! grep $blob out
rm 'foo'
ok 77 - bogus head does not fallback to all heads
expecting success:
cp .git/index .git/index.backup &&
test_when_finished "mv .git/index.backup .git/index" &&
corrupt_index_checksum &&
test_must_fail git fsck --cache 2>errors &&
test_i18ngrep "bad index file" errors
error: bad index file sha1 signature
ok 78 - detect corrupt index file in fsck
# passed all 78 test(s)
1..78
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1503-rev-parse-verify.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1503-rev-parse-verify/.git/
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)
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 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
fatal: Needed a single revision
fatal: Needed a single revision
fatal: Needed a single revision
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
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
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 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
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)"
fatal: Needed a single revision
fatal: Needed a single revision
fatal: Needed a single revision
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
32a594a3fdac2d57cf6d02987e30eec68511498c
32a594a3fdac2d57cf6d02987e30eec68511498c
32a594a3fdac2d57cf6d02987e30eec68511498c
32a594a3fdac2d57cf6d02987e30eec68511498c
32a594a3fdac2d57cf6d02987e30eec68511498c
fatal: Needed a single revision
fatal: Needed a single revision
fatal: Needed a single revision
fatal: Needed a single revision
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}
32a594a3fdac2d57cf6d02987e30eec68511498c
3de952f2416b6084f557ec417709eac740c6818c
88bcdc1839f0ad191ffdd65cae2a2a862d682151
fatal: Log for 'master' only has 4 entries.
fatal: Log for 'master' only has 4 entries.
ok 10 - master@{n} for various n
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:
ln -s does-not-exist .git/refs/heads/broken &&
test_must_fail git rev-parse --verify broken
fatal: Needed a single revision
ok 11 - ref resolution not confused by broken symlinks
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1505-rev-parse-last.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1505-rev-parse-last/.git/
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
[master (root-commit) 5917f51] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1
[master 0d0470e] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2
[master fd8048a] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 3
Switched to branch 'side'
[side 6440aa0] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 4
Merging:
6440aa0 4
virtual master
found 1 common ancestor:
5917f51 1
Merge made by the 'recursive' strategy.
2 | 1 +
3 | 1 +
2 files changed, 2 insertions(+)
create mode 100644 2
create mode 100644 3
Switched to branch 'master'
ok 1 - setup
expecting success:
test_cmp_rev side @{-1}
ok 2 - @{-1} works
expecting success:
test_cmp_rev side~2 @{-1}~2
ok 3 - @{-1}~2 works
expecting success:
test_cmp_rev side^2 @{-1}^2
ok 4 - @{-1}^2 works
expecting success:
test_cmp_rev side@{1} @{-1}@{1}
ok 5 - @{-1}@{1} works
expecting success:
test_cmp_rev master @{-2}
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
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1504-ceiling-dirs.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1504-ceiling-dirs/.git/
expecting success: test '' = "$(git rev-parse --show-prefix)"
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 3 - ceil_at_parent
expecting success: test '' = "$(git rev-parse --show-prefix)"
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)"
ok 6 - ceil_at_trash_slash
expecting success: test '' = "$(git rev-parse --show-prefix)"
ok 7 - ceil_at_sub
expecting success: test '' = "$(git rev-parse --show-prefix)"
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
)
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
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
fatal: not a git repository (or any of the parent directories): .git
ok 13 - subdir_ceil_at_sub: 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 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
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)"
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)"
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)"
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)"
ok 24 - subdir_ceil_at_sub_di_slash
expecting success: test 'sub/dir/' = "$(git rev-parse --show-prefix)"
ok 25 - subdir_ceil_at_subdi
expecting success: test 'sub/dir/' = "$(git rev-parse --show-prefix)"
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
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
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)"
ok 30 - git_dir_specified
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)"
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
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
fatal: not a git repository (or any of the parent directories): .git
ok 35 - sd_ceil_at_s: 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 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 38 - sd_ceil_at_sd_slash
expecting success: test 's/d/' = "$(git rev-parse --show-prefix)"
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 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 44 - sd_ceil_at_sdi_slash
# passed all 44 test(s)
1..44
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1506-rev-parse-diagnosis.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
[master (root-commit) cd4ae90] 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) )
f719efd430d52bcfc8566a43b2eb655688d38871
8510665149157c2bc901848c3e0b746954e9cbd9
2bdf67abb163a4ffb2d7f3f0880c9fe5068ce782
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
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
ok 4 - correct relative file objects (1)
expecting success:
(
cd subdir &&
git rev-parse HEAD:../file.txt >result &&
test_cmp ../expected result
)
ok 5 - correct relative file objects (2)
expecting success:
(
cd subdir &&
git rev-parse HEAD:../subdir/../file.txt >result &&
test_cmp ../expected result
)
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
)
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
)
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
)
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 &&
test_i18ngrep "unknown revision or path not in the working tree." error
foobar:file.txt
fatal: Invalid object name 'foobar'.
foobar
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
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 )
HEAD:nothing.txt
fatal: Path 'nothing.txt' does not exist in 'HEAD'
HEAD:index-only.txt
fatal: Path 'index-only.txt' exists on disk, but not in 'HEAD'.
HEAD:file2.txt
ok 11 - incorrect file in sha1:path
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).
:1:nothing.txt
fatal: Path 'nothing.txt' does not exist (neither on disk nor in the index).
:1:file.txt
:1:file.txt
:file2.txt
:2:file2.txt
:disk-only.txt
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
fatal: Log for 'master' only has 1 entries.
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
)
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)" &&
test_i18ngrep "outside repository" error
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
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 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
fatal: HEAD:file.txt: no such path in the working tree.
ok 17 - <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
ok 18 - dotdot is not an empty set
expecting success:
test_must_fail git rev-parse foobar -- 2>stderr &&
test_i18ngrep "bad revision" stderr
fatal: bad revision 'foobar'
ok 19 - 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
fatal: bad revision 'foobar'
ok 20 - 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
ok 21 - arg before dashdash must be a revision (ambiguous)
# passed all 21 test(s)
1..21
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1508-at-combinations.sh ***
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 &&
if test_have_prereq !MINGW
then
git checkout -b @/at-test
fi &&
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) 8ff5a25] master-one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 master-one.t
[master 8164ab4] master-two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 master-two.t
Switched to a new branch 'upstream-branch'
[upstream-branch 101729d] upstream-one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 upstream-one.t
[upstream-branch 77f4b7f] upstream-two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 upstream-two.t
Switched to a new branch '@/at-test'
Switched to a new branch '@@/at-test'
Switched to a new branch '@at-test'
Switched to a new branch 'old-branch'
[old-branch 4e4e7fa] old-one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 old-one.t
[old-branch 3273d4d] old-two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 old-two.t
Switched to a new branch 'new-branch'
[new-branch e49ce93] new-one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 new-one.t
[new-branch c493e4b] new-two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 new-two.t
Branch 'old-branch' set up to track local branch 'master'.
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
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
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 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 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
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
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
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
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
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 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
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 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 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
ok 17 - @@/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
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
ok 19 - @at-test = refs/heads/@at-test
expecting success:
test_must_fail git rev-parse --verify '@{u}@{-1}'
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}'
fatal: Log for 'new-branch' only has 3 entries.
ok 26 - @{3} is nonsensical
expecting success:
git checkout old-branch
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
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
ok 30 - @{1} = old-one
expecting success:
echo content >normal &&
echo content >fun@ny &&
git add normal fun@ny &&
git commit -m "funny path"
[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
ok 33 - @:fun@ny = content
# passed all 33 test(s)
1..33
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1507-rev-parse-upstream.sh ***
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
)
[master (root-commit) d0dcf97] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1.t
Switched to a new branch 'side'
[side 82335b2] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2.t
Switched to branch 'master'
Cloning into 'clone'...
done.
[master 8f489d0] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 3.t
[master 6efda21] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 4.t
Branch 'my-side' set up to track remote branch 'side' from 'origin'.
Branch 'local-master' set up to track local branch 'master'.
Branch 'fun@ny' set up to track remote branch 'side' from 'origin'.
Branch '@funny' set up to track remote branch 'side' from 'origin'.
Branch 'funny@' set up to track remote branch 'side' from 'origin'.
From ..
* [new branch] master -> master-only/master
* [new tag] 3 -> 3
ok 1 - setup
expecting success:
test refs/remotes/origin/master = "$(full_name @{upstream})" &&
test refs/remotes/origin/master = "$(full_name @{UPSTREAM})" &&
test refs/remotes/origin/master = "$(full_name @{UpSTReam})"
ok 2 - @{upstream} resolves to correct full name
expecting success:
test refs/remotes/origin/master = "$(full_name @{u})" &&
test refs/remotes/origin/master = "$(full_name @{U})"
ok 3 - @{u} resolves to correct full name
expecting success:
test refs/remotes/origin/side = "$(full_name my-side@{u})"
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 &&
full_name fun@ny@{U} >actual &&
test_cmp expect actual
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
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
ok 7 - upstream of branch with @ at end
expecting success:
test_must_fail full_name refs/heads/my-side@{upstream}
fatal: no such branch: 'refs/heads/my-side'
ok 8 - refs/heads/my-side@{upstream} does not resolve to my-side{upstream}
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})"
Switched to branch 'side'
[side e3f9627] 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 5.t
From /<<PKGBUILDDIR>>/t/trash directory.t1507-rev-parse-upstream/.
d0dcf97..8f489d0 master -> origin/master
82335b2..e3f9627 side -> origin/side
* [new tag] 5 -> 5
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}
fatal: no such branch: 'non-tracking'
Switched to a new branch 'non-tracking'
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}) &&
test 5 = $(commit_subject my-side@{U}@{1})
[side 8bf5882] 6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 6.t
From /<<PKGBUILDDIR>>/t/trash directory.t1507-rev-parse-upstream/.
e3f9627..8bf5882 side -> origin/side
* [new tag] 6 -> 6
ok 11 - <branch>@{u}@{1} resolves correctly
expecting success:
git checkout HEAD^0 &&
test_must_fail git rev-parse @{u} &&
test_must_fail git rev-parse @{U}
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8bf5882 6
fatal: HEAD does not point to a branch
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'.
ok 13 - checkout -b new my-side@{u} forks from the same
expecting success:
(
cd clone &&
git checkout master &&
test_might_fail git branch -D new &&
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
)
Switched to branch 'master'
Your branch and 'origin/master' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Deleted branch new (was 8bf5882).
Branch 'new' set up to track remote branch 'side' from 'origin'.
Merge made by the 'ours' strategy.
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 &&
test_must_be_empty actual
Previous HEAD position was 8bf5882 6
Switched to a new branch 'other'
Branch 'other' set up to track local branch 'master'.
Deleted branch master (was 8f489d0).
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 'another'
Branch 'another' set up to track local branch 'master'.
Switched to branch 'master'
ok 16 - checkout other@{u}
expecting success:
test refs/heads/master = "$(full_name local-master@{u})"
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} &&
test_i18ncmp expect error
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
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
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} &&
test_i18ncmp expect error
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
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8f489d0 3
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} &&
test_i18ncmp expect error
ok 22 - branch@{u} error message if upstream branch not fetched
expecting success:
(
cd clone &&
git checkout local-master &&
git pull
)
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)
From .
* branch master -> FETCH_HEAD
Updating 6efda21..ac35135
Fast-forward
ok 23 - pull works when tracking a local branch
expecting success:
test refs/heads/master = "$(full_name @{u})"
ok 24 - @{u} works when tracking a local branch
expecting success:
git log -1 -g other@{u} >actual &&
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 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
[detached HEAD eae0df2] funny reflog file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 @{yesterday}
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
[detached HEAD c358789] funny upstream file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 @{upstream}
ok 28 - @{upstream}-parsing does not look beyond colon
# passed all 28 test(s)
1..28
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1509-root-work-tree.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1509-root-work-tree/.git/
1..0 # SKIP Test requiring writable / skipped. Read this test if you want to run it
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1511-rev-parse-caret.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1511-rev-parse-caret/.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 &&
git branch modref &&
echo changed! >>a-blob &&
git add -u &&
git commit -m !Exp &&
git branch expref &&
echo changed >>a-blob &&
git add -u &&
git commit -m Changed &&
echo changed-again >>a-blob &&
git add -u &&
git commit -m Changed-again
[master (root-commit) 6701aff] 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
Already on 'master'
[master 3c56c0d] Modified
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master c413291] !Exp
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 464ab05] Changed
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 56df351] Changed-again
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}
fatal: ambiguous argument 'ref^{non-existent}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'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 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}
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>...]'
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}
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}
ok 6 - ref^{tag}
expecting success:
git rev-parse master >expected &&
git rev-parse master^{/.} >actual &&
test_cmp expected actual
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
ok 9 - ref^{/Initial}
expecting success:
test_must_fail git rev-parse master^{/!Exp}
fatal: ambiguous argument 'master^{/!Exp}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
master^{/!Exp}
ok 10 - ref^{/!Exp}
expecting success:
test_must_fail git rev-parse master^{/!}
fatal: ambiguous argument 'master^{/!}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
master^{/!}
ok 11 - ref^{/!}
expecting success:
git rev-parse expref >expected &&
git rev-parse master^{/!!Exp} >actual &&
test_cmp expected actual
ok 12 - ref^{/!!Exp}
expecting success:
test_must_fail git rev-parse master^{/!-}
fatal: ambiguous argument 'master^{/!-}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
master^{/!-}
ok 13 - ref^{/!-}
expecting success:
test_must_fail git rev-parse master^{/!-.}
fatal: ambiguous argument 'master^{/!-.}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
master^{/!-.}
ok 14 - ref^{/!-.}
expecting success:
git rev-parse master >expected &&
git rev-parse master^{/!-non-existent} >actual &&
test_cmp expected actual
ok 15 - ref^{/!-non-existent}
expecting success:
git rev-parse expref >expected &&
git rev-parse master^{/!-Changed} >actual &&
test_cmp expected actual
ok 16 - ref^{/!-Changed}
expecting success:
git rev-parse modref >expected &&
git rev-parse expref^{/!-!Exp} >actual &&
test_cmp expected actual
ok 17 - ref^{/!-!Exp}
# passed all 17 test(s)
1..17
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1512-rev-parse-disambiguation.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1512-rev-parse-disambiguation/.git/
checking prerequisite: SHA1
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test $(git hash-object /dev/null) = e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
)
prerequisite SHA1 ok
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 &&
test_i18ngrep "short SHA1 000000000 is ambiguous" actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
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
0000000000b36b6aa7ea4b75318ed078f55505c3
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
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)
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
0000000000e4f9fbd19cf1e932319e5ad0d1d00b
0000000000e4f9fbd19cf1e932319e5ad0d1d00b
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)
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 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
ok 12 - git reset takes only commit-ish
expecting success:
# create one tag 0000000000f8f
git tag -a -m j7cp83um v1.0.0
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
hint: The candidates are:
hint: 0000000000f tag v1.0.0
hint: 0000000000e commit 2005-04-07 - a2onsxbvj
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
hint: The candidates are:
hint: 0000000000f tag v1.0.0
hint: 0000000000e commit 2005-04-07 - a2onsxbvj
hint: 0000000000c tree
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
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
[master 00000000000] czy8f73t
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rename a0blgqsjc => d12cr3h8t (76%)
[master 00000000008] ioiley5o
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rename d12cr3h8t => j000jmpzn (79%)
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 0000000000e a2onsxbvj
[detached HEAD 0000000005] b3wettvi
Author: A U Thor <author@example.com>
1 file changed, 3 insertions(+)
rename a0blgqsjc => f5518nwu (51%)
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'
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"
Auto-merging j000jmpzn and f5518nwu, both renamed from a0blgqsjc
Automatic merge failed; fix conflicts and then commit the result.
rm 'f5518nwu'
rm 'j000jmpzn'
rm 'a0blgqsjc'
[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 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
hint: The candidates are:
hint: 0000000000f8 tag v1.0.0
hint: 000000000004 commit 2005-04-07 - czy8f73t
hint: 00000000006 commit 2005-04-07 - ad2uee
hint: 00000000008 commit 2005-04-07 - ioiley5o
hint: 0000000000e commit 2005-04-07 - a2onsxbvj
hint: 0000000005 commit 2005-04-07 - b3wettvi
fatal: Needed a single revision
error: short SHA1 000000000 is ambiguous
hint: The candidates are:
hint: 0000000000f8 tag v1.0.0
hint: 000000000004 commit 2005-04-07 - czy8f73t
hint: 00000000006 commit 2005-04-07 - ad2uee
hint: 00000000008 commit 2005-04-07 - ioiley5o
hint: 0000000000e commit 2005-04-07 - a2onsxbvj
hint: 0000000005 commit 2005-04-07 - b3wettvi
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>...]'
error: short SHA1 000000000 is ambiguous
hint: The candidates are:
hint: 0000000000f8 tag v1.0.0
hint: 000000000004 commit 2005-04-07 - czy8f73t
hint: 00000000006 commit 2005-04-07 - ad2uee
hint: 00000000008 commit 2005-04-07 - ioiley5o
hint: 0000000000e commit 2005-04-07 - a2onsxbvj
hint: 0000000005 commit 2005-04-07 - b3wettvi
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
hint: The candidates are:
hint: 0000000000f8 tag v1.0.0
hint: 000000000004 commit 2005-04-07 - czy8f73t
hint: 00000000006 commit 2005-04-07 - ad2uee
hint: 00000000008 commit 2005-04-07 - ioiley5o
hint: 0000000000e commit 2005-04-07 - a2onsxbvj
hint: 0000000005 commit 2005-04-07 - b3wettvi
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
hint: The candidates are:
hint: 0000000000f8 tag v1.0.0
hint: 000000000004 commit 2005-04-07 - czy8f73t
hint: 00000000006 commit 2005-04-07 - ad2uee
hint: 00000000008 commit 2005-04-07 - ioiley5o
hint: 0000000000e commit 2005-04-07 - a2onsxbvj
hint: 0000000005 commit 2005-04-07 - b3wettvi
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>...]'
error: short SHA1 000000000 is ambiguous
hint: The candidates are:
hint: 0000000000f8 tag v1.0.0
hint: 000000000004 commit 2005-04-07 - czy8f73t
hint: 00000000006 commit 2005-04-07 - ad2uee
hint: 00000000008 commit 2005-04-07 - ioiley5o
hint: 0000000000e commit 2005-04-07 - a2onsxbvj
hint: 0000000005 commit 2005-04-07 - b3wettvi
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
hint: The candidates are:
hint: 0000000000f8 tag v1.0.0
hint: 000000000004 commit 2005-04-07 - czy8f73t
hint: 00000000006 commit 2005-04-07 - ad2uee
hint: 00000000008 commit 2005-04-07 - ioiley5o
hint: 0000000000e commit 2005-04-07 - a2onsxbvj
hint: 0000000005 commit 2005-04-07 - b3wettvi
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:
test_must_fail git rev-parse 0000000000f^{tree}
error: short SHA1 0000000000f is ambiguous
hint: The candidates are:
hint: 0000000000f8 tag v1.0.0
hint: 0000000000fd tree
fatal: ambiguous argument '0000000000f^{tree}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
0000000000f^{tree}
ok 21 - ambiguous tags peel to treeish
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 22 - rev-parse --disambiguate
expecting success:
git rev-parse --disambiguate=000000000 >expect &&
git pack-objects .git/objects/pack/pack <expect &&
git rev-parse --disambiguate=000000000 >actual &&
test_cmp expect actual
bdfb78b16a1cd3c3b1ebf4cca29330c92a46fc43
ok 23 - rev-parse --disambiguate drops duplicates
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
warning: refname '0000000000663a70a94c2b280b575855256220fa' is ambiguous.
ok 24 - 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
warning: refname '00000000006' is ambiguous.
ok 25 - ambiguous short sha1 ref
expecting success:
test_must_fail git rev-parse 00000 2>stderr &&
grep "is ambiguous" stderr >errors &&
test_line_count = 1 errors
00000
ok 26 - ambiguity errors are not repeated (raw)
expecting success:
test_must_fail git rev-parse 00000:foo 2>stderr &&
grep "is ambiguous" stderr >errors &&
test_line_count = 1 errors
00000:foo
ok 27 - ambiguity errors are not repeated (treeish)
expecting success:
test_must_fail git rev-parse 00000^{commit} 2>stderr &&
grep "is ambiguous" stderr >errors &&
test_line_count = 1 errors
00000^{commit}
ok 28 - ambiguity errors are not repeated (peel)
expecting success:
test_must_fail git rev-parse 000000000 2>stderr &&
grep ^hint: stderr >hints &&
# 16 candidates, plus one intro line
test_line_count = 17 hints
000000000
ok 29 - ambiguity hints
expecting success:
test_must_fail git rev-parse 000000000^{commit} 2>stderr &&
grep ^hint: stderr >hints &&
# 5 commits, 1 tag (which is a commitish), plus intro line
test_line_count = 7 hints
000000000^{commit}
ok 30 - ambiguity hints respect type
expecting success:
# these two blobs share the same prefix "ee3d", but neither
# will pass for a commit
echo 851 | git hash-object --stdin -w &&
echo 872 | git hash-object --stdin -w &&
test_must_fail git rev-parse ee3d^{commit} 2>stderr &&
grep ^hint: stderr >hints &&
test_line_count = 3 hints
ee3de9906b5e9a4a369e91cba4235487a7e10351
ee3d8abaa95a7395b373892b2593de2f426814e2
ee3d^{commit}
ok 31 - failed type-selector still shows hint
expecting success:
# ambiguous between tree and tag
sha1=0000000000f &&
test_must_fail git rev-parse $sha1 &&
git rev-parse $sha1^{commit} &&
git -c core.disambiguate=committish rev-parse $sha1
error: short SHA1 0000000000f is ambiguous
hint: The candidates are:
hint: 0000000000f8 tag v1.0.0
hint: 0000000000fd tree
hint: 0000000000f2 blob
fatal: ambiguous argument '0000000000f': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
0000000000f
0000000000e4f9fbd19cf1e932319e5ad0d1d00b
0000000000f8f5507ab27a0d7bd3c75c0f64ffe0
ok 32 - core.disambiguate config can prefer types
expecting success:
# treeish ambiguous between tag and tree
test_must_fail \
git -c core.disambiguate=committish rev-parse $sha1^{tree}
error: short SHA1 0000000000f is ambiguous
hint: The candidates are:
hint: 0000000000f8 tag v1.0.0
hint: 0000000000fd tree
fatal: ambiguous argument '0000000000f^{tree}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
0000000000f^{tree}
ok 33 - core.disambiguate does not override context
expecting success:
test_must_fail git rev-parse 0000 2>stderr &&
grep ^hint: stderr >hints &&
grep 0000 hints >objects &&
cat >expected <<-\EOF &&
tag
commit
tree
blob
EOF
awk "{print \$3}" <objects >objects.types &&
uniq <objects.types >objects.types.uniq &&
test_cmp expected objects.types.uniq &&
for type in tag commit tree blob
do
grep $type objects >$type.objects &&
sort $type.objects >$type.objects.sorted &&
test_cmp $type.objects.sorted $type.objects
done
0000
ok 34 - ambiguous commits are printed by type first, then hash order
expecting success:
echo "0000 ambiguous" >expect &&
echo 0000 | git cat-file --batch-check >actual 2>err &&
test_cmp expect actual &&
test_i18ngrep hint: err &&
echo 0000 | git cat-file --batch >actual 2>err &&
test_cmp expect actual &&
test_i18ngrep hint: err
hint: The candidates are:
hint: 0000000000f8 tag v1.0.0
hint: 000000000004 commit 2005-04-07 - czy8f73t
hint: 00000000006 commit 2005-04-07 - ad2uee
hint: 00000000008 commit 2005-04-07 - ioiley5o
hint: 0000000000e commit 2005-04-07 - a2onsxbvj
hint: 0000000005 commit 2005-04-07 - b3wettvi
hint: 000000000002 tree
hint: 00000000005 tree
hint: 00000000009 tree
hint: 0000000000c tree
hint: 0000000000fd tree
hint: 00000000001 blob
hint: 00000000003 blob
hint: 0000000000a blob
hint: 0000000000b blob
hint: 0000000000f2 blob
hint: The candidates are:
hint: 0000000000f8 tag v1.0.0
hint: 000000000004 commit 2005-04-07 - czy8f73t
hint: 00000000006 commit 2005-04-07 - ad2uee
hint: 00000000008 commit 2005-04-07 - ioiley5o
hint: 0000000000e commit 2005-04-07 - a2onsxbvj
hint: 0000000005 commit 2005-04-07 - b3wettvi
hint: 000000000002 tree
hint: 00000000005 tree
hint: 00000000009 tree
hint: 0000000000c tree
hint: 0000000000fd tree
hint: 00000000001 blob
hint: 00000000003 blob
hint: 0000000000a blob
hint: 0000000000b blob
hint: 0000000000f2 blob
ok 35 - cat-file --batch and --batch-check show ambiguous
# still have 3 known breakage(s)
# passed all remaining 32 test(s)
1..35
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1513-rev-parse-prefix.sh ***
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
[master (root-commit) ef53225] 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
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
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 4 - valid prefix -- ../file
expecting success:
git rev-parse --prefix "" HEAD:./top >actual &&
git rev-parse HEAD:top >expected &&
test_cmp expected actual
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
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
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
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 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
ok 11 - two-levels deep
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1514-rev-parse-push.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1514-rev-parse-push/.git/
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.t1514-rev-parse-push/other.git/
[master (root-commit) d1ff1c9] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 base.t
To parent.git
* [new branch] HEAD -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.
Branch 'topic' set up to track remote branch 'master' from 'origin'.
To parent.git
* [new branch] topic -> topic
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} &&
test_must_fail git rev-parse master@{PUSH} &&
test_must_fail git rev-parse master@{PuSH}
fatal: push has no destination (push.default is 'nothing')
fatal: push has no destination (push.default is 'nothing')
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 &&
resolve master@{PUSH} refs/remotes/origin/master &&
resolve master@{pUSh} refs/remotes/origin/master
ok 3 - @{push} with default=simple
expecting success:
test_config push.default simple &&
test_must_fail git rev-parse topic@{push}
fatal: cannot resolve 'simple' push to a single destination
ok 4 - triangular @{push} fails with default=simple
expecting success:
test_config push.default current &&
resolve topic@{push} refs/remotes/origin/topic
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 7 - @{push} with pushremote defined
expecting success:
test_config push.default nothing &&
test_config remote.origin.push refs/heads/*:refs/heads/magic/* &&
git push &&
resolve topic@{push} refs/remotes/origin/magic/topic
To parent.git
* [new branch] master -> magic/master
* [new branch] topic -> magic/topic
ok 8 - @{push} with push refspecs
expecting success:
git checkout HEAD^0 &&
test_when_finished "git checkout -" &&
test_must_fail git rev-parse @{push}
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d1ff1c9 base
fatal: HEAD does not point to a branch
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
ok 9 - resolving @{push} fails with a detached HEAD
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1515-rev-parse-outside-repo.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1515-rev-parse-outside-repo/.git/
expecting success:
GIT_CEILING_DIRECTORIES=$(pwd) &&
export GIT_CEILING_DIRECTORIES &&
mkdir non-repo &&
cd non-repo &&
# confirm that git does not find a repo
test_must_fail git rev-parse --git-dir
fatal: not a git repository (or any of the parent directories): .git
ok 1 - set up non-repo directory
expecting success:
dump_args "$tricky" easy >expect &&
eval "dump_args $(git rev-parse --sq-quote "$tricky" easy)" >actual &&
test_cmp expect actual
ok 2 - rev-parse --sq-quote
expecting success:
git rev-parse --local-env-vars >actual &&
# we do not want to depend on the complete list here,
# so just look for something plausible
grep ^GIT_DIR actual
GIT_DIR
ok 3 - rev-parse --local-env-vars
expecting success:
git init --separate-git-dir repo dir &&
test_must_fail git rev-parse --resolve-git-dir . &&
echo "$(pwd)/repo" >expect &&
git rev-parse --resolve-git-dir dir/.git >actual &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1515-rev-parse-outside-repo/non-repo/repo/
fatal: not a gitdir '.'
ok 4 - rev-parse --resolve-git-dir
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1600-index.sh ***
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
)
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
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
)
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
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 &&
test_must_be_empty 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
)
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
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-tool index-version <.git/index >actual &&
test_cmp expect actual
)
ok 6 - GIT_INDEX_VERSION takes precedence over config
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1601-index-bogus.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1601-index-bogus/.git/
expecting success:
tree=$(printf "160000 commit $ZERO_OID\\tbroken\\n" | git mktree)
ok 1 - create tree with null sha1
expecting success:
test_must_fail git read-tree $tree
error: invalid object 160000 0000000000000000000000000000000000000000 for 'broken'
error: cache entry has null sha1: broken
fatal: unable to write new index file
ok 2 - read-tree refuses to read null sha1
expecting success:
GIT_ALLOW_NULL_SHA1=1 git read-tree $tree
error: invalid object 160000 0000000000000000000000000000000000000000 for 'broken'
warning: cache entry has null sha1: broken
ok 3 - GIT_ALLOW_NULL_SHA1 overrides refusal
expecting success:
test_must_fail git write-tree
error: invalid object 160000 0000000000000000000000000000000000000000 for 'broken'
fatal: git-write-tree: error building trees
ok 4 - git write-tree refuses to write null sha1
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1700-split-index.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1700-split-index/.git/
expecting success:
test_oid_cache <<-EOF
own_v3 sha1:8299b0bcd1ac364e5f1d7768efb62fa2da79a339
own_v3 sha256:38a6d2925e3eceec33ad7b34cbff4e0086caa0daf28f31e51f5bd94b4a7af86b
base_v3 sha1:39d890139ee5356c7ef572216cebcd27aa41f9df
base_v3 sha256:c9baeadf905112bf6c17aefbd7d02267afd70ded613c30cafed2d40cb506e1ed
own_v4 sha1:432ef4b63f32193984f339431fd50ca796493569
own_v4 sha256:6738ac6319c25b694afa7bcc313deb182d1a59b68bf7a47b4296de83478c0420
base_v4 sha1:508851a7f0dfa8691e9f69c7f055865389012491
base_v4 sha256:3177d4adfdd4b6904f7e921d91d715a471c0dde7cf6a4bba574927f02b699508
EOF
ok 1 - setup
expecting success:
git config splitIndex.maxPercentChange 100 &&
git update-index --split-index &&
test-tool dump-split-index .git/index >actual &&
indexversion=$(test-tool index-version <.git/index) &&
# NEEDSWORK: Stop hard-coding checksums.
if test "$indexversion" = "4"
then
own=$(test_oid own_v4)
base=$(test_oid base_v4)
else
own=$(test_oid own_v3)
base=$(test_oid base_v3)
fi &&
cat >expect <<-EOF &&
own $own
base $base
replacements:
deletions:
EOF
test_cmp expect actual
ok 2 - enable split index
expecting success:
create_non_racy_file one &&
git update-index --add one &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<-EOF &&
100644 $EMPTY_BLOB 0 one
EOF
test_cmp ls-files.expect ls-files.actual &&
test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<-EOF &&
base $base
100644 $EMPTY_BLOB 0 one
replacements:
deletions:
EOF
test_cmp expect actual
ok 3 - add one file
expecting success:
git update-index --no-split-index &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<-EOF &&
100644 $EMPTY_BLOB 0 one
EOF
test_cmp ls-files.expect ls-files.actual &&
BASE=$(test-tool dump-split-index .git/index | sed -n "s/^own/base/p") &&
test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<-EOF &&
not a split index
EOF
test_cmp expect actual
ok 4 - disable split index
expecting success:
git update-index --split-index &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<-EOF &&
100644 $EMPTY_BLOB 0 one
EOF
test_cmp ls-files.expect ls-files.actual &&
test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<-EOF &&
$BASE
replacements:
deletions:
EOF
test_cmp expect actual
ok 5 - enable split index again, "one" now belongs to base index"
expecting success:
echo modified | create_non_racy_file one &&
file1_blob=$(git hash-object one) &&
git update-index one &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<-EOF &&
100644 $file1_blob 0 one
EOF
test_cmp ls-files.expect ls-files.actual &&
test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
q_to_tab >expect <<-EOF &&
$BASE
100644 $file1_blob 0Q
replacements: 0
deletions:
EOF
test_cmp expect actual
ok 6 - modify original file, base index untouched
expecting success:
create_non_racy_file two &&
git update-index --add two &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<-EOF &&
100644 $file1_blob 0 one
100644 $EMPTY_BLOB 0 two
EOF
test_cmp ls-files.expect ls-files.actual &&
test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
q_to_tab >expect <<-EOF &&
$BASE
100644 $file1_blob 0Q
100644 $EMPTY_BLOB 0 two
replacements: 0
deletions:
EOF
test_cmp expect actual
ok 7 - add another file, which stays index
expecting success:
git update-index --force-remove two &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<-EOF &&
100644 $file1_blob 0 one
EOF
test_cmp ls-files.expect ls-files.actual &&
test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
q_to_tab >expect <<-EOF &&
$BASE
100644 $file1_blob 0Q
replacements: 0
deletions:
EOF
test_cmp expect actual
ok 8 - remove file not in base index
expecting success:
git update-index --force-remove one &&
git ls-files --stage >ls-files.actual &&
test_must_be_empty ls-files.actual &&
test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<-EOF &&
$BASE
replacements:
deletions: 0
EOF
test_cmp expect actual
ok 9 - remove file in base index
expecting success:
create_non_racy_file one &&
git update-index --add one &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<-EOF &&
100644 $EMPTY_BLOB 0 one
EOF
test_cmp ls-files.expect ls-files.actual &&
test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<-EOF &&
$BASE
100644 $EMPTY_BLOB 0 one
replacements:
deletions: 0
EOF
test_cmp expect actual
ok 10 - add original file back
expecting success:
create_non_racy_file two &&
git update-index --add two &&
git ls-files --stage >actual &&
cat >expect <<-EOF &&
100644 $EMPTY_BLOB 0 one
100644 $EMPTY_BLOB 0 two
EOF
test_cmp expect actual
ok 11 - add new file
expecting success:
git update-index --no-split-index &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<-EOF &&
100644 $EMPTY_BLOB 0 one
100644 $EMPTY_BLOB 0 two
EOF
test_cmp ls-files.expect ls-files.actual &&
test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<-EOF &&
not a split index
EOF
test_cmp expect actual
ok 12 - unify index, two files remain
expecting success:
test_create_repo split-index &&
(
cd split-index &&
git update-index --split-index &&
echo .git/sharedindex* >expect &&
git rev-parse --shared-index-path >actual &&
test_cmp expect actual &&
mkdir subdirectory &&
cd subdirectory &&
echo ../.git/sharedindex* >expect &&
git rev-parse --shared-index-path >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1700-split-index/split-index/.git/
ok 13 - rev-parse --shared-index-path
expecting success:
git config core.splitIndex true &&
create_non_racy_file three &&
git update-index --add three &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<-EOF &&
100644 $EMPTY_BLOB 0 one
100644 $EMPTY_BLOB 0 three
100644 $EMPTY_BLOB 0 two
EOF
test_cmp ls-files.expect ls-files.actual &&
BASE=$(test-tool dump-split-index .git/index | grep "^base") &&
test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<-EOF &&
$BASE
replacements:
deletions:
EOF
test_cmp expect actual
ok 14 - set core.splitIndex config variable to true
expecting success:
git config core.splitIndex false &&
git update-index --force-remove three &&
git ls-files --stage >ls-files.actual &&
cat >ls-files.expect <<-EOF &&
100644 $EMPTY_BLOB 0 one
100644 $EMPTY_BLOB 0 two
EOF
test_cmp ls-files.expect ls-files.actual &&
test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<-EOF &&
not a split index
EOF
test_cmp expect actual
ok 15 - set core.splitIndex config variable to false
expecting success:
git config core.splitIndex true &&
create_non_racy_file three &&
git update-index --add three &&
BASE=$(test-tool dump-split-index .git/index | grep "^base") &&
test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<-EOF &&
$BASE
replacements:
deletions:
EOF
test_cmp expect actual &&
create_non_racy_file four &&
git update-index --add four &&
test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<-EOF &&
$BASE
100644 $EMPTY_BLOB 0 four
replacements:
deletions:
EOF
test_cmp expect actual
ok 16 - set core.splitIndex config variable back to true
expecting success:
git config --unset splitIndex.maxPercentChange &&
create_non_racy_file five &&
git update-index --add five &&
BASE=$(test-tool dump-split-index .git/index | grep "^base") &&
test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<-EOF &&
$BASE
replacements:
deletions:
EOF
test_cmp expect actual &&
create_non_racy_file six &&
git update-index --add six &&
test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<-EOF &&
$BASE
100644 $EMPTY_BLOB 0 six
replacements:
deletions:
EOF
test_cmp expect actual
ok 17 - check behavior with splitIndex.maxPercentChange unset
expecting success:
git config splitIndex.maxPercentChange 0 &&
create_non_racy_file seven &&
git update-index --add seven &&
BASE=$(test-tool dump-split-index .git/index | grep "^base") &&
test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<-EOF &&
$BASE
replacements:
deletions:
EOF
test_cmp expect actual &&
create_non_racy_file eight &&
git update-index --add eight &&
BASE=$(test-tool dump-split-index .git/index | grep "^base") &&
test-tool dump-split-index .git/index | sed "/^own/d" >actual &&
cat >expect <<-EOF &&
$BASE
replacements:
deletions:
EOF
test_cmp expect actual
ok 18 - check splitIndex.maxPercentChange set to 0
expecting success:
create_non_racy_file ten &&
git update-index --add ten &&
test $(ls .git/sharedindex.* | wc -l) -gt 2 &&
just_under_2_weeks_ago=$((5-14*86400)) &&
test-tool chmtime =$just_under_2_weeks_ago .git/sharedindex.* &&
create_non_racy_file eleven &&
git update-index --add eleven &&
test $(ls .git/sharedindex.* | wc -l) -gt 2 &&
just_over_2_weeks_ago=$((-1-14*86400)) &&
test-tool chmtime =$just_over_2_weeks_ago .git/sharedindex.* &&
create_non_racy_file twelve &&
git update-index --add twelve &&
test $(ls .git/sharedindex.* | wc -l) -le 2
ok 19 - shared index files expire after 2 weeks by default
expecting success:
git config splitIndex.sharedIndexExpire "16.days.ago" &&
test-tool chmtime =$just_over_2_weeks_ago .git/sharedindex.* &&
create_non_racy_file thirteen &&
git update-index --add thirteen &&
test $(ls .git/sharedindex.* | wc -l) -gt 2 &&
just_over_16_days_ago=$((-1-16*86400)) &&
test-tool chmtime =$just_over_16_days_ago .git/sharedindex.* &&
create_non_racy_file fourteen &&
git update-index --add fourteen &&
test $(ls .git/sharedindex.* | wc -l) -le 2
ok 20 - check splitIndex.sharedIndexExpire set to 16 days
expecting success:
git config splitIndex.sharedIndexExpire never &&
just_10_years_ago=$((-365*10*86400)) &&
test-tool chmtime =$just_10_years_ago .git/sharedindex.* &&
create_non_racy_file fifteen &&
git update-index --add fifteen &&
test $(ls .git/sharedindex.* | wc -l) -gt 2 &&
git config splitIndex.sharedIndexExpire now &&
just_1_second_ago=-1 &&
test-tool chmtime =$just_1_second_ago .git/sharedindex.* &&
create_non_racy_file sixteen &&
git update-index --add sixteen &&
test $(ls .git/sharedindex.* | wc -l) -le 2
ok 21 - check splitIndex.sharedIndexExpire set to "never" and "now"
expecting success:
git init same-mode &&
(
cd same-mode &&
test_commit A &&
test_modebits .git/index >index_mode &&
test_must_fail git config core.sharedRepository &&
git -c core.splitIndex=true status &&
shared=$(ls .git/sharedindex.*) &&
case "$shared" in
*" "*)
# we have more than one???
false ;;
*)
test_modebits "$shared" >split_index_mode &&
test_cmp index_mode split_index_mode ;;
esac
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1700-split-index/same-mode/.git/
[master (root-commit) 0ddfaf1] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
index_mode
nothing added to commit but untracked files present (use "git add" to track)
ok 22 - same mode for index & split index
expecting success:
# Remove existing shared index files
git config core.splitIndex false &&
git update-index --force-remove one &&
rm -f .git/sharedindex.* &&
# Create one new shared index file
git config core.sharedrepository "$mode" &&
git config core.splitIndex true &&
create_non_racy_file one &&
git update-index --add one &&
echo "$modebits" >expect &&
test_modebits .git/index >actual &&
test_cmp expect actual &&
shared=$(ls .git/sharedindex.*) &&
case "$shared" in
*" "*)
# we have more than one???
false ;;
*)
test_modebits "$shared" >actual &&
test_cmp expect actual ;;
esac
ok 23 - split index respects core.sharedrepository 0666
expecting success:
# Remove existing shared index files
git config core.splitIndex false &&
git update-index --force-remove one &&
rm -f .git/sharedindex.* &&
# Create one new shared index file
git config core.sharedrepository "$mode" &&
git config core.splitIndex true &&
create_non_racy_file one &&
git update-index --add one &&
echo "$modebits" >expect &&
test_modebits .git/index >actual &&
test_cmp expect actual &&
shared=$(ls .git/sharedindex.*) &&
case "$shared" in
*" "*)
# we have more than one???
false ;;
*)
test_modebits "$shared" >actual &&
test_cmp expect actual ;;
esac
ok 24 - split index respects core.sharedrepository 0642
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 -r SANETESTD.1/x &&
chmod -rx SANETESTD.2 ||
BUG "cannot prepare SANETESTD"
! test -r SANETESTD.1/x &&
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
BUG "cannot clean SANETESTD"
return $status
)
rm: cannot remove 'SANETESTD.1/x': Permission denied
prerequisite SANITY ok
expecting success:
test_create_repo ro &&
(
cd ro &&
test_commit initial &&
git update-index --split-index &&
test -f .git/sharedindex.*
) &&
cp ro/.git/index new-index &&
test_when_finished "chmod u+w ro/.git" &&
chmod u-w ro/.git &&
GIT_INDEX_FILE="$(pwd)/new-index" git -C ro update-index --split-index &&
chmod u+w ro/.git &&
rm ro/.git/sharedindex.* &&
GIT_INDEX_FILE=new-index git ls-files >actual &&
echo initial.t >expected &&
test_cmp expected actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1700-split-index/ro/.git/
[master (root-commit) 24b24cf] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
ok 25 - graceful handling when splitting index is not allowed
expecting success:
git config core.splitIndex true &&
git config splitIndex.maxPercentChange 0 &&
git commit -m "commit" &&
{
git ls-tree HEAD &&
printf "160000 commit $ZERO_OID\\tbroken\\n"
} >broken-tree &&
echo "add broken entry" >msg &&
tree=$(git mktree <broken-tree) &&
test_tick &&
commit=$(git commit-tree $tree -p HEAD <msg) &&
git update-ref HEAD "$commit" &&
GIT_ALLOW_NULL_SHA1=1 git reset --hard &&
test_might_fail test-tool dump-cache-tree >cache-tree.out &&
test_line_count = 0 cache-tree.out
[master (root-commit) fb68ff7] commit
Author: A U Thor <author@example.com>
15 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 eight
create mode 100644 eleven
create mode 100644 fifteen
create mode 100644 five
create mode 100644 four
create mode 100644 fourteen
create mode 100644 one
create mode 100644 seven
create mode 100644 six
create mode 100644 sixteen
create mode 100644 ten
create mode 100644 thirteen
create mode 100644 three
create mode 100644 twelve
create mode 100644 two
error: invalid object 160000 0000000000000000000000000000000000000000 for 'broken'
warning: cache entry has null sha1: broken
HEAD is now at 2d321ca add broken entry
error: invalid object 160000 0000000000000000000000000000000000000000 for 'broken'
ok 26 - writing split index with null sha1 does not write cache tree
expecting success:
test_create_repo merge &&
(
cd merge &&
test_commit initial &&
git checkout -b side-branch &&
test_commit extra &&
git checkout master &&
git update-index --split-index &&
test_commit more &&
# must not write a new shareindex, or we wont catch the problem
git -c splitIndex.maxPercentChange=100 merge --no-edit side-branch 2>err &&
# i.e. do not expect warnings like
# could not freshen shared index .../shareindex.00000...
test_must_be_empty err
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1700-split-index/merge/.git/
[master (root-commit) 5e30013] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
Switched to a new branch 'side-branch'
[side-branch 678a87c] extra
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 extra.t
Switched to branch 'master'
[master 34c8267] more
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 more.t
Merging:
34c8267 more
virtual side-branch
found 1 common ancestor:
5e30013 initial
Merge made by the 'recursive' strategy.
extra.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 extra.t
ok 27 - do not refresh null base index
# passed all 27 test(s)
1..27
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1013-read-tree-submodule.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/.git/
expecting success:
prolog &&
reset_work_tree_to_interested no_submodule &&
(
cd submodule_update &&
git branch -t add_sub1 origin/add_sub1 &&
$command add_sub1 &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1/.git/
[master (root-commit) e0e8641] Base inside first submodule
Author: A U Thor <author@example.com>
3 files changed, 4 insertions(+)
create mode 100644 .gitignore
create mode 100644 file1
create mode 100644 file2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub2/.git/
[master (root-commit) 8ccf08e] nested submodule 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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/.git/
[master (root-commit) 8461744] 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
Switched to a new branch 'add_sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/uninitialized_sub'...
done.
[add_sub1 345f561] Add sub1
Author: A U Thor <author@example.com>
2 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 uninitialized_sub
Switched to a new branch 'remove_sub1'
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
[remove_sub1 5d29225] Revert "Add sub1"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:24:09 2019 +0000
3 files changed, 9 deletions(-)
delete mode 100644 .gitmodules
delete mode 160000 sub1
delete mode 160000 uninitialized_sub
Switched to a new branch 'modify_sub1'
Switched to a new branch 'modifications'
[modifications e7bec49] modified file2 and added file3
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 file3
To /<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1
* [new branch] modifications -> modifications
[modify_sub1 c746b0b] Modify sub1
Author: A U Thor <author@example.com>
Switched to a new branch 'add_nested_sub'
Switched to a new branch 'add_nested_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_repo/sub1/sub2'...
done.
[add_nested_sub c95a312] add a nested submodule
Author: A U Thor <author@example.com>
2 files changed, 5 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub2
[add_nested_sub 346ddae] update submodule, that updates a nested submodule
Author: A U Thor <author@example.com>
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
[modify_sub1_recursively f9e424c] make a change in nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
[modify_sub1_recursively ad58950] update nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[modify_sub1_recursively 192d765] update sub1, that updates nested sub
Author: A U Thor <author@example.com>
To /<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
To /<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub2
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
Cleared directory 'sub2'
Submodule 'sub2' (../submodule_update_sub2) unregistered for path 'sub2'
Switched to a new branch 'replace_sub1_with_directory'
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Previous HEAD position was e0e8641 Base inside first submodule
Switched to branch 'modifications'
rm 'sub1'
[replace_sub1_with_directory 41d06d2] 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
Switched to a new branch 'replace_directory_with_sub1'
Removing sub1/file3
Removing sub1/file2
Removing sub1/file1
Adding sub1
[replace_directory_with_sub1 d14966b] Revert "Replace sub1 with directory"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:24:11 2019 +0000
4 files changed, 4 insertions(+), 3 deletions(-)
delete mode 100644 sub1/file1
delete mode 100644 sub1/file2
delete mode 100644 sub1/file3
Switched to a new branch 'replace_sub1_with_file'
rm 'sub1'
[replace_sub1_with_file 339df86] 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'
[replace_file_with_sub1 fbed239] Revert "Replace sub1 with file"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:24:11 2019 +0000
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
Switched to a new branch 'invalid_sub1'
[invalid_sub1 a0c4387] Invalid sub1 commit
Author: A U Thor <author@example.com>
Switched to a new branch 'valid_sub1'
[valid_sub1 6ddfcd6] Revert "Invalid sub1 commit"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:24:11 2019 +0000
warning: unable to rmdir 'uninitialized_sub': Directory not empty
Switched to branch 'master'
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
ok 1 - git read-tree -u -m --recurse-submodules: added submodule is checked out
expecting success:
prolog &&
reset_work_tree_to_interested 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_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
ok 2 - git read-tree -u -m --recurse-submodules: added submodule is checked out in empty dir
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git -C sub1 checkout -b keep_branch &&
git -C sub1 rev-parse HEAD >expect &&
git branch -t modify_sub1 origin/modify_sub1 &&
$command modify_sub1 &&
test_superproject_content origin/modify_sub1 &&
test_submodule_content sub1 origin/modify_sub1 &&
git -C sub1 rev-parse keep_branch >actual &&
test_cmp expect actual &&
test_must_fail git -C sub1 symbolic-ref HEAD
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Switched to a new branch 'keep_branch'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
fatal: ref HEAD is not a symbolic ref
ok 3 - git read-tree -u -m --recurse-submodules: submodule branch is not changed, detach HEAD instead
expecting success:
prolog &&
reset_work_tree_to_interested 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_submodule_content sub1 origin/replace_file_with_sub1
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
ok 4 - git read-tree -u -m --recurse-submodules: replace tracked file with submodule checks out submodule
expecting success:
prolog &&
reset_work_tree_to_interested 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_submodule_content sub1 origin/replace_directory_with_sub1
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
ok 5 - git read-tree -u -m --recurse-submodules: replace directory with submodule
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t remove_sub1 origin/remove_sub1 &&
$command remove_sub1 &&
test_superproject_content origin/remove_sub1 &&
! test -e sub1 &&
test_must_fail git config -f .git/modules/sub1/config core.worktree
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
ok 6 - git read-tree -u -m --recurse-submodules: removed submodule removes submodules working tree
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t remove_sub1 origin/remove_sub1 &&
replace_gitfile_with_git_dir sub1 &&
rm -rf .git/modules &&
$command remove_sub1 &&
test_superproject_content origin/remove_sub1 &&
! test -e sub1 &&
test_git_directory_exists sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Migrating git directory of 'sub1' from
'/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1/.git' to
'/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/.git/modules/sub1'
ok 7 - git read-tree -u -m --recurse-submodules: removed submodule absorbs submodules .git directory
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_file origin/replace_sub1_with_file &&
$command replace_sub1_with_file &&
test_superproject_content origin/replace_sub1_with_file &&
test -f sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
ok 8 - git read-tree -u -m --recurse-submodules: replace submodule with a file
checking known breakage:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_file origin/replace_sub1_with_file &&
: >sub1/untrackedfile &&
test_must_fail $command replace_sub1_with_file &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1 &&
test -f sub1/untracked_file
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
test_must_fail: command succeeded: git read-tree -u -m --recurse-submodules replace_sub1_with_file
not ok 9 - git read-tree -u -m --recurse-submodules: replace submodule with a file must fail with untracked files # TODO known breakage
expecting success:
prolog &&
reset_work_tree_to_interested 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/modify_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
ok 10 - git read-tree -u -m --recurse-submodules: modified submodule updates submodule work tree
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t invalid_sub1 origin/invalid_sub1 &&
test_must_fail $command invalid_sub1 2>err &&
test_i18ngrep sub1 err &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: Submodule 'sub1' could not be updated.
error: Submodule 'sub1' cannot checkout new HEAD.
ok 11 - git read-tree -u -m --recurse-submodules: updating to a missing submodule commit fails
expecting success:
prolog &&
reset_work_tree_to_interested 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
error: Untracked working tree file 'sub1' would be overwritten by merge.
ok 12 - git read-tree -u -m --recurse-submodules: added submodule doesn't remove untracked file with same name
checking known breakage:
test_when_finished "rm submodule_update/.git/info/exclude" &&
prolog &&
reset_work_tree_to_interested no_submodule &&
(
cd submodule_update &&
git branch -t add_sub1 origin/add_sub1 &&
: >sub1 &&
echo sub1 >.git/info/exclude &&
$command add_sub1 &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
error: Untracked working tree file 'sub1' would be overwritten by merge.
not ok 13 - git read-tree -u -m --recurse-submodules: added submodule removes an untracked ignored file # TODO known breakage
checking known breakage:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_directory origin/replace_sub1_with_directory &&
$command replace_sub1_with_directory &&
test_superproject_content origin/replace_sub1_with_directory &&
test_submodule_content sub1 origin/replace_sub1_with_directory
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: Untracked working tree file 'sub1/file1' would be overwritten by merge.
not ok 14 - git read-tree -u -m --recurse-submodules: replace submodule with a directory # TODO known breakage
checking known breakage:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_directory origin/replace_sub1_with_directory &&
replace_gitfile_with_git_dir sub1 &&
rm -rf .git/modules &&
$command replace_sub1_with_directory &&
test_superproject_content origin/replace_sub1_with_directory &&
test_git_directory_exists sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: Untracked working tree file 'sub1/file1' would be overwritten by merge.
not ok 15 - git read-tree -u -m --recurse-submodules: replace submodule containing a .git directory with a directory must absorb the git dir # TODO known breakage
expecting success:
test_when_finished "rm submodule_update/.git/modules/sub1/info/exclude" &&
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_file origin/replace_sub1_with_file &&
echo ignored >.git/modules/sub1/info/exclude &&
: >sub1/ignored &&
$command replace_sub1_with_file &&
test_superproject_content origin/replace_sub1_with_file &&
test -f sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
ok 16 - git read-tree -u -m --recurse-submodules: replace submodule with a file works ignores ignored files in submodule
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t modify_sub1 origin/modify_sub1 &&
git -c submodule.recurse=true $cmd_args modify_sub1 &&
test_superproject_content origin/modify_sub1 &&
test_submodule_content sub1 origin/modify_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
ok 17 - git -c submodule.recurse=true read-tree -u -m: modified submodule updates submodule work tree
expecting success:
prolog &&
reset_work_tree_to_interested add_nested_sub &&
(
cd submodule_update &&
git branch -t modify_sub1_recursively origin/modify_sub1_recursively &&
$command modify_sub1_recursively &&
test_superproject_content origin/modify_sub1_recursively &&
test_submodule_content sub1 origin/modify_sub1_recursively &&
test_submodule_content -C sub1 sub2 origin/modify_sub1_recursively
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_nested_sub'
Branch 'add_nested_sub' set up to track remote branch 'add_nested_sub' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'c95a312193ba63cb4b486314c6b960451459e733'
Submodule 'sub2' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub2) registered for path 'sub1/sub2'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1/sub2'...
done.
Submodule path 'sub1/sub2': checked out '8ccf08ecb7c14ccf8cb9c47a5a8b60c6642cf81f'
Branch 'modify_sub1_recursively' set up to track remote branch 'modify_sub1_recursively' from 'origin'.
ok 18 - git read-tree -u -m --recurse-submodules: modified submodule updates submodule recursively
expecting success:
prolog &&
reset_work_tree_to_interested no_submodule &&
(
cd submodule_update &&
git branch -t add_sub1 origin/add_sub1 &&
$command add_sub1 &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
ok 19 - git read-tree -u --reset --recurse-submodules: added submodule is checked out
expecting success:
prolog &&
reset_work_tree_to_interested 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_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
ok 20 - git read-tree -u --reset --recurse-submodules: added submodule is checked out in empty dir
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git -C sub1 checkout -b keep_branch &&
git -C sub1 rev-parse HEAD >expect &&
git branch -t modify_sub1 origin/modify_sub1 &&
$command modify_sub1 &&
test_superproject_content origin/modify_sub1 &&
test_submodule_content sub1 origin/modify_sub1 &&
git -C sub1 rev-parse keep_branch >actual &&
test_cmp expect actual &&
test_must_fail git -C sub1 symbolic-ref HEAD
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Switched to a new branch 'keep_branch'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
fatal: ref HEAD is not a symbolic ref
ok 21 - git read-tree -u --reset --recurse-submodules: submodule branch is not changed, detach HEAD instead
expecting success:
prolog &&
reset_work_tree_to_interested 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_submodule_content sub1 origin/replace_file_with_sub1
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
ok 22 - git read-tree -u --reset --recurse-submodules: replace tracked file with submodule checks out submodule
expecting success:
prolog &&
reset_work_tree_to_interested 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_submodule_content sub1 origin/replace_directory_with_sub1
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
ok 23 - git read-tree -u --reset --recurse-submodules: replace directory with submodule
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t remove_sub1 origin/remove_sub1 &&
$command remove_sub1 &&
test_superproject_content origin/remove_sub1 &&
! test -e sub1 &&
test_must_fail git config -f .git/modules/sub1/config core.worktree
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
ok 24 - git read-tree -u --reset --recurse-submodules: removed submodule removes submodules working tree
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t remove_sub1 origin/remove_sub1 &&
replace_gitfile_with_git_dir sub1 &&
rm -rf .git/modules &&
$command remove_sub1 &&
test_superproject_content origin/remove_sub1 &&
! test -e sub1 &&
test_git_directory_exists sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Migrating git directory of 'sub1' from
'/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1/.git' to
'/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/.git/modules/sub1'
ok 25 - git read-tree -u --reset --recurse-submodules: removed submodule absorbs submodules .git directory
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_file origin/replace_sub1_with_file &&
$command replace_sub1_with_file &&
test_superproject_content origin/replace_sub1_with_file &&
test -f sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
ok 26 - git read-tree -u --reset --recurse-submodules: replace submodule with a file
checking known breakage:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_file origin/replace_sub1_with_file &&
: >sub1/untrackedfile &&
test_must_fail $command replace_sub1_with_file &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1 &&
test -f sub1/untracked_file
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
test_must_fail: command succeeded: git read-tree -u --reset --recurse-submodules replace_sub1_with_file
not ok 27 - git read-tree -u --reset --recurse-submodules: replace submodule with a file must fail with untracked files # TODO known breakage
expecting success:
prolog &&
reset_work_tree_to_interested 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/modify_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
ok 28 - git read-tree -u --reset --recurse-submodules: modified submodule updates submodule work tree
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t invalid_sub1 origin/invalid_sub1 &&
test_must_fail $command invalid_sub1 2>err &&
test_i18ngrep sub1 err &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: Submodule 'sub1' could not be updated.
error: Submodule 'sub1' cannot checkout new HEAD.
ok 29 - git read-tree -u --reset --recurse-submodules: updating to a missing submodule commit fails
expecting success:
prolog &&
reset_work_tree_to_interested no_submodule &&
(
cd submodule_update &&
git branch -t add_sub1 origin/add_sub1 &&
>sub1 &&
$command add_sub1 &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
ok 30 - git read-tree -u --reset --recurse-submodules: added submodule does remove untracked unignored file with same name when forced
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_directory origin/replace_sub1_with_directory &&
$command replace_sub1_with_directory &&
test_superproject_content origin/replace_sub1_with_directory
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
ok 31 - git read-tree -u --reset --recurse-submodules: replace submodule with a directory
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_directory origin/replace_sub1_with_directory &&
replace_gitfile_with_git_dir sub1 &&
rm -rf .git/modules/sub1 &&
$command replace_sub1_with_directory &&
test_superproject_content origin/replace_sub1_with_directory &&
test_git_directory_exists sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Migrating git directory of 'sub1' from
'/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1/.git' to
'/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/.git/modules/sub1'
ok 32 - git read-tree -u --reset --recurse-submodules: replace submodule containing a .git directory with a directory must fail
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_file origin/replace_sub1_with_file &&
: >sub1/expect &&
$command replace_sub1_with_file &&
test_superproject_content origin/replace_sub1_with_file
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
ok 33 - git read-tree -u --reset --recurse-submodules: replace submodule with a file ignoring ignored files
expecting success:
prolog &&
reset_work_tree_to_interested invalid_sub1 &&
(
cd submodule_update &&
git branch -t valid_sub1 origin/valid_sub1 &&
$command valid_sub1 &&
test_superproject_content origin/valid_sub1 &&
test_submodule_content sub1 origin/valid_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
ok 34 - git read-tree -u --reset --recurse-submodules: modified submodule does update submodule work tree from invalid commit
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t modify_sub1 origin/modify_sub1 &&
echo "gitdir: bogus/path" >sub1/.git &&
$command modify_sub1 &&
test_superproject_content origin/modify_sub1 &&
test_submodule_content sub1 origin/modify_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
ok 35 - git read-tree -u --reset --recurse-submodules: updating submodules fixes .git links
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
rm sub1/file1 &&
: >sub1/new_file &&
git -C sub1 add new_file &&
$command HEAD &&
test_path_is_file sub1/file1 &&
test_path_is_missing sub1/new_file
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
ok 36 - git read-tree -u --reset --recurse-submodules: changed submodule worktree is reset
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Submodule path 'uninitialized_sub': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
ok 37 - 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Submodule path 'uninitialized_sub': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
ok 38 - git read-tree -u -m: added submodule leaves existing empty directory alone
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
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Submodule path 'uninitialized_sub': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
ok 39 - 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
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Submodule path 'uninitialized_sub': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
ok 40 - 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
ok 41 - 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
ok 42 - 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: Untracked working tree file 'sub1/file1' would be overwritten by merge.
ok 43 - git read-tree -u -m: replace submodule with a directory must fail
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: Untracked working tree file 'sub1/file1' would be overwritten by merge.
ok 44 - 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
test_must_fail: command succeeded: git read-tree -u -m replace_sub1_with_file
not ok 45 - 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
test_must_fail: command succeeded: git read-tree -u -m replace_sub1_with_file
not ok 46 - 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Submodule path 'sub1': checked out 'e7bec49c1372520732796352e67205973a4247e2'
ok 47 - 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
error: Server does not allow request for unadvertised object 0123456789012345678901234567890123456789
Fetched in submodule path 'sub1', but it did not contain 0123456789012345678901234567890123456789. Direct fetching of that commit failed.
ok 48 - 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Submodule path 'uninitialized_sub': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
ok 49 - 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 &&
>sub1 &&
test_must_fail $command add_sub1 &&
test_superproject_content origin/no_submodule &&
test_must_be_empty sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
error: Untracked working tree file 'sub1' would be overwritten by merge.
ok 50 - git read-tree -u -m: added submodule doesn't remove untracked unignored file with same name
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Submodule path 'uninitialized_sub': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
ok 51 - git read-tree -u --reset: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Submodule path 'uninitialized_sub': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
ok 52 - git read-tree -u --reset: added submodule leaves existing empty directory alone
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
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Submodule path 'uninitialized_sub': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
ok 53 - 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
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Submodule path 'uninitialized_sub': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
ok 54 - 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
ok 55 - 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
ok 56 - 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
test_must_fail: command succeeded: git read-tree -u --reset replace_sub1_with_directory
not ok 57 - git read-tree -u --reset: replace submodule with a directory must fail # TODO known breakage
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 &&
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
test_must_fail: command succeeded: git read-tree -u --reset replace_sub1_with_directory
not ok 58 - git read-tree -u --reset: replace submodule containing a .git directory with a directory 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 &&
test_must_fail $command replace_sub1_with_file &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
test_must_fail: command succeeded: git read-tree -u --reset replace_sub1_with_file
not ok 59 - git read-tree -u --reset: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
test_must_fail: command succeeded: git read-tree -u --reset replace_sub1_with_file
not ok 60 - git read-tree -u --reset: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Submodule path 'sub1': checked out 'e7bec49c1372520732796352e67205973a4247e2'
ok 61 - git read-tree -u --reset: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
error: Server does not allow request for unadvertised object 0123456789012345678901234567890123456789
Fetched in submodule path 'sub1', but it did not contain 0123456789012345678901234567890123456789. Direct fetching of that commit failed.
ok 62 - git read-tree -u --reset: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t1013-read-tree-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
Submodule path 'uninitialized_sub': checked out 'e0e8641376ad7a79e22467c61f1fd82917328161'
ok 63 - git read-tree -u --reset: 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 &&
>sub1 &&
$command add_sub1 &&
test_superproject_content origin/add_sub1 &&
test_dir_is_empty sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
ok 64 - git read-tree -u --reset: added submodule does remove untracked unignored file with same name when forced
# still have 11 known breakage(s)
# passed all remaining 53 test(s)
1..64
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2000-conflict-when-checking-files-out.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2000-conflict-when-checking-files-out/.git/
expecting success: git update-index --add path0 path1/file1
ok 1 - git update-index --add various paths.
expecting success: test_must_fail git checkout-index -a
path0 already exists, no checkout
fatal: cannot create directory at 'path1': File exists
ok 2 - git checkout-index without -f should fail on conflicting work tree.
expecting success: git checkout-index -f -a
ok 3 - git checkout-index with -f should succeed.
expecting success: test -f path0 && test -d path1 && test -f path1/file1
ok 4 - git checkout-index conflicting paths.
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:
mkdir -p tar/get &&
ln -s tar/get there &&
echo first &&
git checkout-index -a -f --prefix=there/ &&
echo second &&
git checkout-index -a -f --prefix=there/
first
second
ok 5 - checkout-index -f twice with --prefix
expecting success: git update-index --add path2/file0
ok 6 - git update-index --add path2/file0
expecting success: tree1=$(git write-tree)
ok 7 - writing tree out with git write-tree
expecting success: git update-index --add path3/file1
ok 8 - git update-index --add path3/file1
expecting success: tree2=$(git write-tree)
ok 9 - writing tree out with git write-tree
expecting success: git read-tree -m $tree1 && git checkout-index -f -a
ok 10 - read previously written tree and checkout.
expecting success: test_ln_s_add path2 path3
ok 11 - add a symlink
expecting success: tree3=$(git write-tree)
ok 12 - writing tree out with git write-tree
expecting success: git read-tree $tree2 && git checkout-index -f -a
ok 13 - read previously written tree and checkout.
expecting success: test ! -h path2 && test -d path2 &&
test ! -h path3 && test -d path3 &&
test ! -h path2/file0 && test -f path2/file0 &&
test ! -h path3/file1 && test -f path3/file1
ok 14 - checking out conflicting path with -f
# passed all 14 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2002-checkout-cache-u.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2002-checkout-cache-u/.git/
expecting success:
echo frotz >path0 &&
git update-index --add path0 &&
t=$(git write-tree)
ok 1 - preparation
expecting success:
rm -f path0 &&
git read-tree $t &&
git checkout-index -f -a &&
test_must_fail git diff-files --exit-code
:100644 100644 8e4020bb5a8d8c873b25de15933e75cc0fc275df 0000000000000000000000000000000000000000 M path0
ok 2 - without -u, git checkout-index smudges stat information.
expecting success:
rm -f path0 &&
git read-tree $t &&
git checkout-index -u -f -a &&
git diff-files --exit-code
ok 3 - with -u, git checkout-index picks up stat information from new files.
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t0027-auto-crlf.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t0027-auto-crlf/.git/
expecting success:
test_when_finished "rm expect actual TeBi_*" &&
STRT=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA &&
STR=$STRT$STRT$STRT$STRT &&
printf "${STR}BBB\001" >TeBi_127_S &&
printf "${STR}BBBB\001">TeBi_128_S &&
printf "${STR}BBB\032" >TeBi_127_E &&
printf "\032${STR}BBB" >TeBi_E_127 &&
printf "${STR}BBBB\000">TeBi_128_N &&
printf "${STR}BBB\012">TeBi_128_L &&
printf "${STR}BBB\015">TeBi_127_C &&
printf "${STR}BB\015\012" >TeBi_126_CL &&
printf "${STR}BB\015\012\015" >TeBi_126_CLC &&
sort <<-\EOF >expect &&
i/ w/-text TeBi_127_S
i/ w/none TeBi_128_S
i/ w/none TeBi_127_E
i/ w/-text TeBi_E_127
i/ w/-text TeBi_128_N
i/ w/lf TeBi_128_L
i/ w/-text TeBi_127_C
i/ w/crlf TeBi_126_CL
i/ w/-text TeBi_126_CLC
EOF
git ls-files --eol -o |
sed -n -e "/TeBi_/{s!attr/[ ]*!!g
s! ! !g
s! *! !g
p
}" | sort >actual &&
test_cmp expect actual
ok 1 - ls-files --eol -o Text/Binary
expecting success:
echo >.gitattributes &&
git checkout -b master &&
git add .gitattributes &&
git commit -m "add .gitattributes" . &&
printf "\$Id: 0000000000000000000000000000000000000000 \$\nLINEONE\nLINETWO\nLINETHREE" >LF &&
printf "\$Id: 0000000000000000000000000000000000000000 \$\r\nLINEONE\r\nLINETWO\r\nLINETHREE" >CRLF &&
printf "\$Id: 0000000000000000000000000000000000000000 \$\nLINEONE\r\nLINETWO\nLINETHREE" >CRLF_mix_LF &&
printf "\$Id: 0000000000000000000000000000000000000000 \$\nLINEONE\nLINETWO\rLINETHREE" >LF_mix_CR &&
printf "\$Id: 0000000000000000000000000000000000000000 \$\r\nLINEONE\r\nLINETWO\rLINETHREE" >CRLF_mix_CR &&
printf "\$Id: 0000000000000000000000000000000000000000 \$\r\nLINEONEQ\r\nLINETWO\r\nLINETHREE" | q_to_nul >CRLF_nul &&
printf "\$Id: 0000000000000000000000000000000000000000 \$\nLINEONEQ\nLINETWO\nLINETHREE" | q_to_nul >LF_nul &&
create_NNO_MIX_files &&
git -c core.autocrlf=false add NNO_*.txt MIX_*.txt &&
git commit -m "mixed line endings" &&
test_tick
Switched to a new branch 'master'
[master (root-commit) 096a775] add .gitattributes
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 .gitattributes
[master d3ab52c] mixed line endings
Author: A U Thor <author@example.com>
360 files changed, 1260 insertions(+)
create mode 100644 MIX_attr_-text_aeol__false_CRLF.txt
create mode 100644 MIX_attr_-text_aeol__false_CRLF_mix_LF.txt
create mode 100644 MIX_attr_-text_aeol__false_CRLF_nul.txt
create mode 100644 MIX_attr_-text_aeol__false_LF.txt
create mode 100644 MIX_attr_-text_aeol__false_LF_mix_CR.txt
create mode 100644 MIX_attr_-text_aeol__input_CRLF.txt
create mode 100644 MIX_attr_-text_aeol__input_CRLF_mix_LF.txt
create mode 100644 MIX_attr_-text_aeol__input_CRLF_nul.txt
create mode 100644 MIX_attr_-text_aeol__input_LF.txt
create mode 100644 MIX_attr_-text_aeol__input_LF_mix_CR.txt
create mode 100644 MIX_attr_-text_aeol__true_CRLF.txt
create mode 100644 MIX_attr_-text_aeol__true_CRLF_mix_LF.txt
create mode 100644 MIX_attr_-text_aeol__true_CRLF_nul.txt
create mode 100644 MIX_attr_-text_aeol__true_LF.txt
create mode 100644 MIX_attr_-text_aeol__true_LF_mix_CR.txt
create mode 100644 MIX_attr_-text_aeol_crlf_false_CRLF.txt
create mode 100644 MIX_attr_-text_aeol_crlf_false_CRLF_mix_LF.txt
create mode 100644 MIX_attr_-text_aeol_crlf_false_CRLF_nul.txt
create mode 100644 MIX_attr_-text_aeol_crlf_false_LF.txt
create mode 100644 MIX_attr_-text_aeol_crlf_false_LF_mix_CR.txt
create mode 100644 MIX_attr_-text_aeol_crlf_input_CRLF.txt
create mode 100644 MIX_attr_-text_aeol_crlf_input_CRLF_mix_LF.txt
create mode 100644 MIX_attr_-text_aeol_crlf_input_CRLF_nul.txt
create mode 100644 MIX_attr_-text_aeol_crlf_input_LF.txt
create mode 100644 MIX_attr_-text_aeol_crlf_input_LF_mix_CR.txt
create mode 100644 MIX_attr_-text_aeol_crlf_true_CRLF.txt
create mode 100644 MIX_attr_-text_aeol_crlf_true_CRLF_mix_LF.txt
create mode 100644 MIX_attr_-text_aeol_crlf_true_CRLF_nul.txt
create mode 100644 MIX_attr_-text_aeol_crlf_true_LF.txt
create mode 100644 MIX_attr_-text_aeol_crlf_true_LF_mix_CR.txt
create mode 100644 MIX_attr_-text_aeol_lf_false_CRLF.txt
create mode 100644 MIX_attr_-text_aeol_lf_false_CRLF_mix_LF.txt
create mode 100644 MIX_attr_-text_aeol_lf_false_CRLF_nul.txt
create mode 100644 MIX_attr_-text_aeol_lf_false_LF.txt
create mode 100644 MIX_attr_-text_aeol_lf_false_LF_mix_CR.txt
create mode 100644 MIX_attr_-text_aeol_lf_input_CRLF.txt
create mode 100644 MIX_attr_-text_aeol_lf_input_CRLF_mix_LF.txt
create mode 100644 MIX_attr_-text_aeol_lf_input_CRLF_nul.txt
create mode 100644 MIX_attr_-text_aeol_lf_input_LF.txt
create mode 100644 MIX_attr_-text_aeol_lf_input_LF_mix_CR.txt
create mode 100644 MIX_attr_-text_aeol_lf_true_CRLF.txt
create mode 100644 MIX_attr_-text_aeol_lf_true_CRLF_mix_LF.txt
create mode 100644 MIX_attr_-text_aeol_lf_true_CRLF_nul.txt
create mode 100644 MIX_attr_-text_aeol_lf_true_LF.txt
create mode 100644 MIX_attr_-text_aeol_lf_true_LF_mix_CR.txt
create mode 100644 MIX_attr__aeol__false_CRLF.txt
create mode 100644 MIX_attr__aeol__false_CRLF_mix_LF.txt
create mode 100644 MIX_attr__aeol__false_CRLF_nul.txt
create mode 100644 MIX_attr__aeol__false_LF.txt
create mode 100644 MIX_attr__aeol__false_LF_mix_CR.txt
create mode 100644 MIX_attr__aeol__input_CRLF.txt
create mode 100644 MIX_attr__aeol__input_CRLF_mix_LF.txt
create mode 100644 MIX_attr__aeol__input_CRLF_nul.txt
create mode 100644 MIX_attr__aeol__input_LF.txt
create mode 100644 MIX_attr__aeol__input_LF_mix_CR.txt
create mode 100644 MIX_attr__aeol__true_CRLF.txt
create mode 100644 MIX_attr__aeol__true_CRLF_mix_LF.txt
create mode 100644 MIX_attr__aeol__true_CRLF_nul.txt
create mode 100644 MIX_attr__aeol__true_LF.txt
create mode 100644 MIX_attr__aeol__true_LF_mix_CR.txt
create mode 100644 MIX_attr__aeol_crlf_false_CRLF.txt
create mode 100644 MIX_attr__aeol_crlf_false_CRLF_mix_LF.txt
create mode 100644 MIX_attr__aeol_crlf_false_CRLF_nul.txt
create mode 100644 MIX_attr__aeol_crlf_false_LF.txt
create mode 100644 MIX_attr__aeol_crlf_false_LF_mix_CR.txt
create mode 100644 MIX_attr__aeol_crlf_input_CRLF.txt
create mode 100644 MIX_attr__aeol_crlf_input_CRLF_mix_LF.txt
create mode 100644 MIX_attr__aeol_crlf_input_CRLF_nul.txt
create mode 100644 MIX_attr__aeol_crlf_input_LF.txt
create mode 100644 MIX_attr__aeol_crlf_input_LF_mix_CR.txt
create mode 100644 MIX_attr__aeol_crlf_true_CRLF.txt
create mode 100644 MIX_attr__aeol_crlf_true_CRLF_mix_LF.txt
create mode 100644 MIX_attr__aeol_crlf_true_CRLF_nul.txt
create mode 100644 MIX_attr__aeol_crlf_true_LF.txt
create mode 100644 MIX_attr__aeol_crlf_true_LF_mix_CR.txt
create mode 100644 MIX_attr__aeol_lf_false_CRLF.txt
create mode 100644 MIX_attr__aeol_lf_false_CRLF_mix_LF.txt
create mode 100644 MIX_attr__aeol_lf_false_CRLF_nul.txt
create mode 100644 MIX_attr__aeol_lf_false_LF.txt
create mode 100644 MIX_attr__aeol_lf_false_LF_mix_CR.txt
create mode 100644 MIX_attr__aeol_lf_input_CRLF.txt
create mode 100644 MIX_attr__aeol_lf_input_CRLF_mix_LF.txt
create mode 100644 MIX_attr__aeol_lf_input_CRLF_nul.txt
create mode 100644 MIX_attr__aeol_lf_input_LF.txt
create mode 100644 MIX_attr__aeol_lf_input_LF_mix_CR.txt
create mode 100644 MIX_attr__aeol_lf_true_CRLF.txt
create mode 100644 MIX_attr__aeol_lf_true_CRLF_mix_LF.txt
create mode 100644 MIX_attr__aeol_lf_true_CRLF_nul.txt
create mode 100644 MIX_attr__aeol_lf_true_LF.txt
create mode 100644 MIX_attr__aeol_lf_true_LF_mix_CR.txt
create mode 100644 MIX_attr_auto_aeol__false_CRLF.txt
create mode 100644 MIX_attr_auto_aeol__false_CRLF_mix_LF.txt
create mode 100644 MIX_attr_auto_aeol__false_CRLF_nul.txt
create mode 100644 MIX_attr_auto_aeol__false_LF.txt
create mode 100644 MIX_attr_auto_aeol__false_LF_mix_CR.txt
create mode 100644 MIX_attr_auto_aeol__input_CRLF.txt
create mode 100644 MIX_attr_auto_aeol__input_CRLF_mix_LF.txt
create mode 100644 MIX_attr_auto_aeol__input_CRLF_nul.txt
create mode 100644 MIX_attr_auto_aeol__input_LF.txt
create mode 100644 MIX_attr_auto_aeol__input_LF_mix_CR.txt
create mode 100644 MIX_attr_auto_aeol__true_CRLF.txt
create mode 100644 MIX_attr_auto_aeol__true_CRLF_mix_LF.txt
create mode 100644 MIX_attr_auto_aeol__true_CRLF_nul.txt
create mode 100644 MIX_attr_auto_aeol__true_LF.txt
create mode 100644 MIX_attr_auto_aeol__true_LF_mix_CR.txt
create mode 100644 MIX_attr_auto_aeol_crlf_false_CRLF.txt
create mode 100644 MIX_attr_auto_aeol_crlf_false_CRLF_mix_LF.txt
create mode 100644 MIX_attr_auto_aeol_crlf_false_CRLF_nul.txt
create mode 100644 MIX_attr_auto_aeol_crlf_false_LF.txt
create mode 100644 MIX_attr_auto_aeol_crlf_false_LF_mix_CR.txt
create mode 100644 MIX_attr_auto_aeol_crlf_input_CRLF.txt
create mode 100644 MIX_attr_auto_aeol_crlf_input_CRLF_mix_LF.txt
create mode 100644 MIX_attr_auto_aeol_crlf_input_CRLF_nul.txt
create mode 100644 MIX_attr_auto_aeol_crlf_input_LF.txt
create mode 100644 MIX_attr_auto_aeol_crlf_input_LF_mix_CR.txt
create mode 100644 MIX_attr_auto_aeol_crlf_true_CRLF.txt
create mode 100644 MIX_attr_auto_aeol_crlf_true_CRLF_mix_LF.txt
create mode 100644 MIX_attr_auto_aeol_crlf_true_CRLF_nul.txt
create mode 100644 MIX_attr_auto_aeol_crlf_true_LF.txt
create mode 100644 MIX_attr_auto_aeol_crlf_true_LF_mix_CR.txt
create mode 100644 MIX_attr_auto_aeol_lf_false_CRLF.txt
create mode 100644 MIX_attr_auto_aeol_lf_false_CRLF_mix_LF.txt
create mode 100644 MIX_attr_auto_aeol_lf_false_CRLF_nul.txt
create mode 100644 MIX_attr_auto_aeol_lf_false_LF.txt
create mode 100644 MIX_attr_auto_aeol_lf_false_LF_mix_CR.txt
create mode 100644 MIX_attr_auto_aeol_lf_input_CRLF.txt
create mode 100644 MIX_attr_auto_aeol_lf_input_CRLF_mix_LF.txt
create mode 100644 MIX_attr_auto_aeol_lf_input_CRLF_nul.txt
create mode 100644 MIX_attr_auto_aeol_lf_input_LF.txt
create mode 100644 MIX_attr_auto_aeol_lf_input_LF_mix_CR.txt
create mode 100644 MIX_attr_auto_aeol_lf_true_CRLF.txt
create mode 100644 MIX_attr_auto_aeol_lf_true_CRLF_mix_LF.txt
create mode 100644 MIX_attr_auto_aeol_lf_true_CRLF_nul.txt
create mode 100644 MIX_attr_auto_aeol_lf_true_LF.txt
create mode 100644 MIX_attr_auto_aeol_lf_true_LF_mix_CR.txt
create mode 100644 MIX_attr_text_aeol__false_CRLF.txt
create mode 100644 MIX_attr_text_aeol__false_CRLF_mix_LF.txt
create mode 100644 MIX_attr_text_aeol__false_CRLF_nul.txt
create mode 100644 MIX_attr_text_aeol__false_LF.txt
create mode 100644 MIX_attr_text_aeol__false_LF_mix_CR.txt
create mode 100644 MIX_attr_text_aeol__input_CRLF.txt
create mode 100644 MIX_attr_text_aeol__input_CRLF_mix_LF.txt
create mode 100644 MIX_attr_text_aeol__input_CRLF_nul.txt
create mode 100644 MIX_attr_text_aeol__input_LF.txt
create mode 100644 MIX_attr_text_aeol__input_LF_mix_CR.txt
create mode 100644 MIX_attr_text_aeol__true_CRLF.txt
create mode 100644 MIX_attr_text_aeol__true_CRLF_mix_LF.txt
create mode 100644 MIX_attr_text_aeol__true_CRLF_nul.txt
create mode 100644 MIX_attr_text_aeol__true_LF.txt
create mode 100644 MIX_attr_text_aeol__true_LF_mix_CR.txt
create mode 100644 MIX_attr_text_aeol_crlf_false_CRLF.txt
create mode 100644 MIX_attr_text_aeol_crlf_false_CRLF_mix_LF.txt
create mode 100644 MIX_attr_text_aeol_crlf_false_CRLF_nul.txt
create mode 100644 MIX_attr_text_aeol_crlf_false_LF.txt
create mode 100644 MIX_attr_text_aeol_crlf_false_LF_mix_CR.txt
create mode 100644 MIX_attr_text_aeol_crlf_input_CRLF.txt
create mode 100644 MIX_attr_text_aeol_crlf_input_CRLF_mix_LF.txt
create mode 100644 MIX_attr_text_aeol_crlf_input_CRLF_nul.txt
create mode 100644 MIX_attr_text_aeol_crlf_input_LF.txt
create mode 100644 MIX_attr_text_aeol_crlf_input_LF_mix_CR.txt
create mode 100644 MIX_attr_text_aeol_crlf_true_CRLF.txt
create mode 100644 MIX_attr_text_aeol_crlf_true_CRLF_mix_LF.txt
create mode 100644 MIX_attr_text_aeol_crlf_true_CRLF_nul.txt
create mode 100644 MIX_attr_text_aeol_crlf_true_LF.txt
create mode 100644 MIX_attr_text_aeol_crlf_true_LF_mix_CR.txt
create mode 100644 MIX_attr_text_aeol_lf_false_CRLF.txt
create mode 100644 MIX_attr_text_aeol_lf_false_CRLF_mix_LF.txt
create mode 100644 MIX_attr_text_aeol_lf_false_CRLF_nul.txt
create mode 100644 MIX_attr_text_aeol_lf_false_LF.txt
create mode 100644 MIX_attr_text_aeol_lf_false_LF_mix_CR.txt
create mode 100644 MIX_attr_text_aeol_lf_input_CRLF.txt
create mode 100644 MIX_attr_text_aeol_lf_input_CRLF_mix_LF.txt
create mode 100644 MIX_attr_text_aeol_lf_input_CRLF_nul.txt
create mode 100644 MIX_attr_text_aeol_lf_input_LF.txt
create mode 100644 MIX_attr_text_aeol_lf_input_LF_mix_CR.txt
create mode 100644 MIX_attr_text_aeol_lf_true_CRLF.txt
create mode 100644 MIX_attr_text_aeol_lf_true_CRLF_mix_LF.txt
create mode 100644 MIX_attr_text_aeol_lf_true_CRLF_nul.txt
create mode 100644 MIX_attr_text_aeol_lf_true_LF.txt
create mode 100644 MIX_attr_text_aeol_lf_true_LF_mix_CR.txt
create mode 100644 NNO_attr_-text_aeol__false_CRLF.txt
create mode 100644 NNO_attr_-text_aeol__false_CRLF_mix_LF.txt
create mode 100644 NNO_attr_-text_aeol__false_CRLF_nul.txt
create mode 100644 NNO_attr_-text_aeol__false_LF.txt
create mode 100644 NNO_attr_-text_aeol__false_LF_mix_CR.txt
create mode 100644 NNO_attr_-text_aeol__input_CRLF.txt
create mode 100644 NNO_attr_-text_aeol__input_CRLF_mix_LF.txt
create mode 100644 NNO_attr_-text_aeol__input_CRLF_nul.txt
create mode 100644 NNO_attr_-text_aeol__input_LF.txt
create mode 100644 NNO_attr_-text_aeol__input_LF_mix_CR.txt
create mode 100644 NNO_attr_-text_aeol__true_CRLF.txt
create mode 100644 NNO_attr_-text_aeol__true_CRLF_mix_LF.txt
create mode 100644 NNO_attr_-text_aeol__true_CRLF_nul.txt
create mode 100644 NNO_attr_-text_aeol__true_LF.txt
create mode 100644 NNO_attr_-text_aeol__true_LF_mix_CR.txt
create mode 100644 NNO_attr_-text_aeol_crlf_false_CRLF.txt
create mode 100644 NNO_attr_-text_aeol_crlf_false_CRLF_mix_LF.txt
create mode 100644 NNO_attr_-text_aeol_crlf_false_CRLF_nul.txt
create mode 100644 NNO_attr_-text_aeol_crlf_false_LF.txt
create mode 100644 NNO_attr_-text_aeol_crlf_false_LF_mix_CR.txt
create mode 100644 NNO_attr_-text_aeol_crlf_input_CRLF.txt
create mode 100644 NNO_attr_-text_aeol_crlf_input_CRLF_mix_LF.txt
create mode 100644 NNO_attr_-text_aeol_crlf_input_CRLF_nul.txt
create mode 100644 NNO_attr_-text_aeol_crlf_input_LF.txt
create mode 100644 NNO_attr_-text_aeol_crlf_input_LF_mix_CR.txt
create mode 100644 NNO_attr_-text_aeol_crlf_true_CRLF.txt
create mode 100644 NNO_attr_-text_aeol_crlf_true_CRLF_mix_LF.txt
create mode 100644 NNO_attr_-text_aeol_crlf_true_CRLF_nul.txt
create mode 100644 NNO_attr_-text_aeol_crlf_true_LF.txt
create mode 100644 NNO_attr_-text_aeol_crlf_true_LF_mix_CR.txt
create mode 100644 NNO_attr_-text_aeol_lf_false_CRLF.txt
create mode 100644 NNO_attr_-text_aeol_lf_false_CRLF_mix_LF.txt
create mode 100644 NNO_attr_-text_aeol_lf_false_CRLF_nul.txt
create mode 100644 NNO_attr_-text_aeol_lf_false_LF.txt
create mode 100644 NNO_attr_-text_aeol_lf_false_LF_mix_CR.txt
create mode 100644 NNO_attr_-text_aeol_lf_input_CRLF.txt
create mode 100644 NNO_attr_-text_aeol_lf_input_CRLF_mix_LF.txt
create mode 100644 NNO_attr_-text_aeol_lf_input_CRLF_nul.txt
create mode 100644 NNO_attr_-text_aeol_lf_input_LF.txt
create mode 100644 NNO_attr_-text_aeol_lf_input_LF_mix_CR.txt
create mode 100644 NNO_attr_-text_aeol_lf_true_CRLF.txt
create mode 100644 NNO_attr_-text_aeol_lf_true_CRLF_mix_LF.txt
create mode 100644 NNO_attr_-text_aeol_lf_true_CRLF_nul.txt
create mode 100644 NNO_attr_-text_aeol_lf_true_LF.txt
create mode 100644 NNO_attr_-text_aeol_lf_true_LF_mix_CR.txt
create mode 100644 NNO_attr__aeol__false_CRLF.txt
create mode 100644 NNO_attr__aeol__false_CRLF_mix_LF.txt
create mode 100644 NNO_attr__aeol__false_CRLF_nul.txt
create mode 100644 NNO_attr__aeol__false_LF.txt
create mode 100644 NNO_attr__aeol__false_LF_mix_CR.txt
create mode 100644 NNO_attr__aeol__input_CRLF.txt
create mode 100644 NNO_attr__aeol__input_CRLF_mix_LF.txt
create mode 100644 NNO_attr__aeol__input_CRLF_nul.txt
create mode 100644 NNO_attr__aeol__input_LF.txt
create mode 100644 NNO_attr__aeol__input_LF_mix_CR.txt
create mode 100644 NNO_attr__aeol__true_CRLF.txt
create mode 100644 NNO_attr__aeol__true_CRLF_mix_LF.txt
create mode 100644 NNO_attr__aeol__true_CRLF_nul.txt
create mode 100644 NNO_attr__aeol__true_LF.txt
create mode 100644 NNO_attr__aeol__true_LF_mix_CR.txt
create mode 100644 NNO_attr__aeol_crlf_false_CRLF.txt
create mode 100644 NNO_attr__aeol_crlf_false_CRLF_mix_LF.txt
create mode 100644 NNO_attr__aeol_crlf_false_CRLF_nul.txt
create mode 100644 NNO_attr__aeol_crlf_false_LF.txt
create mode 100644 NNO_attr__aeol_crlf_false_LF_mix_CR.txt
create mode 100644 NNO_attr__aeol_crlf_input_CRLF.txt
create mode 100644 NNO_attr__aeol_crlf_input_CRLF_mix_LF.txt
create mode 100644 NNO_attr__aeol_crlf_input_CRLF_nul.txt
create mode 100644 NNO_attr__aeol_crlf_input_LF.txt
create mode 100644 NNO_attr__aeol_crlf_input_LF_mix_CR.txt
create mode 100644 NNO_attr__aeol_crlf_true_CRLF.txt
create mode 100644 NNO_attr__aeol_crlf_true_CRLF_mix_LF.txt
create mode 100644 NNO_attr__aeol_crlf_true_CRLF_nul.txt
create mode 100644 NNO_attr__aeol_crlf_true_LF.txt
create mode 100644 NNO_attr__aeol_crlf_true_LF_mix_CR.txt
create mode 100644 NNO_attr__aeol_lf_false_CRLF.txt
create mode 100644 NNO_attr__aeol_lf_false_CRLF_mix_LF.txt
create mode 100644 NNO_attr__aeol_lf_false_CRLF_nul.txt
create mode 100644 NNO_attr__aeol_lf_false_LF.txt
create mode 100644 NNO_attr__aeol_lf_false_LF_mix_CR.txt
create mode 100644 NNO_attr__aeol_lf_input_CRLF.txt
create mode 100644 NNO_attr__aeol_lf_input_CRLF_mix_LF.txt
create mode 100644 NNO_attr__aeol_lf_input_CRLF_nul.txt
create mode 100644 NNO_attr__aeol_lf_input_LF.txt
create mode 100644 NNO_attr__aeol_lf_input_LF_mix_CR.txt
create mode 100644 NNO_attr__aeol_lf_true_CRLF.txt
create mode 100644 NNO_attr__aeol_lf_true_CRLF_mix_LF.txt
create mode 100644 NNO_attr__aeol_lf_true_CRLF_nul.txt
create mode 100644 NNO_attr__aeol_lf_true_LF.txt
create mode 100644 NNO_attr__aeol_lf_true_LF_mix_CR.txt
create mode 100644 NNO_attr_auto_aeol__false_CRLF.txt
create mode 100644 NNO_attr_auto_aeol__false_CRLF_mix_LF.txt
create mode 100644 NNO_attr_auto_aeol__false_CRLF_nul.txt
create mode 100644 NNO_attr_auto_aeol__false_LF.txt
create mode 100644 NNO_attr_auto_aeol__false_LF_mix_CR.txt
create mode 100644 NNO_attr_auto_aeol__input_CRLF.txt
create mode 100644 NNO_attr_auto_aeol__input_CRLF_mix_LF.txt
create mode 100644 NNO_attr_auto_aeol__input_CRLF_nul.txt
create mode 100644 NNO_attr_auto_aeol__input_LF.txt
create mode 100644 NNO_attr_auto_aeol__input_LF_mix_CR.txt
create mode 100644 NNO_attr_auto_aeol__true_CRLF.txt
create mode 100644 NNO_attr_auto_aeol__true_CRLF_mix_LF.txt
create mode 100644 NNO_attr_auto_aeol__true_CRLF_nul.txt
create mode 100644 NNO_attr_auto_aeol__true_LF.txt
create mode 100644 NNO_attr_auto_aeol__true_LF_mix_CR.txt
create mode 100644 NNO_attr_auto_aeol_crlf_false_CRLF.txt
create mode 100644 NNO_attr_auto_aeol_crlf_false_CRLF_mix_LF.txt
create mode 100644 NNO_attr_auto_aeol_crlf_false_CRLF_nul.txt
create mode 100644 NNO_attr_auto_aeol_crlf_false_LF.txt
create mode 100644 NNO_attr_auto_aeol_crlf_false_LF_mix_CR.txt
create mode 100644 NNO_attr_auto_aeol_crlf_input_CRLF.txt
create mode 100644 NNO_attr_auto_aeol_crlf_input_CRLF_mix_LF.txt
create mode 100644 NNO_attr_auto_aeol_crlf_input_CRLF_nul.txt
create mode 100644 NNO_attr_auto_aeol_crlf_input_LF.txt
create mode 100644 NNO_attr_auto_aeol_crlf_input_LF_mix_CR.txt
create mode 100644 NNO_attr_auto_aeol_crlf_true_CRLF.txt
create mode 100644 NNO_attr_auto_aeol_crlf_true_CRLF_mix_LF.txt
create mode 100644 NNO_attr_auto_aeol_crlf_true_CRLF_nul.txt
create mode 100644 NNO_attr_auto_aeol_crlf_true_LF.txt
create mode 100644 NNO_attr_auto_aeol_crlf_true_LF_mix_CR.txt
create mode 100644 NNO_attr_auto_aeol_lf_false_CRLF.txt
create mode 100644 NNO_attr_auto_aeol_lf_false_CRLF_mix_LF.txt
create mode 100644 NNO_attr_auto_aeol_lf_false_CRLF_nul.txt
create mode 100644 NNO_attr_auto_aeol_lf_false_LF.txt
create mode 100644 NNO_attr_auto_aeol_lf_false_LF_mix_CR.txt
create mode 100644 NNO_attr_auto_aeol_lf_input_CRLF.txt
create mode 100644 NNO_attr_auto_aeol_lf_input_CRLF_mix_LF.txt
create mode 100644 NNO_attr_auto_aeol_lf_input_CRLF_nul.txt
create mode 100644 NNO_attr_auto_aeol_lf_input_LF.txt
create mode 100644 NNO_attr_auto_aeol_lf_input_LF_mix_CR.txt
create mode 100644 NNO_attr_auto_aeol_lf_true_CRLF.txt
create mode 100644 NNO_attr_auto_aeol_lf_true_CRLF_mix_LF.txt
create mode 100644 NNO_attr_auto_aeol_lf_true_CRLF_nul.txt
create mode 100644 NNO_attr_auto_aeol_lf_true_LF.txt
create mode 100644 NNO_attr_auto_aeol_lf_true_LF_mix_CR.txt
create mode 100644 NNO_attr_text_aeol__false_CRLF.txt
create mode 100644 NNO_attr_text_aeol__false_CRLF_mix_LF.txt
create mode 100644 NNO_attr_text_aeol__false_CRLF_nul.txt
create mode 100644 NNO_attr_text_aeol__false_LF.txt
create mode 100644 NNO_attr_text_aeol__false_LF_mix_CR.txt
create mode 100644 NNO_attr_text_aeol__input_CRLF.txt
create mode 100644 NNO_attr_text_aeol__input_CRLF_mix_LF.txt
create mode 100644 NNO_attr_text_aeol__input_CRLF_nul.txt
create mode 100644 NNO_attr_text_aeol__input_LF.txt
create mode 100644 NNO_attr_text_aeol__input_LF_mix_CR.txt
create mode 100644 NNO_attr_text_aeol__true_CRLF.txt
create mode 100644 NNO_attr_text_aeol__true_CRLF_mix_LF.txt
create mode 100644 NNO_attr_text_aeol__true_CRLF_nul.txt
create mode 100644 NNO_attr_text_aeol__true_LF.txt
create mode 100644 NNO_attr_text_aeol__true_LF_mix_CR.txt
create mode 100644 NNO_attr_text_aeol_crlf_false_CRLF.txt
create mode 100644 NNO_attr_text_aeol_crlf_false_CRLF_mix_LF.txt
create mode 100644 NNO_attr_text_aeol_crlf_false_CRLF_nul.txt
create mode 100644 NNO_attr_text_aeol_crlf_false_LF.txt
create mode 100644 NNO_attr_text_aeol_crlf_false_LF_mix_CR.txt
create mode 100644 NNO_attr_text_aeol_crlf_input_CRLF.txt
create mode 100644 NNO_attr_text_aeol_crlf_input_CRLF_mix_LF.txt
create mode 100644 NNO_attr_text_aeol_crlf_input_CRLF_nul.txt
create mode 100644 NNO_attr_text_aeol_crlf_input_LF.txt
create mode 100644 NNO_attr_text_aeol_crlf_input_LF_mix_CR.txt
create mode 100644 NNO_attr_text_aeol_crlf_true_CRLF.txt
create mode 100644 NNO_attr_text_aeol_crlf_true_CRLF_mix_LF.txt
create mode 100644 NNO_attr_text_aeol_crlf_true_CRLF_nul.txt
create mode 100644 NNO_attr_text_aeol_crlf_true_LF.txt
create mode 100644 NNO_attr_text_aeol_crlf_true_LF_mix_CR.txt
create mode 100644 NNO_attr_text_aeol_lf_false_CRLF.txt
create mode 100644 NNO_attr_text_aeol_lf_false_CRLF_mix_LF.txt
create mode 100644 NNO_attr_text_aeol_lf_false_CRLF_nul.txt
create mode 100644 NNO_attr_text_aeol_lf_false_LF.txt
create mode 100644 NNO_attr_text_aeol_lf_false_LF_mix_CR.txt
create mode 100644 NNO_attr_text_aeol_lf_input_CRLF.txt
create mode 100644 NNO_attr_text_aeol_lf_input_CRLF_mix_LF.txt
create mode 100644 NNO_attr_text_aeol_lf_input_CRLF_nul.txt
create mode 100644 NNO_attr_text_aeol_lf_input_LF.txt
create mode 100644 NNO_attr_text_aeol_lf_input_LF_mix_CR.txt
create mode 100644 NNO_attr_text_aeol_lf_true_CRLF.txt
create mode 100644 NNO_attr_text_aeol_lf_true_CRLF_mix_LF.txt
create mode 100644 NNO_attr_text_aeol_lf_true_CRLF_nul.txt
create mode 100644 NNO_attr_text_aeol_lf_true_LF.txt
create mode 100644 NNO_attr_text_aeol_lf_true_LF_mix_CR.txt
ok 2 - setup master
expecting success:
commit_check_warn false "" "" "" "" "" "" &&
commit_check_warn true "" "LF_CRLF" "" "LF_CRLF" "" "" &&
commit_check_warn input "" "" "CRLF_LF" "CRLF_LF" "" ""
[master b792e6a] core.autocrlf false
Author: A U Thor <author@example.com>
6 files changed, 15 insertions(+)
create mode 100644 crlf_false_attr__CRLF.txt
create mode 100644 crlf_false_attr__CRLF_mix_LF.txt
create mode 100644 crlf_false_attr__CRLF_nul.txt
create mode 100644 crlf_false_attr__LF.txt
create mode 100644 crlf_false_attr__LF_mix_CR.txt
create mode 100644 crlf_false_attr__LF_nul.txt
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
[master 0e823bf] core.autocrlf true
Author: A U Thor <author@example.com>
6 files changed, 15 insertions(+)
create mode 100644 crlf_true_attr__CRLF.txt
create mode 100644 crlf_true_attr__CRLF_mix_LF.txt
create mode 100644 crlf_true_attr__CRLF_nul.txt
create mode 100644 crlf_true_attr__LF.txt
create mode 100644 crlf_true_attr__LF_mix_CR.txt
create mode 100644 crlf_true_attr__LF_nul.txt
[master 4541fad] core.autocrlf input
Author: A U Thor <author@example.com>
6 files changed, 15 insertions(+)
create mode 100644 crlf_input_attr__CRLF.txt
create mode 100644 crlf_input_attr__CRLF_mix_LF.txt
create mode 100644 crlf_input_attr__CRLF_nul.txt
create mode 100644 crlf_input_attr__LF.txt
create mode 100644 crlf_input_attr__LF_mix_CR.txt
create mode 100644 crlf_input_attr__LF_nul.txt
ok 3 - commit files empty attr
expecting success:
commit_check_warn false "auto" "$WILC" "$WICL" "$WAMIX" "" "" &&
commit_check_warn true "auto" "LF_CRLF" "" "LF_CRLF" "" "" &&
commit_check_warn input "auto" "" "CRLF_LF" "CRLF_LF" "" ""
[master aab5d7c] core.autocrlf false
Author: A U Thor <author@example.com>
6 files changed, 15 insertions(+)
create mode 100644 crlf_false_attr_auto_CRLF.txt
create mode 100644 crlf_false_attr_auto_CRLF_mix_LF.txt
create mode 100644 crlf_false_attr_auto_CRLF_nul.txt
create mode 100644 crlf_false_attr_auto_LF.txt
create mode 100644 crlf_false_attr_auto_LF_mix_CR.txt
create mode 100644 crlf_false_attr_auto_LF_nul.txt
[master 03a4252] core.autocrlf true
Author: A U Thor <author@example.com>
6 files changed, 15 insertions(+)
create mode 100644 crlf_true_attr_auto_CRLF.txt
create mode 100644 crlf_true_attr_auto_CRLF_mix_LF.txt
create mode 100644 crlf_true_attr_auto_CRLF_nul.txt
create mode 100644 crlf_true_attr_auto_LF.txt
create mode 100644 crlf_true_attr_auto_LF_mix_CR.txt
create mode 100644 crlf_true_attr_auto_LF_nul.txt
[master 4b4733f] core.autocrlf input
Author: A U Thor <author@example.com>
6 files changed, 15 insertions(+)
create mode 100644 crlf_input_attr_auto_CRLF.txt
create mode 100644 crlf_input_attr_auto_CRLF_mix_LF.txt
create mode 100644 crlf_input_attr_auto_CRLF_nul.txt
create mode 100644 crlf_input_attr_auto_LF.txt
create mode 100644 crlf_input_attr_auto_LF_mix_CR.txt
create mode 100644 crlf_input_attr_auto_LF_nul.txt
ok 4 - commit files attr=auto
expecting success:
commit_check_warn false "text" "$WILC" "$WICL" "$WAMIX" "$WILC" "$WICL" &&
commit_check_warn true "text" "LF_CRLF" "" "LF_CRLF" "LF_CRLF" "" &&
commit_check_warn input "text" "" "CRLF_LF" "CRLF_LF" "" "CRLF_LF"
[master 4b09810] core.autocrlf false
Author: A U Thor <author@example.com>
6 files changed, 15 insertions(+)
create mode 100644 crlf_false_attr_text_CRLF.txt
create mode 100644 crlf_false_attr_text_CRLF_mix_LF.txt
create mode 100644 crlf_false_attr_text_CRLF_nul.txt
create mode 100644 crlf_false_attr_text_LF.txt
create mode 100644 crlf_false_attr_text_LF_mix_CR.txt
create mode 100644 crlf_false_attr_text_LF_nul.txt
[master e5285f2] core.autocrlf true
Author: A U Thor <author@example.com>
6 files changed, 15 insertions(+)
create mode 100644 crlf_true_attr_text_CRLF.txt
create mode 100644 crlf_true_attr_text_CRLF_mix_LF.txt
create mode 100644 crlf_true_attr_text_CRLF_nul.txt
create mode 100644 crlf_true_attr_text_LF.txt
create mode 100644 crlf_true_attr_text_LF_mix_CR.txt
create mode 100644 crlf_true_attr_text_LF_nul.txt
[master 6178545] core.autocrlf input
Author: A U Thor <author@example.com>
6 files changed, 15 insertions(+)
create mode 100644 crlf_input_attr_text_CRLF.txt
create mode 100644 crlf_input_attr_text_CRLF_mix_LF.txt
create mode 100644 crlf_input_attr_text_CRLF_nul.txt
create mode 100644 crlf_input_attr_text_LF.txt
create mode 100644 crlf_input_attr_text_LF_mix_CR.txt
create mode 100644 crlf_input_attr_text_LF_nul.txt
ok 5 - commit files attr=text
expecting success:
commit_check_warn false "-text" "" "" "" "" "" &&
commit_check_warn true "-text" "" "" "" "" "" &&
commit_check_warn input "-text" "" "" "" "" ""
[master cbe27e2] core.autocrlf false
Author: A U Thor <author@example.com>
6 files changed, 15 insertions(+)
create mode 100644 crlf_false_attr_-text_CRLF.txt
create mode 100644 crlf_false_attr_-text_CRLF_mix_LF.txt
create mode 100644 crlf_false_attr_-text_CRLF_nul.txt
create mode 100644 crlf_false_attr_-text_LF.txt
create mode 100644 crlf_false_attr_-text_LF_mix_CR.txt
create mode 100644 crlf_false_attr_-text_LF_nul.txt
[master 4193257] core.autocrlf true
Author: A U Thor <author@example.com>
6 files changed, 15 insertions(+)
create mode 100644 crlf_true_attr_-text_CRLF.txt
create mode 100644 crlf_true_attr_-text_CRLF_mix_LF.txt
create mode 100644 crlf_true_attr_-text_CRLF_nul.txt
create mode 100644 crlf_true_attr_-text_LF.txt
create mode 100644 crlf_true_attr_-text_LF_mix_CR.txt
create mode 100644 crlf_true_attr_-text_LF_nul.txt
[master 7c96684] core.autocrlf input
Author: A U Thor <author@example.com>
6 files changed, 15 insertions(+)
create mode 100644 crlf_input_attr_-text_CRLF.txt
create mode 100644 crlf_input_attr_-text_CRLF_mix_LF.txt
create mode 100644 crlf_input_attr_-text_CRLF_nul.txt
create mode 100644 crlf_input_attr_-text_LF.txt
create mode 100644 crlf_input_attr_-text_LF_mix_CR.txt
create mode 100644 crlf_input_attr_-text_LF_nul.txt
ok 6 - commit files attr=-text
expecting success:
commit_check_warn false "lf" "" "CRLF_LF" "CRLF_LF" "" "CRLF_LF" &&
commit_check_warn true "lf" "" "CRLF_LF" "CRLF_LF" "" "CRLF_LF" &&
commit_check_warn input "lf" "" "CRLF_LF" "CRLF_LF" "" "CRLF_LF"
[master c446f2a] core.autocrlf false
Author: A U Thor <author@example.com>
6 files changed, 15 insertions(+)
create mode 100644 crlf_false_attr_lf_CRLF.txt
create mode 100644 crlf_false_attr_lf_CRLF_mix_LF.txt
create mode 100644 crlf_false_attr_lf_CRLF_nul.txt
create mode 100644 crlf_false_attr_lf_LF.txt
create mode 100644 crlf_false_attr_lf_LF_mix_CR.txt
create mode 100644 crlf_false_attr_lf_LF_nul.txt
[master aa386da] core.autocrlf true
Author: A U Thor <author@example.com>
6 files changed, 15 insertions(+)
create mode 100644 crlf_true_attr_lf_CRLF.txt
create mode 100644 crlf_true_attr_lf_CRLF_mix_LF.txt
create mode 100644 crlf_true_attr_lf_CRLF_nul.txt
create mode 100644 crlf_true_attr_lf_LF.txt
create mode 100644 crlf_true_attr_lf_LF_mix_CR.txt
create mode 100644 crlf_true_attr_lf_LF_nul.txt
[master d95054a] core.autocrlf input
Author: A U Thor <author@example.com>
6 files changed, 15 insertions(+)
create mode 100644 crlf_input_attr_lf_CRLF.txt
create mode 100644 crlf_input_attr_lf_CRLF_mix_LF.txt
create mode 100644 crlf_input_attr_lf_CRLF_nul.txt
create mode 100644 crlf_input_attr_lf_LF.txt
create mode 100644 crlf_input_attr_lf_LF_mix_CR.txt
create mode 100644 crlf_input_attr_lf_LF_nul.txt
ok 7 - commit files attr=lf
expecting success:
commit_check_warn false "crlf" "LF_CRLF" "" "LF_CRLF" "LF_CRLF" "" &&
commit_check_warn true "crlf" "LF_CRLF" "" "LF_CRLF" "LF_CRLF" "" &&
commit_check_warn input "crlf" "LF_CRLF" "" "LF_CRLF" "LF_CRLF" ""
[master ba1ebdc] core.autocrlf false
Author: A U Thor <author@example.com>
6 files changed, 15 insertions(+)
create mode 100644 crlf_false_attr_crlf_CRLF.txt
create mode 100644 crlf_false_attr_crlf_CRLF_mix_LF.txt
create mode 100644 crlf_false_attr_crlf_CRLF_nul.txt
create mode 100644 crlf_false_attr_crlf_LF.txt
create mode 100644 crlf_false_attr_crlf_LF_mix_CR.txt
create mode 100644 crlf_false_attr_crlf_LF_nul.txt
[master fae5e37] core.autocrlf true
Author: A U Thor <author@example.com>
6 files changed, 15 insertions(+)
create mode 100644 crlf_true_attr_crlf_CRLF.txt
create mode 100644 crlf_true_attr_crlf_CRLF_mix_LF.txt
create mode 100644 crlf_true_attr_crlf_CRLF_nul.txt
create mode 100644 crlf_true_attr_crlf_LF.txt
create mode 100644 crlf_true_attr_crlf_LF_mix_CR.txt
create mode 100644 crlf_true_attr_crlf_LF_nul.txt
[master 36302b9] core.autocrlf input
Author: A U Thor <author@example.com>
6 files changed, 15 insertions(+)
create mode 100644 crlf_input_attr_crlf_CRLF.txt
create mode 100644 crlf_input_attr_crlf_CRLF_mix_LF.txt
create mode 100644 crlf_input_attr_crlf_CRLF_nul.txt
create mode 100644 crlf_input_attr_crlf_LF.txt
create mode 100644 crlf_input_attr_crlf_LF_mix_CR.txt
create mode 100644 crlf_input_attr_crlf_LF_nul.txt
ok 8 - commit files attr=crlf
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 9 - commit file with mixed EOL onto LF crlf=false attr=
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 10 - commit file with mixed EOL onto CLRF attr= aeol= crlf=false
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 11 - commit file with mixed EOL onto CRLF_mix_LF attr= aeol= crlf=false
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 12 - commit file with mixed EOL onto LF_mix_cr attr= aeol= crlf=false
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 13 - commit file with mixed EOL onto CRLF_nul attr= aeol= crlf=false
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 14 - commit file with mixed EOL onto LF crlf=true attr=
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 15 - commit file with mixed EOL onto CLRF attr= aeol= crlf=true
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 16 - commit file with mixed EOL onto CRLF_mix_LF attr= aeol= crlf=true
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 17 - commit file with mixed EOL onto LF_mix_cr attr= aeol= crlf=true
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 18 - commit file with mixed EOL onto CRLF_nul attr= aeol= crlf=true
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 19 - commit file with mixed EOL onto LF crlf=input attr=
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 20 - commit file with mixed EOL onto CLRF attr= aeol= crlf=input
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 21 - commit file with mixed EOL onto CRLF_mix_LF attr= aeol= crlf=input
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 22 - commit file with mixed EOL onto LF_mix_cr attr= aeol= crlf=input
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 23 - commit file with mixed EOL onto CRLF_nul attr= aeol= crlf=input
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 24 - commit file with mixed EOL onto LF crlf=false attr=auto
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 25 - commit file with mixed EOL onto CLRF attr=auto aeol= crlf=false
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 26 - commit file with mixed EOL onto CRLF_mix_LF attr=auto aeol= crlf=false
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 27 - commit file with mixed EOL onto LF_mix_cr attr=auto aeol= crlf=false
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 28 - commit file with mixed EOL onto CRLF_nul attr=auto aeol= crlf=false
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 29 - commit file with mixed EOL onto LF crlf=true attr=auto
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 30 - commit file with mixed EOL onto CLRF attr=auto aeol= crlf=true
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 31 - commit file with mixed EOL onto CRLF_mix_LF attr=auto aeol= crlf=true
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 32 - commit file with mixed EOL onto LF_mix_cr attr=auto aeol= crlf=true
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 33 - commit file with mixed EOL onto CRLF_nul attr=auto aeol= crlf=true
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 34 - commit file with mixed EOL onto LF crlf=input attr=auto
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 35 - commit file with mixed EOL onto CLRF attr=auto aeol= crlf=input
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 36 - commit file with mixed EOL onto CRLF_mix_LF attr=auto aeol= crlf=input
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 37 - commit file with mixed EOL onto LF_mix_cr attr=auto aeol= crlf=input
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 38 - commit file with mixed EOL onto CRLF_nul attr=auto aeol= crlf=input
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 39 - commit NNO files crlf=false attr= LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 40 - commit NNO files attr= aeol= crlf=false CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 41 - commit NNO files attr= aeol= crlf=false CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 42 - commit NNO files attr= aeol= crlf=false LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 43 - commit NNO files attr= aeol= crlf=false CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 44 - commit NNO files crlf=true attr= LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 45 - commit NNO files attr= aeol= crlf=true CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 46 - commit NNO files attr= aeol= crlf=true CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 47 - commit NNO files attr= aeol= crlf=true LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 48 - commit NNO files attr= aeol= crlf=true CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 49 - commit NNO files crlf=input attr= LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 50 - commit NNO files attr= aeol= crlf=input CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 51 - commit NNO files attr= aeol= crlf=input CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 52 - commit NNO files attr= aeol= crlf=input LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 53 - commit NNO files attr= aeol= crlf=input CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 54 - commit NNO files crlf=false attr=auto LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 55 - commit NNO files attr=auto aeol= crlf=false CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 56 - commit NNO files attr=auto aeol= crlf=false CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 57 - commit NNO files attr=auto aeol= crlf=false LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 58 - commit NNO files attr=auto aeol= crlf=false CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 59 - commit NNO files crlf=true attr=auto LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 60 - commit NNO files attr=auto aeol= crlf=true CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 61 - commit NNO files attr=auto aeol= crlf=true CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 62 - commit NNO files attr=auto aeol= crlf=true LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 63 - commit NNO files attr=auto aeol= crlf=true CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 64 - commit NNO files crlf=input attr=auto LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 65 - commit NNO files attr=auto aeol= crlf=input CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 66 - commit NNO files attr=auto aeol= crlf=input CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 67 - commit NNO files attr=auto aeol= crlf=input LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 68 - commit NNO files attr=auto aeol= crlf=input CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 69 - commit NNO files crlf=true attr=-text LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 70 - commit NNO files attr=-text aeol= crlf=true CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 71 - commit NNO files attr=-text aeol= crlf=true CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 72 - commit NNO files attr=-text aeol= crlf=true LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 73 - commit NNO files attr=-text aeol= crlf=true CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 74 - commit NNO files crlf=true attr=-text LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 75 - commit NNO files attr=-text aeol=lf crlf=true CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 76 - commit NNO files attr=-text aeol=lf crlf=true CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 77 - commit NNO files attr=-text aeol=lf crlf=true LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 78 - commit NNO files attr=-text aeol=lf crlf=true CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 79 - commit NNO files crlf=true attr=-text LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 80 - commit NNO files attr=-text aeol=crlf crlf=true CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 81 - commit NNO files attr=-text aeol=crlf crlf=true CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 82 - commit NNO files attr=-text aeol=crlf crlf=true LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 83 - commit NNO files attr=-text aeol=crlf crlf=true CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 84 - commit NNO files crlf=true attr= LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 85 - commit NNO files attr= aeol=lf crlf=true CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 86 - commit NNO files attr= aeol=lf crlf=true CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 87 - commit NNO files attr= aeol=lf crlf=true LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 88 - commit NNO files attr= aeol=lf crlf=true CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 89 - commit NNO files crlf=true attr= LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 90 - commit NNO files attr= aeol=crlf crlf=true CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 91 - commit NNO files attr= aeol=crlf crlf=true CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 92 - commit NNO files attr= aeol=crlf crlf=true LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 93 - commit NNO files attr= aeol=crlf crlf=true CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 94 - commit NNO files crlf=true attr=auto LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 95 - commit NNO files attr=auto aeol=lf crlf=true CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 96 - commit NNO files attr=auto aeol=lf crlf=true CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 97 - commit NNO files attr=auto aeol=lf crlf=true LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 98 - commit NNO files attr=auto aeol=lf crlf=true CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 99 - commit NNO files crlf=true attr=auto LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 100 - commit NNO files attr=auto aeol=crlf crlf=true CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 101 - commit NNO files attr=auto aeol=crlf crlf=true CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 102 - commit NNO files attr=auto aeol=crlf crlf=true LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 103 - commit NNO files attr=auto aeol=crlf crlf=true CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 104 - commit NNO files crlf=true attr=text LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 105 - commit NNO files attr=text aeol=lf crlf=true CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 106 - commit NNO files attr=text aeol=lf crlf=true CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 107 - commit NNO files attr=text aeol=lf crlf=true LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 108 - commit NNO files attr=text aeol=lf crlf=true CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 109 - commit NNO files crlf=true attr=text LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 110 - commit NNO files attr=text aeol=crlf crlf=true CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 111 - commit NNO files attr=text aeol=crlf crlf=true CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 112 - commit NNO files attr=text aeol=crlf crlf=true LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 113 - commit NNO files attr=text aeol=crlf crlf=true CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 114 - commit NNO files crlf=false attr=-text LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 115 - commit NNO files attr=-text aeol= crlf=false CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 116 - commit NNO files attr=-text aeol= crlf=false CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 117 - commit NNO files attr=-text aeol= crlf=false LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 118 - commit NNO files attr=-text aeol= crlf=false CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 119 - commit NNO files crlf=false attr=-text LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 120 - commit NNO files attr=-text aeol=lf crlf=false CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 121 - commit NNO files attr=-text aeol=lf crlf=false CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 122 - commit NNO files attr=-text aeol=lf crlf=false LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 123 - commit NNO files attr=-text aeol=lf crlf=false CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 124 - commit NNO files crlf=false attr=-text LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 125 - commit NNO files attr=-text aeol=crlf crlf=false CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 126 - commit NNO files attr=-text aeol=crlf crlf=false CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 127 - commit NNO files attr=-text aeol=crlf crlf=false LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 128 - commit NNO files attr=-text aeol=crlf crlf=false CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 129 - commit NNO files crlf=false attr= LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 130 - commit NNO files attr= aeol=lf crlf=false CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 131 - commit NNO files attr= aeol=lf crlf=false CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 132 - commit NNO files attr= aeol=lf crlf=false LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 133 - commit NNO files attr= aeol=lf crlf=false CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 134 - commit NNO files crlf=false attr= LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 135 - commit NNO files attr= aeol=crlf crlf=false CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 136 - commit NNO files attr= aeol=crlf crlf=false CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 137 - commit NNO files attr= aeol=crlf crlf=false LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 138 - commit NNO files attr= aeol=crlf crlf=false CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 139 - commit NNO files crlf=false attr=auto LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 140 - commit NNO files attr=auto aeol=lf crlf=false CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 141 - commit NNO files attr=auto aeol=lf crlf=false CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 142 - commit NNO files attr=auto aeol=lf crlf=false LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 143 - commit NNO files attr=auto aeol=lf crlf=false CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 144 - commit NNO files crlf=false attr=auto LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 145 - commit NNO files attr=auto aeol=crlf crlf=false CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 146 - commit NNO files attr=auto aeol=crlf crlf=false CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 147 - commit NNO files attr=auto aeol=crlf crlf=false LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 148 - commit NNO files attr=auto aeol=crlf crlf=false CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 149 - commit NNO files crlf=false attr=text LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 150 - commit NNO files attr=text aeol=lf crlf=false CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 151 - commit NNO files attr=text aeol=lf crlf=false CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 152 - commit NNO files attr=text aeol=lf crlf=false LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 153 - commit NNO files attr=text aeol=lf crlf=false CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 154 - commit NNO files crlf=false attr=text LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 155 - commit NNO files attr=text aeol=crlf crlf=false CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 156 - commit NNO files attr=text aeol=crlf crlf=false CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 157 - commit NNO files attr=text aeol=crlf crlf=false LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 158 - commit NNO files attr=text aeol=crlf crlf=false CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 159 - commit NNO files crlf=input attr=-text LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 160 - commit NNO files attr=-text aeol= crlf=input CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 161 - commit NNO files attr=-text aeol= crlf=input CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 162 - commit NNO files attr=-text aeol= crlf=input LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 163 - commit NNO files attr=-text aeol= crlf=input CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 164 - commit NNO files crlf=input attr=-text LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 165 - commit NNO files attr=-text aeol=lf crlf=input CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 166 - commit NNO files attr=-text aeol=lf crlf=input CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 167 - commit NNO files attr=-text aeol=lf crlf=input LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 168 - commit NNO files attr=-text aeol=lf crlf=input CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 169 - commit NNO files crlf=input attr=-text LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 170 - commit NNO files attr=-text aeol=crlf crlf=input CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 171 - commit NNO files attr=-text aeol=crlf crlf=input CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 172 - commit NNO files attr=-text aeol=crlf crlf=input LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 173 - commit NNO files attr=-text aeol=crlf crlf=input CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 174 - commit NNO files crlf=input attr= LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 175 - commit NNO files attr= aeol=lf crlf=input CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 176 - commit NNO files attr= aeol=lf crlf=input CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 177 - commit NNO files attr= aeol=lf crlf=input LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 178 - commit NNO files attr= aeol=lf crlf=input CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 179 - commit NNO files crlf=input attr= LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 180 - commit NNO files attr= aeol=crlf crlf=input CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 181 - commit NNO files attr= aeol=crlf crlf=input CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 182 - commit NNO files attr= aeol=crlf crlf=input LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 183 - commit NNO files attr= aeol=crlf crlf=input CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 184 - commit NNO files crlf=input attr=auto LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 185 - commit NNO files attr=auto aeol=lf crlf=input CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 186 - commit NNO files attr=auto aeol=lf crlf=input CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 187 - commit NNO files attr=auto aeol=lf crlf=input LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 188 - commit NNO files attr=auto aeol=lf crlf=input CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 189 - commit NNO files crlf=input attr=auto LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 190 - commit NNO files attr=auto aeol=crlf crlf=input CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 191 - commit NNO files attr=auto aeol=crlf crlf=input CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 192 - commit NNO files attr=auto aeol=crlf crlf=input LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 193 - commit NNO files attr=auto aeol=crlf crlf=input CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 194 - commit NNO files crlf=input attr=text LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 195 - commit NNO files attr=text aeol=lf crlf=input CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 196 - commit NNO files attr=text aeol=lf crlf=input CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 197 - commit NNO files attr=text aeol=lf crlf=input LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 198 - commit NNO files attr=text aeol=lf crlf=input CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 199 - commit NNO files crlf=input attr=text LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 200 - commit NNO files attr=text aeol=crlf crlf=input CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 201 - commit NNO files attr=text aeol=crlf crlf=input CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 202 - commit NNO files attr=text aeol=crlf crlf=input LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 203 - commit NNO files attr=text aeol=crlf crlf=input CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 204 - commit NNO files crlf=false attr=text LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 205 - commit NNO files attr=text aeol= crlf=false CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 206 - commit NNO files attr=text aeol= crlf=false CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 207 - commit NNO files attr=text aeol= crlf=false LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 208 - commit NNO files attr=text aeol= crlf=false CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 209 - commit NNO files crlf=true attr=text LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 210 - commit NNO files attr=text aeol= crlf=true CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 211 - commit NNO files attr=text aeol= crlf=true CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 212 - commit NNO files attr=text aeol= crlf=true LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 213 - commit NNO files attr=text aeol= crlf=true CRLF_nul
expecting success:
check_warning "$lfwarn" ${pfx}_LF.err
ok 214 - commit NNO files crlf=input attr=text LF
expecting success:
check_warning "$crlfwarn" ${pfx}_CRLF.err
ok 215 - commit NNO files attr=text aeol= crlf=input CRLF
expecting success:
check_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err
ok 216 - commit NNO files attr=text aeol= crlf=input CRLF_mix_LF
expecting success:
check_warning "$lfmixcr" ${pfx}_LF_mix_CR.err
ok 217 - commit NNO files attr=text aeol= crlf=input LF_mix_cr
expecting success:
check_warning "$crlfnul" ${pfx}_CRLF_nul.err
ok 218 - commit NNO files attr=text aeol= crlf=input CRLF_nul
expecting success:
git commit -m "commit files on top of NNO" &&
rm -f *.txt &&
git -c core.autocrlf=false reset --hard
[master edfaec3] commit files on top of NNO
Author: A U Thor <author@example.com>
210 files changed, 332 insertions(+), 362 deletions(-)
HEAD is now at edfaec3 commit files on top of NNO
ok 219 - commit NNO and cleanup
expecting success:
check_files_in_repo false "" LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul &&
check_files_in_repo true "" LF LF LF LF_mix_CR CRLF_nul &&
check_files_in_repo input "" LF LF LF LF_mix_CR CRLF_nul
ok 220 - commit empty gitattribues
expecting success:
check_files_in_repo false "auto" LF LF LF LF_mix_CR CRLF_nul &&
check_files_in_repo true "auto" LF LF LF LF_mix_CR CRLF_nul &&
check_files_in_repo input "auto" LF LF LF LF_mix_CR CRLF_nul
ok 221 - commit text=auto
expecting success:
check_files_in_repo false "text" LF LF LF LF_mix_CR LF_nul &&
check_files_in_repo true "text" LF LF LF LF_mix_CR LF_nul &&
check_files_in_repo input "text" LF LF LF LF_mix_CR LF_nul
ok 222 - commit text
expecting success:
check_files_in_repo false "-text" LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul &&
check_files_in_repo true "-text" LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul &&
check_files_in_repo input "-text" LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul
ok 223 - commit -text
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 224 - compare_files LF NNO_attr__aeol__true_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 225 - compare_files CRLF NNO_attr__aeol__true_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 226 - compare_files CRLF_mix_LF NNO_attr__aeol__true_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 227 - compare_files LF_mix_CR NNO_attr__aeol__true_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 228 - compare_files CRLF_nul NNO_attr__aeol__true_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 229 - compare_files LF NNO_attr_-text_aeol__true_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 230 - compare_files CRLF NNO_attr_-text_aeol__true_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 231 - compare_files CRLF_mix_LF NNO_attr_-text_aeol__true_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 232 - compare_files LF_mix_CR NNO_attr_-text_aeol__true_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 233 - compare_files CRLF_nul NNO_attr_-text_aeol__true_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 234 - compare_files LF NNO_attr_-text_aeol_lf_true_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 235 - compare_files CRLF NNO_attr_-text_aeol_lf_true_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 236 - compare_files CRLF_mix_LF NNO_attr_-text_aeol_lf_true_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 237 - compare_files LF_mix_CR NNO_attr_-text_aeol_lf_true_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 238 - compare_files CRLF_nul NNO_attr_-text_aeol_lf_true_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 239 - compare_files LF NNO_attr_-text_aeol_crlf_true_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 240 - compare_files CRLF NNO_attr_-text_aeol_crlf_true_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 241 - compare_files CRLF_mix_LF NNO_attr_-text_aeol_crlf_true_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 242 - compare_files LF_mix_CR NNO_attr_-text_aeol_crlf_true_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 243 - compare_files CRLF_nul NNO_attr_-text_aeol_crlf_true_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 244 - compare_files LF NNO_attr_auto_aeol__true_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 245 - compare_files CRLF NNO_attr_auto_aeol__true_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 246 - compare_files CRLF_mix_LF NNO_attr_auto_aeol__true_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 247 - compare_files LF_mix_CR NNO_attr_auto_aeol__true_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 248 - compare_files CRLF_nul NNO_attr_auto_aeol__true_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 249 - compare_files LF NNO_attr_auto_aeol_lf_true_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 250 - compare_files CRLF NNO_attr_auto_aeol_lf_true_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 251 - compare_files CRLF_mix_LF NNO_attr_auto_aeol_lf_true_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 252 - compare_files LF_mix_CR NNO_attr_auto_aeol_lf_true_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 253 - compare_files CRLF_nul NNO_attr_auto_aeol_lf_true_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 254 - compare_files LF NNO_attr_auto_aeol_crlf_true_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 255 - compare_files CRLF NNO_attr_auto_aeol_crlf_true_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 256 - compare_files CRLF_mix_LF NNO_attr_auto_aeol_crlf_true_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 257 - compare_files LF_mix_CR NNO_attr_auto_aeol_crlf_true_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 258 - compare_files CRLF_nul NNO_attr_auto_aeol_crlf_true_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 259 - compare_files LF NNO_attr_text_aeol__true_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 260 - compare_files LF NNO_attr_text_aeol__true_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 261 - compare_files LF NNO_attr_text_aeol__true_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 262 - compare_files LF_mix_CR NNO_attr_text_aeol__true_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 263 - compare_files LF_nul NNO_attr_text_aeol__true_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 264 - compare_files LF NNO_attr_text_aeol_lf_true_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 265 - compare_files LF NNO_attr_text_aeol_lf_true_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 266 - compare_files LF NNO_attr_text_aeol_lf_true_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 267 - compare_files LF_mix_CR NNO_attr_text_aeol_lf_true_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 268 - compare_files LF_nul NNO_attr_text_aeol_lf_true_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 269 - compare_files LF NNO_attr_text_aeol_crlf_true_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 270 - compare_files LF NNO_attr_text_aeol_crlf_true_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 271 - compare_files LF NNO_attr_text_aeol_crlf_true_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 272 - compare_files LF_mix_CR NNO_attr_text_aeol_crlf_true_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 273 - compare_files LF_nul NNO_attr_text_aeol_crlf_true_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 274 - compare_files LF NNO_attr__aeol__false_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 275 - compare_files CRLF NNO_attr__aeol__false_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 276 - compare_files CRLF_mix_LF NNO_attr__aeol__false_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 277 - compare_files LF_mix_CR NNO_attr__aeol__false_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 278 - compare_files CRLF_nul NNO_attr__aeol__false_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 279 - compare_files LF NNO_attr_-text_aeol__false_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 280 - compare_files CRLF NNO_attr_-text_aeol__false_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 281 - compare_files CRLF_mix_LF NNO_attr_-text_aeol__false_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 282 - compare_files LF_mix_CR NNO_attr_-text_aeol__false_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 283 - compare_files CRLF_nul NNO_attr_-text_aeol__false_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 284 - compare_files LF NNO_attr_-text_aeol_lf_false_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 285 - compare_files CRLF NNO_attr_-text_aeol_lf_false_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 286 - compare_files CRLF_mix_LF NNO_attr_-text_aeol_lf_false_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 287 - compare_files LF_mix_CR NNO_attr_-text_aeol_lf_false_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 288 - compare_files CRLF_nul NNO_attr_-text_aeol_lf_false_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 289 - compare_files LF NNO_attr_-text_aeol_crlf_false_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 290 - compare_files CRLF NNO_attr_-text_aeol_crlf_false_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 291 - compare_files CRLF_mix_LF NNO_attr_-text_aeol_crlf_false_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 292 - compare_files LF_mix_CR NNO_attr_-text_aeol_crlf_false_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 293 - compare_files CRLF_nul NNO_attr_-text_aeol_crlf_false_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 294 - compare_files LF NNO_attr_auto_aeol__false_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 295 - compare_files CRLF NNO_attr_auto_aeol__false_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 296 - compare_files CRLF_mix_LF NNO_attr_auto_aeol__false_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 297 - compare_files LF_mix_CR NNO_attr_auto_aeol__false_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 298 - compare_files CRLF_nul NNO_attr_auto_aeol__false_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 299 - compare_files LF NNO_attr_auto_aeol_lf_false_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 300 - compare_files CRLF NNO_attr_auto_aeol_lf_false_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 301 - compare_files CRLF_mix_LF NNO_attr_auto_aeol_lf_false_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 302 - compare_files LF_mix_CR NNO_attr_auto_aeol_lf_false_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 303 - compare_files CRLF_nul NNO_attr_auto_aeol_lf_false_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 304 - compare_files LF NNO_attr_auto_aeol_crlf_false_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 305 - compare_files CRLF NNO_attr_auto_aeol_crlf_false_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 306 - compare_files CRLF_mix_LF NNO_attr_auto_aeol_crlf_false_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 307 - compare_files LF_mix_CR NNO_attr_auto_aeol_crlf_false_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 308 - compare_files CRLF_nul NNO_attr_auto_aeol_crlf_false_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 309 - compare_files LF NNO_attr_text_aeol__false_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 310 - compare_files LF NNO_attr_text_aeol__false_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 311 - compare_files LF NNO_attr_text_aeol__false_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 312 - compare_files LF_mix_CR NNO_attr_text_aeol__false_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 313 - compare_files LF_nul NNO_attr_text_aeol__false_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 314 - compare_files LF NNO_attr_text_aeol_lf_false_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 315 - compare_files LF NNO_attr_text_aeol_lf_false_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 316 - compare_files LF NNO_attr_text_aeol_lf_false_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 317 - compare_files LF_mix_CR NNO_attr_text_aeol_lf_false_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 318 - compare_files LF_nul NNO_attr_text_aeol_lf_false_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 319 - compare_files LF NNO_attr_text_aeol_crlf_false_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 320 - compare_files LF NNO_attr_text_aeol_crlf_false_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 321 - compare_files LF NNO_attr_text_aeol_crlf_false_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 322 - compare_files LF_mix_CR NNO_attr_text_aeol_crlf_false_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 323 - compare_files LF_nul NNO_attr_text_aeol_crlf_false_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 324 - compare_files LF NNO_attr__aeol__input_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 325 - compare_files CRLF NNO_attr__aeol__input_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 326 - compare_files CRLF_mix_LF NNO_attr__aeol__input_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 327 - compare_files LF_mix_CR NNO_attr__aeol__input_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 328 - compare_files CRLF_nul NNO_attr__aeol__input_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 329 - compare_files LF NNO_attr_-text_aeol__input_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 330 - compare_files CRLF NNO_attr_-text_aeol__input_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 331 - compare_files CRLF_mix_LF NNO_attr_-text_aeol__input_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 332 - compare_files LF_mix_CR NNO_attr_-text_aeol__input_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 333 - compare_files CRLF_nul NNO_attr_-text_aeol__input_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 334 - compare_files LF NNO_attr_-text_aeol_lf_input_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 335 - compare_files CRLF NNO_attr_-text_aeol_lf_input_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 336 - compare_files CRLF_mix_LF NNO_attr_-text_aeol_lf_input_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 337 - compare_files LF_mix_CR NNO_attr_-text_aeol_lf_input_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 338 - compare_files CRLF_nul NNO_attr_-text_aeol_lf_input_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 339 - compare_files LF NNO_attr_-text_aeol_crlf_input_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 340 - compare_files CRLF NNO_attr_-text_aeol_crlf_input_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 341 - compare_files CRLF_mix_LF NNO_attr_-text_aeol_crlf_input_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 342 - compare_files LF_mix_CR NNO_attr_-text_aeol_crlf_input_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 343 - compare_files CRLF_nul NNO_attr_-text_aeol_crlf_input_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 344 - compare_files LF NNO_attr_auto_aeol__input_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 345 - compare_files CRLF NNO_attr_auto_aeol__input_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 346 - compare_files CRLF_mix_LF NNO_attr_auto_aeol__input_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 347 - compare_files LF_mix_CR NNO_attr_auto_aeol__input_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 348 - compare_files CRLF_nul NNO_attr_auto_aeol__input_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 349 - compare_files LF NNO_attr_auto_aeol_lf_input_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 350 - compare_files CRLF NNO_attr_auto_aeol_lf_input_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 351 - compare_files CRLF_mix_LF NNO_attr_auto_aeol_lf_input_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 352 - compare_files LF_mix_CR NNO_attr_auto_aeol_lf_input_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 353 - compare_files CRLF_nul NNO_attr_auto_aeol_lf_input_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 354 - compare_files LF NNO_attr_auto_aeol_crlf_input_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 355 - compare_files CRLF NNO_attr_auto_aeol_crlf_input_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 356 - compare_files CRLF_mix_LF NNO_attr_auto_aeol_crlf_input_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 357 - compare_files LF_mix_CR NNO_attr_auto_aeol_crlf_input_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 358 - compare_files CRLF_nul NNO_attr_auto_aeol_crlf_input_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 359 - compare_files LF NNO_attr_text_aeol__input_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 360 - compare_files LF NNO_attr_text_aeol__input_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 361 - compare_files LF NNO_attr_text_aeol__input_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 362 - compare_files LF_mix_CR NNO_attr_text_aeol__input_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 363 - compare_files LF_nul NNO_attr_text_aeol__input_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 364 - compare_files LF NNO_attr_text_aeol_lf_input_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 365 - compare_files LF NNO_attr_text_aeol_lf_input_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 366 - compare_files LF NNO_attr_text_aeol_lf_input_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 367 - compare_files LF_mix_CR NNO_attr_text_aeol_lf_input_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 368 - compare_files LF_nul NNO_attr_text_aeol_lf_input_CRLF_nul.txt
expecting success:
compare_files $lfname ${pfx}_LF.txt
ok 369 - compare_files LF NNO_attr_text_aeol_crlf_input_LF.txt
expecting success:
compare_files $crlfname ${pfx}_CRLF.txt
ok 370 - compare_files LF NNO_attr_text_aeol_crlf_input_CRLF.txt
expecting success:
compare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt
ok 371 - compare_files LF NNO_attr_text_aeol_crlf_input_CRLF_mix_LF.txt
expecting success:
compare_files $lfmixcr ${pfx}_LF_mix_CR.txt
ok 372 - compare_files LF_mix_CR NNO_attr_text_aeol_crlf_input_LF_mix_CR.txt
expecting success:
compare_files $crlfnul ${pfx}_CRLF_nul.txt
ok 373 - compare_files LF_nul NNO_attr_text_aeol_crlf_input_CRLF_nul.txt
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 374 - ls-files --eol attr=-text aeol= core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ LF crlf_false_attr__LF.txt
ok 375 - checkout attr=-text aeol= core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 376 - checkout attr=-text aeol= core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 377 - checkout attr=-text aeol= core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 378 - checkout attr=-text aeol= core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 379 - checkout attr=-text aeol= core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 380 - ls-files --eol attr=-text aeol=lf core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ LF crlf_false_attr__LF.txt
ok 381 - checkout attr=-text aeol=lf core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 382 - checkout attr=-text aeol=lf core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 383 - checkout attr=-text aeol=lf core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 384 - checkout attr=-text aeol=lf core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 385 - checkout attr=-text aeol=lf core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 386 - ls-files --eol attr=-text aeol=crlf core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ LF crlf_false_attr__LF.txt
ok 387 - checkout attr=-text aeol=crlf core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 388 - checkout attr=-text aeol=crlf core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 389 - checkout attr=-text aeol=crlf core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 390 - checkout attr=-text aeol=crlf core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 391 - checkout attr=-text aeol=crlf core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 392 - ls-files --eol attr=text aeol=lf core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ LF crlf_false_attr__LF.txt
ok 393 - checkout attr=text aeol=lf core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 394 - checkout attr=text aeol=lf core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 395 - checkout attr=text aeol=lf core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 396 - checkout attr=text aeol=lf core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 397 - checkout attr=text aeol=lf core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 398 - ls-files --eol attr=text aeol=crlf core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF crlf_false_attr__LF.txt
ok 399 - checkout attr=text aeol=crlf core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 400 - checkout attr=text aeol=crlf core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 401 - checkout attr=text aeol=crlf core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 402 - checkout attr=text aeol=crlf core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 403 - checkout attr=text aeol=crlf core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 404 - ls-files --eol attr=auto aeol=lf core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ LF crlf_false_attr__LF.txt
ok 405 - checkout attr=auto aeol=lf core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 406 - checkout attr=auto aeol=lf core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 407 - checkout attr=auto aeol=lf core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 408 - checkout attr=auto aeol=lf core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 409 - checkout attr=auto aeol=lf core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 410 - ls-files --eol attr=auto aeol=crlf core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 411 - checkout attr=auto aeol=crlf core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 412 - checkout attr=auto aeol=crlf core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 413 - checkout attr=auto aeol=crlf core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 414 - checkout attr=auto aeol=crlf core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 415 - checkout attr=auto aeol=crlf core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 416 - ls-files --eol attr=-text aeol= core.autocrlf=false core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ LF crlf_false_attr__LF.txt
ok 417 - checkout attr=-text aeol= core.autocrlf=false core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 418 - checkout attr=-text aeol= core.autocrlf=false core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 419 - checkout attr=-text aeol= core.autocrlf=false core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 420 - checkout attr=-text aeol= core.autocrlf=false core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 421 - checkout attr=-text aeol= core.autocrlf=false core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 422 - ls-files --eol attr=-text aeol=lf core.autocrlf=false core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ LF crlf_false_attr__LF.txt
ok 423 - checkout attr=-text aeol=lf core.autocrlf=false core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 424 - checkout attr=-text aeol=lf core.autocrlf=false core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 425 - checkout attr=-text aeol=lf core.autocrlf=false core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 426 - checkout attr=-text aeol=lf core.autocrlf=false core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 427 - checkout attr=-text aeol=lf core.autocrlf=false core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 428 - ls-files --eol attr=-text aeol=crlf core.autocrlf=false core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ LF crlf_false_attr__LF.txt
ok 429 - checkout attr=-text aeol=crlf core.autocrlf=false core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 430 - checkout attr=-text aeol=crlf core.autocrlf=false core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 431 - checkout attr=-text aeol=crlf core.autocrlf=false core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 432 - checkout attr=-text aeol=crlf core.autocrlf=false core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 433 - checkout attr=-text aeol=crlf core.autocrlf=false core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 434 - ls-files --eol attr=text aeol=lf core.autocrlf=false core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ LF crlf_false_attr__LF.txt
ok 435 - checkout attr=text aeol=lf core.autocrlf=false core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 436 - checkout attr=text aeol=lf core.autocrlf=false core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 437 - checkout attr=text aeol=lf core.autocrlf=false core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 438 - checkout attr=text aeol=lf core.autocrlf=false core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 439 - checkout attr=text aeol=lf core.autocrlf=false core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 440 - ls-files --eol attr=text aeol=crlf core.autocrlf=false core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ CRLF crlf_false_attr__LF.txt
ok 441 - checkout attr=text aeol=crlf core.autocrlf=false core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 442 - checkout attr=text aeol=crlf core.autocrlf=false core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 443 - checkout attr=text aeol=crlf core.autocrlf=false core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 444 - checkout attr=text aeol=crlf core.autocrlf=false core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 445 - checkout attr=text aeol=crlf core.autocrlf=false core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 446 - ls-files --eol attr=auto aeol=lf core.autocrlf=false core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ LF crlf_false_attr__LF.txt
ok 447 - checkout attr=auto aeol=lf core.autocrlf=false core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 448 - checkout attr=auto aeol=lf core.autocrlf=false core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 449 - checkout attr=auto aeol=lf core.autocrlf=false core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 450 - checkout attr=auto aeol=lf core.autocrlf=false core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 451 - checkout attr=auto aeol=lf core.autocrlf=false core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 452 - ls-files --eol attr=auto aeol=crlf core.autocrlf=false core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 453 - checkout attr=auto aeol=crlf core.autocrlf=false core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 454 - checkout attr=auto aeol=crlf core.autocrlf=false core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 455 - checkout attr=auto aeol=crlf core.autocrlf=false core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 456 - checkout attr=auto aeol=crlf core.autocrlf=false core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 457 - checkout attr=auto aeol=crlf core.autocrlf=false core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 458 - ls-files --eol attr=-text aeol= core.autocrlf=input core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ LF crlf_false_attr__LF.txt
ok 459 - checkout attr=-text aeol= core.autocrlf=input core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 460 - checkout attr=-text aeol= core.autocrlf=input core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 461 - checkout attr=-text aeol= core.autocrlf=input core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 462 - checkout attr=-text aeol= core.autocrlf=input core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 463 - checkout attr=-text aeol= core.autocrlf=input core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 464 - ls-files --eol attr=-text aeol=lf core.autocrlf=input core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ LF crlf_false_attr__LF.txt
ok 465 - checkout attr=-text aeol=lf core.autocrlf=input core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 466 - checkout attr=-text aeol=lf core.autocrlf=input core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 467 - checkout attr=-text aeol=lf core.autocrlf=input core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 468 - checkout attr=-text aeol=lf core.autocrlf=input core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 469 - checkout attr=-text aeol=lf core.autocrlf=input core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 470 - ls-files --eol attr=-text aeol=crlf core.autocrlf=input core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ LF crlf_false_attr__LF.txt
ok 471 - checkout attr=-text aeol=crlf core.autocrlf=input core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 472 - checkout attr=-text aeol=crlf core.autocrlf=input core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 473 - checkout attr=-text aeol=crlf core.autocrlf=input core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 474 - checkout attr=-text aeol=crlf core.autocrlf=input core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 475 - checkout attr=-text aeol=crlf core.autocrlf=input core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 476 - ls-files --eol attr=text aeol=lf core.autocrlf=input core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ LF crlf_false_attr__LF.txt
ok 477 - checkout attr=text aeol=lf core.autocrlf=input core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 478 - checkout attr=text aeol=lf core.autocrlf=input core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 479 - checkout attr=text aeol=lf core.autocrlf=input core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 480 - checkout attr=text aeol=lf core.autocrlf=input core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 481 - checkout attr=text aeol=lf core.autocrlf=input core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 482 - ls-files --eol attr=text aeol=crlf core.autocrlf=input core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ CRLF crlf_false_attr__LF.txt
ok 483 - checkout attr=text aeol=crlf core.autocrlf=input core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 484 - checkout attr=text aeol=crlf core.autocrlf=input core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 485 - checkout attr=text aeol=crlf core.autocrlf=input core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 486 - checkout attr=text aeol=crlf core.autocrlf=input core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 487 - checkout attr=text aeol=crlf core.autocrlf=input core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 488 - ls-files --eol attr=auto aeol=lf core.autocrlf=input core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ LF crlf_false_attr__LF.txt
ok 489 - checkout attr=auto aeol=lf core.autocrlf=input core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 490 - checkout attr=auto aeol=lf core.autocrlf=input core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 491 - checkout attr=auto aeol=lf core.autocrlf=input core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 492 - checkout attr=auto aeol=lf core.autocrlf=input core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 493 - checkout attr=auto aeol=lf core.autocrlf=input core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 494 - ls-files --eol attr=auto aeol=crlf core.autocrlf=input core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 495 - checkout attr=auto aeol=crlf core.autocrlf=input core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 496 - checkout attr=auto aeol=crlf core.autocrlf=input core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 497 - checkout attr=auto aeol=crlf core.autocrlf=input core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 498 - checkout attr=auto aeol=crlf core.autocrlf=input core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 499 - checkout attr=auto aeol=crlf core.autocrlf=input core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 500 - ls-files --eol attr= aeol= core.autocrlf=false core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_false_attr__ LF crlf_false_attr__LF.txt
ok 501 - checkout attr= aeol= core.autocrlf=false core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr__ CRLF crlf_false_attr__CRLF.txt
ok 502 - checkout attr= aeol= core.autocrlf=false core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_false_attr__ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 503 - checkout attr= aeol= core.autocrlf=false core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr__ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 504 - checkout attr= aeol= core.autocrlf=false core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_false_attr__ LF_nul crlf_false_attr__LF_nul.txt
ok 505 - checkout attr= aeol= core.autocrlf=false core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 506 - ls-files --eol attr= aeol= core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr__ CRLF crlf_false_attr__LF.txt
ok 507 - checkout attr= aeol= core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr__ CRLF crlf_false_attr__CRLF.txt
ok 508 - checkout attr= aeol= core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr__ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 509 - checkout attr= aeol= core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr__ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 510 - checkout attr= aeol= core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr__ LF_nul crlf_false_attr__LF_nul.txt
ok 511 - checkout attr= aeol= core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 512 - ls-files --eol attr=auto aeol= core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 513 - checkout attr=auto aeol= core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 514 - checkout attr=auto aeol= core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 515 - checkout attr=auto aeol= core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 516 - checkout attr=auto aeol= core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 517 - checkout attr=auto aeol= core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 518 - ls-files --eol attr=text aeol= core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF crlf_false_attr__LF.txt
ok 519 - checkout attr=text aeol= core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 520 - checkout attr=text aeol= core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 521 - checkout attr=text aeol= core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 522 - checkout attr=text aeol= core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 523 - checkout attr=text aeol= core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 524 - ls-files --eol attr=text aeol= core.autocrlf=input core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ LF crlf_false_attr__LF.txt
ok 525 - checkout attr=text aeol= core.autocrlf=input core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 526 - checkout attr=text aeol= core.autocrlf=input core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 527 - checkout attr=text aeol= core.autocrlf=input core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 528 - checkout attr=text aeol= core.autocrlf=input core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 529 - checkout attr=text aeol= core.autocrlf=input core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 530 - ls-files --eol attr=auto aeol= core.autocrlf=input core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ LF crlf_false_attr__LF.txt
ok 531 - checkout attr=auto aeol= core.autocrlf=input core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 532 - checkout attr=auto aeol= core.autocrlf=input core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 533 - checkout attr=auto aeol= core.autocrlf=input core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 534 - checkout attr=auto aeol= core.autocrlf=input core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 535 - checkout attr=auto aeol= core.autocrlf=input core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 536 - ls-files --eol attr=-text aeol= core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ LF crlf_false_attr__LF.txt
ok 537 - checkout attr=-text aeol= core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 538 - checkout attr=-text aeol= core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 539 - checkout attr=-text aeol= core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 540 - checkout attr=-text aeol= core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 541 - checkout attr=-text aeol= core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 542 - ls-files --eol attr=-text aeol=lf core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ LF crlf_false_attr__LF.txt
ok 543 - checkout attr=-text aeol=lf core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 544 - checkout attr=-text aeol=lf core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 545 - checkout attr=-text aeol=lf core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 546 - checkout attr=-text aeol=lf core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 547 - checkout attr=-text aeol=lf core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 548 - ls-files --eol attr=-text aeol=crlf core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ LF crlf_false_attr__LF.txt
ok 549 - checkout attr=-text aeol=crlf core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 550 - checkout attr=-text aeol=crlf core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 551 - checkout attr=-text aeol=crlf core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 552 - checkout attr=-text aeol=crlf core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 553 - checkout attr=-text aeol=crlf core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 554 - ls-files --eol attr=text aeol=lf core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ LF crlf_false_attr__LF.txt
ok 555 - checkout attr=text aeol=lf core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 556 - checkout attr=text aeol=lf core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 557 - checkout attr=text aeol=lf core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 558 - checkout attr=text aeol=lf core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 559 - checkout attr=text aeol=lf core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 560 - ls-files --eol attr=text aeol=crlf core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF crlf_false_attr__LF.txt
ok 561 - checkout attr=text aeol=crlf core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 562 - checkout attr=text aeol=crlf core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 563 - checkout attr=text aeol=crlf core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 564 - checkout attr=text aeol=crlf core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 565 - checkout attr=text aeol=crlf core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 566 - ls-files --eol attr=auto aeol=lf core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ LF crlf_false_attr__LF.txt
ok 567 - checkout attr=auto aeol=lf core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 568 - checkout attr=auto aeol=lf core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 569 - checkout attr=auto aeol=lf core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 570 - checkout attr=auto aeol=lf core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 571 - checkout attr=auto aeol=lf core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 572 - ls-files --eol attr=auto aeol=crlf core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 573 - checkout attr=auto aeol=crlf core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 574 - checkout attr=auto aeol=crlf core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 575 - checkout attr=auto aeol=crlf core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 576 - checkout attr=auto aeol=crlf core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 577 - checkout attr=auto aeol=crlf core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 578 - ls-files --eol attr=-text aeol= core.autocrlf=false core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ LF crlf_false_attr__LF.txt
ok 579 - checkout attr=-text aeol= core.autocrlf=false core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 580 - checkout attr=-text aeol= core.autocrlf=false core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 581 - checkout attr=-text aeol= core.autocrlf=false core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 582 - checkout attr=-text aeol= core.autocrlf=false core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 583 - checkout attr=-text aeol= core.autocrlf=false core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 584 - ls-files --eol attr=-text aeol=lf core.autocrlf=false core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ LF crlf_false_attr__LF.txt
ok 585 - checkout attr=-text aeol=lf core.autocrlf=false core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 586 - checkout attr=-text aeol=lf core.autocrlf=false core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 587 - checkout attr=-text aeol=lf core.autocrlf=false core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 588 - checkout attr=-text aeol=lf core.autocrlf=false core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 589 - checkout attr=-text aeol=lf core.autocrlf=false core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 590 - ls-files --eol attr=-text aeol=crlf core.autocrlf=false core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ LF crlf_false_attr__LF.txt
ok 591 - checkout attr=-text aeol=crlf core.autocrlf=false core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 592 - checkout attr=-text aeol=crlf core.autocrlf=false core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 593 - checkout attr=-text aeol=crlf core.autocrlf=false core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 594 - checkout attr=-text aeol=crlf core.autocrlf=false core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 595 - checkout attr=-text aeol=crlf core.autocrlf=false core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 596 - ls-files --eol attr=text aeol=lf core.autocrlf=false core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ LF crlf_false_attr__LF.txt
ok 597 - checkout attr=text aeol=lf core.autocrlf=false core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 598 - checkout attr=text aeol=lf core.autocrlf=false core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 599 - checkout attr=text aeol=lf core.autocrlf=false core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 600 - checkout attr=text aeol=lf core.autocrlf=false core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 601 - checkout attr=text aeol=lf core.autocrlf=false core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 602 - ls-files --eol attr=text aeol=crlf core.autocrlf=false core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF crlf_false_attr__LF.txt
ok 603 - checkout attr=text aeol=crlf core.autocrlf=false core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 604 - checkout attr=text aeol=crlf core.autocrlf=false core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 605 - checkout attr=text aeol=crlf core.autocrlf=false core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 606 - checkout attr=text aeol=crlf core.autocrlf=false core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 607 - checkout attr=text aeol=crlf core.autocrlf=false core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 608 - ls-files --eol attr=auto aeol=lf core.autocrlf=false core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ LF crlf_false_attr__LF.txt
ok 609 - checkout attr=auto aeol=lf core.autocrlf=false core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 610 - checkout attr=auto aeol=lf core.autocrlf=false core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 611 - checkout attr=auto aeol=lf core.autocrlf=false core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 612 - checkout attr=auto aeol=lf core.autocrlf=false core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 613 - checkout attr=auto aeol=lf core.autocrlf=false core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 614 - ls-files --eol attr=auto aeol=crlf core.autocrlf=false core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 615 - checkout attr=auto aeol=crlf core.autocrlf=false core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 616 - checkout attr=auto aeol=crlf core.autocrlf=false core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 617 - checkout attr=auto aeol=crlf core.autocrlf=false core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 618 - checkout attr=auto aeol=crlf core.autocrlf=false core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 619 - checkout attr=auto aeol=crlf core.autocrlf=false core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 620 - ls-files --eol attr=-text aeol= core.autocrlf=input core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ LF crlf_false_attr__LF.txt
ok 621 - checkout attr=-text aeol= core.autocrlf=input core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 622 - checkout attr=-text aeol= core.autocrlf=input core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 623 - checkout attr=-text aeol= core.autocrlf=input core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 624 - checkout attr=-text aeol= core.autocrlf=input core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 625 - checkout attr=-text aeol= core.autocrlf=input core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 626 - ls-files --eol attr=-text aeol=lf core.autocrlf=input core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ LF crlf_false_attr__LF.txt
ok 627 - checkout attr=-text aeol=lf core.autocrlf=input core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 628 - checkout attr=-text aeol=lf core.autocrlf=input core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 629 - checkout attr=-text aeol=lf core.autocrlf=input core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 630 - checkout attr=-text aeol=lf core.autocrlf=input core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 631 - checkout attr=-text aeol=lf core.autocrlf=input core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 632 - ls-files --eol attr=-text aeol=crlf core.autocrlf=input core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ LF crlf_false_attr__LF.txt
ok 633 - checkout attr=-text aeol=crlf core.autocrlf=input core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 634 - checkout attr=-text aeol=crlf core.autocrlf=input core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 635 - checkout attr=-text aeol=crlf core.autocrlf=input core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 636 - checkout attr=-text aeol=crlf core.autocrlf=input core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 637 - checkout attr=-text aeol=crlf core.autocrlf=input core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 638 - ls-files --eol attr=text aeol=lf core.autocrlf=input core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ LF crlf_false_attr__LF.txt
ok 639 - checkout attr=text aeol=lf core.autocrlf=input core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 640 - checkout attr=text aeol=lf core.autocrlf=input core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 641 - checkout attr=text aeol=lf core.autocrlf=input core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 642 - checkout attr=text aeol=lf core.autocrlf=input core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 643 - checkout attr=text aeol=lf core.autocrlf=input core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 644 - ls-files --eol attr=text aeol=crlf core.autocrlf=input core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ CRLF crlf_false_attr__LF.txt
ok 645 - checkout attr=text aeol=crlf core.autocrlf=input core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 646 - checkout attr=text aeol=crlf core.autocrlf=input core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 647 - checkout attr=text aeol=crlf core.autocrlf=input core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 648 - checkout attr=text aeol=crlf core.autocrlf=input core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 649 - checkout attr=text aeol=crlf core.autocrlf=input core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 650 - ls-files --eol attr=auto aeol=lf core.autocrlf=input core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ LF crlf_false_attr__LF.txt
ok 651 - checkout attr=auto aeol=lf core.autocrlf=input core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 652 - checkout attr=auto aeol=lf core.autocrlf=input core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 653 - checkout attr=auto aeol=lf core.autocrlf=input core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 654 - checkout attr=auto aeol=lf core.autocrlf=input core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 655 - checkout attr=auto aeol=lf core.autocrlf=input core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 656 - ls-files --eol attr=auto aeol=crlf core.autocrlf=input core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 657 - checkout attr=auto aeol=crlf core.autocrlf=input core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 658 - checkout attr=auto aeol=crlf core.autocrlf=input core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 659 - checkout attr=auto aeol=crlf core.autocrlf=input core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 660 - checkout attr=auto aeol=crlf core.autocrlf=input core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 661 - checkout attr=auto aeol=crlf core.autocrlf=input core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 662 - ls-files --eol attr= aeol= core.autocrlf=false core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_false_attr__ LF crlf_false_attr__LF.txt
ok 663 - checkout attr= aeol= core.autocrlf=false core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr__ CRLF crlf_false_attr__CRLF.txt
ok 664 - checkout attr= aeol= core.autocrlf=false core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr__ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 665 - checkout attr= aeol= core.autocrlf=false core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr__ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 666 - checkout attr= aeol= core.autocrlf=false core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_false_attr__ LF_nul crlf_false_attr__LF_nul.txt
ok 667 - checkout attr= aeol= core.autocrlf=false core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 668 - ls-files --eol attr= aeol= core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr__ CRLF crlf_false_attr__LF.txt
ok 669 - checkout attr= aeol= core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr__ CRLF crlf_false_attr__CRLF.txt
ok 670 - checkout attr= aeol= core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr__ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 671 - checkout attr= aeol= core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr__ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 672 - checkout attr= aeol= core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr__ LF_nul crlf_false_attr__LF_nul.txt
ok 673 - checkout attr= aeol= core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 674 - ls-files --eol attr=auto aeol= core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 675 - checkout attr=auto aeol= core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 676 - checkout attr=auto aeol= core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 677 - checkout attr=auto aeol= core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 678 - checkout attr=auto aeol= core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 679 - checkout attr=auto aeol= core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 680 - ls-files --eol attr=text aeol= core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF crlf_false_attr__LF.txt
ok 681 - checkout attr=text aeol= core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 682 - checkout attr=text aeol= core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 683 - checkout attr=text aeol= core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 684 - checkout attr=text aeol= core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 685 - checkout attr=text aeol= core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 686 - ls-files --eol attr=text aeol= core.autocrlf=input core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ LF crlf_false_attr__LF.txt
ok 687 - checkout attr=text aeol= core.autocrlf=input core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 688 - checkout attr=text aeol= core.autocrlf=input core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 689 - checkout attr=text aeol= core.autocrlf=input core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 690 - checkout attr=text aeol= core.autocrlf=input core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 691 - checkout attr=text aeol= core.autocrlf=input core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 692 - ls-files --eol attr=auto aeol= core.autocrlf=input core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ LF crlf_false_attr__LF.txt
ok 693 - checkout attr=auto aeol= core.autocrlf=input core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 694 - checkout attr=auto aeol= core.autocrlf=input core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 695 - checkout attr=auto aeol= core.autocrlf=input core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 696 - checkout attr=auto aeol= core.autocrlf=input core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 697 - checkout attr=auto aeol= core.autocrlf=input core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 698 - ls-files --eol attr=-text aeol= core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ LF crlf_false_attr__LF.txt
ok 699 - checkout attr=-text aeol= core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 700 - checkout attr=-text aeol= core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 701 - checkout attr=-text aeol= core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 702 - checkout attr=-text aeol= core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 703 - checkout attr=-text aeol= core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 704 - ls-files --eol attr=-text aeol=lf core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ LF crlf_false_attr__LF.txt
ok 705 - checkout attr=-text aeol=lf core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 706 - checkout attr=-text aeol=lf core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 707 - checkout attr=-text aeol=lf core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 708 - checkout attr=-text aeol=lf core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 709 - checkout attr=-text aeol=lf core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 710 - ls-files --eol attr=-text aeol=crlf core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ LF crlf_false_attr__LF.txt
ok 711 - checkout attr=-text aeol=crlf core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 712 - checkout attr=-text aeol=crlf core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 713 - checkout attr=-text aeol=crlf core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 714 - checkout attr=-text aeol=crlf core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 715 - checkout attr=-text aeol=crlf core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 716 - ls-files --eol attr=text aeol=lf core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ LF crlf_false_attr__LF.txt
ok 717 - checkout attr=text aeol=lf core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 718 - checkout attr=text aeol=lf core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 719 - checkout attr=text aeol=lf core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 720 - checkout attr=text aeol=lf core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 721 - checkout attr=text aeol=lf core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 722 - ls-files --eol attr=text aeol=crlf core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF crlf_false_attr__LF.txt
ok 723 - checkout attr=text aeol=crlf core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 724 - checkout attr=text aeol=crlf core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 725 - checkout attr=text aeol=crlf core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 726 - checkout attr=text aeol=crlf core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 727 - checkout attr=text aeol=crlf core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 728 - ls-files --eol attr=auto aeol=lf core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ LF crlf_false_attr__LF.txt
ok 729 - checkout attr=auto aeol=lf core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 730 - checkout attr=auto aeol=lf core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 731 - checkout attr=auto aeol=lf core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 732 - checkout attr=auto aeol=lf core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 733 - checkout attr=auto aeol=lf core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 734 - ls-files --eol attr=auto aeol=crlf core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 735 - checkout attr=auto aeol=crlf core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 736 - checkout attr=auto aeol=crlf core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 737 - checkout attr=auto aeol=crlf core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 738 - checkout attr=auto aeol=crlf core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 739 - checkout attr=auto aeol=crlf core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 740 - ls-files --eol attr=-text aeol= core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ LF crlf_false_attr__LF.txt
ok 741 - checkout attr=-text aeol= core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 742 - checkout attr=-text aeol= core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 743 - checkout attr=-text aeol= core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 744 - checkout attr=-text aeol= core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 745 - checkout attr=-text aeol= core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 746 - ls-files --eol attr=-text aeol=lf core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ LF crlf_false_attr__LF.txt
ok 747 - checkout attr=-text aeol=lf core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 748 - checkout attr=-text aeol=lf core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 749 - checkout attr=-text aeol=lf core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 750 - checkout attr=-text aeol=lf core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 751 - checkout attr=-text aeol=lf core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 752 - ls-files --eol attr=-text aeol=crlf core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ LF crlf_false_attr__LF.txt
ok 753 - checkout attr=-text aeol=crlf core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 754 - checkout attr=-text aeol=crlf core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 755 - checkout attr=-text aeol=crlf core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 756 - checkout attr=-text aeol=crlf core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 757 - checkout attr=-text aeol=crlf core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 758 - ls-files --eol attr=text aeol=lf core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ LF crlf_false_attr__LF.txt
ok 759 - checkout attr=text aeol=lf core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 760 - checkout attr=text aeol=lf core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 761 - checkout attr=text aeol=lf core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 762 - checkout attr=text aeol=lf core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 763 - checkout attr=text aeol=lf core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 764 - ls-files --eol attr=text aeol=crlf core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ CRLF crlf_false_attr__LF.txt
ok 765 - checkout attr=text aeol=crlf core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 766 - checkout attr=text aeol=crlf core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 767 - checkout attr=text aeol=crlf core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 768 - checkout attr=text aeol=crlf core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 769 - checkout attr=text aeol=crlf core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 770 - ls-files --eol attr=auto aeol=lf core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ LF crlf_false_attr__LF.txt
ok 771 - checkout attr=auto aeol=lf core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 772 - checkout attr=auto aeol=lf core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 773 - checkout attr=auto aeol=lf core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 774 - checkout attr=auto aeol=lf core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 775 - checkout attr=auto aeol=lf core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 776 - ls-files --eol attr=auto aeol=crlf core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 777 - checkout attr=auto aeol=crlf core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 778 - checkout attr=auto aeol=crlf core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 779 - checkout attr=auto aeol=crlf core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 780 - checkout attr=auto aeol=crlf core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 781 - checkout attr=auto aeol=crlf core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 782 - ls-files --eol attr=-text aeol= core.autocrlf=input core.eol=native
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ LF crlf_false_attr__LF.txt
ok 783 - checkout attr=-text aeol= core.autocrlf=input core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 784 - checkout attr=-text aeol= core.autocrlf=input core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 785 - checkout attr=-text aeol= core.autocrlf=input core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 786 - checkout attr=-text aeol= core.autocrlf=input core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 787 - checkout attr=-text aeol= core.autocrlf=input core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 788 - ls-files --eol attr=-text aeol=lf core.autocrlf=input core.eol=native
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ LF crlf_false_attr__LF.txt
ok 789 - checkout attr=-text aeol=lf core.autocrlf=input core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 790 - checkout attr=-text aeol=lf core.autocrlf=input core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 791 - checkout attr=-text aeol=lf core.autocrlf=input core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 792 - checkout attr=-text aeol=lf core.autocrlf=input core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 793 - checkout attr=-text aeol=lf core.autocrlf=input core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 794 - ls-files --eol attr=-text aeol=crlf core.autocrlf=input core.eol=native
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ LF crlf_false_attr__LF.txt
ok 795 - checkout attr=-text aeol=crlf core.autocrlf=input core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 796 - checkout attr=-text aeol=crlf core.autocrlf=input core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 797 - checkout attr=-text aeol=crlf core.autocrlf=input core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 798 - checkout attr=-text aeol=crlf core.autocrlf=input core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 799 - checkout attr=-text aeol=crlf core.autocrlf=input core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 800 - ls-files --eol attr=text aeol=lf core.autocrlf=input core.eol=native
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ LF crlf_false_attr__LF.txt
ok 801 - checkout attr=text aeol=lf core.autocrlf=input core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 802 - checkout attr=text aeol=lf core.autocrlf=input core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 803 - checkout attr=text aeol=lf core.autocrlf=input core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 804 - checkout attr=text aeol=lf core.autocrlf=input core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 805 - checkout attr=text aeol=lf core.autocrlf=input core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 806 - ls-files --eol attr=text aeol=crlf core.autocrlf=input core.eol=native
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ CRLF crlf_false_attr__LF.txt
ok 807 - checkout attr=text aeol=crlf core.autocrlf=input core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 808 - checkout attr=text aeol=crlf core.autocrlf=input core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 809 - checkout attr=text aeol=crlf core.autocrlf=input core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 810 - checkout attr=text aeol=crlf core.autocrlf=input core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 811 - checkout attr=text aeol=crlf core.autocrlf=input core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 812 - ls-files --eol attr=auto aeol=lf core.autocrlf=input core.eol=native
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ LF crlf_false_attr__LF.txt
ok 813 - checkout attr=auto aeol=lf core.autocrlf=input core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 814 - checkout attr=auto aeol=lf core.autocrlf=input core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 815 - checkout attr=auto aeol=lf core.autocrlf=input core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 816 - checkout attr=auto aeol=lf core.autocrlf=input core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 817 - checkout attr=auto aeol=lf core.autocrlf=input core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 818 - ls-files --eol attr=auto aeol=crlf core.autocrlf=input core.eol=native
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 819 - checkout attr=auto aeol=crlf core.autocrlf=input core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 820 - checkout attr=auto aeol=crlf core.autocrlf=input core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 821 - checkout attr=auto aeol=crlf core.autocrlf=input core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 822 - checkout attr=auto aeol=crlf core.autocrlf=input core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 823 - checkout attr=auto aeol=crlf core.autocrlf=input core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 824 - ls-files --eol attr= aeol= core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr__ LF crlf_false_attr__LF.txt
ok 825 - checkout attr= aeol= core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr__ CRLF crlf_false_attr__CRLF.txt
ok 826 - checkout attr= aeol= core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr__ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 827 - checkout attr= aeol= core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr__ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 828 - checkout attr= aeol= core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr__ LF_nul crlf_false_attr__LF_nul.txt
ok 829 - checkout attr= aeol= core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 830 - ls-files --eol attr= aeol= core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr__ CRLF crlf_false_attr__LF.txt
ok 831 - checkout attr= aeol= core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr__ CRLF crlf_false_attr__CRLF.txt
ok 832 - checkout attr= aeol= core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr__ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 833 - checkout attr= aeol= core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr__ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 834 - checkout attr= aeol= core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr__ LF_nul crlf_false_attr__LF_nul.txt
ok 835 - checkout attr= aeol= core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 836 - ls-files --eol attr=auto aeol= core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 837 - checkout attr=auto aeol= core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 838 - checkout attr=auto aeol= core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 839 - checkout attr=auto aeol= core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 840 - checkout attr=auto aeol= core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 841 - checkout attr=auto aeol= core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 842 - ls-files --eol attr=text aeol= core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF crlf_false_attr__LF.txt
ok 843 - checkout attr=text aeol= core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 844 - checkout attr=text aeol= core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 845 - checkout attr=text aeol= core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 846 - checkout attr=text aeol= core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 847 - checkout attr=text aeol= core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 848 - ls-files --eol attr=text aeol= core.autocrlf=input core.eol=native
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ LF crlf_false_attr__LF.txt
ok 849 - checkout attr=text aeol= core.autocrlf=input core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 850 - checkout attr=text aeol= core.autocrlf=input core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 851 - checkout attr=text aeol= core.autocrlf=input core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 852 - checkout attr=text aeol= core.autocrlf=input core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 853 - checkout attr=text aeol= core.autocrlf=input core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 854 - ls-files --eol attr=auto aeol= core.autocrlf=input core.eol=native
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ LF crlf_false_attr__LF.txt
ok 855 - checkout attr=auto aeol= core.autocrlf=input core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 856 - checkout attr=auto aeol= core.autocrlf=input core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 857 - checkout attr=auto aeol= core.autocrlf=input core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 858 - checkout attr=auto aeol= core.autocrlf=input core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 859 - checkout attr=auto aeol= core.autocrlf=input core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 860 - ls-files --eol attr=text aeol= core.autocrlf=false core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF crlf_false_attr__LF.txt
ok 861 - checkout attr=text aeol= core.autocrlf=false core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 862 - checkout attr=text aeol= core.autocrlf=false core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 863 - checkout attr=text aeol= core.autocrlf=false core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 864 - checkout attr=text aeol= core.autocrlf=false core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 865 - checkout attr=text aeol= core.autocrlf=false core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 866 - ls-files --eol attr=text aeol= core.autocrlf=false core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ LF crlf_false_attr__LF.txt
ok 867 - checkout attr=text aeol= core.autocrlf=false core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 868 - checkout attr=text aeol= core.autocrlf=false core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 869 - checkout attr=text aeol= core.autocrlf=false core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 870 - checkout attr=text aeol= core.autocrlf=false core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 871 - checkout attr=text aeol= core.autocrlf=false core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 872 - ls-files --eol attr=text aeol= core.autocrlf=false core.eol=
expecting success:
compare_ws_file eol__crlf_false_attr_text_ LF crlf_false_attr__LF.txt
ok 873 - checkout attr=text aeol= core.autocrlf=false core.eol= file=LF
expecting success:
compare_ws_file eol__crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 874 - checkout attr=text aeol= core.autocrlf=false core.eol= file=CRLF
expecting success:
compare_ws_file eol__crlf_false_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 875 - checkout attr=text aeol= core.autocrlf=false core.eol= file=CRLF_mix_LF
expecting success:
compare_ws_file eol__crlf_false_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 876 - checkout attr=text aeol= core.autocrlf=false core.eol= file=LF_mix_CR
expecting success:
compare_ws_file eol__crlf_false_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 877 - checkout attr=text aeol= core.autocrlf=false core.eol= file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 878 - ls-files --eol attr=text aeol= core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ LF crlf_false_attr__LF.txt
ok 879 - checkout attr=text aeol= core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 880 - checkout attr=text aeol= core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 881 - checkout attr=text aeol= core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 882 - checkout attr=text aeol= core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 883 - checkout attr=text aeol= core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 884 - ls-files --eol attr=auto aeol= core.autocrlf=false core.eol=
expecting success:
compare_ws_file eol__crlf_false_attr_auto_ LF crlf_false_attr__LF.txt
ok 885 - checkout attr=auto aeol= core.autocrlf=false core.eol= file=LF
expecting success:
compare_ws_file eol__crlf_false_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 886 - checkout attr=auto aeol= core.autocrlf=false core.eol= file=CRLF
expecting success:
compare_ws_file eol__crlf_false_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 887 - checkout attr=auto aeol= core.autocrlf=false core.eol= file=CRLF_mix_LF
expecting success:
compare_ws_file eol__crlf_false_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 888 - checkout attr=auto aeol= core.autocrlf=false core.eol= file=LF_mix_CR
expecting success:
compare_ws_file eol__crlf_false_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 889 - checkout attr=auto aeol= core.autocrlf=false core.eol= file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 890 - ls-files --eol attr=auto aeol= core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ LF crlf_false_attr__LF.txt
ok 891 - checkout attr=auto aeol= core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 892 - checkout attr=auto aeol= core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 893 - checkout attr=auto aeol= core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 894 - checkout attr=auto aeol= core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 895 - checkout attr=auto aeol= core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 896 - ls-files --eol attr=-text ident aeol= core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ LF crlf_false_attr__LF.txt
ok 897 - checkout attr=-text ident aeol= core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 898 - checkout attr=-text ident aeol= core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 899 - checkout attr=-text ident aeol= core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 900 - checkout attr=-text ident aeol= core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 901 - checkout attr=-text ident aeol= core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 902 - ls-files --eol attr=-text ident aeol=lf core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ LF crlf_false_attr__LF.txt
ok 903 - checkout attr=-text ident aeol=lf core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 904 - checkout attr=-text ident aeol=lf core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 905 - checkout attr=-text ident aeol=lf core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 906 - checkout attr=-text ident aeol=lf core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 907 - checkout attr=-text ident aeol=lf core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 908 - ls-files --eol attr=-text ident aeol=crlf core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ LF crlf_false_attr__LF.txt
ok 909 - checkout attr=-text ident aeol=crlf core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 910 - checkout attr=-text ident aeol=crlf core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 911 - checkout attr=-text ident aeol=crlf core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 912 - checkout attr=-text ident aeol=crlf core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 913 - checkout attr=-text ident aeol=crlf core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 914 - ls-files --eol attr=text ident aeol=lf core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ LF crlf_false_attr__LF.txt
ok 915 - checkout attr=text ident aeol=lf core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 916 - checkout attr=text ident aeol=lf core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 917 - checkout attr=text ident aeol=lf core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 918 - checkout attr=text ident aeol=lf core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 919 - checkout attr=text ident aeol=lf core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 920 - ls-files --eol attr=text ident aeol=crlf core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF crlf_false_attr__LF.txt
ok 921 - checkout attr=text ident aeol=crlf core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 922 - checkout attr=text ident aeol=crlf core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 923 - checkout attr=text ident aeol=crlf core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 924 - checkout attr=text ident aeol=crlf core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 925 - checkout attr=text ident aeol=crlf core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 926 - ls-files --eol attr=auto ident aeol=lf core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ LF crlf_false_attr__LF.txt
ok 927 - checkout attr=auto ident aeol=lf core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 928 - checkout attr=auto ident aeol=lf core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 929 - checkout attr=auto ident aeol=lf core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 930 - checkout attr=auto ident aeol=lf core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 931 - checkout attr=auto ident aeol=lf core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 932 - ls-files --eol attr=auto ident aeol=crlf core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 933 - checkout attr=auto ident aeol=crlf core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 934 - checkout attr=auto ident aeol=crlf core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 935 - checkout attr=auto ident aeol=crlf core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 936 - checkout attr=auto ident aeol=crlf core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 937 - checkout attr=auto ident aeol=crlf core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 938 - ls-files --eol attr=-text ident aeol= core.autocrlf=false core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ LF crlf_false_attr__LF.txt
ok 939 - checkout attr=-text ident aeol= core.autocrlf=false core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 940 - checkout attr=-text ident aeol= core.autocrlf=false core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 941 - checkout attr=-text ident aeol= core.autocrlf=false core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 942 - checkout attr=-text ident aeol= core.autocrlf=false core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 943 - checkout attr=-text ident aeol= core.autocrlf=false core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 944 - ls-files --eol attr=-text ident aeol=lf core.autocrlf=false core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ LF crlf_false_attr__LF.txt
ok 945 - checkout attr=-text ident aeol=lf core.autocrlf=false core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 946 - checkout attr=-text ident aeol=lf core.autocrlf=false core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 947 - checkout attr=-text ident aeol=lf core.autocrlf=false core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 948 - checkout attr=-text ident aeol=lf core.autocrlf=false core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 949 - checkout attr=-text ident aeol=lf core.autocrlf=false core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 950 - ls-files --eol attr=-text ident aeol=crlf core.autocrlf=false core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ LF crlf_false_attr__LF.txt
ok 951 - checkout attr=-text ident aeol=crlf core.autocrlf=false core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 952 - checkout attr=-text ident aeol=crlf core.autocrlf=false core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 953 - checkout attr=-text ident aeol=crlf core.autocrlf=false core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 954 - checkout attr=-text ident aeol=crlf core.autocrlf=false core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_false_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 955 - checkout attr=-text ident aeol=crlf core.autocrlf=false core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 956 - ls-files --eol attr=text ident aeol=lf core.autocrlf=false core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ LF crlf_false_attr__LF.txt
ok 957 - checkout attr=text ident aeol=lf core.autocrlf=false core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 958 - checkout attr=text ident aeol=lf core.autocrlf=false core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 959 - checkout attr=text ident aeol=lf core.autocrlf=false core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 960 - checkout attr=text ident aeol=lf core.autocrlf=false core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 961 - checkout attr=text ident aeol=lf core.autocrlf=false core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 962 - ls-files --eol attr=text ident aeol=crlf core.autocrlf=false core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ CRLF crlf_false_attr__LF.txt
ok 963 - checkout attr=text ident aeol=crlf core.autocrlf=false core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 964 - checkout attr=text ident aeol=crlf core.autocrlf=false core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 965 - checkout attr=text ident aeol=crlf core.autocrlf=false core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 966 - checkout attr=text ident aeol=crlf core.autocrlf=false core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 967 - checkout attr=text ident aeol=crlf core.autocrlf=false core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 968 - ls-files --eol attr=auto ident aeol=lf core.autocrlf=false core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ LF crlf_false_attr__LF.txt
ok 969 - checkout attr=auto ident aeol=lf core.autocrlf=false core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 970 - checkout attr=auto ident aeol=lf core.autocrlf=false core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 971 - checkout attr=auto ident aeol=lf core.autocrlf=false core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 972 - checkout attr=auto ident aeol=lf core.autocrlf=false core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 973 - checkout attr=auto ident aeol=lf core.autocrlf=false core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 974 - ls-files --eol attr=auto ident aeol=crlf core.autocrlf=false core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 975 - checkout attr=auto ident aeol=crlf core.autocrlf=false core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 976 - checkout attr=auto ident aeol=crlf core.autocrlf=false core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 977 - checkout attr=auto ident aeol=crlf core.autocrlf=false core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 978 - checkout attr=auto ident aeol=crlf core.autocrlf=false core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_false_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 979 - checkout attr=auto ident aeol=crlf core.autocrlf=false core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 980 - ls-files --eol attr=-text ident aeol= core.autocrlf=input core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ LF crlf_false_attr__LF.txt
ok 981 - checkout attr=-text ident aeol= core.autocrlf=input core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 982 - checkout attr=-text ident aeol= core.autocrlf=input core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 983 - checkout attr=-text ident aeol= core.autocrlf=input core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 984 - checkout attr=-text ident aeol= core.autocrlf=input core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 985 - checkout attr=-text ident aeol= core.autocrlf=input core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 986 - ls-files --eol attr=-text ident aeol=lf core.autocrlf=input core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ LF crlf_false_attr__LF.txt
ok 987 - checkout attr=-text ident aeol=lf core.autocrlf=input core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 988 - checkout attr=-text ident aeol=lf core.autocrlf=input core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 989 - checkout attr=-text ident aeol=lf core.autocrlf=input core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 990 - checkout attr=-text ident aeol=lf core.autocrlf=input core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 991 - checkout attr=-text ident aeol=lf core.autocrlf=input core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 992 - ls-files --eol attr=-text ident aeol=crlf core.autocrlf=input core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ LF crlf_false_attr__LF.txt
ok 993 - checkout attr=-text ident aeol=crlf core.autocrlf=input core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 994 - checkout attr=-text ident aeol=crlf core.autocrlf=input core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 995 - checkout attr=-text ident aeol=crlf core.autocrlf=input core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 996 - checkout attr=-text ident aeol=crlf core.autocrlf=input core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_input_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 997 - checkout attr=-text ident aeol=crlf core.autocrlf=input core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 998 - ls-files --eol attr=text ident aeol=lf core.autocrlf=input core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ LF crlf_false_attr__LF.txt
ok 999 - checkout attr=text ident aeol=lf core.autocrlf=input core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1000 - checkout attr=text ident aeol=lf core.autocrlf=input core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1001 - checkout attr=text ident aeol=lf core.autocrlf=input core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1002 - checkout attr=text ident aeol=lf core.autocrlf=input core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1003 - checkout attr=text ident aeol=lf core.autocrlf=input core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1004 - ls-files --eol attr=text ident aeol=crlf core.autocrlf=input core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ CRLF crlf_false_attr__LF.txt
ok 1005 - checkout attr=text ident aeol=crlf core.autocrlf=input core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1006 - checkout attr=text ident aeol=crlf core.autocrlf=input core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 1007 - checkout attr=text ident aeol=crlf core.autocrlf=input core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1008 - checkout attr=text ident aeol=crlf core.autocrlf=input core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 1009 - checkout attr=text ident aeol=crlf core.autocrlf=input core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1010 - ls-files --eol attr=auto ident aeol=lf core.autocrlf=input core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ LF crlf_false_attr__LF.txt
ok 1011 - checkout attr=auto ident aeol=lf core.autocrlf=input core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1012 - checkout attr=auto ident aeol=lf core.autocrlf=input core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1013 - checkout attr=auto ident aeol=lf core.autocrlf=input core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1014 - checkout attr=auto ident aeol=lf core.autocrlf=input core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1015 - checkout attr=auto ident aeol=lf core.autocrlf=input core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1016 - ls-files --eol attr=auto ident aeol=crlf core.autocrlf=input core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 1017 - checkout attr=auto ident aeol=crlf core.autocrlf=input core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1018 - checkout attr=auto ident aeol=crlf core.autocrlf=input core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1019 - checkout attr=auto ident aeol=crlf core.autocrlf=input core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1020 - checkout attr=auto ident aeol=crlf core.autocrlf=input core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1021 - checkout attr=auto ident aeol=crlf core.autocrlf=input core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1022 - ls-files --eol attr= ident aeol= core.autocrlf=false core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_false_attr__ LF crlf_false_attr__LF.txt
ok 1023 - checkout attr= ident aeol= core.autocrlf=false core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr__ CRLF crlf_false_attr__CRLF.txt
ok 1024 - checkout attr= ident aeol= core.autocrlf=false core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_false_attr__ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1025 - checkout attr= ident aeol= core.autocrlf=false core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr__ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1026 - checkout attr= ident aeol= core.autocrlf=false core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_false_attr__ LF_nul crlf_false_attr__LF_nul.txt
ok 1027 - checkout attr= ident aeol= core.autocrlf=false core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1028 - ls-files --eol attr= ident aeol= core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr__ CRLF crlf_false_attr__LF.txt
ok 1029 - checkout attr= ident aeol= core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr__ CRLF crlf_false_attr__CRLF.txt
ok 1030 - checkout attr= ident aeol= core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr__ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1031 - checkout attr= ident aeol= core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr__ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1032 - checkout attr= ident aeol= core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr__ LF_nul crlf_false_attr__LF_nul.txt
ok 1033 - checkout attr= ident aeol= core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1034 - ls-files --eol attr=auto ident aeol= core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 1035 - checkout attr=auto ident aeol= core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1036 - checkout attr=auto ident aeol= core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1037 - checkout attr=auto ident aeol= core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1038 - checkout attr=auto ident aeol= core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1039 - checkout attr=auto ident aeol= core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1040 - ls-files --eol attr=text ident aeol= core.autocrlf=true core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF crlf_false_attr__LF.txt
ok 1041 - checkout attr=text ident aeol= core.autocrlf=true core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1042 - checkout attr=text ident aeol= core.autocrlf=true core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 1043 - checkout attr=text ident aeol= core.autocrlf=true core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1044 - checkout attr=text ident aeol= core.autocrlf=true core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_true_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 1045 - checkout attr=text ident aeol= core.autocrlf=true core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1046 - ls-files --eol attr=text ident aeol= core.autocrlf=input core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ LF crlf_false_attr__LF.txt
ok 1047 - checkout attr=text ident aeol= core.autocrlf=input core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1048 - checkout attr=text ident aeol= core.autocrlf=input core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1049 - checkout attr=text ident aeol= core.autocrlf=input core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1050 - checkout attr=text ident aeol= core.autocrlf=input core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_input_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1051 - checkout attr=text ident aeol= core.autocrlf=input core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1052 - ls-files --eol attr=auto ident aeol= core.autocrlf=input core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ LF crlf_false_attr__LF.txt
ok 1053 - checkout attr=auto ident aeol= core.autocrlf=input core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1054 - checkout attr=auto ident aeol= core.autocrlf=input core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1055 - checkout attr=auto ident aeol= core.autocrlf=input core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1056 - checkout attr=auto ident aeol= core.autocrlf=input core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_input_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1057 - checkout attr=auto ident aeol= core.autocrlf=input core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1058 - ls-files --eol attr=-text ident aeol= core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ LF crlf_false_attr__LF.txt
ok 1059 - checkout attr=-text ident aeol= core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 1060 - checkout attr=-text ident aeol= core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1061 - checkout attr=-text ident aeol= core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1062 - checkout attr=-text ident aeol= core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1063 - checkout attr=-text ident aeol= core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1064 - ls-files --eol attr=-text ident aeol=lf core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ LF crlf_false_attr__LF.txt
ok 1065 - checkout attr=-text ident aeol=lf core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 1066 - checkout attr=-text ident aeol=lf core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1067 - checkout attr=-text ident aeol=lf core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1068 - checkout attr=-text ident aeol=lf core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1069 - checkout attr=-text ident aeol=lf core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1070 - ls-files --eol attr=-text ident aeol=crlf core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ LF crlf_false_attr__LF.txt
ok 1071 - checkout attr=-text ident aeol=crlf core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 1072 - checkout attr=-text ident aeol=crlf core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1073 - checkout attr=-text ident aeol=crlf core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1074 - checkout attr=-text ident aeol=crlf core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1075 - checkout attr=-text ident aeol=crlf core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1076 - ls-files --eol attr=text ident aeol=lf core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ LF crlf_false_attr__LF.txt
ok 1077 - checkout attr=text ident aeol=lf core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1078 - checkout attr=text ident aeol=lf core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1079 - checkout attr=text ident aeol=lf core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1080 - checkout attr=text ident aeol=lf core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1081 - checkout attr=text ident aeol=lf core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1082 - ls-files --eol attr=text ident aeol=crlf core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF crlf_false_attr__LF.txt
ok 1083 - checkout attr=text ident aeol=crlf core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1084 - checkout attr=text ident aeol=crlf core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 1085 - checkout attr=text ident aeol=crlf core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1086 - checkout attr=text ident aeol=crlf core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 1087 - checkout attr=text ident aeol=crlf core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1088 - ls-files --eol attr=auto ident aeol=lf core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ LF crlf_false_attr__LF.txt
ok 1089 - checkout attr=auto ident aeol=lf core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1090 - checkout attr=auto ident aeol=lf core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1091 - checkout attr=auto ident aeol=lf core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1092 - checkout attr=auto ident aeol=lf core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1093 - checkout attr=auto ident aeol=lf core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1094 - ls-files --eol attr=auto ident aeol=crlf core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 1095 - checkout attr=auto ident aeol=crlf core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1096 - checkout attr=auto ident aeol=crlf core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1097 - checkout attr=auto ident aeol=crlf core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1098 - checkout attr=auto ident aeol=crlf core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1099 - checkout attr=auto ident aeol=crlf core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1100 - ls-files --eol attr=-text ident aeol= core.autocrlf=false core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ LF crlf_false_attr__LF.txt
ok 1101 - checkout attr=-text ident aeol= core.autocrlf=false core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 1102 - checkout attr=-text ident aeol= core.autocrlf=false core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1103 - checkout attr=-text ident aeol= core.autocrlf=false core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1104 - checkout attr=-text ident aeol= core.autocrlf=false core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1105 - checkout attr=-text ident aeol= core.autocrlf=false core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1106 - ls-files --eol attr=-text ident aeol=lf core.autocrlf=false core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ LF crlf_false_attr__LF.txt
ok 1107 - checkout attr=-text ident aeol=lf core.autocrlf=false core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 1108 - checkout attr=-text ident aeol=lf core.autocrlf=false core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1109 - checkout attr=-text ident aeol=lf core.autocrlf=false core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1110 - checkout attr=-text ident aeol=lf core.autocrlf=false core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1111 - checkout attr=-text ident aeol=lf core.autocrlf=false core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1112 - ls-files --eol attr=-text ident aeol=crlf core.autocrlf=false core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ LF crlf_false_attr__LF.txt
ok 1113 - checkout attr=-text ident aeol=crlf core.autocrlf=false core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 1114 - checkout attr=-text ident aeol=crlf core.autocrlf=false core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1115 - checkout attr=-text ident aeol=crlf core.autocrlf=false core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1116 - checkout attr=-text ident aeol=crlf core.autocrlf=false core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1117 - checkout attr=-text ident aeol=crlf core.autocrlf=false core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1118 - ls-files --eol attr=text ident aeol=lf core.autocrlf=false core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ LF crlf_false_attr__LF.txt
ok 1119 - checkout attr=text ident aeol=lf core.autocrlf=false core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1120 - checkout attr=text ident aeol=lf core.autocrlf=false core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1121 - checkout attr=text ident aeol=lf core.autocrlf=false core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1122 - checkout attr=text ident aeol=lf core.autocrlf=false core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1123 - checkout attr=text ident aeol=lf core.autocrlf=false core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1124 - ls-files --eol attr=text ident aeol=crlf core.autocrlf=false core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF crlf_false_attr__LF.txt
ok 1125 - checkout attr=text ident aeol=crlf core.autocrlf=false core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1126 - checkout attr=text ident aeol=crlf core.autocrlf=false core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 1127 - checkout attr=text ident aeol=crlf core.autocrlf=false core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1128 - checkout attr=text ident aeol=crlf core.autocrlf=false core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 1129 - checkout attr=text ident aeol=crlf core.autocrlf=false core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1130 - ls-files --eol attr=auto ident aeol=lf core.autocrlf=false core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ LF crlf_false_attr__LF.txt
ok 1131 - checkout attr=auto ident aeol=lf core.autocrlf=false core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1132 - checkout attr=auto ident aeol=lf core.autocrlf=false core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1133 - checkout attr=auto ident aeol=lf core.autocrlf=false core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1134 - checkout attr=auto ident aeol=lf core.autocrlf=false core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1135 - checkout attr=auto ident aeol=lf core.autocrlf=false core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1136 - ls-files --eol attr=auto ident aeol=crlf core.autocrlf=false core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 1137 - checkout attr=auto ident aeol=crlf core.autocrlf=false core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1138 - checkout attr=auto ident aeol=crlf core.autocrlf=false core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1139 - checkout attr=auto ident aeol=crlf core.autocrlf=false core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1140 - checkout attr=auto ident aeol=crlf core.autocrlf=false core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1141 - checkout attr=auto ident aeol=crlf core.autocrlf=false core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1142 - ls-files --eol attr=-text ident aeol= core.autocrlf=input core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ LF crlf_false_attr__LF.txt
ok 1143 - checkout attr=-text ident aeol= core.autocrlf=input core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 1144 - checkout attr=-text ident aeol= core.autocrlf=input core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1145 - checkout attr=-text ident aeol= core.autocrlf=input core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1146 - checkout attr=-text ident aeol= core.autocrlf=input core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1147 - checkout attr=-text ident aeol= core.autocrlf=input core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1148 - ls-files --eol attr=-text ident aeol=lf core.autocrlf=input core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ LF crlf_false_attr__LF.txt
ok 1149 - checkout attr=-text ident aeol=lf core.autocrlf=input core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 1150 - checkout attr=-text ident aeol=lf core.autocrlf=input core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1151 - checkout attr=-text ident aeol=lf core.autocrlf=input core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1152 - checkout attr=-text ident aeol=lf core.autocrlf=input core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1153 - checkout attr=-text ident aeol=lf core.autocrlf=input core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1154 - ls-files --eol attr=-text ident aeol=crlf core.autocrlf=input core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ LF crlf_false_attr__LF.txt
ok 1155 - checkout attr=-text ident aeol=crlf core.autocrlf=input core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 1156 - checkout attr=-text ident aeol=crlf core.autocrlf=input core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1157 - checkout attr=-text ident aeol=crlf core.autocrlf=input core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1158 - checkout attr=-text ident aeol=crlf core.autocrlf=input core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1159 - checkout attr=-text ident aeol=crlf core.autocrlf=input core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1160 - ls-files --eol attr=text ident aeol=lf core.autocrlf=input core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ LF crlf_false_attr__LF.txt
ok 1161 - checkout attr=text ident aeol=lf core.autocrlf=input core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1162 - checkout attr=text ident aeol=lf core.autocrlf=input core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1163 - checkout attr=text ident aeol=lf core.autocrlf=input core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1164 - checkout attr=text ident aeol=lf core.autocrlf=input core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1165 - checkout attr=text ident aeol=lf core.autocrlf=input core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1166 - ls-files --eol attr=text ident aeol=crlf core.autocrlf=input core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ CRLF crlf_false_attr__LF.txt
ok 1167 - checkout attr=text ident aeol=crlf core.autocrlf=input core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1168 - checkout attr=text ident aeol=crlf core.autocrlf=input core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 1169 - checkout attr=text ident aeol=crlf core.autocrlf=input core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1170 - checkout attr=text ident aeol=crlf core.autocrlf=input core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 1171 - checkout attr=text ident aeol=crlf core.autocrlf=input core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1172 - ls-files --eol attr=auto ident aeol=lf core.autocrlf=input core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ LF crlf_false_attr__LF.txt
ok 1173 - checkout attr=auto ident aeol=lf core.autocrlf=input core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1174 - checkout attr=auto ident aeol=lf core.autocrlf=input core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1175 - checkout attr=auto ident aeol=lf core.autocrlf=input core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1176 - checkout attr=auto ident aeol=lf core.autocrlf=input core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1177 - checkout attr=auto ident aeol=lf core.autocrlf=input core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1178 - ls-files --eol attr=auto ident aeol=crlf core.autocrlf=input core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 1179 - checkout attr=auto ident aeol=crlf core.autocrlf=input core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1180 - checkout attr=auto ident aeol=crlf core.autocrlf=input core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1181 - checkout attr=auto ident aeol=crlf core.autocrlf=input core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1182 - checkout attr=auto ident aeol=crlf core.autocrlf=input core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1183 - checkout attr=auto ident aeol=crlf core.autocrlf=input core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1184 - ls-files --eol attr= ident aeol= core.autocrlf=false core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_false_attr__ LF crlf_false_attr__LF.txt
ok 1185 - checkout attr= ident aeol= core.autocrlf=false core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr__ CRLF crlf_false_attr__CRLF.txt
ok 1186 - checkout attr= ident aeol= core.autocrlf=false core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr__ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1187 - checkout attr= ident aeol= core.autocrlf=false core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr__ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1188 - checkout attr= ident aeol= core.autocrlf=false core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_false_attr__ LF_nul crlf_false_attr__LF_nul.txt
ok 1189 - checkout attr= ident aeol= core.autocrlf=false core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1190 - ls-files --eol attr= ident aeol= core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr__ CRLF crlf_false_attr__LF.txt
ok 1191 - checkout attr= ident aeol= core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr__ CRLF crlf_false_attr__CRLF.txt
ok 1192 - checkout attr= ident aeol= core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr__ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1193 - checkout attr= ident aeol= core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr__ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1194 - checkout attr= ident aeol= core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr__ LF_nul crlf_false_attr__LF_nul.txt
ok 1195 - checkout attr= ident aeol= core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1196 - ls-files --eol attr=auto ident aeol= core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 1197 - checkout attr=auto ident aeol= core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1198 - checkout attr=auto ident aeol= core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1199 - checkout attr=auto ident aeol= core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1200 - checkout attr=auto ident aeol= core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1201 - checkout attr=auto ident aeol= core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1202 - ls-files --eol attr=text ident aeol= core.autocrlf=true core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF crlf_false_attr__LF.txt
ok 1203 - checkout attr=text ident aeol= core.autocrlf=true core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1204 - checkout attr=text ident aeol= core.autocrlf=true core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 1205 - checkout attr=text ident aeol= core.autocrlf=true core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1206 - checkout attr=text ident aeol= core.autocrlf=true core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_true_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 1207 - checkout attr=text ident aeol= core.autocrlf=true core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1208 - ls-files --eol attr=text ident aeol= core.autocrlf=input core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ LF crlf_false_attr__LF.txt
ok 1209 - checkout attr=text ident aeol= core.autocrlf=input core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1210 - checkout attr=text ident aeol= core.autocrlf=input core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1211 - checkout attr=text ident aeol= core.autocrlf=input core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1212 - checkout attr=text ident aeol= core.autocrlf=input core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1213 - checkout attr=text ident aeol= core.autocrlf=input core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1214 - ls-files --eol attr=auto ident aeol= core.autocrlf=input core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ LF crlf_false_attr__LF.txt
ok 1215 - checkout attr=auto ident aeol= core.autocrlf=input core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1216 - checkout attr=auto ident aeol= core.autocrlf=input core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1217 - checkout attr=auto ident aeol= core.autocrlf=input core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1218 - checkout attr=auto ident aeol= core.autocrlf=input core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_input_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1219 - checkout attr=auto ident aeol= core.autocrlf=input core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1220 - ls-files --eol attr=-text ident aeol= core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ LF crlf_false_attr__LF.txt
ok 1221 - checkout attr=-text ident aeol= core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 1222 - checkout attr=-text ident aeol= core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1223 - checkout attr=-text ident aeol= core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1224 - checkout attr=-text ident aeol= core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1225 - checkout attr=-text ident aeol= core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1226 - ls-files --eol attr=-text ident aeol=lf core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ LF crlf_false_attr__LF.txt
ok 1227 - checkout attr=-text ident aeol=lf core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 1228 - checkout attr=-text ident aeol=lf core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1229 - checkout attr=-text ident aeol=lf core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1230 - checkout attr=-text ident aeol=lf core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1231 - checkout attr=-text ident aeol=lf core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1232 - ls-files --eol attr=-text ident aeol=crlf core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ LF crlf_false_attr__LF.txt
ok 1233 - checkout attr=-text ident aeol=crlf core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 1234 - checkout attr=-text ident aeol=crlf core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1235 - checkout attr=-text ident aeol=crlf core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1236 - checkout attr=-text ident aeol=crlf core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1237 - checkout attr=-text ident aeol=crlf core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1238 - ls-files --eol attr=text ident aeol=lf core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ LF crlf_false_attr__LF.txt
ok 1239 - checkout attr=text ident aeol=lf core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1240 - checkout attr=text ident aeol=lf core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1241 - checkout attr=text ident aeol=lf core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1242 - checkout attr=text ident aeol=lf core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1243 - checkout attr=text ident aeol=lf core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1244 - ls-files --eol attr=text ident aeol=crlf core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF crlf_false_attr__LF.txt
ok 1245 - checkout attr=text ident aeol=crlf core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1246 - checkout attr=text ident aeol=crlf core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 1247 - checkout attr=text ident aeol=crlf core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1248 - checkout attr=text ident aeol=crlf core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 1249 - checkout attr=text ident aeol=crlf core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1250 - ls-files --eol attr=auto ident aeol=lf core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ LF crlf_false_attr__LF.txt
ok 1251 - checkout attr=auto ident aeol=lf core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1252 - checkout attr=auto ident aeol=lf core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1253 - checkout attr=auto ident aeol=lf core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1254 - checkout attr=auto ident aeol=lf core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1255 - checkout attr=auto ident aeol=lf core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1256 - ls-files --eol attr=auto ident aeol=crlf core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 1257 - checkout attr=auto ident aeol=crlf core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1258 - checkout attr=auto ident aeol=crlf core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1259 - checkout attr=auto ident aeol=crlf core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1260 - checkout attr=auto ident aeol=crlf core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1261 - checkout attr=auto ident aeol=crlf core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1262 - ls-files --eol attr=-text ident aeol= core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ LF crlf_false_attr__LF.txt
ok 1263 - checkout attr=-text ident aeol= core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 1264 - checkout attr=-text ident aeol= core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1265 - checkout attr=-text ident aeol= core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1266 - checkout attr=-text ident aeol= core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1267 - checkout attr=-text ident aeol= core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1268 - ls-files --eol attr=-text ident aeol=lf core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ LF crlf_false_attr__LF.txt
ok 1269 - checkout attr=-text ident aeol=lf core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 1270 - checkout attr=-text ident aeol=lf core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1271 - checkout attr=-text ident aeol=lf core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1272 - checkout attr=-text ident aeol=lf core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1273 - checkout attr=-text ident aeol=lf core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1274 - ls-files --eol attr=-text ident aeol=crlf core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ LF crlf_false_attr__LF.txt
ok 1275 - checkout attr=-text ident aeol=crlf core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 1276 - checkout attr=-text ident aeol=crlf core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1277 - checkout attr=-text ident aeol=crlf core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1278 - checkout attr=-text ident aeol=crlf core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1279 - checkout attr=-text ident aeol=crlf core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1280 - ls-files --eol attr=text ident aeol=lf core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ LF crlf_false_attr__LF.txt
ok 1281 - checkout attr=text ident aeol=lf core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1282 - checkout attr=text ident aeol=lf core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1283 - checkout attr=text ident aeol=lf core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1284 - checkout attr=text ident aeol=lf core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1285 - checkout attr=text ident aeol=lf core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1286 - ls-files --eol attr=text ident aeol=crlf core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ CRLF crlf_false_attr__LF.txt
ok 1287 - checkout attr=text ident aeol=crlf core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1288 - checkout attr=text ident aeol=crlf core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 1289 - checkout attr=text ident aeol=crlf core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1290 - checkout attr=text ident aeol=crlf core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 1291 - checkout attr=text ident aeol=crlf core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1292 - ls-files --eol attr=auto ident aeol=lf core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ LF crlf_false_attr__LF.txt
ok 1293 - checkout attr=auto ident aeol=lf core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1294 - checkout attr=auto ident aeol=lf core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1295 - checkout attr=auto ident aeol=lf core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1296 - checkout attr=auto ident aeol=lf core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1297 - checkout attr=auto ident aeol=lf core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1298 - ls-files --eol attr=auto ident aeol=crlf core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 1299 - checkout attr=auto ident aeol=crlf core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1300 - checkout attr=auto ident aeol=crlf core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1301 - checkout attr=auto ident aeol=crlf core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1302 - checkout attr=auto ident aeol=crlf core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1303 - checkout attr=auto ident aeol=crlf core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1304 - ls-files --eol attr=-text ident aeol= core.autocrlf=input core.eol=native
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ LF crlf_false_attr__LF.txt
ok 1305 - checkout attr=-text ident aeol= core.autocrlf=input core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 1306 - checkout attr=-text ident aeol= core.autocrlf=input core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1307 - checkout attr=-text ident aeol= core.autocrlf=input core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1308 - checkout attr=-text ident aeol= core.autocrlf=input core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1309 - checkout attr=-text ident aeol= core.autocrlf=input core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1310 - ls-files --eol attr=-text ident aeol=lf core.autocrlf=input core.eol=native
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ LF crlf_false_attr__LF.txt
ok 1311 - checkout attr=-text ident aeol=lf core.autocrlf=input core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 1312 - checkout attr=-text ident aeol=lf core.autocrlf=input core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1313 - checkout attr=-text ident aeol=lf core.autocrlf=input core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1314 - checkout attr=-text ident aeol=lf core.autocrlf=input core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1315 - checkout attr=-text ident aeol=lf core.autocrlf=input core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1316 - ls-files --eol attr=-text ident aeol=crlf core.autocrlf=input core.eol=native
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ LF crlf_false_attr__LF.txt
ok 1317 - checkout attr=-text ident aeol=crlf core.autocrlf=input core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ CRLF crlf_false_attr__CRLF.txt
ok 1318 - checkout attr=-text ident aeol=crlf core.autocrlf=input core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1319 - checkout attr=-text ident aeol=crlf core.autocrlf=input core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1320 - checkout attr=-text ident aeol=crlf core.autocrlf=input core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_input_attr_-text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1321 - checkout attr=-text ident aeol=crlf core.autocrlf=input core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1322 - ls-files --eol attr=text ident aeol=lf core.autocrlf=input core.eol=native
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ LF crlf_false_attr__LF.txt
ok 1323 - checkout attr=text ident aeol=lf core.autocrlf=input core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1324 - checkout attr=text ident aeol=lf core.autocrlf=input core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1325 - checkout attr=text ident aeol=lf core.autocrlf=input core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1326 - checkout attr=text ident aeol=lf core.autocrlf=input core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1327 - checkout attr=text ident aeol=lf core.autocrlf=input core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1328 - ls-files --eol attr=text ident aeol=crlf core.autocrlf=input core.eol=native
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ CRLF crlf_false_attr__LF.txt
ok 1329 - checkout attr=text ident aeol=crlf core.autocrlf=input core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1330 - checkout attr=text ident aeol=crlf core.autocrlf=input core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 1331 - checkout attr=text ident aeol=crlf core.autocrlf=input core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1332 - checkout attr=text ident aeol=crlf core.autocrlf=input core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 1333 - checkout attr=text ident aeol=crlf core.autocrlf=input core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1334 - ls-files --eol attr=auto ident aeol=lf core.autocrlf=input core.eol=native
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ LF crlf_false_attr__LF.txt
ok 1335 - checkout attr=auto ident aeol=lf core.autocrlf=input core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1336 - checkout attr=auto ident aeol=lf core.autocrlf=input core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1337 - checkout attr=auto ident aeol=lf core.autocrlf=input core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1338 - checkout attr=auto ident aeol=lf core.autocrlf=input core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1339 - checkout attr=auto ident aeol=lf core.autocrlf=input core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1340 - ls-files --eol attr=auto ident aeol=crlf core.autocrlf=input core.eol=native
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 1341 - checkout attr=auto ident aeol=crlf core.autocrlf=input core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1342 - checkout attr=auto ident aeol=crlf core.autocrlf=input core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1343 - checkout attr=auto ident aeol=crlf core.autocrlf=input core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1344 - checkout attr=auto ident aeol=crlf core.autocrlf=input core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1345 - checkout attr=auto ident aeol=crlf core.autocrlf=input core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1346 - ls-files --eol attr= ident aeol= core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr__ LF crlf_false_attr__LF.txt
ok 1347 - checkout attr= ident aeol= core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr__ CRLF crlf_false_attr__CRLF.txt
ok 1348 - checkout attr= ident aeol= core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr__ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1349 - checkout attr= ident aeol= core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr__ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1350 - checkout attr= ident aeol= core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr__ LF_nul crlf_false_attr__LF_nul.txt
ok 1351 - checkout attr= ident aeol= core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1352 - ls-files --eol attr= ident aeol= core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr__ CRLF crlf_false_attr__LF.txt
ok 1353 - checkout attr= ident aeol= core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr__ CRLF crlf_false_attr__CRLF.txt
ok 1354 - checkout attr= ident aeol= core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr__ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1355 - checkout attr= ident aeol= core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr__ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1356 - checkout attr= ident aeol= core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr__ LF_nul crlf_false_attr__LF_nul.txt
ok 1357 - checkout attr= ident aeol= core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1358 - ls-files --eol attr=auto ident aeol= core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ CRLF crlf_false_attr__LF.txt
ok 1359 - checkout attr=auto ident aeol= core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1360 - checkout attr=auto ident aeol= core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1361 - checkout attr=auto ident aeol= core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1362 - checkout attr=auto ident aeol= core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1363 - checkout attr=auto ident aeol= core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1364 - ls-files --eol attr=text ident aeol= core.autocrlf=true core.eol=native
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF crlf_false_attr__LF.txt
ok 1365 - checkout attr=text ident aeol= core.autocrlf=true core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1366 - checkout attr=text ident aeol= core.autocrlf=true core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 1367 - checkout attr=text ident aeol= core.autocrlf=true core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1368 - checkout attr=text ident aeol= core.autocrlf=true core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_true_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 1369 - checkout attr=text ident aeol= core.autocrlf=true core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1370 - ls-files --eol attr=text ident aeol= core.autocrlf=input core.eol=native
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ LF crlf_false_attr__LF.txt
ok 1371 - checkout attr=text ident aeol= core.autocrlf=input core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1372 - checkout attr=text ident aeol= core.autocrlf=input core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1373 - checkout attr=text ident aeol= core.autocrlf=input core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1374 - checkout attr=text ident aeol= core.autocrlf=input core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_input_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1375 - checkout attr=text ident aeol= core.autocrlf=input core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1376 - ls-files --eol attr=auto ident aeol= core.autocrlf=input core.eol=native
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ LF crlf_false_attr__LF.txt
ok 1377 - checkout attr=auto ident aeol= core.autocrlf=input core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1378 - checkout attr=auto ident aeol= core.autocrlf=input core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1379 - checkout attr=auto ident aeol= core.autocrlf=input core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1380 - checkout attr=auto ident aeol= core.autocrlf=input core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_input_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1381 - checkout attr=auto ident aeol= core.autocrlf=input core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1382 - ls-files --eol attr=text ident aeol= core.autocrlf=false core.eol=crlf
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF crlf_false_attr__LF.txt
ok 1383 - checkout attr=text ident aeol= core.autocrlf=false core.eol=crlf file=LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1384 - checkout attr=text ident aeol= core.autocrlf=false core.eol=crlf file=CRLF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF_mix_LF.txt
ok 1385 - checkout attr=text ident aeol= core.autocrlf=false core.eol=crlf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1386 - checkout attr=text ident aeol= core.autocrlf=false core.eol=crlf file=LF_mix_CR
expecting success:
compare_ws_file eol_crlf_crlf_false_attr_text_ CRLF_nul crlf_false_attr__LF_nul.txt
ok 1387 - checkout attr=text ident aeol= core.autocrlf=false core.eol=crlf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1388 - ls-files --eol attr=text ident aeol= core.autocrlf=false core.eol=lf
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ LF crlf_false_attr__LF.txt
ok 1389 - checkout attr=text ident aeol= core.autocrlf=false core.eol=lf file=LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1390 - checkout attr=text ident aeol= core.autocrlf=false core.eol=lf file=CRLF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1391 - checkout attr=text ident aeol= core.autocrlf=false core.eol=lf file=CRLF_mix_LF
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1392 - checkout attr=text ident aeol= core.autocrlf=false core.eol=lf file=LF_mix_CR
expecting success:
compare_ws_file eol_lf_crlf_false_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1393 - checkout attr=text ident aeol= core.autocrlf=false core.eol=lf file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1394 - ls-files --eol attr=text ident aeol= core.autocrlf=false core.eol=
expecting success:
compare_ws_file eol__crlf_false_attr_text_ LF crlf_false_attr__LF.txt
ok 1395 - checkout attr=text ident aeol= core.autocrlf=false core.eol= file=LF
expecting success:
compare_ws_file eol__crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1396 - checkout attr=text ident aeol= core.autocrlf=false core.eol= file=CRLF
expecting success:
compare_ws_file eol__crlf_false_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1397 - checkout attr=text ident aeol= core.autocrlf=false core.eol= file=CRLF_mix_LF
expecting success:
compare_ws_file eol__crlf_false_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1398 - checkout attr=text ident aeol= core.autocrlf=false core.eol= file=LF_mix_CR
expecting success:
compare_ws_file eol__crlf_false_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1399 - checkout attr=text ident aeol= core.autocrlf=false core.eol= file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1400 - ls-files --eol attr=text ident aeol= core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ LF crlf_false_attr__LF.txt
ok 1401 - checkout attr=text ident aeol= core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ CRLF crlf_false_attr__CRLF.txt
ok 1402 - checkout attr=text ident aeol= core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1403 - checkout attr=text ident aeol= core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1404 - checkout attr=text ident aeol= core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr_text_ LF_nul crlf_false_attr__LF_nul.txt
ok 1405 - checkout attr=text ident aeol= core.autocrlf=false core.eol=native file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1406 - ls-files --eol attr=auto ident aeol= core.autocrlf=false core.eol=
expecting success:
compare_ws_file eol__crlf_false_attr_auto_ LF crlf_false_attr__LF.txt
ok 1407 - checkout attr=auto ident aeol= core.autocrlf=false core.eol= file=LF
expecting success:
compare_ws_file eol__crlf_false_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1408 - checkout attr=auto ident aeol= core.autocrlf=false core.eol= file=CRLF
expecting success:
compare_ws_file eol__crlf_false_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1409 - checkout attr=auto ident aeol= core.autocrlf=false core.eol= file=CRLF_mix_LF
expecting success:
compare_ws_file eol__crlf_false_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1410 - checkout attr=auto ident aeol= core.autocrlf=false core.eol= file=LF_mix_CR
expecting success:
compare_ws_file eol__crlf_false_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1411 - checkout attr=auto ident aeol= core.autocrlf=false core.eol= file=LF_nul
expecting success:
test_when_finished "rm expect actual" &&
sort <<-EOF >expect &&
i/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt
i/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt
i/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt
i/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt
i/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt
EOF
git ls-files --eol crlf_false_attr__* |
sed -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1412 - ls-files --eol attr=auto ident aeol= core.autocrlf=false core.eol=native
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ LF crlf_false_attr__LF.txt
ok 1413 - checkout attr=auto ident aeol= core.autocrlf=false core.eol=native file=LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ CRLF crlf_false_attr__CRLF.txt
ok 1414 - checkout attr=auto ident aeol= core.autocrlf=false core.eol=native file=CRLF
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ CRLF_mix_LF crlf_false_attr__CRLF_mix_LF.txt
ok 1415 - checkout attr=auto ident aeol= core.autocrlf=false core.eol=native file=CRLF_mix_LF
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ LF_mix_CR crlf_false_attr__LF_mix_CR.txt
ok 1416 - checkout attr=auto ident aeol= core.autocrlf=false core.eol=native file=LF_mix_CR
expecting success:
compare_ws_file eol_native_crlf_false_attr_auto_ LF_nul crlf_false_attr__LF_nul.txt
ok 1417 - checkout attr=auto ident aeol= core.autocrlf=false core.eol=native file=LF_nul
expecting success:
rm crlf_false_attr__CRLF.txt crlf_false_attr__CRLF_mix_LF.txt crlf_false_attr__LF.txt .gitattributes &&
cat >expect <<-\EOF &&
i/crlf w/ crlf_false_attr__CRLF.txt
i/lf w/ .gitattributes
i/lf w/ crlf_false_attr__LF.txt
i/mixed w/ crlf_false_attr__CRLF_mix_LF.txt
EOF
git ls-files --eol -d |
sed -e "s!attr/[^ ]*!!g" -e "s/ / /g" -e "s/ */ /g" |
sort >actual &&
test_cmp expect actual
ok 1418 - ls-files --eol -d -z
# passed all 1418 test(s)
1..1418
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2003-checkout-cache-mkdir.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2003-checkout-cache-mkdir/.git/
expecting success:
mkdir path1 &&
echo frotz >path0 &&
echo rezrov >path1/file1 &&
git update-index --add path0 path1/file1
ok 1 - setup
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:
rm -fr path0 path1 &&
mkdir path2 &&
ln -s path2 path1 &&
git checkout-index -f -a &&
test ! -h path1 && test -d path1 &&
test -f path1/file1 && test ! -f path2/file1
ok 2 - have symlink in place where dir is expected.
expecting success:
rm -fr path0 path1 path2 &&
mkdir path2 &&
git checkout-index --prefix=path2/ -f -a &&
test -f path2/path0 &&
test -f path2/path1/file1 &&
test ! -f path0 &&
test ! -f path1/file1
ok 3 - use --prefix=path2/
expecting success:
rm -fr path0 path1 path2 tmp* &&
git checkout-index --prefix=tmp- -f -a &&
test -f tmp-path0 &&
test -f tmp-path1/file1 &&
test ! -f path0 &&
test ! -f path1/file1
ok 4 - use --prefix=tmp-
expecting success:
rm -fr path0 path1 path2 tmp* &&
echo nitfol >tmp-path1 &&
mkdir tmp-path0 &&
git checkout-index --prefix=tmp- -f -a &&
test -f tmp-path0 &&
test -f tmp-path1/file1 &&
test ! -f path0 &&
test ! -f path1/file1
ok 5 - use --prefix=tmp- but with a conflicting file and dir
expecting success:
rm -fr path0 path1 path2 tmp* &&
mkdir tmp1 tmp1/orary &&
ln -s tmp1 tmp &&
git checkout-index --prefix=tmp/orary/ -f -a &&
test -d tmp1/orary &&
test -f tmp1/orary/path0 &&
test -f tmp1/orary/path1/file1 &&
test -h tmp
ok 6 - use --prefix=tmp/orary/ where tmp is a symlink
expecting success:
rm -fr path0 path1 path2 tmp* &&
mkdir tmp1 &&
ln -s tmp1 tmp &&
git checkout-index --prefix=tmp/orary- -f -a &&
test -f tmp1/orary-path0 &&
test -f tmp1/orary-path1/file1 &&
test -h tmp
ok 7 - use --prefix=tmp/orary- where tmp is a symlink
expecting success:
rm -fr path0 path1 path2 tmp* &&
mkdir tmp1 &&
ln -s tmp1 tmp-path1 &&
git checkout-index --prefix=tmp- -f -a &&
test -f tmp-path0 &&
test ! -h tmp-path1 &&
test -d tmp-path1 &&
test -f tmp-path1/file1
ok 8 - use --prefix=tmp- where tmp-path1 is a symlink
expecting success:
rm -fr path0 path1 path2 tmp* &&
mkdir path1 &&
mkdir tmp &&
git config filter.replace-all.smudge "sed -e s/./,/g" &&
git config filter.replace-all.clean cat &&
git config filter.replace-all.required true &&
echo "file1 filter=replace-all" >path1/.gitattributes &&
git checkout-index --prefix=tmp/ -f -a &&
echo frotz >expected &&
test_cmp expected tmp/path0 &&
echo ,,,,,, >expected &&
test_cmp expected tmp/path1/file1
ok 9 - apply filter from working tree .gitattributes with --prefix
expecting success:
rm -fr path0 path1 path2 tmp* &&
mkdir path1 &&
mkdir tmp &&
echo "file1 eol=crlf" >path1/.gitattributes &&
git checkout-index --prefix=tmp/ -f -a &&
echo rezrovQ >expected &&
tr \\015 Q <tmp/path1/file1 >actual &&
test_cmp expected actual
ok 10 - apply CRLF filter from working tree .gitattributes with --prefix
# passed all 10 test(s)
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2005-checkout-index-symlinks.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2005-checkout-index-symlinks/.git/
expecting success:
git config core.symlinks false &&
l=$(printf file | git hash-object -t blob -w --stdin) &&
echo "120000 $l symlink" | git update-index --index-info
ok 1 - preparation
expecting success:
git checkout-index symlink &&
test -f symlink
ok 2 - the checked-out symlink must be a file
expecting success:
test "$(git hash-object -t blob symlink)" = $l
ok 3 - the file must be the blob we added during the setup
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1510-repo-setup.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/.git/
expecting success:
try_repo 0 unset unset unset "" unset \
.git "$here/0" "$here/0" "(null)" \
.git "$here/0" "$here/0" sub/ 2>message &&
test_must_be_empty message
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/0/.git/
ok 1 - #0: nonbare repo, no explicit configuration
expecting success:
try_repo 1 "$here" unset unset "" unset \
"$here/1/.git" "$here" "$here" 1/ \
"$here/1/.git" "$here" "$here" 1/sub/ 2>message &&
test_must_be_empty message
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/1/.git/
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/
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)"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/2b/.git/
ok 4 - #2b: relative GIT_DIR
expecting success:
setup_repo 3 unset "" unset &&
mkdir -p 3/sub/sub 3/wt/sub
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/3/.git/
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 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/
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)"
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)"
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 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 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_must_be_empty message
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/4/.git/
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_must_be_empty message
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/5/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/5a/.git/
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/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/6/.git/
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/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/6b/.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)"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/6c/.git/
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)"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/6d/.git/
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.t1510-repo-setup/6e/.git/
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/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/6f/.git/
ok 19 - #6f: GIT_DIR set, core.worktree=../.. (relative)
expecting success:
setup_repo 7 non-existent "" unset &&
mkdir -p 7/sub/sub 7/wt/sub
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/7/.git/
ok 20 - #7: 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 21 - #7: 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/
ok 22 - #7: 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)"
ok 23 - #7: 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)"
ok 24 - #7: 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 25 - #7: 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 26 - #7: chdir_to_toplevel uses worktree (from subdir)
expecting success:
try_repo 8 unset unset unset gitfile unset \
"$here/8.git" "$here/8" "$here/8" "(null)" \
"$here/8.git" "$here/8" "$here/8" sub/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/8/.git/
ok 27 - #8: gitfile, easy case
expecting success:
mkdir -p 9/wt &&
try_repo 9 wt unset unset gitfile unset \
"$here/9.git" "$here/9/wt" "$here/9" "(null)" \
"$here/9.git" "$here/9/sub/wt" "$here/9/sub" "(null)" 2>message &&
test_must_be_empty message
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/9/.git/
ok 28 - #9: GIT_WORK_TREE accepted with gitfile
expecting success:
try_repo 10 unset "$here/10/.git" unset gitfile unset \
"$here/10.git" "$here/10" "$here/10" "(null)" \
"$here/10.git" "$here/10/sub" "$here/10/sub" "(null)"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/10/.git/
ok 29 - #10: GIT_DIR can point to gitfile
expecting success:
try_repo 10b unset .git unset gitfile unset \
"$here/10b.git" "$here/10b" "$here/10b" "(null)" \
"$here/10b.git" "$here/10b/sub" "$here/10b/sub" "(null)"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/10b/.git/
ok 30 - #10b: relative GIT_DIR can point to gitfile
expecting success:
setup_repo 11 unset gitfile unset &&
mkdir -p 11/sub/sub 11/wt/sub
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/11/.git/
ok 31 - #11: 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 32 - #11: 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/
ok 33 - #11: 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)"
ok 34 - #11: 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)"
ok 35 - #11: 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 36 - #11: 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 37 - #11: chdir_to_toplevel uses worktree (from subdir)
expecting success:
try_repo 12 unset unset "$here/12" gitfile unset \
"$here/12.git" "$here/12" "$here/12" "(null)" \
"$here/12.git" "$here/12" "$here/12" sub/ 2>message &&
test_must_be_empty message
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/12/.git/
ok 38 - #12: core.worktree with gitfile is accepted
expecting success:
# or: you cannot intimidate away the lack of GIT_DIR setting
try_repo 13 non-existent-too unset non-existent gitfile unset \
"$here/13.git" "$here/13/non-existent-too" "$here/13" "(null)" \
"$here/13.git" "$here/13/sub/non-existent-too" "$here/13/sub" "(null)" 2>message &&
test_must_be_empty message
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/13/.git/
ok 39 - #13: core.worktree+GIT_WORK_TREE accepted (with gitfile)
expecting success:
setup_repo 14 "$here/14" gitfile unset &&
try_case 14 unset .git \
"$here/14.git" "$here/14" "$here/14" "(null)" &&
try_case 14 unset "$here/14/.git" \
"$here/14.git" "$here/14" "$here/14" "(null)" &&
try_case 14/sub/sub unset ../../.git \
"$here/14.git" "$here/14" "$here/14" sub/sub/ &&
try_case 14/sub/sub unset "$here/14/.git" \
"$here/14.git" "$here/14" "$here/14" sub/sub/ &&
setup_repo 14c "$here/14c/wt" gitfile unset &&
mkdir -p 14c/wt/sub &&
try_case 14c unset .git \
"$here/14c.git" "$here/14c/wt" "$here/14c" "(null)" &&
try_case 14c unset "$here/14c/.git" \
"$here/14c.git" "$here/14c/wt" "$here/14c" "(null)" &&
try_case 14c/sub/sub unset ../../.git \
"$here/14c.git" "$here/14c/wt" "$here/14c/sub/sub" "(null)" &&
try_case 14c/sub/sub unset "$here/14c/.git" \
"$here/14c.git" "$here/14c/wt" "$here/14c/sub/sub" "(null)" &&
setup_repo 14d "$here/14d/wt" gitfile unset &&
mkdir -p 14d/wt/sub &&
try_case 14d unset .git \
"$here/14d.git" "$here/14d/wt" "$here/14d" "(null)" &&
try_case 14d unset "$here/14d/.git" \
"$here/14d.git" "$here/14d/wt" "$here/14d" "(null)" &&
try_case 14d/sub/sub unset ../../.git \
"$here/14d.git" "$here/14d/wt" "$here/14d/sub/sub" "(null)" &&
try_case 14d/sub/sub unset "$here/14d/.git" \
"$here/14d.git" "$here/14d/wt" "$here/14d/sub/sub" "(null)" &&
setup_repo 14e "$here" gitfile unset &&
try_case 14e unset .git \
"$here/14e.git" "$here" "$here" 14e/ &&
try_case 14e unset "$here/14e/.git" \
"$here/14e.git" "$here" "$here" 14e/ &&
try_case 14e/sub/sub unset ../../.git \
"$here/14e.git" "$here" "$here" 14e/sub/sub/ &&
try_case 14e/sub/sub unset "$here/14e/.git" \
"$here/14e.git" "$here" "$here" 14e/sub/sub/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/14/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/14c/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/14d/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/14e/.git/
ok 40 - #14: core.worktree with GIT_DIR pointing to gitfile
expecting success:
setup_repo 14b ../14b gitfile unset &&
try_case 14b unset .git \
"$here/14b.git" "$here/14b" "$here/14b" "(null)" &&
try_case 14b unset "$here/14b/.git" \
"$here/14b.git" "$here/14b" "$here/14b" "(null)" &&
try_case 14b/sub/sub unset ../../.git \
"$here/14b.git" "$here/14b" "$here/14b" sub/sub/ &&
try_case 14b/sub/sub unset "$here/14b/.git" \
"$here/14b.git" "$here/14b" "$here/14b" sub/sub/ &&
setup_repo 14f ../ gitfile unset &&
try_case 14f unset .git \
"$here/14f.git" "$here" "$here" 14f/ &&
try_case 14f unset "$here/14f/.git" \
"$here/14f.git" "$here" "$here" 14f/ &&
try_case 14f/sub/sub unset ../../.git \
"$here/14f.git" "$here" "$here" 14f/sub/sub/ &&
try_case 14f/sub/sub unset "$here/14f/.git" \
"$here/14f.git" "$here" "$here" 14f/sub/sub/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/14b/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/14f/.git/
ok 41 - #14b: core.worktree is relative to actual git dir
expecting success:
setup_repo 15 non-existent gitfile unset &&
mkdir -p 15/sub/sub 15/wt/sub
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/15/.git/
ok 42 - #15: 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 43 - #15: 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/
ok 44 - #15: 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)"
ok 45 - #15: 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)"
ok 46 - #15: 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 47 - #15: 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 48 - #15: chdir_to_toplevel uses worktree (from subdir)
expecting success:
setup_repo 16a unset "" unset &&
mkdir -p 16a/.git/wt/sub &&
try_case 16a/.git unset unset \
. "(null)" "$here/16a/.git" "(null)" &&
try_case 16a/.git/wt unset unset \
"$here/16a/.git" "(null)" "$here/16a/.git/wt" "(null)" &&
try_case 16a/.git/wt/sub unset unset \
"$here/16a/.git" "(null)" "$here/16a/.git/wt/sub" "(null)"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/16a/.git/
ok 49 - #16a: implicitly bare repo (cwd inside .git dir)
expecting success:
setup_repo 16b unset "" true &&
mkdir -p 16b/.git/wt/sub &&
try_case 16b/.git unset unset \
. "(null)" "$here/16b/.git" "(null)" &&
try_case 16b/.git/wt unset unset \
"$here/16b/.git" "(null)" "$here/16b/.git/wt" "(null)" &&
try_case 16b/.git/wt/sub unset unset \
"$here/16b/.git" "(null)" "$here/16b/.git/wt/sub" "(null)"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/16b/.git/
ok 50 - #16b: bare .git (cwd inside .git dir)
expecting success:
try_repo 16c unset unset unset "" true \
.git "(null)" "$here/16c" "(null)" \
"$here/16c/.git" "(null)" "$here/16c/sub" "(null)"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/16c/.git/
ok 51 - #16c: bare .git has no worktree
expecting success:
setup_repo 16d unset "" unset &&
(
cd 16d/.git &&
test_must_fail git status &&
git config alias.st status &&
test_must_fail git st
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/16d/.git/
fatal: this operation must be run in a work tree
fatal: this operation must be run in a work tree
ok 52 - #16d: bareness preserved across alias
expecting success:
setup_repo 16e unset "" unset &&
(
cd 16e/.git &&
test_must_fail git status &&
test_must_fail git --bare status
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/16e/.git/
fatal: this operation must be run in a work tree
fatal: this operation must be run in a work tree
ok 53 - #16e: bareness preserved by --bare
expecting success:
# Just like #16.
setup_repo 17a unset "" true &&
setup_repo 17b unset "" true &&
mkdir -p 17a/.git/wt/sub &&
mkdir -p 17b/.git/wt/sub &&
try_case 17a/.git "$here/17a" unset \
"$here/17a/.git" "$here/17a" "$here/17a" .git/ \
2>message &&
try_case 17a/.git/wt "$here/17a" unset \
"$here/17a/.git" "$here/17a" "$here/17a" .git/wt/ &&
try_case 17a/.git/wt/sub "$here/17a" unset \
"$here/17a/.git" "$here/17a" "$here/17a" .git/wt/sub/ &&
try_case 17b/.git "$here/17b" unset \
"$here/17b/.git" "$here/17b" "$here/17b" .git/ &&
try_case 17b/.git/wt "$here/17b" unset \
"$here/17b/.git" "$here/17b" "$here/17b" .git/wt/ &&
try_case 17b/.git/wt/sub "$here/17b" unset \
"$here/17b/.git" "$here/17b" "$here/17b" .git/wt/sub/ &&
try_repo 17c "$here/17c" unset unset "" true \
.git "$here/17c" "$here/17c" "(null)" \
"$here/17c/.git" "$here/17c" "$here/17c" sub/ 2>message &&
test_must_be_empty message
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/17a/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/17b/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/17c/.git/
ok 54 - #17: GIT_WORK_TREE without explicit GIT_DIR is accepted (bare case)
expecting success:
try_repo 18 unset .git unset "" true \
.git "(null)" "$here/18" "(null)" \
../.git "(null)" "$here/18/sub" "(null)" &&
try_repo 18b unset "$here/18b/.git" unset "" true \
"$here/18b/.git" "(null)" "$here/18b" "(null)" \
"$here/18b/.git" "(null)" "$here/18b/sub" "(null)"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/18/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/18b/.git/
ok 55 - #18: bare .git named by GIT_DIR has no worktree
expecting success:
setup_repo 19 unset "" true &&
mkdir -p 19/sub/sub 19/wt/sub
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/19/.git/
ok 56 - #19: 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 57 - #19: 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/
ok 58 - #19: 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)"
ok 59 - #19: 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)"
ok 60 - #19: 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 61 - #19: 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 62 - #19: chdir_to_toplevel uses worktree (from subdir)
expecting success:
# Unlike case #16a.
setup_repo 20a "$here/20a" "" unset &&
mkdir -p 20a/.git/wt/sub &&
try_case 20a/.git unset unset \
"$here/20a/.git" "$here/20a" "$here/20a" .git/ 2>message &&
try_case 20a/.git/wt unset unset \
"$here/20a/.git" "$here/20a" "$here/20a" .git/wt/ &&
try_case 20a/.git/wt/sub unset unset \
"$here/20a/.git" "$here/20a" "$here/20a" .git/wt/sub/ &&
test_must_be_empty message
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/20a/.git/
ok 63 - #20a: core.worktree without GIT_DIR accepted (inside .git)
expecting success:
setup_repo 20b non-existent "" true &&
mkdir -p 20b/.git/wt/sub &&
(
cd 20b/.git &&
test_must_fail git status >/dev/null
) 2>message &&
grep "core.bare and core.worktree" message
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/20b/.git/
warning: core.bare and core.worktree do not make sense
ok 64 - #20b/c: core.worktree and core.bare conflict
expecting success:
setup_repo 20d non-existent "" true &&
mkdir -p 20d/.git/wt/sub &&
(
cd 20d/.git &&
git config foo.bar value
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/20d/.git/
warning: core.bare and core.worktree do not make sense
ok 65 - #20d: core.worktree and core.bare OK when working tree not needed
expecting success:
setup_repo 21 non-existent "" unset &&
mkdir -p 21/.git/wt/sub &&
(
cd 21/.git &&
GIT_WORK_TREE="$here/21" &&
export GIT_WORK_TREE &&
git status >/dev/null
) 2>message &&
test_must_be_empty message
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/21/.git/
ok 66 - #21: setup, core.worktree warns before overriding core.bare
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 67 - #21: 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/
ok 68 - #21: 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)"
ok 69 - #21: 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)"
ok 70 - #21: 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 71 - #21: 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 72 - #21: chdir_to_toplevel uses worktree (from subdir)
expecting success:
# like case #6.
setup_repo 22a "$here/22a/.git" "" unset &&
setup_repo 22ab . "" unset &&
mkdir -p 22a/.git/sub 22a/sub &&
mkdir -p 22ab/.git/sub 22ab/sub &&
try_case 22a/.git unset . \
. "$here/22a/.git" "$here/22a/.git" "(null)" &&
try_case 22a/.git unset "$here/22a/.git" \
"$here/22a/.git" "$here/22a/.git" "$here/22a/.git" "(null)" &&
try_case 22a/.git/sub unset .. \
"$here/22a/.git" "$here/22a/.git" "$here/22a/.git" sub/ &&
try_case 22a/.git/sub unset "$here/22a/.git" \
"$here/22a/.git" "$here/22a/.git" "$here/22a/.git" sub/ &&
try_case 22ab/.git unset . \
. "$here/22ab/.git" "$here/22ab/.git" "(null)" &&
try_case 22ab/.git unset "$here/22ab/.git" \
"$here/22ab/.git" "$here/22ab/.git" "$here/22ab/.git" "(null)" &&
try_case 22ab/.git/sub unset .. \
"$here/22ab/.git" "$here/22ab/.git" "$here/22ab/.git" sub/ &&
try_case 22ab/.git unset "$here/22ab/.git" \
"$here/22ab/.git" "$here/22ab/.git" "$here/22ab/.git" "(null)"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/22a/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/22ab/.git/
ok 73 - #22a: core.worktree = GIT_DIR = .git dir
expecting success:
setup_repo 22b "$here/22b/.git/wt" "" unset &&
setup_repo 22bb wt "" unset &&
mkdir -p 22b/.git/sub 22b/sub 22b/.git/wt/sub 22b/wt/sub &&
mkdir -p 22bb/.git/sub 22bb/sub 22bb/.git/wt 22bb/wt &&
try_case 22b/.git unset . \
. "$here/22b/.git/wt" "$here/22b/.git" "(null)" &&
try_case 22b/.git unset "$here/22b/.git" \
"$here/22b/.git" "$here/22b/.git/wt" "$here/22b/.git" "(null)" &&
try_case 22b/.git/sub unset .. \
.. "$here/22b/.git/wt" "$here/22b/.git/sub" "(null)" &&
try_case 22b/.git/sub unset "$here/22b/.git" \
"$here/22b/.git" "$here/22b/.git/wt" "$here/22b/.git/sub" "(null)" &&
try_case 22bb/.git unset . \
. "$here/22bb/.git/wt" "$here/22bb/.git" "(null)" &&
try_case 22bb/.git unset "$here/22bb/.git" \
"$here/22bb/.git" "$here/22bb/.git/wt" "$here/22bb/.git" "(null)" &&
try_case 22bb/.git/sub unset .. \
.. "$here/22bb/.git/wt" "$here/22bb/.git/sub" "(null)" &&
try_case 22bb/.git/sub unset "$here/22bb/.git" \
"$here/22bb/.git" "$here/22bb/.git/wt" "$here/22bb/.git/sub" "(null)"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/22b/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/22bb/.git/
ok 74 - #22b: core.worktree child of .git, GIT_DIR=.git
expecting success:
setup_repo 22c "$here/22c" "" unset &&
setup_repo 22cb .. "" unset &&
mkdir -p 22c/.git/sub 22c/sub &&
mkdir -p 22cb/.git/sub 22cb/sub &&
try_case 22c/.git unset . \
"$here/22c/.git" "$here/22c" "$here/22c" .git/ &&
try_case 22c/.git unset "$here/22c/.git" \
"$here/22c/.git" "$here/22c" "$here/22c" .git/ &&
try_case 22c/.git/sub unset .. \
"$here/22c/.git" "$here/22c" "$here/22c" .git/sub/ &&
try_case 22c/.git/sub unset "$here/22c/.git" \
"$here/22c/.git" "$here/22c" "$here/22c" .git/sub/ &&
try_case 22cb/.git unset . \
"$here/22cb/.git" "$here/22cb" "$here/22cb" .git/ &&
try_case 22cb/.git unset "$here/22cb/.git" \
"$here/22cb/.git" "$here/22cb" "$here/22cb" .git/ &&
try_case 22cb/.git/sub unset .. \
"$here/22cb/.git" "$here/22cb" "$here/22cb" .git/sub/ &&
try_case 22cb/.git/sub unset "$here/22cb/.git" \
"$here/22cb/.git" "$here/22cb" "$here/22cb" .git/sub/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/22c/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/22cb/.git/
ok 75 - #22c: core.worktree = .git/.., GIT_DIR=.git
expecting success:
setup_repo 22 "$here/22" "" true &&
(
cd 22/.git &&
GIT_DIR=. &&
export GIT_DIR &&
test_must_fail git status 2>result
) &&
(
cd 22 &&
GIT_DIR=.git &&
export GIT_DIR &&
test_must_fail git status 2>result
) &&
grep "core.bare and core.worktree" 22/.git/result &&
grep "core.bare and core.worktree" 22/result
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/22/.git/
warning: core.bare and core.worktree do not make sense
warning: core.bare and core.worktree do not make sense
ok 76 - #22.2: core.worktree and core.bare conflict
expecting success:
setup_repo 23 non-existent "" true &&
mkdir -p 23/sub/sub 23/wt/sub
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/23/.git/
ok 77 - #23: 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 78 - #23: 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/
ok 79 - #23: 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)"
ok 80 - #23: 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)"
ok 81 - #23: 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 82 - #23: 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 83 - #23: chdir_to_toplevel uses worktree (from subdir)
expecting success:
try_repo 24 unset unset unset gitfile true \
"$here/24.git" "(null)" "$here/24" "(null)" \
"$here/24.git" "(null)" "$here/24/sub" "(null)"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/24/.git/
ok 84 - #24: bare repo has no worktree (gitfile case)
expecting success:
try_repo 25 "$here/25" unset unset gitfile true \
"$here/25.git" "$here/25" "$here/25" "(null)" \
"$here/25.git" "$here/25" "$here/25" "sub/" 2>message &&
test_must_be_empty message
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/25/.git/
ok 85 - #25: GIT_WORK_TREE accepted if GIT_DIR unset (bare gitfile case)
expecting success:
try_repo 26 unset "$here/26/.git" unset gitfile true \
"$here/26.git" "(null)" "$here/26" "(null)" \
"$here/26.git" "(null)" "$here/26/sub" "(null)" &&
try_repo 26b unset .git unset gitfile true \
"$here/26b.git" "(null)" "$here/26b" "(null)" \
"$here/26b.git" "(null)" "$here/26b/sub" "(null)"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/26/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/26b/.git/
ok 86 - #26: bare repo has no worktree (GIT_DIR -> gitfile case)
expecting success:
setup_repo 27 unset gitfile true &&
mkdir -p 27/sub/sub 27/wt/sub
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/27/.git/
ok 87 - #27: 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 88 - #27: 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/
ok 89 - #27: 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)"
ok 90 - #27: 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)"
ok 91 - #27: 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 92 - #27: 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 93 - #27: chdir_to_toplevel uses worktree (from subdir)
expecting success:
setup_repo 28 "$here/28" gitfile true &&
(
cd 28 &&
test_must_fail git status
) 2>message &&
grep "core.bare and core.worktree" message
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/28/.git/
warning: core.bare and core.worktree do not make sense
ok 94 - #28: core.worktree and core.bare conflict (gitfile case)
expecting success:
setup_repo 29 non-existent gitfile true &&
mkdir -p 29/sub/sub 29/wt/sub &&
(
cd 29 &&
GIT_WORK_TREE="$here/29" &&
export GIT_WORK_TREE &&
git status
) 2>message &&
test_must_be_empty message
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/29/.git/
On branch master
No commits yet
nothing to commit (create/copy files and use "git add" to track)
ok 95 - #29: 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 96 - #29: 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/
ok 97 - #29: 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)"
ok 98 - #29: 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)"
ok 99 - #29: 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 100 - #29: 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 101 - #29: chdir_to_toplevel uses worktree (from subdir)
expecting success:
# Just like case #22.
setup_repo 30 "$here/30" gitfile true &&
(
cd 30 &&
test_must_fail env GIT_DIR=.git git status 2>result
) &&
grep "core.bare and core.worktree" 30/result
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/30/.git/
warning: core.bare and core.worktree do not make sense
ok 102 - #30: core.worktree and core.bare conflict (gitfile version)
expecting success:
setup_repo 31 non-existent gitfile true &&
mkdir -p 31/sub/sub 31/wt/sub
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1510-repo-setup/31/.git/
ok 103 - #31: 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 104 - #31: 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/
ok 105 - #31: 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)"
ok 106 - #31: 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)"
ok 107 - #31: 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 108 - #31: 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 109 - #31: chdir_to_toplevel uses worktree (from subdir)
# passed all 109 test(s)
1..109
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2006-checkout-index-basic.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2006-checkout-index-basic/.git/
expecting success:
test_expect_code 129 git checkout-index --gobbledegook 2>err &&
test_i18ngrep "[Uu]sage" err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
usage: git checkout-index [<options>] [--] [<file>...]
ok 1 - checkout-index --gobbledegook
expecting success:
mkdir broken &&
(
cd broken &&
git init &&
>.git/index &&
test_expect_code 129 git checkout-index -h >usage 2>&1
) &&
test_i18ngrep "[Uu]sage" broken/usage
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2006-checkout-index-basic/broken/.git/
usage: git checkout-index [<options>] [--] [<file>...]
ok 2 - checkout-index -h in broken repository
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2007-checkout-symlink.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2007-checkout-symlink/.git/
expecting success:
mkdir frotz &&
echo hello >frotz/filfre &&
git add frotz/filfre &&
test_tick &&
git commit -m "master has file frotz/filfre" &&
git branch side &&
echo goodbye >nitfol &&
git add nitfol &&
test_tick &&
git commit -m "master adds file nitfol" &&
git checkout side &&
git rm --cached frotz/filfre &&
mv frotz xyzzy &&
test_ln_s_add xyzzy frotz &&
git add xyzzy/filfre &&
test_tick &&
git commit -m "side moves frotz/ to xyzzy/ and adds frotz->xyzzy/"
[master (root-commit) f92d3a8] master has file frotz/filfre
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 frotz/filfre
[master ed594a0] master adds file nitfol
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 nitfol
Switched to branch 'side'
rm 'frotz/filfre'
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
[side 1502bd7] side moves frotz/ to xyzzy/ and adds frotz->xyzzy/
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 120000 frotz
rename {frotz => xyzzy}/filfre (100%)
ok 1 - setup
expecting success:
git checkout master
Switched to branch 'master'
ok 2 - switch from symlink to dir
expecting success:
rm -fr frotz xyzzy nitfol &&
git checkout -f master
Already on 'master'
ok 3 - Remove temporary directories & switch to master
expecting success:
git checkout side
Switched to branch 'side'
ok 4 - switch from dir to symlink
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2008-checkout-subdir.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2008-checkout-subdir/.git/
expecting success:
echo "base" > file0 &&
git add file0 &&
mkdir dir1 &&
echo "hello" > dir1/file1 &&
git add dir1/file1 &&
mkdir dir2 &&
echo "bonjour" > dir2/file2 &&
git add dir2/file2 &&
test_tick &&
git commit -m "populate tree"
[master (root-commit) 15793b3] populate tree
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 dir1/file1
create mode 100644 dir2/file2
create mode 100644 file0
ok 1 - setup
expecting success:
(
cd dir1 &&
rm ../file0 &&
git checkout HEAD -- ../file0 &&
test "base" = "$(cat ../file0)" &&
rm ../dir2/file2 &&
git checkout HEAD -- ../dir2/file2 &&
test "bonjour" = "$(cat ../dir2/file2)" &&
rm ../file0 ./file1 &&
git checkout HEAD -- .. &&
test "base" = "$(cat ../file0)" &&
test "hello" = "$(cat file1)"
)
ok 2 - remove and restore with relative path
expecting success:
rm file0 &&
git checkout HEAD -- file0 &&
test "base" = "$(cat file0)"
ok 3 - checkout with empty prefix
expecting success:
rm dir1/file1 &&
git checkout HEAD -- dir1 &&
test "hello" = "$(cat dir1/file1)" &&
rm dir1/file1 &&
git checkout HEAD -- dir1/file1 &&
test "hello" = "$(cat dir1/file1)"
ok 4 - checkout with simple prefix
expecting success:
(
cd dir1 &&
rm file1 &&
git checkout HEAD -- ../dir1/../dir1/file1 &&
test "hello" = "$(cat file1)"
)
ok 5 - checkout with complex relative path
expecting success: test_must_fail git checkout HEAD -- ../../Makefile
fatal: ../../Makefile: '../../Makefile' is outside repository
ok 6 - relative path outside tree should fail
expecting success: test_must_fail git checkout HEAD -- ../file0
fatal: ../file0: '../file0' is outside repository
ok 7 - incorrect relative path to file should fail (1)
expecting success: ( cd dir1 && test_must_fail git checkout HEAD -- ./file0 )
error: pathspec './file0' did not match any file(s) known to git
ok 8 - incorrect relative path should fail (2)
expecting success: ( cd dir1 && test_must_fail git checkout HEAD -- ../../file0 )
fatal: ../../file0: '../../file0' is outside repository
ok 9 - incorrect relative path should fail (3)
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2009-checkout-statinfo.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2009-checkout-statinfo/.git/
expecting success:
echo hello >world &&
git update-index --add world &&
git commit -m initial &&
git branch side &&
echo goodbye >world &&
git update-index --add world &&
git commit -m second
[master (root-commit) 8743131] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 world
[master c47752d] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
git reset --hard &&
test "$(git diff-files --raw)" = "" &&
git checkout master &&
test "$(git diff-files --raw)" = "" &&
git checkout side &&
test "$(git diff-files --raw)" = "" &&
git checkout master &&
test "$(git diff-files --raw)" = ""
HEAD is now at c47752d second
Already on 'master'
Switched to branch 'side'
Switched to branch 'master'
ok 2 - branch switching
expecting success:
git reset --hard &&
test "$(git diff-files --raw)" = "" &&
git checkout master world &&
test "$(git diff-files --raw)" = "" &&
git checkout side world &&
test "$(git diff-files --raw)" = "" &&
git checkout master world &&
test "$(git diff-files --raw)" = ""
HEAD is now at c47752d second
Updated 0 paths from c356a2a
Updated 1 path from dbd05ee
Updated 1 path from c356a2a
ok 3 - path checkout
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2004-checkout-cache-temp.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2004-checkout-cache-temp/.git/
expecting success:
mkdir asubdir &&
echo tree1path0 >path0 &&
echo tree1path1 >path1 &&
echo tree1path3 >path3 &&
echo tree1path4 >path4 &&
echo tree1asubdir/path5 >asubdir/path5 &&
git update-index --add path0 path1 path3 path4 asubdir/path5 &&
t1=$(git write-tree) &&
rm -f path* .merge_* actual .git/index &&
echo tree2path0 >path0 &&
echo tree2path1 >path1 &&
echo tree2path2 >path2 &&
echo tree2path4 >path4 &&
git update-index --add path0 path1 path2 path4 &&
t2=$(git write-tree) &&
rm -f path* .merge_* actual .git/index &&
echo tree2path0 >path0 &&
echo tree3path1 >path1 &&
echo tree3path2 >path2 &&
echo tree3path3 >path3 &&
git update-index --add path0 path1 path2 path3 &&
t3=$(git write-tree)
ok 1 - setup
expecting success:
rm -f path* .merge_* actual .git/index &&
git read-tree $t1 &&
git checkout-index --temp -- path1 >actual &&
test_line_count = 1 actual &&
test $(cut "-d " -f2 actual) = path1 &&
p=$(cut "-d " -f1 actual) &&
test -f $p &&
test $(cat $p) = tree1path1
ok 2 - checkout one stage 0 to temporary file
expecting success:
rm -f path* .merge_* actual .git/index &&
git read-tree $t1 &&
git checkout-index -a --temp >actual &&
test_line_count = 5 actual &&
for f in path0 path1 path3 path4 asubdir/path5
do
test $(grep $f actual | cut "-d " -f2) = $f &&
p=$(grep $f actual | cut "-d " -f1) &&
test -f $p &&
test $(cat $p) = tree1$f
done
ok 3 - checkout all stage 0 to temporary files
expecting success:
rm -f path* .merge_* actual .git/index &&
git read-tree -m $t1 $t2 $t3
ok 4 - setup 3-way merge
expecting success:
rm -f path* .merge_* actual &&
git checkout-index --stage=2 --temp -- path1 >actual &&
test_line_count = 1 actual &&
test $(cut "-d " -f2 actual) = path1 &&
p=$(cut "-d " -f1 actual) &&
test -f $p &&
test $(cat $p) = tree2path1
ok 5 - checkout one stage 2 to temporary file
expecting success:
rm -f path* .merge_* actual &&
git checkout-index --all --stage=2 --temp >actual &&
test_line_count = 3 actual &&
for f in path1 path2 path4
do
test $(grep $f actual | cut "-d " -f2) = $f &&
p=$(grep $f actual | cut "-d " -f1) &&
test -f $p &&
test $(cat $p) = tree2$f
done
ok 6 - checkout all stage 2 to temporary files
expecting success:
rm -f path* .merge_* actual &&
git checkout-index --stage=all --temp -- path0 >actual &&
test_line_count = 0 actual
git checkout-index: path0 does not exist at stage 4
ok 7 - checkout all stages/one file to nothing
expecting success:
rm -f path* .merge_* actual &&
git checkout-index --stage=all --temp -- path1 >actual &&
test_line_count = 1 actual &&
test $(cut "-d " -f2 actual) = path1 &&
cut "-d " -f1 actual | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s1) = tree1path1 &&
test $(cat $s2) = tree2path1 &&
test $(cat $s3) = tree3path1)
ok 8 - checkout all stages/one file to temporary files
expecting success:
rm -f path* .merge_* actual &&
git checkout-index --stage=all --temp -- path2 >actual &&
test_line_count = 1 actual &&
test $(cut "-d " -f2 actual) = path2 &&
cut "-d " -f1 actual | (read s1 s2 s3 &&
test $s1 = . &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s2) = tree2path2 &&
test $(cat $s3) = tree3path2)
ok 9 - checkout some stages/one file to temporary files
expecting success:
rm -f path* .merge_* actual &&
git checkout-index -a --stage=all --temp >actual &&
test_line_count = 5 actual
ok 10 - checkout all stages/all files to temporary files
expecting success:
test x$(grep path0 actual | cut "-d " -f2) = x
ok 11 - -- path0: no entry
expecting success:
test $(grep path1 actual | cut "-d " -f2) = path1 &&
grep path1 actual | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s1) = tree1path1 &&
test $(cat $s2) = tree2path1 &&
test $(cat $s3) = tree3path1)
ok 12 - -- path1: all 3 stages
expecting success:
test $(grep path2 actual | cut "-d " -f2) = path2 &&
grep path2 actual | cut "-d " -f1 | (read s1 s2 s3 &&
test $s1 = . &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s2) = tree2path2 &&
test $(cat $s3) = tree3path2)
ok 13 - -- path2: no stage 1, have stage 2 and 3
expecting success:
test $(grep path3 actual | cut "-d " -f2) = path3 &&
grep path3 actual | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test $s2 = . &&
test -f $s3 &&
test $(cat $s1) = tree1path3 &&
test $(cat $s3) = tree3path3)
ok 14 - -- path3: no stage 2, have stage 1 and 3
expecting success:
test $(grep path4 actual | cut "-d " -f2) = path4 &&
grep path4 actual | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test $s3 = . &&
test $(cat $s1) = tree1path4 &&
test $(cat $s2) = tree2path4)
ok 15 - -- path4: no stage 3, have stage 1 and 3
expecting success:
test $(grep asubdir/path5 actual | cut "-d " -f2) = asubdir/path5 &&
grep asubdir/path5 actual | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test $s2 = . &&
test $s3 = . &&
test $(cat $s1) = tree1asubdir/path5)
ok 16 - -- asubdir/path5: no stage 2 and 3 have stage 1
expecting success:
(
cd asubdir &&
git checkout-index -a --stage=all >actual &&
test_line_count = 1 actual &&
test $(grep path5 actual | cut "-d " -f2) = path5 &&
grep path5 actual | cut "-d " -f1 | (read s1 s2 s3 &&
test -f ../$s1 &&
test $s2 = . &&
test $s3 = . &&
test $(cat ../$s1) = tree1asubdir/path5)
)
ok 17 - checkout --temp within subdir
expecting success:
rm -f path* .merge_* actual .git/index &&
test_ln_s_add path7 path6 &&
git checkout-index --temp -a >actual &&
test_line_count = 1 actual &&
test $(cut "-d " -f2 actual) = path6 &&
p=$(cut "-d " -f1 actual) &&
test -f $p &&
test $(cat $p) = path7
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 18 - checkout --temp symlink
expecting success:
rm -f path* .merge_* actual .git/index &&
>path0123456789 &&
git update-index --add path0123456789 &&
(
cd asubdir &&
git checkout-index --temp -- ../path0123456789 >actual &&
test_line_count = 1 actual &&
test $(cut "-d " -f2 actual) = ../path0123456789
)
ok 19 - emit well-formed relative path
# passed all 19 test(s)
1..19
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2010-checkout-ambiguous.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2010-checkout-ambiguous/.git/
expecting success:
echo hello >world &&
echo hello >all &&
git add all world &&
git commit -m initial &&
git branch world
[master (root-commit) 70faa6e] initial
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 all
create mode 100644 world
ok 1 - setup
expecting success:
test_must_fail git checkout $(git hash-object ./all) --
fatal: reference is not a tree: ce013625030ba8dba906f756967f9e9ca394464a
ok 2 - reference must be a tree
expecting success:
test "refs/heads/master" = "$(git symbolic-ref HEAD)" &&
git checkout world -- &&
test "refs/heads/world" = "$(git symbolic-ref HEAD)"
Switched to branch 'world'
ok 3 - branch switching
expecting success:
echo bye > world &&
git checkout -- world &&
git diff --exit-code --quiet
ok 4 - checkout world from the index
expecting success:
git checkout all
Updated 0 paths from the index
ok 5 - non ambiguous call
expecting success:
git checkout world &&
test "refs/heads/world" = "$(git symbolic-ref HEAD)"
Already on 'world'
ok 6 - allow the most common case
expecting success:
test_must_fail git checkout world all
fatal: ambiguous argument 'world': both revision and filename
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ok 7 - check ambiguity
expecting success:
mkdir sub &&
# not ambiguous because sub/world does not exist
git -C sub checkout world ../all &&
echo hello >sub/world &&
# ambiguous because sub/world does exist
test_must_fail git -C sub checkout world ../all
Updated 0 paths from dd4e7a7
fatal: ambiguous argument 'world': both revision and filename
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ok 8 - check ambiguity in subdir
expecting success:
echo bye > world &&
git checkout world -- world &&
git diff --exit-code --quiet
ok 9 - disambiguate checking out from a tree-ish
expecting success:
test_must_fail git checkout HEAD master -- 2>actual &&
test_i18ngrep 2 actual &&
test_i18ngrep "one reference expected, 2 given" actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: only one reference expected, 2 given.
fatal: only one reference expected, 2 given.
ok 10 - accurate error message with more than one ref
# passed all 10 test(s)
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2011-checkout-invalid-head.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2011-checkout-invalid-head/.git/
expecting success:
echo hello >world &&
git add world &&
git commit -m initial
[master (root-commit) 8743131] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 world
ok 1 - setup
expecting success:
test_must_fail git checkout -b newbranch master^{tree}
fatal: Cannot switch branch to a non-commit 'master^{tree}'
ok 2 - checkout should not start branch from a tree
expecting success:
echo $ZERO_OID >.git/HEAD &&
git checkout master --
Switched to branch 'master'
ok 3 - checkout master from invalid HEAD
expecting success:
test_when_finished "rm -f .git/HEAD.lock" &&
>.git/HEAD.lock &&
test_must_fail git checkout -b other
error: Unable to create '/<<PKGBUILDDIR>>/t/trash directory.t2011-checkout-invalid-head/.git/HEAD.lock': File exists.
Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
fatal: unable to update HEAD
ok 4 - checkout notices failure to lock HEAD
expecting success:
git update-ref refs/heads/outer/inner master &&
# do not rely on symbolic-ref to get a known state,
# as it may use the same code we are testing
reset_to_df () {
echo "ref: refs/heads/outer" >.git/HEAD
}
ok 5 - create ref directory/file conflict scenario
expecting success:
reset_to_df &&
git checkout master
Switched to branch 'master'
ok 6 - checkout away from d/f HEAD (unpacked, to branch)
expecting success:
reset_to_df &&
git checkout --detach master
HEAD is now at 8743131 initial
ok 7 - checkout away from d/f HEAD (unpacked, to detached)
expecting success:
git pack-refs --all --prune
ok 8 - pack refs
expecting success:
reset_to_df &&
git checkout master
Switched to branch 'master'
ok 9 - checkout away from d/f HEAD (packed, to branch)
expecting success:
reset_to_df &&
git checkout --detach master
HEAD is now at 8743131 initial
ok 10 - checkout away from d/f HEAD (packed, to detached)
# passed all 10 test(s)
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2014-checkout-switch.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2014-checkout-switch/.git/
expecting success:
echo Hello >file &&
git add file &&
test_tick &&
git commit -m V1 &&
echo Hello world >file &&
git add file &&
git checkout -b other
[master (root-commit) 68a43dc] V1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Switched to a new branch 'other'
M file
ok 1 - setup
expecting success:
git diff --exit-code
ok 2 - check all changes are staged
expecting success:
git commit -m V2
[other c55967b] V2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 3 - second commit
expecting success:
git diff --cached --exit-code
ok 4 - check
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2015-checkout-unborn.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2015-checkout-unborn/.git/
expecting success:
mkdir parent &&
(cd parent &&
git init &&
echo content >file &&
git add file &&
git commit -m base
) &&
git fetch parent master:origin
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2015-checkout-unborn/parent/.git/
[master (root-commit) e2bd84a] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
From parent
* [new branch] master -> origin
ok 1 - setup
expecting success:
echo precious >expect &&
echo precious >file &&
test_must_fail git checkout -b new origin &&
test_cmp expect file
error: The following untracked working tree files would be overwritten by checkout:
file
Please move or remove them before you switch branches.
Aborting
ok 2 - checkout from unborn preserves untracked files
expecting success:
echo precious >expect &&
echo precious >file &&
git add file &&
test_must_fail git checkout -b new origin &&
test_cmp expect file &&
git show :file >file &&
test_cmp expect file
error: Your local changes to the following files would be overwritten by checkout:
file
Please commit your changes or stash them before you switch branches.
Aborting
ok 3 - checkout from unborn preserves index contents
expecting success:
echo content >file &&
git add file &&
git checkout -b new origin
Switched to a new branch 'new'
ok 4 - checkout from unborn merges identical index contents
expecting success:
git checkout --orphan newroot &&
git checkout -b anothername &&
test_must_fail git show-ref --verify refs/heads/newroot &&
git symbolic-ref HEAD >actual &&
echo refs/heads/anothername >expect &&
test_cmp expect actual
Switched to a new branch 'newroot'
Switched to a new branch 'anothername'
fatal: 'refs/heads/newroot' - not a valid ref
ok 5 - checking out another branch from unborn state
expecting success:
test_create_repo empty &&
(
cd empty &&
git symbolic-ref HEAD >expect &&
test_must_fail git checkout &&
git symbolic-ref HEAD >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2015-checkout-unborn/empty/.git/
fatal: You are on a branch yet to be born
ok 6 - checking out in a newly created repo
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2012-checkout-last.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2012-checkout-last/.git/
expecting success:
echo hello >world &&
git add world &&
git commit -m initial &&
git branch other &&
echo "hello again" >>world &&
git add world &&
git commit -m second
[master (root-commit) 8743131] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 world
[master 71b2771] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
test_must_fail git checkout -
error: pathspec '-' did not match any file(s) known to git
ok 2 - "checkout -" does not work initially
expecting success:
git checkout other
Switched to branch 'other'
ok 3 - first branch switch
expecting success:
git checkout - &&
test "z$(git symbolic-ref HEAD)" = "zrefs/heads/master"
Switched to branch 'master'
ok 4 - "checkout -" switches back
expecting success:
git checkout - &&
test "z$(git symbolic-ref HEAD)" = "zrefs/heads/other"
Switched to branch 'other'
ok 5 - "checkout -" switches forth
expecting success:
git checkout $(git rev-parse HEAD)
Note: switching to '8743131dee10ff7e1e5c74322887a5a2abe0c958'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8743131 initial
ok 6 - detach HEAD
expecting success:
git checkout - &&
test "z$(git symbolic-ref HEAD)" = "zrefs/heads/other"
Switched to branch 'other'
ok 7 - "checkout -" attaches again
expecting success:
git checkout - &&
test "z$(git rev-parse HEAD)" = "z$(git rev-parse other)" &&
test_must_fail git symbolic-ref HEAD
Note: switching to '8743131dee10ff7e1e5c74322887a5a2abe0c958'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8743131 initial
fatal: ref HEAD is not a symbolic ref
ok 8 - "checkout -" detaches again
expecting success:
for i in 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
do
git checkout -b branch$i
done
Switched to a new branch 'branch16'
Switched to a new branch 'branch15'
Switched to a new branch 'branch14'
Switched to a new branch 'branch13'
Switched to a new branch 'branch12'
Switched to a new branch 'branch11'
Switched to a new branch 'branch10'
Switched to a new branch 'branch9'
Switched to a new branch 'branch8'
Switched to a new branch 'branch7'
Switched to a new branch 'branch6'
Switched to a new branch 'branch5'
Switched to a new branch 'branch4'
Switched to a new branch 'branch3'
Switched to a new branch 'branch2'
Switched to a new branch 'branch1'
ok 9 - more switches
expecting success:
more_switches &&
git checkout @{-1} &&
test "z$(git symbolic-ref HEAD)" = "zrefs/heads/branch2"
Switched to branch 'branch16'
Switched to branch 'branch15'
Switched to branch 'branch14'
Switched to branch 'branch13'
Switched to branch 'branch12'
Switched to branch 'branch11'
Switched to branch 'branch10'
Switched to branch 'branch9'
Switched to branch 'branch8'
Switched to branch 'branch7'
Switched to branch 'branch6'
Switched to branch 'branch5'
Switched to branch 'branch4'
Switched to branch 'branch3'
Switched to branch 'branch2'
Switched to branch 'branch1'
Switched to branch 'branch2'
ok 10 - switch to the last
expecting success:
more_switches &&
git checkout @{-2} &&
test "z$(git symbolic-ref HEAD)" = "zrefs/heads/branch3"
Switched to branch 'branch16'
Switched to branch 'branch15'
Switched to branch 'branch14'
Switched to branch 'branch13'
Switched to branch 'branch12'
Switched to branch 'branch11'
Switched to branch 'branch10'
Switched to branch 'branch9'
Switched to branch 'branch8'
Switched to branch 'branch7'
Switched to branch 'branch6'
Switched to branch 'branch5'
Switched to branch 'branch4'
Switched to branch 'branch3'
Switched to branch 'branch2'
Switched to branch 'branch1'
Switched to branch 'branch3'
ok 11 - switch to second from the last
expecting success:
more_switches &&
git checkout @{-3} &&
test "z$(git symbolic-ref HEAD)" = "zrefs/heads/branch4"
Switched to branch 'branch16'
Switched to branch 'branch15'
Switched to branch 'branch14'
Switched to branch 'branch13'
Switched to branch 'branch12'
Switched to branch 'branch11'
Switched to branch 'branch10'
Switched to branch 'branch9'
Switched to branch 'branch8'
Switched to branch 'branch7'
Switched to branch 'branch6'
Switched to branch 'branch5'
Switched to branch 'branch4'
Switched to branch 'branch3'
Switched to branch 'branch2'
Switched to branch 'branch1'
Switched to branch 'branch4'
ok 12 - switch to third from the last
expecting success:
more_switches &&
git checkout @{-4} &&
test "z$(git symbolic-ref HEAD)" = "zrefs/heads/branch5"
Switched to branch 'branch16'
Switched to branch 'branch15'
Switched to branch 'branch14'
Switched to branch 'branch13'
Switched to branch 'branch12'
Switched to branch 'branch11'
Switched to branch 'branch10'
Switched to branch 'branch9'
Switched to branch 'branch8'
Switched to branch 'branch7'
Switched to branch 'branch6'
Switched to branch 'branch5'
Switched to branch 'branch4'
Switched to branch 'branch3'
Switched to branch 'branch2'
Switched to branch 'branch1'
Switched to branch 'branch5'
ok 13 - switch to fourth from the last
expecting success:
more_switches &&
git checkout @{-12} &&
test "z$(git symbolic-ref HEAD)" = "zrefs/heads/branch13"
Switched to branch 'branch16'
Switched to branch 'branch15'
Switched to branch 'branch14'
Switched to branch 'branch13'
Switched to branch 'branch12'
Switched to branch 'branch11'
Switched to branch 'branch10'
Switched to branch 'branch9'
Switched to branch 'branch8'
Switched to branch 'branch7'
Switched to branch 'branch6'
Switched to branch 'branch5'
Switched to branch 'branch4'
Switched to branch 'branch3'
Switched to branch 'branch2'
Switched to branch 'branch1'
Switched to branch 'branch13'
ok 14 - switch to twelfth from the last
expecting success:
git checkout -b another other &&
echo "hello again" >>world &&
git add world &&
git commit -m third
Switched to a new branch 'another'
[another 5014e73] third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 15 - merge base test setup
expecting success:
git checkout another &&
git checkout another...master &&
test "z$(git rev-parse --verify HEAD)" = "z$(git rev-parse --verify master^)"
Already on 'another'
Note: switching to 'another...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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8743131 initial
ok 16 - another...master
expecting success:
git checkout another &&
git checkout ...master &&
test "z$(git rev-parse --verify HEAD)" = "z$(git rev-parse --verify master^)"
Previous HEAD position was 8743131 initial
Switched to branch 'another'
Note: switching to '...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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8743131 initial
ok 17 - ...master
expecting success:
git checkout another &&
git checkout master... &&
test "z$(git rev-parse --verify HEAD)" = "z$(git rev-parse --verify master^)"
Previous HEAD position was 8743131 initial
Switched to branch 'another'
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8743131 initial
ok 18 - master...
expecting success:
git checkout master &&
git checkout other &&
git rebase master &&
git checkout - &&
test "z$(git symbolic-ref HEAD)" = "zrefs/heads/master"
Previous HEAD position was 8743131 initial
Switched to branch 'master'
Switched to branch 'other'
First, rewinding head to replay your work on top of it...
Fast-forwarded other to master.
Switched to branch 'master'
ok 19 - "checkout -" works after a rebase A
expecting success:
git branch moodle master~1 &&
git checkout master &&
git checkout other &&
git rebase master moodle &&
git checkout - &&
test "z$(git symbolic-ref HEAD)" = "zrefs/heads/master"
Already on 'master'
Switched to branch 'other'
First, rewinding head to replay your work on top of it...
Fast-forwarded moodle to master.
Switched to branch 'master'
ok 20 - "checkout -" works after a rebase A B
expecting success:
git checkout master &&
git checkout other &&
git rebase -i master &&
git checkout - &&
test "z$(git symbolic-ref HEAD)" = "zrefs/heads/master"
Already on 'master'
Switched to branch 'other'
Successfully rebased and updated refs/heads/other.
Switched to branch 'master'
ok 21 - "checkout -" works after a rebase -i A
expecting success:
git branch foodle master~1 &&
git checkout master &&
git checkout other &&
git rebase master foodle &&
git checkout - &&
test "z$(git symbolic-ref HEAD)" = "zrefs/heads/master"
Already on 'master'
Switched to branch 'other'
First, rewinding head to replay your work on top of it...
Fast-forwarded foodle to master.
Switched to branch 'master'
ok 22 - "checkout -" works after a rebase -i A B
# passed all 22 test(s)
1..22
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2017-checkout-orphan.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2017-checkout-orphan/.git/
expecting success:
echo "Initial" >"$TEST_FILE" &&
git add "$TEST_FILE" &&
git commit -m "First Commit" &&
test_tick &&
echo "State 1" >>"$TEST_FILE" &&
git add "$TEST_FILE" &&
test_tick &&
git commit -m "Second Commit"
[master (root-commit) 97039ae] First Commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
[master 8e2a63c] Second Commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - Setup
expecting success:
git checkout --orphan alpha &&
test_must_fail git rev-parse --verify HEAD &&
test "refs/heads/alpha" = "$(git symbolic-ref HEAD)" &&
test_tick &&
git commit -m "Third Commit" &&
test_must_fail git rev-parse --verify HEAD^ &&
git diff-tree --quiet master alpha
Switched to a new branch 'alpha'
fatal: Needed a single revision
[alpha (root-commit) 6f20c32] Third Commit
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
create mode 100644 foo
fatal: Needed a single revision
ok 2 - --orphan creates a new orphan branch from HEAD
expecting success:
git checkout master &&
git checkout --orphan beta master^ &&
test_must_fail git rev-parse --verify HEAD &&
test "refs/heads/beta" = "$(git symbolic-ref HEAD)" &&
test_tick &&
git commit -m "Fourth Commit" &&
test_must_fail git rev-parse --verify HEAD^ &&
git diff-tree --quiet master^ beta
Switched to branch 'master'
Switched to a new branch 'beta'
fatal: Needed a single revision
[beta (root-commit) 530edda] Fourth Commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
fatal: Needed a single revision
ok 3 - --orphan creates a new orphan branch from <start_point>
expecting success:
git checkout master &&
test_must_fail git checkout --orphan new -b newer &&
test refs/heads/master = "$(git symbolic-ref HEAD)"
Switched to branch 'master'
fatal: -b, -B and --orphan are mutually exclusive
ok 4 - --orphan must be rejected with -b
expecting success:
git checkout master &&
test_must_fail git checkout --orphan new -t master &&
test refs/heads/master = "$(git symbolic-ref HEAD)"
Already on 'master'
fatal: '--orphan' cannot be used with '-t'
ok 5 - --orphan must be rejected with -t
expecting success:
git checkout master &&
git config branch.autosetupmerge always &&
git checkout --orphan gamma &&
test -z "$(git config branch.gamma.merge)" &&
test refs/heads/gamma = "$(git symbolic-ref HEAD)" &&
test_must_fail git rev-parse --verify HEAD^
Already on 'master'
Switched to a new branch 'gamma'
fatal: Needed a single revision
ok 6 - --orphan ignores branch.autosetupmerge
expecting success:
git checkout master &&
git config --unset core.logAllRefUpdates &&
git checkout --orphan delta &&
test_must_fail git rev-parse --verify delta@{0} &&
git commit -m Delta &&
git rev-parse --verify delta@{0}
Switched to branch 'master'
Switched to a new branch 'delta'
fatal: Needed a single revision
[delta (root-commit) 9beee35] Delta
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
create mode 100644 foo
9beee35744aee191f8186ef0a6ab78f710cdd57c
ok 7 - --orphan makes reflog by default
expecting success:
git checkout master &&
git config core.logAllRefUpdates false &&
git checkout --orphan epsilon &&
test_must_fail git rev-parse --verify epsilon@{0} &&
git commit -m Epsilon &&
test_must_fail git rev-parse --verify epsilon@{0}
Switched to branch 'master'
Switched to a new branch 'epsilon'
fatal: Needed a single revision
[epsilon (root-commit) c5e7701] Epsilon
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
create mode 100644 foo
fatal: Needed a single revision
ok 8 - --orphan does not make reflog when core.logAllRefUpdates = false
expecting success:
git checkout master &&
git checkout -l --orphan zeta &&
test_must_fail git rev-parse --verify zeta@{0} &&
git commit -m Zeta &&
git rev-parse --verify zeta@{0}
Switched to branch 'master'
Switched to a new branch 'zeta'
fatal: Needed a single revision
[zeta (root-commit) 1b23595] Zeta
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
create mode 100644 foo
1b235958474dccc5c8f228713c620d22e7d1825d
ok 9 - --orphan with -l makes reflog when core.logAllRefUpdates = false
expecting success:
git checkout master &&
git checkout -l --orphan eta &&
test_must_fail git rev-parse --verify eta@{0} &&
git checkout master &&
test_must_fail git rev-parse --verify eta@{0}
Switched to branch 'master'
Switched to a new branch 'eta'
fatal: Needed a single revision
Switched to branch 'master'
fatal: Needed a single revision
ok 10 - giving up --orphan not committed when -l and core.logAllRefUpdates = false deletes reflog
expecting success:
git checkout master &&
test_must_fail git checkout --orphan master &&
test refs/heads/master = "$(git symbolic-ref HEAD)"
Already on 'master'
fatal: A branch named 'master' already exists.
ok 11 - --orphan is rejected with an existing name
expecting success:
git checkout master &&
git reset --hard &&
echo local >>"$TEST_FILE" &&
cat "$TEST_FILE" >"$TEST_FILE.saved" &&
test_must_fail git checkout --orphan new master^ &&
test refs/heads/master = "$(git symbolic-ref HEAD)" &&
test_cmp "$TEST_FILE" "$TEST_FILE.saved" &&
git diff-index --quiet --cached HEAD &&
git reset --hard
Already on 'master'
HEAD is now at 8e2a63c Second Commit
error: Your local changes to the following files would be overwritten by checkout:
foo
Please commit your changes or stash them before you switch branches.
Aborting
HEAD is now at 8e2a63c Second Commit
ok 12 - --orphan refuses to switch if a merge is needed
expecting success:
git checkout master &&
git checkout --orphan new &&
test_must_fail git checkout --detach
Already on 'master'
Switched to a new branch 'new'
fatal: You are on a branch yet to be born
ok 13 - cannot --detach on an unborn branch
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2018-checkout-branch.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2018-checkout-branch/.git/
expecting success:
test_commit initial file1 &&
HEAD1=$(git rev-parse --verify HEAD) &&
test_commit change1 file1 &&
HEAD2=$(git rev-parse --verify HEAD) &&
git branch -m branch1
[master (root-commit) ee02a18] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1
[master 5be17a9] change1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
test_when_finished "
git checkout branch1 &&
test_might_fail git branch -D branch2" &&
do_checkout branch2
Switched to a new branch 'branch2'
Switched to branch 'branch1'
Deleted branch branch2 (was 5be17a9).
ok 2 - checkout -b to a new branch, set to HEAD
expecting success:
test_when_finished "
git checkout branch1 &&
test_might_fail git branch -D branch2" &&
git checkout -b branch2 branch1...
Switched to a new branch 'branch2'
Switched to branch 'branch1'
Deleted branch branch2 (was 5be17a9).
ok 3 - checkout -b to a merge base
expecting success:
test_when_finished "
git checkout branch1 &&
test_might_fail git branch -D branch2" &&
do_checkout branch2 $HEAD1
Switched to a new branch 'branch2'
Switched to branch 'branch1'
Deleted branch branch2 (was ee02a18).
ok 4 - checkout -b to a new branch, set to an explicit ref
expecting success:
setup_dirty_unmergeable &&
test_must_fail do_checkout branch2 $HEAD1 &&
test_dirty_unmergeable
error: Your local changes to the following files would be overwritten by checkout:
file1
Please commit your changes or stash them before you switch branches.
Aborting
ok 5 - checkout -b to a new branch with unmergeable changes fails
expecting success:
test_when_finished "
git checkout branch1 &&
test_might_fail git branch -D branch2" &&
# still dirty and on branch1
do_checkout branch2 $HEAD1 "-f -b" &&
test_must_fail test_dirty_unmergeable
Switched to a new branch 'branch2'
Switched to branch 'branch1'
Deleted branch branch2 (was ee02a18).
ok 6 - checkout -f -b to a new branch with unmergeable changes discards changes
expecting success:
test_when_finished "
git reset --hard &&
git checkout branch1 &&
test_might_fail git branch -D branch2" &&
setup_dirty_mergeable &&
do_checkout branch2 $HEAD1 &&
test_dirty_mergeable
Switched to a new branch 'branch2'
A file2
HEAD is now at ee02a18 initial
Switched to branch 'branch1'
Deleted branch branch2 (was ee02a18).
ok 7 - checkout -b to a new branch preserves mergeable changes
expecting success:
test_when_finished git reset --hard HEAD &&
setup_dirty_mergeable &&
do_checkout branch2 $HEAD1 "-f -b" &&
test_must_fail test_dirty_mergeable
Switched to a new branch 'branch2'
HEAD is now at ee02a18 initial
ok 8 - checkout -f -b to a new branch with mergeable changes discards changes
expecting success:
test_when_finished git reset --hard HEAD &&
test_must_fail do_checkout branch2 $HEAD2
fatal: A branch named 'branch2' already exists.
HEAD is now at ee02a18 initial
ok 9 - checkout -b to an existing branch fails
expecting success:
git checkout branch1 &&
git checkout branch2 &&
echo >expect "fatal: A branch named 'branch1' already exists." &&
test_must_fail git checkout -b @{-1} 2>actual &&
test_i18ncmp expect actual
Switched to branch 'branch1'
Switched to branch 'branch2'
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 10 - checkout -b to @{-1} fails with the right branch name
expecting success:
git checkout branch1 &&
do_checkout branch2 "" -B
Switched to branch 'branch1'
Switched to and reset branch 'branch2'
ok 11 - checkout -B to an existing branch resets branch to HEAD
expecting success:
git checkout branch1 &&
git checkout -B branch2 branch1...
Switched to branch 'branch1'
Switched to and reset branch 'branch2'
ok 12 - checkout -B to a merge base
expecting success:
git checkout $(git rev-parse --verify HEAD) &&
do_checkout branch2 "" -B
Note: switching to '5be17a9503605cbff49376bccdc74acb1ebd9160'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 5be17a9 change1
Switched to and reset branch 'branch2'
ok 13 - checkout -B to an existing branch from detached HEAD resets branch to HEAD
expecting success:
git checkout branch1 &&
do_checkout branch2 $HEAD1 -B
Switched to branch 'branch1'
Switched to and reset branch 'branch2'
ok 14 - checkout -B to an existing branch with an explicit ref resets branch to that ref
expecting success:
git checkout branch1 &&
setup_dirty_unmergeable &&
test_must_fail do_checkout branch2 $HEAD1 -B &&
test_dirty_unmergeable
Switched to branch 'branch1'
error: Your local changes to the following files would be overwritten by checkout:
file1
Please commit your changes or stash them before you switch branches.
Aborting
ok 15 - checkout -B to an existing branch with unmergeable changes fails
expecting success:
# still dirty and on branch1
do_checkout branch2 $HEAD1 "-f -B" &&
test_must_fail test_dirty_unmergeable
Switched to and reset branch 'branch2'
ok 16 - checkout -f -B to an existing branch with unmergeable changes discards changes
expecting success:
test_when_finished git reset --hard &&
git checkout branch1 &&
setup_dirty_mergeable &&
do_checkout branch2 $HEAD1 -B &&
test_dirty_mergeable
Switched to branch 'branch1'
Switched to and reset branch 'branch2'
A file2
HEAD is now at ee02a18 initial
ok 17 - checkout -B to an existing branch preserves mergeable changes
expecting success:
git checkout branch1 &&
setup_dirty_mergeable &&
do_checkout branch2 $HEAD1 "-f -B" &&
test_must_fail test_dirty_mergeable
Switched to branch 'branch1'
Switched to and reset branch 'branch2'
ok 18 - checkout -f -B to an existing branch with mergeable changes discards changes
expecting success:
git tag -f -m "First commit" initial initial &&
git checkout -f change1 &&
name=$(git describe) &&
git checkout -b $name &&
git diff --exit-code change1 &&
echo "refs/heads/$name" >expect &&
git symbolic-ref HEAD >actual &&
test_cmp expect actual
Updated tag 'initial' (was ee02a18)
Note: switching to 'change1'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 5be17a9 change1
Switched to a new branch 'initial-1-g5be17a9'
ok 19 - checkout -b <describe>
expecting success:
git checkout branch1 &&
git checkout -B branch1-scratch &&
setup_dirty_mergeable &&
git checkout -B branch1-scratch initial &&
test_dirty_mergeable
Switched to branch 'branch1'
Switched to a new branch 'branch1-scratch'
Reset branch 'branch1-scratch'
A file2
ok 20 - checkout -B to the current branch works
expecting success:
git init src &&
test_commit -C src a &&
rev="$(git -C src rev-parse HEAD)" &&
git clone --no-checkout src dest &&
git -C dest checkout "$rev" -b branch &&
test_path_is_file dest/a.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2018-checkout-branch/src/.git/
[master (root-commit) 7f0b538] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a.t
Cloning into 'dest'...
done.
Switched to a new branch 'branch'
ok 21 - checkout -b after clone --no-checkout does a checkout of HEAD
# passed all 21 test(s)
1..21
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2019-checkout-ambiguous-ref.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2019-checkout-ambiguous-ref/.git/
expecting success:
test_commit branch file &&
git branch ambiguity &&
git branch vagueness &&
test_commit tag file &&
git tag ambiguity &&
git tag vagueness HEAD:file &&
test_commit other file
[master (root-commit) c291a6e] branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master a40f7cf] tag
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 3b61e26] other
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup ambiguous refs
expecting success:
git checkout ambiguity >stdout 2>stderr
ok 2 - checkout ambiguous ref succeeds
expecting success:
grep "warning.*ambiguous" stderr
warning: refname 'ambiguity' is ambiguous.
ok 3 - checkout produces ambiguity warning
expecting success:
echo refs/heads/ambiguity >expect &&
git symbolic-ref HEAD >actual &&
test_cmp expect actual &&
echo branch >expect &&
test_cmp expect file
ok 4 - checkout chooses branch over tag
expecting success:
test_i18ngrep "Switched to branch" stderr &&
test_i18ngrep ! "^HEAD is now at" stderr
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Switched to branch 'ambiguity'
ok 5 - checkout reports switch to branch
expecting success:
git checkout vagueness >stdout 2>stderr &&
test_set_prereq VAGUENESS_SUCCESS
ok 6 - checkout vague ref succeeds
expecting success:
grep "warning.*ambiguous" stderr
warning: refname 'vagueness' is ambiguous.
ok 7 - checkout produces ambiguity warning
expecting success:
echo refs/heads/vagueness >expect &&
git symbolic-ref HEAD >actual &&
test_cmp expect actual &&
echo branch >expect &&
test_cmp expect file
ok 8 - checkout chooses branch over tag
expecting success:
test_i18ngrep "Switched to branch" stderr &&
test_i18ngrep ! "^HEAD is now at" stderr
Switched to branch 'vagueness'
ok 9 - checkout reports switch to branch
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2020-checkout-detach.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2020-checkout-detach/.git/
expecting success:
test_commit one &&
test_commit two &&
test_commit three && git tag -d three &&
test_commit four && git tag -d four &&
git branch branch &&
git tag tag
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[master 7c7cd71] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
Deleted tag 'three' (was 7c7cd71)
[master fd8d77e] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 four.t
Deleted tag 'four' (was fd8d77e)
ok 1 - setup
expecting success:
reset &&
git checkout branch &&
check_not_detached
Already on 'master'
Switched to branch 'branch'
ok 2 - checkout branch does not detach
expecting success:
reset &&
git checkout tag &&
check_detached
Switched to branch 'master'
Note: switching to 'tag'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at fd8d77e four
ok 3 - checkout tag detaches
expecting success:
reset &&
git checkout refs/heads/branch &&
check_detached
Switched to branch 'master'
Note: switching to 'refs/heads/branch'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at fd8d77e four
ok 4 - checkout branch by full name detaches
expecting success:
reset &&
git checkout branch^ &&
check_detached
Switched to branch 'master'
Note: switching to 'branch^'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 7c7cd71 three
ok 5 - checkout non-ref detaches
expecting success:
reset &&
git checkout branch^0 &&
check_detached
Previous HEAD position was 7c7cd71 three
Switched to branch 'master'
Note: switching to 'branch^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at fd8d77e four
ok 6 - checkout ref^0 detaches
expecting success:
reset &&
git checkout --detach branch &&
check_detached
Switched to branch 'master'
HEAD is now at fd8d77e four
ok 7 - checkout --detach detaches
expecting success:
reset &&
git checkout --detach &&
check_detached
Switched to branch 'master'
HEAD is now at fd8d77e four
ok 8 - checkout --detach without branch name
expecting success:
reset &&
test_must_fail git checkout --detach one^{tree} &&
check_not_detached
Switched to branch 'master'
fatal: Cannot switch branch to a non-commit 'one^{tree}'
ok 9 - checkout --detach errors out for non-commit
expecting success:
reset &&
git checkout master &&
test_must_fail git checkout --detach tag one.t &&
check_not_detached
Already on 'master'
Already on 'master'
fatal: git checkout: --detach does not take a path argument 'one.t'
ok 10 - checkout --detach errors out for extra argument
expecting success:
reset &&
test_must_fail git checkout --detach -b newbranch tag &&
check_not_detached
Already on 'master'
fatal: '--detach' cannot be used with '-b/-B/--orphan'
ok 11 - checkout --detached and -b are incompatible
expecting success:
reset &&
git checkout one &&
git checkout --detach two &&
git diff --exit-code HEAD &&
git diff --exit-code two
Already on 'master'
Note: switching to 'one'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d79ce16 one
Previous HEAD position was d79ce16 one
HEAD is now at 139b20d two
ok 12 - checkout --detach moves HEAD
expecting success:
reset &&
git checkout --detach two &&
echo content >orphan &&
git add orphan &&
git commit -a -m orphan1 &&
echo new content >orphan &&
git commit -a -m orphan2 &&
orphan2=$(git rev-parse HEAD) &&
git checkout master 2>stderr
Previous HEAD position was 139b20d two
Switched to branch 'master'
HEAD is now at 139b20d two
[detached HEAD 61e8031] orphan1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 orphan
[detached HEAD bfea71d] orphan2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 13 - checkout warns on orphan commits
expecting success:
check_orphan_warning stderr "2 commits"
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Warning: you are leaving 2 commits behind, not connected to
ok 14 - checkout warns on orphan commits: output
expecting success:
git checkout "$orphan2" &&
git checkout HEAD^ 2>stderr
Note: switching to 'bfea71df3731158d55fcf7b9d1ae214132b90e2b'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at bfea71d orphan2
ok 15 - checkout warns orphaning 1 of 2 commits
expecting success:
check_orphan_warning stderr "1 commit"
Warning: you are leaving 1 commit behind, not connected to
ok 16 - checkout warns orphaning 1 of 2 commits: output
expecting success:
reset &&
git checkout --detach two &&
git checkout master 2>stderr
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
61e8031 orphan1
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> 61e8031
Switched to branch 'master'
HEAD is now at 139b20d two
ok 17 - checkout does not warn leaving ref tip
expecting success:
check_no_orphan_warning stderr
Previous HEAD position was 139b20d two
ok 18 - checkout does not warn leaving ref tip
expecting success:
reset &&
git checkout --detach HEAD^ &&
git checkout master 2>stderr
Already on 'master'
HEAD is now at 7c7cd71 three
ok 19 - checkout does not warn leaving reachable commit
expecting success:
check_no_orphan_warning stderr
Previous HEAD position was 7c7cd71 three
ok 20 - checkout does not warn leaving reachable commit
expecting success:
reset &&
git branch child master^ &&
git config branch.child.remote . &&
git config branch.child.merge refs/heads/master &&
git checkout child^ &&
git checkout child >stdout &&
test_i18ncmp expect stdout
Already on 'master'
Note: switching to 'child^'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 139b20d two
Previous HEAD position was 139b20d two
Switched to branch 'child'
ok 21 - tracking count is accurate after orphan check
expecting success:
# baseline
test_config advice.detachedHead true &&
git checkout child && git checkout HEAD^0 >expect.advice 2>&1 &&
test_config advice.detachedHead false &&
git checkout child && git checkout HEAD^0 >expect.no-advice 2>&1 &&
test_unconfig advice.detachedHead &&
# without configuration, the advice.* variables default to true
git checkout child && git checkout HEAD^0 >actual 2>&1 &&
test_cmp expect.advice actual &&
# with explicit --detach
# no configuration
test_unconfig advice.detachedHead &&
git checkout child && git checkout --detach HEAD^0 >actual 2>&1 &&
test_cmp expect.no-advice actual &&
# explicitly decline advice
test_config advice.detachedHead false &&
git checkout child && git checkout --detach HEAD^0 >actual 2>&1 &&
test_cmp expect.no-advice actual
Already on 'child'
Your branch is behind 'master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
Switched to branch 'child'
Your branch is behind 'master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
Switched to branch 'child'
Your branch is behind 'master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
Switched to branch 'child'
Your branch is behind 'master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
Switched to branch 'child'
Your branch is behind 'master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
ok 22 - no advice given for explicit detached head state
expecting success:
commit=7c7cd714e262 &&
commit2=139b20d8e6c5 &&
commit3=d79ce1670bdc &&
# The first detach operation is more chatty than the following ones.
cat >1st_detach <<-EOF &&
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at $commit three
EOF
# The remaining ones just show info about previous and current HEADs.
cat >2nd_detach <<-EOF &&
Previous HEAD position was $commit three
HEAD is now at $commit2 two
EOF
cat >3rd_detach <<-EOF &&
Previous HEAD position was $commit2 two
HEAD is now at $commit3 one
EOF
reset &&
check_not_detached &&
# Various ways of *not* asking for ellipses
sane_unset GIT_PRINT_SHA1_ELLIPSIS &&
git -c 'core.abbrev=12' checkout HEAD^ >actual 2>&1 &&
check_detached &&
test_i18ncmp 1st_detach actual &&
GIT_PRINT_SHA1_ELLIPSIS=no git -c 'core.abbrev=12' checkout HEAD^ >actual 2>&1 &&
check_detached &&
test_i18ncmp 2nd_detach actual &&
GIT_PRINT_SHA1_ELLIPSIS= git -c 'core.abbrev=12' checkout HEAD^ >actual 2>&1 &&
check_detached &&
test_i18ncmp 3rd_detach actual &&
sane_unset GIT_PRINT_SHA1_ELLIPSIS &&
# We only have four commits, but we can re-use them
reset &&
check_not_detached &&
# Make no mention of the env var at all
git -c 'core.abbrev=12' checkout HEAD^ >actual 2>&1 &&
check_detached &&
test_i18ncmp 1st_detach actual &&
GIT_PRINT_SHA1_ELLIPSIS='nope' &&
git -c 'core.abbrev=12' checkout HEAD^ >actual 2>&1 &&
check_detached &&
test_i18ncmp 2nd_detach actual &&
GIT_PRINT_SHA1_ELLIPSIS=nein &&
git -c 'core.abbrev=12' checkout HEAD^ >actual 2>&1 &&
check_detached &&
test_i18ncmp 3rd_detach actual &&
true
Previous HEAD position was 7c7cd71 three
Switched to branch 'master'
Previous HEAD position was d79ce16 one
Switched to branch 'master'
ok 23 - describe_detached_head prints no SHA-1 ellipsis when not asked to
expecting success:
commit=7c7cd714e262 &&
commit2=139b20d8e6c5 &&
commit3=d79ce1670bdc &&
# The first detach operation is more chatty than the following ones.
cat >1st_detach <<-EOF &&
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at $commit... three
EOF
# The remaining ones just show info about previous and current HEADs.
cat >2nd_detach <<-EOF &&
Previous HEAD position was $commit... three
HEAD is now at $commit2... two
EOF
cat >3rd_detach <<-EOF &&
Previous HEAD position was $commit2... two
HEAD is now at $commit3... one
EOF
reset &&
check_not_detached &&
# Various ways of asking for ellipses...
# The user can just use any kind of quoting (including none).
GIT_PRINT_SHA1_ELLIPSIS=yes git -c 'core.abbrev=12' checkout HEAD^ >actual 2>&1 &&
check_detached &&
test_i18ncmp 1st_detach actual &&
GIT_PRINT_SHA1_ELLIPSIS=Yes git -c 'core.abbrev=12' checkout HEAD^ >actual 2>&1 &&
check_detached &&
test_i18ncmp 2nd_detach actual &&
GIT_PRINT_SHA1_ELLIPSIS=YES git -c 'core.abbrev=12' checkout HEAD^ >actual 2>&1 &&
check_detached &&
test_i18ncmp 3rd_detach actual &&
true
Previous HEAD position was d79ce16 one
Switched to branch 'master'
ok 24 - describe_detached_head does print SHA-1 ellipsis when asked to
# passed all 24 test(s)
1..24
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2021-checkout-overwrite.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2021-checkout-overwrite/.git/
expecting success:
mkdir -p a/b/c &&
>a/b/c/d &&
git add -A &&
git commit -m base &&
git tag start
[master (root-commit) 5db7f9b] base
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a/b/c/d
ok 1 - setup
expecting success:
git checkout -b file &&
rm -rf a/b &&
>a/b &&
git add -A &&
git commit -m "dir to file"
Switched to a new branch 'file'
[file 4c019e5] dir to file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename a/{b/c/d => b} (100%)
ok 2 - create a commit where dir a/b changed to file
expecting success:
git rm --cached a/b &&
git commit -m "un-track the file" &&
test_must_fail git checkout start &&
test -f a/b
rm 'a/b'
[file 5bba401] un-track the file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 a/b
error: The following untracked working tree files would be overwritten by checkout:
a/b
Please move or remove them before you switch branches.
Aborting
ok 3 - checkout commit with dir must not remove untracked a/b
expecting success:
rm -rf a/b && # cleanup if previous test failed
git checkout -f -b symlink start &&
rm -rf a/b &&
git add -A &&
test_ln_s_add foo a/b &&
git commit -m "dir to symlink"
Switched to a new branch 'symlink'
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
[symlink 5efc178] dir to symlink
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 120000 a/b
delete mode 100644 a/b/c/d
ok 4 - create a commit where dir a/b changed to symlink
expecting success:
git rm --cached a/b &&
git commit -m "un-track the symlink" &&
test_must_fail git checkout start
rm 'a/b'
[symlink c97d984] un-track the symlink
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 120000 a/b
error: The following untracked working tree files would be overwritten by checkout:
a/b
Please move or remove them before you switch branches.
Aborting
ok 5 - checkout commit with dir must not remove untracked a/b
expecting success:
test -h a/b
ok 6 - the symlink remained
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2016-checkout-patch.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2016-checkout-patch/.git/
expecting success:
mkdir dir &&
echo parent > dir/foo &&
echo dummy > bar &&
git add bar dir/foo &&
git commit -m initial &&
test_tick &&
test_commit second dir/foo head &&
set_and_save_state bar bar_work bar_index &&
save_head
[master (root-commit) 1c30972] initial
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 bar
create mode 100644 dir/foo
[master 57f525f] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
set_and_save_state dir/foo work head &&
test_write_lines n n | git checkout -p &&
verify_saved_state bar &&
verify_saved_state dir/foo
diff --git a/bar b/bar
index 7780244..8c999e6 100644
--- a/bar
+++ b/bar
@@ -1 +1 @@
-bar_index
+bar_work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
ok 2 - saying "n" does nothing
expecting success:
test_write_lines n y | git checkout -p &&
verify_saved_state bar &&
verify_state dir/foo head head
diff --git a/bar b/bar
index 7780244..8c999e6 100644
--- a/bar
+++ b/bar
@@ -1 +1 @@
-bar_index
+bar_work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
ok 3 - git checkout -p
expecting success:
set_state dir/foo work index &&
test_write_lines n y | git checkout -p &&
verify_saved_state bar &&
verify_state dir/foo index index
diff --git a/bar b/bar
index 7780244..8c999e6 100644
--- a/bar
+++ b/bar
@@ -1 +1 @@
-bar_index
+bar_work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
diff --git a/dir/foo b/dir/foo
index 9015a7a..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-index
+work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
ok 4 - git checkout -p with staged changes
expecting success:
set_and_save_state dir/foo work head &&
test_write_lines n y n | git checkout -p HEAD &&
verify_saved_state bar &&
verify_saved_state dir/foo
diff --git a/bar b/bar
index 421376d..8c999e6 100644
--- a/bar
+++ b/bar
@@ -1 +1 @@
-dummy
+bar_work
Discard this hunk from index and worktree [y,n,q,a,d,e,?]?
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Discard this hunk from index and worktree [y,n,q,a,d,e,?]? error: patch failed: dir/foo:1
error: dir/foo: patch does not apply
The selected hunks do not apply to the index!
Apply them to the worktree anyway? Nothing was applied.
ok 5 - git checkout -p HEAD with NO staged changes: abort
expecting success:
test_write_lines n y y | git checkout -p HEAD &&
verify_saved_state bar &&
verify_state dir/foo head head
diff --git a/bar b/bar
index 421376d..8c999e6 100644
--- a/bar
+++ b/bar
@@ -1 +1 @@
-dummy
+bar_work
Discard this hunk from index and worktree [y,n,q,a,d,e,?]?
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Discard this hunk from index and worktree [y,n,q,a,d,e,?]? error: patch failed: dir/foo:1
error: dir/foo: patch does not apply
The selected hunks do not apply to the index!
Apply them to the worktree anyway?
ok 6 - git checkout -p HEAD with NO staged changes: apply
expecting success:
set_state dir/foo index index &&
# the third n is to get out in case it mistakenly does not apply
test_write_lines n y n | git checkout -p HEAD &&
verify_saved_state bar &&
verify_state dir/foo head head
diff --git a/bar b/bar
index 421376d..8c999e6 100644
--- a/bar
+++ b/bar
@@ -1 +1 @@
-dummy
+bar_work
Discard this hunk from index and worktree [y,n,q,a,d,e,?]?
diff --git a/dir/foo b/dir/foo
index 564b12f..9015a7a 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+index
Discard this hunk from index and worktree [y,n,q,a,d,e,?]?
ok 7 - git checkout -p HEAD with change already staged
expecting success:
# the third n is to get out in case it mistakenly does not apply
test_write_lines n y n | git checkout -p HEAD^ &&
verify_saved_state bar &&
verify_state dir/foo parent parent
diff --git b/bar a/bar
index 8c999e6..421376d 100644
--- b/bar
+++ a/bar
@@ -1 +1 @@
-bar_work
+dummy
Apply this hunk to index and worktree [y,n,q,a,d,e,?]?
diff --git b/dir/foo a/dir/foo
index 564b12f..9676f5b 100644
--- b/dir/foo
+++ a/dir/foo
@@ -1 +1 @@
-head
+parent
Apply this hunk to index and worktree [y,n,q,a,d,e,?]?
ok 8 - git checkout -p HEAD^
expecting success:
set_state dir/foo work index &&
rm dir/foo &&
test_write_lines n y | git checkout -p &&
verify_saved_state bar &&
verify_state dir/foo index index
diff --git a/bar b/bar
index 7780244..8c999e6 100644
--- a/bar
+++ b/bar
@@ -1 +1 @@
-bar_index
+bar_work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
diff --git a/dir/foo b/dir/foo
index 9015a7a..0000000
--- a/dir/foo
+++ /dev/null
deleted file mode 100644
@@ -1 +0,0 @@
-index
Discard deletion from worktree [y,n,q,a,d,?]?
ok 9 - git checkout -p handles deletion
expecting success:
set_state dir/foo work head &&
test_write_lines y n | git checkout -p dir &&
verify_saved_state bar &&
verify_state dir/foo head head
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
ok 10 - path limiting works: dir
expecting success:
set_state dir/foo work head &&
test_write_lines y n | git checkout -p -- dir &&
verify_saved_state bar &&
verify_state dir/foo head head
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
ok 11 - path limiting works: -- dir
expecting success:
# the third n is to get out in case it mistakenly does not apply
test_write_lines y n n | git checkout -p HEAD^ -- dir &&
verify_saved_state bar &&
verify_state dir/foo parent parent
diff --git b/dir/foo a/dir/foo
index 564b12f..9676f5b 100644
--- b/dir/foo
+++ a/dir/foo
@@ -1 +1 @@
-head
+parent
Apply this hunk to index and worktree [y,n,q,a,d,e,?]?
ok 12 - path limiting works: HEAD^ -- dir
expecting success:
set_state dir/foo work head &&
# the third n is to get out in case it mistakenly does not apply
test_write_lines y n n | (cd dir && git checkout -p foo) &&
verify_saved_state bar &&
verify_state dir/foo head head
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
ok 13 - path limiting works: foo inside dir
expecting success:
verify_saved_head
ok 14 - none of this moved HEAD
# passed all 14 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2022-checkout-paths.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2022-checkout-paths/.git/
expecting success:
mkdir dir &&
>dir/master &&
echo common >dir/common &&
git add dir/master dir/common &&
test_tick && git commit -m "master has dir/master" &&
git checkout -b next &&
git mv dir/master dir/next0 &&
echo next >dir/next1 &&
git add dir &&
test_tick && git commit -m "next has dir/next but not dir/master"
[master (root-commit) de06282] master has dir/master
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 100644 dir/common
create mode 100644 dir/master
Switched to a new branch 'next'
[next 65d8465] next has dir/next but not dir/master
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
rename dir/{master => next0} (100%)
create mode 100644 dir/next1
ok 1 - setup
expecting success:
git checkout next &&
git reset --hard &&
rm dir/next0 &&
cat dir/common >expect.common &&
echo modified >expect.next1 &&
cat expect.next1 >dir/next1 &&
echo untracked >expect.next2 &&
cat expect.next2 >dir/next2 &&
git checkout master dir &&
test_cmp expect.common dir/common &&
test_path_is_file dir/master &&
git diff --exit-code master dir/master &&
test_path_is_missing dir/next0 &&
test_cmp expect.next1 dir/next1 &&
test_path_is_file dir/next2 &&
test_must_fail git ls-files --error-unmatch dir/next2 &&
test_cmp expect.next2 dir/next2
Already on 'next'
HEAD is now at 65d8465 next has dir/next but not dir/master
Updated 1 path from 848cb0d
error: pathspec 'dir/next2' did not match any file(s) known to git
Did you forget to 'git add'?
ok 2 - checking out paths out of a tree does not clobber unrelated paths
expecting success:
git checkout next &&
git reset --hard &&
cat dir/common >expect.common &&
EMPTY_SHA1=$(git hash-object -w --stdin </dev/null) &&
git rm dir/next0 &&
cat >expect.next0 <<-EOF &&
100644 $EMPTY_SHA1 1 dir/next0
100644 $EMPTY_SHA1 2 dir/next0
EOF
git update-index --index-info <expect.next0 &&
git checkout master dir &&
test_cmp expect.common dir/common &&
test_path_is_file dir/master &&
git diff --exit-code master dir/master &&
git ls-files -s dir/next0 >actual.next0 &&
test_cmp expect.next0 actual.next0
Already on 'next'
A dir/master
D dir/next0
M dir/next1
HEAD is now at 65d8465 next has dir/next but not dir/master
rm 'dir/next0'
Updated 1 path from 848cb0d
ok 3 - do not touch unmerged entries matching $path but not in $tree
expecting success:
git reset --hard &&
echo one >file1 &&
echo two >file2 &&
git add file1 file2 &&
git commit -m base &&
echo modified >file1 &&
test-tool chmtime =1000000000 file2 &&
git update-index -q --refresh &&
git checkout HEAD -- file1 file2 &&
echo one >expect &&
test_cmp expect file1 &&
echo "1000000000" >expect &&
test-tool chmtime --get file2 >actual &&
test_cmp expect actual
HEAD is now at 65d8465 next has dir/next but not dir/master
[next 709a6c8] base
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 file1
create mode 100644 file2
ok 4 - do not touch files that are already up-to-date
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2023-checkout-m.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2023-checkout-m/.git/
expecting success:
test_tick &&
test_commit both.txt both.txt initial &&
git branch topic &&
test_commit modified_in_master both.txt in_master &&
test_commit added_in_master each.txt in_master &&
git checkout topic &&
test_commit modified_in_topic both.txt in_topic &&
test_commit added_in_topic each.txt in_topic
[master (root-commit) 7a8c5bf] both.txt
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 both.txt
[master dc44449] modified_in_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 642a0cb] added_in_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 each.txt
Switched to branch 'topic'
[topic 33542d7] modified_in_topic
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[topic d46615c] added_in_topic
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 each.txt
ok 1 - setup
expecting success:
test_must_fail git merge master
Merging:
d46615c added_in_topic
virtual master
found 1 common ancestor:
7a8c5bf both.txt
CONFLICT (add/add): Merge conflict in each.txt
Auto-merging each.txt
Auto-merging both.txt
CONFLICT (content): Merge conflict in both.txt
Automatic merge failed; fix conflicts and then commit the result.
ok 2 - git merge master
expecting success:
cp each.txt each.txt.conflicted &&
echo resolved >each.txt &&
git add each.txt &&
git checkout -m -- each.txt &&
clean_branchnames <each.txt >each.txt.cleaned &&
clean_branchnames <each.txt.conflicted >each.txt.conflicted.cleaned &&
test_cmp each.txt.conflicted.cleaned each.txt.cleaned
ok 3 - -m restores 2-way conflicted+resolved file
expecting success:
cp both.txt both.txt.conflicted &&
echo resolved >both.txt &&
git add both.txt &&
git checkout -m -- both.txt &&
clean_branchnames <both.txt >both.txt.cleaned &&
clean_branchnames <both.txt.conflicted >both.txt.conflicted.cleaned &&
test_cmp both.txt.conflicted.cleaned both.txt.cleaned
ok 4 - -m restores 3-way conflicted+resolved file
expecting success:
git init co-force &&
(
cd co-force &&
echo a >a &&
git add a &&
git commit -ama &&
A_OBJ=$(git rev-parse :a) &&
git branch topic &&
echo b >a &&
git commit -amb &&
B_OBJ=$(git rev-parse :a) &&
git checkout topic &&
echo c >a &&
C_OBJ=$(git hash-object a) &&
git checkout -m master &&
test_cmp_rev :1:a $A_OBJ &&
test_cmp_rev :2:a $B_OBJ &&
test_cmp_rev :3:a $C_OBJ &&
git checkout -f topic &&
test_cmp_rev :0:a $A_OBJ
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2023-checkout-m/co-force/.git/
[master (root-commit) b7442a0] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
[master 7529dfa] b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'topic'
Switched to branch 'master'
M a
Switched to branch 'topic'
ok 5 - force checkout a conflict file creates stage zero entry
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2025-checkout-no-overlay.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2025-checkout-no-overlay/.git/
expecting success:
git commit --allow-empty -m "initial"
[master (root-commit) d5bfe3b] initial
Author: A U Thor <author@example.com>
ok 1 - setup
expecting success:
>file &&
mkdir dir &&
>dir/file1 &&
git add file dir/file1 &&
git checkout --no-overlay HEAD -- file &&
test_path_is_missing file &&
test_path_is_file dir/file1
ok 2 - checkout --no-overlay deletes files not in <tree-ish>
expecting success:
git checkout --no-overlay HEAD -- dir/file1 &&
test_path_is_missing dir
ok 3 - checkout --no-overlay removing last file from directory
expecting success:
test_must_fail git checkout -p --overlay HEAD 2>actual &&
test_i18ngrep "fatal: -p and --overlay are mutually exclusive" actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: -p and --overlay are mutually exclusive
ok 4 - checkout -p --overlay is disallowed
expecting success:
test_commit file1 file1 &&
test_commit file2 file2 &&
git rm --cached file1 &&
echo 1234 >file1 &&
F1=$(git rev-parse HEAD:file1) &&
F2=$(git rev-parse HEAD:file2) &&
{
echo "100644 $F1 1 file1" &&
echo "100644 $F2 2 file1"
} | git update-index --index-info &&
test_path_is_file file1 &&
git checkout --theirs --no-overlay -- file1 &&
test_path_is_missing file1
[master 75853ea] file1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1
[master e67802f] file2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
rm 'file1'
ok 5 - --no-overlay --theirs with D/F conflict deletes file
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2030-unresolve-info.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2030-unresolve-info/.git/
expecting success:
mkdir fi &&
printf "a\0a" >binary &&
git add binary &&
test_commit initial fi/le first &&
git branch side &&
git branch another &&
printf "a\0b" >binary &&
git add binary &&
test_commit second fi/le second &&
git checkout side &&
test_commit third fi/le third &&
git branch add-add &&
git checkout another &&
test_commit fourth fi/le fourth &&
git checkout add-add &&
test_commit fifth add-differently &&
git checkout master
[master (root-commit) 7b271e3] initial
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 100644 binary
create mode 100644 fi/le
[master 9a00f99] second
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'side'
[side b18340d] third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'another'
[another cf4d985] fourth
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'add-add'
[add-add b851e77] fifth
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 add-differently
Switched to branch 'master'
ok 1 - setup
expecting success:
prime_resolve_undo &&
test_tick &&
git commit -m merged &&
echo committing keeps &&
check_resolve_undo kept fi/le initial:fi/le second:fi/le third:fi/le &&
git checkout second^0 &&
echo switching clears &&
check_resolve_undo cleared
HEAD is now at 9a00f99 second
Note: switching to 'second^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 9a00f99 second
Merging:
9a00f99 second
virtual third^0
found 1 common ancestor:
7b271e3 initial
Auto-merging fi/le
CONFLICT (content): Merge conflict in fi/le
Automatic merge failed; fix conflicts and then commit the result.
merge does not leave anything
resolving records
[detached HEAD b3a51df] merged
Author: A U Thor <author@example.com>
committing keeps
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
b3a51df merged
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> b3a51df
HEAD is now at 9a00f99 second
switching clears
ok 2 - add records switch clears
expecting success:
prime_resolve_undo &&
test_tick &&
git commit -m merged &&
echo committing keeps &&
check_resolve_undo kept fi/le initial:fi/le second:fi/le third:fi/le &&
echo merge clears upfront &&
test_must_fail git merge fourth^0 &&
check_resolve_undo nuked &&
git rm -f fi/le &&
echo resolving records &&
check_resolve_undo recorded fi/le initial:fi/le HEAD:fi/le fourth:fi/le &&
git reset --hard &&
echo resetting discards &&
check_resolve_undo discarded
HEAD is now at 9a00f99 second
HEAD is now at 9a00f99 second
Merging:
9a00f99 second
virtual third^0
found 1 common ancestor:
7b271e3 initial
Auto-merging fi/le
CONFLICT (content): Merge conflict in fi/le
Automatic merge failed; fix conflicts and then commit the result.
merge does not leave anything
resolving records
[detached HEAD 70d285e] merged
Author: A U Thor <author@example.com>
committing keeps
merge clears upfront
Merging:
70d285e merged
virtual fourth^0
found 1 common ancestor:
7b271e3 initial
Auto-merging fi/le
CONFLICT (content): Merge conflict in fi/le
Automatic merge failed; fix conflicts and then commit the result.
rm 'fi/le'
resolving records
HEAD is now at 70d285e merged
resetting discards
ok 3 - rm records reset clears
expecting success:
prime_resolve_undo &&
test_tick &&
git commit -m merged &&
echo committing keeps &&
check_resolve_undo kept fi/le initial:fi/le second:fi/le third:fi/le &&
echo plumbing clear &&
git update-index --clear-resolve-undo &&
check_resolve_undo cleared
HEAD is now at 70d285e merged
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
70d285e merged
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> 70d285e
HEAD is now at 9a00f99 second
Merging:
9a00f99 second
virtual third^0
found 1 common ancestor:
7b271e3 initial
Auto-merging fi/le
CONFLICT (content): Merge conflict in fi/le
Automatic merge failed; fix conflicts and then commit the result.
merge does not leave anything
resolving records
[detached HEAD 894de51] merged
Author: A U Thor <author@example.com>
committing keeps
plumbing clear
ok 4 - plumbing clears
expecting success:
prime_resolve_undo &&
git diff HEAD &&
git checkout --conflict=merge fi/le &&
echo checkout used the record and removed it &&
check_resolve_undo removed &&
echo the index and the work tree is unmerged again &&
git diff >actual &&
grep "^++<<<<<<<" actual
HEAD is now at 894de51 merged
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
894de51 merged
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> 894de51
HEAD is now at 9a00f99 second
Merging:
9a00f99 second
virtual third^0
found 1 common ancestor:
7b271e3 initial
Auto-merging fi/le
CONFLICT (content): Merge conflict in fi/le
Automatic merge failed; fix conflicts and then commit the result.
merge does not leave anything
resolving records
diff --git a/fi/le b/fi/le
index e019be0..8dca2f8 100644
--- a/fi/le
+++ b/fi/le
@@ -1 +1 @@
-second
+different
Recreated 1 merge conflict
checkout used the record and removed it
the index and the work tree is unmerged again
++<<<<<<< ours
ok 5 - add records checkout -m undoes
expecting success:
prime_resolve_undo &&
git update-index --unresolve fi/le &&
git ls-files -u >actual &&
test_line_count = 3 actual
HEAD is now at 9a00f99 second
HEAD is now at 9a00f99 second
Merging:
9a00f99 second
virtual third^0
found 1 common ancestor:
7b271e3 initial
Auto-merging fi/le
CONFLICT (content): Merge conflict in fi/le
Automatic merge failed; fix conflicts and then commit the result.
merge does not leave anything
resolving records
ok 6 - unmerge with plumbing
expecting success:
mkdir .git/rr-cache &&
prime_resolve_undo &&
echo record the resolution &&
git rerere &&
rerere_id=$(cd .git/rr-cache && echo */postimage) &&
rerere_id=${rerere_id%/postimage} &&
test -f .git/rr-cache/$rerere_id/postimage &&
git checkout -m fi/le &&
echo resurrect the conflict &&
grep "^=======" fi/le &&
echo reresolve the conflict &&
git rerere &&
test "z$(cat fi/le)" = zdifferent &&
echo register the resolution again &&
git add fi/le &&
check_resolve_undo kept fi/le initial:fi/le second:fi/le third:fi/le &&
test -z "$(git ls-files -u)" &&
git rerere forget fi/le &&
! test -f .git/rr-cache/$rerere_id/postimage &&
tr "\0" "\n" <.git/MERGE_RR >actual &&
echo "$rerere_id fi/le" >expect &&
test_cmp expect actual
HEAD is now at 9a00f99 second
HEAD is now at 9a00f99 second
Merging:
9a00f99 second
virtual third^0
found 1 common ancestor:
7b271e3 initial
Auto-merging fi/le
CONFLICT (content): Merge conflict in fi/le
Recorded preimage for 'fi/le'
Automatic merge failed; fix conflicts and then commit the result.
merge does not leave anything
resolving records
record the resolution
Recorded resolution for 'fi/le'.
Recreated 1 merge conflict
resurrect the conflict
=======
reresolve the conflict
Resolved 'fi/le' using previous resolution.
register the resolution again
Updated preimage for 'fi/le'
Forgot resolution for 'fi/le'
ok 7 - rerere and rerere forget
expecting success:
rm -fr .git/rr-cache &&
mkdir .git/rr-cache &&
prime_resolve_undo &&
echo record the resolution &&
(cd fi && git rerere) &&
rerere_id=$(cd .git/rr-cache && echo */postimage) &&
rerere_id=${rerere_id%/postimage} &&
test -f .git/rr-cache/$rerere_id/postimage &&
(cd fi && git checkout -m le) &&
echo resurrect the conflict &&
grep "^=======" fi/le &&
echo reresolve the conflict &&
(cd fi && git rerere) &&
test "z$(cat fi/le)" = zdifferent &&
echo register the resolution again &&
(cd fi && git add le) &&
check_resolve_undo kept fi/le initial:fi/le second:fi/le third:fi/le &&
test -z "$(git ls-files -u)" &&
(cd fi && git rerere forget le) &&
! test -f .git/rr-cache/$rerere_id/postimage &&
tr "\0" "\n" <.git/MERGE_RR >actual &&
echo "$rerere_id fi/le" >expect &&
test_cmp expect actual
HEAD is now at 9a00f99 second
HEAD is now at 9a00f99 second
Merging:
9a00f99 second
virtual third^0
found 1 common ancestor:
7b271e3 initial
Auto-merging fi/le
CONFLICT (content): Merge conflict in fi/le
Recorded preimage for 'fi/le'
Automatic merge failed; fix conflicts and then commit the result.
merge does not leave anything
resolving records
record the resolution
Recorded resolution for 'fi/le'.
Recreated 1 merge conflict
resurrect the conflict
=======
reresolve the conflict
Resolved 'fi/le' using previous resolution.
register the resolution again
Updated preimage for 'fi/le'
Forgot resolution for 'fi/le'
ok 8 - rerere and rerere forget (subdirectory)
expecting success:
git checkout -f side &&
printf "a\0c" >binary &&
git commit -a -m binary &&
test_must_fail git merge second &&
git rerere forget binary
Previous HEAD position was 9a00f99 second
Switched to branch 'side'
[side 431a49e] binary
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
warning: Cannot merge binary files: binary (HEAD vs. second)
Merging:
431a49e binary
virtual second
found 1 common ancestor:
7b271e3 initial
Auto-merging fi/le
CONFLICT (content): Merge conflict in fi/le
Auto-merging binary
CONFLICT (content): Merge conflict in binary
Recorded preimage for 'fi/le'
Automatic merge failed; fix conflicts and then commit the result.
warning: Cannot merge binary files: binary (ours vs. theirs)
error: could not parse conflict hunks in 'binary'
ok 9 - rerere forget (binary)
expecting success:
git checkout -f master &&
echo master >add-differently &&
git add add-differently &&
git commit -m "add differently" &&
test_must_fail git merge fifth &&
git rerere forget add-differently 2>actual &&
test_i18ngrep "no remembered" actual
Switched to branch 'master'
[master 2aac45c] add differently
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 add-differently
Merging:
2aac45c add differently
virtual fifth
found 1 common ancestor:
7b271e3 initial
Auto-merging fi/le
CONFLICT (content): Merge conflict in fi/le
CONFLICT (add/add): Merge conflict in add-differently
Auto-merging add-differently
Recorded preimage for 'add-differently'
Recorded preimage for 'fi/le'
Automatic merge failed; fix conflicts and then commit the result.
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: no remembered resolution for 'add-differently'
ok 10 - rerere forget (add-add conflict)
# passed all 10 test(s)
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2050-git-dir-relative.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2050-git-dir-relative/.git/
expecting success:
mkdir -p .git/hooks &&
echo >.git/hooks/post-commit "#!/bin/sh
touch \"\${COMMIT_FILE}\"
echo Post commit hook was called." &&
chmod +x .git/hooks/post-commit
ok 1 - Setting up post-commit hook
expecting success:
echo initial >top &&
git add top &&
git commit -m initial &&
test -r "${COMMIT_FILE}"
Post commit hook was called.
[master (root-commit) c6dff2e] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 top
ok 2 - post-commit hook used ordinarily
expecting success:
echo changed >top &&
git --git-dir subdir/.git add top &&
git --git-dir subdir/.git commit -m topcommit &&
test -r "${COMMIT_FILE}"
Post commit hook was called.
[master f8d44d9] topcommit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 3 - post-commit-hook created and used from top dir
expecting success:
echo changed again >top &&
cd subdir &&
git --git-dir .git --work-tree .. add ../top &&
git --git-dir .git --work-tree .. commit -m subcommit &&
test -r "${COMMIT_FILE}"
Post commit hook was called.
[master a8bebe3] subcommit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 4 - post-commit-hook from sub dir
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2024-checkout-dwim.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2024-checkout-dwim/.git/
expecting success:
test_commit my_master &&
git init repo_a &&
(
cd repo_a &&
test_commit a_master &&
git checkout -b foo &&
test_commit a_foo &&
git checkout -b bar &&
test_commit a_bar
) &&
git init repo_b &&
(
cd repo_b &&
test_commit b_master &&
git checkout -b foo &&
test_commit b_foo &&
git checkout -b baz &&
test_commit b_baz
) &&
git remote add repo_a repo_a &&
git remote add repo_b repo_b &&
git config remote.repo_b.fetch \
"+refs/heads/*:refs/remotes/other_b/*" &&
git fetch --all
[master (root-commit) 93159a7] my_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 my_master.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2024-checkout-dwim/repo_a/.git/
[master (root-commit) 9480204] a_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a_master.t
Switched to a new branch 'foo'
[foo ba3a763] a_foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a_foo.t
Switched to a new branch 'bar'
[bar 1901e7e] a_bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a_bar.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2024-checkout-dwim/repo_b/.git/
[master (root-commit) eb1360a] b_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b_master.t
Switched to a new branch 'foo'
[foo 73c9fcf] b_foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b_foo.t
Switched to a new branch 'baz'
[baz a4f4a16] b_baz
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b_baz.t
Fetching repo_a
warning: no common commits
From repo_a
* [new branch] bar -> repo_a/bar
* [new branch] foo -> repo_a/foo
* [new branch] master -> repo_a/master
* [new tag] a_bar -> a_bar
* [new tag] a_foo -> a_foo
* [new tag] a_master -> a_master
Fetching repo_b
warning: no common commits
From repo_b
* [new branch] baz -> other_b/baz
* [new branch] foo -> other_b/foo
* [new branch] master -> other_b/master
* [new tag] b_baz -> b_baz
* [new tag] b_foo -> b_foo
* [new tag] b_master -> b_master
ok 1 - setup
expecting success:
git checkout -B master &&
test_might_fail git branch -D xyzzy &&
test_must_fail git checkout xyzzy &&
status_uno_is_clean &&
test_must_fail git rev-parse --verify refs/heads/xyzzy &&
test_branch master
Reset branch 'master'
error: branch 'xyzzy' not found.
error: pathspec 'xyzzy' did not match any file(s) known to git
fatal: Needed a single revision
ok 2 - checkout of non-existing branch fails
expecting success:
git checkout -B master &&
test_might_fail git branch -D foo &&
test_must_fail git checkout foo &&
status_uno_is_clean &&
test_must_fail git rev-parse --verify refs/heads/foo &&
test_branch master
Reset branch 'master'
error: branch 'foo' not found.
error: pathspec 'foo' did not match any file(s) known to git
hint: 'foo' matched more than one remote tracking branch.
hint: We found 2 remotes with a reference that matched. So we fell back
hint: on trying to resolve the argument as a path, but failed there too!
hint:
hint: If you meant to check out a remote tracking branch on, e.g. 'origin',
hint: you can do so by fully qualifying the name with the --track option:
hint:
hint: git checkout --track origin/<name>
hint:
hint: If you'd like to always have checkouts of an ambiguous <name> prefer
hint: one remote, e.g. the 'origin' remote, consider setting
hint: checkout.defaultRemote=origin in your config.
fatal: Needed a single revision
ok 3 - checkout of branch from multiple remotes fails #1
expecting success:
git checkout -B master &&
test_might_fail git branch -D foo &&
test_must_fail git checkout foo 2>stderr &&
test_branch master &&
status_uno_is_clean &&
test_i18ngrep "^hint: " stderr &&
test_must_fail git -c advice.checkoutAmbiguousRemoteBranchName=false \
checkout foo 2>stderr &&
test_branch master &&
status_uno_is_clean &&
test_i18ngrep ! "^hint: " stderr
Reset branch 'master'
error: branch 'foo' not found.
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
hint: 'foo' matched more than one remote tracking branch.
hint: We found 2 remotes with a reference that matched. So we fell back
hint: on trying to resolve the argument as a path, but failed there too!
hint:
hint: If you meant to check out a remote tracking branch on, e.g. 'origin',
hint: you can do so by fully qualifying the name with the --track option:
hint:
hint: git checkout --track origin/<name>
hint:
hint: If you'd like to always have checkouts of an ambiguous <name> prefer
hint: one remote, e.g. the 'origin' remote, consider setting
hint: checkout.defaultRemote=origin in your config.
ok 4 - checkout of branch from multiple remotes fails with advice
expecting success:
git checkout -B master &&
test_might_fail git branch -D foo &&
git checkout -p foo 2>stderr &&
test_i18ngrep ! "^hint: " stderr &&
status_uno_is_clean
Reset branch 'master'
error: branch 'foo' not found.
ok 5 - checkout -p with multiple remotes does not print advice
expecting success:
git checkout -B master &&
status_uno_is_clean &&
test_might_fail git branch -D foo &&
git -c checkout.defaultRemote=repo_a checkout foo &&
status_uno_is_clean &&
test_branch foo &&
test_cmp_rev remotes/repo_a/foo HEAD &&
test_branch_upstream foo repo_a foo
Reset branch 'master'
error: branch 'foo' not found.
Switched to a new branch 'foo'
Branch 'foo' set up to track remote branch 'foo' from 'repo_a'.
ok 6 - checkout of branch from multiple remotes succeeds with checkout.defaultRemote #1
expecting success:
git checkout -B master &&
test_might_fail git branch -D bar &&
git checkout bar &&
status_uno_is_clean &&
test_branch bar &&
test_cmp_rev remotes/repo_a/bar HEAD &&
test_branch_upstream bar repo_a bar
Switched to and reset branch 'master'
error: branch 'bar' not found.
Switched to a new branch 'bar'
Branch 'bar' set up to track remote branch 'bar' from 'repo_a'.
ok 7 - checkout of branch from a single remote succeeds #1
expecting success:
git checkout -B master &&
test_might_fail git branch -D baz &&
git checkout baz &&
status_uno_is_clean &&
test_branch baz &&
test_cmp_rev remotes/other_b/baz HEAD &&
test_branch_upstream baz repo_b baz
Switched to and reset branch 'master'
error: branch 'baz' not found.
Switched to a new branch 'baz'
Branch 'baz' set up to track remote branch 'baz' from 'repo_b'.
ok 8 - checkout of branch from a single remote succeeds #2
expecting success:
git checkout -B master &&
status_uno_is_clean &&
test_might_fail git branch -D bar &&
test_must_fail git checkout --no-guess bar &&
test_must_fail git rev-parse --verify refs/heads/bar &&
test_branch master
Switched to and reset branch 'master'
Deleted branch bar (was 1901e7e).
error: pathspec 'bar' did not match any file(s) known to git
fatal: Needed a single revision
ok 9 - --no-guess suppresses branch auto-vivification
expecting success:
git checkout -B master &&
status_uno_is_clean &&
git init repo_c &&
(
cd repo_c &&
test_commit c_master &&
git checkout -b bar &&
test_commit c_bar &&
git checkout -b spam &&
test_commit c_spam
) &&
git init repo_d &&
(
cd repo_d &&
test_commit d_master &&
git checkout -b baz &&
test_commit d_baz &&
git checkout -b eggs &&
test_commit d_eggs
) &&
git remote add repo_c repo_c &&
git config remote.repo_c.fetch \
"+refs/heads/*:refs/remotes/extra_dir/repo_c/extra_dir/*" &&
git remote add repo_d repo_d &&
git config remote.repo_d.fetch \
"+refs/heads/*:refs/repo_d/*" &&
git fetch --all
Reset branch 'master'
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2024-checkout-dwim/repo_c/.git/
[master (root-commit) dc015ba] c_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c_master.t
Switched to a new branch 'bar'
[bar a433ad7] c_bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c_bar.t
Switched to a new branch 'spam'
[spam 1702b85] c_spam
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c_spam.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2024-checkout-dwim/repo_d/.git/
[master (root-commit) f130d8f] d_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 d_master.t
Switched to a new branch 'baz'
[baz aff1e77] d_baz
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 d_baz.t
Switched to a new branch 'eggs'
[eggs fea4556] d_eggs
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 d_eggs.t
Fetching repo_a
Fetching repo_b
Fetching repo_c
warning: no common commits
From repo_c
* [new branch] bar -> extra_dir/repo_c/extra_dir/bar
* [new branch] master -> extra_dir/repo_c/extra_dir/master
* [new branch] spam -> extra_dir/repo_c/extra_dir/spam
* [new tag] c_bar -> c_bar
* [new tag] c_master -> c_master
* [new tag] c_spam -> c_spam
Fetching repo_d
warning: no common commits
From repo_d
* [new branch] baz -> refs/repo_d/baz
* [new branch] eggs -> refs/repo_d/eggs
* [new branch] master -> refs/repo_d/master
* [new tag] d_baz -> d_baz
* [new tag] d_eggs -> d_eggs
* [new tag] d_master -> d_master
ok 10 - setup more remotes with unconventional refspecs
expecting success:
git checkout -B master &&
status_uno_is_clean &&
test_might_fail git branch -D bar &&
test_must_fail git checkout bar &&
status_uno_is_clean &&
test_must_fail git rev-parse --verify refs/heads/bar &&
test_branch master
Reset branch 'master'
error: branch 'bar' not found.
error: pathspec 'bar' did not match any file(s) known to git
hint: 'bar' matched more than one remote tracking branch.
hint: We found 2 remotes with a reference that matched. So we fell back
hint: on trying to resolve the argument as a path, but failed there too!
hint:
hint: If you meant to check out a remote tracking branch on, e.g. 'origin',
hint: you can do so by fully qualifying the name with the --track option:
hint:
hint: git checkout --track origin/<name>
hint:
hint: If you'd like to always have checkouts of an ambiguous <name> prefer
hint: one remote, e.g. the 'origin' remote, consider setting
hint: checkout.defaultRemote=origin in your config.
fatal: Needed a single revision
ok 11 - checkout of branch from multiple remotes fails #2
expecting success:
git checkout -B master &&
status_uno_is_clean &&
test_might_fail git branch -D baz &&
test_must_fail git checkout baz &&
status_uno_is_clean &&
test_must_fail git rev-parse --verify refs/heads/baz &&
test_branch master
Reset branch 'master'
Deleted branch baz (was a4f4a16).
error: pathspec 'baz' did not match any file(s) known to git
hint: 'baz' matched more than one remote tracking branch.
hint: We found 2 remotes with a reference that matched. So we fell back
hint: on trying to resolve the argument as a path, but failed there too!
hint:
hint: If you meant to check out a remote tracking branch on, e.g. 'origin',
hint: you can do so by fully qualifying the name with the --track option:
hint:
hint: git checkout --track origin/<name>
hint:
hint: If you'd like to always have checkouts of an ambiguous <name> prefer
hint: one remote, e.g. the 'origin' remote, consider setting
hint: checkout.defaultRemote=origin in your config.
fatal: Needed a single revision
ok 12 - checkout of branch from multiple remotes fails #3
expecting success:
git checkout -B master &&
status_uno_is_clean &&
test_might_fail git branch -D spam &&
git checkout spam &&
status_uno_is_clean &&
test_branch spam &&
test_cmp_rev refs/remotes/extra_dir/repo_c/extra_dir/spam HEAD &&
test_branch_upstream spam repo_c spam
Reset branch 'master'
error: branch 'spam' not found.
Switched to a new branch 'spam'
Branch 'spam' set up to track remote branch 'spam' from 'repo_c'.
ok 13 - checkout of branch from a single remote succeeds #3
expecting success:
git checkout -B master &&
status_uno_is_clean &&
test_might_fail git branch -D eggs &&
git checkout eggs &&
status_uno_is_clean &&
test_branch eggs &&
test_cmp_rev refs/repo_d/eggs HEAD &&
test_branch_upstream eggs repo_d eggs
Switched to and reset branch 'master'
error: branch 'eggs' not found.
Switched to a new branch 'eggs'
Branch 'eggs' set up to track remote branch 'eggs' from 'repo_d'.
ok 14 - checkout of branch from a single remote succeeds #4
expecting success:
git checkout -B master &&
status_uno_is_clean &&
test_might_fail git branch -D spam &&
>spam &&
test_must_fail git checkout spam &&
status_uno_is_clean &&
test_must_fail git rev-parse --verify refs/heads/spam &&
test_branch master
Switched to and reset branch 'master'
Deleted branch spam (was 1702b85).
fatal: 'spam' could be both a local file and a tracking branch.
Please use -- (and optionally --no-guess) to disambiguate
fatal: Needed a single revision
ok 15 - checkout of branch with a file having the same name fails
expecting success:
git checkout -B master &&
status_uno_is_clean &&
test_might_fail git branch -D spam &&
>spam &&
mkdir sub &&
mv spam sub/spam &&
test_must_fail git -C sub checkout spam &&
status_uno_is_clean &&
test_must_fail git rev-parse --verify refs/heads/spam &&
test_branch master
Reset branch 'master'
error: branch 'spam' not found.
fatal: 'spam' could be both a local file and a tracking branch.
Please use -- (and optionally --no-guess) to disambiguate
fatal: Needed a single revision
ok 16 - checkout of branch with a file in subdir having the same name fails
expecting success:
git checkout -B master &&
status_uno_is_clean &&
test_might_fail git branch -D spam &&
>spam &&
git checkout spam -- &&
status_uno_is_clean &&
test_branch spam &&
test_cmp_rev refs/remotes/extra_dir/repo_c/extra_dir/spam HEAD &&
test_branch_upstream spam repo_c spam
Reset branch 'master'
error: branch 'spam' not found.
Switched to a new branch 'spam'
Branch 'spam' set up to track remote branch 'spam' from 'repo_c'.
ok 17 - checkout <branch> -- succeeds, even if a file with the same name exists
expecting success:
git checkout master &&
status_uno_is_clean &&
git branch strict &&
git branch loose &&
git commit --allow-empty -m "a bit more" &&
test_config branch.strict.remote . &&
test_config branch.loose.remote . &&
test_config branch.strict.merge refs/heads/master &&
test_config branch.loose.merge master &&
git checkout strict | sed -e "s/strict/BRANCHNAME/g" >expect &&
status_uno_is_clean &&
git checkout loose | sed -e "s/loose/BRANCHNAME/g" >actual &&
status_uno_is_clean &&
test_cmp expect actual
Switched to branch 'master'
[master b3a488e] a bit more
Author: A U Thor <author@example.com>
Switched to branch 'strict'
Switched to branch 'loose'
ok 18 - loosely defined local base branch is reported correctly
expecting success:
git remote add foo file://non-existent-place &&
git update-ref refs/remotes/foo/dwim-arg HEAD &&
echo foo >dwim-arg &&
git add dwim-arg &&
echo bar >dwim-arg &&
test_must_fail git checkout dwim-arg &&
test_must_fail git rev-parse refs/heads/dwim-arg -- &&
grep bar dwim-arg
fatal: 'dwim-arg' could be both a local file and a tracking branch.
Please use -- (and optionally --no-guess) to disambiguate
fatal: bad revision 'refs/heads/dwim-arg'
bar
ok 19 - reject when arg could be part of dwim branch
expecting success:
git update-ref refs/remotes/foo/dwim-arg1 HEAD &&
echo foo >dwim-arg1 &&
git add dwim-arg1 &&
echo bar >dwim-arg1 &&
git checkout -- dwim-arg1 &&
test_must_fail git rev-parse refs/heads/dwim-arg1 -- &&
grep foo dwim-arg1
fatal: bad revision 'refs/heads/dwim-arg1'
foo
ok 20 - disambiguate dwim branch and checkout path (1)
expecting success:
git update-ref refs/remotes/foo/dwim-arg2 HEAD &&
echo foo >dwim-arg2 &&
git add dwim-arg2 &&
echo bar >dwim-arg2 &&
git checkout dwim-arg2 -- &&
git rev-parse refs/heads/dwim-arg2 -- &&
grep bar dwim-arg2
Switched to a new branch 'dwim-arg2'
A dwim-arg
A dwim-arg1
A dwim-arg2
Branch 'dwim-arg2' set up to track remote branch 'dwim-arg2' from 'foo'.
fea4556a03c9ebfd8846a6e5b9d34170eeb7706d
--
bar
ok 21 - disambiguate dwim branch and checkout path (2)
# passed all 21 test(s)
1..21
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t1701-racy-split-index.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t1701-racy-split-index/.git/
expecting success:
# Only split the index when the test explicitly says so.
sane_unset GIT_TEST_SPLIT_INDEX &&
git config splitIndex.maxPercentChange 100 &&
echo "cached content" >racy-file &&
git add racy-file &&
git commit -m initial &&
echo something >other-file &&
# No raciness with this file.
test-tool chmtime =-20 other-file &&
echo "+cached content" >expect
[master (root-commit) dc5c653] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 racy-file
ok 1 - setup
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second (so both writes to racy-file result in the same
# mtime) to create the interesting racy situation.
echo "cached content" >racy-file &&
# Update and split the index. The cache entry of
# racy-file will be stored only in the shared index.
git update-index --split-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Subsequent git commands should notice that racy-file
# and the split index have the same mtime, and check
# the content of the file to see if it is actually
# clean.
check_cached_diff
ok 2 - split the index while adding a racily clean file #0
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second (so both writes to racy-file result in the same
# mtime) to create the interesting racy situation.
echo "cached content" >racy-file &&
# Update and split the index. The cache entry of
# racy-file will be stored only in the shared index.
git update-index --split-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Subsequent git commands should notice that racy-file
# and the split index have the same mtime, and check
# the content of the file to see if it is actually
# clean.
check_cached_diff
ok 3 - split the index while adding a racily clean file #1
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second (so both writes to racy-file result in the same
# mtime) to create the interesting racy situation.
echo "cached content" >racy-file &&
# Update and split the index. The cache entry of
# racy-file will be stored only in the shared index.
git update-index --split-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Subsequent git commands should notice that racy-file
# and the split index have the same mtime, and check
# the content of the file to see if it is actually
# clean.
check_cached_diff
ok 4 - split the index while adding a racily clean file #2
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second (so both writes to racy-file result in the same
# mtime) to create the interesting racy situation.
echo "cached content" >racy-file &&
# Update and split the index. The cache entry of
# racy-file will be stored only in the shared index.
git update-index --split-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Subsequent git commands should notice that racy-file
# and the split index have the same mtime, and check
# the content of the file to see if it is actually
# clean.
check_cached_diff
ok 5 - split the index while adding a racily clean file #3
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second (so both writes to racy-file result in the same
# mtime) to create the interesting racy situation.
echo "cached content" >racy-file &&
# Update and split the index. The cache entry of
# racy-file will be stored only in the shared index.
git update-index --split-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Subsequent git commands should notice that racy-file
# and the split index have the same mtime, and check
# the content of the file to see if it is actually
# clean.
check_cached_diff
ok 6 - split the index while adding a racily clean file #4
expecting success:
rm -f .git/index .git/sharedindex.* &&
git update-index --split-index &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update the split index. The cache entry of racy-file
# will be stored only in the split index.
git update-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Subsequent git commands should notice that racy-file
# and the split index have the same mtime, and check
# the content of the file to see if it is actually
# clean.
check_cached_diff
ok 7 - add a racily clean file to an already split index #0
expecting success:
rm -f .git/index .git/sharedindex.* &&
git update-index --split-index &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update the split index. The cache entry of racy-file
# will be stored only in the split index.
git update-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Subsequent git commands should notice that racy-file
# and the split index have the same mtime, and check
# the content of the file to see if it is actually
# clean.
check_cached_diff
ok 8 - add a racily clean file to an already split index #1
expecting success:
rm -f .git/index .git/sharedindex.* &&
git update-index --split-index &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update the split index. The cache entry of racy-file
# will be stored only in the split index.
git update-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Subsequent git commands should notice that racy-file
# and the split index have the same mtime, and check
# the content of the file to see if it is actually
# clean.
check_cached_diff
ok 9 - add a racily clean file to an already split index #2
expecting success:
rm -f .git/index .git/sharedindex.* &&
git update-index --split-index &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update the split index. The cache entry of racy-file
# will be stored only in the split index.
git update-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Subsequent git commands should notice that racy-file
# and the split index have the same mtime, and check
# the content of the file to see if it is actually
# clean.
check_cached_diff
ok 10 - add a racily clean file to an already split index #3
expecting success:
rm -f .git/index .git/sharedindex.* &&
git update-index --split-index &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update the split index. The cache entry of racy-file
# will be stored only in the split index.
git update-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Subsequent git commands should notice that racy-file
# and the split index have the same mtime, and check
# the content of the file to see if it is actually
# clean.
check_cached_diff
ok 11 - add a racily clean file to an already split index #4
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
git update-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update and split the index when the index contains
# the racily clean cache entry of racy-file.
# A corresponding replacement cache entry with smudged
# stat data should be added to the new split index.
git update-index --split-index --add other-file &&
# Subsequent git commands should notice the smudged
# stat data in the replacement cache entry and that it
# doesnt match with the file the worktree.
check_cached_diff
ok 12 - split the index when the index contains a racily clean cache entry #0
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
git update-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update and split the index when the index contains
# the racily clean cache entry of racy-file.
# A corresponding replacement cache entry with smudged
# stat data should be added to the new split index.
git update-index --split-index --add other-file &&
# Subsequent git commands should notice the smudged
# stat data in the replacement cache entry and that it
# doesnt match with the file the worktree.
check_cached_diff
ok 13 - split the index when the index contains a racily clean cache entry #1
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
git update-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update and split the index when the index contains
# the racily clean cache entry of racy-file.
# A corresponding replacement cache entry with smudged
# stat data should be added to the new split index.
git update-index --split-index --add other-file &&
# Subsequent git commands should notice the smudged
# stat data in the replacement cache entry and that it
# doesnt match with the file the worktree.
check_cached_diff
ok 14 - split the index when the index contains a racily clean cache entry #2
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
git update-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update and split the index when the index contains
# the racily clean cache entry of racy-file.
# A corresponding replacement cache entry with smudged
# stat data should be added to the new split index.
git update-index --split-index --add other-file &&
# Subsequent git commands should notice the smudged
# stat data in the replacement cache entry and that it
# doesnt match with the file the worktree.
check_cached_diff
ok 15 - split the index when the index contains a racily clean cache entry #3
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
git update-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update and split the index when the index contains
# the racily clean cache entry of racy-file.
# A corresponding replacement cache entry with smudged
# stat data should be added to the new split index.
git update-index --split-index --add other-file &&
# Subsequent git commands should notice the smudged
# stat data in the replacement cache entry and that it
# doesnt match with the file the worktree.
check_cached_diff
ok 16 - split the index when the index contains a racily clean cache entry #4
expecting success:
rm -f .git/index .git/sharedindex.* &&
git update-index --split-index &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update the split index. The cache entry of racy-file
# will be stored only in the split index.
git update-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update the split index when the racily clean cache
# entry of racy-file is only stored in the split index.
# An updated cache entry with smudged stat data should
# be added to the new split index.
git update-index --add other-file &&
# Subsequent git commands should notice the smudged
# stat data.
check_cached_diff
ok 17 - update the split index when it contains a new racily clean cache entry #0
expecting success:
rm -f .git/index .git/sharedindex.* &&
git update-index --split-index &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update the split index. The cache entry of racy-file
# will be stored only in the split index.
git update-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update the split index when the racily clean cache
# entry of racy-file is only stored in the split index.
# An updated cache entry with smudged stat data should
# be added to the new split index.
git update-index --add other-file &&
# Subsequent git commands should notice the smudged
# stat data.
check_cached_diff
ok 18 - update the split index when it contains a new racily clean cache entry #1
expecting success:
rm -f .git/index .git/sharedindex.* &&
git update-index --split-index &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update the split index. The cache entry of racy-file
# will be stored only in the split index.
git update-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update the split index when the racily clean cache
# entry of racy-file is only stored in the split index.
# An updated cache entry with smudged stat data should
# be added to the new split index.
git update-index --add other-file &&
# Subsequent git commands should notice the smudged
# stat data.
check_cached_diff
ok 19 - update the split index when it contains a new racily clean cache entry #2
expecting success:
rm -f .git/index .git/sharedindex.* &&
git update-index --split-index &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update the split index. The cache entry of racy-file
# will be stored only in the split index.
git update-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update the split index when the racily clean cache
# entry of racy-file is only stored in the split index.
# An updated cache entry with smudged stat data should
# be added to the new split index.
git update-index --add other-file &&
# Subsequent git commands should notice the smudged
# stat data.
check_cached_diff
ok 20 - update the split index when it contains a new racily clean cache entry #3
expecting success:
rm -f .git/index .git/sharedindex.* &&
git update-index --split-index &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update the split index. The cache entry of racy-file
# will be stored only in the split index.
git update-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update the split index when the racily clean cache
# entry of racy-file is only stored in the split index.
# An updated cache entry with smudged stat data should
# be added to the new split index.
git update-index --add other-file &&
# Subsequent git commands should notice the smudged
# stat data.
check_cached_diff
ok 21 - update the split index when it contains a new racily clean cache entry #4
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update and split the index. The cache entry of
# racy-file will be stored only in the shared index.
git update-index --split-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update the split index when the racily clean cache
# entry of racy-file is only stored in the shared index.
# A corresponding replacement cache entry with smudged
# stat data should be added to the new split index.
git update-index --add other-file &&
# Subsequent git commands should notice the smudged
# stat data.
check_cached_diff
ok 22 - update the split index when a racily clean cache entry is stored only in the shared index #0
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update and split the index. The cache entry of
# racy-file will be stored only in the shared index.
git update-index --split-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update the split index when the racily clean cache
# entry of racy-file is only stored in the shared index.
# A corresponding replacement cache entry with smudged
# stat data should be added to the new split index.
git update-index --add other-file &&
# Subsequent git commands should notice the smudged
# stat data.
check_cached_diff
ok 23 - update the split index when a racily clean cache entry is stored only in the shared index #1
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update and split the index. The cache entry of
# racy-file will be stored only in the shared index.
git update-index --split-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update the split index when the racily clean cache
# entry of racy-file is only stored in the shared index.
# A corresponding replacement cache entry with smudged
# stat data should be added to the new split index.
git update-index --add other-file &&
# Subsequent git commands should notice the smudged
# stat data.
check_cached_diff
ok 24 - update the split index when a racily clean cache entry is stored only in the shared index #2
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update and split the index. The cache entry of
# racy-file will be stored only in the shared index.
git update-index --split-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update the split index when the racily clean cache
# entry of racy-file is only stored in the shared index.
# A corresponding replacement cache entry with smudged
# stat data should be added to the new split index.
git update-index --add other-file &&
# Subsequent git commands should notice the smudged
# stat data.
check_cached_diff
ok 25 - update the split index when a racily clean cache entry is stored only in the shared index #3
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update and split the index. The cache entry of
# racy-file will be stored only in the shared index.
git update-index --split-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update the split index when the racily clean cache
# entry of racy-file is only stored in the shared index.
# A corresponding replacement cache entry with smudged
# stat data should be added to the new split index.
git update-index --add other-file &&
# Subsequent git commands should notice the smudged
# stat data.
check_cached_diff
ok 26 - update the split index when a racily clean cache entry is stored only in the shared index #4
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update and split the index. The cache entry of
# racy-file will be stored only in the shared index.
git update-index --split-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update the split index after unpack_trees() copied the
# racily clean cache entry of racy-file from the shared
# index. A corresponding replacement cache entry
# with smudged stat data should be added to the new
# split index.
git read-tree -m HEAD &&
# Subsequent git commands should notice the smudged
# stat data.
check_cached_diff
ok 27 - update the split index after unpack trees() copied a racily clean cache entry from the shared index #0
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update and split the index. The cache entry of
# racy-file will be stored only in the shared index.
git update-index --split-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update the split index after unpack_trees() copied the
# racily clean cache entry of racy-file from the shared
# index. A corresponding replacement cache entry
# with smudged stat data should be added to the new
# split index.
git read-tree -m HEAD &&
# Subsequent git commands should notice the smudged
# stat data.
check_cached_diff
ok 28 - update the split index after unpack trees() copied a racily clean cache entry from the shared index #1
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update and split the index. The cache entry of
# racy-file will be stored only in the shared index.
git update-index --split-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update the split index after unpack_trees() copied the
# racily clean cache entry of racy-file from the shared
# index. A corresponding replacement cache entry
# with smudged stat data should be added to the new
# split index.
git read-tree -m HEAD &&
# Subsequent git commands should notice the smudged
# stat data.
check_cached_diff
ok 29 - update the split index after unpack trees() copied a racily clean cache entry from the shared index #2
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update and split the index. The cache entry of
# racy-file will be stored only in the shared index.
git update-index --split-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update the split index after unpack_trees() copied the
# racily clean cache entry of racy-file from the shared
# index. A corresponding replacement cache entry
# with smudged stat data should be added to the new
# split index.
git read-tree -m HEAD &&
# Subsequent git commands should notice the smudged
# stat data.
check_cached_diff
ok 30 - update the split index after unpack trees() copied a racily clean cache entry from the shared index #3
expecting success:
rm -f .git/index .git/sharedindex.* &&
# The next three commands must be run within the same
# second.
echo "cached content" >racy-file &&
# Update and split the index. The cache entry of
# racy-file will be stored only in the shared index.
git update-index --split-index --add racy-file &&
# File size must stay the same.
echo "dirty worktree" >racy-file &&
# Now wait a bit to ensure that the split index written
# below will get a more recent mtime than racy-file.
sleep 1 &&
# Update the split index after unpack_trees() copied the
# racily clean cache entry of racy-file from the shared
# index. A corresponding replacement cache entry
# with smudged stat data should be added to the new
# split index.
git read-tree -m HEAD &&
# Subsequent git commands should notice the smudged
# stat data.
check_cached_diff
ok 31 - update the split index after unpack trees() copied a racily clean cache entry from the shared index #4
# passed all 31 test(s)
1..31
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2060-switch.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2060-switch/.git/
expecting success:
test_commit first &&
git branch first-branch &&
test_commit second &&
test_commit third &&
git remote add origin nohost:/nopath &&
git update-ref refs/remotes/origin/foo first-branch
[master (root-commit) 50e526b] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 first.t
[master d662100] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 second.t
[master cd7036d] third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 third.t
ok 1 - setup
expecting success:
test_must_fail git switch
fatal: missing branch or commit argument
ok 2 - switch branch no arguments
expecting success:
git switch first-branch &&
test_path_is_missing second.t
Switched to branch 'first-branch'
ok 3 - switch branch
expecting success:
test_when_finished git switch master &&
test_must_fail git switch master^{commit} &&
git switch --detach master^{commit} &&
test_must_fail git symbolic-ref HEAD
fatal: a branch is expected, got commit 'master^{commit}'
HEAD is now at cd7036d third
fatal: ref HEAD is not a symbolic ref
Switched to branch 'master'
ok 4 - switch and detach
expecting success:
test_when_finished git switch master &&
git switch master &&
git switch --detach &&
test_must_fail git symbolic-ref HEAD
Already on 'master'
HEAD is now at cd7036d third
fatal: ref HEAD is not a symbolic ref
Switched to branch 'master'
ok 5 - switch and detach current branch
expecting success:
test_when_finished git switch master &&
git switch -c temp master^ &&
test_cmp_rev master^ refs/heads/temp &&
echo refs/heads/temp >expected-branch &&
git symbolic-ref HEAD >actual-branch &&
test_cmp expected-branch actual-branch
Switched to a new branch 'temp'
Switched to branch 'master'
ok 6 - switch and create branch
expecting success:
test_when_finished git switch master &&
git switch --detach master &&
test_must_fail git switch -c temp &&
git switch -C temp &&
test_cmp_rev master refs/heads/temp &&
echo refs/heads/temp >expected-branch &&
git symbolic-ref HEAD >actual-branch &&
test_cmp expected-branch actual-branch
HEAD is now at cd7036d third
fatal: A branch named 'temp' already exists.
Switched to and reset branch 'temp'
Switched to branch 'master'
ok 7 - force create branch from HEAD
expecting success:
test_when_finished git switch master &&
test_must_fail git switch --orphan new-orphan HEAD &&
git switch --orphan new-orphan &&
test_commit orphan &&
git cat-file commit refs/heads/new-orphan >commit &&
! grep ^parent commit &&
git ls-files >tracked-files &&
echo orphan.t >expected &&
test_cmp expected tracked-files
fatal: '--orphan' cannot take <start-point>
Switched to a new branch 'new-orphan'
[new-orphan (root-commit) 11bb70e] orphan
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 orphan.t
Switched to branch 'master'
ok 8 - new orphan branch from empty
expecting success:
test_when_finished git switch master &&
: >first-branch &&
git switch first-branch &&
echo refs/heads/first-branch >expected &&
git symbolic-ref HEAD >actual &&
test_cmp expected actual
Switched to branch 'first-branch'
Switched to branch 'master'
ok 9 - switching ignores file of same branch name
expecting success:
test_when_finished git switch master &&
test_must_fail git switch --no-guess foo &&
git switch foo &&
echo refs/heads/foo >expected &&
git symbolic-ref HEAD >actual &&
test_cmp expected actual
fatal: invalid reference: foo
Switched to a new branch 'foo'
Branch 'foo' set up to track remote branch 'foo' from 'origin'.
Switched to branch 'master'
ok 10 - guess and create branch
expecting success:
test_when_finished rm -f .git/MERGE_HEAD &&
# fake a merge-in-progress
cp .git/HEAD .git/MERGE_HEAD &&
test_must_fail git switch -d @^
fatal: cannot switch branch while merging
Consider "git merge --quit" or "git worktree add".
ok 11 - not switching when something is in progress
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2100-update-cache-badpath.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2100-update-cache-badpath/.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
)
prerequisite SYMLINKS ok
expecting success: git update-index --add -- path0 path1 path2/file2 path3/file3
ok 1 - git update-index --add to add various paths.
expecting success: test_must_fail git update-index --add -- path0/file0
error: 'path0/file0' appears as both a file and as a directory
error: path0/file0: cannot add to the index - missing --add option?
fatal: Unable to process path path0/file0
ok 2 - git update-index to add conflicting path path0/file0 should fail.
expecting success: test_must_fail git update-index --add -- path1/file1
error: 'path1/file1' appears as both a file and as a directory
error: path1/file1: cannot add to the index - missing --add option?
fatal: Unable to process path path1/file1
ok 3 - git update-index to add conflicting path path1/file1 should fail.
expecting success: test_must_fail git update-index --add -- path2
error: 'path2' appears as both a file and as a directory
error: path2: cannot add to the index - missing --add option?
fatal: Unable to process path path2
ok 4 - git update-index to add conflicting path path2 should fail.
expecting success: test_must_fail git update-index --add -- path3
error: 'path3' appears as both a file and as a directory
error: path3: cannot add to the index - missing --add option?
fatal: Unable to process path path3
ok 5 - git update-index to add conflicting path path3 should fail.
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2070-restore.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2070-restore/.git/
expecting success:
test_commit first &&
echo first-and-a-half >>first.t &&
git add first.t &&
test_commit second &&
echo one >one &&
echo two >two &&
echo untracked >untracked &&
echo ignored >ignored &&
echo /ignored >.gitignore &&
git add one two .gitignore &&
git update-ref refs/heads/one master
[master (root-commit) 50e526b] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 first.t
[master a46c920] second
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 second.t
ok 1 - setup
expecting success:
test_must_fail git restore &&
test_must_fail git restore --source=first
fatal: you must specify path(s) to restore
fatal: you must specify path(s) to restore
ok 2 - restore without pathspec is not ok
expecting success:
cat one >expected &&
echo dirty >>one &&
git restore one &&
test_cmp expected one
ok 3 - restore a file, ignoring branch of same name
expecting success:
test_when_finished git reset --hard &&
git cat-file blob first:./first.t >expected &&
git restore --source=first first.t &&
test_cmp expected first.t &&
git cat-file blob HEAD:./first.t >expected &&
git show :first.t >actual &&
test_cmp expected actual
HEAD is now at a46c920 second
ok 4 - restore a file on worktree from another ref
expecting success:
test_when_finished git reset --hard &&
git cat-file blob first:./first.t >expected &&
git restore --source=first --staged first.t &&
git show :first.t >actual &&
test_cmp expected actual &&
git cat-file blob HEAD:./first.t >expected &&
test_cmp expected first.t
HEAD is now at a46c920 second
ok 5 - restore a file in the index from another ref
expecting success:
test_when_finished git reset --hard &&
git cat-file blob first:./first.t >expected &&
git restore --source=first --staged --worktree first.t &&
git show :first.t >actual &&
test_cmp expected actual &&
test_cmp expected first.t
HEAD is now at a46c920 second
ok 6 - restore a file in both the index and worktree from another ref
expecting success:
test_when_finished git reset --hard &&
git cat-file blob :./first.t >expected &&
echo index-dirty >>first.t &&
git add first.t &&
git restore --staged first.t &&
git cat-file blob :./first.t >actual &&
test_cmp expected actual
HEAD is now at a46c920 second
ok 7 - restore --staged uses HEAD as source
expecting success:
git init unmerged &&
(
cd unmerged &&
echo one >unmerged &&
echo one >common &&
git add unmerged common &&
git commit -m common &&
git switch -c first &&
echo first >unmerged &&
git commit -am first &&
git switch -c second master &&
echo second >unmerged &&
git commit -am second &&
test_must_fail git merge first &&
echo dirty >>common &&
test_must_fail git restore . &&
git restore --ignore-unmerged --quiet . >output 2>&1 &&
git diff common >diff-output &&
test_must_be_empty output &&
test_must_be_empty diff-output
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2070-restore/unmerged/.git/
[master (root-commit) b83edd8] common
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 common
create mode 100644 unmerged
Switched to a new branch 'first'
[first 753ae86] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'second'
[second 06de6fa] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Merging:
06de6fa second
virtual first
found 1 common ancestor:
b83edd8 common
Auto-merging unmerged
CONFLICT (content): Merge conflict in unmerged
Automatic merge failed; fix conflicts and then commit the result.
error: path 'unmerged' is unmerged
ok 8 - restore --ignore-unmerged ignores unmerged entries
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2101-update-index-reupdate.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2101-update-index-reupdate/.git/
expecting success:
echo hello world >file1 &&
echo goodbye people >file2 &&
git update-index --add file1 file2 &&
git ls-files -s >current &&
cat >expected <<-EOF &&
100644 $(git hash-object file1) 0 file1
100644 $(git hash-object file2) 0 file2
EOF
cmp current expected
ok 1 - update-index --add
expecting success:
rm -f file1 &&
echo hello everybody >file2 &&
if git update-index --again
then
echo should have refused to remove file1
exit 1
else
echo happy - failed as expected
fi &&
git ls-files -s >current &&
cmp current expected
error: file1: does not exist and --remove not passed
fatal: Unable to process path file1
happy - failed as expected
ok 2 - update-index --again
expecting success:
git update-index --remove --again &&
git ls-files -s >current &&
cat >expected <<-EOF &&
100644 $(git hash-object file2) 0 file2
EOF
cmp current expected
ok 3 - update-index --remove --again
expecting success: git commit -m initial
[master (root-commit) ad4e936] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
ok 4 - first commit
expecting success:
mkdir -p dir1 &&
echo hello world >dir1/file3 &&
echo goodbye people >file2 &&
git update-index --add file2 dir1/file3 &&
echo hello everybody >file2 &&
echo happy >dir1/file3 &&
git update-index --again &&
git ls-files -s >current &&
cat >expected <<-EOF &&
100644 $(git hash-object dir1/file3) 0 dir1/file3
100644 $(git hash-object file2) 0 file2
EOF
cmp current expected
ok 5 - update-index again
expecting success:
echo not so happy >file2 &&
(cd dir1 &&
cat ../file2 >file3 &&
git update-index --again
) &&
git ls-files -s >current &&
cat >expected <<-EOF &&
100644 $(git hash-object dir1/file3) 0 dir1/file3
100644 $file2 0 file2
EOF
test_cmp expected current
ok 6 - update-index --update from subdir
expecting success:
echo very happy >file2 &&
cat file2 >dir1/file3 &&
git update-index --again dir1/ &&
git ls-files -s >current &&
cat >expected <<-EOF &&
100644 $(git hash-object dir1/file3) 0 dir1/file3
100644 $file2 0 file2
EOF
cmp current expected
ok 7 - update-index --update with pathspec
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2102-update-index-symlinks.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2102-update-index-symlinks/.git/
expecting success:
git config core.symlinks false &&
l=$(printf file | git hash-object -t blob -w --stdin) &&
echo "120000 $l symlink" | git update-index --index-info
ok 1 - preparation
expecting success:
printf new-file > symlink &&
git update-index symlink
ok 2 - modify the symbolic link
expecting success:
case "$(git ls-files --stage --cached symlink)" in
120000" "*symlink) echo pass;;
*) echo fail; git ls-files --stage --cached symlink; (exit 1);;
esac
pass
ok 3 - the index entry must still be a symbolic link
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2104-update-index-skip-worktree.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2104-update-index-skip-worktree/.git/
expecting success:
mkdir sub &&
touch ./1 ./2 sub/1 sub/2 &&
git add 1 2 sub/1 sub/2 &&
git ls-files -t | test_cmp expect.full -
ok 1 - setup
expecting success:
test "$(test-tool index-version < .git/index)" = 2
ok 2 - index is at version 2
expecting success:
git update-index --skip-worktree 1 sub/1 &&
git ls-files -t | test_cmp expect.skip -
ok 3 - update-index --skip-worktree
expecting success:
test "$(test-tool index-version < .git/index)" = 3
ok 4 - index is at version 3 after having some skip-worktree entries
expecting success:
git ls-files -t | test_cmp expect.skip -
ok 5 - ls-files -t
expecting success:
git update-index --no-skip-worktree 1 sub/1 &&
git ls-files -t | test_cmp expect.full -
ok 6 - update-index --no-skip-worktree
expecting success:
test "$(test-tool index-version < .git/index)" = 2
ok 7 - index version is back to 2 when there is no skip-worktree entry
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2103-update-index-ignore-missing.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2103-update-index-ignore-missing/.git/
expecting success:
>one &&
>two &&
>three &&
# need --add when adding
test_must_fail git update-index one &&
test -z "$(git ls-files)" &&
git update-index --add one &&
test zone = "z$(git ls-files)" &&
# update-index is atomic
echo 1 >one &&
test_must_fail git update-index one two &&
echo "M one" >expect &&
git diff-files --name-status >actual &&
test_cmp expect actual &&
git update-index --add one two three &&
for i in one three two; do echo $i; done >expect &&
git ls-files >actual &&
test_cmp expect actual &&
test_tick &&
(
test_create_repo xyzzy &&
cd xyzzy &&
>file &&
git add file &&
git commit -m "sub initial"
) &&
git add xyzzy &&
test_tick &&
git commit -m initial &&
git tag initial
error: one: cannot add to the index - missing --add option?
fatal: Unable to process path one
error: two: cannot add to the index - missing --add option?
fatal: Unable to process path two
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2103-update-index-ignore-missing/xyzzy/.git/
[master (root-commit) a40d181] sub initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
warning: adding embedded git repository: xyzzy
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> xyzzy
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached xyzzy
hint:
hint: See "git help submodule" for more information.
[master (root-commit) ce14d7f] initial
Author: A U Thor <author@example.com>
4 files changed, 2 insertions(+)
create mode 100644 one
create mode 100644 three
create mode 100644 two
create mode 160000 xyzzy
ok 1 - basics
expecting success:
git reset --hard initial &&
echo 2 >one &&
test_must_fail git update-index --refresh &&
echo 1 >one &&
git update-index --refresh &&
rm -f two &&
test_must_fail git update-index --refresh &&
git update-index --ignore-missing --refresh
HEAD is now at ce14d7f initial
one: needs update
two: needs update
ok 2 - --ignore-missing --refresh
expecting success:
git reset --hard initial &&
info=$(git ls-files -s one | sed -e "s/ 0 / 1 /") &&
git rm --cached one &&
echo "$info" | git update-index --index-info &&
test_must_fail git update-index --refresh &&
git update-index --unmerged --refresh &&
echo 2 >two &&
test_must_fail git update-index --unmerged --refresh >actual &&
grep two actual &&
! grep one actual &&
! grep three actual
HEAD is now at ce14d7f initial
rm 'one'
one: needs merge
two: needs update
ok 3 - --unmerged --refresh
expecting success:
git reset --hard initial &&
rm -f two &&
test_must_fail git update-index --ignore-submodules --refresh
HEAD is now at ce14d7f initial
two: needs update
ok 4 - --ignore-submodules --refresh (1)
expecting success:
git reset --hard initial &&
test_tick &&
(
cd xyzzy &&
git commit -m "sub second" --allow-empty
) &&
test_must_fail git update-index --refresh &&
test_must_fail git update-index --ignore-missing --refresh &&
git update-index --ignore-submodules --refresh
HEAD is now at ce14d7f initial
[master 66f0d66] sub second
Author: A U Thor <author@example.com>
xyzzy: needs update
xyzzy: needs update
ok 5 - --ignore-submodules --refresh (2)
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2105-update-index-gitfile.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2105-update-index-gitfile/.git/
expecting success:
mkdir sub1 &&
(cd sub1 &&
git init &&
REAL="$(pwd)/.real" &&
mv .git "$REAL" &&
echo "gitdir: $REAL" >.git &&
test_commit first)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2105-update-index-gitfile/sub1/.git/
[master (root-commit) 50e526b] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 first.t
ok 1 - submodule with absolute .git file
expecting success:
git update-index --add -- sub1
ok 2 - add gitlink to absolute .git file
expecting success:
mkdir sub2 &&
(cd sub2 &&
git init &&
mv .git .real &&
echo "gitdir: .real" >.git &&
test_commit first)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2105-update-index-gitfile/sub2/.git/
[master (root-commit) 50e526b] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 first.t
ok 3 - submodule with relative .git file
expecting success:
git update-index --add -- sub2
ok 4 - add gitlink to relative .git file
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2106-update-index-assume-unchanged.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2106-update-index-assume-unchanged/.git/
expecting success: : >file &&
git add file &&
git commit -m initial &&
git branch other &&
echo upstream >file &&
git add file &&
git commit -m upstream
[master (root-commit) a01a2f2] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
[master 6b7ca8b] upstream
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success: git reset --hard &&
git checkout other &&
echo dirt >file &&
git update-index --assume-unchanged file &&
test_must_fail git checkout master
HEAD is now at 6b7ca8b upstream
Switched to branch 'other'
error: Your local changes to the following files would be overwritten by checkout:
file
Please commit your changes or stash them before you switch branches.
Aborting
ok 2 - do not switch branches with dirty file
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2107-update-index-basic.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2107-update-index-basic/.git/
expecting success:
test_must_fail git update-index --nonsense 2>msg &&
cat msg &&
test -s msg
error: unknown option 'nonsense'
usage: git update-index [<options>] [--] [<file>...]
-q continue refresh even when index needs update
--ignore-submodules refresh: ignore submodules
--add do not ignore new files
--replace let files replace directories and vice-versa
--remove notice files missing from worktree
--unmerged refresh even if index contains unmerged entries
--refresh refresh stat information
--really-refresh like --refresh, but ignore assume-unchanged setting
--cacheinfo <mode>,<object>,<path>
add the specified entry to the index
--chmod (+|-)x override the executable bit of the listed files
--assume-unchanged mark files as "not changing"
--no-assume-unchanged
clear assumed-unchanged bit
--skip-worktree mark files as "index-only"
--no-skip-worktree clear skip-worktree bit
--info-only add to index only; do not add content to object database
--force-remove remove named paths even if present in worktree
-z with --stdin: input lines are terminated by null bytes
--stdin read list of paths to be updated from standard input
--index-info add entries from standard input to the index
--unresolve repopulate stages #2 and #3 for the listed paths
-g, --again only update entries that differ from HEAD
--ignore-missing ignore files missing from worktree
--verbose report actions to standard output
--clear-resolve-undo (for porcelains) forget saved unresolved conflicts
--index-version <n> write index in this format
--split-index enable or disable split index
--untracked-cache enable/disable untracked cache
--test-untracked-cache
test if the filesystem supports untracked cache
--force-untracked-cache
enable untracked cache without testing the filesystem
--force-write-index write out the index even if is not flagged as changed
--fsmonitor enable or disable file system monitor
--fsmonitor-valid mark files as fsmonitor valid
--no-fsmonitor-valid clear fsmonitor valid bit
ok 1 - update-index --nonsense fails
expecting success:
test_expect_code 129 git update-index --nonsense 2>err &&
test_i18ngrep "[Uu]sage: git update-index" err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
usage: git update-index [<options>] [--] [<file>...]
ok 2 - update-index --nonsense dumps usage
expecting success:
mkdir broken &&
(
cd broken &&
git init &&
>.git/index &&
test_expect_code 129 git update-index -h >usage 2>&1
) &&
test_i18ngrep "[Uu]sage: git update-index" broken/usage
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2107-update-index-basic/broken/.git/
usage: git update-index [<options>] [--] [<file>...]
ok 3 - update-index -h with corrupt index
expecting success:
test_must_fail git update-index --cacheinfo
error: option 'cacheinfo' expects <mode>,<sha1>,<path>
ok 4 - --cacheinfo complains of missing arguments
expecting success:
echo content >file &&
git add file &&
git rev-parse :file >expect &&
test_must_fail git update-index --cacheinfo 100644 $ZERO_OID file &&
git rev-parse :file >actual &&
test_cmp expect actual
error: cache entry has null sha1: file
fatal: Unable to write new index file
ok 5 - --cacheinfo does not accept blob null sha1
expecting success:
git init submodule &&
(cd submodule && test_commit foo) &&
git add submodule &&
git rev-parse :submodule >expect &&
test_must_fail git update-index --cacheinfo 160000 $ZERO_OID submodule &&
git rev-parse :submodule >actual &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2107-update-index-basic/submodule/.git/
[master (root-commit) ddd63c9] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
warning: adding embedded git repository: submodule
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> submodule
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached submodule
hint:
hint: See "git help submodule" for more information.
error: cache entry has null sha1: submodule
fatal: Unable to write new index file
ok 6 - --cacheinfo does not accept gitlink null sha1
expecting success:
echo content >file &&
git hash-object -w --stdin <file >expect &&
git update-index --add --cacheinfo 100644 "$(cat expect)" file &&
git rev-parse :file >actual &&
test_cmp expect actual &&
git update-index --add --cacheinfo "100644,$(cat expect),elif" &&
git rev-parse :elif >actual &&
test_cmp expect actual
ok 7 - --cacheinfo mode,sha1,path (new syntax)
expecting success:
mkdir cleanup &&
(
cd cleanup &&
mkdir worktree &&
git init repo &&
cd repo &&
git config core.worktree ../../worktree &&
# --refresh triggers late setup_work_tree,
# active_cache_changed is zero, rollback_lock_file fails
git update-index --refresh &&
! test -f .git/index.lock
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2107-update-index-basic/cleanup/repo/.git/
ok 8 - .lock files cleaned up
expecting success:
>A &&
>B &&
git add A B &&
git update-index --chmod=+x A --chmod=-x B &&
cat >expect <<-EOF &&
100755 $EMPTY_BLOB 0 A
100644 $EMPTY_BLOB 0 B
EOF
git ls-files --stage A B >actual &&
test_cmp expect actual
ok 9 - --chmod=+x and chmod=-x in the same argument list
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2200-add-update.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2200-add-update/.git/
expecting success:
echo initial >check &&
echo initial >top &&
echo initial >foo &&
mkdir dir1 dir2 &&
echo initial >dir1/sub1 &&
echo initial >dir1/sub2 &&
echo initial >dir2/sub3 &&
git add check dir1 dir2 top foo &&
test_tick &&
git commit -m initial &&
echo changed >check &&
echo changed >top &&
echo changed >dir2/sub3 &&
rm -f dir1/sub1 &&
echo other >dir2/other
[master (root-commit) ec46c19] initial
Author: A U Thor <author@example.com>
6 files changed, 6 insertions(+)
create mode 100644 check
create mode 100644 dir1/sub1
create mode 100644 dir1/sub2
create mode 100644 dir2/sub3
create mode 100644 foo
create mode 100644 top
ok 1 - setup
expecting success:
git add -u dir1 dir2
ok 2 - update
expecting success:
test "$(git ls-files dir1/sub1)" = ""
ok 3 - update noticed a removal
expecting success:
test "$(git diff-files --name-status dir2/sub3)" = ""
ok 4 - update touched correct path
expecting success:
test "$(git diff-files --name-status check)" = "M check" &&
test "$(git diff-files --name-status top)" = "M top"
ok 5 - update did not touch other tracked files
expecting success:
test "$(git ls-files dir2/other)" = ""
ok 6 - update did not touch untracked files
expecting success:
git ls-files -s |
sed -e "s/ 0 / /" >expect &&
git ls-tree -r $(git write-tree) |
sed -e "s/ blob / /" >current &&
test_cmp expect current
ok 7 - cache tree has not been corrupted
expecting success:
(
cd dir1 &&
echo more >sub2 &&
git add -u sub2
)
ok 8 - update from a subdirectory
expecting success:
test "$(git diff-files --name-status dir1)" = ""
ok 9 - change gets noticed
expecting success:
(
cd dir1 &&
echo even more >>sub2 &&
git --literal-pathspecs add -u &&
echo even more >>sub2 &&
git add -u
) &&
git diff-files --name-only >actual &&
test_must_be_empty actual
ok 10 - non-qualified update in subdir updates from the root
expecting success:
rm foo &&
test_ln_s_add top foo
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 11 - replace a file with a symlink
expecting success:
git add -u &&
test -z "$(git diff-files)"
ok 12 - add everything changed
expecting success:
touch check &&
git add -u &&
test -z "$(git diff-files)"
ok 13 - touch and then add -u
expecting success:
touch check &&
git add check &&
test -z "$(git diff-files)"
ok 14 - touch and then add explicitly
expecting success:
(
echo "add 'check'" &&
echo "remove 'top'"
) >expect &&
before=$(git ls-files -s check top) &&
echo changed >>check &&
rm -f top &&
git add -n -u >actual &&
after=$(git ls-files -s check top) &&
test "$before" = "$after" &&
test_i18ncmp expect actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 15 - add -n -u should not add but just report
expecting success:
git reset --hard &&
one=$(echo 1 | git hash-object -w --stdin) &&
two=$(echo 2 | git hash-object -w --stdin) &&
three=$(echo 3 | git hash-object -w --stdin) &&
{
for path in path1 path2
do
echo "100644 $one 1 $path"
echo "100644 $two 2 $path"
echo "100644 $three 3 $path"
done
echo "100644 $one 1 path3"
echo "100644 $one 1 path4"
echo "100644 $one 3 path5"
echo "100644 $one 3 path6"
} |
git update-index --index-info &&
echo 3 >path1 &&
echo 2 >path3 &&
echo 2 >path5 &&
# Fail to explicitly resolve removed paths with "git add"
test_must_fail git add --no-all path4 &&
test_must_fail git add --no-all path6 &&
# "add -u" should notice removals no matter what stages
# the index entries are in.
git add -u &&
git ls-files -s path1 path2 path3 path4 path5 path6 >actual &&
{
echo "100644 $three 0 path1"
echo "100644 $two 0 path3"
echo "100644 $two 0 path5"
} >expect &&
test_cmp expect actual
HEAD is now at ec46c19 initial
fatal: unable to stat 'path4': No such file or directory
fatal: unable to stat 'path6': No such file or directory
ok 16 - add -u resolves unmerged paths
expecting success:
test_must_fail git add -u non-existent &&
! (git ls-files | grep "non-existent")
fatal: pathspec 'non-existent' did not match any files
ok 17 - "add -u non-existent" should fail
# passed all 17 test(s)
1..17
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2202-add-addremove.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2202-add-addremove/.git/
expecting success:
(
echo .gitignore &&
echo will-remove
) >expect &&
(
echo actual &&
echo expect &&
echo ignored
) >.gitignore &&
git --literal-pathspecs add --all &&
>will-remove &&
git add --all &&
test_tick &&
git commit -m initial &&
git ls-files >actual &&
test_cmp expect actual
[master (root-commit) 50dd5d8] initial
Author: A U Thor <author@example.com>
2 files changed, 3 insertions(+)
create mode 100644 .gitignore
create mode 100644 will-remove
ok 1 - setup
expecting success:
(
echo .gitignore &&
echo not-ignored &&
echo "M .gitignore" &&
echo "A not-ignored" &&
echo "D will-remove"
) >expect &&
>ignored &&
>not-ignored &&
echo modification >>.gitignore &&
rm -f will-remove &&
git add --all &&
git update-index --refresh &&
git ls-files >actual &&
git diff-index --name-status --cached HEAD >>actual &&
test_cmp expect actual
ok 2 - git add --all
expecting success:
git reset --hard &&
echo >will-remove &&
>will-not-be-added &&
git add &&
git diff-index --name-status --cached HEAD >actual &&
test_must_be_empty actual
HEAD is now at 50dd5d8 initial
Nothing specified, nothing added.
Maybe you wanted to say 'git add .'?
ok 3 - Just "git add" is a no-op
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2201-add-update-typechange.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2201-add-update-typechange/.git/
expecting success:
>xyzzy &&
_empty=$(git hash-object --stdin <xyzzy) &&
>yomin &&
>caskly &&
if test_have_prereq SYMLINKS; then
ln -s frotz nitfol &&
T_letter=T
else
printf %s frotz > nitfol &&
T_letter=M
fi &&
mkdir rezrov &&
>rezrov/bozbar &&
git add caskly xyzzy yomin nitfol rezrov/bozbar &&
test_tick &&
git commit -m initial
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
[master (root-commit) 8dc0761] initial
Author: A U Thor <author@example.com>
5 files changed, 1 insertion(+)
create mode 100644 caskly
create mode 120000 nitfol
create mode 100644 rezrov/bozbar
create mode 100644 xyzzy
create mode 100644 yomin
ok 1 - setup
expecting success:
rm -f xyzzy yomin nitfol caskly &&
# caskly disappears (not a submodule)
mkdir caskly &&
# nitfol changes from symlink to regular
>nitfol &&
# rezrov/bozbar disappears
rm -fr rezrov &&
if test_have_prereq SYMLINKS; then
ln -s xyzzy rezrov
else
printf %s xyzzy > rezrov
fi &&
# xyzzy disappears (not a submodule)
mkdir xyzzy &&
echo gnusto >xyzzy/bozbar &&
# yomin gets replaced with a submodule
mkdir yomin &&
>yomin/yomin &&
(
cd yomin &&
git init &&
git add yomin &&
git commit -m "sub initial"
) &&
yomin=$(GIT_DIR=yomin/.git git rev-parse HEAD) &&
# yonk is added and then turned into a submodule
# this should appear as T in diff-files and as A in diff-index
>yonk &&
git add yonk &&
rm -f yonk &&
mkdir yonk &&
>yonk/yonk &&
(
cd yonk &&
git init &&
git add yonk &&
git commit -m "sub initial"
) &&
yonk=$(GIT_DIR=yonk/.git git rev-parse HEAD) &&
# zifmia is added and then removed
# this should appear in diff-files but not in diff-index.
>zifmia &&
git add zifmia &&
rm -f zifmia &&
mkdir zifmia &&
{
git ls-tree -r HEAD |
sed -e "s/^/:/" -e "
/ caskly/{
s/ caskly/ $ZERO_OID D&/
s/blob/000000/
}
/ nitfol/{
s/ nitfol/ $ZERO_OID $T_letter&/
s/blob/100644/
}
/ rezrov.bozbar/{
s/ rezrov.bozbar/ $ZERO_OID D&/
s/blob/000000/
}
/ xyzzy/{
s/ xyzzy/ $ZERO_OID D&/
s/blob/000000/
}
/ yomin/{
s/ yomin/ $ZERO_OID T&/
s/blob/160000/
}
"
} >expect &&
{
cat expect
echo ":100644 160000 $_empty $ZERO_OID T yonk"
echo ":100644 000000 $_empty $ZERO_OID D zifmia"
} >expect-files &&
{
cat expect
echo ":000000 160000 $ZERO_OID $ZERO_OID A yonk"
} >expect-index &&
{
echo "100644 $_empty 0 nitfol"
echo "160000 $yomin 0 yomin"
echo "160000 $yonk 0 yonk"
} >expect-final
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2201-add-update-typechange/yomin/.git/
[master (root-commit) 9da2848] sub initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 yomin
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2201-add-update-typechange/yonk/.git/
[master (root-commit) 9cc3160] sub initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 yonk
ok 2 - modify
expecting success:
git diff-files --raw >actual &&
test_cmp expect-files actual
ok 3 - diff-files
expecting success:
git diff-index --raw HEAD -- >actual &&
test_cmp expect-index actual
ok 4 - diff-index
expecting success:
rm -f ".git/saved-index" &&
cp -p ".git/index" ".git/saved-index" &&
git add -u &&
git ls-files -s >actual &&
test_cmp expect-final actual
ok 5 - add -u
expecting success:
if test -f ".git/saved-index"
then
rm -f ".git/index" &&
mv ".git/saved-index" ".git/index"
fi &&
git commit -m "second" -a &&
git ls-files -s >actual &&
test_cmp expect-final actual &&
rm -f .git/index &&
git read-tree HEAD &&
git ls-files -s >actual &&
test_cmp expect-final actual
[master 0f3d2ce] second
Author: A U Thor <author@example.com>
5 files changed, 2 insertions(+)
rename caskly => nitfol (100%)
delete mode 100644 rezrov/bozbar
delete mode 100644 xyzzy
mode change 100644 => 160000 yomin
create mode 160000 yonk
ok 6 - commit -a
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2203-add-intent.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2203-add-intent/.git/
expecting success:
test_commit 1 &&
git rm 1.t &&
echo hello >1.t &&
echo hello >file &&
echo hello >elif &&
git add -N file &&
git add elif &&
git add -N 1.t
[master (root-commit) d0dcf97] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1.t
rm '1.t'
ok 1 - intent to add
expecting success:
git status --porcelain | grep -v actual >actual &&
cat >expect <<-\EOF &&
DA 1.t
A elif
A file
EOF
test_cmp expect actual
ok 2 - git status
expecting success:
git status --porcelain=v2 | grep -v "^?" >actual &&
nam1=$(echo 1 | git hash-object --stdin) &&
nam2=$(git hash-object elif) &&
cat >expect <<-EOF &&
1 DA N... 100644 000000 100644 $nam1 $ZERO_OID 1.t
1 A. N... 000000 100644 100644 $ZERO_OID $nam2 elif
1 .A N... 000000 000000 100644 $ZERO_OID $ZERO_OID file
EOF
test_cmp expect actual
ok 3 - git status with porcelain v2
expecting success:
git ls-files -s file >actual &&
empty=$(git hash-object --stdin </dev/null) &&
echo "100644 $empty 0 file" >expect &&
test_cmp expect actual
ok 4 - check result of "add -N"
expecting success:
git add -u &&
git ls-files -s file >actual &&
git ls-files -s elif | sed -e "s/elif/file/" >expect &&
test_cmp expect actual
ok 5 - intent to add is just an ordinary empty blob
expecting success:
git add -N file elif &&
empty=$(git hash-object --stdin </dev/null) &&
git ls-files -s >actual &&
! grep "$empty" actual
ok 6 - intent to add does not clobber existing paths
expecting success:
test_tick &&
git commit -a -m initial &&
git reset --hard &&
echo xyzzy >rezrov &&
echo frotz >nitfol &&
git add rezrov &&
git add -N nitfol &&
git commit -m second &&
test $(git ls-tree HEAD -- nitfol | wc -l) = 0 &&
test $(git diff --name-only HEAD -- nitfol | wc -l) = 1 &&
test $(git diff --name-only -- nitfol | wc -l) = 1
[master b7cca08] initial
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 elif
create mode 100644 file
HEAD is now at b7cca08 initial
[master b70ad0b] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 rezrov
ok 7 - i-t-a entry is simply ignored
expecting success:
git reset --hard &&
echo bozbar >rezrov &&
echo frotz >nitfol &&
git add rezrov &&
git add -N nitfol &&
git commit -m partial rezrov
HEAD is now at b70ad0b second
[master 1ed15b5] partial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 8 - can commit with an unrelated i-t-a entry in index
expecting success:
git reset --hard &&
: >nitfol &&
git add -N nitfol &&
git commit -a -m all
HEAD is now at 1ed15b5 partial
[master 415f3ad] all
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 nitfol
ok 9 - can "commit -a" with an i-t-a entry
expecting success:
git reset --hard &&
mkdir dir &&
: >dir/foo &&
git add dir/foo &&
git commit -m foo &&
: >dir/bar &&
git add -N dir/bar &&
git diff --name-only >actual &&
echo dir/bar >expect &&
test_cmp expect actual &&
git write-tree >/dev/null &&
git diff --name-only >actual &&
echo dir/bar >expect &&
test_cmp expect actual
HEAD is now at 415f3ad all
[master 03f6a20] foo
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 dir/foo
ok 10 - cache-tree invalidates i-t-a paths
expecting success:
git init ita-in-dir &&
(
cd ita-in-dir &&
mkdir 2 &&
for f in 1 2/1 2/2 3
do
echo "$f" >"$f"
done &&
git add 1 2/2 3 &&
git add -N 2/1 &&
git commit -m committed &&
git ls-tree -r HEAD >actual &&
grep 2/2 actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2203-add-intent/ita-in-dir/.git/
[master (root-commit) 7b0eb4f] committed
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 1
create mode 100644 2/2
create mode 100644 3
100644 blob 6b8a6f549c42bad0c52be670caa297a269052aa7 2/2
ok 11 - cache-tree does not ignore dir that has i-t-a entries
expecting success:
rm -fr ita-in-dir &&
git init ita-in-dir &&
(
cd ita-in-dir &&
mkdir -p 1/2/3 &&
echo 4 >1/2/3/4 &&
git add -N 1/2/3/4 &&
git write-tree >actual &&
echo $EMPTY_TREE >expected &&
test_cmp expected actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2203-add-intent/ita-in-dir/.git/
ok 12 - cache-tree does skip dir that becomes empty
expecting success:
git init empty-initial-commit &&
(
cd empty-initial-commit &&
: >one &&
git add -N one &&
test_must_fail git commit -m nothing-new-here
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2203-add-intent/empty-initial-commit/.git/
On branch master
Initial commit
Changes not staged for commit:
new file: one
no changes added to commit
ok 13 - commit: ita entries ignored in empty initial commit check
expecting success:
git init empty-subsequent-commit &&
(
cd empty-subsequent-commit &&
test_commit one &&
: >two &&
git add -N two &&
test_must_fail git commit -m nothing-new-here
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2203-add-intent/empty-subsequent-commit/.git/
[master (root-commit) 4331c28] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
On branch master
Changes not staged for commit:
new file: two
no changes added to commit
ok 14 - commit: ita entries ignored in empty commit check
expecting success:
git init rename-detection &&
(
cd rename-detection &&
echo contents >first &&
git add first &&
git commit -m first &&
mv first third &&
git add -N third &&
git status | grep -v "^?" >actual.1 &&
test_i18ngrep "renamed: *first -> third" actual.1 &&
git status --porcelain | grep -v "^?" >actual.2 &&
cat >expected.2 <<-\EOF &&
R first -> third
EOF
test_cmp expected.2 actual.2 &&
hash=$(git hash-object third) &&
git status --porcelain=v2 | grep -v "^?" >actual.3 &&
cat >expected.3 <<-EOF &&
2 .R N... 100644 100644 100644 $hash $hash R100 third first
EOF
test_cmp expected.3 actual.3 &&
git diff --stat >actual.4 &&
cat >expected.4 <<-EOF &&
first => third | 0
1 file changed, 0 insertions(+), 0 deletions(-)
EOF
test_cmp expected.4 actual.4 &&
git diff --cached --stat >actual.5 &&
test_must_be_empty actual.5
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2203-add-intent/rename-detection/.git/
[master (root-commit) 0bad72c] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 first
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
renamed: first -> third
ok 15 - rename detection finds the right names
expecting success:
git init rename-detection-2 &&
(
cd rename-detection-2 &&
echo contents >first &&
git add first &&
git commit -m first &&
git mv first second &&
mv second third &&
git add -N third &&
git status | grep -v "^?" >actual.1 &&
test_i18ngrep "renamed: *first -> second" actual.1 &&
test_i18ngrep "renamed: *second -> third" actual.1 &&
git status --porcelain | grep -v "^?" >actual.2 &&
cat >expected.2 <<-\EOF &&
R first -> second
R second -> third
EOF
test_cmp expected.2 actual.2 &&
hash=$(git hash-object third) &&
git status --porcelain=v2 | grep -v "^?" >actual.3 &&
cat >expected.3 <<-EOF &&
2 R. N... 100644 100644 100644 $hash $hash R100 second first
2 .R N... 100644 100644 100644 $hash $hash R100 third second
EOF
test_cmp expected.3 actual.3
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2203-add-intent/rename-detection-2/.git/
[master (root-commit) 0bad72c] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 first
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
renamed: first -> second
renamed: second -> third
ok 16 - double rename detection in status
expecting success:
git reset --hard &&
echo new >new-ita &&
git add -N new-ita &&
git diff --summary >actual &&
echo " create mode 100644 new-ita" >expected &&
test_cmp expected actual &&
git diff --cached --summary >actual2 &&
test_must_be_empty actual2
HEAD is now at 03f6a20 foo
ok 17 - diff-files/diff-cached shows ita as new/not-new files
expecting success:
git reset --hard &&
echo new >new-ita &&
oid=$(git hash-object new-ita) &&
oid=$(git rev-parse --short $oid) &&
git add -N new-ita &&
git diff HEAD >actual &&
cat >expected <<-EOF &&
diff --git a/new-ita b/new-ita
new file mode 100644
index 0000000..$oid
--- /dev/null
+++ b/new-ita
@@ -0,0 +1 @@
+new
EOF
test_cmp expected actual
HEAD is now at 03f6a20 foo
ok 18 - "diff HEAD" includes ita as new files
expecting success:
git reset --hard &&
echo new >new-ita &&
git add -N new-ita &&
git diff >expected &&
grep "new file" expected &&
git reset --hard &&
git apply --intent-to-add expected &&
git diff >actual &&
test_cmp expected actual
HEAD is now at 03f6a20 foo
new file mode 100644
HEAD is now at 03f6a20 foo
ok 19 - apply --intent-to-add
# passed all 19 test(s)
1..19
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2204-add-ignored.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2204-add-ignored/.git/
expecting success:
mkdir sub dir dir/sub &&
echo sub >.gitignore &&
echo ign >>.gitignore &&
for p in . sub dir dir/sub
do
>"$p/ign" &&
>"$p/file" || exit 1
done
ok 1 - setup
expecting success:
rm -f .git/index &&
git add "$i" &&
git ls-files "$i" >out &&
test -s out
ok 2 - no complaints for unignored file
expecting success:
rm -f .git/index &&
git add "$i" &&
git ls-files "$i" >out &&
test -s out
ok 3 - no complaints for unignored dir/file
expecting success:
rm -f .git/index &&
git add "$i" &&
git ls-files "$i" >out &&
test -s out
ok 4 - no complaints for unignored dir
expecting success:
rm -f .git/index &&
git add "$i" &&
git ls-files "$i" >out &&
test -s out
ok 5 - no complaints for unignored d*
expecting success:
rm -f .git/index &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
ok 6 - complaints for ignored ign
expecting success:
test_i18ngrep -e "Use -f if" err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Use -f if you really want to add them.
ok 7 - complaints for ignored ign output
expecting success:
rm -f .git/index &&
test_must_fail git add "$i" file 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
ok 8 - complaints for ignored ign with unignored file
expecting success:
test_i18ngrep -e "Use -f if" err
Use -f if you really want to add them.
ok 9 - complaints for ignored ign with unignored file output
expecting success:
rm -f .git/index &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
ok 10 - complaints for ignored dir/ign
expecting success:
test_i18ngrep -e "Use -f if" err
Use -f if you really want to add them.
ok 11 - complaints for ignored dir/ign output
expecting success:
rm -f .git/index &&
test_must_fail git add "$i" file 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
ok 12 - complaints for ignored dir/ign with unignored file
expecting success:
test_i18ngrep -e "Use -f if" err
Use -f if you really want to add them.
ok 13 - complaints for ignored dir/ign with unignored file output
expecting success:
rm -f .git/index &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
ok 14 - complaints for ignored dir/sub
expecting success:
test_i18ngrep -e "Use -f if" err
Use -f if you really want to add them.
ok 15 - complaints for ignored dir/sub output
expecting success:
rm -f .git/index &&
test_must_fail git add "$i" file 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
ok 16 - complaints for ignored dir/sub with unignored file
expecting success:
test_i18ngrep -e "Use -f if" err
Use -f if you really want to add them.
ok 17 - complaints for ignored dir/sub with unignored file output
expecting success:
rm -f .git/index &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
ok 18 - complaints for ignored dir/sub/ign
expecting success:
test_i18ngrep -e "Use -f if" err
Use -f if you really want to add them.
ok 19 - complaints for ignored dir/sub/ign output
expecting success:
rm -f .git/index &&
test_must_fail git add "$i" file 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
ok 20 - complaints for ignored dir/sub/ign with unignored file
expecting success:
test_i18ngrep -e "Use -f if" err
Use -f if you really want to add them.
ok 21 - complaints for ignored dir/sub/ign with unignored file output
expecting success:
rm -f .git/index &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
ok 22 - complaints for ignored sub/file
expecting success:
test_i18ngrep -e "Use -f if" err
Use -f if you really want to add them.
ok 23 - complaints for ignored sub/file output
expecting success:
rm -f .git/index &&
test_must_fail git add "$i" file 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
ok 24 - complaints for ignored sub/file with unignored file
expecting success:
test_i18ngrep -e "Use -f if" err
Use -f if you really want to add them.
ok 25 - complaints for ignored sub/file with unignored file output
expecting success:
rm -f .git/index &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
ok 26 - complaints for ignored sub
expecting success:
test_i18ngrep -e "Use -f if" err
Use -f if you really want to add them.
ok 27 - complaints for ignored sub output
expecting success:
rm -f .git/index &&
test_must_fail git add "$i" file 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
ok 28 - complaints for ignored sub with unignored file
expecting success:
test_i18ngrep -e "Use -f if" err
Use -f if you really want to add them.
ok 29 - complaints for ignored sub with unignored file output
expecting success:
rm -f .git/index &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
ok 30 - complaints for ignored sub/file
expecting success:
test_i18ngrep -e "Use -f if" err
Use -f if you really want to add them.
ok 31 - complaints for ignored sub/file output
expecting success:
rm -f .git/index &&
test_must_fail git add "$i" file 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
ok 32 - complaints for ignored sub/file with unignored file
expecting success:
test_i18ngrep -e "Use -f if" err
Use -f if you really want to add them.
ok 33 - complaints for ignored sub/file with unignored file output
expecting success:
rm -f .git/index &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
ok 34 - complaints for ignored sub/ign
expecting success:
test_i18ngrep -e "Use -f if" err
Use -f if you really want to add them.
ok 35 - complaints for ignored sub/ign output
expecting success:
rm -f .git/index &&
test_must_fail git add "$i" file 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
ok 36 - complaints for ignored sub/ign with unignored file
expecting success:
test_i18ngrep -e "Use -f if" err
Use -f if you really want to add them.
ok 37 - complaints for ignored sub/ign with unignored file output
expecting success:
rm -f .git/index &&
(
cd dir &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
)
ok 38 - complaints for ignored sub in dir
expecting success:
(
cd dir &&
test_i18ngrep -e "Use -f if" err
)
Use -f if you really want to add them.
ok 39 - complaints for ignored sub in dir output
expecting success:
rm -f .git/index &&
(
cd dir &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
)
ok 40 - complaints for ignored sub/file in dir
expecting success:
(
cd dir &&
test_i18ngrep -e "Use -f if" err
)
Use -f if you really want to add them.
ok 41 - complaints for ignored sub/file in dir output
expecting success:
rm -f .git/index &&
(
cd dir &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
)
ok 42 - complaints for ignored sub/ign in dir
expecting success:
(
cd dir &&
test_i18ngrep -e "Use -f if" err
)
Use -f if you really want to add them.
ok 43 - complaints for ignored sub/ign in dir output
expecting success:
rm -f .git/index &&
(
cd sub &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
)
ok 44 - complaints for ignored ign in sub
expecting success:
(
cd sub &&
test_i18ngrep -e "Use -f if" err
)
Use -f if you really want to add them.
ok 45 - complaints for ignored ign in sub output
expecting success:
rm -f .git/index &&
(
cd sub &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
test_must_be_empty out
)
ok 46 - complaints for ignored file in sub
expecting success:
(
cd sub &&
test_i18ngrep -e "Use -f if" err
)
Use -f if you really want to add them.
ok 47 - complaints for ignored file in sub output
# passed all 47 test(s)
1..47
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2300-cd-to-toplevel.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2300-cd-to-toplevel/.git/
expecting success:
(
cd 'repo' &&
PATH="$EXEC_PATH:$PATH" &&
. git-sh-setup &&
cd_to_toplevel &&
[ "$(pwd -P)" = "$TOPLEVEL" ]
)
ok 1 - at physical root
expecting success:
(
cd 'repo/sub/dir' &&
PATH="$EXEC_PATH:$PATH" &&
. git-sh-setup &&
cd_to_toplevel &&
[ "$(pwd -P)" = "$TOPLEVEL" ]
)
ok 2 - at physical subdir
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:
(
cd 'symrepo' &&
PATH="$EXEC_PATH:$PATH" &&
. git-sh-setup &&
cd_to_toplevel &&
[ "$(pwd -P)" = "$TOPLEVEL" ]
)
ok 3 - at symbolic root
expecting success:
(
cd 'subdir-link' &&
PATH="$EXEC_PATH:$PATH" &&
. git-sh-setup &&
cd_to_toplevel &&
[ "$(pwd -P)" = "$TOPLEVEL" ]
)
ok 4 - at symbolic subdir
expecting success:
(
cd 'internal-link' &&
PATH="$EXEC_PATH:$PATH" &&
. git-sh-setup &&
cd_to_toplevel &&
[ "$(pwd -P)" = "$TOPLEVEL" ]
)
ok 5 - at internal symbolic subdir
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2401-worktree-prune.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2401-worktree-prune/.git/
expecting success:
git commit --allow-empty -m init
[master (root-commit) 4f4cbf1] init
Author: A U Thor <author@example.com>
ok 1 - initialize
expecting success:
git worktree prune &&
test_must_fail git worktree prune abc
usage: git worktree add [<options>] <path> [<commit-ish>]
or: git worktree list [<options>]
or: git worktree lock [<options>] <path>
or: git worktree move <worktree> <new-path>
or: git worktree prune [<options>]
or: git worktree remove [<options>] <worktree>
or: git worktree unlock <path>
-n, --dry-run do not remove, show only
-v, --verbose report pruned working trees
--expire <expiry-date>
expire working trees older than <time>
ok 2 - worktree prune on normal repo
expecting success:
mkdir .git/worktrees &&
: >.git/worktrees/abc &&
git worktree prune --verbose >actual &&
cat >expect <<EOF &&
Removing worktrees/abc: not a valid directory
EOF
test_i18ncmp expect actual &&
! test -f .git/worktrees/abc &&
! test -d .git/worktrees
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 3 - prune files inside $GIT_DIR/worktrees
expecting success:
mkdir -p .git/worktrees/def/abc &&
: >.git/worktrees/def/def &&
cat >expect <<EOF &&
Removing worktrees/def: gitdir file does not exist
EOF
git worktree prune --verbose >actual &&
test_i18ncmp expect actual &&
! test -d .git/worktrees/def &&
! test -d .git/worktrees
ok 4 - prune directories without gitdir
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 -r SANETESTD.1/x &&
chmod -rx SANETESTD.2 ||
BUG "cannot prepare SANETESTD"
! test -r SANETESTD.1/x &&
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
BUG "cannot clean SANETESTD"
return $status
)
rm: cannot remove 'SANETESTD.1/x': Permission denied
prerequisite SANITY ok
expecting success:
mkdir -p .git/worktrees/def/abc &&
: >.git/worktrees/def/def &&
: >.git/worktrees/def/gitdir &&
chmod u-r .git/worktrees/def/gitdir &&
git worktree prune --verbose >actual &&
test_i18ngrep "Removing worktrees/def: unable to read gitdir file" actual &&
! test -d .git/worktrees/def &&
! test -d .git/worktrees
Removing worktrees/def: unable to read gitdir file (Permission denied)
ok 5 - prune directories with unreadable gitdir
expecting success:
mkdir -p .git/worktrees/def/abc &&
: >.git/worktrees/def/def &&
: >.git/worktrees/def/gitdir &&
git worktree prune --verbose >actual &&
test_i18ngrep "Removing worktrees/def: invalid gitdir file" actual &&
! test -d .git/worktrees/def &&
! test -d .git/worktrees
Removing worktrees/def: invalid gitdir file
ok 6 - prune directories with invalid gitdir
expecting success:
mkdir -p .git/worktrees/def/abc &&
: >.git/worktrees/def/def &&
echo "$(pwd)"/nowhere >.git/worktrees/def/gitdir &&
git worktree prune --verbose >actual &&
test_i18ngrep "Removing worktrees/def: gitdir file points to non-existent location" actual &&
! test -d .git/worktrees/def &&
! test -d .git/worktrees
Removing worktrees/def: gitdir file points to non-existent location
ok 7 - prune directories with gitdir pointing to nowhere
expecting success:
test_when_finished rm -r .git/worktrees &&
mkdir -p .git/worktrees/ghi &&
: >.git/worktrees/ghi/locked &&
git worktree prune &&
test -d .git/worktrees/ghi
ok 8 - not prune locked checkout
expecting success:
test_when_finished rm -r .git/worktrees &&
git worktree add jlm HEAD &&
test -d .git/worktrees/jlm &&
rm -rf jlm &&
git worktree prune --verbose --expire=2.days.ago &&
test -d .git/worktrees/jlm
Preparing worktree (detached HEAD 4f4cbf1)
HEAD is now at 4f4cbf1 init
ok 9 - not prune recent checkouts
expecting success:
test_when_finished rm -r .git/worktrees &&
git worktree add --detach "$PWD/nop" master &&
git worktree prune &&
test -d .git/worktrees/nop
Preparing worktree (detached HEAD 4f4cbf1)
HEAD is now at 4f4cbf1 init
ok 10 - not prune proper checkouts
# passed all 10 test(s)
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2402-worktree-list.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2402-worktree-list/.git/
expecting success:
test_commit init
[master (root-commit) 2519212] init
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 init.t
ok 1 - setup
expecting success:
git rev-parse --git-common-dir >actual &&
echo .git >expected &&
test_cmp expected actual &&
mkdir sub &&
git -C sub rev-parse --git-common-dir >actual2 &&
echo ../.git >expected2 &&
test_cmp expected2 actual2
ok 2 - rev-parse --git-common-dir on main worktree
expecting success:
echo "$(git rev-parse --show-toplevel)/.git/objects" >expect &&
test_when_finished "rm -rf linked-tree actual expect && git worktree prune" &&
git worktree add --detach linked-tree master &&
git -C linked-tree rev-parse --git-path objects >actual &&
test_cmp expect actual
Preparing worktree (detached HEAD 2519212)
HEAD is now at 2519212 init
ok 3 - rev-parse --git-path objects linked worktree
expecting success:
echo "$(git rev-parse --show-toplevel) $(git rev-parse --short HEAD) [$(git symbolic-ref --short HEAD)]" >expect &&
test_when_finished "rm -rf here out actual expect && git worktree prune" &&
git worktree add --detach here master &&
echo "$(git -C here rev-parse --show-toplevel) $(git rev-parse --short HEAD) (detached HEAD)" >>expect &&
git worktree list >out &&
sed "s/ */ /g" <out >actual &&
test_cmp expect actual
Preparing worktree (detached HEAD 2519212)
HEAD is now at 2519212 init
ok 4 - "list" all worktrees from main
expecting success:
echo "$(git rev-parse --show-toplevel) $(git rev-parse --short HEAD) [$(git symbolic-ref --short HEAD)]" >expect &&
test_when_finished "rm -rf here out actual expect && git worktree prune" &&
git worktree add --detach here master &&
echo "$(git -C here rev-parse --show-toplevel) $(git rev-parse --short HEAD) (detached HEAD)" >>expect &&
git -C here worktree list >out &&
sed "s/ */ /g" <out >actual &&
test_cmp expect actual
Preparing worktree (detached HEAD 2519212)
HEAD is now at 2519212 init
ok 5 - "list" all worktrees from linked
expecting success:
echo "worktree $(git rev-parse --show-toplevel)" >expect &&
echo "HEAD $(git rev-parse HEAD)" >>expect &&
echo "branch $(git symbolic-ref HEAD)" >>expect &&
echo >>expect &&
test_when_finished "rm -rf here actual expect && git worktree prune" &&
git worktree add --detach here master &&
echo "worktree $(git -C here rev-parse --show-toplevel)" >>expect &&
echo "HEAD $(git rev-parse HEAD)" >>expect &&
echo "detached" >>expect &&
echo >>expect &&
git worktree list --porcelain >actual &&
test_cmp expect actual
Preparing worktree (detached HEAD 2519212)
HEAD is now at 2519212 init
ok 6 - "list" all worktrees --porcelain
expecting success:
git init --bare bare1 &&
echo "data" >file1 &&
git add file1 &&
git commit -m"File1: add data" &&
git push bare1 master &&
git reset --hard HEAD^
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2402-worktree-list/bare1/
[master 7c81006] File1: add data
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1
To bare1
* [new branch] master -> master
HEAD is now at 2519212 init
ok 7 - bare repo setup
expecting success:
test_when_finished "rm -rf there out actual expect && git -C bare1 worktree prune" &&
git -C bare1 worktree add --detach ../there master &&
echo "$(pwd)/bare1 (bare)" >expect &&
echo "$(git -C there rev-parse --show-toplevel) $(git -C there rev-parse --short HEAD) (detached HEAD)" >>expect &&
git -C bare1 worktree list >out &&
sed "s/ */ /g" <out >actual &&
test_cmp expect actual
Preparing worktree (detached HEAD 7c81006)
HEAD is now at 7c81006 File1: add data
ok 8 - "list" all worktrees from bare main
expecting success:
test_when_finished "rm -rf there actual expect && git -C bare1 worktree prune" &&
git -C bare1 worktree add --detach ../there master &&
echo "worktree $(pwd)/bare1" >expect &&
echo "bare" >>expect &&
echo >>expect &&
echo "worktree $(git -C there rev-parse --show-toplevel)" >>expect &&
echo "HEAD $(git -C there rev-parse HEAD)" >>expect &&
echo "detached" >>expect &&
echo >>expect &&
git -C bare1 worktree list --porcelain >actual &&
test_cmp expect actual
Preparing worktree (detached HEAD 7c81006)
HEAD is now at 7c81006 File1: add data
ok 9 - "list" all worktrees --porcelain from bare main
expecting success:
test_when_finished "rm -rf there out actual expect && git -C bare1 worktree prune" &&
git -C bare1 worktree add --detach ../there master &&
echo "$(pwd)/bare1 (bare)" >expect &&
echo "$(git -C there rev-parse --show-toplevel) $(git -C there rev-parse --short HEAD) (detached HEAD)" >>expect &&
git -C there worktree list >out &&
sed "s/ */ /g" <out >actual &&
test_cmp expect actual
Preparing worktree (detached HEAD 7c81006)
HEAD is now at 7c81006 File1: add data
ok 10 - "list" all worktrees from linked with a bare main
expecting success:
rm -rf bare1
ok 11 - bare repo cleanup
expecting success:
git init broken-main &&
(
cd broken-main &&
test_commit new &&
git worktree add linked &&
cat >expected <<-EOF &&
worktree $(pwd)
HEAD $ZERO_OID
EOF
cd linked &&
echo "worktree $(pwd)" >expected &&
echo "ref: .broken" >../.git/HEAD &&
git worktree list --porcelain >out &&
head -n 3 out >actual &&
test_cmp ../expected actual &&
git worktree list >out &&
head -n 1 out >actual.2 &&
grep -F "(error)" actual.2
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2402-worktree-list/broken-main/.git/
[master (root-commit) 3325ee1] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 new.t
Preparing worktree (new branch 'linked')
HEAD is now at 3325ee1 new
/<<PKGBUILDDIR>>/t/trash directory.t2402-worktree-list/broken-main 0000000 (error)
ok 12 - broken main worktree still at the top
expecting success:
mkdir sorted &&
git init sorted/main &&
(
cd sorted/main &&
test_tick &&
test_commit new &&
git worktree add ../first &&
git worktree add ../second &&
git worktree list --porcelain >out &&
grep ^worktree out >actual
) &&
cat >expected <<-EOF &&
worktree $(pwd)/sorted/main
worktree $(pwd)/sorted/first
worktree $(pwd)/sorted/second
EOF
test_cmp expected sorted/main/actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2402-worktree-list/sorted/main/.git/
[master (root-commit) d8ef111] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 new.t
Preparing worktree (new branch 'first')
HEAD is now at d8ef111 new
Preparing worktree (new branch 'second')
HEAD is now at d8ef111 new
ok 13 - linked worktrees are sorted
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2071-restore-patch.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2071-restore-patch/.git/
expecting success:
mkdir dir &&
echo parent >dir/foo &&
echo dummy >bar &&
git add bar dir/foo &&
git commit -m initial &&
test_tick &&
test_commit second dir/foo head &&
set_and_save_state bar bar_work bar_index &&
save_head
[master (root-commit) 7ac6635] initial
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 bar
create mode 100644 dir/foo
[master facee86] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
echo q >cmd &&
git restore -p <cmd
diff --git a/bar b/bar
index 7780244..8c999e6 100644
--- a/bar
+++ b/bar
@@ -1 +1 @@
-bar_index
+bar_work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
ok 2 - restore -p without pathspec is fine
expecting success:
set_and_save_state dir/foo work head &&
test_write_lines n n | git restore -p &&
verify_saved_state bar &&
verify_saved_state dir/foo
diff --git a/bar b/bar
index 7780244..8c999e6 100644
--- a/bar
+++ b/bar
@@ -1 +1 @@
-bar_index
+bar_work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
ok 3 - saying "n" does nothing
expecting success:
set_and_save_state dir/foo work head &&
test_write_lines n y | git restore -p &&
verify_saved_state bar &&
verify_state dir/foo head head
diff --git a/bar b/bar
index 7780244..8c999e6 100644
--- a/bar
+++ b/bar
@@ -1 +1 @@
-bar_index
+bar_work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
ok 4 - git restore -p
expecting success:
set_state dir/foo work index &&
test_write_lines n y | git restore -p &&
verify_saved_state bar &&
verify_state dir/foo index index
diff --git a/bar b/bar
index 7780244..8c999e6 100644
--- a/bar
+++ b/bar
@@ -1 +1 @@
-bar_index
+bar_work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
diff --git a/dir/foo b/dir/foo
index 9015a7a..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-index
+work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
ok 5 - git restore -p with staged changes
expecting success:
set_state dir/foo work index &&
# the third n is to get out in case it mistakenly does not apply
test_write_lines n y n | git restore -p --source=HEAD &&
verify_saved_state bar &&
verify_state dir/foo head index
diff --git a/bar b/bar
index 421376d..8c999e6 100644
--- a/bar
+++ b/bar
@@ -1 +1 @@
-dummy
+bar_work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
ok 6 - git restore -p --source=HEAD
expecting success:
set_state dir/foo work index &&
# the third n is to get out in case it mistakenly does not apply
test_write_lines n y n | git restore -p --source=HEAD^ &&
verify_saved_state bar &&
verify_state dir/foo parent index
diff --git b/bar a/bar
index 8c999e6..421376d 100644
--- b/bar
+++ a/bar
@@ -1 +1 @@
-bar_work
+dummy
Apply this hunk to worktree [y,n,q,a,d,e,?]?
diff --git b/dir/foo a/dir/foo
index b8f99f5..9676f5b 100644
--- b/dir/foo
+++ a/dir/foo
@@ -1 +1 @@
-work
+parent
Apply this hunk to worktree [y,n,q,a,d,e,?]?
ok 7 - git restore -p --source=HEAD^
expecting success:
set_state dir/foo work index &&
rm dir/foo &&
test_write_lines n y | git restore -p &&
verify_saved_state bar &&
verify_state dir/foo index index
diff --git a/bar b/bar
index 7780244..8c999e6 100644
--- a/bar
+++ b/bar
@@ -1 +1 @@
-bar_index
+bar_work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
diff --git a/dir/foo b/dir/foo
index 9015a7a..0000000
--- a/dir/foo
+++ /dev/null
deleted file mode 100644
@@ -1 +0,0 @@
-index
Discard deletion from worktree [y,n,q,a,d,?]?
ok 8 - git restore -p handles deletion
expecting success:
set_state dir/foo work head &&
test_write_lines y n | git restore -p dir &&
verify_saved_state bar &&
verify_state dir/foo head head
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
ok 9 - path limiting works: dir
expecting success:
set_state dir/foo work head &&
test_write_lines y n | git restore -p -- dir &&
verify_saved_state bar &&
verify_state dir/foo head head
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
ok 10 - path limiting works: -- dir
expecting success:
set_state dir/foo work head &&
# the third n is to get out in case it mistakenly does not apply
test_write_lines y n n | git restore -p --source=HEAD^ -- dir &&
verify_saved_state bar &&
verify_state dir/foo parent head
diff --git b/dir/foo a/dir/foo
index b8f99f5..9676f5b 100644
--- b/dir/foo
+++ a/dir/foo
@@ -1 +1 @@
-work
+parent
Apply this hunk to worktree [y,n,q,a,d,e,?]?
ok 11 - path limiting works: HEAD^ -- dir
expecting success:
set_state dir/foo work head &&
# the third n is to get out in case it mistakenly does not apply
test_write_lines y n n | (cd dir && git restore -p foo) &&
verify_saved_state bar &&
verify_state dir/foo head head
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Discard this hunk from worktree [y,n,q,a,d,e,?]?
ok 12 - path limiting works: foo inside dir
expecting success:
verify_saved_head
ok 13 - none of this moved HEAD
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2404-worktree-config.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2404-worktree-config/.git/
expecting success:
test_commit start
[master (root-commit) bb4ab09] start
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 start.t
ok 1 - setup
expecting success:
git config --worktree foo.bar true &&
test_cmp_config true foo.bar
ok 2 - config --worktree in single worktree
expecting success:
git worktree add wt1 &&
git worktree add wt2
Preparing worktree (new branch 'wt1')
HEAD is now at bb4ab09 start
Preparing worktree (new branch 'wt2')
HEAD is now at bb4ab09 start
ok 3 - add worktrees
expecting success:
test_must_fail git config --worktree foo.bar false
fatal: --worktree cannot be used with multiple working trees unless the config
extension worktreeConfig is enabled. Please read "CONFIGURATION FILE"
section in "git help worktree" for details
ok 4 - config --worktree without extension
expecting success:
git config extensions.worktreeConfig true &&
test_cmp_config true extensions.worktreeConfig
ok 5 - enable worktreeConfig extension
expecting success:
git config this.is shared &&
test_cmp_config shared this.is &&
test_cmp_config -C wt1 shared this.is &&
test_cmp_config -C wt2 shared this.is
ok 6 - config is shared as before
expecting success:
git -C wt1 config that.is also-shared &&
test_cmp_config also-shared that.is &&
test_cmp_config -C wt1 also-shared that.is &&
test_cmp_config -C wt2 also-shared that.is
ok 7 - config is shared (set from another worktree)
expecting success:
git config --worktree this.is for-main &&
test_cmp_config for-main this.is &&
test_cmp_config -C wt1 shared this.is &&
test_cmp_config -C wt2 shared this.is
ok 8 - config private to main worktree
expecting success:
git -C wt1 config --worktree this.is for-wt1 &&
test_cmp_config for-main this.is &&
test_cmp_config -C wt1 for-wt1 this.is &&
test_cmp_config -C wt2 shared this.is
ok 9 - config private to linked worktree
expecting success:
test_config core.bare true &&
test "$(git rev-parse --is-bare-repository)" = true &&
test "$(git -C wt1 rev-parse --is-bare-repository)" = true &&
test "$(git -C wt2 rev-parse --is-bare-repository)" = true
ok 10 - core.bare no longer for main only
expecting success:
git -C wt1 config --worktree core.bare true &&
test "$(git rev-parse --is-bare-repository)" = false &&
test "$(git -C wt1 rev-parse --is-bare-repository)" = true &&
test "$(git -C wt2 rev-parse --is-bare-repository)" = false
ok 11 - per-worktree core.bare is picked up
expecting success:
git config --unset extensions.worktreeConfig &&
test_cmp_config shared this.is &&
test_cmp_config -C wt1 shared this.is &&
test_cmp_config -C wt2 shared this.is
ok 12 - config.worktree no longer read without extension
# passed all 12 test(s)
1..12
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3000-ls-files-others.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3000-ls-files-others/.git/
expecting success:
date >path0 &&
if test_have_prereq SYMLINKS
then
ln -s xyzzy path1
else
date >path1
fi &&
mkdir path2 path3 path4 &&
date >path2/file2 &&
date >path2-junk &&
date >path3/file3 &&
date >path3-junk &&
git update-index --add path3-junk path3/file3
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 1 - setup
expecting success:
cat >expected1 <<-\EOF &&
expected1
expected2
expected3
output
path0
path1
path2-junk
path2/file2
EOF
sed -e "s|path2/file2|path2/|" <expected1 >expected2 &&
cp expected2 expected3 &&
echo path4/ >>expected2
ok 2 - setup: expected output
expecting success:
git ls-files --others >output &&
test_cmp expected1 output
ok 3 - ls-files --others
expecting success:
git ls-files --others --directory >output &&
test_cmp expected2 output
ok 4 - ls-files --others --directory
expecting success:
git ls-files --others --directory --no-empty-directory >output &&
test_cmp expected3 output
ok 5 - --no-empty-directory hides empty directory
expecting success:
mkdir not-a-submodule &&
echo foo >not-a-submodule/.git &&
git ls-files -o >output &&
test_cmp expected1 output
ok 6 - ls-files --others handles non-submodule .git
expecting success:
git init super &&
git init sub &&
(
cd sub &&
>a &&
git add a &&
git commit -m sub &&
git pack-refs --all
) &&
(
cd super &&
"$SHELL_PATH" "$TEST_DIRECTORY/../contrib/workdir/git-new-workdir" ../sub sub &&
git ls-files --others --exclude-standard >../actual
) &&
echo sub/ >expect &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3000-ls-files-others/super/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3000-ls-files-others/sub/.git/
[master (root-commit) 3a6b099] sub
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a
ok 7 - ls-files --others with symlinked submodule
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2403-worktree-move.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2403-worktree-move/.git/
expecting success:
test_commit init &&
git worktree add source &&
git worktree list --porcelain >out &&
grep "^worktree" out >actual &&
cat <<-EOF >expected &&
worktree $(pwd)
worktree $(pwd)/source
EOF
test_cmp expected actual
[master (root-commit) 2519212] init
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 init.t
Preparing worktree (new branch 'source')
HEAD is now at 2519212 init
ok 1 - setup
expecting success:
test_must_fail git worktree lock .
fatal: The main working tree cannot be locked or unlocked
ok 2 - lock main worktree
expecting success:
git worktree lock --reason hahaha source &&
echo hahaha >expected &&
test_cmp expected .git/worktrees/source/locked
ok 3 - lock linked worktree
expecting success:
rm .git/worktrees/source/locked &&
git worktree add elsewhere &&
git -C elsewhere worktree lock --reason hahaha ../source &&
echo hahaha >expected &&
test_cmp expected .git/worktrees/source/locked
Preparing worktree (new branch 'elsewhere')
HEAD is now at 2519212 init
ok 4 - lock linked worktree from another worktree
expecting success:
test_must_fail git worktree lock source &&
echo hahaha >expected &&
test_cmp expected .git/worktrees/source/locked
fatal: 'source' is already locked, reason: hahaha
ok 5 - lock worktree twice
expecting success:
test_must_fail git -C source worktree lock . &&
echo hahaha >expected &&
test_cmp expected .git/worktrees/source/locked
fatal: '.' is already locked, reason: hahaha
ok 6 - lock worktree twice (from the locked worktree)
expecting success:
test_must_fail git worktree unlock .
fatal: The main working tree cannot be locked or unlocked
ok 7 - unlock main worktree
expecting success:
git worktree unlock source &&
test_path_is_missing .git/worktrees/source/locked
ok 8 - unlock linked worktree
expecting success:
test_must_fail git worktree unlock source &&
test_path_is_missing .git/worktrees/source/locked
fatal: 'source' is not locked
ok 9 - unlock worktree twice
expecting success:
mkdir abc &&
test_must_fail git worktree move abc def
fatal: 'abc' is not a working tree
ok 10 - move non-worktree
expecting success:
git worktree lock source &&
test_when_finished "git worktree unlock source" &&
test_must_fail git worktree move source destination
fatal: cannot move a locked working tree;
use 'move -f -f' to override or unlock first
ok 11 - move locked worktree
expecting success:
git worktree move source destination &&
test_path_is_missing source &&
git worktree list --porcelain >out &&
grep "^worktree.*/destination$" out &&
! grep "^worktree.*/source$" out &&
git -C destination log --format=%s >actual2 &&
echo init >expected2 &&
test_cmp expected2 actual2
worktree /<<PKGBUILDDIR>>/t/trash directory.t2403-worktree-move/destination
ok 12 - move worktree
expecting success:
test_must_fail git worktree move . def
fatal: '.' is a main working tree
ok 13 - move main worktree
expecting success:
mkdir some-dir &&
git worktree move destination some-dir &&
test_when_finished "git worktree move some-dir/destination destination" &&
test_path_is_missing destination &&
git worktree list --porcelain >out &&
grep "^worktree.*/some-dir/destination$" out &&
git -C some-dir/destination log --format=%s >actual2 &&
echo init >expected2 &&
test_cmp expected2 actual2
worktree /<<PKGBUILDDIR>>/t/trash directory.t2403-worktree-move/some-dir/destination
ok 14 - move worktree to another dir
expecting success:
test_when_finished "
git worktree unlock flump || :
git worktree remove flump || :
git worktree unlock ploof || :
git worktree remove ploof || :
" &&
git worktree add --detach flump &&
git worktree lock flump &&
test_must_fail git worktree move flump ploof" &&
test_must_fail git worktree move --force flump ploof" &&
git worktree move --force --force flump ploof
Preparing worktree (detached HEAD 2519212)
HEAD is now at 2519212 init
fatal: cannot move a locked working tree;
use 'move -f -f' to override or unlock first
fatal: 'flump' is not a working tree
fatal: 'flump' is not a working tree
ok 15 - move locked worktree (force)
expecting success:
git init withsub &&
(
cd withsub &&
test_commit initial &&
git submodule add "$PWD"/.git sub &&
git commit -m withsub &&
git worktree add second HEAD &&
git worktree move second third
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2403-worktree-move/withsub/.git/
[master (root-commit) 5e30013] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2403-worktree-move/withsub/sub'...
done.
[master 22b4ca8] withsub
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub
Preparing worktree (detached HEAD 22b4ca8)
HEAD is now at 22b4ca8 withsub
ok 16 - move a repo with uninitialized submodule
expecting success:
(
cd withsub &&
git -C third submodule update &&
test_must_fail git worktree move third forth
)
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2403-worktree-move/withsub/third/sub'...
done.
Submodule path 'sub': checked out '5e3001300c8a533bee3e24efd70fbfae3dfa27e3'
fatal: working trees containing submodules cannot be moved or removed
ok 17 - not move a repo with initialized submodule
expecting success:
test_must_fail git worktree remove .
fatal: '.' is a main working tree
ok 18 - remove main worktree
expecting success:
git worktree lock destination &&
test_when_finished "git worktree unlock destination" &&
test_must_fail git worktree remove destination
fatal: cannot remove a locked working tree;
use 'remove -f -f' to override or unlock first
ok 19 - remove locked worktree
expecting success:
echo dirty >>destination/init.t &&
test_when_finished "git -C destination checkout init.t" &&
test_must_fail git worktree remove destination
fatal: 'destination' is dirty, use --force to delete it
Updated 1 path from the index
ok 20 - remove worktree with dirty tracked file
expecting success:
: >destination/untracked &&
test_must_fail git worktree remove destination
fatal: 'destination' is dirty, use --force to delete it
ok 21 - remove worktree with untracked file
expecting success:
git worktree remove --force destination &&
test_path_is_missing destination
ok 22 - force remove worktree with untracked file
expecting success:
git worktree add to-be-gone &&
test -d .git/worktrees/to-be-gone &&
mv to-be-gone gone &&
git worktree remove to-be-gone &&
test_path_is_missing .git/worktrees/to-be-gone
Preparing worktree (new branch 'to-be-gone')
HEAD is now at 2519212 init
ok 23 - remove missing worktree
expecting success:
git worktree add gone-but-locked &&
git worktree lock gone-but-locked &&
test -d .git/worktrees/gone-but-locked &&
mv gone-but-locked really-gone-now &&
test_must_fail git worktree remove gone-but-locked &&
test_path_is_dir .git/worktrees/gone-but-locked
Preparing worktree (new branch 'gone-but-locked')
HEAD is now at 2519212 init
fatal: cannot remove a locked working tree;
use 'remove -f -f' to override or unlock first
ok 24 - NOT remove missing-but-locked worktree
expecting success:
for i in noodle noodle/bork
do
test_must_fail git worktree lock $i 2>err &&
test_i18ngrep "not a working tree" err || return 1
done
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: 'noodle' is not a working tree
fatal: 'noodle/bork' is not a working tree
ok 25 - proper error when worktree not found
expecting success:
git worktree add --detach gumby &&
test_when_finished "git worktree remove gumby || :" &&
git worktree lock gumby &&
test_when_finished "git worktree unlock gumby || :" &&
test_must_fail git worktree remove gumby &&
test_must_fail git worktree remove --force gumby &&
git worktree remove --force --force gumby
Preparing worktree (detached HEAD 2519212)
HEAD is now at 2519212 init
fatal: cannot remove a locked working tree;
use 'remove -f -f' to override or unlock first
fatal: cannot remove a locked working tree;
use 'remove -f -f' to override or unlock first
fatal: 'gumby' is not a working tree
fatal: 'gumby' is not a working tree
ok 26 - remove locked worktree (force)
expecting success:
git init moog &&
(
cd moog &&
test_commit bim &&
git worktree add --detach goom &&
test_path_exists .git/worktrees &&
git worktree remove goom &&
test_path_is_missing .git/worktrees
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2403-worktree-move/moog/.git/
[master (root-commit) 89d547b] bim
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bim.t
Preparing worktree (detached HEAD 89d547b)
HEAD is now at 89d547b bim
ok 27 - remove cleans up .git/worktrees when empty
expecting success:
(
cd withsub &&
git worktree add to-remove HEAD &&
git worktree remove to-remove
)
Preparing worktree (detached HEAD 22b4ca8)
HEAD is now at 22b4ca8 withsub
ok 28 - remove a repo with uninitialized submodule
expecting success:
(
cd withsub &&
git worktree add to-remove HEAD &&
git -C to-remove submodule update &&
test_must_fail git worktree remove to-remove
)
Preparing worktree (detached HEAD 22b4ca8)
HEAD is now at 22b4ca8 withsub
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2403-worktree-move/withsub/to-remove/sub'...
done.
Submodule path 'sub': checked out '5e3001300c8a533bee3e24efd70fbfae3dfa27e3'
fatal: working trees containing submodules cannot be moved or removed
ok 29 - not remove a repo with initialized submodule
# passed all 29 test(s)
1..29
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3002-ls-files-dashpath.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3002-ls-files-dashpath/.git/
expecting success: echo frotz >path0 &&
echo frotz >./-foo &&
echo frotz >./--
ok 1 - setup
expecting success: git ls-files --others >output &&
test_cmp output - <<EOF
--
-foo
output
path0
EOF
ok 2 - git ls-files without path restriction.
expecting success: git ls-files --others path0 >output &&
test_cmp output - <<EOF
path0
EOF
ok 3 - git ls-files with path restriction.
expecting success: git ls-files --others -- path0 >output &&
test_cmp output - <<EOF
path0
EOF
ok 4 - git ls-files with path restriction with --.
expecting success: git ls-files --others -- -- >output &&
test_cmp output - <<EOF
--
EOF
ok 5 - git ls-files with path restriction with -- --.
expecting success: git ls-files --others -- >output &&
test_cmp output - <<EOF
--
-foo
output
path0
EOF
ok 6 - git ls-files with no path restriction.
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3003-ls-files-exclude.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3003-ls-files-exclude/.git/
expecting success:
echo content >file &&
git add file &&
git commit -m file &&
echo modification >file
[master (root-commit) 2049b30] file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 1 - create repo with file
expecting success:
echo 'file' >expect &&
git ls-files --exclude-standard --cached >output &&
test_cmp expect output
ok 2 - ls-files output contains file (cached)
expecting success:
echo 'file' >expect &&
git ls-files --exclude-standard --modified >output &&
test_cmp expect output
ok 3 - ls-files output contains file (modified)
expecting success:
echo file >.gitignore
ok 4 - add file to gitignore
expecting success:
echo 'file' >expect &&
git ls-files --exclude-standard --cached >output &&
test_cmp expect output
ok 5 - ls-files output contains file (cached)
expecting success:
echo 'file' >expect &&
git ls-files --exclude-standard --modified >output &&
test_cmp expect output
ok 6 - ls-files output contains file (modified)
expecting success:
echo content >other-file &&
git add other-file &&
echo file >expect &&
git ls-files -i --exclude-standard >output &&
test_cmp expect output
ok 7 - ls-files -i lists only tracked-but-ignored files
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3001-ls-files-others-exclude.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3001-ls-files-others-exclude/.git/
expecting success: git ls-files --others \
--exclude=\*.6 \
--exclude-per-directory=.gitignore \
--exclude-from=.git/ignore \
>output &&
test_cmp expect output
ok 1 - git ls-files --others with various exclude options.
expecting success: git ls-files --others \
--exclude=\*.6 \
--exclude-per-directory=.gitignore \
--exclude-from=.git/ignore \
>output &&
test_cmp expect output
ok 2 - git ls-files --others with \r\n line endings.
expecting success:
git add $allignores &&
git update-index --skip-worktree $allignores &&
rm $allignores
ok 3 - setup skip-worktree gitignore
expecting success: git ls-files --others \
--exclude=\*.6 \
--exclude-per-directory=.gitignore \
--exclude-from=.git/ignore \
>output &&
test_cmp expect output
ok 4 - git ls-files --others with various exclude options.
expecting success:
git checkout --ignore-skip-worktree-bits $allignores &&
rm .git/index
Updated 3 paths from the index
ok 5 - restore gitignore
expecting success: test_cmp expect output
ok 6 - git status honors core.excludesfile
expecting success:
git ls-files --others --exclude=one/ >output &&
if grep "^one/" output
then
echo Ooops
false
else
: happy
fi
ok 7 - trailing slash in exclude allows directory match(1)
expecting success:
git ls-files --others --exclude=one/two/ >output &&
if grep "^one/two/" output
then
echo Ooops
false
else
: happy
fi
ok 8 - trailing slash in exclude allows directory match (2)
expecting success:
>two &&
git ls-files --others --exclude=two/ >output &&
grep "^two" output
two
ok 9 - trailing slash in exclude forces directory match (1)
expecting success:
git ls-files --others --exclude=one/a.1/ >output &&
grep "^one/a.1" output
one/a.1
ok 10 - trailing slash in exclude forces directory match (2)
expecting success:
git ls-files --others --exclude="a.*" --exclude="!a.1" >output &&
grep "^a.1" output
a.1
ok 11 - negated exclude matches can override previous ones
expecting success:
git ls-files --others --exclude="one" --exclude="!one/a.1" >output &&
if grep "^one/a.1" output
then
false
fi
ok 12 - excluded directory overrides content patterns
expecting success:
git ls-files --others --exclude="!one" --exclude="one/a.1" >output &&
if grep "^one/a.1" output
then
false
fi
ok 13 - negated directory doesn't affect content patterns
expecting success:
mkdir -p top/l1/l2 &&
(
cd top &&
git init &&
echo /.gitignore >.gitignore &&
echo l1 >>.gitignore &&
echo l2 >l1/.gitignore &&
>l1/l2/l1
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3001-ls-files-others-exclude/top/.git/
ok 14 - subdirectory ignore (setup)
expecting success:
(
cd top &&
git ls-files -o --exclude-standard
) >actual &&
test_must_be_empty actual
ok 15 - subdirectory ignore (toplevel)
expecting success:
(
cd top/l1/l2 &&
git ls-files -o --exclude-standard
) >actual &&
test_must_be_empty actual
ok 16 - subdirectory ignore (l1/l2)
expecting success:
(
cd top/l1 &&
git ls-files -o --exclude-standard
) >actual &&
test_must_be_empty actual
ok 17 - subdirectory ignore (l1)
expecting success:
rm top/l1/l2/l1 &&
rm top/l1/.gitignore
ok 18 - show/hide empty ignored directory (setup)
expecting success:
(
cd top &&
git ls-files -o -i --exclude l1 --directory
) >actual &&
echo l1/ >expect &&
test_cmp expect actual
ok 19 - show empty ignored directory with --directory
expecting success:
(
cd top &&
git ls-files -o -i --exclude l1 --directory --no-empty-directory
) >actual &&
test_must_be_empty actual
ok 20 - hide empty ignored directory with --no-empty-directory
expecting success:
> top/l1/tracked &&
(
cd top &&
git add -f l1/tracked
)
ok 21 - show/hide empty ignored sub-directory (setup)
expecting success:
(
cd top &&
git ls-files -o -i --exclude l1 --directory
) >actual &&
echo l1/l2/ >expect &&
test_cmp expect actual
ok 22 - show empty ignored sub-directory with --directory
expecting success:
(
cd top &&
git ls-files -o -i --exclude l1 --directory --no-empty-directory
) >actual &&
test_must_be_empty actual
ok 23 - hide empty ignored sub-directory with --no-empty-directory
expecting success:
git ls-files -i -o --exclude "/three/a.3[abc]" >actual &&
test_must_be_empty actual
ok 24 - pattern matches prefix completely
expecting success:
cat <<\EOF >expect &&
a.1
one/a.1
one/two/a.1
three/a.1
EOF
git ls-files -o -i --exclude "**/a.1" >actual &&
test_cmp expect actual
ok 25 - ls-files with "**" patterns
expecting success:
git ls-files -o -i --exclude "one**a.1" >actual &&
test_must_be_empty actual
ok 26 - ls-files with "**" patterns and no slashes
# passed all 26 test(s)
1..26
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3004-ls-files-basic.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3004-ls-files-basic/.git/
expecting success:
git ls-files >actual &&
test_must_be_empty actual
ok 1 - ls-files in empty repository
expecting success:
git ls-files doesnotexist >actual &&
test_must_be_empty actual
ok 2 - ls-files with nonexistent path
expecting success:
test_expect_code 129 git ls-files --nonsense 2>actual &&
test_i18ngrep "[Uu]sage: git ls-files" actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
usage: git ls-files [<options>] [<file>...]
ok 3 - ls-files with nonsense option
expecting success:
mkdir broken &&
(
cd broken &&
git init &&
>.git/index &&
test_expect_code 129 git ls-files -h >usage 2>&1
) &&
test_i18ngrep "[Uu]sage: git ls-files " broken/usage
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3004-ls-files-basic/broken/.git/
usage: git ls-files [<options>] [<file>...]
ok 4 - ls-files -h in corrupt repository
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:
mkdir subs &&
ln -s nosuch link &&
ln -s ../nosuch subs/link &&
git add link subs/link &&
git ls-files -s link subs/link >expect &&
git ls-files -s "$(pwd)/link" "$(pwd)/subs/link" >actual &&
test_cmp expect actual &&
(
cd subs &&
git ls-files -s link >../expect &&
git ls-files -s "$(pwd)/link" >../actual
) &&
test_cmp expect actual
ok 5 - ls-files with absolute paths to symlinks
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3005-ls-files-relative.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3005-ls-files-relative/.git/
expecting success:
: >never-mind-me &&
git add never-mind-me &&
mkdir top &&
(
cd top &&
mkdir sub &&
x="x xa xbc xdef xghij xklmno" &&
y=$(echo "$x" | tr x y) &&
touch $x &&
touch $y &&
cd sub &&
git add ../x*
)
ok 1 - prepare
expecting success:
(
cd top/sub &&
cat >expect <<-EOF &&
../../never-mind-me
../x
EOF
git ls-files $(cat expect) >actual &&
test_cmp expect actual
)
ok 2 - ls-files with mixed levels
expecting success:
(
cd top/sub &&
for f in ../y*
do
echo "error: pathspec $sq$f$sq did not match any file(s) known to git"
done >expect.err &&
echo "Did you forget to ${sq}git add${sq}?" >>expect.err &&
ls ../x* >expect.out &&
test_must_fail git ls-files -c --error-unmatch ../[xy]* >actual.out 2>actual.err &&
test_cmp expect.out actual.out &&
test_i18ncmp expect.err actual.err
)
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 3 - ls-files -c
expecting success:
(
cd top/sub &&
for f in ../x*
do
echo "error: pathspec $sq$f$sq did not match any file(s) known to git"
done >expect.err &&
echo "Did you forget to ${sq}git add${sq}?" >>expect.err &&
ls ../y* >expect.out &&
test_must_fail git ls-files -o --error-unmatch ../[xy]* >actual.out 2>actual.err &&
test_cmp expect.out actual.out &&
test_i18ncmp expect.err actual.err
)
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 4 - ls-files -o
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3006-ls-files-long.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3006-ls-files-long/.git/
expecting success:
p=filefilefilefilefilefilefilefile &&
p=$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p &&
p=$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p &&
path_a=${p}_a &&
path_z=${p}_z &&
blob_a=$(echo frotz | git hash-object -w --stdin) &&
blob_z=$(echo nitfol | git hash-object -w --stdin) &&
pat="100644 %s 0\t%s\n"
ok 1 - setup
expecting success:
printf "$pat" "$blob_a" "$path_a" |
git update-index --add --index-info &&
echo "$path_a" >expect &&
git ls-files >actual &&
test_cmp expect actual
ok 2 - overly-long path by itself is not a problem
expecting success:
printf "$pat" "$blob_a" "$path_a" "$blob_z" "$path_z" |
git update-index --add --index-info &&
(
echo "$path_a" &&
echo "$path_z"
) >expect &&
git ls-files >actual &&
test_cmp expect actual
ok 3 - overly-long path does not replace another by mistake
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3008-ls-files-lazy-init-name-hash.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3008-ls-files-lazy-init-name-hash/.git/
expecting success:
(
test_seq $LAZY_THREAD_COST | sed "s/^/a_/" &&
echo b/b/b &&
test_seq $LAZY_THREAD_COST | sed "s/^/c_/" &&
test_seq 50 | sed "s/^/d_/" | tr "\n" "/" && echo d
) |
sed "s/^/100644 $EMPTY_BLOB /" |
git update-index --index-info &&
test-tool lazy-init-name-hash -m
0.005780 0.012234 4002 multi 2
ok 1 - no buffer overflow in lazy_init_name_hash
# passed all 1 test(s)
1..1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3009-ls-files-others-nonsubmodule.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3009-ls-files-others-nonsubmodule/.git/
expecting success:
mkdir nonrepo-no-files/ &&
mkdir nonrepo-untracked-file &&
: >nonrepo-untracked-file/untracked &&
git init repo-no-commit-no-files &&
git init repo-no-commit-untracked-file &&
: >repo-no-commit-untracked-file/untracked &&
git init repo-with-commit-no-files &&
git -C repo-with-commit-no-files commit --allow-empty -mmsg &&
git init repo-with-commit-untracked-file &&
test_commit -C repo-with-commit-untracked-file msg &&
: >repo-with-commit-untracked-file/untracked
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3009-ls-files-others-nonsubmodule/repo-no-commit-no-files/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3009-ls-files-others-nonsubmodule/repo-no-commit-untracked-file/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3009-ls-files-others-nonsubmodule/repo-with-commit-no-files/.git/
[master (root-commit) f2694ec] msg
Author: A U Thor <author@example.com>
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3009-ls-files-others-nonsubmodule/repo-with-commit-untracked-file/.git/
[master (root-commit) c24fc06] msg
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 msg.t
ok 1 - setup: directories
expecting success:
git ls-files -o >output &&
cat >expect <<-EOF &&
nonrepo-untracked-file/untracked
output
repo-no-commit-no-files/
repo-no-commit-untracked-file/
repo-with-commit-no-files/
repo-with-commit-untracked-file/
EOF
test_cmp expect output
ok 2 - ls-files --others handles untracked git repositories
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3010-ls-files-killed-modified.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3010-ls-files-killed-modified/.git/
expecting success:
date >path0 &&
test_ln_s_add xyzzy path1 &&
mkdir path2 path3 pathx &&
date >path2/file2 &&
date >path3/file3 &&
>pathx/ju &&
: >path7 &&
date >path8 &&
: >path9 &&
date >path10 &&
git update-index --add -- path0 path?/file? pathx/ju path7 path8 path9 path10 &&
git init submod1 &&
git -C submod1 commit --allow-empty -m "empty 1" &&
git init submod2 &&
git -C submod2 commit --allow-empty -m "empty 2" &&
git update-index --add submod[12] &&
(
cd submod1 &&
git commit --allow-empty -m "empty 1 (updated)"
) &&
rm -fr path? # leave path10 alone
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.t3010-ls-files-killed-modified/submod1/.git/
[master (root-commit) 0ed02b7] empty 1
Author: A U Thor <author@example.com>
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3010-ls-files-killed-modified/submod2/.git/
[master (root-commit) 8b0a5d0] empty 2
Author: A U Thor <author@example.com>
[master 9edd946] empty 1 (updated)
Author: A U Thor <author@example.com>
ok 1 - git update-index --add to add various paths.
expecting success:
date >path2 &&
if test_have_prereq SYMLINKS
then
ln -s frotz path3 &&
ln -s nitfol path5
else
date >path3 &&
date >path5
fi &&
mkdir -p path0 path1 path6 pathx/ju &&
date >path0/file0 &&
date >path1/file1 &&
date >path6/file6 &&
date >path7 &&
: >path8 &&
: >path9 &&
touch path10 &&
>pathx/ju/nk &&
cat >.expected <<-\EOF
path0/file0
path1/file1
path2
path3
pathx/ju/nk
EOF
ok 2 - git ls-files -k to show killed files.
expecting success:
git ls-files -k >.output &&
test_cmp .expected .output
ok 3 - git ls-files -k output (w/o icase)
expecting success:
git -c core.ignorecase=true ls-files -k >.output &&
test_cmp .expected .output
ok 4 - git ls-files -k output (w/ icase)
expecting success:
git ls-files -m >.output
ok 5 - git ls-files -m to show modified files.
expecting success:
cat >.expected <<-\EOF &&
path0
path1
path2/file2
path3/file3
path7
path8
pathx/ju
submod1
EOF
test_cmp .expected .output
ok 6 - validate git ls-files -m output.
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3020-ls-files-error-unmatch.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3020-ls-files-error-unmatch/.git/
expecting success:
touch foo bar &&
git update-index --add foo bar &&
git commit -m "add foo bar"
[master (root-commit) 0443ddc] add foo bar
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 bar
create mode 100644 foo
ok 1 - setup
expecting success: test_must_fail git ls-files --error-unmatch foo bar-does-not-match
error: pathspec 'bar-does-not-match' did not match any file(s) known to git
Did you forget to 'git add'?
foo
ok 2 - git ls-files --error-unmatch should fail with unmatched path.
expecting success: git ls-files --error-unmatch foo bar
bar
foo
ok 3 - git ls-files --error-unmatch should succeed with matched paths.
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3007-ls-files-recurse-submodules.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3007-ls-files-recurse-submodules/.git/
expecting success:
echo a >a &&
mkdir b &&
echo b >b/b &&
git add a b &&
git commit -m "add a and b" &&
git init submodule &&
echo c >submodule/c &&
git -C submodule add c &&
git -C submodule commit -m "add c" &&
git submodule add ./submodule &&
git commit -m "added submodule"
[master (root-commit) 3ef563e] add a and b
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 a
create mode 100644 b/b
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3007-ls-files-recurse-submodules/submodule/.git/
[master (root-commit) 737a60d] add c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c
Adding existing repo at 'submodule' to the index
[master 9ea795a] added submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 submodule
ok 1 - setup directory structure and submodules
expecting success:
cat >expect <<-\EOF &&
.gitmodules
a
b/b
submodule/c
EOF
git ls-files --recurse-submodules >actual &&
test_cmp expect actual
ok 2 - ls-files correctly outputs files in submodule
expecting success:
lf_to_nul >expect <<-\EOF &&
.gitmodules
a
b/b
submodule/c
EOF
git ls-files --recurse-submodules -z >actual &&
test_cmp expect actual
ok 3 - ls-files correctly outputs files in submodule with -z
expecting success:
cat >expect <<-\EOF &&
.gitmodules
a
b/b
submodule/c
EOF
echo a >not_added &&
echo b >b/not_added &&
echo c >submodule/not_added &&
git ls-files --recurse-submodules >actual &&
test_cmp expect actual
ok 4 - ls-files does not output files not added to a repo
expecting success:
cat >expect <<-\EOF &&
.gitmodules
a
b/b
submodule/.gitmodules
submodule/c
submodule/subsub/d
EOF
git init submodule/subsub &&
echo d >submodule/subsub/d &&
git -C submodule/subsub add d &&
git -C submodule/subsub commit -m "add d" &&
git -C submodule submodule add ./subsub &&
git -C submodule commit -m "added subsub" &&
git submodule absorbgitdirs &&
git ls-files --recurse-submodules >actual &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3007-ls-files-recurse-submodules/submodule/subsub/.git/
[master (root-commit) 612a668] add d
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 d
Adding existing repo at 'subsub' to the index
[master f84437b] added subsub
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 subsub
Migrating git directory of 'submodule' from
'/<<PKGBUILDDIR>>/t/trash directory.t3007-ls-files-recurse-submodules/submodule/.git' to
'/<<PKGBUILDDIR>>/t/trash directory.t3007-ls-files-recurse-submodules/.git/modules/submodule'
Migrating git directory of 'submodule/subsub' from
'/<<PKGBUILDDIR>>/t/trash directory.t3007-ls-files-recurse-submodules/submodule/subsub/.git' to
'/<<PKGBUILDDIR>>/t/trash directory.t3007-ls-files-recurse-submodules/.git/modules/submodule/modules/subsub'
ok 5 - ls-files recurses more than 1 level
expecting success:
cat >expect <<-\EOF &&
.gitmodules
c
subsub/d
EOF
git --git-dir=submodule/.git ls-files --recurse-submodules >actual &&
test_cmp expect actual
ok 6 - ls-files works with GIT_DIR
expecting success:
echo e >submodule/subsub/e.txt &&
git -C submodule/subsub add e.txt &&
git -C submodule/subsub commit -m "adding e.txt" &&
echo f >submodule/f.TXT &&
echo g >submodule/g.txt &&
git -C submodule add f.TXT g.txt &&
git -C submodule commit -m "add f and g" &&
echo h >h.txt &&
mkdir sib &&
echo sib >sib/file &&
git add h.txt sib/file &&
git commit -m "add h and sib/file" &&
git init sub &&
echo sub >sub/file &&
git -C sub add file &&
git -C sub commit -m "add file" &&
git submodule add ./sub &&
git commit -m "added sub" &&
cat >expect <<-\EOF &&
.gitmodules
a
b/b
h.txt
sib/file
sub/file
submodule/.gitmodules
submodule/c
submodule/f.TXT
submodule/g.txt
submodule/subsub/d
submodule/subsub/e.txt
EOF
git ls-files --recurse-submodules >actual &&
test_cmp expect actual &&
cat actual &&
git ls-files --recurse-submodules "*" >actual &&
test_cmp expect actual
[master 5a48b7a] adding e.txt
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 e.txt
[master 68fe81f] add f and g
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 f.TXT
create mode 100644 g.txt
[master 3829976] add h and sib/file
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 h.txt
create mode 100644 sib/file
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3007-ls-files-recurse-submodules/sub/.git/
[master (root-commit) 7deb283] add file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Adding existing repo at 'sub' to the index
[master acf73eb] added sub
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 160000 sub
.gitmodules
a
b/b
h.txt
sib/file
sub/file
submodule/.gitmodules
submodule/c
submodule/f.TXT
submodule/g.txt
submodule/subsub/d
submodule/subsub/e.txt
ok 7 - --recurse-submodules and pathspecs setup
expecting success:
test_when_finished "git config --bool submodule.submodule.active true" &&
test_when_finished "git -C submodule config --bool submodule.subsub.active true" &&
git config --bool submodule.submodule.active "false" &&
cat >expect <<-\EOF &&
.gitmodules
a
b/b
h.txt
sib/file
sub/file
submodule
EOF
git ls-files --recurse-submodules >actual &&
test_cmp expect actual &&
git config --bool submodule.submodule.active "true" &&
git -C submodule config --bool submodule.subsub.active "false" &&
cat >expect <<-\EOF &&
.gitmodules
a
b/b
h.txt
sib/file
sub/file
submodule/.gitmodules
submodule/c
submodule/f.TXT
submodule/g.txt
submodule/subsub
EOF
git ls-files --recurse-submodules >actual &&
test_cmp expect actual
ok 8 - inactive submodule
expecting success:
cat >expect <<-\EOF &&
h.txt
submodule/g.txt
submodule/subsub/e.txt
EOF
git ls-files --recurse-submodules "*.txt" >actual &&
test_cmp expect actual
ok 9 - --recurse-submodules and pathspecs
expecting success:
cat >expect <<-\EOF &&
h.txt
submodule/f.TXT
submodule/g.txt
submodule/subsub/e.txt
EOF
git ls-files --recurse-submodules ":(icase)*.txt" >actual &&
test_cmp expect actual
ok 10 - --recurse-submodules and pathspecs
expecting success:
cat >expect <<-\EOF &&
h.txt
submodule/f.TXT
submodule/g.txt
EOF
git ls-files --recurse-submodules ":(icase)*.txt" ":(exclude)submodule/subsub/*" >actual &&
test_cmp expect actual
ok 11 - --recurse-submodules and pathspecs
expecting success:
cat >expect <<-\EOF &&
sub/file
EOF
git ls-files --recurse-submodules "sub" >actual &&
test_cmp expect actual &&
git ls-files --recurse-submodules "sub/" >actual &&
test_cmp expect actual &&
git ls-files --recurse-submodules "sub/file" >actual &&
test_cmp expect actual &&
git ls-files --recurse-submodules "su*/file" >actual &&
test_cmp expect actual &&
git ls-files --recurse-submodules "su?/file" >actual &&
test_cmp expect actual
ok 12 - --recurse-submodules and pathspecs
expecting success:
cat >expect <<-\EOF &&
sib/file
sub/file
EOF
git ls-files --recurse-submodules "s??/file" >actual &&
test_cmp expect actual &&
git ls-files --recurse-submodules "s???file" >actual &&
test_cmp expect actual &&
git ls-files --recurse-submodules "s*file" >actual &&
test_cmp expect actual
ok 13 - --recurse-submodules and pathspecs
expecting success:
# From subdir
cat >expect <<-\EOF &&
b
EOF
git -C b ls-files --recurse-submodules >actual &&
test_cmp expect actual &&
# Relative path to top
cat >expect <<-\EOF &&
../.gitmodules
../a
b
../h.txt
../sib/file
../sub/file
../submodule/.gitmodules
../submodule/c
../submodule/f.TXT
../submodule/g.txt
../submodule/subsub/d
../submodule/subsub/e.txt
EOF
git -C b ls-files --recurse-submodules -- .. >actual &&
test_cmp expect actual &&
# Relative path to submodule
cat >expect <<-\EOF &&
../submodule/.gitmodules
../submodule/c
../submodule/f.TXT
../submodule/g.txt
../submodule/subsub/d
../submodule/subsub/e.txt
EOF
git -C b ls-files --recurse-submodules -- ../submodule >actual &&
test_cmp expect actual
ok 14 - --recurse-submodules and relative paths
expecting success:
test_must_fail git ls-files --recurse-submodules --error-unmatch 2>actual &&
test_i18ngrep "does not support --error-unmatch" actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: ls-files --recurse-submodules does not support --error-unmatch
ok 15 - --recurse-submodules does not support --error-unmatch
expecting success:
test_must_fail git ls-files --recurse-submodules --deleted 2>actual &&
test_i18ngrep 'unsupported mode' actual
fatal: ls-files --recurse-submodules unsupported mode
ok 16 - --recurse-submodules and --deleted are incompatible
expecting success:
test_must_fail git ls-files --recurse-submodules --modified 2>actual &&
test_i18ngrep 'unsupported mode' actual
fatal: ls-files --recurse-submodules unsupported mode
ok 17 - --recurse-submodules and --modified are incompatible
expecting success:
test_must_fail git ls-files --recurse-submodules --others 2>actual &&
test_i18ngrep 'unsupported mode' actual
fatal: ls-files --recurse-submodules unsupported mode
ok 18 - --recurse-submodules and --others are incompatible
expecting success:
test_must_fail git ls-files --recurse-submodules --stage 2>actual &&
test_i18ngrep 'unsupported mode' actual
fatal: ls-files --recurse-submodules unsupported mode
ok 19 - --recurse-submodules and --stage are incompatible
expecting success:
test_must_fail git ls-files --recurse-submodules --killed 2>actual &&
test_i18ngrep 'unsupported mode' actual
fatal: ls-files --recurse-submodules unsupported mode
ok 20 - --recurse-submodules and --killed are incompatible
expecting success:
test_must_fail git ls-files --recurse-submodules --unmerged 2>actual &&
test_i18ngrep 'unsupported mode' actual
fatal: ls-files --recurse-submodules unsupported mode
ok 21 - --recurse-submodules and --unmerged are incompatible
# passed all 21 test(s)
1..21
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2400-worktree-add.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/.git/
expecting success:
test_commit init
[master (root-commit) 2519212] init
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 init.t
ok 1 - setup
expecting success:
mkdir -p existing/subtree &&
test_must_fail git worktree add --detach existing master
fatal: 'existing' already exists
Preparing worktree (detached HEAD 2519212)
ok 2 - "add" an existing worktree
expecting success:
mkdir existing_empty &&
git worktree add --detach existing_empty master
Preparing worktree (detached HEAD 2519212)
HEAD is now at 2519212 init
ok 3 - "add" an existing empty worktree
expecting success:
test_must_fail git worktree add existing_short -
fatal: invalid reference: @{-1}
ok 4 - "add" using shorthand - fails when no previous branch
expecting success:
git checkout -b newbranch &&
echo hello >myworld &&
git add myworld &&
git commit -m myworld &&
git checkout master &&
git worktree add short-hand - &&
echo refs/heads/newbranch >expect &&
git -C short-hand rev-parse --symbolic-full-name HEAD >actual &&
test_cmp expect actual
Switched to a new branch 'newbranch'
[newbranch 5ae2ce4] myworld
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 myworld
Switched to branch 'master'
Preparing worktree (checking out '@{-1}')
HEAD is now at 5ae2ce4 myworld
ok 5 - "add" using - shorthand
expecting success:
test_must_fail git worktree add zere master &&
! test -d zere &&
! test -d .git/worktrees/zere
fatal: 'master' is already checked out at '/<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add'
Preparing worktree (checking out 'master')
ok 6 - "add" refuses to checkout locked branch
expecting success:
(
cd existing_empty &&
echo dirty >>init.t &&
git checkout master -- init.t
)
ok 7 - checking out paths not complaining about linked checkouts
expecting success:
git rev-parse HEAD >expect &&
git worktree add --detach here master &&
(
cd here &&
test_cmp ../init.t init.t &&
test_must_fail git symbolic-ref HEAD &&
git rev-parse HEAD >actual &&
test_cmp ../expect actual &&
git fsck
)
Preparing worktree (detached HEAD 2519212)
HEAD is now at 2519212 init
fatal: ref HEAD is not a symbolic ref
ok 8 - "add" worktree
expecting success:
git rev-parse HEAD >expect &&
git worktree add --detach --lock here-with-lock master &&
test -f .git/worktrees/here-with-lock/locked
Preparing worktree (detached HEAD 2519212)
HEAD is now at 2519212 init
ok 9 - "add" worktree with lock
expecting success:
(
mkdir sub &&
cd sub &&
git worktree add --detach here master &&
cd here &&
test_cmp ../../init.t init.t
)
Preparing worktree (detached HEAD 2519212)
HEAD is now at 2519212 init
ok 10 - "add" worktree from a subdir
expecting success:
(
cd here &&
git worktree add --detach nested-here master &&
cd nested-here &&
git fsck
)
Preparing worktree (detached HEAD 2519212)
HEAD is now at 2519212 init
ok 11 - "add" from a linked checkout
expecting success:
git worktree add -b newmaster there master &&
(
cd there &&
test_cmp ../init.t init.t &&
git symbolic-ref HEAD >actual &&
echo refs/heads/newmaster >expect &&
test_cmp expect actual &&
git fsck
)
Preparing worktree (new branch 'newmaster')
HEAD is now at 2519212 init
ok 12 - "add" worktree creating new branch
expecting success:
(
cd here &&
test_must_fail git checkout newmaster
)
fatal: 'newmaster' is already checked out at '/<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/there'
ok 13 - die the same branch is already checked out
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:
head=$(git -C there rev-parse --git-path HEAD) &&
ref=$(git -C there symbolic-ref HEAD) &&
rm "$head" &&
ln -s "$ref" "$head" &&
test_must_fail git -C here checkout newmaster
fatal: 'newmaster' is already checked out at '/<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/there'
ok 14 - die the same branch is already checked out (symlink)
expecting success:
(
cd here &&
git worktree add --force anothernewmaster newmaster
)
Preparing worktree (checking out 'newmaster')
HEAD is now at 2519212 init
ok 15 - not die the same branch is already checked out
expecting success:
(
cd there &&
git checkout newmaster
)
Already on 'newmaster'
ok 16 - not die on re-checking out current branch
expecting success:
(
git clone --bare . bare &&
cd bare &&
git worktree add -b bare-master ../there2 master
)
Cloning into bare repository 'bare'...
done.
Preparing worktree (new branch 'bare-master')
HEAD is now at 2519212 init
ok 17 - "add" from a bare repo
expecting success:
(
cd bare &&
test_must_fail git checkout master
)
fatal: this operation must be run in a work tree
ok 18 - checkout from a bare repo without "add"
expecting success:
(
git clone --bare . bare2 &&
cd bare2 &&
git worktree add ../there3 master
)
Cloning into bare repository 'bare2'...
done.
Preparing worktree (checking out 'master')
HEAD is now at 2519212 init
ok 19 - "add" default branch of a bare repo
expecting success:
test_when_finished rm .git/info/grafts &&
test_commit abc &&
SHA1=$(git rev-parse HEAD) &&
test_commit def &&
test_commit xyz &&
echo "$(git rev-parse HEAD) $SHA1" >.git/info/grafts &&
cat >expected <<-\EOF &&
xyz
abc
EOF
git log --format=%s -2 >actual &&
test_cmp expected actual &&
git worktree add --detach grafted master &&
git --git-dir=grafted/.git log --format=%s -2 >actual &&
test_cmp expected actual
[master 6d278e0] abc
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 abc.t
[master 3c13a14] def
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 def.t
[master a51b5be] xyz
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 xyz.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Preparing worktree (detached HEAD a51b5be)
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
HEAD is now at a51b5be xyz
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 20 - checkout with grafts
expecting success:
test_commit a &&
test_commit b &&
test_commit c &&
git rev-parse HEAD~1 >expected &&
git worktree add relhead HEAD~1 &&
git -C relhead rev-parse HEAD >actual &&
test_cmp expected actual
[master e9a6308] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a.t
[master 15d3bfc] b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b.t
[master 179a9e0] c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c.t
Preparing worktree (detached HEAD 15d3bfc)
HEAD is now at 15d3bfc b
ok 21 - "add" from relative HEAD
expecting success:
git worktree add -b burble flornk &&
test_cmp_rev HEAD burble
Preparing worktree (new branch 'burble')
HEAD is now at 179a9e0 c
ok 22 - "add -b" with <branch> omitted
expecting success:
git worktree add --detach fishhook &&
git rev-parse HEAD >expected &&
git -C fishhook rev-parse HEAD >actual &&
test_cmp expected actual &&
test_must_fail git -C fishhook symbolic-ref HEAD
Preparing worktree (detached HEAD 179a9e0)
HEAD is now at 179a9e0 c
fatal: ref HEAD is not a symbolic ref
ok 23 - "add --detach" with <branch> omitted
expecting success:
git worktree add wiffle/bat &&
test_cmp_rev HEAD bat
Preparing worktree (new branch 'bat')
HEAD is now at 179a9e0 c
ok 24 - "add" with <branch> omitted
expecting success:
git branch dwim HEAD~1 &&
git worktree add dwim &&
test_cmp_rev HEAD~1 dwim &&
(
cd dwim &&
test_cmp_rev HEAD dwim
)
Preparing worktree (checking out 'dwim')
HEAD is now at 15d3bfc b
ok 25 - "add" checks out existing branch of dwimd name
expecting success:
git checkout -b test-branch &&
test_must_fail git worktree add test-branch &&
test_path_is_missing test-branch
Switched to a new branch 'test-branch'
fatal: 'test-branch' is already checked out at '/<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add'
Preparing worktree (checking out 'test-branch')
ok 26 - "add <path>" dwim fails with checked out branch
expecting success:
git checkout test-branch &&
git worktree add --force test-branch
Already on 'test-branch'
Preparing worktree (checking out 'test-branch')
HEAD is now at 179a9e0 c
ok 27 - "add --force" with existing dwimd name doesnt die
expecting success:
git worktree add --detach mish/mash &&
test_must_fail git rev-parse mash -- &&
test_must_fail git -C mish/mash symbolic-ref HEAD
Preparing worktree (detached HEAD 179a9e0)
HEAD is now at 179a9e0 c
fatal: bad revision 'mash'
fatal: ref HEAD is not a symbolic ref
ok 28 - "add" no auto-vivify with --detach and <branch> omitted
expecting success:
test_must_fail git worktree add -b poodle -B poodle bamboo master
fatal: -b, -B, and --detach are mutually exclusive
ok 29 - "add" -b/-B mutually exclusive
expecting success:
test_must_fail git worktree add -b poodle --detach bamboo master
fatal: -b, -B, and --detach are mutually exclusive
ok 30 - "add" -b/--detach mutually exclusive
expecting success:
test_must_fail git worktree add -B poodle --detach bamboo master
fatal: -b, -B, and --detach are mutually exclusive
ok 31 - "add" -B/--detach mutually exclusive
expecting success:
git rev-parse newmaster >before &&
test_must_fail git worktree add -B newmaster bamboo master &&
git rev-parse newmaster >after &&
test_cmp before after
fatal: 'newmaster' is already checked out at '/<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/there'
ok 32 - "add -B" fails if the branch is checked out
expecting success:
git worktree add -B poodle bamboo2 master^ &&
git -C bamboo2 symbolic-ref HEAD >actual &&
echo refs/heads/poodle >expected &&
test_cmp expected actual &&
test_cmp_rev master^ poodle
Preparing worktree (new branch 'poodle')
HEAD is now at 15d3bfc b
ok 33 - add -B
expecting success:
git worktree add --quiet another-worktree master 2>actual &&
test_must_be_empty actual
ok 34 - add --quiet
expecting success:
git clone --local here here-clone &&
( cd here-clone && git fsck )
Cloning into 'here-clone'...
done.
ok 35 - local clone from linked checkout
expecting success:
git -C bare worktree add --detach ../baretree &&
git clone --local --shared baretree bare-clone &&
grep /bare/ bare-clone/.git/objects/info/alternates
Preparing worktree (detached HEAD 2519212)
HEAD is now at 2519212 init
Cloning into 'bare-clone'...
done.
/<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/bare/objects
ok 36 - local clone --shared from linked checkout
expecting success:
git worktree add --no-checkout -b swamp swamp &&
! test -e swamp/init.t &&
git -C swamp reset --hard &&
test_cmp init.t swamp/init.t
Preparing worktree (new branch 'swamp')
HEAD is now at 179a9e0 c
ok 37 - "add" worktree with --no-checkout
expecting success:
git worktree add --checkout -b swmap2 swamp2 &&
test_cmp init.t swamp2/init.t
Preparing worktree (new branch 'swmap2')
HEAD is now at 179a9e0 c
ok 38 - "add" worktree with --checkout
expecting success:
git worktree add under-rebase &&
(
cd under-rebase &&
set_fake_editor &&
FAKE_LINES="edit 1" git rebase -i HEAD^ &&
git worktree list | grep "under-rebase.*detached HEAD"
)
Preparing worktree (new branch 'under-rebase')
HEAD is now at 179a9e0 c
rebase -i script before editing:
pick 179a9e0 c
rebase -i script after editing:
edit 179a9e0 c
Rebasing (1/1)
Stopped at 179a9e0... c
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
/<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/under-rebase 179a9e0 (detached HEAD)
ok 39 - put a worktree under rebase
expecting success:
test_must_fail git worktree add new-rebase under-rebase &&
! test -d new-rebase
fatal: 'under-rebase' is already checked out at '/<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/under-rebase'
Preparing worktree (checking out 'under-rebase')
ok 40 - add a worktree, checking out a rebased branch
expecting success:
git worktree add new-place &&
test_must_fail git -C new-place checkout under-rebase
Preparing worktree (new branch 'new-place')
HEAD is now at 179a9e0 c
fatal: 'under-rebase' is already checked out at '/<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/under-rebase'
ok 41 - checking out a rebased branch from another worktree
expecting success:
(
cd under-rebase &&
test_must_fail git branch -D under-rebase
)
error: Cannot delete branch 'under-rebase' checked out at '/<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/under-rebase'
ok 42 - not allow to delete a branch under rebase
expecting success:
test_must_fail git branch -M under-rebase rebase-with-new-name
fatal: Branch refs/heads/under-rebase is being rebased at /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/under-rebase
ok 43 - rename a branch under rebase not allowed
expecting success:
(
cd under-rebase &&
git checkout under-rebase &&
git checkout - &&
git rebase --abort
)
Switched to branch 'under-rebase'
Note: switching to '179a9e09a27c48c73ff2a192ec62ebcd60fedd6a'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 179a9e0 c
ok 44 - check out from current worktree branch ok
expecting success:
git worktree add under-bisect &&
(
cd under-bisect &&
git bisect start &&
git bisect bad &&
git bisect good HEAD~2 &&
git worktree list | grep "under-bisect.*detached HEAD" &&
test_must_fail git worktree add new-bisect under-bisect &&
! test -d new-bisect
)
Preparing worktree (new branch 'under-bisect')
HEAD is now at 179a9e0 c
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[15d3bfcc767862b6abd36db671feb8356eb7d7d7] b
/<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/under-bisect 15d3bfc (detached HEAD)
fatal: 'under-bisect' is already checked out at '/<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/under-bisect'
Preparing worktree (checking out 'under-bisect')
ok 45 - checkout a branch under bisect
expecting success:
test_must_fail git branch -M under-bisect bisect-with-new-name
fatal: Branch refs/heads/under-bisect is being bisected at /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/under-bisect
ok 46 - rename a branch under bisect not allowed
expecting success:
test_when_finished rm -rf track &&
git worktree add --track -b track track master &&
test_branch_upstream track . master
Preparing worktree (new branch 'track')
Branch 'track' set up to track local branch 'master'.
HEAD is now at 179a9e0 c
ok 47 - --track sets up tracking
expecting success:
test_when_finished rm -rf repo_upstream repo_local foo &&
setup_remote_repo repo_upstream repo_local &&
(
cd repo_local &&
git worktree add --no-track -b foo ../foo repo_upstream/foo
) &&
(
cd foo &&
test_must_fail git config "branch.foo.remote" &&
test_must_fail git config "branch.foo.merge" &&
test_cmp_rev refs/remotes/repo_upstream/foo refs/heads/foo
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/repo_upstream/.git/
[master (root-commit) 8653142] repo_upstream_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 repo_upstream_master.t
Switched to a new branch 'foo'
[foo 9273adc] upstream_foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 upstream_foo.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/repo_local/.git/
[master (root-commit) 181be3d] repo_local_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 repo_local_master.t
Fetching repo_upstream
warning: no common commits
From ../repo_upstream
* [new branch] foo -> repo_upstream/foo
* [new branch] master -> repo_upstream/master
* [new tag] repo_upstream_master -> repo_upstream_master
* [new tag] upstream_foo -> upstream_foo
Preparing worktree (new branch 'foo')
HEAD is now at 9273adc upstream_foo
ok 48 - --no-track avoids setting up tracking
expecting success:
test_must_fail git worktree add foo non-existent
fatal: invalid reference: non-existent
ok 49 - "add" <path> <non-existent-branch> fails
expecting success:
test_when_finished rm -rf repo_upstream repo_dwim foo &&
setup_remote_repo repo_upstream repo_dwim &&
git init repo_dwim &&
(
cd repo_dwim &&
git worktree add ../foo foo
) &&
(
cd foo &&
test_branch_upstream foo repo_upstream foo &&
test_cmp_rev refs/remotes/repo_upstream/foo refs/heads/foo
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/repo_upstream/.git/
[master (root-commit) 8653142] repo_upstream_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 repo_upstream_master.t
Switched to a new branch 'foo'
[foo 9273adc] upstream_foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 upstream_foo.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/repo_dwim/.git/
[master (root-commit) 81eb8eb] repo_dwim_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 repo_dwim_master.t
Fetching repo_upstream
warning: no common commits
From ../repo_upstream
* [new branch] foo -> repo_upstream/foo
* [new branch] master -> repo_upstream/master
* [new tag] repo_upstream_master -> repo_upstream_master
* [new tag] upstream_foo -> upstream_foo
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/repo_dwim/.git/
Preparing worktree (new branch 'foo')
Branch 'foo' set up to track remote branch 'foo' from 'repo_upstream'.
HEAD is now at 9273adc upstream_foo
ok 50 - "add" <path> <branch> dwims
expecting success:
test_when_finished rm -rf repo_upstream repo_dwim foo &&
setup_remote_repo repo_upstream repo_dwim &&
git init repo_dwim &&
(
cd repo_dwim &&
git remote add repo_upstream2 ../repo_upstream &&
git fetch repo_upstream2 &&
test_must_fail git worktree add ../foo foo &&
git -c checkout.defaultRemote=repo_upstream worktree add ../foo foo &&
git status -uno --porcelain >status.actual &&
test_must_be_empty status.actual
) &&
(
cd foo &&
test_branch_upstream foo repo_upstream foo &&
test_cmp_rev refs/remotes/repo_upstream/foo refs/heads/foo
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/repo_upstream/.git/
[master (root-commit) 8653142] repo_upstream_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 repo_upstream_master.t
Switched to a new branch 'foo'
[foo 9273adc] upstream_foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 upstream_foo.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/repo_dwim/.git/
[master (root-commit) 81eb8eb] repo_dwim_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 repo_dwim_master.t
Fetching repo_upstream
warning: no common commits
From ../repo_upstream
* [new branch] foo -> repo_upstream/foo
* [new branch] master -> repo_upstream/master
* [new tag] repo_upstream_master -> repo_upstream_master
* [new tag] upstream_foo -> upstream_foo
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/repo_dwim/.git/
From ../repo_upstream
* [new branch] foo -> repo_upstream2/foo
* [new branch] master -> repo_upstream2/master
fatal: invalid reference: foo
Preparing worktree (new branch 'foo')
Branch 'foo' set up to track remote branch 'foo' from 'repo_upstream'.
HEAD is now at 9273adc upstream_foo
ok 51 - "add" <path> <branch> dwims with checkout.defaultRemote
expecting success:
test_when_finished rm -rf repo_a repo_b foo &&
setup_remote_repo repo_a repo_b &&
(
cd repo_b &&
git worktree add ../foo
) &&
(
cd foo &&
test_must_fail git config "branch.foo.remote" &&
test_must_fail git config "branch.foo.merge" &&
! test_cmp_rev refs/remotes/repo_a/foo refs/heads/foo
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/repo_a/.git/
[master (root-commit) 58714c0] repo_a_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 repo_a_master.t
Switched to a new branch 'foo'
[foo a445945] upstream_foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 upstream_foo.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/repo_b/.git/
[master (root-commit) 0904084] repo_b_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 repo_b_master.t
Fetching repo_a
warning: no common commits
From ../repo_a
* [new branch] foo -> repo_a/foo
* [new branch] master -> repo_a/master
* [new tag] repo_a_master -> repo_a_master
* [new tag] upstream_foo -> upstream_foo
Preparing worktree (new branch 'foo')
HEAD is now at 0904084 repo_b_master
error: two revisions point to different objects:
'refs/remotes/repo_a/foo': a4459459e7170dcc2f26cecbbe72526f07efb88a
'refs/heads/foo': 0904084170bbd5ecc521e3c91047439d367f64c0
ok 52 - git worktree add does not match remote
expecting success:
test_when_finished rm -rf repo_a repo_b foo &&
setup_remote_repo repo_a repo_b &&
(
cd repo_b &&
git worktree add --guess-remote ../foo
) &&
(
cd foo &&
test_branch_upstream foo repo_a foo &&
test_cmp_rev refs/remotes/repo_a/foo refs/heads/foo
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/repo_a/.git/
[master (root-commit) 58714c0] repo_a_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 repo_a_master.t
Switched to a new branch 'foo'
[foo a445945] upstream_foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 upstream_foo.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/repo_b/.git/
[master (root-commit) 0904084] repo_b_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 repo_b_master.t
Fetching repo_a
warning: no common commits
From ../repo_a
* [new branch] foo -> repo_a/foo
* [new branch] master -> repo_a/master
* [new tag] repo_a_master -> repo_a_master
* [new tag] upstream_foo -> upstream_foo
Preparing worktree (new branch 'foo')
Branch 'foo' set up to track remote branch 'foo' from 'repo_a'.
HEAD is now at a445945 upstream_foo
ok 53 - git worktree add --guess-remote sets up tracking
expecting success:
test_when_finished rm -rf repo_a repo_b foo &&
setup_remote_repo repo_a repo_b &&
(
cd repo_b &&
git config worktree.guessRemote true &&
git worktree add ../foo
) &&
(
cd foo &&
test_branch_upstream foo repo_a foo &&
test_cmp_rev refs/remotes/repo_a/foo refs/heads/foo
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/repo_a/.git/
[master (root-commit) 58714c0] repo_a_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 repo_a_master.t
Switched to a new branch 'foo'
[foo a445945] upstream_foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 upstream_foo.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/repo_b/.git/
[master (root-commit) 0904084] repo_b_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 repo_b_master.t
Fetching repo_a
warning: no common commits
From ../repo_a
* [new branch] foo -> repo_a/foo
* [new branch] master -> repo_a/master
* [new tag] repo_a_master -> repo_a_master
* [new tag] upstream_foo -> upstream_foo
Preparing worktree (new branch 'foo')
Branch 'foo' set up to track remote branch 'foo' from 'repo_a'.
HEAD is now at a445945 upstream_foo
ok 54 - git worktree add with worktree.guessRemote sets up tracking
expecting success:
test_when_finished rm -rf repo_a repo_b foo &&
setup_remote_repo repo_a repo_b &&
(
cd repo_b &&
git config worktree.guessRemote true &&
git worktree add --no-guess-remote ../foo
) &&
(
cd foo &&
test_must_fail git config "branch.foo.remote" &&
test_must_fail git config "branch.foo.merge" &&
! test_cmp_rev refs/remotes/repo_a/foo refs/heads/foo
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/repo_a/.git/
[master (root-commit) 58714c0] repo_a_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 repo_a_master.t
Switched to a new branch 'foo'
[foo a445945] upstream_foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 upstream_foo.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/repo_b/.git/
[master (root-commit) 0904084] repo_b_master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 repo_b_master.t
Fetching repo_a
warning: no common commits
From ../repo_a
* [new branch] foo -> repo_a/foo
* [new branch] master -> repo_a/master
* [new tag] repo_a_master -> repo_a_master
* [new tag] upstream_foo -> upstream_foo
Preparing worktree (new branch 'foo')
HEAD is now at 0904084 repo_b_master
error: two revisions point to different objects:
'refs/remotes/repo_a/foo': a4459459e7170dcc2f26cecbbe72526f07efb88a
'refs/heads/foo': 0904084170bbd5ecc521e3c91047439d367f64c0
ok 55 - git worktree --no-guess-remote option overrides config
expecting success:
post_checkout_hook &&
{
echo $ZERO_OID $(git rev-parse HEAD) 1 &&
echo $(pwd)/.git/worktrees/gumby &&
echo $(pwd)/gumby
} >hook.expect &&
git worktree add gumby &&
test_cmp hook.expect gumby/hook.actual
Preparing worktree (new branch 'gumby')
HEAD is now at 179a9e0 c
ok 56 - "add" invokes post-checkout hook (branch)
expecting success:
post_checkout_hook &&
{
echo $ZERO_OID $(git rev-parse HEAD) 1 &&
echo $(pwd)/.git/worktrees/grumpy &&
echo $(pwd)/grumpy
} >hook.expect &&
git worktree add --detach grumpy &&
test_cmp hook.expect grumpy/hook.actual
Preparing worktree (detached HEAD 179a9e0)
HEAD is now at 179a9e0 c
ok 57 - "add" invokes post-checkout hook (detached)
expecting success:
post_checkout_hook &&
rm -f hook.actual &&
git worktree add --no-checkout gloopy &&
test_path_is_missing gloopy/hook.actual
Preparing worktree (new branch 'gloopy')
ok 58 - "add --no-checkout" suppresses post-checkout hook
expecting success:
post_checkout_hook &&
{
echo $ZERO_OID $(git rev-parse HEAD) 1 &&
echo $(pwd)/.git/worktrees/guppy &&
echo $(pwd)/guppy
} >hook.expect &&
git -C gloopy worktree add --detach ../guppy &&
test_cmp hook.expect guppy/hook.actual
Preparing worktree (detached HEAD 179a9e0)
HEAD is now at 179a9e0 c
ok 59 - "add" in other worktree invokes post-checkout hook
expecting success:
rm -rf bare &&
git clone --bare . bare &&
{
echo $ZERO_OID $(git --git-dir=bare rev-parse HEAD) 1 &&
echo $(pwd)/bare/worktrees/goozy &&
echo $(pwd)/goozy
} >hook.expect &&
post_checkout_hook bare &&
git -C bare worktree add --detach ../goozy &&
test_cmp hook.expect goozy/hook.actual
Cloning into bare repository 'bare'...
done.
Preparing worktree (detached HEAD 179a9e0)
HEAD is now at 179a9e0 c
ok 60 - "add" in bare repo invokes post-checkout hook
expecting success:
git worktree add --detach pneu &&
test_must_fail git worktree add --detach pneu &&
rm -fr pneu &&
test_must_fail git worktree add --detach pneu &&
git worktree add --force --detach pneu
Preparing worktree (detached HEAD 179a9e0)
HEAD is now at 179a9e0 c
fatal: 'pneu' already exists
Preparing worktree (detached HEAD 179a9e0)
fatal: 'pneu' is a missing but already registered worktree;
use 'add -f' to override, or 'prune' or 'remove' to clear
Preparing worktree (detached HEAD 179a9e0)
Preparing worktree (detached HEAD 179a9e0)
HEAD is now at 179a9e0 c
ok 61 - "add" an existing but missing worktree
expecting success:
git worktree add --detach gnoo &&
git worktree lock gnoo &&
test_when_finished "git worktree unlock gnoo || :" &&
rm -fr gnoo &&
test_must_fail git worktree add --detach gnoo &&
test_must_fail git worktree add --force --detach gnoo &&
git worktree add --force --force --detach gnoo
Preparing worktree (detached HEAD 179a9e0)
HEAD is now at 179a9e0 c
fatal: 'gnoo' is a missing but locked worktree;
use 'add -f -f' to override, or 'unlock' and 'prune' or 'remove' to clear
Preparing worktree (detached HEAD 179a9e0)
fatal: 'gnoo' is a missing but locked worktree;
use 'add -f -f' to override, or 'unlock' and 'prune' or 'remove' to clear
Preparing worktree (detached HEAD 179a9e0)
Preparing worktree (detached HEAD 179a9e0)
HEAD is now at 179a9e0 c
fatal: 'gnoo' is not locked
ok 62 - "add" an existing locked but missing worktree
checking prerequisite: FUNNYNAMES
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq !MINGW &&
touch -- \
"FUNNYNAMES tab embedded" \
"FUNNYNAMES \"quote embedded\"" \
"FUNNYNAMES newline
embedded" 2>/dev/null &&
rm -- \
"FUNNYNAMES tab embedded" \
"FUNNYNAMES \"quote embedded\"" \
"FUNNYNAMES newline
embedded" 2>/dev/null
)
prerequisite FUNNYNAMES ok
expecting success:
git worktree add --detach ". weird*..?.lock.lock" &&
test -d .git/worktrees/---weird-.-
Preparing worktree (detached HEAD 179a9e0)
HEAD is now at 179a9e0 c
ok 63 - sanitize generated worktree name
expecting success:
git init add-fail &&
(
cd add-fail &&
test_commit first &&
mkdir sub &&
git worktree add sub/to-be-deleted &&
rm -rf sub &&
git worktree add second
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2400-worktree-add/add-fail/.git/
[master (root-commit) 264aca7] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 first.t
Preparing worktree (new branch 'to-be-deleted')
HEAD is now at 264aca7 first
Preparing worktree (new branch 'second')
HEAD is now at 264aca7 first
ok 64 - "add" should not fail because of another bad worktree
# passed all 64 test(s)
1..64
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3031-merge-criscross.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3031-merge-criscross/.git/
expecting success:
mkdir data &&
# create a bunch of files
n=1 &&
while test $n -le 10
do
echo $n > data/$n &&
n=$(($n+1)) ||
return 1
done &&
# check them in
git add data &&
git commit -m A &&
git branch A &&
# a file in one branch
git checkout -b B A &&
git rm data/9 &&
git add data &&
git commit -m B &&
# with a branch off of it
git branch D &&
# put some commits on D
git checkout D &&
echo testD > data/testD &&
git add data &&
git commit -m D &&
# back up to the top, create another branch and cause
# a rename conflict with the file we deleted earlier
git checkout -b C A &&
git mv data/9 data/new-9 &&
git add data &&
git commit -m C &&
# with a branch off of it
git branch E &&
# put a commit on E
git checkout E &&
echo testE > data/testE &&
git add data &&
git commit -m E &&
# now, merge E into B
git checkout B &&
test_must_fail git merge E &&
# force-resolve
git add data &&
git commit -m F &&
git branch F &&
# and merge D into C
git checkout C &&
test_must_fail git merge D &&
# force-resolve
git add data &&
git commit -m G &&
git branch G
[master (root-commit) cd2a0b2] A
Author: A U Thor <author@example.com>
10 files changed, 10 insertions(+)
create mode 100644 data/1
create mode 100644 data/10
create mode 100644 data/2
create mode 100644 data/3
create mode 100644 data/4
create mode 100644 data/5
create mode 100644 data/6
create mode 100644 data/7
create mode 100644 data/8
create mode 100644 data/9
Switched to a new branch 'B'
rm 'data/9'
[B 6f0559c] B
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 data/9
Switched to branch 'D'
[D 578885f] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 data/testD
Switched to a new branch 'C'
[C a466f7d] C
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename data/{9 => new-9} (100%)
Switched to branch 'E'
[E 2e0ad10] E
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 data/testE
Switched to branch 'B'
Merging:
6f0559c B
virtual E
found 1 common ancestor:
cd2a0b2 A
CONFLICT (rename/delete): data/9 deleted in HEAD and renamed to data/new-9 in E. Version E of data/new-9 left in tree.
Automatic merge failed; fix conflicts and then commit the result.
[B 8616b3a] F
Author: A U Thor <author@example.com>
Switched to branch 'C'
Merging:
a466f7d C
virtual D
found 1 common ancestor:
cd2a0b2 A
CONFLICT (rename/delete): data/9 deleted in D and renamed to data/new-9 in HEAD. Version HEAD of data/new-9 left in tree.
Automatic merge failed; fix conflicts and then commit the result.
[C 22b82d6] G
Author: A U Thor <author@example.com>
ok 1 - setup repo with criss-cross history
expecting success:
git merge F
Merging:
22b82d6 G
virtual F
found 2 common ancestors:
a466f7d C
6f0559c B
Merging:
a466f7d C
6f0559c B
found 1 common ancestor:
cd2a0b2 A
Skipped data/new-9 (merged same as existing)
Merge made by the 'recursive' strategy.
data/testE | 1 +
1 file changed, 1 insertion(+)
create mode 100644 data/testE
ok 2 - recursive merge between F and G does not cause segfault
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3032-merge-recursive-space-options.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3032-merge-recursive-space-options/.git/
expecting success:
conflict_hunks () {
sed $SED_OPTIONS -n -e "
/^<<<</ b conflict
b
: conflict
p
/^>>>>/ b
n
b conflict
" "$@"
} &&
cat <<-\EOF >text.txt &&
Hope, he says, cherishes the soul of him who lives in
justice and holiness and is the nurse of his age and the
companion of his journey;--hope which is mightiest to sway
the restless soul of man.
How admirable are his words! And the great blessing of riches, I do
not say to every man, but to a good man, is, that he has had no
occasion to deceive or to defraud others, either intentionally or
unintentionally; and when he departs to the world below he is not in
any apprehension about offerings due to the gods or debts which he owes
to men. Now to this peace of mind the possession of wealth greatly
contributes; and therefore I say, that, setting one thing against
another, of the many advantages which wealth has to give, to a man of
sense this is in my opinion the greatest.
Well said, Cephalus, I replied; but as concerning justice, what is
it?--to speak the truth and to pay your debts--no more than this? And
even to this are there not exceptions? Suppose that a friend when in
his right mind has deposited arms with me and he asks for them when he
is not in his right mind, ought I to give them back to him? No one
would say that I ought or that I should be right in doing so, any more
than they would say that I ought always to speak the truth to one who
is in his condition.
You are quite right, he replied.
But then, I said, speaking the truth and paying your debts is not a
correct definition of justice.
CEPHALUS - SOCRATES - POLEMARCHUS
Quite correct, Socrates, if Simonides is to be believed, said
Polemarchus interposing.
I fear, said Cephalus, that I must go now, for I have to look after the
sacrifices, and I hand over the argument to Polemarchus and the company.
EOF
git add text.txt &&
test_tick &&
git commit -m "Initial revision" &&
git checkout -b remote &&
sed -e "
s/\. /\. /g
s/[?] /? /g
s/ / /g
s/--/---/g
s/but as concerning/but as con cerning/
/CEPHALUS - SOCRATES - POLEMARCHUS/ d
" text.txt >text.txt+ &&
mv text.txt+ text.txt &&
git commit -a -m "Remove cruft" &&
git checkout master &&
sed -e "
s/\(not in his right mind\),\(.*\)/\1;\2Q/
s/Quite correct\(.*\)/It is too correct\1Q/
s/unintentionally/un intentionally/
/un intentionally/ s/$/Q/
s/Polemarchus interposing./Polemarchus, interposing.Q/
/justice and holiness/ s/$/Q/
/pay your debts/ s/$/Q/
" text.txt | q_to_cr >text.txt+ &&
mv text.txt+ text.txt &&
git commit -a -m "Clarify" &&
git show-branch --all
[master (root-commit) c1e95d9] Initial revision
Author: A U Thor <author@example.com>
1 file changed, 36 insertions(+)
create mode 100644 text.txt
Switched to a new branch 'remote'
[remote be82dcf] Remove cruft
Author: A U Thor <author@example.com>
1 file changed, 9 insertions(+), 10 deletions(-)
Switched to branch 'master'
[master 0ab7224] Clarify
Author: A U Thor <author@example.com>
1 file changed, 6 insertions(+), 6 deletions(-)
* [master] Clarify
! [remote] Remove cruft
--
+ [remote] Remove cruft
* [master] Clarify
*+ [remote^] Initial revision
ok 1 - setup
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive HEAD^ -- HEAD remote &&
test_must_fail git update-index --refresh &&
grep "<<<<<<" text.txt
Merging HEAD with remote
Merging:
0ab7224 Clarify
be82dcf Remove cruft
found 1 common ancestor:
c1e95d9 Initial revision
Auto-merging text.txt
CONFLICT (content): Merge conflict in text.txt
text.txt: needs merge
<<<<<<< HEAD
<<<<<<< HEAD
ok 2 - naive merge fails
expecting success:
git read-tree --reset -u HEAD &&
git merge-recursive --ignore-space-change HEAD^ -- HEAD remote
Merging HEAD with remote
Merging:
0ab7224 Clarify
be82dcf Remove cruft
found 1 common ancestor:
c1e95d9 Initial revision
Auto-merging text.txt
ok 3 - --ignore-space-change makes merge succeed
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git cherry-pick --no-commit remote &&
git read-tree --reset -u HEAD &&
test_must_fail git cherry-pick remote &&
test_must_fail git update-index --refresh &&
grep "<<<<<<" text.txt
Auto-merging text.txt
CONFLICT (content): Merge conflict in text.txt
error: could not apply be82dcf... Remove cruft
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
Auto-merging text.txt
CONFLICT (content): Merge conflict in text.txt
error: could not apply be82dcf... Remove cruft
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
text.txt: needs merge
<<<<<<< HEAD
<<<<<<< HEAD
ok 4 - naive cherry-pick fails
expecting success:
git read-tree --reset -u HEAD &&
git cherry-pick --no-commit -Xignore-space-change remote
Auto-merging text.txt
ok 5 - -Xignore-space-change makes cherry-pick succeed
expecting success:
q_to_cr <<-\EOF >expected &&
justice and holiness and is the nurse of his age and theQ
EOF
git read-tree --reset -u HEAD &&
git merge-recursive --ignore-space-change HEAD^ -- HEAD remote &&
grep "justice and holiness" text.txt >actual &&
test_cmp expected actual
Merging HEAD with remote
Merging:
0ab7224 Clarify
be82dcf Remove cruft
found 1 common ancestor:
c1e95d9 Initial revision
Auto-merging text.txt
ok 6 - --ignore-space-change: our w/s-only change wins
expecting success:
cat <<-\EOF >expected &&
it?---to speak the truth and to pay your debts---no more than this? And
EOF
git read-tree --reset -u HEAD &&
git merge-recursive --ignore-space-change HEAD^ -- HEAD remote &&
grep "pay your debts" text.txt >actual &&
test_cmp expected actual
Merging HEAD with remote
Merging:
0ab7224 Clarify
be82dcf Remove cruft
found 1 common ancestor:
c1e95d9 Initial revision
Auto-merging text.txt
ok 7 - --ignore-space-change: their real change wins over w/s
expecting success:
cat <<-\EOF >expected1 &&
Well said, Cephalus, I replied; but as con cerning justice, what is
EOF
q_to_cr <<-\EOF >expected2 &&
un intentionally; and when he departs to the world below he is not inQ
EOF
git read-tree --reset -u HEAD &&
git merge-recursive --ignore-space-change HEAD^ -- HEAD remote &&
grep "Well said" text.txt >actual1 &&
grep "when he departs" text.txt >actual2 &&
test_cmp expected1 actual1 &&
test_cmp expected2 actual2
Merging HEAD with remote
Merging:
0ab7224 Clarify
be82dcf Remove cruft
found 1 common ancestor:
c1e95d9 Initial revision
Auto-merging text.txt
ok 8 - --ignore-space-change: does not ignore new spaces
expecting success:
cat <<-\EOF >expected &&
Well said, Cephalus, I replied; but as concerning justice, what is
EOF
git read-tree --reset -u HEAD &&
git merge-recursive --ignore-all-space HEAD^ -- HEAD remote &&
grep "Well said" text.txt >actual &&
test_cmp expected actual
Merging HEAD with remote
Merging:
0ab7224 Clarify
be82dcf Remove cruft
found 1 common ancestor:
c1e95d9 Initial revision
Auto-merging text.txt
ok 9 - --ignore-all-space drops their new spaces
expecting success:
q_to_cr <<-\EOF >expected &&
un intentionally; and when he departs to the world below he is not inQ
EOF
git read-tree --reset -u HEAD &&
git merge-recursive --ignore-all-space HEAD^ -- HEAD remote &&
grep "when he departs" text.txt >actual &&
test_cmp expected actual
Merging HEAD with remote
Merging:
0ab7224 Clarify
be82dcf Remove cruft
found 1 common ancestor:
c1e95d9 Initial revision
Auto-merging text.txt
ok 10 - --ignore-all-space keeps our new spaces
expecting success:
q_to_cr <<-\EOF >expected &&
<<<<<<< HEAD
is not in his right mind; ought I to give them back to him? No oneQ
=======
is not in his right mind, ought I to give them back to him? No one
>>>>>>> remote
EOF
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive --ignore-space-at-eol \
HEAD^ -- HEAD remote &&
conflict_hunks text.txt >actual &&
test_cmp expected actual
Merging HEAD with remote
Merging:
0ab7224 Clarify
be82dcf Remove cruft
found 1 common ancestor:
c1e95d9 Initial revision
Auto-merging text.txt
CONFLICT (content): Merge conflict in text.txt
ok 11 - --ignore-space-at-eol
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3030-merge-recursive.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3030-merge-recursive/.git/
expecting success:
echo hello >a &&
o0=$(git hash-object a) &&
cp a b &&
cp a c &&
mkdir d &&
cp a d/e &&
test_tick &&
git add a b c d/e &&
git commit -m initial &&
c0=$(git rev-parse --verify HEAD) &&
git branch side &&
git branch df-1 &&
git branch df-2 &&
git branch df-3 &&
git branch remove &&
git branch submod &&
git branch copy &&
git branch rename &&
git branch rename-ln &&
echo hello >>a &&
cp a d/e &&
o1=$(git hash-object a) &&
git add a d/e &&
test_tick &&
git commit -m "master modifies a and d/e" &&
c1=$(git rev-parse --verify HEAD) &&
( git ls-tree -r HEAD && git ls-files -s ) >actual &&
(
echo "100644 blob $o1 a" &&
echo "100644 blob $o0 b" &&
echo "100644 blob $o0 c" &&
echo "100644 blob $o1 d/e" &&
echo "100644 $o1 0 a" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o1 0 d/e"
) >expected &&
test_cmp expected actual
[master (root-commit) 88eeecf] initial
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 a
create mode 100644 b
create mode 100644 c
create mode 100644 d/e
[master b7f3e7f] master modifies a and d/e
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
ok 1 - setup 1
expecting success:
rm -rf [abcd] &&
git checkout side &&
( git ls-tree -r HEAD && git ls-files -s ) >actual &&
(
echo "100644 blob $o0 a" &&
echo "100644 blob $o0 b" &&
echo "100644 blob $o0 c" &&
echo "100644 blob $o0 d/e" &&
echo "100644 $o0 0 a" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o0 0 d/e"
) >expected &&
test_cmp expected actual &&
echo goodbye >>a &&
o2=$(git hash-object a) &&
git add a &&
test_tick &&
git commit -m "side modifies a" &&
c2=$(git rev-parse --verify HEAD) &&
( git ls-tree -r HEAD && git ls-files -s ) >actual &&
(
echo "100644 blob $o2 a" &&
echo "100644 blob $o0 b" &&
echo "100644 blob $o0 c" &&
echo "100644 blob $o0 d/e" &&
echo "100644 $o2 0 a" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o0 0 d/e"
) >expected &&
test_cmp expected actual
Switched to branch 'side'
D b
D c
[side 4419332] side modifies a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 2 - setup 2
expecting success:
rm -rf [abcd] &&
git checkout df-1 &&
( git ls-tree -r HEAD && git ls-files -s ) >actual &&
(
echo "100644 blob $o0 a" &&
echo "100644 blob $o0 b" &&
echo "100644 blob $o0 c" &&
echo "100644 blob $o0 d/e" &&
echo "100644 $o0 0 a" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o0 0 d/e"
) >expected &&
test_cmp expected actual &&
rm -f b && mkdir b && echo df-1 >b/c && git add b/c &&
o3=$(git hash-object b/c) &&
test_tick &&
git commit -m "df-1 makes b/c" &&
c3=$(git rev-parse --verify HEAD) &&
( git ls-tree -r HEAD && git ls-files -s ) >actual &&
(
echo "100644 blob $o0 a" &&
echo "100644 blob $o3 b/c" &&
echo "100644 blob $o0 c" &&
echo "100644 blob $o0 d/e" &&
echo "100644 $o0 0 a" &&
echo "100644 $o3 0 b/c" &&
echo "100644 $o0 0 c" &&
echo "100644 $o0 0 d/e"
) >expected &&
test_cmp expected actual
Switched to branch 'df-1'
D b
D c
D d/e
[df-1 918ade1] df-1 makes b/c
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
delete mode 100644 b
create mode 100644 b/c
ok 3 - setup 3
expecting success:
rm -rf [abcd] &&
git checkout df-2 &&
( git ls-tree -r HEAD && git ls-files -s ) >actual &&
(
echo "100644 blob $o0 a" &&
echo "100644 blob $o0 b" &&
echo "100644 blob $o0 c" &&
echo "100644 blob $o0 d/e" &&
echo "100644 $o0 0 a" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o0 0 d/e"
) >expected &&
test_cmp expected actual &&
rm -f a && mkdir a && echo df-2 >a/c && git add a/c &&
o4=$(git hash-object a/c) &&
test_tick &&
git commit -m "df-2 makes a/c" &&
c4=$(git rev-parse --verify HEAD) &&
( git ls-tree -r HEAD && git ls-files -s ) >actual &&
(
echo "100644 blob $o4 a/c" &&
echo "100644 blob $o0 b" &&
echo "100644 blob $o0 c" &&
echo "100644 blob $o0 d/e" &&
echo "100644 $o4 0 a/c" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o0 0 d/e"
) >expected &&
test_cmp expected actual
Switched to branch 'df-2'
D a
D c
D d/e
[df-2 833bf24] df-2 makes a/c
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
delete mode 100644 a
create mode 100644 a/c
ok 4 - setup 4
expecting success:
rm -rf [abcd] &&
git checkout remove &&
( git ls-tree -r HEAD && git ls-files -s ) >actual &&
(
echo "100644 blob $o0 a" &&
echo "100644 blob $o0 b" &&
echo "100644 blob $o0 c" &&
echo "100644 blob $o0 d/e" &&
echo "100644 $o0 0 a" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o0 0 d/e"
) >expected &&
test_cmp expected actual &&
rm -f b &&
echo remove-conflict >a &&
git add a &&
git rm b &&
o5=$(git hash-object a) &&
test_tick &&
git commit -m "remove removes b and modifies a" &&
c5=$(git rev-parse --verify HEAD) &&
( git ls-tree -r HEAD && git ls-files -s ) >actual &&
(
echo "100644 blob $o5 a" &&
echo "100644 blob $o0 c" &&
echo "100644 blob $o0 d/e" &&
echo "100644 $o5 0 a" &&
echo "100644 $o0 0 c" &&
echo "100644 $o0 0 d/e"
) >expected &&
test_cmp expected actual
Switched to branch 'remove'
D b
D c
D d/e
rm 'b'
[remove 968f3e1] remove removes b and modifies a
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 2 deletions(-)
delete mode 100644 b
ok 5 - setup 5
expecting success:
rm -rf [abcd] &&
git checkout df-3 &&
( git ls-tree -r HEAD && git ls-files -s ) >actual &&
(
echo "100644 blob $o0 a" &&
echo "100644 blob $o0 b" &&
echo "100644 blob $o0 c" &&
echo "100644 blob $o0 d/e" &&
echo "100644 $o0 0 a" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o0 0 d/e"
) >expected &&
test_cmp expected actual &&
rm -fr d && echo df-3 >d && git add d &&
o6=$(git hash-object d) &&
test_tick &&
git commit -m "df-3 makes d" &&
c6=$(git rev-parse --verify HEAD) &&
( git ls-tree -r HEAD && git ls-files -s ) >actual &&
(
echo "100644 blob $o0 a" &&
echo "100644 blob $o0 b" &&
echo "100644 blob $o0 c" &&
echo "100644 blob $o6 d" &&
echo "100644 $o0 0 a" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o6 0 d"
) >expected &&
test_cmp expected actual
Switched to branch 'df-3'
D c
D d/e
[df-3 9d284b3] df-3 makes d
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
create mode 100644 d
delete mode 100644 d/e
ok 6 - setup 6
expecting success:
git checkout submod &&
git rm d/e &&
test_tick &&
git commit -m "remove d/e" &&
git update-index --add --cacheinfo 160000 $c1 d &&
test_tick &&
git commit -m "make d/ a submodule"
Switched to branch 'submod'
D c
rm 'd/e'
[submod a09e90e] remove d/e
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 d/e
[submod 8c3440b] make d/ a submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 160000 d
ok 7 - setup 7
expecting success:
git checkout rename &&
git mv a e &&
git add e &&
test_tick &&
git commit -m "rename a->e" &&
c7=$(git rev-parse --verify HEAD) &&
git checkout rename-ln &&
git mv a e &&
test_ln_s_add e a &&
test_tick &&
git commit -m "rename a->e, symlink a->e" &&
oln=$(printf e | git hash-object --stdin)
Switched to branch 'rename'
D c
[rename 5dd9bd8] rename a->e
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename a => e (100%)
Switched to branch 'rename-ln'
D c
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
[rename-ln 7e1ee82] rename a->e, symlink a->e
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
rewrite a (100%)
mode change 100644 => 120000
copy a => e (100%)
ok 8 - setup 8
expecting success:
git checkout copy &&
cp a e &&
git add e &&
test_tick &&
git commit -m "copy a->e"
Switched to branch 'copy'
D c
[copy a40ced5] copy a->e
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 e
ok 9 - setup 9
expecting success:
rm -fr [abcd] &&
git checkout -f "$c2" &&
test_expect_code 1 git merge-recursive "$c0" -- "$c2" "$c1"
Note: switching to '441933296d498d45ed4c5cbe9135259386a2e2b2'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 4419332 side modifies a
Merging 441933296d498d45ed4c5cbe9135259386a2e2b2 with b7f3e7f677ef7001dcb4b810583c9259a210141d
Merging:
4419332 side modifies a
b7f3e7f master modifies a and d/e
found 1 common ancestor:
88eeecf initial
Auto-merging a
CONFLICT (content): Merge conflict in a
ok 10 - merge-recursive simple
expecting success:
git ls-files -s >actual &&
(
echo "100644 $o0 1 a" &&
echo "100644 $o2 2 a" &&
echo "100644 $o1 3 a" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o1 0 d/e"
) >expected &&
test_cmp expected actual
ok 11 - merge-recursive result
expecting success:
rm -fr [abcd] &&
git checkout -f "$c1" &&
test_must_fail git merge "$c5" &&
test_must_fail git merge "$c5" 2> out &&
test_i18ngrep "not possible because you have unmerged files" out &&
git add -u &&
test_must_fail git merge "$c5" 2> out &&
test_i18ngrep "You have not concluded your merge" out &&
rm -f .git/MERGE_HEAD &&
test_must_fail git merge "$c5" 2> out &&
test_i18ngrep "Your local changes to the following files would be overwritten by merge:" out
Previous HEAD position was 4419332 side modifies a
HEAD is now at b7f3e7f master modifies a and d/e
Merging:
b7f3e7f master modifies a and d/e
virtual 968f3e182d39cc5676d733434b2b1fcade6d5fdb
found 1 common ancestor:
88eeecf initial
Removing b
Auto-merging a
CONFLICT (content): Merge conflict in a
Automatic merge failed; fix conflicts and then commit the result.
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: Merging is not possible because you have unmerged files.
fatal: You have not concluded your merge (MERGE_HEAD exists).
Merging:
b7f3e7f master modifies a and d/e
virtual 968f3e182d39cc5676d733434b2b1fcade6d5fdb
found 1 common ancestor:
88eeecf initial
error: Your local changes to the following files would be overwritten by merge:
ok 12 - fail if the index has unresolved entries
expecting success:
rm -fr [abcd] &&
git checkout -f "$c1" &&
test_expect_code 1 git merge-recursive "$c0" -- "$c1" "$c5"
HEAD is now at b7f3e7f master modifies a and d/e
Merging b7f3e7f677ef7001dcb4b810583c9259a210141d with 968f3e182d39cc5676d733434b2b1fcade6d5fdb
Merging:
b7f3e7f master modifies a and d/e
968f3e1 remove removes b and modifies a
found 1 common ancestor:
88eeecf initial
Removing b
Auto-merging a
CONFLICT (content): Merge conflict in a
ok 13 - merge-recursive remove conflict
expecting success:
git ls-files -s >actual &&
(
echo "100644 $o0 1 a" &&
echo "100644 $o1 2 a" &&
echo "100644 $o5 3 a" &&
echo "100644 $o0 0 c" &&
echo "100644 $o1 0 d/e"
) >expected &&
test_cmp expected actual
ok 14 - merge-recursive remove conflict
expecting success:
rm -fr [abcd] &&
git reset --hard &&
git checkout -f "$c1" &&
git merge-recursive "$c0" -- "$c1" "$c3"
HEAD is now at b7f3e7f master modifies a and d/e
HEAD is now at b7f3e7f master modifies a and d/e
Merging b7f3e7f677ef7001dcb4b810583c9259a210141d with 918ade1d06dd1c0da47b644356c64b1b2122e705
Merging:
b7f3e7f master modifies a and d/e
918ade1 df-1 makes b/c
found 1 common ancestor:
88eeecf initial
Adding b/c
Removing b to make room for subdirectory
Removing b
ok 15 - merge-recursive d/f simple
expecting success:
git ls-files -s >actual &&
(
echo "100644 $o1 0 a" &&
echo "100644 $o3 0 b/c" &&
echo "100644 $o0 0 c" &&
echo "100644 $o1 0 d/e"
) >expected &&
test_cmp expected actual
ok 16 - merge-recursive result
expecting success:
rm -fr [abcd] &&
git reset --hard &&
git checkout -f "$c1" &&
test_expect_code 1 git merge-recursive "$c0" -- "$c1" "$c4"
HEAD is now at b7f3e7f master modifies a and d/e
HEAD is now at b7f3e7f master modifies a and d/e
Merging b7f3e7f677ef7001dcb4b810583c9259a210141d with 833bf240c9e2636a0e5eb3dd8f735d2a92181f22
Merging:
b7f3e7f master modifies a and d/e
833bf24 df-2 makes a/c
found 1 common ancestor:
88eeecf initial
Adding a/c
Removing a to make room for subdirectory
CONFLICT (modify/delete): a deleted in 833bf240c9e2636a0e5eb3dd8f735d2a92181f22 and modified in b7f3e7f677ef7001dcb4b810583c9259a210141d. Version b7f3e7f677ef7001dcb4b810583c9259a210141d of a left in tree at a~b7f3e7f677ef7001dcb4b810583c9259a210141d.
ok 17 - merge-recursive d/f conflict
expecting success:
git ls-files -s >actual &&
(
echo "100644 $o0 1 a" &&
echo "100644 $o1 2 a" &&
echo "100644 $o4 0 a/c" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o1 0 d/e"
) >expected &&
test_cmp expected actual
ok 18 - merge-recursive d/f conflict result
expecting success:
rm -fr [abcd] &&
git reset --hard &&
git checkout -f "$c4" &&
test_expect_code 1 git merge-recursive "$c0" -- "$c4" "$c1"
HEAD is now at b7f3e7f master modifies a and d/e
Previous HEAD position was b7f3e7f master modifies a and d/e
HEAD is now at 833bf24 df-2 makes a/c
Merging 833bf240c9e2636a0e5eb3dd8f735d2a92181f22 with b7f3e7f677ef7001dcb4b810583c9259a210141d
Merging:
833bf24 df-2 makes a/c
b7f3e7f master modifies a and d/e
found 1 common ancestor:
88eeecf initial
Adding a/c
CONFLICT (modify/delete): a deleted in 833bf240c9e2636a0e5eb3dd8f735d2a92181f22 and modified in b7f3e7f677ef7001dcb4b810583c9259a210141d. Version b7f3e7f677ef7001dcb4b810583c9259a210141d of a left in tree at a~b7f3e7f677ef7001dcb4b810583c9259a210141d_0.
ok 19 - merge-recursive d/f conflict the other way
expecting success:
git ls-files -s >actual &&
(
echo "100644 $o0 1 a" &&
echo "100644 $o1 3 a" &&
echo "100644 $o4 0 a/c" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o1 0 d/e"
) >expected &&
test_cmp expected actual
ok 20 - merge-recursive d/f conflict result the other way
expecting success:
rm -fr [abcd] &&
git reset --hard &&
git checkout -f "$c1" &&
test_expect_code 1 git merge-recursive "$c0" -- "$c1" "$c6"
HEAD is now at 833bf24 df-2 makes a/c
Previous HEAD position was 833bf24 df-2 makes a/c
HEAD is now at b7f3e7f master modifies a and d/e
Merging b7f3e7f677ef7001dcb4b810583c9259a210141d with 9d284b3a95aea72df4581977e913e55da89d5e3d
Merging:
b7f3e7f master modifies a and d/e
9d284b3 df-3 makes d
found 1 common ancestor:
88eeecf initial
CONFLICT (modify/delete): d/e deleted in 9d284b3a95aea72df4581977e913e55da89d5e3d and modified in b7f3e7f677ef7001dcb4b810583c9259a210141d. Version b7f3e7f677ef7001dcb4b810583c9259a210141d of d/e left in tree.
CONFLICT (directory/file): There is a directory with name d in b7f3e7f677ef7001dcb4b810583c9259a210141d. Adding d as d~9d284b3a95aea72df4581977e913e55da89d5e3d
ok 21 - merge-recursive d/f conflict
expecting success:
git ls-files -s >actual &&
(
echo "100644 $o1 0 a" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o6 3 d" &&
echo "100644 $o0 1 d/e" &&
echo "100644 $o1 2 d/e"
) >expected &&
test_cmp expected actual
ok 22 - merge-recursive d/f conflict result
expecting success:
rm -fr [abcd] &&
git reset --hard &&
git checkout -f "$c6" &&
test_expect_code 1 git merge-recursive "$c0" -- "$c6" "$c1"
HEAD is now at b7f3e7f master modifies a and d/e
Previous HEAD position was b7f3e7f master modifies a and d/e
HEAD is now at 9d284b3 df-3 makes d
Merging 9d284b3a95aea72df4581977e913e55da89d5e3d with b7f3e7f677ef7001dcb4b810583c9259a210141d
Merging:
9d284b3 df-3 makes d
b7f3e7f master modifies a and d/e
found 1 common ancestor:
88eeecf initial
CONFLICT (modify/delete): d/e deleted in 9d284b3a95aea72df4581977e913e55da89d5e3d and modified in b7f3e7f677ef7001dcb4b810583c9259a210141d. Version b7f3e7f677ef7001dcb4b810583c9259a210141d of d/e left in tree.
Removing d to make room for subdirectory
CONFLICT (file/directory): There is a directory with name d in b7f3e7f677ef7001dcb4b810583c9259a210141d. Adding d as d~9d284b3a95aea72df4581977e913e55da89d5e3d_0
ok 23 - merge-recursive d/f conflict
expecting success:
git ls-files -s >actual &&
(
echo "100644 $o1 0 a" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o6 2 d" &&
echo "100644 $o0 1 d/e" &&
echo "100644 $o1 3 d/e"
) >expected &&
test_cmp expected actual
ok 24 - merge-recursive d/f conflict result
expecting success:
git reset --hard "$c2" &&
git read-tree -m "$c0" "$c2" "$c1"
warning: unable to unlink 'd': Is a directory
HEAD is now at 4419332 side modifies a
ok 25 - reset and 3-way merge
expecting success:
git reset --hard master &&
git read-tree --prefix=M/ master &&
git ls-files -s >actual &&
(
echo "100644 $o1 0 M/a" &&
echo "100644 $o0 0 M/b" &&
echo "100644 $o0 0 M/c" &&
echo "100644 $o1 0 M/d/e" &&
echo "100644 $o1 0 a" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o1 0 d/e"
) >expected &&
test_cmp expected actual &&
git read-tree --prefix=a1/ master &&
git ls-files -s >actual &&
(
echo "100644 $o1 0 M/a" &&
echo "100644 $o0 0 M/b" &&
echo "100644 $o0 0 M/c" &&
echo "100644 $o1 0 M/d/e" &&
echo "100644 $o1 0 a" &&
echo "100644 $o1 0 a1/a" &&
echo "100644 $o0 0 a1/b" &&
echo "100644 $o0 0 a1/c" &&
echo "100644 $o1 0 a1/d/e" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o1 0 d/e"
) >expected &&
test_cmp expected actual &&
git read-tree --prefix=z/ master &&
git ls-files -s >actual &&
(
echo "100644 $o1 0 M/a" &&
echo "100644 $o0 0 M/b" &&
echo "100644 $o0 0 M/c" &&
echo "100644 $o1 0 M/d/e" &&
echo "100644 $o1 0 a" &&
echo "100644 $o1 0 a1/a" &&
echo "100644 $o0 0 a1/b" &&
echo "100644 $o0 0 a1/c" &&
echo "100644 $o1 0 a1/d/e" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o1 0 d/e" &&
echo "100644 $o1 0 z/a" &&
echo "100644 $o0 0 z/b" &&
echo "100644 $o0 0 z/c" &&
echo "100644 $o1 0 z/d/e"
) >expected &&
test_cmp expected actual
HEAD is now at b7f3e7f master modifies a and d/e
ok 26 - reset and bind merge
expecting success:
(
GIT_WORK_TREE="$PWD/ours-has-rename-work" &&
export GIT_WORK_TREE &&
GIT_INDEX_FILE="$PWD/ours-has-rename-index" &&
export GIT_INDEX_FILE &&
mkdir "$GIT_WORK_TREE" &&
git read-tree -i -m $c7 2>actual-err &&
test_must_be_empty actual-err &&
git update-index --ignore-missing --refresh 2>actual-err &&
test_must_be_empty actual-err &&
git merge-recursive $c0 -- $c7 $c3 2>actual-err &&
test_must_be_empty actual-err &&
git ls-files -s >actual-files 2>actual-err &&
test_must_be_empty actual-err
) &&
cat >expected-files <<-EOF &&
100644 $o3 0 b/c
100644 $o0 0 c
100644 $o0 0 d/e
100644 $o0 0 e
EOF
test_cmp expected-files actual-files
Merging 5dd9bd8ddad823127f5e40fcbc297d40f91d9a53 with 918ade1d06dd1c0da47b644356c64b1b2122e705
Merging:
5dd9bd8 rename a->e
918ade1 df-1 makes b/c
found 1 common ancestor:
88eeecf initial
Skipped e (merged same as existing)
Adding b/c
Removing b to make room for subdirectory
Removing b
ok 27 - merge-recursive w/ empty work tree - ours has rename
expecting success:
(
GIT_WORK_TREE="$PWD/theirs-has-rename-work" &&
export GIT_WORK_TREE &&
GIT_INDEX_FILE="$PWD/theirs-has-rename-index" &&
export GIT_INDEX_FILE &&
mkdir "$GIT_WORK_TREE" &&
git read-tree -i -m $c3 2>actual-err &&
test_must_be_empty actual-err &&
git update-index --ignore-missing --refresh 2>actual-err &&
test_must_be_empty actual-err &&
git merge-recursive $c0 -- $c3 $c7 2>actual-err &&
test_must_be_empty actual-err &&
git ls-files -s >actual-files 2>actual-err &&
test_must_be_empty actual-err
) &&
cat >expected-files <<-EOF &&
100644 $o3 0 b/c
100644 $o0 0 c
100644 $o0 0 d/e
100644 $o0 0 e
EOF
test_cmp expected-files actual-files
Merging 918ade1d06dd1c0da47b644356c64b1b2122e705 with 5dd9bd8ddad823127f5e40fcbc297d40f91d9a53
Merging:
918ade1 df-1 makes b/c
5dd9bd8 rename a->e
found 1 common ancestor:
88eeecf initial
Adding b/c
ok 28 - merge-recursive w/ empty work tree - theirs has rename
expecting success:
git reset --hard master &&
git checkout -b rm &&
git rm d/e &&
git commit -mremoved-d/e &&
git checkout master &&
git merge -s recursive rm &&
test_must_fail test -d d
HEAD is now at b7f3e7f master modifies a and d/e
Switched to a new branch 'rm'
rm 'd/e'
[rm df61676] removed-d/e
Author: A U Thor <author@example.com>
1 file changed, 2 deletions(-)
delete mode 100644 d/e
Switched to branch 'master'
Updating b7f3e7f..df61676
Fast-forward
d/e | 2 --
1 file changed, 2 deletions(-)
delete mode 100644 d/e
ok 29 - merge removes empty directories
expecting success:
git checkout submod &&
git merge remove
Switched to branch 'submod'
Merging:
8c3440b make d/ a submodule
virtual remove
found 1 common ancestor:
88eeecf initial
Adding d
Removing b
Merge made by the 'recursive' strategy.
a | 2 +-
b | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
delete mode 100644 b
ok 30 - merge-recursive simple w/submodule
expecting success:
git ls-files -s >actual &&
(
echo "100644 $o5 0 a" &&
echo "100644 $o0 0 c" &&
echo "160000 $c1 0 d"
) >expected &&
test_cmp expected actual
ok 31 - merge-recursive simple w/submodule result
expecting success:
git checkout -f copy &&
git merge rename &&
( git ls-tree -r HEAD && git ls-files -s ) >actual &&
(
echo "100644 blob $o0 b" &&
echo "100644 blob $o0 c" &&
echo "100644 blob $o0 d/e" &&
echo "100644 blob $o0 e" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o0 0 d/e" &&
echo "100644 $o0 0 e"
) >expected &&
test_cmp expected actual
Switched to branch 'copy'
Merging:
a40ced5 copy a->e
virtual rename
found 1 common ancestor:
88eeecf initial
Merge made by the 'recursive' strategy.
a | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 a
ok 32 - merge-recursive copy vs. rename
checking known breakage:
git checkout -f rename &&
git merge rename-ln &&
( git ls-tree -r HEAD && git ls-files -s ) >actual &&
(
echo "120000 blob $oln a" &&
echo "100644 blob $o0 b" &&
echo "100644 blob $o0 c" &&
echo "100644 blob $o0 d/e" &&
echo "100644 blob $o0 e" &&
echo "120000 $oln 0 a" &&
echo "100644 $o0 0 b" &&
echo "100644 $o0 0 c" &&
echo "100644 $o0 0 d/e" &&
echo "100644 $o0 0 e"
) >expected &&
test_cmp expected actual
Switched to branch 'rename'
Merging:
5dd9bd8 rename a->e
virtual rename-ln
found 1 common ancestor:
88eeecf initial
Merge made by the 'recursive' strategy.
--- expected 2019-08-14 07:25:50.962037348 +0000
+++ actual 2019-08-14 07:25:50.958037305 +0000
@@ -1,9 +1,7 @@
-120000 blob 9cbe6ea56f225388ae614c419249bfc6d734cc30 a
100644 blob ce013625030ba8dba906f756967f9e9ca394464a b
100644 blob ce013625030ba8dba906f756967f9e9ca394464a c
100644 blob ce013625030ba8dba906f756967f9e9ca394464a d/e
100644 blob ce013625030ba8dba906f756967f9e9ca394464a e
-120000 9cbe6ea56f225388ae614c419249bfc6d734cc30 0 a
100644 ce013625030ba8dba906f756967f9e9ca394464a 0 b
100644 ce013625030ba8dba906f756967f9e9ca394464a 0 c
100644 ce013625030ba8dba906f756967f9e9ca394464a 0 d/e
not ok 33 - merge-recursive rename vs. rename/symlink # TODO known breakage
expecting success:
git reset --hard HEAD &&
git checkout -b main &&
git rm -rf . &&
echo "just a file" >sub1 &&
mkdir -p sub2 &&
echo content1 >sub2/file1 &&
echo content2 >sub2/file2 &&
echo content3 >sub2/file3 &&
mkdir simple &&
echo base >simple/bar &&
git add -A &&
test_tick &&
git commit -m base &&
git checkout -b other &&
echo more >>simple/bar &&
test_tick &&
git commit -a -m changesimplefile &&
git checkout main &&
git rm sub1 &&
git mv sub2 sub1 &&
test_tick &&
git commit -m changefiletodir &&
test_tick &&
git merge other
HEAD is now at f670565 Merge branch 'rename-ln' into rename
Switched to a new branch 'main'
rm 'b'
rm 'c'
rm 'd/e'
rm 'e'
[main 3360bcf] base
Author: A U Thor <author@example.com>
20 files changed, 38 insertions(+), 1 deletion(-)
create mode 100644 actual
create mode 100644 actual-err
create mode 100644 actual-files
rename b => a~b7f3e7f677ef7001dcb4b810583c9259a210141d (50%)
rename c => a~b7f3e7f677ef7001dcb4b810583c9259a210141d_0 (50%)
create mode 100644 d~9d284b3a95aea72df4581977e913e55da89d5e3d
create mode 100644 d~9d284b3a95aea72df4581977e913e55da89d5e3d_0
delete mode 100644 e
create mode 100644 expected
create mode 100644 expected-files
create mode 100644 ours-has-rename-index
create mode 100644 ours-has-rename-work/b/c
create mode 100644 out
create mode 100644 simple/bar
create mode 100644 sub1
create mode 100644 sub2/file1
create mode 100644 sub2/file2
create mode 100644 sub2/file3
create mode 100644 theirs-has-rename-index
rename {d => theirs-has-rename-work}/e (100%)
Switched to a new branch 'other'
[other 8f8f01c] changesimplefile
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'main'
rm 'sub1'
[main b671fd0] changefiletodir
Author: A U Thor <author@example.com>
4 files changed, 1 deletion(-)
delete mode 100644 sub1
rename {sub2 => sub1}/file1 (100%)
rename {sub2 => sub1}/file2 (100%)
rename {sub2 => sub1}/file3 (100%)
Merging:
b671fd0 changefiletodir
virtual other
found 1 common ancestor:
3360bcf base
Skipped sub1/file3 (merged same as existing)
Skipped sub1/file2 (merged same as existing)
Skipped sub1/file1 (merged same as existing)
Merge made by the 'recursive' strategy.
simple/bar | 1 +
1 file changed, 1 insertion(+)
ok 34 - merging with triple rename across D/F conflict
expecting success:
git reset --hard HEAD &&
# more trees than static slots used by oid_to_hex()
for commit in $c0 $c2 $c4 $c5 $c6 $c7
do
git rev-parse "$commit^{tree}"
done >trees &&
# ignore the return code -- it only fails because the input is weird
test_must_fail git -c merge.verbosity=5 merge-recursive $(cat trees) -- $c1 $c3 >out &&
# merge-recursive prints in reverse order, but we do not care
sort <trees >expect &&
sed -n "s/^virtual //p" out | sort >actual &&
test_cmp expect actual
HEAD is now at 5729d4a Merge branch 'other' into main
error: Your local changes to the following files would be overwritten by merge:
a actual actual-err actual-files a~b7f3e7f677ef7001dcb4b810583c9259a210141d a~b7f3e7f677ef7001dcb4b810583c9259a210141d_0 b c d/e d~9d284b3a95aea72df4581977e913e55da89d5e3d d~9d284b3a95aea72df4581977e913e55da89d5e3d_0 expected expected-files ours-has-rename-index ours-has-rename-work/b/c out simple/bar sub1/file1 sub1/file2 sub1/file3 theirs-has-rename-index theirs-has-rename-work/e
ok 35 - merge-recursive remembers the names of all base trees
expecting success:
git reset --hard HEAD &&
# We are going to create a history leading to two criss-cross
# branches A and B. The common ancestor at the bottom, O0,
# has two child commits O1 and O2, both of which will be merge
# base between A and B, like so:
#
# O1---A
# / \ /
# O0 .
# \ / \
# O2---B
#
# The recently added "check to see if the index is different from
# the tree into which something else is getting merged" check must
# NOT kick in when an inner merge between O1 and O2 is made. Both
# O1 and O2 happen to have the same tree as O0 in this test to
# trigger the bug---whether the inner merge is made by merging O2
# into O1 or O1 into O2, their common ancestor O0 and the branch
# being merged have the same tree. We should not trigger the "is
# the index dirty?" check in this case.
echo "zero" >file &&
git add file &&
test_tick &&
git commit -m "O0" &&
O0=$(git rev-parse HEAD) &&
test_tick &&
git commit --allow-empty -m "O1" &&
O1=$(git rev-parse HEAD) &&
git reset --hard $O0 &&
test_tick &&
git commit --allow-empty -m "O2" &&
O2=$(git rev-parse HEAD) &&
test_tick &&
git merge -s ours $O1 &&
B=$(git rev-parse HEAD) &&
git reset --hard $O1 &&
test_tick &&
git merge -s ours $O2 &&
A=$(git rev-parse HEAD) &&
git merge $B
HEAD is now at 5729d4a Merge branch 'other' into main
[main 5333884] O0
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[main 8fe602d] O1
Author: A U Thor <author@example.com>
HEAD is now at 5333884 O0
[main 3b24994] O2
Author: A U Thor <author@example.com>
Merge made by the 'ours' strategy.
HEAD is now at 8fe602d O1
Merge made by the 'ours' strategy.
Merging:
af29547 Merge commit '3b2499432291996e79ecae892de6e55454c0283c' into main
virtual 38f89c14e03216dfb4b9e1d1f57115741e5c0a3e
found 2 common ancestors:
8fe602d O1
3b24994 O2
Merging:
8fe602d O1
3b24994 O2
found 1 common ancestor:
5333884 O0
Already up to date!
Already up to date!
Merge made by the 'recursive' strategy.
ok 36 - merge-recursive internal merge resolves to the sameness
# still have 1 known breakage(s)
# passed all remaining 35 test(s)
1..36
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3035-merge-sparse.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3035-merge-sparse/.git/
expecting success:
test_file checked-out init &&
test_file modify_delete modify_delete_init &&
test_commit_this init &&
test_file modify_delete modify_delete_theirs &&
test_commit_this theirs &&
git reset --hard init &&
git rm modify_delete &&
test_commit_this ours &&
git config core.sparseCheckout true &&
echo "/checked-out" >.git/info/sparse-checkout &&
git reset --hard &&
! git merge theirs
[master (root-commit) 4192c91] init
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 checked-out
create mode 100644 modify_delete
[master d302181] theirs
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at 4192c91 init
rm 'modify_delete'
[master 7fd6c19] ours
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 modify_delete
HEAD is now at 7fd6c19 ours
Merging:
7fd6c19 ours
virtual theirs
found 1 common ancestor:
4192c91 init
CONFLICT (modify/delete): modify_delete deleted in HEAD and modified in theirs. Version theirs of modify_delete left in tree.
Automatic merge failed; fix conflicts and then commit the result.
ok 1 - setup
expecting success:
git reset --hard
HEAD is now at 7fd6c19 ours
ok 2 - reset --hard works after the conflict
expecting success:
git status --porcelain -- modify_delete >out &&
test_must_be_empty out &&
test_path_is_missing modify_delete
ok 3 - is reset properly
expecting success:
! git merge theirs
Merging:
7fd6c19 ours
virtual theirs
found 1 common ancestor:
4192c91 init
CONFLICT (modify/delete): modify_delete deleted in HEAD and modified in theirs. Version theirs of modify_delete left in tree.
Automatic merge failed; fix conflicts and then commit the result.
ok 4 - setup: conflict back
expecting success:
git merge --abort
ok 5 - Merge abort works after the conflict
expecting success:
git status --porcelain -- modify_delete >out &&
test_must_be_empty out &&
test_path_is_missing modify_delete
ok 6 - is aborted properly
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3034-merge-recursive-rename-options.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3034-merge-recursive-rename-options/.git/
expecting success:
cat <<-\EOF >3-old &&
33a
33b
33c
33d
EOF
sed s/33/22/ <3-old >2-old &&
sed s/33/11/ <3-old >1-old &&
sed s/33/00/ <3-old >0-old &&
git add [0-3]-old &&
git commit -m base &&
git rm [0-3]-old &&
git commit -m delete &&
git checkout -b rename HEAD^ &&
cp 3-old 3-new &&
sed 1,1s/./x/ <2-old >2-new &&
sed 1,2s/./x/ <1-old >1-new &&
sed 1,3s/./x/ <0-old >0-new &&
git add [0-3]-new &&
git rm [0-3]-old &&
git commit -m rename &&
get_expected_stages 0 &&
get_expected_stages 1 &&
get_expected_stages 2 &&
get_expected_stages 3 &&
check_50="false" &&
tail="HEAD^ -- HEAD master"
[master (root-commit) d850d2a] base
Author: A U Thor <author@example.com>
4 files changed, 16 insertions(+)
create mode 100644 0-old
create mode 100644 1-old
create mode 100644 2-old
create mode 100644 3-old
rm '0-old'
rm '1-old'
rm '2-old'
rm '3-old'
[master 527542a] delete
Author: A U Thor <author@example.com>
4 files changed, 16 deletions(-)
delete mode 100644 0-old
delete mode 100644 1-old
delete mode 100644 2-old
delete mode 100644 3-old
Switched to a new branch 'rename'
rm '0-old'
rm '1-old'
rm '2-old'
rm '3-old'
[rename 5337a04] rename
Author: A U Thor <author@example.com>
5 files changed, 7 insertions(+), 7 deletions(-)
create mode 100644 0-new
delete mode 100644 0-old
rename 1-old => 1-new (50%)
rename 2-old => 2-new (75%)
rename 3-old => 3-new (100%)
ok 1 - setup repo
expecting success:
git diff --name-status -M01 HEAD^ HEAD >diff-output &&
test_debug "cat diff-output" &&
test_line_count = 4 diff-output &&
grep "R[0-9][0-9][0-9] \([0-3]\)-old \1-new" diff-output \
>grep-output &&
test_cmp diff-output grep-output &&
th0=$(sed -n "s/R\(...\) 0-old 0-new/\1/p" <diff-output) &&
th1=$(sed -n "s/R\(...\) 1-old 1-new/\1/p" <diff-output) &&
th2=$(sed -n "s/R\(...\) 2-old 2-new/\1/p" <diff-output) &&
th3=$(sed -n "s/R\(...\) 3-old 3-new/\1/p" <diff-output) &&
test "$th0" -lt "$th1" &&
test "$th1" -lt "$th2" &&
test "$th2" -lt "$th3" &&
test "$th3" = 100 &&
if test 50 -le "$th0"
then
check_50=check_threshold_0
elif test 50 -le "$th1"
then
check_50=check_threshold_1
elif test 50 -le "$th2"
then
check_50=check_threshold_2
fi &&
th0="$th0%" &&
th1="$th1%" &&
th2="$th2%" &&
th3="$th3%"
ok 2 - setup thresholds
expecting success:
git diff --name-status -M$th0 --diff-filter=R HEAD^ HEAD \
>diff-output-0 &&
git diff --name-status -M$th1 --diff-filter=R HEAD^ HEAD \
>diff-output-1 &&
git diff --name-status -M$th2 --diff-filter=R HEAD^ HEAD \
>diff-output-2 &&
git diff --name-status -M100% --diff-filter=R HEAD^ HEAD \
>diff-output-3 &&
test_line_count = 4 diff-output-0 &&
test_line_count = 3 diff-output-1 &&
test_line_count = 2 diff-output-2 &&
test_line_count = 1 diff-output-3
ok 3 - assumption for tests: rename detection with diff
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive $tail &&
$check_50
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
CONFLICT (rename/delete): 3-old deleted in master and renamed to 3-new in HEAD. Version HEAD of 3-new left in tree.
CONFLICT (rename/delete): 2-old deleted in master and renamed to 2-new in HEAD. Version HEAD of 2-new left in tree.
CONFLICT (rename/delete): 1-old deleted in master and renamed to 1-new in HEAD. Version HEAD of 1-new left in tree.
ok 4 - default similarity threshold is 50%
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive --find-renames=$th0 $tail &&
check_threshold_0
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
CONFLICT (rename/delete): 3-old deleted in master and renamed to 3-new in HEAD. Version HEAD of 3-new left in tree.
CONFLICT (rename/delete): 2-old deleted in master and renamed to 2-new in HEAD. Version HEAD of 2-new left in tree.
CONFLICT (rename/delete): 1-old deleted in master and renamed to 1-new in HEAD. Version HEAD of 1-new left in tree.
CONFLICT (rename/delete): 0-old deleted in master and renamed to 0-new in HEAD. Version HEAD of 0-new left in tree.
ok 5 - low rename threshold
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive --find-renames=$th1 $tail &&
check_threshold_1
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
CONFLICT (rename/delete): 3-old deleted in master and renamed to 3-new in HEAD. Version HEAD of 3-new left in tree.
CONFLICT (rename/delete): 2-old deleted in master and renamed to 2-new in HEAD. Version HEAD of 2-new left in tree.
CONFLICT (rename/delete): 1-old deleted in master and renamed to 1-new in HEAD. Version HEAD of 1-new left in tree.
ok 6 - medium rename threshold
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive --find-renames=$th2 $tail &&
check_threshold_2
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
CONFLICT (rename/delete): 3-old deleted in master and renamed to 3-new in HEAD. Version HEAD of 3-new left in tree.
CONFLICT (rename/delete): 2-old deleted in master and renamed to 2-new in HEAD. Version HEAD of 2-new left in tree.
ok 7 - high rename threshold
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive --find-renames=100% $tail &&
check_exact_renames
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
CONFLICT (rename/delete): 3-old deleted in master and renamed to 3-new in HEAD. Version HEAD of 3-new left in tree.
ok 8 - exact renames only
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive --find-renames=200% $tail &&
check_exact_renames
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
CONFLICT (rename/delete): 3-old deleted in master and renamed to 3-new in HEAD. Version HEAD of 3-new left in tree.
ok 9 - rename threshold is truncated
expecting success:
git read-tree --reset -u HEAD &&
git merge-recursive --no-renames $tail &&
check_no_renames
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
ok 10 - disabled rename detection
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive \
--find-renames=$th0 --find-renames=$th2 $tail &&
check_threshold_2
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
CONFLICT (rename/delete): 3-old deleted in master and renamed to 3-new in HEAD. Version HEAD of 3-new left in tree.
CONFLICT (rename/delete): 2-old deleted in master and renamed to 2-new in HEAD. Version HEAD of 2-new left in tree.
ok 11 - last wins in --find-renames=<m> --find-renames=<n>
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive \
--find-renames=$th0 --find-renames $tail &&
$check_50
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
CONFLICT (rename/delete): 3-old deleted in master and renamed to 3-new in HEAD. Version HEAD of 3-new left in tree.
CONFLICT (rename/delete): 2-old deleted in master and renamed to 2-new in HEAD. Version HEAD of 2-new left in tree.
CONFLICT (rename/delete): 1-old deleted in master and renamed to 1-new in HEAD. Version HEAD of 1-new left in tree.
ok 12 - --find-renames resets threshold
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive --no-renames --find-renames $tail &&
$check_50
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
CONFLICT (rename/delete): 3-old deleted in master and renamed to 3-new in HEAD. Version HEAD of 3-new left in tree.
CONFLICT (rename/delete): 2-old deleted in master and renamed to 2-new in HEAD. Version HEAD of 2-new left in tree.
CONFLICT (rename/delete): 1-old deleted in master and renamed to 1-new in HEAD. Version HEAD of 1-new left in tree.
ok 13 - last wins in --no-renames --find-renames
expecting success:
git read-tree --reset -u HEAD &&
git merge-recursive --find-renames --no-renames $tail &&
check_no_renames
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
ok 14 - last wins in --find-renames --no-renames
expecting success:
git read-tree --reset -u HEAD &&
git merge-recursive HEAD -- HEAD HEAD &&
git diff --quiet --cached &&
git merge-recursive --find-renames=$th0 HEAD -- HEAD HEAD &&
git diff --quiet --cached &&
git merge-recursive --find-renames=$th2 HEAD -- HEAD HEAD &&
git diff --quiet --cached &&
git merge-recursive --find-renames=100% HEAD -- HEAD HEAD &&
git diff --quiet --cached &&
git merge-recursive --no-renames HEAD -- HEAD HEAD &&
git diff --quiet --cached
Merging HEAD with HEAD
Merging:
5337a04 rename
5337a04 rename
found 1 common ancestor:
5337a04 rename
Already up to date!
Merging HEAD with HEAD
Merging:
5337a04 rename
5337a04 rename
found 1 common ancestor:
5337a04 rename
Already up to date!
Merging HEAD with HEAD
Merging:
5337a04 rename
5337a04 rename
found 1 common ancestor:
5337a04 rename
Already up to date!
Merging HEAD with HEAD
Merging:
5337a04 rename
5337a04 rename
found 1 common ancestor:
5337a04 rename
Already up to date!
Merging HEAD with HEAD
Merging:
5337a04 rename
5337a04 rename
found 1 common ancestor:
5337a04 rename
Already up to date!
ok 15 - assumption for further tests: trivial merge succeeds
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive --find-renames=-25 \
HEAD -- HEAD HEAD &&
git diff --quiet --cached
fatal: unknown option --find-renames=-25
ok 16 - --find-renames rejects negative argument
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive --find-renames=0xf \
HEAD -- HEAD HEAD &&
git diff --quiet --cached
fatal: unknown option --find-renames=0xf
ok 17 - --find-renames rejects non-numbers
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive --rename-threshold=$th0 $tail &&
check_threshold_0
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
CONFLICT (rename/delete): 3-old deleted in master and renamed to 3-new in HEAD. Version HEAD of 3-new left in tree.
CONFLICT (rename/delete): 2-old deleted in master and renamed to 2-new in HEAD. Version HEAD of 2-new left in tree.
CONFLICT (rename/delete): 1-old deleted in master and renamed to 1-new in HEAD. Version HEAD of 1-new left in tree.
CONFLICT (rename/delete): 0-old deleted in master and renamed to 0-new in HEAD. Version HEAD of 0-new left in tree.
ok 18 - rename-threshold=<n> is a synonym for find-renames=<n>
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive --no-renames --rename-threshold=$th0 $tail &&
check_threshold_0
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
CONFLICT (rename/delete): 3-old deleted in master and renamed to 3-new in HEAD. Version HEAD of 3-new left in tree.
CONFLICT (rename/delete): 2-old deleted in master and renamed to 2-new in HEAD. Version HEAD of 2-new left in tree.
CONFLICT (rename/delete): 1-old deleted in master and renamed to 1-new in HEAD. Version HEAD of 1-new left in tree.
CONFLICT (rename/delete): 0-old deleted in master and renamed to 0-new in HEAD. Version HEAD of 0-new left in tree.
ok 19 - last wins in --no-renames --rename-threshold=<n>
expecting success:
git read-tree --reset -u HEAD &&
git merge-recursive --rename-threshold=$th0 --no-renames $tail &&
check_no_renames
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
ok 20 - last wins in --rename-threshold=<n> --no-renames
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive --rename-threshold=-25 \
HEAD -- HEAD HEAD &&
git diff --quiet --cached
fatal: unknown option --rename-threshold=-25
ok 21 - --rename-threshold=<n> rejects negative argument
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive --rename-threshold=0xf \
HEAD -- HEAD HEAD &&
git diff --quiet --cached
fatal: unknown option --rename-threshold=0xf
ok 22 - --rename-threshold=<n> rejects non-numbers
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive \
--rename-threshold=$th0 --find-renames=$th2 $tail &&
check_threshold_2
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
CONFLICT (rename/delete): 3-old deleted in master and renamed to 3-new in HEAD. Version HEAD of 3-new left in tree.
CONFLICT (rename/delete): 2-old deleted in master and renamed to 2-new in HEAD. Version HEAD of 2-new left in tree.
ok 23 - last wins in --rename-threshold=<m> --find-renames=<n>
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git merge-recursive \
--find-renames=$th2 --rename-threshold=$th0 $tail &&
check_threshold_0
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
CONFLICT (rename/delete): 3-old deleted in master and renamed to 3-new in HEAD. Version HEAD of 3-new left in tree.
CONFLICT (rename/delete): 2-old deleted in master and renamed to 2-new in HEAD. Version HEAD of 2-new left in tree.
CONFLICT (rename/delete): 1-old deleted in master and renamed to 1-new in HEAD. Version HEAD of 1-new left in tree.
CONFLICT (rename/delete): 0-old deleted in master and renamed to 0-new in HEAD. Version HEAD of 0-new left in tree.
ok 24 - last wins in --find-renames=<m> --rename-threshold=<n>
expecting success:
git read-tree --reset -u HEAD &&
git -c merge.renames=false merge-recursive $tail &&
check_no_renames
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
ok 25 - merge.renames disables rename detection
expecting success:
git read-tree --reset -u HEAD &&
git -c diff.renames=false merge-recursive $tail &&
check_no_renames
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
ok 26 - merge.renames defaults to diff.renames
expecting success:
git read-tree --reset -u HEAD &&
test_must_fail git -c diff.renames=false -c merge.renames=true merge-recursive $tail &&
$check_50
Merging HEAD with master
Merging:
5337a04 rename
527542a delete
found 1 common ancestor:
d850d2a base
CONFLICT (rename/delete): 3-old deleted in master and renamed to 3-new in HEAD. Version HEAD of 3-new left in tree.
CONFLICT (rename/delete): 2-old deleted in master and renamed to 2-new in HEAD. Version HEAD of 2-new left in tree.
CONFLICT (rename/delete): 1-old deleted in master and renamed to 1-new in HEAD. Version HEAD of 1-new left in tree.
ok 27 - merge.renames overrides diff.renames
# passed all 27 test(s)
1..27
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3033-merge-toplevel.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3033-merge-toplevel/.git/
expecting success:
test_commit one &&
git branch left &&
git branch right &&
test_commit two &&
git checkout left &&
test_commit three &&
git checkout right &&
test_commit four &&
git checkout --orphan newroot &&
test_commit five &&
git checkout master
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
Switched to branch 'left'
[left 897c206] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
Switched to branch 'right'
[right bd0edcc] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 four.t
Switched to a new branch 'newroot'
[newroot (root-commit) 5280273] five
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 five.t
create mode 100644 four.t
create mode 100644 one.t
Switched to branch 'master'
ok 1 - setup
expecting success:
t3033_reset &&
git checkout --orphan test &&
git rm -fr . &&
test_must_fail git merge left right &&
test_must_fail git rev-parse --verify HEAD &&
git diff --quiet &&
test_must_fail git rev-parse HEAD
Reset branch 'master'
Switched to a new branch 'test'
rm 'one.t'
rm 'two.t'
fatal: Can merge only exactly one commit into empty head
fatal: Needed a single revision
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
HEAD
ok 2 - merge an octopus into void
expecting success:
t3033_reset &&
git reset --hard one &&
git merge left right &&
# one is ancestor of three (left) and four (right)
test_must_fail git rev-parse --verify HEAD^3 &&
git rev-parse HEAD^1 HEAD^2 | sort >actual &&
git rev-parse three four | sort >expect &&
test_cmp expect actual
Switched to and reset branch 'master'
HEAD is now at d79ce16 one
Fast-forwarding to: left
Trying simple merge with right
Merge made by the 'octopus' strategy.
four.t | 1 +
three.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 four.t
create mode 100644 three.t
fatal: Needed a single revision
ok 3 - merge an octopus, fast-forward (ff)
expecting success:
t3033_reset &&
git reset --hard one &&
git merge --no-ff left right &&
# one is ancestor of three (left) and four (right)
test_must_fail git rev-parse --verify HEAD^4 &&
git rev-parse HEAD^1 HEAD^2 HEAD^3 | sort >actual &&
git rev-parse one three four | sort >expect &&
test_cmp expect actual
Reset branch 'master'
HEAD is now at d79ce16 one
Fast-forwarding to: left
Trying simple merge with right
Merge made by the 'octopus' strategy.
four.t | 1 +
three.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 four.t
create mode 100644 three.t
fatal: Needed a single revision
ok 4 - merge octopus, non-fast-forward (ff)
expecting success:
t3033_reset &&
git merge left right &&
# two (master) is not an ancestor of three (left) and four (right)
test_must_fail git rev-parse --verify HEAD^4 &&
git rev-parse HEAD^1 HEAD^2 HEAD^3 | sort >actual &&
git rev-parse two three four | sort >expect &&
test_cmp expect actual
Reset branch 'master'
Trying simple merge with left
Trying simple merge with right
Merge made by the 'octopus' strategy.
four.t | 1 +
three.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 four.t
create mode 100644 three.t
fatal: Needed a single revision
ok 5 - merge octopus, fast-forward (does not ff)
expecting success:
t3033_reset &&
git merge --no-ff left right &&
test_must_fail git rev-parse --verify HEAD^4 &&
git rev-parse HEAD^1 HEAD^2 HEAD^3 | sort >actual &&
git rev-parse two three four | sort >expect &&
test_cmp expect actual
Reset branch 'master'
Trying simple merge with left
Trying simple merge with right
Merge made by the 'octopus' strategy.
four.t | 1 +
three.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 four.t
create mode 100644 three.t
fatal: Needed a single revision
ok 6 - merge octopus, non-fast-forward
expecting success:
t3033_reset &&
git checkout --orphan test &&
git rm -fr . &&
git fetch . left right &&
test_must_fail git merge FETCH_HEAD &&
test_must_fail git rev-parse --verify HEAD &&
git diff --quiet &&
test_must_fail git rev-parse HEAD
Reset branch 'master'
Switched to a new branch 'test'
rm 'one.t'
rm 'two.t'
From .
* branch left -> FETCH_HEAD
* branch right -> FETCH_HEAD
fatal: Can merge only exactly one commit into empty head
fatal: Needed a single revision
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
HEAD
ok 7 - merge FETCH_HEAD octopus into void
expecting success:
t3033_reset &&
git reset --hard one &&
git fetch . left right &&
git merge FETCH_HEAD &&
# one is ancestor of three (left) and four (right)
test_must_fail git rev-parse --verify HEAD^3 &&
git rev-parse HEAD^1 HEAD^2 | sort >actual &&
git rev-parse three four | sort >expect &&
test_cmp expect actual
Switched to and reset branch 'master'
HEAD is now at d79ce16 one
From .
* branch left -> FETCH_HEAD
* branch right -> FETCH_HEAD
Fast-forwarding to: 897c20684b5db8602798bc55d628f0a264841fec
Trying simple merge with bd0edcc3f6e0375d96ab0d02fcc4c4a1fe1d8c5f
Merge made by the 'octopus' strategy.
four.t | 1 +
three.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 four.t
create mode 100644 three.t
fatal: Needed a single revision
ok 8 - merge FETCH_HEAD octopus fast-forward (ff)
expecting success:
t3033_reset &&
git reset --hard one &&
git fetch . left right &&
git merge --no-ff FETCH_HEAD &&
# one is ancestor of three (left) and four (right)
test_must_fail git rev-parse --verify HEAD^4 &&
git rev-parse HEAD^1 HEAD^2 HEAD^3 | sort >actual &&
git rev-parse one three four | sort >expect &&
test_cmp expect actual
Reset branch 'master'
HEAD is now at d79ce16 one
From .
* branch left -> FETCH_HEAD
* branch right -> FETCH_HEAD
Fast-forwarding to: 897c20684b5db8602798bc55d628f0a264841fec
Trying simple merge with bd0edcc3f6e0375d96ab0d02fcc4c4a1fe1d8c5f
Merge made by the 'octopus' strategy.
four.t | 1 +
three.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 four.t
create mode 100644 three.t
fatal: Needed a single revision
ok 9 - merge FETCH_HEAD octopus non-fast-forward (ff)
expecting success:
t3033_reset &&
git fetch . left right &&
git merge FETCH_HEAD &&
# two (master) is not an ancestor of three (left) and four (right)
test_must_fail git rev-parse --verify HEAD^4 &&
git rev-parse HEAD^1 HEAD^2 HEAD^3 | sort >actual &&
git rev-parse two three four | sort >expect &&
test_cmp expect actual
Reset branch 'master'
From .
* branch left -> FETCH_HEAD
* branch right -> FETCH_HEAD
Trying simple merge with 897c20684b5db8602798bc55d628f0a264841fec
Trying simple merge with bd0edcc3f6e0375d96ab0d02fcc4c4a1fe1d8c5f
Merge made by the 'octopus' strategy.
four.t | 1 +
three.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 four.t
create mode 100644 three.t
fatal: Needed a single revision
ok 10 - merge FETCH_HEAD octopus fast-forward (does not ff)
expecting success:
t3033_reset &&
git fetch . left right &&
git merge --no-ff FETCH_HEAD &&
test_must_fail git rev-parse --verify HEAD^4 &&
git rev-parse HEAD^1 HEAD^2 HEAD^3 | sort >actual &&
git rev-parse two three four | sort >expect &&
test_cmp expect actual
Reset branch 'master'
From .
* branch left -> FETCH_HEAD
* branch right -> FETCH_HEAD
Trying simple merge with 897c20684b5db8602798bc55d628f0a264841fec
Trying simple merge with bd0edcc3f6e0375d96ab0d02fcc4c4a1fe1d8c5f
Merge made by the 'octopus' strategy.
four.t | 1 +
three.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 four.t
create mode 100644 three.t
fatal: Needed a single revision
ok 11 - merge FETCH_HEAD octopus non-fast-forward
expecting success:
t3033_reset &&
git reset --hard four &&
test_must_fail git merge five
Reset branch 'master'
HEAD is now at bd0edcc four
fatal: refusing to merge unrelated histories
ok 12 - refuse two-project merge by default
expecting success:
t3033_reset &&
git reset --hard four &&
git merge --allow-unrelated-histories five &&
git diff --exit-code five
Reset branch 'master'
HEAD is now at bd0edcc four
Merging:
bd0edcc four
virtual five
found 0 common ancestors:
Merge made by the 'recursive' strategy.
five.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 five.t
ok 13 - two-project merge with --allow-unrelated-histories
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3060-ls-files-with-tree.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3060-ls-files-with-tree/.git/
expecting success:
# The bug we are exercising requires a fair number of entries
# in a sub-directory so that add_index_entry will trigger a
# realloc.
echo file >expected &&
mkdir sub &&
for n in 0 1 2 3 4 5
do
for m in 0 1 2 3 4 5 6 7 8 9
do
num=00$n$m &&
>sub/file-$num &&
echo file-$num >>expected ||
return 1
done
done &&
git add . &&
git commit -m "add a bunch of files" &&
# We remove them all so that we will have something to add
# back with --with-tree and so that we will definitely be
# under the realloc size to trigger the bug.
rm -rf sub &&
git commit -a -m "remove them all" &&
# The bug also requires some entry before our directory so that
# prune_path will modify the_index.cache
mkdir a_directory_that_sorts_before_sub &&
>a_directory_that_sorts_before_sub/file &&
mkdir sub &&
>sub/file &&
git add .
[master (root-commit) 3cceecf] add a bunch of files
Author: A U Thor <author@example.com>
61 files changed, 61 insertions(+)
create mode 100644 expected
create mode 100644 sub/file-0000
create mode 100644 sub/file-0001
create mode 100644 sub/file-0002
create mode 100644 sub/file-0003
create mode 100644 sub/file-0004
create mode 100644 sub/file-0005
create mode 100644 sub/file-0006
create mode 100644 sub/file-0007
create mode 100644 sub/file-0008
create mode 100644 sub/file-0009
create mode 100644 sub/file-0010
create mode 100644 sub/file-0011
create mode 100644 sub/file-0012
create mode 100644 sub/file-0013
create mode 100644 sub/file-0014
create mode 100644 sub/file-0015
create mode 100644 sub/file-0016
create mode 100644 sub/file-0017
create mode 100644 sub/file-0018
create mode 100644 sub/file-0019
create mode 100644 sub/file-0020
create mode 100644 sub/file-0021
create mode 100644 sub/file-0022
create mode 100644 sub/file-0023
create mode 100644 sub/file-0024
create mode 100644 sub/file-0025
create mode 100644 sub/file-0026
create mode 100644 sub/file-0027
create mode 100644 sub/file-0028
create mode 100644 sub/file-0029
create mode 100644 sub/file-0030
create mode 100644 sub/file-0031
create mode 100644 sub/file-0032
create mode 100644 sub/file-0033
create mode 100644 sub/file-0034
create mode 100644 sub/file-0035
create mode 100644 sub/file-0036
create mode 100644 sub/file-0037
create mode 100644 sub/file-0038
create mode 100644 sub/file-0039
create mode 100644 sub/file-0040
create mode 100644 sub/file-0041
create mode 100644 sub/file-0042
create mode 100644 sub/file-0043
create mode 100644 sub/file-0044
create mode 100644 sub/file-0045
create mode 100644 sub/file-0046
create mode 100644 sub/file-0047
create mode 100644 sub/file-0048
create mode 100644 sub/file-0049
create mode 100644 sub/file-0050
create mode 100644 sub/file-0051
create mode 100644 sub/file-0052
create mode 100644 sub/file-0053
create mode 100644 sub/file-0054
create mode 100644 sub/file-0055
create mode 100644 sub/file-0056
create mode 100644 sub/file-0057
create mode 100644 sub/file-0058
create mode 100644 sub/file-0059
[master ff40cb5] remove them all
Author: A U Thor <author@example.com>
60 files changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 sub/file-0000
delete mode 100644 sub/file-0001
delete mode 100644 sub/file-0002
delete mode 100644 sub/file-0003
delete mode 100644 sub/file-0004
delete mode 100644 sub/file-0005
delete mode 100644 sub/file-0006
delete mode 100644 sub/file-0007
delete mode 100644 sub/file-0008
delete mode 100644 sub/file-0009
delete mode 100644 sub/file-0010
delete mode 100644 sub/file-0011
delete mode 100644 sub/file-0012
delete mode 100644 sub/file-0013
delete mode 100644 sub/file-0014
delete mode 100644 sub/file-0015
delete mode 100644 sub/file-0016
delete mode 100644 sub/file-0017
delete mode 100644 sub/file-0018
delete mode 100644 sub/file-0019
delete mode 100644 sub/file-0020
delete mode 100644 sub/file-0021
delete mode 100644 sub/file-0022
delete mode 100644 sub/file-0023
delete mode 100644 sub/file-0024
delete mode 100644 sub/file-0025
delete mode 100644 sub/file-0026
delete mode 100644 sub/file-0027
delete mode 100644 sub/file-0028
delete mode 100644 sub/file-0029
delete mode 100644 sub/file-0030
delete mode 100644 sub/file-0031
delete mode 100644 sub/file-0032
delete mode 100644 sub/file-0033
delete mode 100644 sub/file-0034
delete mode 100644 sub/file-0035
delete mode 100644 sub/file-0036
delete mode 100644 sub/file-0037
delete mode 100644 sub/file-0038
delete mode 100644 sub/file-0039
delete mode 100644 sub/file-0040
delete mode 100644 sub/file-0041
delete mode 100644 sub/file-0042
delete mode 100644 sub/file-0043
delete mode 100644 sub/file-0044
delete mode 100644 sub/file-0045
delete mode 100644 sub/file-0046
delete mode 100644 sub/file-0047
delete mode 100644 sub/file-0048
delete mode 100644 sub/file-0049
delete mode 100644 sub/file-0050
delete mode 100644 sub/file-0051
delete mode 100644 sub/file-0052
delete mode 100644 sub/file-0053
delete mode 100644 sub/file-0054
delete mode 100644 sub/file-0055
delete mode 100644 sub/file-0056
delete mode 100644 sub/file-0057
delete mode 100644 sub/file-0058
delete mode 100644 sub/file-0059
ok 1 - setup
expecting success:
# We have to run from a sub-directory to trigger prune_path
# Then we finally get to run our --with-tree test
(
cd sub &&
git ls-files --with-tree=HEAD~1 >../output
)
ok 2 - git -ls-files --with-tree should succeed from subdir
expecting success: test_cmp expected output
ok 3 - git -ls-files --with-tree should add entries from named tree.
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3050-subprojects-fetch.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3050-subprojects-fetch/.git/
expecting success:
test_tick &&
mkdir -p sub && (
cd sub &&
git init &&
>subfile &&
git add subfile &&
git commit -m "subproject commit #1"
) &&
>mainfile &&
git add sub mainfile &&
test_tick &&
git commit -m "superproject commit #1"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3050-subprojects-fetch/sub/.git/
[master (root-commit) 4c0c877] subproject commit #1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 subfile
warning: adding embedded git repository: sub
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sub
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sub
hint:
hint: See "git help submodule" for more information.
[master (root-commit) 1226c2e] superproject commit #1
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 100644 mainfile
create mode 160000 sub
ok 1 - setup
expecting success:
git clone "file://$(pwd)/.git" cloned &&
(git rev-parse HEAD && git ls-files -s) >expected &&
(
cd cloned &&
(git rev-parse HEAD && git ls-files -s) >../actual
) &&
test_cmp expected actual
Cloning into 'cloned'...
ok 2 - clone
expecting success:
echo more >mainfile &&
git update-index --force-remove sub &&
mv sub/.git sub/.git-disabled &&
git add sub/subfile mainfile &&
mv sub/.git-disabled sub/.git &&
test_tick &&
git commit -m "superproject commit #2"
[master 1548ecd] superproject commit #2
Author: A U Thor <author@example.com>
3 files changed, 1 insertion(+), 1 deletion(-)
delete mode 160000 sub
create mode 100644 sub/subfile
ok 3 - advance
expecting success:
(git rev-parse HEAD && git ls-files -s) >expected &&
(
cd cloned &&
git pull &&
(git rev-parse HEAD && git ls-files -s) >../actual
) &&
test_cmp expected actual
From file:///<<PKGBUILDDIR>>/t/trash directory.t3050-subprojects-fetch/
1226c2e..1548ecd master -> origin/master
Updating 1226c2e..1548ecd
Fast-forward
mainfile | 1 +
sub | 1 -
sub/subfile | 0
3 files changed, 1 insertion(+), 1 deletion(-)
delete mode 160000 sub
create mode 100644 sub/subfile
ok 4 - fetch
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3040-subprojects-basic.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3040-subprojects-basic/.git/
expecting success:
: >Makefile &&
git add Makefile &&
git commit -m "Superproject created"
[master (root-commit) 983f4c6] Superproject created
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 Makefile
ok 1 - setup: create superproject
expecting success:
mkdir sub1 &&
( cd sub1 && git init && : >Makefile && git add * &&
git commit -q -m "subproject 1" ) &&
mkdir sub2 &&
( cd sub2 && git init && : >Makefile && git add * &&
git commit -q -m "subproject 2" ) &&
git update-index --add sub1 &&
git add sub2 &&
git commit -q -m "subprojects added" &&
GIT_PRINT_SHA1_ELLIPSIS="yes" git diff-tree --abbrev=5 HEAD^ HEAD |cut -d" " -f-3,5- >current &&
git branch save HEAD &&
cat >expected <<-\EOF &&
:000000 160000 00000... A sub1
:000000 160000 00000... A sub2
EOF
test_cmp expected current
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3040-subprojects-basic/sub1/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3040-subprojects-basic/sub2/.git/
warning: adding embedded git repository: sub2
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sub2
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sub2
hint:
hint: See "git help submodule" for more information.
ok 2 - setup: create subprojects
expecting success:
git fsck --full
ok 3 - check if fsck ignores the subprojects
expecting success:
( cd sub1 &&
echo "all:" >>Makefile &&
echo " true" >>Makefile &&
git commit -q -a -m "make all" ) &&
test_expect_code 1 git diff-files --exit-code
:160000 160000 b7b9c4a6228137db1daeb770b7531a54f4395376 0000000000000000000000000000000000000000 M sub1
ok 4 - check if commit in a subproject detected
expecting success:
git commit -q -a -m "sub1 changed" &&
test_expect_code 1 git diff-tree --exit-code HEAD^ HEAD
:160000 160000 b7b9c4a6228137db1daeb770b7531a54f4395376 75e75c4e98e9f4d3a876e04f1b4344a1d67a9b4c M sub1
ok 5 - check if a changed subproject HEAD can be committed
expecting success:
test_expect_code 1 git diff-index --exit-code --cached save -- sub1
:160000 160000 b7b9c4a6228137db1daeb770b7531a54f4395376 75e75c4e98e9f4d3a876e04f1b4344a1d67a9b4c M sub1
ok 6 - check if diff-index works for subproject elements
expecting success:
test_expect_code 1 git diff-tree --exit-code HEAD^ HEAD -- sub1
:160000 160000 b7b9c4a6228137db1daeb770b7531a54f4395376 75e75c4e98e9f4d3a876e04f1b4344a1d67a9b4c M sub1
ok 7 - check if diff-tree works for subproject elements
expecting success:
test_expect_code 1 git diff --exit-code HEAD^ HEAD
diff --git a/sub1 b/sub1
index b7b9c4a..75e75c4 160000
--- a/sub1
+++ b/sub1
@@ -1 +1 @@
-Subproject commit b7b9c4a6228137db1daeb770b7531a54f4395376
+Subproject commit 75e75c4e98e9f4d3a876e04f1b4344a1d67a9b4c
ok 8 - check if git diff works for subproject elements
expecting success:
git ls-files -s >expected &&
git clone -l -s . cloned &&
( cd cloned && git ls-files -s ) >current &&
test_cmp expected current
Cloning into 'cloned'...
done.
ok 9 - check if clone works
expecting success:
git update-index --force-remove -- sub2 &&
mv sub2 sub3 &&
git add sub3 &&
git commit -q -m "renaming a subproject" &&
test_expect_code 1 git diff -M --name-status --exit-code HEAD^ HEAD
warning: adding embedded git repository: sub3
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sub3
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sub3
hint:
hint: See "git help submodule" for more information.
R100 sub2 sub3
ok 10 - removing and adding subproject
expecting success:
git checkout save &&
git diff-index --exit-code --raw --cached save -- sub1
warning: unable to rmdir 'sub3': Directory not empty
Switched to branch 'save'
M sub1
ok 11 - checkout in superproject
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3100-ls-tree-restrict.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3100-ls-tree-restrict/.git/
expecting success: mkdir path2 path2/baz &&
echo Hi >path0 &&
test_ln_s_add path0 path1 &&
test_ln_s_add ../path1 path2/bazbo &&
echo Lo >path2/foo &&
echo Mi >path2/baz/b &&
find path? \( -type f -o -type l \) -print |
xargs git update-index --add &&
tree=$(git write-tree) &&
echo $tree
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
a384d4f8dd786f29d6da4705dee4c2c0bc6b5049
ok 1 - setup
expecting success: git ls-tree $tree >current &&
cat >expected <<\EOF &&
100644 blob X path0
120000 blob X path1
040000 tree X path2
EOF
test_output
ok 2 - ls-tree plain
expecting success: git ls-tree -r $tree >current &&
cat >expected <<\EOF &&
100644 blob X path0
120000 blob X path1
100644 blob X path2/baz/b
120000 blob X path2/bazbo
100644 blob X path2/foo
EOF
test_output
ok 3 - ls-tree recursive
expecting success: git ls-tree -r -t $tree >current &&
cat >expected <<\EOF &&
100644 blob X path0
120000 blob X path1
040000 tree X path2
040000 tree X path2/baz
100644 blob X path2/baz/b
120000 blob X path2/bazbo
100644 blob X path2/foo
EOF
test_output
ok 4 - ls-tree recursive with -t
expecting success: git ls-tree -r -d $tree >current &&
cat >expected <<\EOF &&
040000 tree X path2
040000 tree X path2/baz
EOF
test_output
ok 5 - ls-tree recursive with -d
expecting success: git ls-tree $tree path >current &&
cat >expected <<\EOF &&
EOF
test_output
ok 6 - ls-tree filtered with path
expecting success: git ls-tree $tree path1 path0 >current &&
cat >expected <<\EOF &&
100644 blob X path0
120000 blob X path1
EOF
test_output
ok 7 - ls-tree filtered with path1 path0
expecting success: git ls-tree $tree path0/ >current &&
cat >expected <<\EOF &&
EOF
test_output
ok 8 - ls-tree filtered with path0/
expecting success: git ls-tree $tree path2 >current &&
cat >expected <<\EOF &&
040000 tree X path2
EOF
test_output
ok 9 - ls-tree filtered with path2
expecting success: git ls-tree $tree path2/ >current &&
cat >expected <<\EOF &&
040000 tree X path2/baz
120000 blob X path2/bazbo
100644 blob X path2/foo
EOF
test_output
ok 10 - ls-tree filtered with path2/
expecting success: git ls-tree $tree path2/baz >current &&
cat >expected <<\EOF &&
040000 tree X path2/baz
EOF
test_output
ok 11 - ls-tree filtered with path2/baz
expecting success: git ls-tree $tree path2/bak >current &&
cat >expected <<\EOF &&
EOF
test_output
ok 12 - ls-tree filtered with path2/bak
expecting success: git ls-tree -t $tree path2/bak >current &&
cat >expected <<\EOF &&
040000 tree X path2
EOF
test_output
ok 13 - ls-tree -t filtered with path2/bak
expecting success: git ls-tree $tree path2/baz path2/bazbo >current &&
cat >expected <<\EOF &&
040000 tree X path2/baz
120000 blob X path2/bazbo
EOF
test_output
ok 14 - ls-tree with one path a prefix of the other
# passed all 14 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3101-ls-tree-dirname.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3101-ls-tree-dirname/.git/
expecting success:
echo 111 >1.txt &&
echo 222 >2.txt &&
mkdir path0 path0/a path0/a/b path0/a/b/c &&
echo 111 >path0/a/b/c/1.txt &&
mkdir path1 path1/b path1/b/c &&
echo 111 >path1/b/c/1.txt &&
mkdir path2 &&
echo 111 >path2/1.txt &&
mkdir path3 &&
echo 111 >path3/1.txt &&
echo 222 >path3/2.txt &&
find *.txt path* \( -type f -o -type l \) -print |
xargs git update-index --add &&
tree=$(git write-tree) &&
echo $tree
ef2ea4d6de8ec0863f430e4cad7468ce74f60aa7
ok 1 - setup
expecting success:
git ls-tree $tree >current &&
cat >expected <<\EOF &&
100644 blob X 1.txt
100644 blob X 2.txt
040000 tree X path0
040000 tree X path1
040000 tree X path2
040000 tree X path3
EOF
test_output
ok 2 - ls-tree plain
expecting success:
git ls-tree -r $tree >current &&
cat >expected <<\EOF &&
100644 blob X 1.txt
100644 blob X 2.txt
100644 blob X path0/a/b/c/1.txt
100644 blob X path1/b/c/1.txt
100644 blob X path2/1.txt
100644 blob X path3/1.txt
100644 blob X path3/2.txt
EOF
test_output
ok 3 - ls-tree recursive
expecting success:
git ls-tree $tree 1.txt >current &&
cat >expected <<\EOF &&
100644 blob X 1.txt
EOF
test_output
ok 4 - ls-tree filter 1.txt
expecting success:
git ls-tree $tree path1/b/c/1.txt >current &&
cat >expected <<\EOF &&
100644 blob X path1/b/c/1.txt
EOF
test_output
ok 5 - ls-tree filter path1/b/c/1.txt
expecting success:
git ls-tree $tree 1.txt path0/a/b/c/1.txt \
path1/b/c/1.txt path2/1.txt path3/1.txt >current &&
cat >expected <<\EOF &&
100644 blob X 1.txt
100644 blob X path0/a/b/c/1.txt
100644 blob X path1/b/c/1.txt
100644 blob X path2/1.txt
100644 blob X path3/1.txt
EOF
test_output
ok 6 - ls-tree filter all 1.txt files
expecting success:
git ls-tree $tree path3 path2 path0/a/b/c path1/b/c path0/a >current &&
cat >expected <<\EOF &&
040000 tree X path0/a/b/c
040000 tree X path1/b/c
040000 tree X path2
040000 tree X path3
EOF
test_output
ok 7 - ls-tree filter directories
expecting success:
git ls-tree $tree 1.txt ./1.txt .//1.txt \
path3/1.txt path3/./1.txt path3 path3// >current &&
cat >expected <<\EOF &&
100644 blob X 1.txt
100644 blob X path3/1.txt
100644 blob X path3/2.txt
EOF
test_output
ok 8 - ls-tree filter odd names
expecting success:
git ls-tree $tree 1.txt/ abc.txt \
path3//23.txt path3/2.txt/// >current &&
>expected &&
test_output
ok 9 - ls-tree filter missing files and extra slashes
expecting success:
git ls-tree $tree pa path3/a >current &&
>expected &&
test_output
ok 10 - ls-tree filter is leading path match
expecting success:
(
cd path0 &&
git ls-tree --full-name $tree a
) >current &&
cat >expected <<\EOF &&
040000 tree X path0/a
EOF
test_output
ok 11 - ls-tree --full-name
expecting success:
(
cd path1/b/c &&
git ls-tree --full-tree $tree
) >current &&
cat >expected <<\EOF &&
100644 blob X 1.txt
100644 blob X 2.txt
040000 tree X path0
040000 tree X path1
040000 tree X path2
040000 tree X path3
EOF
test_output
ok 12 - ls-tree --full-tree
expecting success:
(
cd path3/ &&
git ls-tree --full-tree -r $tree
) >current &&
cat >expected <<\EOF &&
100644 blob X 1.txt
100644 blob X 2.txt
100644 blob X path0/a/b/c/1.txt
100644 blob X path1/b/c/1.txt
100644 blob X path2/1.txt
100644 blob X path3/1.txt
100644 blob X path3/2.txt
EOF
test_output
ok 13 - ls-tree --full-tree -r
expecting success:
git ls-tree --abbrev=5 $tree >current &&
sed -e "s/ $_x05[0-9a-f]* / X /" <current >check &&
cat >expected <<\EOF &&
100644 blob X 1.txt
100644 blob X 2.txt
040000 tree X path0
040000 tree X path1
040000 tree X path2
040000 tree X path3
EOF
test_cmp expected check
ok 14 - ls-tree --abbrev=5
expecting success:
git ls-tree --name-only $tree >current &&
cat >expected <<\EOF &&
1.txt
2.txt
path0
path1
path2
path3
EOF
test_output
ok 15 - ls-tree --name-only
expecting success:
git ls-tree --name-only -r $tree >current &&
cat >expected <<\EOF &&
1.txt
2.txt
path0/a/b/c/1.txt
path1/b/c/1.txt
path2/1.txt
path3/1.txt
path3/2.txt
EOF
test_output
ok 16 - ls-tree --name-only -r
# passed all 16 test(s)
1..16
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3102-ls-tree-wildcards.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3102-ls-tree-wildcards/.git/
expecting success:
mkdir a aa "a[a]" &&
touch a/one aa/two "a[a]/three" &&
git add a/one aa/two "a[a]/three" &&
git commit -m test
[master (root-commit) 88f0f1a] test
Author: A U Thor <author@example.com>
3 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a/one
create mode 100644 a[a]/three
create mode 100644 aa/two
ok 1 - setup
expecting success:
cat >expect <<-EOF &&
100644 blob $EMPTY_BLOB a[a]/three
EOF
git ls-tree -r HEAD "a[a]" >actual &&
test_cmp expect actual
ok 2 - ls-tree a[a] matches literally
expecting success:
cat >expect <<-EOF &&
100644 blob $EMPTY_BLOB ../a[a]/three
EOF
( cd aa && git ls-tree -r HEAD "../a[a]" ) >actual &&
test_cmp expect actual
ok 3 - ls-tree outside prefix
checking known breakage:
git ls-files ":(exclude)a" "a*" >expect &&
git ls-tree --name-only -r HEAD ":(exclude)a" "a*" >actual &&
test_cmp expect actual
fatal: :(exclude)a: pathspec magic not supported by this command: 'exclude' (mnemonic: '!')
not ok 4 - ls-tree does not yet support negated pathspec # TODO known breakage
# still have 1 known breakage(s)
# passed all remaining 3 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3103-ls-tree-misc.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3103-ls-tree-misc/.git/
expecting success:
mkdir a &&
touch a/one &&
git add a/one &&
git commit -m test
[master (root-commit) 86f37be] test
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a/one
ok 1 - setup
expecting success:
tree=$(git rev-parse HEAD:a) &&
rm -f .git/objects/$(echo $tree | sed -e "s,^\(..\),\1/,") &&
test_must_fail git ls-tree -r HEAD
error: Could not read 5fcffbd6e4c5c5b8d81f5e9314b20e338e3ffff5
ok 2 - ls-tree fails with non-zero exit code on broken tree
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3201-branch-contains.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3201-branch-contains/.git/
expecting success:
>file &&
git add file &&
test_tick &&
git commit -m initial &&
git branch side &&
echo 1 >file &&
test_tick &&
git commit -a -m "second on master" &&
git checkout side &&
echo 1 >file &&
test_tick &&
git commit -a -m "second on side" &&
git merge master
[master (root-commit) 1bd44cb] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
[master c77a0a9] second on master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'side'
[side 5a0fd8a] second on side
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Merging:
5a0fd8a second on side
virtual master
found 1 common ancestor:
1bd44cb initial
Merge made by the 'recursive' strategy.
ok 1 - setup
expecting success:
git branch --contains=master >actual &&
{
echo " master" && echo "* side"
} >expect &&
test_cmp expect actual
ok 2 - branch --contains=master
expecting success:
git branch --contains master >actual &&
{
echo " master" && echo "* side"
} >expect &&
test_cmp expect actual
ok 3 - branch --contains master
expecting success:
git branch --no-contains=master >actual &&
test_must_be_empty actual
ok 4 - branch --no-contains=master
expecting success:
git branch --no-contains master >actual &&
test_must_be_empty actual
ok 5 - branch --no-contains master
expecting success:
git branch --contains=side >actual &&
{
echo "* side"
} >expect &&
test_cmp expect actual
ok 6 - branch --contains=side
expecting success:
git branch --no-contains=side >actual &&
{
echo " master"
} >expect &&
test_cmp expect actual
ok 7 - branch --no-contains=side
expecting success:
git branch --contains=master master >actual &&
{
echo " master"
} >expect &&
test_cmp expect actual
ok 8 - branch --contains with pattern implies --list
expecting success:
git branch --no-contains=master master >actual &&
test_must_be_empty actual
ok 9 - branch --no-contains with pattern implies --list
expecting success:
git branch --merged >actual &&
{
echo " master" &&
echo "* side"
} >expect &&
test_cmp expect actual
ok 10 - side: branch --merged
expecting success:
git branch --merged=side master >actual &&
{
echo " master"
} >expect &&
test_cmp expect actual
ok 11 - branch --merged with pattern implies --list
expecting success:
git branch --no-merged >actual &&
test_must_be_empty actual
ok 12 - side: branch --no-merged
expecting success:
git checkout master &&
git branch --merged >actual &&
{
echo "* master"
} >expect &&
test_cmp expect actual
Switched to branch 'master'
ok 13 - master: branch --merged
expecting success:
git branch --no-merged >actual &&
{
echo " side"
} >expect &&
test_cmp expect actual
ok 14 - master: branch --no-merged
expecting success:
git branch --no-merged=master master >actual &&
test_must_be_empty actual
ok 15 - branch --no-merged with pattern implies --list
expecting success:
test_must_fail git branch --contains=master -d &&
test_must_fail git branch --contains=master -m foo &&
test_must_fail git branch --no-contains=master -d &&
test_must_fail git branch --no-contains=master -m foo
usage: git branch [<options>] [-r | -a] [--merged | --no-merged]
or: git branch [<options>] [-l] [-f] <branch-name> [<start-point>]
or: git branch [<options>] [-r] (-d | -D) <branch-name>...
or: git branch [<options>] (-m | -M) [<old-branch>] <new-branch>
or: git branch [<options>] (-c | -C) [<old-branch>] <new-branch>
or: git branch [<options>] [-r | -a] [--points-at]
or: git branch [<options>] [-r | -a] [--format]
Generic options
-v, --verbose show hash and subject, give twice for upstream branch
-q, --quiet suppress informational messages
-t, --track set up tracking mode (see git-pull(1))
-u, --set-upstream-to <upstream>
change the upstream info
--unset-upstream Unset the upstream info
--color[=<when>] use colored output
-r, --remotes act on remote-tracking branches
--contains <commit> print only branches that contain the commit
--no-contains <commit>
print only branches that don't contain the commit
--abbrev[=<n>] use <n> digits to display SHA-1s
Specific git-branch actions:
-a, --all list both remote-tracking and local branches
-d, --delete delete fully merged branch
-D delete branch (even if not merged)
-m, --move move/rename a branch and its reflog
-M move/rename a branch, even if target exists
-c, --copy copy a branch and its reflog
-C copy a branch, even if target exists
-l, --list list branch names
--show-current show current branch name
--create-reflog create the branch's reflog
--edit-description edit the description for the branch
-f, --force force creation, move/rename, deletion
--merged <commit> print only branches that are merged
--no-merged <commit> print only branches that are not merged
--column[=<style>] list branches in columns
--sort <key> field name to sort on
--points-at <object> print only branches of the object
-i, --ignore-case sorting and filtering are case insensitive
--format <format> format to use for the output
usage: git branch [<options>] [-r | -a] [--merged | --no-merged]
or: git branch [<options>] [-l] [-f] <branch-name> [<start-point>]
or: git branch [<options>] [-r] (-d | -D) <branch-name>...
or: git branch [<options>] (-m | -M) [<old-branch>] <new-branch>
or: git branch [<options>] (-c | -C) [<old-branch>] <new-branch>
or: git branch [<options>] [-r | -a] [--points-at]
or: git branch [<options>] [-r | -a] [--format]
Generic options
-v, --verbose show hash and subject, give twice for upstream branch
-q, --quiet suppress informational messages
-t, --track set up tracking mode (see git-pull(1))
-u, --set-upstream-to <upstream>
change the upstream info
--unset-upstream Unset the upstream info
--color[=<when>] use colored output
-r, --remotes act on remote-tracking branches
--contains <commit> print only branches that contain the commit
--no-contains <commit>
print only branches that don't contain the commit
--abbrev[=<n>] use <n> digits to display SHA-1s
Specific git-branch actions:
-a, --all list both remote-tracking and local branches
-d, --delete delete fully merged branch
-D delete branch (even if not merged)
-m, --move move/rename a branch and its reflog
-M move/rename a branch, even if target exists
-c, --copy copy a branch and its reflog
-C copy a branch, even if target exists
-l, --list list branch names
--show-current show current branch name
--create-reflog create the branch's reflog
--edit-description edit the description for the branch
-f, --force force creation, move/rename, deletion
--merged <commit> print only branches that are merged
--no-merged <commit> print only branches that are not merged
--column[=<style>] list branches in columns
--sort <key> field name to sort on
--points-at <object> print only branches of the object
-i, --ignore-case sorting and filtering are case insensitive
--format <format> format to use for the output
usage: git branch [<options>] [-r | -a] [--merged | --no-merged]
or: git branch [<options>] [-l] [-f] <branch-name> [<start-point>]
or: git branch [<options>] [-r] (-d | -D) <branch-name>...
or: git branch [<options>] (-m | -M) [<old-branch>] <new-branch>
or: git branch [<options>] (-c | -C) [<old-branch>] <new-branch>
or: git branch [<options>] [-r | -a] [--points-at]
or: git branch [<options>] [-r | -a] [--format]
Generic options
-v, --verbose show hash and subject, give twice for upstream branch
-q, --quiet suppress informational messages
-t, --track set up tracking mode (see git-pull(1))
-u, --set-upstream-to <upstream>
change the upstream info
--unset-upstream Unset the upstream info
--color[=<when>] use colored output
-r, --remotes act on remote-tracking branches
--contains <commit> print only branches that contain the commit
--no-contains <commit>
print only branches that don't contain the commit
--abbrev[=<n>] use <n> digits to display SHA-1s
Specific git-branch actions:
-a, --all list both remote-tracking and local branches
-d, --delete delete fully merged branch
-D delete branch (even if not merged)
-m, --move move/rename a branch and its reflog
-M move/rename a branch, even if target exists
-c, --copy copy a branch and its reflog
-C copy a branch, even if target exists
-l, --list list branch names
--show-current show current branch name
--create-reflog create the branch's reflog
--edit-description edit the description for the branch
-f, --force force creation, move/rename, deletion
--merged <commit> print only branches that are merged
--no-merged <commit> print only branches that are not merged
--column[=<style>] list branches in columns
--sort <key> field name to sort on
--points-at <object> print only branches of the object
-i, --ignore-case sorting and filtering are case insensitive
--format <format> format to use for the output
usage: git branch [<options>] [-r | -a] [--merged | --no-merged]
or: git branch [<options>] [-l] [-f] <branch-name> [<start-point>]
or: git branch [<options>] [-r] (-d | -D) <branch-name>...
or: git branch [<options>] (-m | -M) [<old-branch>] <new-branch>
or: git branch [<options>] (-c | -C) [<old-branch>] <new-branch>
or: git branch [<options>] [-r | -a] [--points-at]
or: git branch [<options>] [-r | -a] [--format]
Generic options
-v, --verbose show hash and subject, give twice for upstream branch
-q, --quiet suppress informational messages
-t, --track set up tracking mode (see git-pull(1))
-u, --set-upstream-to <upstream>
change the upstream info
--unset-upstream Unset the upstream info
--color[=<when>] use colored output
-r, --remotes act on remote-tracking branches
--contains <commit> print only branches that contain the commit
--no-contains <commit>
print only branches that don't contain the commit
--abbrev[=<n>] use <n> digits to display SHA-1s
Specific git-branch actions:
-a, --all list both remote-tracking and local branches
-d, --delete delete fully merged branch
-D delete branch (even if not merged)
-m, --move move/rename a branch and its reflog
-M move/rename a branch, even if target exists
-c, --copy copy a branch and its reflog
-C copy a branch, even if target exists
-l, --list list branch names
--show-current show current branch name
--create-reflog create the branch's reflog
--edit-description edit the description for the branch
-f, --force force creation, move/rename, deletion
--merged <commit> print only branches that are merged
--no-merged <commit> print only branches that are not merged
--column[=<style>] list branches in columns
--sort <key> field name to sort on
--points-at <object> print only branches of the object
-i, --ignore-case sorting and filtering are case insensitive
--format <format> format to use for the output
ok 16 - implicit --list conflicts with modification options
expecting success:
test_must_fail git branch --contains master^{tree} &&
blob=$(git hash-object -w --stdin <<-\EOF
Some blob
EOF
) &&
test_must_fail git branch --contains $blob &&
test_must_fail git branch --no-contains $blob
error: object f27c6ae26adb8396d3861976ba268f87ad8afa0b is a tree, not a commit
error: no such commit master^{tree}
error: object cfb9f2866bfe62c278d75e8c33f020ccc27b5829 is a blob, not a commit
error: no such commit cfb9f2866bfe62c278d75e8c33f020ccc27b5829
error: object cfb9f2866bfe62c278d75e8c33f020ccc27b5829 is a blob, not a commit
error: no such commit cfb9f2866bfe62c278d75e8c33f020ccc27b5829
ok 17 - Assert that --contains only works on commits, not trees & blobs
expecting success:
git branch --track topic master &&
git branch zzz topic &&
git checkout topic &&
test_commit foo &&
git branch --merged topic >actual &&
cat >expect <<-\EOF &&
master
* topic
zzz
EOF
test_cmp expect actual &&
git branch --verbose --merged topic >actual &&
cat >expect <<-\EOF &&
master c77a0a9 second on master
* topic 2c939f4 [ahead 1] foo
zzz c77a0a9 second on master
EOF
test_i18ncmp expect actual
Branch 'topic' set up to track local branch 'master'.
Switched to branch 'topic'
Your branch is up to date with 'master'.
[topic 2c939f4] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 18 - branch --merged with --verbose
expecting success:
git branch --contains zzz --no-contains topic >actual &&
cat >expect <<-\EOF &&
master
side
zzz
EOF
test_cmp expect actual
ok 19 - branch --contains combined with --no-contains
# passed all 19 test(s)
1..19
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3202-show-branch-octopus.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3202-show-branch-octopus/.git/
expecting success:
> file &&
git add file &&
test_tick &&
git commit -m initial &&
for i in $numbers
do
git checkout -b branch$i master &&
> file$i &&
git add file$i &&
test_tick &&
git commit -m branch$i || return 1
done
[master (root-commit) 1bd44cb] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
Switched to a new branch 'branch1'
[branch1 eabeb5d] branch1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file1
Switched to a new branch 'branch2'
[branch2 b4fb685] branch2
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file2
Switched to a new branch 'branch3'
[branch3 8334722] branch3
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file3
Switched to a new branch 'branch4'
[branch4 142d8e4] branch4
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file4
Switched to a new branch 'branch5'
[branch5 c5402b6] branch5
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file5
Switched to a new branch 'branch6'
[branch6 d33aeab] branch6
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file6
Switched to a new branch 'branch7'
[branch7 cb80438] branch7
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file7
Switched to a new branch 'branch8'
[branch8 c922302] branch8
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file8
Switched to a new branch 'branch9'
[branch9 fabe124] branch9
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file9
Switched to a new branch 'branch10'
[branch10 4d9b8be] branch10
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file10
ok 1 - setup
expecting success:
git show-branch $(for i in $numbers; do echo branch$i; done) > out &&
test_cmp expect out
ok 2 - show-branch with more than 8 branches
expecting success:
for i in $numbers; do
git config --add showbranch.default branch$i
done &&
git show-branch >out &&
test_cmp expect out
ok 3 - show-branch with showbranch.default
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3203-branch-output.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3203-branch-output/.git/
expecting success:
echo content >file &&
git add file &&
git commit -m one &&
echo content >>file &&
git commit -a -m two
[master (root-commit) 87688d9] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master a69f272] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - make commits
expecting success:
git branch branch-one &&
git branch branch-two HEAD^
ok 2 - make branches
expecting success:
git update-ref refs/remotes/origin/branch-one branch-one &&
git update-ref refs/remotes/origin/branch-two branch-two &&
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/branch-one
ok 3 - make remote branches
expecting success:
git branch >actual &&
test_cmp expect actual
ok 4 - git branch shows local branches
expecting success:
git branch --list >actual &&
test_cmp expect actual
ok 5 - git branch --list shows local branches
expecting success:
git branch --list branch* >actual &&
test_cmp expect actual
ok 6 - git branch --list pattern shows matching local branches
expecting success:
git branch -r >actual &&
test_cmp expect actual
ok 7 - git branch -r shows remote branches
expecting success:
git branch -a >actual &&
test_cmp expect actual
ok 8 - git branch -a shows local and remote branches
expecting success:
git branch -v >tmp &&
awk "{print \$NF}" <tmp >actual &&
test_cmp expect actual
ok 9 - git branch -v shows branch summaries
expecting success:
git branch --list -v branch* >tmp &&
awk "{print \$NF}" <tmp >actual &&
test_cmp expect actual
ok 10 - git branch --list -v pattern shows branch summaries
expecting success:
git branch --list --ignore-case -v BRANCH* >tmp &&
awk "{print \$NF}" <tmp >actual &&
test_cmp expect actual
ok 11 - git branch --ignore-case --list -v pattern shows branch summaries
expecting success:
test_must_fail git branch -v branch*
fatal: 'branch*' is not a valid branch name.
ok 12 - git branch -v pattern does not show branch summaries
expecting success:
cat >expect <<-\EOF &&
branch-two
EOF
git checkout branch-two &&
git branch --show-current >actual &&
test_cmp expect actual
Switched to branch 'branch-two'
ok 13 - git branch `--show-current` shows current branch
expecting success:
git checkout HEAD^0 &&
git branch --show-current >actual &&
test_must_be_empty actual
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 87688d9 one
ok 14 - git branch `--show-current` is silent when detached HEAD
expecting success:
cat >expect <<-\EOF &&
branch-and-tag-name
EOF
test_when_finished "
git checkout branch-one
git branch -D branch-and-tag-name
" &&
git checkout -b branch-and-tag-name &&
test_when_finished "git tag -d branch-and-tag-name" &&
git tag branch-and-tag-name &&
git branch --show-current >actual &&
test_cmp expect actual
Switched to a new branch 'branch-and-tag-name'
Deleted tag 'branch-and-tag-name' (was 87688d9)
Switched to branch 'branch-one'
Deleted branch branch-and-tag-name (was 87688d9).
ok 15 - git branch `--show-current` works properly when tag exists
expecting success:
cat >expect <<-\EOF &&
branch-one
branch-two
EOF
git checkout branch-one &&
test_when_finished "
git worktree remove worktree_dir
" &&
git worktree add worktree_dir branch-two &&
{
git branch --show-current &&
git -C worktree_dir branch --show-current
} >actual &&
test_cmp expect actual
Already on 'branch-one'
Preparing worktree (checking out 'branch-two')
HEAD is now at 87688d9 one
ok 16 - git branch `--show-current` works properly with worktrees
expecting success:
cat >expect <<EOF &&
* (HEAD detached at $(git rev-parse --short HEAD^0))
branch-one
branch-two
master
EOF
git checkout HEAD^0 &&
git branch >actual &&
test_i18ncmp expect actual
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at a69f272 two
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 17 - git branch shows detached HEAD properly
expecting success:
git checkout master &&
cat >expect <<EOF &&
* (HEAD detached at $(git rev-parse --short HEAD^0))
branch-one
branch-two
master
EOF
git checkout --detach &&
git branch >actual &&
test_i18ncmp expect actual
Switched to branch 'master'
HEAD is now at a69f272 two
ok 18 - git branch shows detached HEAD properly after checkout --detach
expecting success:
cat >expect <<EOF &&
* (HEAD detached from $(git rev-parse --short HEAD))
branch-one
branch-two
master
EOF
git reset --hard HEAD^1 &&
git branch >actual &&
test_i18ncmp expect actual
HEAD is now at 87688d9 one
ok 19 - git branch shows detached HEAD properly after moving
expecting success:
cat >expect <<EOF &&
* (HEAD detached at fromtag)
branch-one
branch-two
master
EOF
git tag fromtag master &&
git checkout fromtag &&
git branch >actual &&
test_i18ncmp expect actual
Previous HEAD position was 87688d9 one
HEAD is now at a69f272 two
ok 20 - git branch shows detached HEAD properly from tag
expecting success:
cat >expect <<EOF &&
* (HEAD detached from fromtag)
branch-one
branch-two
master
EOF
git reset --hard HEAD^1 &&
git branch >actual &&
test_i18ncmp expect actual
HEAD is now at 87688d9 one
ok 21 - git branch shows detached HEAD properly after moving from tag
expecting success:
cat >expect <<-\EOF &&
* (HEAD detached from fromtag)
branch-two
branch-one
master
EOF
git branch --sort=objectsize >actual &&
test_i18ncmp expect actual
ok 22 - git branch `--sort` option
expecting success:
cat >expect <<-\EOF &&
branch-one
master
EOF
git branch --points-at=branch-one >actual &&
test_cmp expect actual
ok 23 - git branch --points-at option
expecting success:
git tag ambiguous &&
git branch ambiguous &&
echo " ambiguous" >expect &&
git branch --list ambiguous >actual &&
test_cmp expect actual
ok 24 - ambiguous branch/tag not marked
expecting success:
git symbolic-ref refs/heads/ref-to-branch refs/heads/branch-one &&
git symbolic-ref refs/heads/ref-to-remote refs/remotes/origin/branch-one &&
cat >expect <<-\EOF &&
ref-to-branch -> branch-one
ref-to-remote -> origin/branch-one
EOF
git branch >actual.raw &&
grep ref-to <actual.raw >actual &&
test_cmp expect actual
ok 25 - local-branch symrefs shortened properly
expecting success:
(
git init sort-icase &&
cd sort-icase &&
test_commit initial &&
git branch branch-one &&
git branch BRANCH-two &&
git branch --list | awk "{print \$NF}" >actual &&
cat >expected <<-\EOF &&
BRANCH-two
branch-one
master
EOF
test_cmp expected actual &&
git branch --list -i | awk "{print \$NF}" >actual &&
cat >expected <<-\EOF &&
branch-one
BRANCH-two
master
EOF
test_cmp expected actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3203-branch-output/sort-icase/.git/
[master (root-commit) 24b24cf] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
ok 26 - sort branches, ignore case
expecting success:
cat >expect <<-\EOF &&
Refname is (HEAD detached from fromtag)
Refname is refs/heads/ambiguous
Refname is refs/heads/branch-one
Refname is refs/heads/branch-two
Refname is refs/heads/master
Refname is refs/heads/ref-to-branch
Refname is refs/heads/ref-to-remote
EOF
git branch --format="Refname is %(refname)" >actual &&
test_i18ncmp expect actual
ok 27 - git branch --format option
expecting success:
cat >expect <<-EOF &&
* <GREEN>(HEAD detached from fromtag)<RESET>
ambiguous<RESET>
branch-one<RESET>
+ <CYAN>branch-two<RESET>
master<RESET>
ref-to-branch<RESET> -> branch-one
ref-to-remote<RESET> -> origin/branch-one
EOF
git worktree add worktree_dir branch-two &&
git branch --color >actual.raw &&
rm -r worktree_dir &&
git worktree prune &&
test_decode_color <actual.raw >actual &&
test_i18ncmp expect actual
Preparing worktree (checking out 'branch-two')
HEAD is now at 87688d9 one
ok 28 - worktree colors correct
expecting success:
echo "<RED>master<RESET>" >expect.color &&
echo "master" >expect.bare &&
color_args="--format=%(color:red)%(refname:short) --list master"
ok 29 - set up color tests
expecting success:
TERM=vt100 git branch $color_args >actual.raw &&
test_decode_color <actual.raw >actual &&
test_cmp expect.bare actual
ok 30 - %(color) omitted without tty
checking prerequisite: TTY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq PERL &&
# Reading from the pty master seems to get stuck _sometimes_
# on Mac OS X 10.5.0, using Perl 5.10.0 or 5.8.9.
#
# Reproduction recipe: run
#
# i=0
# while ./test-terminal.perl echo hi $i
# do
# : $((i = $i + 1))
# done
#
# After 2000 iterations or so it hangs.
# https://rt.cpan.org/Ticket/Display.html?id=65692
#
test "$(uname -s)" != Darwin &&
perl "$TEST_DIRECTORY"/test-terminal.perl \
sh -c "test -t 1 && test -t 2"
)
prerequisite TTY ok
expecting success:
test_terminal git branch $color_args >actual.raw &&
test_decode_color <actual.raw >actual &&
test_cmp expect.color actual
ok 31 - %(color) present with tty
expecting success:
git branch --color $color_args >actual.raw &&
test_decode_color <actual.raw >actual &&
test_cmp expect.color actual
ok 32 - --color overrides auto-color
expecting success:
one=$(git rev-parse --short HEAD) &&
two=$(git rev-parse --short master) &&
cat >expect <<-EOF &&
* (HEAD detached from fromtag) $one one
ambiguous $one one
branch-one $two two
+ branch-two $one ($(pwd)/worktree_dir) one
master $two two
ref-to-branch $two two
ref-to-remote $two two
EOF
git worktree add worktree_dir branch-two &&
git branch -vv >actual &&
rm -r worktree_dir &&
git worktree prune &&
test_i18ncmp expect actual
Preparing worktree (checking out 'branch-two')
HEAD is now at 87688d9 one
ok 33 - verbose output lists worktree path
# passed all 33 test(s)
1..33
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3204-branch-name-interpretation.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3204-branch-name-interpretation/.git/
expecting success:
test_commit one &&
test_commit two &&
git remote add origin foo.git
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
ok 1 - set up repo
expecting success:
git branch previous one &&
git checkout previous &&
git checkout master &&
git branch -f @{-1} two &&
expect_branch previous two
Switched to branch 'previous'
Switched to branch 'master'
ok 2 - update branch via @{-1}
expecting success:
git branch local one &&
git branch --set-upstream-to=local &&
git branch -f @{upstream} two &&
expect_branch local two
Branch 'master' set up to track local branch 'local'.
ok 3 - update branch via local @{upstream}
expecting success:
git update-ref refs/remotes/origin/remote one &&
git branch --set-upstream-to=origin/remote &&
test_must_fail git branch -f @{upstream} two
Branch 'master' set up to track remote branch 'remote' from 'origin'.
fatal: '@{upstream}' is not a valid branch name.
ok 4 - disallow updating branch via remote @{upstream}
expecting success:
git branch refs/heads/qualified two &&
expect_branch refs/heads/refs/heads/qualified two
ok 5 - create branch with pseudo-qualified name
expecting success:
git branch previous-del &&
git checkout previous-del &&
git checkout master &&
git branch -D @{-1} &&
expect_deleted previous-del
Switched to branch 'previous-del'
Switched to branch 'master'
Your branch is ahead of 'origin/remote' by 1 commit.
(use "git push" to publish your local commits)
Deleted branch previous-del (was 139b20d).
fatal: Needed a single revision
ok 6 - delete branch via @{-1}
expecting success:
git branch local-del &&
git branch --set-upstream-to=local-del &&
git branch -D @{upstream} &&
expect_deleted local-del
Branch 'master' set up to track local branch 'local-del'.
Deleted branch local-del (was 139b20d).
fatal: Needed a single revision
ok 7 - delete branch via local @{upstream}
expecting success:
git update-ref refs/remotes/origin/remote-del two &&
git branch --set-upstream-to=origin/remote-del &&
git branch -r -D @{upstream} &&
expect_deleted origin/remote-del
Branch 'master' set up to track remote branch 'remote-del' from 'origin'.
Deleted remote-tracking branch origin/remote-del (was 139b20d).
fatal: Needed a single revision
ok 8 - delete branch via remote @{upstream}
expecting success:
git update-ref refs/remotes/origin/remote-del two &&
git branch --set-upstream-to=origin/remote-del &&
git update-ref refs/heads/origin/remote-del two &&
git update-ref refs/heads/remotes/origin/remote-del two &&
test_must_fail git branch -D @{upstream} &&
expect_branch refs/heads/origin/remote-del two &&
expect_branch refs/heads/remotes/origin/remote-del two
Branch 'master' set up to track remote branch 'remote-del' from 'origin'.
error: branch '@{upstream}' not found.
ok 9 - delete @{upstream} expansion matches -r option
expecting success:
git update-ref refs/remotes/origin/previous one &&
git checkout -b origin/previous two &&
git checkout master &&
test_must_fail git branch -r -D @{-1} &&
expect_branch refs/remotes/origin/previous one &&
expect_branch refs/heads/origin/previous two
Switched to a new branch 'origin/previous'
Switched to branch 'master'
Your branch is up to date with 'remotes/origin/remote-del'.
error: remote-tracking branch '@{-1}' not found.
ok 10 - disallow deleting remote branch via @{-1}
expecting success:
git branch -f @ one &&
expect_branch refs/heads/@ one
ok 11 - create branch named "@"
expecting success:
git update-ref refs/heads/@ two &&
git branch -D @ &&
expect_deleted refs/heads/@
Deleted branch @ (was 139b20d).
fatal: Needed a single revision
ok 12 - delete branch named "@"
expecting success:
git update-ref refs/remotes/origin/checkout one &&
git branch --set-upstream-to=origin/checkout &&
git update-ref refs/heads/origin/checkout two &&
git update-ref refs/heads/remotes/origin/checkout two &&
git checkout @{upstream} &&
expect_branch HEAD one
Branch 'master' set up to track remote branch 'checkout' from 'origin'.
warning: refname '@{upstream}' is ambiguous.
Note: switching to '@{upstream}'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d79ce16 one
ok 13 - checkout does not treat remote @{upstream} as a branch
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3205-branch-color.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3205-branch-color/.git/
expecting success:
test_commit foo &&
git update-ref refs/remotes/origin/master HEAD &&
git update-ref refs/heads/other HEAD
[master (root-commit) ddd63c9] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
ok 1 - set up some sample branches
expecting success:
git config color.branch.local blue &&
git config color.branch.remote yellow &&
git config color.branch.current cyan
ok 2 - set up some color config
expecting success:
cat >expect <<-\EOF &&
* <CYAN>master<RESET>
<BLUE>other<RESET>
<YELLOW>remotes/origin/master<RESET>
EOF
git branch --color -a >actual.raw &&
test_decode_color <actual.raw >actual &&
test_cmp expect actual
ok 3 - regular output shows colors
expecting success:
oid=$(git rev-parse --short HEAD) &&
cat >expect <<-EOF &&
* <CYAN>master <RESET> $oid foo
<BLUE>other <RESET> $oid foo
<YELLOW>remotes/origin/master<RESET> $oid foo
EOF
git branch --color -v -a >actual.raw &&
test_decode_color <actual.raw >actual &&
test_cmp expect actual
ok 4 - verbose output shows colors
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3206-range-diff.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3206-range-diff/.git/
expecting success:
git fast-import < "$TEST_DIRECTORY"/t3206/history.export
/<<PKGBUILDDIR>>/git-fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects: 5000
Total objects: 77 ( 21 duplicates )
blobs : 14 ( 0 duplicates 0 deltas of 11 attempts)
trees : 21 ( 21 duplicates 1 deltas of 20 attempts)
commits: 42 ( 0 duplicates 0 deltas of 0 attempts)
tags : 0 ( 0 duplicates 0 deltas of 0 attempts)
Total branches: 11 ( 12 loads )
marks: 1024 ( 56 unique )
atoms: 4
Memory total: 2395 KiB
pools: 2122 KiB
objects: 273 KiB
---------------------------------------------------------------------
pack_report: getpagesize() = 4096
pack_report: core.packedGitWindowSize = 33554432
pack_report: core.packedGitLimit = 268435456
pack_report: pack_used_ctr = 20
pack_report: pack_mmap_calls = 11
pack_report: pack_open_windows = 0 / 1
pack_report: pack_mapped = 0 / 7618
---------------------------------------------------------------------
ok 1 - setup
expecting success:
git range-diff --no-color master..topic master..unmodified \
>actual &&
cat >expected <<-EOF &&
1: 4de457d = 1: 35b9b25 s/5/A/
2: fccce22 = 2: de345ab s/4/A/
3: 147e64e = 3: 9af6654 s/11/B/
4: a63e992 = 4: 2901f77 s/12/B/
EOF
test_cmp expected actual
ok 2 - simple A..B A..C (unmodified)
expecting success:
git range-diff --no-color topic...unmodified >actual &&
# same "expected" as above
test_cmp expected actual
ok 3 - simple B...C (unmodified)
expecting success:
git range-diff --no-color master topic unmodified >actual &&
# same "expected" as above
test_cmp expected actual
ok 4 - simple A B C (unmodified)
expecting success:
git range-diff --no-color master topic reordered >actual &&
cat >expected <<-EOF &&
1: 4de457d = 1: aca177a s/5/A/
3: 147e64e = 2: 14ad629 s/11/B/
4: a63e992 = 3: ee58208 s/12/B/
2: fccce22 = 4: 307b27a s/4/A/
EOF
test_cmp expected actual
ok 5 - trivial reordering
expecting success:
git range-diff --no-color master topic removed >actual &&
cat >expected <<-EOF &&
1: 4de457d = 1: 7657159 s/5/A/
2: fccce22 < -: ------- s/4/A/
3: 147e64e = 2: 43d84d3 s/11/B/
4: a63e992 = 3: a740396 s/12/B/
EOF
test_cmp expected actual
ok 6 - removed a commit
expecting success:
git range-diff --no-color master topic added >actual &&
cat >expected <<-EOF &&
1: 4de457d = 1: 2716022 s/5/A/
2: fccce22 = 2: b62accd s/4/A/
-: ------- > 3: df46cfa s/6/A/
3: 147e64e = 4: 3e64548 s/11/B/
4: a63e992 = 5: 12b4063 s/12/B/
EOF
test_cmp expected actual
ok 7 - added a commit
expecting success:
git range-diff --no-color master topic rebased >actual &&
cat >expected <<-EOF &&
1: 4de457d = 1: cc9c443 s/5/A/
2: fccce22 = 2: c5d9641 s/4/A/
3: 147e64e = 3: 28cc2b6 s/11/B/
4: a63e992 = 4: 5628ab7 s/12/B/
EOF
test_cmp expected actual
ok 8 - new base, A B C
expecting success:
# this syntax includes the commits from master!
git range-diff --no-color topic...rebased >actual &&
cat >expected <<-EOF &&
-: ------- > 1: a31b12e unrelated
1: 4de457d = 2: cc9c443 s/5/A/
2: fccce22 = 3: c5d9641 s/4/A/
3: 147e64e = 4: 28cc2b6 s/11/B/
4: a63e992 = 5: 5628ab7 s/12/B/
EOF
test_cmp expected actual
ok 9 - new base, B...C
expecting success:
git range-diff --no-color topic...changed >actual &&
cat >expected <<-EOF &&
1: 4de457d = 1: a4b3333 s/5/A/
2: fccce22 = 2: f51d370 s/4/A/
3: 147e64e ! 3: 0559556 s/11/B/
@@ file: A
9
10
-11
-+B
++BB
12
13
14
4: a63e992 ! 4: d966c5c s/12/B/
@@ file
@@ file: A
9
10
- B
+ BB
-12
+B
13
EOF
test_cmp expected actual
ok 10 - changed commit
expecting success:
git range-diff --no-color --no-patch topic...changed >actual &&
cat >expected <<-EOF &&
1: 4de457d = 1: a4b3333 s/5/A/
2: fccce22 = 2: f51d370 s/4/A/
3: 147e64e ! 3: 0559556 s/11/B/
4: a63e992 ! 4: d966c5c s/12/B/
EOF
test_cmp expected actual
ok 11 - changed commit with --no-patch diff option
expecting success:
git range-diff --no-color --stat topic...changed >actual &&
cat >expected <<-EOF &&
1: 4de457d = 1: a4b3333 s/5/A/
a => b | 0
1 file changed, 0 insertions(+), 0 deletions(-)
2: fccce22 = 2: f51d370 s/4/A/
a => b | 0
1 file changed, 0 insertions(+), 0 deletions(-)
3: 147e64e ! 3: 0559556 s/11/B/
a => b | 0
1 file changed, 0 insertions(+), 0 deletions(-)
4: a63e992 ! 4: d966c5c s/12/B/
a => b | 0
1 file changed, 0 insertions(+), 0 deletions(-)
EOF
test_cmp expected actual
ok 12 - changed commit with --stat diff option
expecting success:
git range-diff --no-color --submodule=log topic...changed >actual &&
cat >expected <<-EOF &&
1: 4de457d = 1: a4b3333 s/5/A/
2: fccce22 = 2: f51d370 s/4/A/
3: 147e64e ! 3: 0559556 s/11/B/
@@ file: A
9
10
-11
-+B
++BB
12
13
14
4: a63e992 ! 4: d966c5c s/12/B/
@@ file
@@ file: A
9
10
- B
+ BB
-12
+B
13
EOF
test_cmp expected actual
ok 13 - changed commit with sm config
expecting success:
git range-diff --no-color --submodule=log topic...renamed-file >actual &&
sed s/Z/\ /g >expected <<-EOF &&
1: 4de457d = 1: f258d75 s/5/A/
2: fccce22 ! 2: 017b62d s/4/A/
@@ Metadata
ZAuthor: Thomas Rast <trast@inf.ethz.ch>
Z
Z ## Commit message ##
- s/4/A/
+ s/4/A/ + rename file
Z
- ## file ##
+ ## file => renamed-file ##
Z@@
Z 1
Z 2
3: 147e64e ! 3: 3ce7af6 s/11/B/
@@ Metadata
Z ## Commit message ##
Z s/11/B/
Z
- ## file ##
-@@ file: A
+ ## renamed-file ##
+@@ renamed-file: A
Z 8
Z 9
Z 10
4: a63e992 ! 4: 1e6226b s/12/B/
@@ Metadata
Z ## Commit message ##
Z s/12/B/
Z
- ## file ##
-@@ file: A
+ ## renamed-file ##
+@@ renamed-file: A
Z 9
Z 10
Z B
EOF
test_cmp expected actual
ok 14 - renamed file
expecting success:
git range-diff --no-color --submodule=log topic...added-removed >actual &&
sed s/Z/\ /g >expected <<-EOF &&
1: 4de457d = 1: 096b1ba s/5/A/
2: fccce22 ! 2: d92e698 s/4/A/
@@ Metadata
ZAuthor: Thomas Rast <trast@inf.ethz.ch>
Z
Z ## Commit message ##
- s/4/A/
+ s/4/A/ + new-file
Z
Z ## file ##
Z@@
@@ file
Z A
Z 6
Z 7
+
+ ## new-file (new) ##
3: 147e64e ! 3: 9a1db4d s/11/B/
@@ Metadata
ZAuthor: Thomas Rast <trast@inf.ethz.ch>
Z
Z ## Commit message ##
- s/11/B/
+ s/11/B/ + remove file
Z
Z ## file ##
Z@@ file: A
@@ file: A
Z 12
Z 13
Z 14
+
+ ## new-file (deleted) ##
4: a63e992 = 4: fea3b5c s/12/B/
EOF
test_cmp expected actual
ok 15 - file added and later removed
expecting success:
git commit --amend -m "new message" &&
git range-diff master HEAD@{1} HEAD
[master 2ca7425] new message
Author: Thomas Rast <trast@inf.ethz.ch>
Date: Mon Jul 22 11:25:27 2013 +0200
1 file changed, 20 deletions(-)
delete mode 100644 file
1: a31b12e < -: ------- unrelated
ok 16 - no commits on one side
expecting success:
git range-diff --no-color topic...changed-message >actual &&
sed s/Z/\ /g >expected <<-EOF &&
1: 4de457d = 1: f686024 s/5/A/
2: fccce22 ! 2: 4ab067d s/4/A/
@@ Metadata
Z ## Commit message ##
Z s/4/A/
Z
+ Also a silly comment here!
+
Z ## file ##
Z@@
Z 1
3: 147e64e = 3: b9cb956 s/11/B/
4: a63e992 = 4: 8add5f1 s/12/B/
EOF
test_cmp expected actual
ok 17 - changed message
expecting success:
sed -e "s|^:||" >expect <<-\EOF &&
:<YELLOW>1: a4b3333 = 1: f686024 s/5/A/<RESET>
:<RED>2: f51d370 <RESET><YELLOW>!<RESET><GREEN> 2: 4ab067d<RESET><YELLOW> s/4/A/<RESET>
: <REVERSE><CYAN>@@<RESET> <RESET>Metadata<RESET>
: ## Commit message ##<RESET>
: s/4/A/<RESET>
: <RESET>
: <REVERSE><GREEN>+<RESET><BOLD> Also a silly comment here!<RESET>
: <REVERSE><GREEN>+<RESET>
: ## file ##<RESET>
: <CYAN> @@<RESET>
: 1<RESET>
:<RED>3: 0559556 <RESET><YELLOW>!<RESET><GREEN> 3: b9cb956<RESET><YELLOW> s/11/B/<RESET>
: <REVERSE><CYAN>@@<RESET> <RESET>file: A<RESET>
: 9<RESET>
: 10<RESET>
: <RED> -11<RESET>
: <REVERSE><RED>-<RESET><FAINT;GREEN>+BB<RESET>
: <REVERSE><GREEN>+<RESET><BOLD;GREEN>+B<RESET>
: 12<RESET>
: 13<RESET>
: 14<RESET>
:<RED>4: d966c5c <RESET><YELLOW>!<RESET><GREEN> 4: 8add5f1<RESET><YELLOW> s/12/B/<RESET>
: <REVERSE><CYAN>@@<RESET> <RESET>file<RESET>
: <CYAN> @@ file: A<RESET>
: 9<RESET>
: 10<RESET>
: <REVERSE><RED>-<RESET><FAINT> BB<RESET>
: <REVERSE><GREEN>+<RESET><BOLD> B<RESET>
: <RED> -12<RESET>
: <GREEN> +B<RESET>
: 13<RESET>
EOF
git range-diff changed...changed-message --color --dual-color >actual.raw &&
test_decode_color >actual <actual.raw &&
test_cmp expect actual
ok 18 - dual-coloring
expecting success:
git format-patch --cover-letter --range-diff=$prev \
master..unmodified >actual &&
test_when_finished "rm 000?-*" &&
test_line_count = 5 actual &&
test_i18ngrep "^Range-diff:$" 0000-* &&
grep "= 1: .* s/5/A" 0000-* &&
grep "= 2: .* s/4/A" 0000-* &&
grep "= 3: .* s/11/B" 0000-* &&
grep "= 4: .* s/12/B" 0000-*
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Range-diff:
1: 4de457d = 1: 35b9b25 s/5/A/
2: fccce22 = 2: de345ab s/4/A/
3: 147e64e = 3: 9af6654 s/11/B/
4: a63e992 = 4: 2901f77 s/12/B/
ok 19 - format-patch --range-diff=topic
expecting success:
git format-patch --cover-letter --range-diff=$prev \
master..unmodified >actual &&
test_when_finished "rm 000?-*" &&
test_line_count = 5 actual &&
test_i18ngrep "^Range-diff:$" 0000-* &&
grep "= 1: .* s/5/A" 0000-* &&
grep "= 2: .* s/4/A" 0000-* &&
grep "= 3: .* s/11/B" 0000-* &&
grep "= 4: .* s/12/B" 0000-*
Range-diff:
1: 4de457d = 1: 35b9b25 s/5/A/
2: fccce22 = 2: de345ab s/4/A/
3: 147e64e = 3: 9af6654 s/11/B/
4: a63e992 = 4: 2901f77 s/12/B/
ok 20 - format-patch --range-diff=master..topic
expecting success:
git format-patch --range-diff=HEAD~1 HEAD~1 >actual &&
test_when_finished "rm 0001-*" &&
test_line_count = 1 actual &&
test_i18ngrep "^Range-diff:$" 0001-* &&
grep "> 1: .* new message" 0001-*
Range-diff:
-: ------- > 1: 2ca7425 new message
ok 21 - format-patch --range-diff as commentary
# passed all 21 test(s)
1..21
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3210-pack-refs.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3210-pack-refs/.git/
expecting success:
git config core.logallrefupdates true
ok 1 - enable reflogs
expecting success: echo Hello > A &&
git update-index --add A &&
git commit -m "Initial commit." &&
HEAD=$(git rev-parse --verify HEAD)
[master (root-commit) 326e843] Initial commit.
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A
ok 2 - prepare a trivial repository
expecting success: git branch a &&
SHA1=$(cat .git/refs/heads/a) &&
echo "$SHA1 refs/heads/a" >expect &&
git show-ref a >result &&
test_cmp expect result
ok 3 - see if git show-ref works as expected
expecting success: git branch b &&
git pack-refs --all &&
rm -f .git/refs/heads/b &&
echo "$SHA1 refs/heads/b" >expect &&
git show-ref b >result &&
test_cmp expect result
ok 4 - see if a branch still exists when packed
expecting success:
git branch c &&
git pack-refs --all &&
rm -f .git/refs/heads/c &&
test_must_fail git branch c/d
fatal: cannot lock ref 'refs/heads/c/d': 'refs/heads/c' exists; cannot create 'refs/heads/c/d'
ok 5 - git branch c/d should barf if branch c exists
expecting success: git branch e &&
git pack-refs --all --prune &&
echo "$SHA1 refs/heads/e" >expect &&
git show-ref e >result &&
test_cmp expect result
ok 6 - see if a branch still exists after git pack-refs --prune
expecting success:
git branch f &&
git pack-refs --all --prune &&
! test -f .git/refs/heads/f
ok 7 - see if git pack-refs --prune remove ref files
expecting success:
git branch r/s/t &&
git pack-refs --all --prune &&
! test -e .git/refs/heads/r
ok 8 - see if git pack-refs --prune removes empty dirs
expecting success: git branch g/h &&
git pack-refs --all --prune &&
git branch -d g/h &&
git branch g &&
git pack-refs --all &&
git branch -d g
Deleted branch g/h (was 326e843).
Deleted branch g (was 326e843).
ok 9 - git branch g should work when git branch g/h has been deleted
expecting success:
git branch i &&
git pack-refs --all --prune &&
test_must_fail git branch i/j/k
fatal: cannot lock ref 'refs/heads/i/j/k': 'refs/heads/i' exists; cannot create 'refs/heads/i/j/k'
ok 10 - git branch i/j/k should barf if branch i exists
expecting success: git branch k/l &&
git branch k/lm &&
git branch -d k/l &&
git branch k/l/m &&
git branch -d k/l/m &&
git branch -d k/lm &&
git branch k
Deleted branch k/l (was 326e843).
Deleted branch k/l/m (was 326e843).
Deleted branch k/lm (was 326e843).
ok 11 - test git branch k after branch k/l/m and k/lm have been deleted
expecting success: git branch n/o &&
git branch n/op &&
git branch -d n/o &&
git branch n/o/p &&
git branch -d n/op &&
git pack-refs --all --prune &&
git branch -d n/o/p &&
git branch n
Deleted branch n/o (was 326e843).
Deleted branch n/op (was 326e843).
Deleted branch n/o/p (was 326e843).
ok 12 - test git branch n after some branch deletion and pruning
expecting success: git branch q &&
git pack-refs --all --prune &&
git update-ref refs/heads/q refs/heads/q &&
! test -f .git/refs/heads/q
ok 13 - see if up-to-date packed refs are preserved
expecting success:
git tag foo &&
git pack-refs --all --prune &&
git show-ref >all-of-them &&
git pack-refs &&
git show-ref >again &&
test_cmp all-of-them again
ok 14 - pack, prune and repack
expecting success:
git commit --allow-empty -m "soon to be garbage-collected" &&
git pack-refs --all &&
git reset --hard HEAD^ &&
git reflog expire --expire=all --all &&
git prune --expire=all &&
git pack-refs --all 2>result &&
test_must_be_empty result
[master 7771dfb] soon to be garbage-collected
Author: A U Thor <author@example.com>
HEAD is now at 326e843 Initial commit.
ok 15 - explicit pack-refs with dangling packed reference
expecting success:
git checkout -b lamb &&
git commit --allow-empty -m "future garbage" &&
git pack-refs --all &&
git reset --hard HEAD^ &&
git checkout master &&
git reflog expire --expire=all --all &&
git prune --expire=all &&
git branch -d lamb 2>result &&
test_must_be_empty result
Switched to a new branch 'lamb'
[lamb 69666ee] future garbage
Author: A U Thor <author@example.com>
HEAD is now at 326e843 Initial commit.
Switched to branch 'master'
Deleted branch lamb (was 326e843).
ok 16 - delete ref with dangling packed version
expecting success:
git branch lamb &&
git commit --allow-empty -m "future garbage" &&
git pack-refs --all &&
git reset --hard HEAD^ &&
git reflog expire --expire=all --all &&
git prune --expire=all &&
git branch -d lamb 2>result &&
test_must_be_empty result
[master 69666ee] future garbage
Author: A U Thor <author@example.com>
HEAD is now at 326e843 Initial commit.
Deleted branch lamb (was 326e843).
ok 17 - delete ref while another dangling packed ref
expecting success:
git update-ref refs/top HEAD &&
git pack-refs --all --prune &&
grep refs/top .git/packed-refs &&
test_path_is_missing .git/refs/top
326e8435e069dccad4656084b25c8d51c5d73159 refs/top
ok 18 - pack ref directly below refs/
expecting success:
git update-ref refs/bisect/local HEAD &&
git pack-refs --all --prune &&
! grep refs/bisect/local .git/packed-refs >/dev/null &&
test_path_is_file .git/refs/bisect/local
ok 19 - do not pack ref in refs/bisect
expecting success:
git config core.logallrefupdates false &&
rm -rf .git/logs
ok 20 - disable reflogs
expecting success:
git branch foo/bar/baz &&
git pack-refs --all --prune &&
test_path_is_missing .git/refs/heads/foo/bar/baz &&
test_must_fail git reflog exists refs/heads/foo/bar/baz
ok 21 - create packed foo/bar/baz branch
expecting success:
test_must_fail git branch foo &&
test_must_fail git branch foo/bar
fatal: cannot lock ref 'refs/heads/foo': 'refs/heads/foo/bar/baz' exists; cannot create 'refs/heads/foo'
fatal: cannot lock ref 'refs/heads/foo/bar': 'refs/heads/foo/bar/baz' exists; cannot create 'refs/heads/foo/bar'
ok 22 - notice d/f conflict with existing directory
expecting success:
test_must_fail git branch foo 2>stderr &&
test_i18ngrep refs/heads/foo/bar/baz stderr
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: cannot lock ref 'refs/heads/foo': 'refs/heads/foo/bar/baz' exists; cannot create 'refs/heads/foo'
ok 23 - existing directory reports concrete ref
expecting success:
test_must_fail git branch foo/bar/baz/extra &&
test_must_fail git branch foo/bar/baz/lots/of/extra/components
fatal: cannot lock ref 'refs/heads/foo/bar/baz/extra': 'refs/heads/foo/bar/baz' exists; cannot create 'refs/heads/foo/bar/baz/extra'
fatal: cannot lock ref 'refs/heads/foo/bar/baz/lots/of/extra/components': 'refs/heads/foo/bar/baz' exists; cannot create 'refs/heads/foo/bar/baz/lots/of/extra/components'
ok 24 - notice d/f conflict with existing ref
expecting success:
cp .git/packed-refs .git/packed-refs.bak &&
test_when_finished "mv .git/packed-refs.bak .git/packed-refs" &&
printf "%s" "$HEAD refs/zzzzz" >>.git/packed-refs &&
echo "fatal: unterminated line in .git/packed-refs: $HEAD refs/zzzzz" >expected_err &&
test_must_fail git for-each-ref >out 2>err &&
test_cmp expected_err err
ok 25 - reject packed-refs with unterminated line
expecting success:
cp .git/packed-refs .git/packed-refs.bak &&
test_when_finished "mv .git/packed-refs.bak .git/packed-refs" &&
printf "%s\n" "bogus content" >>.git/packed-refs &&
echo "fatal: unexpected line in .git/packed-refs: bogus content" >expected_err &&
test_must_fail git for-each-ref >out 2>err &&
test_cmp expected_err err
ok 26 - reject packed-refs containing junk
expecting success:
cp .git/packed-refs .git/packed-refs.bak &&
test_when_finished "mv .git/packed-refs.bak .git/packed-refs" &&
printf "%.7s %s\n" $HEAD refs/zzzzz >>.git/packed-refs &&
printf "fatal: unexpected line in .git/packed-refs: %.7s %s\n" $HEAD refs/zzzzz >expected_err &&
test_must_fail git for-each-ref >out 2>err &&
test_cmp expected_err err
ok 27 - reject packed-refs with a short SHA-1
expecting success:
LOCK=.git/packed-refs.lock &&
>"$LOCK" &&
test_when_finished "rm -f $LOCK" &&
test_must_fail git pack-refs --all --prune
fatal: Unable to create '/<<PKGBUILDDIR>>/t/trash directory.t3210-pack-refs/.git/packed-refs.lock': File exists.
Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
ok 28 - timeout if packed-refs.lock exists
expecting success:
LOCK=.git/packed-refs.lock &&
>"$LOCK" &&
test_when_finished "wait && rm -f $LOCK" &&
{
( sleep 1 && rm -f $LOCK ) &
} &&
git -c core.packedrefstimeout=3000 pack-refs --all --prune
ok 29 - retry acquiring packed-refs.lock
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:
# First make sure that symlinking works when reading:
git update-ref refs/heads/loosy refs/heads/master &&
git for-each-ref >all-refs-before &&
mv .git/packed-refs .git/my-deviant-packed-refs &&
ln -s my-deviant-packed-refs .git/packed-refs &&
git for-each-ref >all-refs-linked &&
test_cmp all-refs-before all-refs-linked &&
git pack-refs --all --prune &&
git for-each-ref >all-refs-packed &&
test_cmp all-refs-before all-refs-packed &&
test -h .git/packed-refs &&
test "$(readlink .git/packed-refs)" = "my-deviant-packed-refs"
ok 30 - pack symlinked packed-refs
# passed all 30 test(s)
1..30
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3211-peel-ref.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3211-peel-ref/.git/
expecting success:
test_commit base &&
git tag -m annotated foo
[master (root-commit) d1ff1c9] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 base.t
ok 1 - create annotated tag in refs/tags
expecting success:
git update-ref refs/outside/foo refs/tags/foo
ok 2 - create annotated tag outside of refs/tags
expecting success:
{
print_ref "refs/heads/master" &&
print_ref "refs/outside/foo" &&
print_ref "refs/outside/foo^{}" &&
print_ref "refs/tags/base" &&
print_ref "refs/tags/foo" &&
print_ref "refs/tags/foo^{}"
} >expect
ok 3 - set up expected show-ref output
expecting success:
git show-ref -d >actual &&
test_cmp expect actual
ok 4 - refs are peeled outside of refs/tags (loose)
expecting success:
git pack-refs --all &&
git show-ref -d >actual &&
test_cmp expect actual
ok 5 - refs are peeled outside of refs/tags (packed)
expecting success:
# Git no longer writes without fully-peeled, so we just write our own
# from scratch; we could also munge the existing file to remove the
# fully-peeled bits, but that seems even more prone to failure,
# especially if the format ever changes again. At least this way we
# know we are emulating exactly what an older git would have written.
{
echo "# pack-refs with: peeled " &&
print_ref "refs/heads/master" &&
print_ref "refs/outside/foo" &&
print_ref "refs/tags/base" &&
print_ref "refs/tags/foo" &&
echo "^$(git rev-parse "refs/tags/foo^{}")"
} >tmp &&
mv tmp .git/packed-refs
ok 6 - create old-style pack-refs without fully-peeled
expecting success:
git show-ref -d >actual &&
test_cmp expect actual
ok 7 - refs are peeled outside of refs/tags (old packed)
expecting success:
git pack-refs --all &&
cp .git/packed-refs fully-peeled &&
git branch yadda &&
git pack-refs --all &&
git branch -d yadda &&
test_cmp fully-peeled .git/packed-refs
Deleted branch yadda (was d1ff1c9).
ok 8 - peeled refs survive deletion of packed ref
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3300-funny-names.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3300-funny-names/.git/
expecting success:
cat >"$p0" <<-\EOF &&
1. A quick brown fox jumps over the lazy cat, oops dog.
2. A quick brown fox jumps over the lazy cat, oops dog.
3. A quick brown fox jumps over the lazy cat, oops dog.
EOF
{ cat "$p0" >"$p1" || :; } &&
{ echo "Foo Bar Baz" >"$p2" || :; }
ok 1 - setup
expecting success:
git update-index --add "$p0" "$p2" &&
t0=$(git write-tree)
ok 2 - setup: populate index and tree
expecting success:
printf "%s\n" "just space" no-funny >expected &&
git ls-files >current &&
test_cmp expected current
ok 3 - ls-files prints space in filename verbatim
expecting success:
git update-index --add "$p1" &&
t1=$(git write-tree)
ok 4 - setup: add funny filename
expecting success:
cat >expected <<-\EOF &&
just space
no-funny
"tabs\t,\" (dq) and spaces"
EOF
git ls-files >current &&
test_cmp expected current
ok 5 - ls-files quotes funny filename
expecting success:
cat >expected <<-\EOF &&
just space
no-funny
tabs ," (dq) and spaces
EOF
git ls-files -z >ls-files.z &&
perl -pe "y/\000/\012/" <ls-files.z >current &&
test_cmp expected current
ok 6 - ls-files -z does not quote funny filename
expecting success:
cat >expected <<-\EOF &&
just space
no-funny
"tabs\t,\" (dq) and spaces"
EOF
git ls-tree -r $t1 >ls-tree &&
sed -e "s/^[^ ]* //" <ls-tree >current &&
test_cmp expected current
ok 7 - ls-tree quotes funny filename
expecting success:
cat >expected <<-\EOF &&
A "tabs\t,\" (dq) and spaces"
EOF
git diff-index --name-status $t0 >current &&
test_cmp expected current
ok 8 - diff-index --name-status quotes funny filename
expecting success:
cat >expected <<-\EOF &&
A "tabs\t,\" (dq) and spaces"
EOF
git diff-tree --name-status $t0 $t1 >current &&
test_cmp expected current
ok 9 - diff-tree --name-status quotes funny filename
expecting success:
cat >expected <<-\EOF &&
A
tabs ," (dq) and spaces
EOF
git diff-index -z --name-status $t0 >diff-index.z &&
perl -pe "y/\000/\012/" <diff-index.z >current &&
test_cmp expected current
ok 10 - diff-index -z does not quote funny filename
expecting success:
cat >expected <<-\EOF &&
A
tabs ," (dq) and spaces
EOF
git diff-tree -z --name-status $t0 $t1 >diff-tree.z &&
perl -pe y/\\000/\\012/ <diff-tree.z >current &&
test_cmp expected current
ok 11 - diff-tree -z does not quote funny filename
expecting success:
cat >expected <<-\EOF &&
CNUM no-funny "tabs\t,\" (dq) and spaces"
EOF
git diff-tree -C --find-copies-harder --name-status $t0 $t1 >out &&
sed -e "s/^C[0-9]*/CNUM/" <out >current &&
test_cmp expected current
ok 12 - diff-tree --find-copies-harder quotes funny filename
expecting success:
git update-index --force-remove "$p0"
ok 13 - setup: remove unfunny index entry
expecting success:
cat >expected <<-\EOF &&
RNUM no-funny "tabs\t,\" (dq) and spaces"
EOF
git diff-index -M --name-status $t0 >out &&
sed -e "s/^R[0-9]*/RNUM/" <out >current &&
test_cmp expected current
ok 14 - diff-tree -M quotes funny filename
expecting success:
cat >expected <<-\EOF &&
diff --git a/no-funny "b/tabs\t,\" (dq) and spaces"
similarity index NUM%
rename from no-funny
rename to "tabs\t,\" (dq) and spaces"
EOF
git diff-index -M -p $t0 >diff &&
sed -e "s/index [0-9]*%/index NUM%/" <diff >current &&
test_cmp expected current
ok 15 - diff-index -M -p quotes funny filename
expecting success:
chmod +x "$p1"
ok 16 - setup: mode change
expecting success:
cat >expected <<-\EOF &&
diff --git a/no-funny "b/tabs\t,\" (dq) and spaces"
old mode 100644
new mode 100755
similarity index NUM%
rename from no-funny
rename to "tabs\t,\" (dq) and spaces"
EOF
git diff-index -M -p $t0 >diff &&
sed -e "s/index [0-9]*%/index NUM%/" <diff >current &&
test_cmp expected current
ok 17 - diff-index -M -p with mode change quotes funny filename
expecting success:
cat >expected <<-\EOF &&
"tabs\t,\" (dq) and spaces"
1 file changed, 0 insertions(+), 0 deletions(-)
EOF
git diff-index -M -p $t0 >diff &&
git apply --stat <diff >diffstat &&
sed -e "s/|.*//" -e "s/ *\$//" <diffstat >current &&
test_i18ncmp expected current
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 18 - diffstat for rename quotes funny filename
expecting success:
cat >expected <<-\EOF &&
0 0 "tabs\t,\" (dq) and spaces"
EOF
git diff-index -M -p $t0 >diff &&
git apply --numstat <diff >current &&
test_cmp expected current
ok 19 - numstat for rename quotes funny filename
expecting success:
cat >expected <<-\EOF &&
0 3 no-funny
3 0 "tabs\t,\" (dq) and spaces"
EOF
git diff-index -p $t0 >diff &&
git apply --numstat <diff >current &&
test_cmp expected current
ok 20 - numstat without -M quotes funny filename
expecting success:
cat >expected <<-\EOF &&
0 3 no-funny
3 0 "tabs\t,\" (dq) and spaces"
EOF
git diff-index -p $t0 >git-diff &&
sed -ne "/^[-+@]/p" <git-diff >diff &&
git apply --numstat <diff >current &&
test_cmp expected current
ok 21 - numstat for non-git rename diff quotes funny filename
# passed all 21 test(s)
1..21
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3200-branch.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3200-branch/.git/
expecting success:
echo Hello >A &&
git update-index --add A &&
git commit -m "Initial commit." &&
echo World >>A &&
git update-index --add A &&
git commit -m "Second commit." &&
HEAD=$(git rev-parse --verify HEAD)
[master (root-commit) 101887f] Initial commit.
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A
[master 34a8706] Second commit.
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - prepare a trivial repository
expecting success:
test_might_fail git branch --man --help </dev/null >/dev/null 2>&1 &&
test_path_is_missing .git/refs/heads/--help
ok 2 - git branch --help should not have created a bogus branch
expecting success:
mkdir broken &&
(
cd broken &&
git init &&
>.git/refs/heads/master &&
test_expect_code 129 git branch -h >usage 2>&1
) &&
test_i18ngrep "[Uu]sage" broken/usage
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3200-branch/broken/.git/
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
usage: git branch [<options>] [-r | -a] [--merged | --no-merged]
ok 3 - branch -h in broken repository
expecting success:
git branch abc && test_path_is_file .git/refs/heads/abc
ok 4 - git branch abc should create a branch
expecting success:
git branch a/b/c && test_path_is_file .git/refs/heads/a/b/c
ok 5 - git branch a/b/c should create a branch
expecting success:
git branch mb master... && test_path_is_file .git/refs/heads/mb
ok 6 - git branch mb master... should create a branch
expecting success:
test_must_fail git branch HEAD
fatal: 'HEAD' is not a valid branch name.
ok 7 - git branch HEAD should fail
expecting success:
GIT_COMMITTER_DATE="2005-05-26 23:30" \
git -c core.logallrefupdates=false branch --create-reflog d/e/f &&
test_path_is_file .git/refs/heads/d/e/f &&
test_path_is_file .git/logs/refs/heads/d/e/f &&
test_cmp expect .git/logs/refs/heads/d/e/f
ok 8 - git branch --create-reflog d/e/f should create a branch and a log
expecting success:
git branch -d d/e/f &&
test_path_is_missing .git/refs/heads/d/e/f &&
test_must_fail git reflog exists refs/heads/d/e/f
Deleted branch d/e/f (was 34a8706).
ok 9 - git branch -d d/e/f should delete a branch and a log
expecting success:
git branch j &&
git branch -d j &&
git branch j/k
Deleted branch j (was 34a8706).
ok 10 - git branch j/k should work after branch j has been deleted
expecting success:
git branch l/m &&
git branch -d l/m &&
git branch l
Deleted branch l/m (was 34a8706).
ok 11 - git branch l should work after branch l/m has been deleted
expecting success:
test_expect_code 128 git branch -m 2>err &&
test_i18ngrep "branch name required" err
fatal: branch name required
ok 12 - git branch -m dumps usage
expecting success:
test_when_finished "git branch -D broken_symref" &&
git branch --create-reflog m &&
git symbolic-ref refs/heads/broken_symref refs/heads/i_am_broken &&
git branch -m m broken_symref &&
git reflog exists refs/heads/broken_symref &&
test_must_fail git reflog exists refs/heads/i_am_broken
Deleted branch broken_symref (was 34a8706).
ok 13 - git branch -m m broken_symref should work
expecting success:
git branch --create-reflog m &&
git branch -m m m/m &&
git reflog exists refs/heads/m/m
ok 14 - git branch -m m m/m should work
expecting success:
git branch --create-reflog n/n &&
git branch -m n/n n &&
git reflog exists refs/heads/n
ok 15 - git branch -m n/n n should work
expecting success:
test_when_finished git branch -D bbb &&
test_when_finished git checkout master &&
git checkout -b aaa &&
git commit --allow-empty -m "a new commit" &&
git rev-parse aaa@{0} >expect &&
git branch -m bbb &&
git rev-parse bbb@{1} >actual &&
test_cmp expect actual &&
git symbolic-ref HEAD >actual &&
echo refs/heads/bbb >expect &&
test_cmp expect actual
Switched to a new branch 'aaa'
[aaa 56eb8df] a new commit
Author: A U Thor <author@example.com>
Switched to branch 'master'
Deleted branch bbb (was 56eb8df).
ok 16 - git branch -m bbb should rename checked out branch
expecting success:
test_when_finished "git branch -D foo/bar || git branch -D foo" &&
test_when_finished git checkout master &&
git checkout -b foo &&
git branch -m foo/bar &&
git symbolic-ref HEAD >actual &&
echo refs/heads/foo/bar >expect &&
test_cmp expect actual
Switched to a new branch 'foo'
Switched to branch 'master'
Deleted branch foo/bar (was 34a8706).
ok 17 - renaming checked out branch works with d/f conflict
expecting success:
git branch o/o &&
git branch o/p &&
test_must_fail git branch -m o/o o
error: 'refs/heads/o/p' exists; cannot create 'refs/heads/o'
fatal: Branch rename failed
ok 18 - git branch -m o/o o should fail when o/p exists
expecting success:
git branch o/q &&
test_must_fail git branch -m o/q o/p
fatal: A branch named 'o/p' already exists.
ok 19 - git branch -m o/q o/p should fail when o/p exists
expecting success:
git branch -M o/q o/p
ok 20 - git branch -M o/q o/p should work when o/p exists
expecting success:
git branch o/q &&
git branch -m -f o/q o/p
ok 21 - git branch -m -f o/q o/p should work when o/p exists
expecting success:
git branch q &&
git branch r &&
test_must_fail git branch -m q r/q
error: 'refs/heads/r' exists; cannot create 'refs/heads/r/q'
fatal: Branch rename failed
ok 22 - git branch -m q r/q should fail when r exists
expecting success:
git branch bar &&
git checkout -b foo &&
test_must_fail git branch -M bar foo
Switched to a new branch 'foo'
fatal: Cannot force update the current branch.
ok 23 - git branch -M foo bar should fail when bar is checked out
expecting success:
git checkout -b baz &&
git branch bam &&
git branch -M baz bam &&
test $(git rev-parse --abbrev-ref HEAD) = bam
Switched to a new branch 'baz'
ok 24 - git branch -M baz bam should succeed when baz is checked out
expecting success:
msg="Branch: renamed refs/heads/baz to refs/heads/bam" &&
grep " 0\{40\}.*$msg$" .git/logs/HEAD &&
grep "^0\{40\}.*$msg$" .git/logs/HEAD
34a8706747aa1dde49c924f3ac2af20138e5c494 0000000000000000000000000000000000000000 C O Mitter <committer@example.com> 1565767556 +0000 Branch: renamed refs/heads/baz to refs/heads/bam
0000000000000000000000000000000000000000 34a8706747aa1dde49c924f3ac2af20138e5c494 C O Mitter <committer@example.com> 1565767556 +0000 Branch: renamed refs/heads/baz to refs/heads/bam
ok 25 - git branch -M baz bam should add entries to .git/logs/HEAD
expecting success:
git init orphan &&
(
cd orphan &&
test_commit initial &&
git checkout --orphan lonely &&
grep lonely .git/HEAD &&
test_path_is_missing .git/refs/head/lonely &&
git branch -M master mistress &&
grep lonely .git/HEAD
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3200-branch/orphan/.git/
[master (root-commit) 24b24cf] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
Switched to a new branch 'lonely'
ref: refs/heads/lonely
ref: refs/heads/lonely
ok 26 - git branch -M should leave orphaned HEAD alone
expecting success:
oid=$(git rev-parse HEAD) &&
cat >expect <<-EOF &&
HEAD@{0} $oid $msg
HEAD@{2} $oid checkout: moving from foo to baz
EOF
git log -g --format="%gd %H %gs" -2 HEAD >actual &&
test_cmp expect actual
ok 27 - resulting reflog can be shown by log -g
expecting success:
git checkout master &&
git worktree add -b baz bazdir &&
git worktree add -f bazdir2 baz &&
git branch -M baz bam &&
test $(git -C bazdir rev-parse --abbrev-ref HEAD) = bam &&
test $(git -C bazdir2 rev-parse --abbrev-ref HEAD) = bam &&
rm -r bazdir bazdir2 &&
git worktree prune
Switched to branch 'master'
Preparing worktree (new branch 'baz')
HEAD is now at 34a8706 Second commit.
Preparing worktree (checking out 'baz')
HEAD is now at 34a8706 Second commit.
ok 28 - git branch -M baz bam should succeed when baz is checked out as linked working tree
expecting success:
git checkout -b baz &&
git worktree add -f bazdir baz &&
(
cd bazdir &&
git branch -M baz bam &&
test $(git rev-parse --abbrev-ref HEAD) = bam
) &&
test $(git rev-parse --abbrev-ref HEAD) = bam &&
rm -r bazdir &&
git worktree prune
Switched to a new branch 'baz'
Preparing worktree (checking out 'baz')
HEAD is now at 34a8706 Second commit.
ok 29 - git branch -M baz bam should succeed within a worktree in which baz is checked out
expecting success:
git checkout master &&
git branch -M master
Switched to branch 'master'
ok 30 - git branch -M master should work when master is checked out
expecting success:
git checkout master &&
git branch -M master master
Already on 'master'
ok 31 - git branch -M master master should work when master is checked out
expecting success:
git checkout master &&
git branch master2 &&
git branch -M master2 master2
Already on 'master'
ok 32 - git branch -M master2 master2 should work when master is checked out
expecting success:
git branch t &&
git rev-parse --verify refs/heads/t &&
git branch -v -d t &&
test_must_fail git rev-parse --verify refs/heads/t
34a8706747aa1dde49c924f3ac2af20138e5c494
Deleted branch t (was 34a8706).
fatal: Needed a single revision
ok 33 - git branch -v -d t should work
expecting success:
git branch t &&
git rev-parse --verify refs/heads/t &&
git branch -v -m t s &&
test_must_fail git rev-parse --verify refs/heads/t &&
git rev-parse --verify refs/heads/s &&
git branch -d s
34a8706747aa1dde49c924f3ac2af20138e5c494
fatal: Needed a single revision
34a8706747aa1dde49c924f3ac2af20138e5c494
Deleted branch s (was 34a8706).
ok 34 - git branch -v -m t s should work
expecting success:
git branch t &&
git rev-parse refs/heads/t &&
test_must_fail git branch -m -d t s &&
git branch -d t &&
test_must_fail git rev-parse refs/heads/t
34a8706747aa1dde49c924f3ac2af20138e5c494
usage: git branch [<options>] [-r | -a] [--merged | --no-merged]
or: git branch [<options>] [-l] [-f] <branch-name> [<start-point>]
or: git branch [<options>] [-r] (-d | -D) <branch-name>...
or: git branch [<options>] (-m | -M) [<old-branch>] <new-branch>
or: git branch [<options>] (-c | -C) [<old-branch>] <new-branch>
or: git branch [<options>] [-r | -a] [--points-at]
or: git branch [<options>] [-r | -a] [--format]
Generic options
-v, --verbose show hash and subject, give twice for upstream branch
-q, --quiet suppress informational messages
-t, --track set up tracking mode (see git-pull(1))
-u, --set-upstream-to <upstream>
change the upstream info
--unset-upstream Unset the upstream info
--color[=<when>] use colored output
-r, --remotes act on remote-tracking branches
--contains <commit> print only branches that contain the commit
--no-contains <commit>
print only branches that don't contain the commit
--abbrev[=<n>] use <n> digits to display SHA-1s
Specific git-branch actions:
-a, --all list both remote-tracking and local branches
-d, --delete delete fully merged branch
-D delete branch (even if not merged)
-m, --move move/rename a branch and its reflog
-M move/rename a branch, even if target exists
-c, --copy copy a branch and its reflog
-C copy a branch, even if target exists
-l, --list list branch names
--show-current show current branch name
--create-reflog create the branch's reflog
--edit-description edit the description for the branch
-f, --force force creation, move/rename, deletion
--merged <commit> print only branches that are merged
--no-merged <commit> print only branches that are not merged
--column[=<style>] list branches in columns
--sort <key> field name to sort on
--points-at <object> print only branches of the object
-i, --ignore-case sorting and filtering are case insensitive
--format <format> format to use for the output
Deleted branch t (was 34a8706).
fatal: ambiguous argument 'refs/heads/t': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
refs/heads/t
ok 35 - git branch -m -d t s should fail
expecting success:
git branch t &&
git rev-parse refs/heads/t &&
test_must_fail git branch --list -d t &&
git branch -d t &&
test_must_fail git rev-parse refs/heads/t
34a8706747aa1dde49c924f3ac2af20138e5c494
usage: git branch [<options>] [-r | -a] [--merged | --no-merged]
or: git branch [<options>] [-l] [-f] <branch-name> [<start-point>]
or: git branch [<options>] [-r] (-d | -D) <branch-name>...
or: git branch [<options>] (-m | -M) [<old-branch>] <new-branch>
or: git branch [<options>] (-c | -C) [<old-branch>] <new-branch>
or: git branch [<options>] [-r | -a] [--points-at]
or: git branch [<options>] [-r | -a] [--format]
Generic options
-v, --verbose show hash and subject, give twice for upstream branch
-q, --quiet suppress informational messages
-t, --track set up tracking mode (see git-pull(1))
-u, --set-upstream-to <upstream>
change the upstream info
--unset-upstream Unset the upstream info
--color[=<when>] use colored output
-r, --remotes act on remote-tracking branches
--contains <commit> print only branches that contain the commit
--no-contains <commit>
print only branches that don't contain the commit
--abbrev[=<n>] use <n> digits to display SHA-1s
Specific git-branch actions:
-a, --all list both remote-tracking and local branches
-d, --delete delete fully merged branch
-D delete branch (even if not merged)
-m, --move move/rename a branch and its reflog
-M move/rename a branch, even if target exists
-c, --copy copy a branch and its reflog
-C copy a branch, even if target exists
-l, --list list branch names
--show-current show current branch name
--create-reflog create the branch's reflog
--edit-description edit the description for the branch
-f, --force force creation, move/rename, deletion
--merged <commit> print only branches that are merged
--no-merged <commit> print only branches that are not merged
--column[=<style>] list branches in columns
--sort <key> field name to sort on
--points-at <object> print only branches of the object
-i, --ignore-case sorting and filtering are case insensitive
--format <format> format to use for the output
Deleted branch t (was 34a8706).
fatal: ambiguous argument 'refs/heads/t': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
refs/heads/t
ok 36 - git branch --list -d t should fail
expecting success:
test_when_finished "rm -rf repo1 repo2" &&
git init repo1 &&
git init repo1/sub &&
test_commit -C repo1/sub x &&
git -C repo1 submodule add ./sub &&
git -C repo1 commit -m "adding sub" &&
git clone --recurse-submodules repo1 repo2 &&
git -C repo2/sub checkout -b work &&
test_must_fail git -C repo2/sub branch -D work
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3200-branch/repo1/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3200-branch/repo1/sub/.git/
[master (root-commit) cb85766] x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 x.t
Adding existing repo at 'sub' to the index
[master (root-commit) 0e407d8] adding sub
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub
Cloning into 'repo2'...
done.
Submodule 'sub' (/<<PKGBUILDDIR>>/t/trash directory.t3200-branch/repo1/sub) registered for path 'sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3200-branch/repo2/sub'...
done.
Submodule path 'sub': checked out 'cb85766717df318a47d35b1ec7b43b1040fdc133'
Switched to a new branch 'work'
error: Cannot delete branch 'work' checked out at '/<<PKGBUILDDIR>>/t/trash directory.t3200-branch/repo2/.git/modules/sub'
ok 37 - deleting checked-out branch from repo that is a submodule
expecting success:
test_when_finished "rm -rf nonbare base secondary" &&
git init nonbare &&
test_commit -C nonbare x &&
git clone --bare nonbare bare &&
git -C bare worktree add --detach ../secondary master &&
git -C secondary branch -D master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3200-branch/nonbare/.git/
[master (root-commit) 6f481db] x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 x.t
Cloning into bare repository 'bare'...
done.
Preparing worktree (detached HEAD 6f481db)
HEAD is now at 6f481db x
Deleted branch master (was 6f481db).
ok 38 - bare main worktree has HEAD at branch deleted by secondary worktree
expecting success:
test_when_finished "git branch -D t" &&
git branch t &&
git branch -v --list t >actual.default &&
git branch -v --list --abbrev t >actual.abbrev &&
test_cmp actual.default actual.abbrev &&
git branch -v --list --no-abbrev t >actual.noabbrev &&
git branch -v --list --abbrev=0 t >actual.0abbrev &&
test_cmp actual.noabbrev actual.0abbrev &&
git branch -v --list --abbrev=36 t >actual.36abbrev &&
# how many hexdigits are used?
read name objdefault rest <actual.abbrev &&
read name obj36 rest <actual.36abbrev &&
objfull=$(git rev-parse --verify t) &&
# are we really getting abbreviations?
test "$obj36" != "$objdefault" &&
expr "$obj36" : "$objdefault" >/dev/null &&
test "$objfull" != "$obj36" &&
expr "$objfull" : "$obj36" >/dev/null
Deleted branch t (was 34a8706).
ok 39 - git branch --list -v with --abbrev
expecting success:
COLUMNS=81 git branch --column=column >actual &&
cat >expected <<\EOF &&
a/b/c bam foo l * master mb o/o q
abc bar j/k m/m master2 n o/p r
EOF
test_cmp expected actual
ok 40 - git branch --column
expecting success:
long=this/is/a/part/of/long/branch/name &&
long=z$long/$long/$long/$long &&
test_when_finished "git branch -d $long" &&
git branch $long &&
COLUMNS=80 git branch --column=column >actual &&
cat >expected <<EOF &&
a/b/c
abc
bam
bar
foo
j/k
l
m/m
* master
master2
mb
n
o/o
o/p
q
r
$long
EOF
test_cmp expected actual
Deleted branch zthis/is/a/part/of/long/branch/name/this/is/a/part/of/long/branch/name/this/is/a/part/of/long/branch/name/this/is/a/part/of/long/branch/name (was 34a8706).
ok 41 - git branch --column with an extremely long branch name
expecting success:
git config column.ui column &&
git config column.branch "dense" &&
COLUMNS=80 git branch >actual &&
git config --unset column.branch &&
git config --unset column.ui &&
cat >expected <<\EOF &&
a/b/c bam foo l * master mb o/o q
abc bar j/k m/m master2 n o/p r
EOF
test_cmp expected actual
ok 42 - git branch with column.*
expecting success:
test_must_fail git branch --column -v
fatal: --column and --verbose are incompatible
ok 43 - git branch --column -v should fail
expecting success:
git config column.ui column &&
COLUMNS=80 git branch -v | cut -c -10 | sed "s/ *$//" >actual &&
git config --unset column.ui &&
cat >expected <<\EOF &&
a/b/c
abc
bam
bar
foo
j/k
l
m/m
* master
master2
mb
n
o/o
o/p
q
r
EOF
test_cmp expected actual
ok 44 - git branch -v with column.ui ignored
expecting success:
git branch -m q q2 &&
git branch -m q2 q
ok 45 - git branch -m q q2 without config should succeed
expecting success:
git branch --create-reflog s/s &&
git reflog exists refs/heads/s/s &&
git branch --create-reflog s/t &&
git reflog exists refs/heads/s/t &&
git branch -d s/t &&
git branch -m s/s s &&
git reflog exists refs/heads/s
Deleted branch s/t (was 34a8706).
ok 46 - git branch -m s/s s should work when s/t is deleted
expecting success:
test $(git config branch.s.dummy) = Hello &&
test_must_fail git config branch.s/s.dummy
ok 47 - config information was renamed, too
expecting success:
test_when_finished "git checkout master" &&
git checkout -b source master &&
# Assert that a config file with multiple config sections has
# those sections preserved...
cat >expect <<-\EOF &&
branch.dest.key1=value1
some.gar.b=age
branch.dest.key2=value2
EOF
cat >config.branch <<\EOF &&
;; Note the lack of -\EOF above & mixed indenting here. This is
;; intentional, we are also testing that the formatting of copied
;; sections is preserved.
;; Comment for source. Tabs
[branch "source"]
;; Comment for the source value
key1 = value1
;; Comment for some.gar. Spaces
[some "gar"]
;; Comment for the some.gar value
b = age
;; Comment for source, again. Mixed tabs/spaces.
[branch "source"]
;; Comment for the source value, again
key2 = value2
EOF
cat config.branch >>.git/config &&
git branch -m source dest &&
git config -f .git/config -l | grep -F -e source -e dest -e some.gar >actual &&
test_cmp expect actual &&
# ...and that the comments for those sections are also
# preserved.
cat config.branch | sed "s/\"source\"/\"dest\"/" >expect &&
sed -n -e "/Note the lack/,\$p" .git/config >actual &&
test_cmp expect actual
Switched to a new branch 'source'
Switched to branch 'master'
ok 48 - git branch -m correctly renames multiple config sections
expecting success:
test_expect_code 128 git branch -c 2>err &&
test_i18ngrep "branch name required" err
fatal: branch name required
ok 49 - git branch -c dumps usage
expecting success:
test_expect_code 128 git branch --copy 2>err &&
test_i18ngrep "branch name required" err
fatal: branch name required
ok 50 - git branch --copy dumps usage
expecting success:
git branch --create-reflog d &&
git reflog exists refs/heads/d &&
git config branch.d.dummy Hello &&
git branch -c d e &&
git reflog exists refs/heads/d &&
git reflog exists refs/heads/e &&
echo Hello >expect &&
git config branch.e.dummy >actual &&
test_cmp expect actual &&
echo Hello >expect &&
git config branch.d.dummy >actual &&
test_cmp expect actual
ok 51 - git branch -c d e should work
expecting success:
git branch --create-reflog copy &&
git reflog exists refs/heads/copy &&
git config branch.copy.dummy Hello &&
git branch --copy copy copy-to &&
git reflog exists refs/heads/copy &&
git reflog exists refs/heads/copy-to &&
echo Hello >expect &&
git config branch.copy.dummy >actual &&
test_cmp expect actual &&
echo Hello >expect &&
git config branch.copy-to.dummy >actual &&
test_cmp expect actual
ok 52 - git branch --copy is a synonym for -c
expecting success:
git checkout -b ee &&
git reflog exists refs/heads/ee &&
git config branch.ee.dummy Hello &&
git branch -c ee ef &&
git reflog exists refs/heads/ee &&
git reflog exists refs/heads/ef &&
test $(git config branch.ee.dummy) = Hello &&
test $(git config branch.ef.dummy) = Hello &&
test $(git rev-parse --abbrev-ref HEAD) = ee
Switched to a new branch 'ee'
ok 53 - git branch -c ee ef should copy ee to create branch ef
expecting success:
git branch --create-reflog f/f &&
git reflog exists refs/heads/f/f &&
git config branch.f/f.dummy Hello &&
git branch -c f/f g/g &&
git reflog exists refs/heads/f/f &&
git reflog exists refs/heads/g/g &&
test $(git config branch.f/f.dummy) = Hello &&
test $(git config branch.g/g.dummy) = Hello
ok 54 - git branch -c f/f g/g should work
expecting success:
git branch --create-reflog m2 &&
git reflog exists refs/heads/m2 &&
git config branch.m2.dummy Hello &&
git branch -c m2 m2 &&
git reflog exists refs/heads/m2 &&
test $(git config branch.m2.dummy) = Hello
ok 55 - git branch -c m2 m2 should work
expecting success:
git branch --create-reflog zz &&
git reflog exists refs/heads/zz &&
test_must_fail git branch -c zz zz/zz
error: directory not empty: .git/logs/refs/heads/zz/zz
fatal: Branch copy failed
ok 56 - git branch -c zz zz/zz should fail
expecting success:
git branch --create-reflog b/b &&
test_must_fail git branch -c b/b b
error: directory not empty: .git/logs/refs/heads/b
fatal: Branch copy failed
ok 57 - git branch -c b/b b should fail
expecting success:
git branch --create-reflog o/q &&
git reflog exists refs/heads/o/q &&
git reflog exists refs/heads/o/p &&
git branch -C o/q o/p
ok 58 - git branch -C o/q o/p should work when o/p exists
expecting success:
git reflog exists refs/heads/o/q &&
git reflog exists refs/heads/o/p &&
git branch -c -f o/q o/p
ok 59 - git branch -c -f o/q o/p should work when o/p exists
expecting success:
git branch qq &&
git branch rr &&
test_must_fail git branch -c qq rr/qq
error: 'refs/heads/rr' exists; cannot create 'refs/heads/rr/qq'
fatal: Branch copy failed
ok 60 - git branch -c qq rr/qq should fail when rr exists
expecting success:
git branch b1 &&
git checkout -b b2 &&
test_must_fail git branch -C b1 b2
Switched to a new branch 'b2'
fatal: Cannot force update the current branch.
ok 61 - git branch -C b1 b2 should fail when b2 is checked out
expecting success:
git checkout -b c1 &&
git branch c2 &&
git branch -C c1 c2 &&
test $(git rev-parse --abbrev-ref HEAD) = c1
Switched to a new branch 'c1'
ok 62 - git branch -C c1 c2 should succeed when c1 is checked out
expecting success:
msg="Branch: copied refs/heads/c1 to refs/heads/c2" &&
! grep "$msg$" .git/logs/HEAD
ok 63 - git branch -C c1 c2 should never touch HEAD
expecting success:
git checkout master &&
git branch -C master
Switched to branch 'master'
ok 64 - git branch -C master should work when master is checked out
expecting success:
git checkout master &&
git branch -C master master
Already on 'master'
ok 65 - git branch -C master master should work when master is checked out
expecting success:
git checkout master &&
git branch master5 &&
git branch -C master5 master5
Already on 'master'
ok 66 - git branch -C master5 master5 should work when master is checked out
expecting success:
git branch --create-reflog cd &&
git reflog exists refs/heads/cd &&
git config branch.cd.dummy CD &&
git branch --create-reflog ab &&
git reflog exists refs/heads/ab &&
git config branch.ab.dummy AB &&
git branch -C ab cd &&
git reflog exists refs/heads/ab &&
git reflog exists refs/heads/cd &&
test $(git config branch.ab.dummy) = AB &&
test $(git config branch.cd.dummy) = AB
ok 67 - git branch -C ab cd should overwrite existing config for cd
expecting success:
FOO=1 &&
export FOO &&
test_when_finished "git checkout master" &&
git checkout -b source2 master &&
# Assert that a config file with multiple config sections has
# those sections preserved...
cat >expect <<-\EOF &&
branch.source2.key1=value1
branch.dest2.key1=value1
more.gar.b=age
branch.source2.key2=value2
branch.dest2.key2=value2
EOF
cat >config.branch <<\EOF &&
;; Note the lack of -\EOF above & mixed indenting here. This is
;; intentional, we are also testing that the formatting of copied
;; sections is preserved.
;; Comment for source2. Tabs
[branch "source2"]
;; Comment for the source2 value
key1 = value1
;; Comment for more.gar. Spaces
[more "gar"]
;; Comment for the more.gar value
b = age
;; Comment for source2, again. Mixed tabs/spaces.
[branch "source2"]
;; Comment for the source2 value, again
key2 = value2
EOF
cat config.branch >>.git/config &&
git branch -c source2 dest2 &&
git config -f .git/config -l | grep -F -e source2 -e dest2 -e more.gar >actual &&
test_cmp expect actual &&
# ...and that the comments and formatting for those sections
# is also preserved.
cat >expect <<\EOF &&
;; Comment for source2. Tabs
[branch "source2"]
;; Comment for the source2 value
key1 = value1
;; Comment for more.gar. Spaces
[branch "dest2"]
;; Comment for the source2 value
key1 = value1
;; Comment for more.gar. Spaces
[more "gar"]
;; Comment for the more.gar value
b = age
;; Comment for source2, again. Mixed tabs/spaces.
[branch "source2"]
;; Comment for the source2 value, again
key2 = value2
[branch "dest2"]
;; Comment for the source2 value, again
key2 = value2
EOF
sed -n -e "/Comment for source2/,\$p" .git/config >actual &&
test_cmp expect actual
Switched to a new branch 'source2'
Switched to branch 'master'
ok 68 - git branch -c correctly copies multiple config sections
expecting success:
git branch target &&
git symbolic-ref refs/heads/symref refs/heads/target &&
echo "Deleted branch symref (was refs/heads/target)." >expect &&
git branch -d symref >actual &&
test_path_is_file .git/refs/heads/target &&
test_path_is_missing .git/refs/heads/symref &&
test_i18ncmp expect actual
ok 69 - deleting a symref
expecting success:
git symbolic-ref refs/heads/dangling-symref nowhere &&
test_path_is_file .git/refs/heads/dangling-symref &&
echo "Deleted branch dangling-symref (was nowhere)." >expect &&
git branch -d dangling-symref >actual &&
test_path_is_missing .git/refs/heads/dangling-symref &&
test_i18ncmp expect actual
ok 70 - deleting a dangling symref
expecting success:
git symbolic-ref refs/heads/self-reference refs/heads/self-reference &&
test_path_is_file .git/refs/heads/self-reference &&
echo "Deleted branch self-reference (was refs/heads/self-reference)." >expect &&
git branch -d self-reference >actual &&
test_path_is_missing .git/refs/heads/self-reference &&
test_i18ncmp expect actual
ok 71 - deleting a self-referential symref
expecting success:
git symbolic-ref refs/heads/master2 refs/heads/master &&
test_must_fail git branch -m master2 master3 &&
git symbolic-ref refs/heads/master2 &&
test_path_is_file .git/refs/heads/master &&
test_path_is_missing .git/refs/heads/master3
error: refname refs/heads/master2 is a symbolic ref, renaming it is not supported
fatal: Branch rename failed
refs/heads/master
ok 72 - renaming a symref is not allowed
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 branch --create-reflog u &&
mv .git/logs/refs/heads/u real-u &&
ln -s real-u .git/logs/refs/heads/u &&
test_must_fail git branch -m u v
error: reflog for refs/heads/u is a symlink
fatal: Branch rename failed
ok 73 - git branch -m u v should fail when the reflog for u is a symlink
expecting success:
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track my1 local/master &&
test $(git config branch.my1.remote) = local &&
test $(git config branch.my1.merge) = refs/heads/master
From .
* [new branch] a/b/c -> local/a/b/c
* [new branch] ab -> local/ab
* [new branch] abc -> local/abc
* [new branch] b/b -> local/b/b
* [new branch] b1 -> local/b1
* [new branch] b2 -> local/b2
* [new branch] bam -> local/bam
* [new branch] bar -> local/bar
* [new branch] c1 -> local/c1
* [new branch] c2 -> local/c2
* [new branch] cd -> local/cd
* [new branch] copy -> local/copy
* [new branch] copy-to -> local/copy-to
* [new branch] d -> local/d
* [new branch] dest -> local/dest
* [new branch] dest2 -> local/dest2
* [new branch] e -> local/e
* [new branch] ee -> local/ee
* [new branch] ef -> local/ef
* [new branch] f/f -> local/f/f
* [new branch] foo -> local/foo
* [new branch] g/g -> local/g/g
* [new branch] j/k -> local/j/k
* [new branch] l -> local/l
* [new branch] m/m -> local/m/m
* [new branch] m2 -> local/m2
* [new branch] master -> local/master
* [new branch] master2 -> local/master2
* [new branch] master5 -> local/master5
* [new branch] mb -> local/mb
* [new branch] n -> local/n
* [new branch] o/o -> local/o/o
* [new branch] o/p -> local/o/p
* [new branch] o/q -> local/o/q
* [new branch] q -> local/q
* [new branch] qq -> local/qq
* [new branch] r -> local/r
* [new branch] rr -> local/rr
* [new branch] s -> local/s
* [new branch] source2 -> local/source2
* [new branch] target -> local/target
* [new branch] u -> local/u
* [new branch] zz -> local/zz
Branch 'my1' set up to track remote branch 'master' from 'local'.
ok 74 - test tracking setup via --track
expecting success:
git config remote.local.url . &&
git config remote.local.fetch refs/heads/master:refs/remotes/local/master &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track my4 local/master &&
test $(git config branch.my4.remote) = local &&
test $(git config branch.my4.merge) = refs/heads/master
Branch 'my4' set up to track remote branch 'master' from 'local'.
ok 75 - test tracking setup (non-wildcard, matching)
expecting success:
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git config remote.local.fetch refs/heads/s:refs/remotes/local/s &&
test_must_fail git branch --track my5 local/master &&
test_must_fail git config branch.my5.remote &&
test_must_fail git config branch.my5.merge
fatal: Cannot setup tracking information; starting point 'local/master' is not a branch.
ok 76 - tracking setup fails on non-matching refspec
expecting success:
git config branch.autosetupmerge true &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch my3 local/master &&
test $(git config branch.my3.remote) = local &&
test $(git config branch.my3.merge) = refs/heads/master
Branch 'my3' set up to track remote branch 'master' from 'local'.
ok 77 - test tracking setup via config
expecting success:
git config branch.autosetupmerge true &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track my2 local/master &&
git config branch.autosetupmerge false &&
! test "$(git config branch.my2.remote)" = local &&
! test "$(git config branch.my2.merge)" = refs/heads/master
ok 78 - test overriding tracking setup via --no-track
expecting success:
git config branch.autosetupmerge true &&
git branch my6 s &&
git config branch.autosetupmerge false &&
test -z "$(git config branch.my6.remote)" &&
test -z "$(git config branch.my6.merge)"
ok 79 - no tracking without .fetch entries
expecting success:
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/o/o || git fetch local) &&
git branch --track my7 local/o/o &&
test "$(git config branch.my7.remote)" = local &&
test "$(git config branch.my7.merge)" = refs/heads/o/o
Branch 'my7' set up to track remote branch 'o/o' from 'local'.
ok 80 - test tracking setup via --track but deeper
expecting success:
git branch -d my7 &&
test -z "$(git config branch.my7.remote)" &&
test -z "$(git config branch.my7.merge)"
Deleted branch my7 (was 34a8706).
ok 81 - test deleting branch deletes branch config
expecting success:
git branch my7 s &&
sha1=$(git rev-parse my7 | cut -c 1-7) &&
echo "Deleted branch my7 (was $sha1)." >expect &&
git branch -d my7 >actual 2>&1 &&
test_i18ncmp expect actual
ok 82 - test deleting branch without config
expecting success:
git worktree add -b my7 my7 &&
test_must_fail git -C my7 branch -d my7 &&
test_must_fail git branch -d my7 &&
rm -r my7 &&
git worktree prune
Preparing worktree (new branch 'my7')
HEAD is now at 34a8706 Second commit.
error: Cannot delete branch 'my7' checked out at '/<<PKGBUILDDIR>>/t/trash directory.t3200-branch/my7'
error: Cannot delete branch 'my7' checked out at '/<<PKGBUILDDIR>>/t/trash directory.t3200-branch/my7'
ok 83 - deleting currently checked out branch fails
expecting success:
git branch --track my8 &&
test "$(git config branch.my8.remote)" &&
test "$(git config branch.my8.merge)"
Branch 'my8' set up to track local branch 'master'.
ok 84 - test --track without .fetch entries
expecting success:
git config branch.autosetupmerge always &&
git branch my9 HEAD^ &&
git config branch.autosetupmerge false
ok 85 - branch from non-branch HEAD w/autosetupmerge=always
expecting success:
test_must_fail git branch --track my10 HEAD^
fatal: Cannot setup tracking information; starting point 'HEAD^' is not a branch.
ok 86 - branch from non-branch HEAD w/--track causes failure
expecting success:
git tag foobar &&
test_must_fail git branch --track my11 foobar
fatal: Cannot setup tracking information; starting point 'foobar' is not a branch.
ok 87 - branch from tag w/--track causes failure
expecting success:
test_must_fail git branch --set-upstream-to master a b c
fatal: too many arguments to set new upstream
ok 88 - --set-upstream-to fails on multiple branches
expecting success:
git checkout HEAD^{} &&
test_must_fail git branch --set-upstream-to master &&
git checkout -
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 34a8706 Second commit.
fatal: could not set upstream of HEAD to master when it does not point to any branch.
Switched to branch 'master'
ok 89 - --set-upstream-to fails on detached HEAD
expecting success:
test_must_fail git branch --set-upstream-to master does-not-exist
fatal: branch 'does-not-exist' does not exist
ok 90 - --set-upstream-to fails on a missing dst branch
expecting success:
test_must_fail git branch --set-upstream-to does-not-exist master
error: the requested upstream branch 'does-not-exist' does not exist
hint:
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint:
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.
ok 91 - --set-upstream-to fails on a missing src branch
expecting success:
test_must_fail git branch --set-upstream-to HEAD^{}
fatal: Cannot setup tracking information; starting point 'HEAD^{}' is not a branch.
ok 92 - --set-upstream-to fails on a non-ref
expecting success:
test_when_finished "rm -f .git/config.lock" &&
>.git/config.lock &&
git branch locked &&
test_must_fail git branch --set-upstream-to locked
error: could not lock config file .git/config: File exists
error: Unable to write upstream branch configuration
hint:
hint: After fixing the error cause you may try to fix up
hint: the remote tracking information by invoking
hint: "git branch --set-upstream-to=locked".
ok 93 - --set-upstream-to fails on locked config
expecting success:
test_config branch.master.remote foo &&
test_config branch.master.merge foo &&
git branch my12 &&
git branch --set-upstream-to my12 &&
test "$(git config branch.master.remote)" = "." &&
test "$(git config branch.master.merge)" = "refs/heads/my12"
Branch 'master' set up to track local branch 'my12'.
ok 94 - use --set-upstream-to modify HEAD
expecting success:
git branch my13 &&
git branch --set-upstream-to master my13 &&
test_when_finished "git branch --unset-upstream my13" &&
test "$(git config branch.my13.remote)" = "." &&
test "$(git config branch.my13.merge)" = "refs/heads/master"
Branch 'my13' set up to track local branch 'master'.
ok 95 - use --set-upstream-to modify a particular branch
expecting success:
test_must_fail git branch --unset-upstream i-dont-exist
fatal: Branch 'i-dont-exist' has no upstream information
ok 96 - --unset-upstream should fail if given a non-existent branch
expecting success:
test_when_finished "rm -f .git/config.lock" &&
git branch --set-upstream-to locked &&
>.git/config.lock &&
test_must_fail git branch --unset-upstream
Branch 'master' set up to track local branch 'locked'.
error: could not lock config file .git/config: File exists
fatal: could not unset 'branch.master.remote'
ok 97 - --unset-upstream should fail if config is locked
expecting success:
git branch my14 &&
test_config branch.master.remote foo &&
test_config branch.master.merge foo &&
git branch --set-upstream-to my14 &&
git branch --unset-upstream &&
test_must_fail git config branch.master.remote &&
test_must_fail git config branch.master.merge &&
# fail for a branch without upstream set
test_must_fail git branch --unset-upstream
Branch 'master' set up to track local branch 'my14'.
fatal: Branch 'master' has no upstream information
ok 98 - test --unset-upstream on HEAD
expecting success:
test_must_fail git branch --unset-upstream a b c
fatal: too many arguments to unset upstream
ok 99 - --unset-upstream should fail on multiple branches
expecting success:
git checkout HEAD^{} &&
test_must_fail git branch --unset-upstream &&
git checkout -
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 34a8706 Second commit.
fatal: could not unset upstream of HEAD when it does not point to any branch.
Switched to branch 'master'
ok 100 - --unset-upstream should fail on detached HEAD
expecting success:
git branch my15 &&
git branch --set-upstream-to master my14 &&
git branch --unset-upstream my14 &&
test_must_fail git config branch.my14.remote &&
test_must_fail git config branch.my14.merge
Branch 'my14' set up to track local branch 'master'.
ok 101 - test --unset-upstream on a particular branch
expecting success:
test_must_fail git branch --set-upstream origin/master
fatal: the '--set-upstream' option is no longer supported. Please use '--track' or '--set-upstream-to' instead.
ok 102 - disabled option --set-upstream fails
expecting success:
git branch --set-upstream-to refs/heads/my13 my13 2>actual &&
cat >expected <<-\EOF &&
warning: Not setting branch my13 as its own upstream.
EOF
test_expect_code 1 git config branch.my13.remote &&
test_expect_code 1 git config branch.my13.merge &&
test_i18ncmp expected actual
ok 103 - --set-upstream-to notices an error to set branch as own upstream
expecting success:
GIT_COMMITTER_DATE="2005-05-26 23:30" \
git checkout -b g/h/i -l master &&
test_path_is_file .git/refs/heads/g/h/i &&
test_path_is_file .git/logs/refs/heads/g/h/i &&
test_cmp expect .git/logs/refs/heads/g/h/i
Switched to a new branch 'g/h/i'
ok 104 - git checkout -b g/h/i -l should create a branch and a log
expecting success:
git checkout master &&
git config --unset core.logAllRefUpdates &&
git checkout -b alpha &&
git rev-parse --verify alpha@{0}
Switched to branch 'master'
Switched to a new branch 'alpha'
34a8706747aa1dde49c924f3ac2af20138e5c494
ok 105 - checkout -b makes reflog by default
expecting success:
git checkout master &&
git config core.logAllRefUpdates false &&
git checkout -b beta &&
test_must_fail git rev-parse --verify beta@{0}
Switched to branch 'master'
Switched to a new branch 'beta'
fatal: Needed a single revision
ok 106 - checkout -b does not make reflog when core.logAllRefUpdates = false
expecting success:
git checkout master &&
git checkout -lb gamma &&
git config --unset core.logAllRefUpdates &&
git rev-parse --verify gamma@{0}
Switched to branch 'master'
Switched to a new branch 'gamma'
34a8706747aa1dde49c924f3ac2af20138e5c494
ok 107 - checkout -b with -l makes reflog when core.logAllRefUpdates = false
expecting success:
git config branch.autosetupmerge true &&
git config remote.ambi1.url lalala &&
git config remote.ambi1.fetch refs/heads/lalala:refs/heads/master &&
git config remote.ambi2.url lilili &&
git config remote.ambi2.fetch refs/heads/lilili:refs/heads/master &&
test_must_fail git branch all1 master &&
test -z "$(git config branch.all1.merge)"
fatal: Not tracking: ambiguous information for ref refs/heads/master
ok 108 - avoid ambiguous track
expecting success:
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase local &&
(git show-ref -q refs/remotes/local/o || git fetch local) &&
git branch mybase &&
git branch --track myr1 mybase &&
test "$(git config branch.myr1.remote)" = . &&
test "$(git config branch.myr1.merge)" = refs/heads/mybase &&
test "$(git config branch.myr1.rebase)" = true
From .
* [new branch] all1 -> local/all1
* [new branch] alpha -> local/alpha
* [new branch] beta -> local/beta
* [new branch] g/h/i -> local/g/h/i
* [new branch] gamma -> local/gamma
* [new branch] locked -> local/locked
* [new branch] my1 -> local/my1
* [new branch] my12 -> local/my12
* [new branch] my13 -> local/my13
* [new branch] my14 -> local/my14
* [new branch] my15 -> local/my15
* [new branch] my2 -> local/my2
* [new branch] my3 -> local/my3
* [new branch] my4 -> local/my4
* [new branch] my6 -> local/my6
* [new branch] my7 -> local/my7
* [new branch] my8 -> local/my8
* [new branch] my9 -> local/my9
Branch 'myr1' set up to track local branch 'mybase' by rebasing.
ok 109 - autosetuprebase local on a tracked local branch
expecting success:
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase always &&
(git show-ref -q refs/remotes/local/o || git fetch local) &&
git branch mybase2 &&
git branch --track myr2 mybase &&
test "$(git config branch.myr2.remote)" = . &&
test "$(git config branch.myr2.merge)" = refs/heads/mybase &&
test "$(git config branch.myr2.rebase)" = true
From .
* [new branch] mybase -> local/mybase
* [new branch] myr1 -> local/myr1
Branch 'myr2' set up to track local branch 'mybase' by rebasing.
ok 110 - autosetuprebase always on a tracked local branch
expecting success:
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase remote &&
(git show-ref -q refs/remotes/local/o || git fetch local) &&
git branch mybase3 &&
git branch --track myr3 mybase2 &&
test "$(git config branch.myr3.remote)" = . &&
test "$(git config branch.myr3.merge)" = refs/heads/mybase2 &&
! test "$(git config branch.myr3.rebase)" = true
From .
* [new branch] mybase2 -> local/mybase2
* [new branch] myr2 -> local/myr2
Branch 'myr3' set up to track local branch 'mybase2'.
ok 111 - autosetuprebase remote on a tracked local branch
expecting success:
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase never &&
(git show-ref -q refs/remotes/local/o || git fetch local) &&
git branch mybase4 &&
git branch --track myr4 mybase2 &&
test "$(git config branch.myr4.remote)" = . &&
test "$(git config branch.myr4.merge)" = refs/heads/mybase2 &&
! test "$(git config branch.myr4.rebase)" = true
From .
* [new branch] mybase3 -> local/mybase3
* [new branch] myr3 -> local/myr3
Branch 'myr4' set up to track local branch 'mybase2'.
ok 112 - autosetuprebase never on a tracked local branch
expecting success:
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase local &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track myr5 local/master &&
test "$(git config branch.myr5.remote)" = local &&
test "$(git config branch.myr5.merge)" = refs/heads/master &&
! test "$(git config branch.myr5.rebase)" = true
Branch 'myr5' set up to track remote branch 'master' from 'local'.
ok 113 - autosetuprebase local on a tracked remote branch
expecting success:
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase never &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track myr6 local/master &&
test "$(git config branch.myr6.remote)" = local &&
test "$(git config branch.myr6.merge)" = refs/heads/master &&
! test "$(git config branch.myr6.rebase)" = true
Branch 'myr6' set up to track remote branch 'master' from 'local'.
ok 114 - autosetuprebase never on a tracked remote branch
expecting success:
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase remote &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track myr7 local/master &&
test "$(git config branch.myr7.remote)" = local &&
test "$(git config branch.myr7.merge)" = refs/heads/master &&
test "$(git config branch.myr7.rebase)" = true
Branch 'myr7' set up to track remote branch 'master' from 'local' by rebasing.
ok 115 - autosetuprebase remote on a tracked remote branch
expecting success:
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
git config branch.autosetuprebase remote &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track myr8 local/master &&
test "$(git config branch.myr8.remote)" = local &&
test "$(git config branch.myr8.merge)" = refs/heads/master &&
test "$(git config branch.myr8.rebase)" = true
Branch 'myr8' set up to track remote branch 'master' from 'local' by rebasing.
ok 116 - autosetuprebase always on a tracked remote branch
expecting success:
git config --unset branch.autosetuprebase &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --track myr9 local/master &&
test "$(git config branch.myr9.remote)" = local &&
test "$(git config branch.myr9.merge)" = refs/heads/master &&
test "z$(git config branch.myr9.rebase)" = z
Branch 'myr9' set up to track remote branch 'master' from 'local'.
ok 117 - autosetuprebase unconfigured on a tracked remote branch
expecting success:
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/o || git fetch local) &&
git branch mybase10 &&
git branch --track myr10 mybase2 &&
test "$(git config branch.myr10.remote)" = . &&
test "$(git config branch.myr10.merge)" = refs/heads/mybase2 &&
test "z$(git config branch.myr10.rebase)" = z
From .
* [new branch] mybase4 -> local/mybase4
* [new branch] myr4 -> local/myr4
* [new branch] myr5 -> local/myr5
* [new branch] myr6 -> local/myr6
* [new branch] myr7 -> local/myr7
* [new branch] myr8 -> local/myr8
* [new branch] myr9 -> local/myr9
Branch 'myr10' set up to track local branch 'mybase2'.
ok 118 - autosetuprebase unconfigured on a tracked local branch
expecting success:
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr11 mybase2 &&
test "z$(git config branch.myr11.remote)" = z &&
test "z$(git config branch.myr11.merge)" = z &&
test "z$(git config branch.myr11.rebase)" = z
ok 119 - autosetuprebase unconfigured on untracked local branch
expecting success:
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr12 local/master &&
test "z$(git config branch.myr12.remote)" = z &&
test "z$(git config branch.myr12.merge)" = z &&
test "z$(git config branch.myr12.rebase)" = z
ok 120 - autosetuprebase unconfigured on untracked remote branch
expecting success:
git config branch.autosetuprebase never &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr13 mybase2 &&
test "z$(git config branch.myr13.remote)" = z &&
test "z$(git config branch.myr13.merge)" = z &&
test "z$(git config branch.myr13.rebase)" = z
ok 121 - autosetuprebase never on an untracked local branch
expecting success:
git config branch.autosetuprebase local &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr14 mybase2 &&
test "z$(git config branch.myr14.remote)" = z &&
test "z$(git config branch.myr14.merge)" = z &&
test "z$(git config branch.myr14.rebase)" = z
ok 122 - autosetuprebase local on an untracked local branch
expecting success:
git config branch.autosetuprebase remote &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr15 mybase2 &&
test "z$(git config branch.myr15.remote)" = z &&
test "z$(git config branch.myr15.merge)" = z &&
test "z$(git config branch.myr15.rebase)" = z
ok 123 - autosetuprebase remote on an untracked local branch
expecting success:
git config branch.autosetuprebase always &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr16 mybase2 &&
test "z$(git config branch.myr16.remote)" = z &&
test "z$(git config branch.myr16.merge)" = z &&
test "z$(git config branch.myr16.rebase)" = z
ok 124 - autosetuprebase always on an untracked local branch
expecting success:
git config branch.autosetuprebase never &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr17 local/master &&
test "z$(git config branch.myr17.remote)" = z &&
test "z$(git config branch.myr17.merge)" = z &&
test "z$(git config branch.myr17.rebase)" = z
ok 125 - autosetuprebase never on an untracked remote branch
expecting success:
git config branch.autosetuprebase local &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr18 local/master &&
test "z$(git config branch.myr18.remote)" = z &&
test "z$(git config branch.myr18.merge)" = z &&
test "z$(git config branch.myr18.rebase)" = z
ok 126 - autosetuprebase local on an untracked remote branch
expecting success:
git config branch.autosetuprebase remote &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr19 local/master &&
test "z$(git config branch.myr19.remote)" = z &&
test "z$(git config branch.myr19.merge)" = z &&
test "z$(git config branch.myr19.rebase)" = z
ok 127 - autosetuprebase remote on an untracked remote branch
expecting success:
git config branch.autosetuprebase always &&
git config remote.local.url . &&
git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
(git show-ref -q refs/remotes/local/master || git fetch local) &&
git branch --no-track myr20 local/master &&
test "z$(git config branch.myr20.remote)" = z &&
test "z$(git config branch.myr20.merge)" = z &&
test "z$(git config branch.myr20.rebase)" = z
ok 128 - autosetuprebase always on an untracked remote branch
expecting success:
git config branch.autosetupmerge always &&
test_when_finished git checkout master &&
git checkout HEAD^0 &&
git branch my11 &&
test -z "$(git config branch.my11.remote)" &&
test -z "$(git config branch.my11.merge)"
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 34a8706 Second commit.
Switched to branch 'master'
ok 129 - autosetuprebase always on detached HEAD
expecting success:
git config branch.autosetuprebase garbage &&
test_must_fail git branch
error: malformed value for branch.autosetuprebase
fatal: bad config variable 'branch.autosetuprebase' in file '.git/config' at line 81
ok 130 - detect misconfigured autosetuprebase (bad value)
expecting success:
git config --unset branch.autosetuprebase &&
echo "[branch] autosetuprebase" >>.git/config &&
test_must_fail git branch &&
git config --unset branch.autosetuprebase
error: missing value for 'branch.autosetuprebase'
fatal: bad config variable 'branch.autosetuprebase' in file '.git/config' at line 127
ok 131 - detect misconfigured autosetuprebase (no value)
expecting success:
git checkout my9 &&
git config --unset branch.my8.merge &&
test_must_fail git branch -d my8
Switched to branch 'my9'
error: The branch 'my8' is not fully merged.
If you are sure you want to delete it, run 'git branch -D my8'.
ok 132 - attempt to delete a branch without base and unmerged to HEAD
expecting success:
# we are on my9 which is the initial commit; traditionally
# we would not have allowed deleting my8 that is not merged
# to my9, but it is set to track master that already has my8
git config branch.my8.merge refs/heads/master &&
git branch -d my8
warning: deleting branch 'my8' that has been merged to
'refs/heads/master', but not yet merged to HEAD.
Deleted branch my8 (was 34a8706).
ok 133 - attempt to delete a branch merged to its base
expecting success:
git checkout master &&
echo Third >>A &&
git commit -m "Third commit" A &&
git branch -t my10 my9 &&
git branch -f my10 HEAD^ &&
# we are on master which is at the third commit, and my10
# is behind us, so traditionally we would have allowed deleting
# it; but my10 is set to track my9 that is further behind.
test_must_fail git branch -d my10
Switched to branch 'master'
[master 90cfba7] Third commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Branch 'my10' set up to track local branch 'my9'.
warning: not deleting branch 'my10' that is not yet merged to
'refs/heads/my9', even though it is merged to HEAD.
error: The branch 'my10' is not fully merged.
If you are sure you want to delete it, run 'git branch -D my10'.
ok 134 - attempt to delete a branch merged to its base
expecting success:
write_script editor <<-\EOF &&
echo "New contents" >"$1"
EOF
EDITOR=./editor git branch --edit-description &&
write_script editor <<-\EOF &&
git stripspace -s <"$1" >"EDITOR_OUTPUT"
EOF
EDITOR=./editor git branch --edit-description &&
echo "New contents" >expect &&
test_cmp expect EDITOR_OUTPUT
ok 135 - use --edit-description
expecting success:
write_script editor <<-\EOF &&
echo "New contents" >"$1"
EOF
test_must_fail env EDITOR=./editor git branch --edit-description no-such-branch
error: No branch named 'no-such-branch'.
ok 136 - detect typo in branch name when using --edit-description
expecting success:
write_script editor <<-\EOF &&
echo "New contents" >"$1"
EOF
git checkout --orphan unborn &&
test_must_fail env EDITOR=./editor git branch --edit-description
Switched to a new branch 'unborn'
error: No commit on branch 'unborn' yet.
ok 137 - refuse --edit-description on unborn branch for now
expecting success:
test_must_fail git branch --merged 0000000000000000000000000000000000000000
error: option `merged' must point to a commit
ok 138 - --merged catches invalid object names
expecting success:
test_must_fail git branch --merged HEAD --no-merged HEAD
fatal: malformed object name HEAD
ok 139 - --merged is incompatible with --no-merged
expecting success:
test_when_finished "reset_rebase" &&
git checkout master &&
FAKE_LINES="1 edit 2" &&
export FAKE_LINES &&
set_fake_editor &&
git rebase -i HEAD~2 &&
git branch --list >actual &&
test_i18ngrep "rebasing master" actual
Switched to branch 'master'
rebase -i script before editing:
pick 34a8706 Second commit.
pick 90cfba7 Third commit
rebase -i script after editing:
pick 34a8706 Second commit.
edit 90cfba7 Third commit
Rebasing (2/2)
Stopped at 90cfba7... Third commit
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
* (no branch, rebasing master)
HEAD is now at 90cfba7 Third commit
Removing EDITOR_OUTPUT
Removing actual
Removing actual.0abbrev
Removing actual.36abbrev
Removing actual.abbrev
Removing actual.default
Removing actual.noabbrev
Removing config.branch
Removing editor
Removing err
Removing expect
Removing expected
Removing fake-editor.sh
Removing real-u
ok 140 - --list during rebase
expecting success:
test_when_finished "reset_rebase && git checkout master" &&
git checkout master^0 &&
oid=$(git rev-parse --short HEAD) &&
FAKE_LINES="1 edit 2" &&
export FAKE_LINES &&
set_fake_editor &&
git rebase -i HEAD~2 &&
git branch --list >actual &&
test_i18ngrep "rebasing detached HEAD $oid" actual
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 90cfba7 Third commit
rebase -i script before editing:
pick 34a8706 Second commit.
pick 90cfba7 Third commit
rebase -i script after editing:
pick 34a8706 Second commit.
edit 90cfba7 Third commit
Rebasing (2/2)
Stopped at 90cfba7... Third commit
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
* (no branch, rebasing detached HEAD 90cfba7)
HEAD is now at 90cfba7 Third commit
Removing actual
Removing fake-editor.sh
Switched to branch 'master'
ok 141 - --list during rebase from detached HEAD
expecting success:
rm -rf a b c d &&
git init a &&
(
cd a &&
test_commit a
) &&
git init b &&
(
cd b &&
test_commit b
) &&
git init c &&
(
cd c &&
test_commit c &&
git remote add a ../a &&
git remote add b ../b &&
git fetch --all
) &&
git init d &&
(
cd d &&
git remote add c ../c &&
git config remote.c.fetch "+refs/remotes/*:refs/remotes/*" &&
git fetch c &&
git branch --track local/a/master remotes/a/master &&
test "$(git config branch.local/a/master.remote)" = "c" &&
test "$(git config branch.local/a/master.merge)" = "refs/remotes/a/master" &&
git rev-parse --verify a >expect &&
git rev-parse --verify local/a/master >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3200-branch/a/.git/
[master (root-commit) 7f0b538] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3200-branch/b/.git/
[master (root-commit) f869f6f] b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3200-branch/c/.git/
[master (root-commit) 1aae479] c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c.t
Fetching a
warning: no common commits
From ../a
* [new branch] master -> a/master
* [new tag] a -> a
Fetching b
warning: no common commits
From ../b
* [new branch] master -> b/master
* [new tag] b -> b
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3200-branch/d/.git/
From ../c
* [new ref] a/master -> a/master
* [new ref] b/master -> b/master
* [new tag] a -> a
* [new tag] b -> b
Branch 'local/a/master' set up to track remote ref 'refs/remotes/a/master'.
ok 142 - tracking with unexpected .fetch refspec
expecting success:
git init sort &&
(
cd sort &&
git config branch.sort committerdate &&
test_commit initial &&
git checkout -b a &&
test_commit a &&
git checkout -b c &&
test_commit c &&
git checkout -b b &&
test_commit b &&
git branch >actual &&
cat >expect <<-\EOF &&
master
a
c
* b
EOF
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3200-branch/sort/.git/
[master (root-commit) d39e3de] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
Switched to a new branch 'a'
[a 72bbe25] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a.t
Switched to a new branch 'c'
[c e7c2d97] c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c.t
Switched to a new branch 'b'
[b 80b142d] b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b.t
ok 143 - configured committerdate sort
expecting success:
(
cd sort &&
git config branch.sort committerdate &&
git branch --sort=refname >actual &&
cat >expect <<-\EOF &&
a
* b
c
master
EOF
test_cmp expect actual
)
ok 144 - option override configured sort
expecting success:
(
cd sort &&
git config branch.sort "v:notvalid" &&
test_must_fail git branch
)
fatal: unknown field name: notvalid
ok 145 - invalid sort parameter in configuration
# passed all 145 test(s)
1..145
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3302-notes-index-expensive.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3302-notes-index-expensive/.git/
expecting success:
mkdir "$count" &&
(
cd "$count" &&
create_repo "$count"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3302-notes-index-expensive/10/.git/
ok 1 - setup 10
expecting success:
(
cd "$count" &&
test_notes "$count"
)
ok 2 - notes work
checking prerequisite: USR_BIN_TIME
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test -x /usr/bin/time
)
prerequisite USR_BIN_TIME not satisfied
skipping test: notes timing with /usr/bin/time
(
cd "$count" &&
time_notes 100
)
ok 3 # skip notes timing with /usr/bin/time (missing USR_BIN_TIME)
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
skipping test: setup 100
mkdir "$count" &&
(
cd "$count" &&
create_repo "$count"
)
ok 4 # skip setup 100 (missing EXPENSIVE)
skipping test: notes work
(
cd "$count" &&
test_notes "$count"
)
ok 5 # skip notes work (missing EXPENSIVE)
skipping test: notes timing with /usr/bin/time
(
cd "$count" &&
time_notes 100
)
ok 6 # skip notes timing with /usr/bin/time (missing EXPENSIVE,USR_BIN_TIME of USR_BIN_TIME,EXPENSIVE)
skipping test: setup 1000
mkdir "$count" &&
(
cd "$count" &&
create_repo "$count"
)
ok 7 # skip setup 1000 (missing EXPENSIVE)
skipping test: notes work
(
cd "$count" &&
test_notes "$count"
)
ok 8 # skip notes work (missing EXPENSIVE)
skipping test: notes timing with /usr/bin/time
(
cd "$count" &&
time_notes 100
)
ok 9 # skip notes timing with /usr/bin/time (missing EXPENSIVE,USR_BIN_TIME of USR_BIN_TIME,EXPENSIVE)
skipping test: setup 10000
mkdir "$count" &&
(
cd "$count" &&
create_repo "$count"
)
ok 10 # skip setup 10000 (missing EXPENSIVE)
skipping test: notes work
(
cd "$count" &&
test_notes "$count"
)
ok 11 # skip notes work (missing EXPENSIVE)
skipping test: notes timing with /usr/bin/time
(
cd "$count" &&
time_notes 100
)
ok 12 # skip notes timing with /usr/bin/time (missing EXPENSIVE,USR_BIN_TIME of USR_BIN_TIME,EXPENSIVE)
# passed all 12 test(s)
1..12
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t2013-checkout-submodule.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/.git/
expecting success:
mkdir submodule &&
(cd submodule &&
git init &&
test_commit first) &&
git add submodule &&
test_tick &&
git commit -m superproject &&
(cd submodule &&
test_commit second) &&
git add submodule &&
test_tick &&
git commit -m updated.superproject
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule/.git/
[master (root-commit) 50e526b] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 first.t
warning: adding embedded git repository: submodule
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> submodule
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached submodule
hint:
hint: See "git help submodule" for more information.
[master (root-commit) 1844aa5] superproject
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 160000 submodule
[master d662100] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 second.t
[master 14e674f] updated.superproject
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
git update-index --refresh &&
git diff-files --quiet &&
git diff-index --quiet --cached HEAD &&
git reset HEAD^ submodule &&
test_must_fail git diff-files --quiet &&
git reset submodule &&
git diff-files --quiet
Unstaged changes after reset:
M submodule
ok 2 - "reset <submodule>" updates the index
expecting success:
git update-index --refresh &&
git diff-files --quiet &&
git diff-index --quiet --cached HEAD &&
git checkout HEAD^ submodule &&
test_must_fail git diff-files --quiet &&
git checkout HEAD submodule &&
git diff-files --quiet
Updated 0 paths from f0404a9
Updated 0 paths from 29aef3d
ok 3 - "checkout <submodule>" updates the index only
expecting success:
git config diff.ignoreSubmodules dirty &&
echo x> submodule/untracked &&
git checkout HEAD >actual 2>&1 &&
test_must_be_empty actual
ok 4 - "checkout <submodule>" honors diff.ignoreSubmodules
expecting success:
git config diff.ignoreSubmodules none &&
git config -f .gitmodules submodule.submodule.path submodule &&
git config -f .gitmodules submodule.submodule.ignore untracked &&
git checkout HEAD >actual 2>&1 &&
test_must_be_empty actual
ok 5 - "checkout <submodule>" honors submodule.*.ignore from .gitmodules
expecting success:
git config -f .gitmodules submodule.submodule.ignore none &&
git config submodule.submodule.path submodule &&
git config submodule.submodule.ignore all &&
git checkout HEAD >actual 2>&1 &&
test_must_be_empty actual
ok 6 - "checkout <submodule>" honors submodule.*.ignore from .git/config
expecting success:
prolog &&
reset_work_tree_to_interested no_submodule &&
(
cd submodule_update &&
git branch -t add_sub1 origin/add_sub1 &&
$command add_sub1 &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1/.git/
[master (root-commit) f401f36] Base inside first submodule
Author: A U Thor <author@example.com>
3 files changed, 4 insertions(+)
create mode 100644 .gitignore
create mode 100644 file1
create mode 100644 file2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub2/.git/
[master (root-commit) f2c1bb9] nested submodule 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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_repo/.git/
[master (root-commit) 3950f7e] 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
Switched to a new branch 'add_sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_repo/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_repo/uninitialized_sub'...
done.
[add_sub1 30024d7] Add sub1
Author: A U Thor <author@example.com>
2 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 uninitialized_sub
Switched to a new branch 'remove_sub1'
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
[remove_sub1 d6f9aa6] Revert "Add sub1"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
3 files changed, 9 deletions(-)
delete mode 100644 .gitmodules
delete mode 160000 sub1
delete mode 160000 uninitialized_sub
Switched to a new branch 'modify_sub1'
Switched to a new branch 'modifications'
[modifications e6d8148] modified file2 and added file3
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 file3
To /<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1
* [new branch] modifications -> modifications
[modify_sub1 1f84fbc] Modify sub1
Author: A U Thor <author@example.com>
Switched to a new branch 'add_nested_sub'
Switched to a new branch 'add_nested_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_repo/sub1/sub2'...
done.
[add_nested_sub 50491a1] add a nested submodule
Author: A U Thor <author@example.com>
2 files changed, 5 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub2
[add_nested_sub 6797720] update submodule, that updates a nested submodule
Author: A U Thor <author@example.com>
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
[modify_sub1_recursively 6788ca3] make a change in nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
[modify_sub1_recursively 6cc4170] update nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[modify_sub1_recursively 934e1af] update sub1, that updates nested sub
Author: A U Thor <author@example.com>
To /<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
To /<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub2
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
Cleared directory 'sub2'
Submodule 'sub2' (../submodule_update_sub2) unregistered for path 'sub2'
Switched to a new branch 'replace_sub1_with_directory'
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Previous HEAD position was f401f36 Base inside first submodule
Switched to branch 'modifications'
rm 'sub1'
[replace_sub1_with_directory 43c94e1] 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
Switched to a new branch 'replace_directory_with_sub1'
Removing sub1/file3
Removing sub1/file2
Removing sub1/file1
Adding sub1
[replace_directory_with_sub1 2061bb3] Revert "Replace sub1 with directory"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
4 files changed, 4 insertions(+), 3 deletions(-)
delete mode 100644 sub1/file1
delete mode 100644 sub1/file2
delete mode 100644 sub1/file3
Switched to a new branch 'replace_sub1_with_file'
rm 'sub1'
[replace_sub1_with_file d4861a4] 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'
[replace_file_with_sub1 cf98843] Revert "Replace sub1 with file"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
Switched to a new branch 'invalid_sub1'
[invalid_sub1 cea73c0] Invalid sub1 commit
Author: A U Thor <author@example.com>
Switched to a new branch 'valid_sub1'
[valid_sub1 f248045] Revert "Invalid sub1 commit"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
warning: unable to rmdir 'uninitialized_sub': Directory not empty
Switched to branch 'master'
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to branch 'add_sub1'
Your branch is up to date with 'origin/add_sub1'.
ok 7 - git checkout --recurse-submodules: added submodule is checked out
expecting success:
prolog &&
reset_work_tree_to_interested 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_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to branch 'add_sub1'
Your branch is up to date with 'origin/add_sub1'.
ok 8 - git checkout --recurse-submodules: added submodule is checked out in empty dir
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git -C sub1 checkout -b keep_branch &&
git -C sub1 rev-parse HEAD >expect &&
git branch -t modify_sub1 origin/modify_sub1 &&
$command modify_sub1 &&
test_superproject_content origin/modify_sub1 &&
test_submodule_content sub1 origin/modify_sub1 &&
git -C sub1 rev-parse keep_branch >actual &&
test_cmp expect actual &&
test_must_fail git -C sub1 symbolic-ref HEAD
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Switched to a new branch 'keep_branch'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Switched to branch 'modify_sub1'
Your branch is up to date with 'origin/modify_sub1'.
fatal: ref HEAD is not a symbolic ref
ok 9 - git checkout --recurse-submodules: submodule branch is not changed, detach HEAD instead
expecting success:
prolog &&
reset_work_tree_to_interested 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_submodule_content sub1 origin/replace_file_with_sub1
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Switched to branch 'replace_file_with_sub1'
Your branch is up to date with 'origin/replace_file_with_sub1'.
ok 10 - git checkout --recurse-submodules: replace tracked file with submodule checks out submodule
expecting success:
prolog &&
reset_work_tree_to_interested 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_submodule_content sub1 origin/replace_directory_with_sub1
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Switched to branch 'replace_directory_with_sub1'
Your branch is up to date with 'origin/replace_directory_with_sub1'.
ok 11 - git checkout --recurse-submodules: replace directory with submodule
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t remove_sub1 origin/remove_sub1 &&
$command remove_sub1 &&
test_superproject_content origin/remove_sub1 &&
! test -e sub1 &&
test_must_fail git config -f .git/modules/sub1/config core.worktree
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Switched to branch 'remove_sub1'
Your branch is up to date with 'origin/remove_sub1'.
ok 12 - git checkout --recurse-submodules: removed submodule removes submodules working tree
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t remove_sub1 origin/remove_sub1 &&
replace_gitfile_with_git_dir sub1 &&
rm -rf .git/modules &&
$command remove_sub1 &&
test_superproject_content origin/remove_sub1 &&
! test -e sub1 &&
test_git_directory_exists sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Migrating git directory of 'sub1' from
'/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1/.git' to
'/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/.git/modules/sub1'
Switched to branch 'remove_sub1'
Your branch is up to date with 'origin/remove_sub1'.
ok 13 - git checkout --recurse-submodules: removed submodule absorbs submodules .git directory
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_file origin/replace_sub1_with_file &&
$command replace_sub1_with_file &&
test_superproject_content origin/replace_sub1_with_file &&
test -f sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Switched to branch 'replace_sub1_with_file'
Your branch is up to date with 'origin/replace_sub1_with_file'.
ok 14 - git checkout --recurse-submodules: replace submodule with a file
checking known breakage:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_file origin/replace_sub1_with_file &&
: >sub1/untrackedfile &&
test_must_fail $command replace_sub1_with_file &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1 &&
test -f sub1/untracked_file
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Switched to branch 'replace_sub1_with_file'
Your branch is up to date with 'origin/replace_sub1_with_file'.
test_must_fail: command succeeded: git checkout --recurse-submodules replace_sub1_with_file
not ok 15 - git checkout --recurse-submodules: replace submodule with a file must fail with untracked files # TODO known breakage
expecting success:
prolog &&
reset_work_tree_to_interested 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/modify_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Switched to branch 'modify_sub1'
Your branch is up to date with 'origin/modify_sub1'.
ok 16 - git checkout --recurse-submodules: modified submodule updates submodule work tree
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t invalid_sub1 origin/invalid_sub1 &&
test_must_fail $command invalid_sub1 2>err &&
test_i18ngrep sub1 err &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: Submodule 'sub1' could not be updated.
sub1
ok 17 - git checkout --recurse-submodules: updating to a missing submodule commit fails
expecting success:
prolog &&
reset_work_tree_to_interested 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
error: The following untracked working tree files would be overwritten by checkout:
sub1
Please move or remove them before you switch branches.
Aborting
ok 18 - git checkout --recurse-submodules: added submodule doesn't remove untracked file with same name
expecting success:
test_when_finished "rm submodule_update/.git/info/exclude" &&
prolog &&
reset_work_tree_to_interested no_submodule &&
(
cd submodule_update &&
git branch -t add_sub1 origin/add_sub1 &&
: >sub1 &&
echo sub1 >.git/info/exclude &&
$command add_sub1 &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to branch 'add_sub1'
Your branch is up to date with 'origin/add_sub1'.
ok 19 - git checkout --recurse-submodules: added submodule removes an untracked ignored file
checking known breakage:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_directory origin/replace_sub1_with_directory &&
$command replace_sub1_with_directory &&
test_superproject_content origin/replace_sub1_with_directory &&
test_submodule_content sub1 origin/replace_sub1_with_directory
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: The following untracked working tree files would be overwritten by checkout:
sub1/file1
sub1/file2
Please move or remove them before you switch branches.
Aborting
not ok 20 - git checkout --recurse-submodules: replace submodule with a directory # TODO known breakage
checking known breakage:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_directory origin/replace_sub1_with_directory &&
replace_gitfile_with_git_dir sub1 &&
rm -rf .git/modules &&
$command replace_sub1_with_directory &&
test_superproject_content origin/replace_sub1_with_directory &&
test_git_directory_exists sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: The following untracked working tree files would be overwritten by checkout:
sub1/file1
sub1/file2
Please move or remove them before you switch branches.
Aborting
not ok 21 - git checkout --recurse-submodules: replace submodule containing a .git directory with a directory must absorb the git dir # TODO known breakage
expecting success:
test_when_finished "rm submodule_update/.git/modules/sub1/info/exclude" &&
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_file origin/replace_sub1_with_file &&
echo ignored >.git/modules/sub1/info/exclude &&
: >sub1/ignored &&
$command replace_sub1_with_file &&
test_superproject_content origin/replace_sub1_with_file &&
test -f sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Switched to branch 'replace_sub1_with_file'
Your branch is up to date with 'origin/replace_sub1_with_file'.
ok 22 - git checkout --recurse-submodules: replace submodule with a file works ignores ignored files in submodule
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t modify_sub1 origin/modify_sub1 &&
git -c submodule.recurse=true $cmd_args modify_sub1 &&
test_superproject_content origin/modify_sub1 &&
test_submodule_content sub1 origin/modify_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Switched to branch 'modify_sub1'
Your branch is up to date with 'origin/modify_sub1'.
ok 23 - git -c submodule.recurse=true checkout: modified submodule updates submodule work tree
expecting success:
prolog &&
reset_work_tree_to_interested add_nested_sub &&
(
cd submodule_update &&
git branch -t modify_sub1_recursively origin/modify_sub1_recursively &&
$command modify_sub1_recursively &&
test_superproject_content origin/modify_sub1_recursively &&
test_submodule_content sub1 origin/modify_sub1_recursively &&
test_submodule_content -C sub1 sub2 origin/modify_sub1_recursively
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_nested_sub'
Branch 'add_nested_sub' set up to track remote branch 'add_nested_sub' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '50491a1d91d7be663c2f0e01632adafaa8ad1784'
Submodule 'sub2' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub2) registered for path 'sub1/sub2'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1/sub2'...
done.
Submodule path 'sub1/sub2': checked out 'f2c1bb97d8342b3950c464bac1b708b05cb363c0'
Branch 'modify_sub1_recursively' set up to track remote branch 'modify_sub1_recursively' from 'origin'.
Switched to branch 'modify_sub1_recursively'
Your branch is up to date with 'origin/modify_sub1_recursively'.
ok 24 - git checkout --recurse-submodules: modified submodule updates submodule recursively
expecting success:
prolog &&
reset_work_tree_to_interested no_submodule &&
(
cd submodule_update &&
git branch -t add_sub1 origin/add_sub1 &&
$command add_sub1 &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to branch 'add_sub1'
Your branch is up to date with 'origin/add_sub1'.
ok 25 - git checkout -f --recurse-submodules: added submodule is checked out
expecting success:
prolog &&
reset_work_tree_to_interested 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_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to branch 'add_sub1'
Your branch is up to date with 'origin/add_sub1'.
ok 26 - git checkout -f --recurse-submodules: added submodule is checked out in empty dir
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git -C sub1 checkout -b keep_branch &&
git -C sub1 rev-parse HEAD >expect &&
git branch -t modify_sub1 origin/modify_sub1 &&
$command modify_sub1 &&
test_superproject_content origin/modify_sub1 &&
test_submodule_content sub1 origin/modify_sub1 &&
git -C sub1 rev-parse keep_branch >actual &&
test_cmp expect actual &&
test_must_fail git -C sub1 symbolic-ref HEAD
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Switched to a new branch 'keep_branch'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Switched to branch 'modify_sub1'
Your branch is up to date with 'origin/modify_sub1'.
fatal: ref HEAD is not a symbolic ref
ok 27 - git checkout -f --recurse-submodules: submodule branch is not changed, detach HEAD instead
expecting success:
prolog &&
reset_work_tree_to_interested 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_submodule_content sub1 origin/replace_file_with_sub1
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Switched to branch 'replace_file_with_sub1'
Your branch is up to date with 'origin/replace_file_with_sub1'.
ok 28 - git checkout -f --recurse-submodules: replace tracked file with submodule checks out submodule
expecting success:
prolog &&
reset_work_tree_to_interested 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_submodule_content sub1 origin/replace_directory_with_sub1
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Switched to branch 'replace_directory_with_sub1'
Your branch is up to date with 'origin/replace_directory_with_sub1'.
ok 29 - git checkout -f --recurse-submodules: replace directory with submodule
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t remove_sub1 origin/remove_sub1 &&
$command remove_sub1 &&
test_superproject_content origin/remove_sub1 &&
! test -e sub1 &&
test_must_fail git config -f .git/modules/sub1/config core.worktree
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Switched to branch 'remove_sub1'
Your branch is up to date with 'origin/remove_sub1'.
ok 30 - git checkout -f --recurse-submodules: removed submodule removes submodules working tree
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t remove_sub1 origin/remove_sub1 &&
replace_gitfile_with_git_dir sub1 &&
rm -rf .git/modules &&
$command remove_sub1 &&
test_superproject_content origin/remove_sub1 &&
! test -e sub1 &&
test_git_directory_exists sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Migrating git directory of 'sub1' from
'/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1/.git' to
'/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/.git/modules/sub1'
Switched to branch 'remove_sub1'
Your branch is up to date with 'origin/remove_sub1'.
ok 31 - git checkout -f --recurse-submodules: removed submodule absorbs submodules .git directory
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_file origin/replace_sub1_with_file &&
$command replace_sub1_with_file &&
test_superproject_content origin/replace_sub1_with_file &&
test -f sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Switched to branch 'replace_sub1_with_file'
Your branch is up to date with 'origin/replace_sub1_with_file'.
ok 32 - git checkout -f --recurse-submodules: replace submodule with a file
checking known breakage:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_file origin/replace_sub1_with_file &&
: >sub1/untrackedfile &&
test_must_fail $command replace_sub1_with_file &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1 &&
test -f sub1/untracked_file
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Switched to branch 'replace_sub1_with_file'
Your branch is up to date with 'origin/replace_sub1_with_file'.
test_must_fail: command succeeded: git checkout -f --recurse-submodules replace_sub1_with_file
not ok 33 - git checkout -f --recurse-submodules: replace submodule with a file must fail with untracked files # TODO known breakage
expecting success:
prolog &&
reset_work_tree_to_interested 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/modify_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Switched to branch 'modify_sub1'
Your branch is up to date with 'origin/modify_sub1'.
ok 34 - git checkout -f --recurse-submodules: modified submodule updates submodule work tree
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t invalid_sub1 origin/invalid_sub1 &&
test_must_fail $command invalid_sub1 2>err &&
test_i18ngrep sub1 err &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: Submodule 'sub1' could not be updated.
error: Submodule 'sub1' cannot checkout new HEAD.
ok 35 - git checkout -f --recurse-submodules: updating to a missing submodule commit fails
expecting success:
prolog &&
reset_work_tree_to_interested no_submodule &&
(
cd submodule_update &&
git branch -t add_sub1 origin/add_sub1 &&
>sub1 &&
$command add_sub1 &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to branch 'add_sub1'
Your branch is up to date with 'origin/add_sub1'.
ok 36 - git checkout -f --recurse-submodules: added submodule does remove untracked unignored file with same name when forced
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_directory origin/replace_sub1_with_directory &&
$command replace_sub1_with_directory &&
test_superproject_content origin/replace_sub1_with_directory
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Switched to branch 'replace_sub1_with_directory'
Your branch is up to date with 'origin/replace_sub1_with_directory'.
ok 37 - git checkout -f --recurse-submodules: replace submodule with a directory
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_directory origin/replace_sub1_with_directory &&
replace_gitfile_with_git_dir sub1 &&
rm -rf .git/modules/sub1 &&
$command replace_sub1_with_directory &&
test_superproject_content origin/replace_sub1_with_directory &&
test_git_directory_exists sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Migrating git directory of 'sub1' from
'/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1/.git' to
'/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/.git/modules/sub1'
Switched to branch 'replace_sub1_with_directory'
Your branch is up to date with 'origin/replace_sub1_with_directory'.
ok 38 - git checkout -f --recurse-submodules: replace submodule containing a .git directory with a directory must fail
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t replace_sub1_with_file origin/replace_sub1_with_file &&
: >sub1/expect &&
$command replace_sub1_with_file &&
test_superproject_content origin/replace_sub1_with_file
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Switched to branch 'replace_sub1_with_file'
Your branch is up to date with 'origin/replace_sub1_with_file'.
ok 39 - git checkout -f --recurse-submodules: replace submodule with a file ignoring ignored files
expecting success:
prolog &&
reset_work_tree_to_interested invalid_sub1 &&
(
cd submodule_update &&
git branch -t valid_sub1 origin/valid_sub1 &&
$command valid_sub1 &&
test_superproject_content origin/valid_sub1 &&
test_submodule_content sub1 origin/valid_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Switched to branch 'valid_sub1'
Your branch is up to date with 'origin/valid_sub1'.
ok 40 - git checkout -f --recurse-submodules: modified submodule does update submodule work tree from invalid commit
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
git branch -t modify_sub1 origin/modify_sub1 &&
echo "gitdir: bogus/path" >sub1/.git &&
$command modify_sub1 &&
test_superproject_content origin/modify_sub1 &&
test_submodule_content sub1 origin/modify_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Switched to branch 'modify_sub1'
Your branch is up to date with 'origin/modify_sub1'.
ok 41 - git checkout -f --recurse-submodules: updating submodules fixes .git links
expecting success:
prolog &&
reset_work_tree_to_interested add_sub1 &&
(
cd submodule_update &&
rm sub1/file1 &&
: >sub1/new_file &&
git -C sub1 add new_file &&
$command HEAD &&
test_path_is_file sub1/file1 &&
test_path_is_missing sub1/new_file
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Your branch is up to date with 'origin/add_sub1'.
ok 42 - git checkout -f --recurse-submodules: changed submodule worktree is reset
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to branch 'add_sub1'
Your branch is up to date with 'origin/add_sub1'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Submodule path 'uninitialized_sub': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
ok 43 - git checkout: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to branch 'add_sub1'
Your branch is up to date with 'origin/add_sub1'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Submodule path 'uninitialized_sub': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
ok 44 - git checkout: added submodule leaves existing empty directory alone
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
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Switched to branch 'replace_file_with_sub1'
Your branch is up to date with 'origin/replace_file_with_sub1'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Submodule path 'uninitialized_sub': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
ok 45 - git checkout: 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
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Switched to branch 'replace_directory_with_sub1'
Your branch is up to date with 'origin/replace_directory_with_sub1'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Submodule path 'uninitialized_sub': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
ok 46 - git checkout: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Switched to branch 'remove_sub1'
Your branch is up to date with 'origin/remove_sub1'.
ok 47 - git checkout: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Switched to branch 'remove_sub1'
Your branch is up to date with 'origin/remove_sub1'.
ok 48 - git checkout: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: The following untracked working tree files would be overwritten by checkout:
sub1/file1
sub1/file2
Please move or remove them before you switch branches.
Aborting
ok 49 - git checkout: replace submodule with a directory must fail
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: The following untracked working tree files would be overwritten by checkout:
sub1/file1
sub1/file2
Please move or remove them before you switch branches.
Aborting
ok 50 - git checkout: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Switched to branch 'replace_sub1_with_file'
Your branch is up to date with 'origin/replace_sub1_with_file'.
test_must_fail: command succeeded: git checkout replace_sub1_with_file
not ok 51 - git checkout: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Switched to branch 'replace_sub1_with_file'
Your branch is up to date with 'origin/replace_sub1_with_file'.
test_must_fail: command succeeded: git checkout replace_sub1_with_file
not ok 52 - git checkout: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Switched to branch 'modify_sub1'
Your branch is up to date with 'origin/modify_sub1'.
Submodule path 'sub1': checked out 'e6d8148a306c904a34344fac267f4613e698d228'
ok 53 - git checkout: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
Switched to branch 'invalid_sub1'
Your branch is up to date with 'origin/invalid_sub1'.
error: Server does not allow request for unadvertised object 0123456789012345678901234567890123456789
Fetched in submodule path 'sub1', but it did not contain 0123456789012345678901234567890123456789. Direct fetching of that commit failed.
ok 54 - git checkout: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Switched to branch 'valid_sub1'
Your branch is up to date with 'origin/valid_sub1'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Submodule path 'uninitialized_sub': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
ok 55 - git checkout: 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 &&
>sub1 &&
test_must_fail $command add_sub1 &&
test_superproject_content origin/no_submodule &&
test_must_be_empty sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
error: The following untracked working tree files would be overwritten by checkout:
sub1
Please move or remove them before you switch branches.
Aborting
ok 56 - git checkout: added submodule doesn't remove untracked unignored file with same name
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to branch 'add_sub1'
Your branch is up to date with 'origin/add_sub1'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Submodule path 'uninitialized_sub': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
ok 57 - git checkout -f: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to branch 'add_sub1'
Your branch is up to date with 'origin/add_sub1'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Submodule path 'uninitialized_sub': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
ok 58 - git checkout -f: added submodule leaves existing empty directory alone
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
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Switched to branch 'replace_file_with_sub1'
Your branch is up to date with 'origin/replace_file_with_sub1'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Submodule path 'uninitialized_sub': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
ok 59 - git checkout -f: 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
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Switched to branch 'replace_directory_with_sub1'
Your branch is up to date with 'origin/replace_directory_with_sub1'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Submodule path 'uninitialized_sub': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
ok 60 - git checkout -f: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Switched to branch 'remove_sub1'
Your branch is up to date with 'origin/remove_sub1'.
ok 61 - git checkout -f: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Switched to branch 'remove_sub1'
Your branch is up to date with 'origin/remove_sub1'.
ok 62 - git checkout -f: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Switched to branch 'replace_sub1_with_directory'
Your branch is up to date with 'origin/replace_sub1_with_directory'.
test_must_fail: command succeeded: git checkout -f replace_sub1_with_directory
not ok 63 - git checkout -f: replace submodule with a directory must fail # TODO known breakage
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 &&
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Switched to branch 'replace_sub1_with_directory'
Your branch is up to date with 'origin/replace_sub1_with_directory'.
test_must_fail: command succeeded: git checkout -f replace_sub1_with_directory
not ok 64 - git checkout -f: replace submodule containing a .git directory with a directory 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 &&
test_must_fail $command replace_sub1_with_file &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Switched to branch 'replace_sub1_with_file'
Your branch is up to date with 'origin/replace_sub1_with_file'.
test_must_fail: command succeeded: git checkout -f replace_sub1_with_file
not ok 65 - git checkout -f: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Switched to branch 'replace_sub1_with_file'
Your branch is up to date with 'origin/replace_sub1_with_file'.
test_must_fail: command succeeded: git checkout -f replace_sub1_with_file
not ok 66 - git checkout -f: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Switched to branch 'modify_sub1'
Your branch is up to date with 'origin/modify_sub1'.
Submodule path 'sub1': checked out 'e6d8148a306c904a34344fac267f4613e698d228'
ok 67 - git checkout -f: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
Switched to branch 'invalid_sub1'
Your branch is up to date with 'origin/invalid_sub1'.
error: Server does not allow request for unadvertised object 0123456789012345678901234567890123456789
Fetched in submodule path 'sub1', but it did not contain 0123456789012345678901234567890123456789. Direct fetching of that commit failed.
ok 68 - git checkout -f: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Switched to branch 'valid_sub1'
Your branch is up to date with 'origin/valid_sub1'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t2013-checkout-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
Submodule path 'uninitialized_sub': checked out 'f401f36f47a708c55a44c7f28d8948e9f8abac9f'
ok 69 - git checkout -f: 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 &&
>sub1 &&
$command add_sub1 &&
test_superproject_content origin/add_sub1 &&
test_dir_is_empty sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to branch 'add_sub1'
Your branch is up to date with 'origin/add_sub1'.
ok 70 - git checkout -f: added submodule does remove untracked unignored file with same name when forced
# still have 10 known breakage(s)
# passed all remaining 60 test(s)
1..70
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3304-notes-mixed.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3304-notes-mixed/.git/
expecting success:
test_tick &&
cat <<INPUT_END >input &&
commit refs/heads/master
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
commit #1
COMMIT
M 644 inline file
data <<EOF
file in commit #1
EOF
INPUT_END
test_tick &&
cat <<INPUT_END >>input &&
commit refs/heads/master
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
commit #2
COMMIT
M 644 inline file
data <<EOF
file in commit #2
EOF
INPUT_END
git fast-import --quiet <input
ok 1 - setup: create a couple of commits
expecting success:
commit1=$(git rev-parse refs/heads/master^) &&
commit2=$(git rev-parse refs/heads/master) &&
test_tick &&
cat <<INPUT_END >input &&
commit refs/notes/commits
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
notes commit #1
COMMIT
N inline $commit1
data <<EOF
note for commit #1
EOF
N inline $commit2
data <<EOF
note for commit #2
EOF
INPUT_END
test_tick &&
cat <<INPUT_END >>input &&
commit refs/notes/commits
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
notes commit #2
COMMIT
M 644 inline foobar/non-note.txt
data <<EOF
A non-note in a notes tree
EOF
N inline $commit2
data <<EOF
edited note for commit #2
EOF
INPUT_END
test_tick &&
cat <<INPUT_END >>input &&
commit refs/notes/commits
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
notes commit #3
COMMIT
N inline $commit1
data <<EOF
edited note for commit #1
EOF
M 644 inline deadbeef
data <<EOF
non-note with SHA1-like name
EOF
M 644 inline de/adbeef
data <<EOF
another non-note with SHA1-like name
EOF
M 644 inline de/adbeefdeadbeefdeadbeefdeadbeefdeadbeef
data <<EOF
This is actually a valid note, albeit to a non-existing object.
It is needed in order to trigger the "mishandling" of the dead/beef non-note.
EOF
M 644 inline dead/beef
data <<EOF
yet another non-note with SHA1-like name
EOF
INPUT_END
git fast-import --quiet <input &&
git config core.notesRef refs/notes/commits
ok 2 - create a notes tree with both notes and non-notes
expecting success:
git log | grep "^ " > actual &&
test_cmp expect actual
ok 3 - verify contents of notes
expecting success:
git cat-file -p refs/notes/commits:foobar/non-note.txt > actual_nn1 &&
test_cmp expect_nn1 actual_nn1 &&
git cat-file -p refs/notes/commits:deadbeef > actual_nn2 &&
test_cmp expect_nn2 actual_nn2 &&
git cat-file -p refs/notes/commits:de/adbeef > actual_nn3 &&
test_cmp expect_nn3 actual_nn3 &&
git cat-file -p refs/notes/commits:dead/beef > actual_nn4 &&
test_cmp expect_nn4 actual_nn4
ok 4 - verify contents of non-notes
expecting success:
test_tick &&
git notes add -f -m "foo bar"
Overwriting existing notes for object 5f8b8322f6a2c6d36eb6d42312d2393900ab7b81
ok 5 - git-notes preserves non-notes
expecting success:
git cat-file -p refs/notes/commits:foobar/non-note.txt > actual_nn1 &&
test_cmp expect_nn1 actual_nn1 &&
git cat-file -p refs/notes/commits:deadbeef > actual_nn2 &&
test_cmp expect_nn2 actual_nn2 &&
git cat-file -p refs/notes/commits:de/adbeef > actual_nn3 &&
test_cmp expect_nn3 actual_nn3 &&
git cat-file -p refs/notes/commits:dead/beef > actual_nn4 &&
test_cmp expect_nn4 actual_nn4
ok 6 - verify contents of non-notes after git-notes
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3301-notes.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3301-notes/.git/
expecting success:
test_must_fail env MSG=3 git notes add
fatal: failed to resolve 'HEAD' as a valid ref.
ok 1 - cannot annotate non-existing HEAD
expecting success:
test_commit 1st &&
test_commit 2nd
[master (root-commit) 04ed9a0] 1st
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1st.t
[master 7a4ca6e] 2nd
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2nd.t
ok 2 - setup
expecting success:
test_must_fail env MSG=1 GIT_NOTES_REF=/ git notes show &&
test_must_fail env MSG=2 GIT_NOTES_REF=/ git notes show
fatal: refusing to show notes in / (outside of refs/notes/)
fatal: refusing to show notes in / (outside of refs/notes/)
ok 3 - need valid notes ref
expecting success:
test_must_fail env MSG=1 GIT_NOTES_REF=refs/heads/bogus git notes add
fatal: refusing to add notes in refs/heads/bogus (outside of refs/notes/)
ok 4 - refusing to add notes in refs/heads/
expecting success:
test_must_fail env MSG=1 GIT_NOTES_REF=refs/heads/bogus git notes edit
fatal: refusing to edit notes in refs/heads/bogus (outside of refs/notes/)
ok 5 - refusing to edit notes in refs/remotes/
expecting success:
test_expect_code 1 git notes show
error: no note found for object 7a4ca6ee52a974a66cbaa78e33214535dff1d691.
ok 6 - handle empty notes gracefully
expecting success:
test_write_lines A B >expect &&
git show -s --format="A%n%NB" >actual &&
test_cmp expect actual
ok 7 - show non-existent notes entry with %N
expecting success:
MSG=b4 git notes add &&
test_path_is_missing .git/NOTES_EDITMSG &&
git ls-tree -r refs/notes/commits >actual &&
test_line_count = 1 actual &&
test "b4" = "$(git notes show)" &&
git show HEAD^ &&
test_must_fail git notes show HEAD^
b4
commit 04ed9a0bbe0285f41c913e2002cb09ef8449d4a6
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1st
diff --git a/1st.t b/1st.t
new file mode 100644
index 0000000..2a5d015
--- /dev/null
+++ b/1st.t
@@ -0,0 +1 @@
+1st
error: no note found for object 04ed9a0bbe0285f41c913e2002cb09ef8449d4a6.
ok 8 - create notes
expecting success:
test_write_lines A b4 B >expect &&
git show -s --format="A%n%NB" >actual &&
test_cmp expect actual
ok 9 - show notes entry with %N
expecting success:
cat <<-EOF >expect &&
a1d8fa6 refs/notes/commits@{0}: notes: Notes added by 'git notes add'
EOF
git reflog show refs/notes/commits >actual &&
test_cmp expect actual
ok 10 - create reflog entry
expecting success:
MSG=b3 git notes edit &&
test_path_is_missing .git/NOTES_EDITMSG &&
git ls-tree -r refs/notes/commits >actual &&
test_line_count = 1 actual &&
test "b3" = "$(git notes show)" &&
git show HEAD^ &&
test_must_fail git notes show HEAD^
b3
commit 04ed9a0bbe0285f41c913e2002cb09ef8449d4a6
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1st
diff --git a/1st.t b/1st.t
new file mode 100644
index 0000000..2a5d015
--- /dev/null
+++ b/1st.t
@@ -0,0 +1 @@
+1st
error: no note found for object 04ed9a0bbe0285f41c913e2002cb09ef8449d4a6.
ok 11 - edit existing notes
expecting success:
test "b3" = "$(git notes --ref commits^{tree} show)" &&
test "b4" = "$(git notes --ref commits@{1} show)"
ok 12 - show notes from treeish
expecting success:
test_must_fail git notes --ref commits^{tree} edit &&
test_must_fail git notes --ref commits@{1} edit
fatal: Cannot use notes ref refs/notes/commits^{tree}
fatal: Cannot use notes ref refs/notes/commits@{1}
ok 13 - cannot edit notes from non-ref
expecting success:
test_must_fail git notes add -m "b2" &&
test_path_is_missing .git/NOTES_EDITMSG &&
git ls-tree -r refs/notes/commits >actual &&
test_line_count = 1 actual &&
test "b3" = "$(git notes show)" &&
git show HEAD^ &&
test_must_fail git notes show HEAD^
error: Cannot add notes. Found existing notes for object 7a4ca6ee52a974a66cbaa78e33214535dff1d691. Use '-f' to overwrite existing notes
commit 04ed9a0bbe0285f41c913e2002cb09ef8449d4a6
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1st
diff --git a/1st.t b/1st.t
new file mode 100644
index 0000000..2a5d015
--- /dev/null
+++ b/1st.t
@@ -0,0 +1 @@
+1st
error: no note found for object 04ed9a0bbe0285f41c913e2002cb09ef8449d4a6.
ok 14 - cannot "git notes add -m" where notes already exists
expecting success:
git notes add -f -m "b1" &&
test_path_is_missing .git/NOTES_EDITMSG &&
git ls-tree -r refs/notes/commits >actual &&
test_line_count = 1 actual &&
test "b1" = "$(git notes show)" &&
git show HEAD^ &&
test_must_fail git notes show HEAD^
Overwriting existing notes for object 7a4ca6ee52a974a66cbaa78e33214535dff1d691
commit 04ed9a0bbe0285f41c913e2002cb09ef8449d4a6
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1st
diff --git a/1st.t b/1st.t
new file mode 100644
index 0000000..2a5d015
--- /dev/null
+++ b/1st.t
@@ -0,0 +1 @@
+1st
error: no note found for object 04ed9a0bbe0285f41c913e2002cb09ef8449d4a6.
ok 15 - can overwrite existing note with "git notes add -f -m"
expecting success:
MSG=b2 git notes add &&
test_path_is_missing .git/NOTES_EDITMSG &&
git ls-tree -r refs/notes/commits >actual &&
test_line_count = 1 actual &&
test "b2" = "$(git notes show)" &&
git show HEAD^ &&
test_must_fail git notes show HEAD^
b2
commit 04ed9a0bbe0285f41c913e2002cb09ef8449d4a6
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1st
diff --git a/1st.t b/1st.t
new file mode 100644
index 0000000..2a5d015
--- /dev/null
+++ b/1st.t
@@ -0,0 +1 @@
+1st
error: no note found for object 04ed9a0bbe0285f41c913e2002cb09ef8449d4a6.
ok 16 - add w/no options on existing note morphs into edit
expecting success:
MSG=b1 git notes add -f &&
test_path_is_missing .git/NOTES_EDITMSG &&
git ls-tree -r refs/notes/commits >actual &&
test_line_count = 1 actual &&
test "b1" = "$(git notes show)" &&
git show HEAD^ &&
test_must_fail git notes show HEAD^
Overwriting existing notes for object 7a4ca6ee52a974a66cbaa78e33214535dff1d691
b1
commit 04ed9a0bbe0285f41c913e2002cb09ef8449d4a6
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1st
diff --git a/1st.t b/1st.t
new file mode 100644
index 0000000..2a5d015
--- /dev/null
+++ b/1st.t
@@ -0,0 +1 @@
+1st
error: no note found for object 04ed9a0bbe0285f41c913e2002cb09ef8449d4a6.
ok 17 - can overwrite existing note with "git notes add -f"
expecting success:
cat >expect <<-EOF &&
commit 7a4ca6ee52a974a66cbaa78e33214535dff1d691
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
${indent}2nd
Notes:
${indent}b1
EOF
! (git cat-file commit HEAD | grep b1) &&
git log -1 >actual &&
test_cmp expect actual
ok 18 - show notes
expecting success:
test_commit 3rd &&
MSG="b3${LF}c3c3c3c3${LF}d3d3d3" git notes add &&
cat >expect-multiline <<-EOF &&
commit d07d62e5208f22eb5695e7eb47667dc8b9860290
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
${indent}3rd
Notes:
${indent}b3
${indent}c3c3c3c3
${indent}d3d3d3
EOF
cat expect >>expect-multiline &&
git log -2 >actual &&
test_cmp expect-multiline actual
[master d07d62e] 3rd
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 3rd.t
b3
c3c3c3c3
d3d3d3
ok 19 - show multi-line notes
expecting success:
test_commit 4th &&
echo "xyzzy" >note5 &&
git notes add -F note5 &&
cat >expect-F <<-EOF &&
commit 0f7aa3ec6325aeb88b910453bb3eb37c49d75c11
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
${indent}4th
Notes:
${indent}xyzzy
EOF
cat expect-multiline >>expect-F &&
git log -3 >actual &&
test_cmp expect-F actual
[master 0f7aa3e] 4th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 4th.t
ok 20 - show -F notes
expecting success:
echo "zyxxy" >note5 &&
test_must_fail git notes add -F note5 &&
git log -3 >actual &&
test_cmp expect-F actual
error: Cannot add notes. Found existing notes for object 0f7aa3ec6325aeb88b910453bb3eb37c49d75c11. Use '-f' to overwrite existing notes
ok 21 - Re-adding -F notes without -f fails
expecting success:
cat >expect <<-EOF &&
commit 0f7aa3ec6325aeb88b910453bb3eb37c49d75c11
tree 05ac65288c4c4b3b709a020ae94b2ece2f2201ae
parent d07d62e5208f22eb5695e7eb47667dc8b9860290
author A U Thor <author@example.com> 1112912173 -0700
committer C O Mitter <committer@example.com> 1112912173 -0700
${indent}4th
EOF
git log -1 --pretty=raw >actual &&
test_cmp expect actual
ok 22 - git log --pretty=raw does not show notes
expecting success:
cat >>expect <<-EOF &&
Notes:
${indent}xyzzy
EOF
git log -1 --pretty=raw --show-notes >actual &&
test_cmp expect actual
ok 23 - git log --show-notes
expecting success:
git log -1 --no-notes >actual &&
! grep xyzzy actual
ok 24 - git log --no-notes
expecting success:
git format-patch -1 --stdout >actual &&
! grep xyzzy actual
ok 25 - git format-patch does not show notes
expecting success:
git format-patch --show-notes -1 --stdout >actual &&
grep xyzzy actual
xyzzy
ok 26 - git format-patch --show-notes does show notes
expecting success:
git show $p >actual &&
eval "$negate grep xyzzy actual"
xyzzy
ok 27 - git show does show notes
expecting success:
git show $p >actual &&
eval "$negate grep xyzzy actual"
ok 28 - git show --pretty does not show notes
expecting success:
git show $p >actual &&
eval "$negate grep xyzzy actual"
ok 29 - git show --pretty=raw does not show notes
expecting success:
git show $p >actual &&
eval "$negate grep xyzzy actual"
ok 30 - git show --pretty=short does not show notes
expecting success:
git show $p >actual &&
eval "$negate grep xyzzy actual"
ok 31 - git show --pretty=medium does not show notes
expecting success:
git show $p >actual &&
eval "$negate grep xyzzy actual"
ok 32 - git show --pretty=full does not show notes
expecting success:
git show $p >actual &&
eval "$negate grep xyzzy actual"
ok 33 - git show --pretty=fuller does not show notes
expecting success:
git show $p >actual &&
eval "$negate grep xyzzy actual"
ok 34 - git show --pretty=format:%s does not show notes
expecting success:
git show $p >actual &&
eval "$negate grep xyzzy actual"
ok 35 - git show --oneline does not show notes
expecting success:
git notes --ref=alternate add -m alternate
ok 36 - setup alternate notes ref
expecting success:
git log -1 --notes >actual &&
grep xyzzy actual &&
! grep alternate actual
xyzzy
ok 37 - git log --notes shows default notes
expecting success:
git log -1 --notes=alternate >actual &&
! grep xyzzy actual &&
grep alternate actual
Notes (alternate):
alternate
ok 38 - git log --notes=X shows only X
expecting success:
git log -1 --notes --notes=alternate >actual &&
grep xyzzy actual &&
grep alternate actual
xyzzy
Notes (alternate):
alternate
ok 39 - git log --notes --notes=X shows both
expecting success:
git log -1 --notes --notes=alternate \
--no-notes --notes=alternate \
>actual &&
! grep xyzzy actual &&
grep alternate actual
Notes (alternate):
alternate
ok 40 - git log --no-notes resets default state
expecting success:
git log -1 --notes --notes=alternate \
--no-notes --notes \
>actual &&
grep xyzzy actual &&
! grep alternate actual
xyzzy
ok 41 - git log --no-notes resets ref list
expecting success:
test_commit 5th &&
git notes add -m spam -m "foo${LF}bar${LF}baz" &&
cat >expect-m <<-EOF &&
commit 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
${indent}5th
Notes:
${indent}spam
${indent}
${indent}foo
${indent}bar
${indent}baz
EOF
cat expect-F >>expect-m &&
git log -4 >actual &&
test_cmp expect-m actual
[master 7f9ad88] 5th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 5th.t
ok 42 - show -m notes
expecting success:
git notes add -f -F /dev/null &&
cat >expect-rm-F <<-EOF &&
commit 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
${indent}5th
EOF
cat expect-F >>expect-rm-F &&
git log -4 >actual &&
test_cmp expect-rm-F actual &&
test_must_fail git notes show
Overwriting existing notes for object 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
Removing note for object 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
error: no note found for object 7f9ad8836c775acb134c0a055fc55fb4cd1ba361.
ok 43 - remove note with add -f -F /dev/null
expecting success:
git notes add -m "" &&
git log -4 >actual &&
test_cmp expect-rm-F actual &&
test_must_fail git notes show
Removing note for object 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
error: no note found for object 7f9ad8836c775acb134c0a055fc55fb4cd1ba361.
ok 44 - do not create empty note with -m ""
expecting success:
cat >expect-combine_m_and_F <<-EOF &&
foo
xyzzy
bar
zyxxy
baz
EOF
echo "xyzzy" >note_a &&
echo "zyxxy" >note_b &&
git notes add -m "foo" -F note_a -m "bar" -F note_b -m "baz" &&
git notes show >actual &&
test_cmp expect-combine_m_and_F actual
ok 45 - create note with combination of -m and -F
expecting success:
git notes remove HEAD^ &&
git notes remove &&
cat >expect-rm-remove <<-EOF &&
commit 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
${indent}5th
commit 0f7aa3ec6325aeb88b910453bb3eb37c49d75c11
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
${indent}4th
EOF
cat expect-multiline >>expect-rm-remove &&
git log -4 >actual &&
test_cmp expect-rm-remove actual &&
test_must_fail git notes show HEAD^
Removing note for object HEAD^
Removing note for object HEAD
error: no note found for object 0f7aa3ec6325aeb88b910453bb3eb37c49d75c11.
ok 46 - remove note with "git notes remove"
expecting success:
git rev-parse --verify refs/notes/commits >before_commit &&
test_must_fail git notes remove HEAD^ &&
git rev-parse --verify refs/notes/commits >after_commit &&
test_cmp before_commit after_commit
Object HEAD^ has no note
ok 47 - removing non-existing note should not create new commit
expecting success:
before=$(git rev-parse --verify refs/notes/commits) &&
test_when_finished "git update-ref refs/notes/commits $before" &&
# We have only two -- add another and make sure it stays
git notes add -m "extra" &&
git notes list HEAD >after-removal-expect &&
git notes remove HEAD^^ HEAD^^^ &&
git notes list | sed -e "s/ .*//" >actual &&
test_cmp after-removal-expect actual
Removing note for object HEAD^^
Removing note for object HEAD^^^
ok 48 - removing more than one
expecting success:
before=$(git rev-parse --verify refs/notes/commits) &&
test_when_finished "git update-ref refs/notes/commits $before" &&
test_must_fail git notes remove HEAD^^ HEAD^^^ HEAD^ &&
after=$(git rev-parse --verify refs/notes/commits) &&
test "$before" = "$after"
Removing note for object HEAD^^
Removing note for object HEAD^^^
Object HEAD^ has no note
ok 49 - removing is atomic
expecting success:
before=$(git rev-parse --verify refs/notes/commits) &&
test_when_finished "git update-ref refs/notes/commits $before" &&
# We have only two -- add another and make sure it stays
git notes add -m "extra" &&
git notes list HEAD >after-removal-expect &&
git notes remove --ignore-missing HEAD^^ HEAD^^^ HEAD^ &&
git notes list | sed -e "s/ .*//" >actual &&
test_cmp after-removal-expect actual
Removing note for object HEAD^^
Removing note for object HEAD^^^
Object HEAD^ has no note
ok 50 - removing with --ignore-missing
expecting success:
before=$(git rev-parse --verify refs/notes/commits) &&
test_when_finished "git update-ref refs/notes/commits $before" &&
test_must_fail git notes remove --ignore-missing HEAD^^ HEAD^^^ NO-SUCH-COMMIT &&
after=$(git rev-parse --verify refs/notes/commits) &&
test "$before" = "$after"
Removing note for object HEAD^^
Removing note for object HEAD^^^
error: Failed to resolve 'NO-SUCH-COMMIT' as a valid ref.
ok 51 - removing with --ignore-missing but bogus ref
expecting success:
before=$(git rev-parse --verify refs/notes/commits) &&
test_when_finished "git update-ref refs/notes/commits $before" &&
# We have only two -- add another and make sure it stays
git notes add -m "extra" &&
git notes list HEAD >after-removal-expect &&
git rev-parse HEAD^^ HEAD^^^ >input &&
git notes remove --stdin <input &&
git notes list | sed -e "s/ .*//" >actual &&
test_cmp after-removal-expect actual
Removing note for object d07d62e5208f22eb5695e7eb47667dc8b9860290
Removing note for object 7a4ca6ee52a974a66cbaa78e33214535dff1d691
ok 52 - remove reads from --stdin
expecting success:
before=$(git rev-parse --verify refs/notes/commits) &&
test_when_finished "git update-ref refs/notes/commits $before" &&
git rev-parse HEAD^^ HEAD^^^ HEAD^ >input &&
test_must_fail git notes remove --stdin <input &&
after=$(git rev-parse --verify refs/notes/commits) &&
test "$before" = "$after"
Removing note for object d07d62e5208f22eb5695e7eb47667dc8b9860290
Removing note for object 7a4ca6ee52a974a66cbaa78e33214535dff1d691
Object 0f7aa3ec6325aeb88b910453bb3eb37c49d75c11 has no note
ok 53 - remove --stdin is also atomic
expecting success:
before=$(git rev-parse --verify refs/notes/commits) &&
test_when_finished "git update-ref refs/notes/commits $before" &&
# We have only two -- add another and make sure it stays
git notes add -m "extra" &&
git notes list HEAD >after-removal-expect &&
git rev-parse HEAD^^ HEAD^^^ HEAD^ >input &&
git notes remove --ignore-missing --stdin <input &&
git notes list | sed -e "s/ .*//" >actual &&
test_cmp after-removal-expect actual
Removing note for object d07d62e5208f22eb5695e7eb47667dc8b9860290
Removing note for object 7a4ca6ee52a974a66cbaa78e33214535dff1d691
Object 0f7aa3ec6325aeb88b910453bb3eb37c49d75c11 has no note
ok 54 - removing with --stdin --ignore-missing
expecting success:
cat >expect <<-EOF &&
c9c6af7f78bc47490dbf3e822cf2f3c24d4b9061 7a4ca6ee52a974a66cbaa78e33214535dff1d691
c18dc024e14f08d18d14eea0d747ff692d66d6a3 d07d62e5208f22eb5695e7eb47667dc8b9860290
EOF
git notes list >actual &&
test_cmp expect actual
ok 55 - list notes with "git notes list"
expecting success:
git notes >actual &&
test_cmp expect actual
ok 56 - list notes with "git notes"
expecting success:
cat >expect <<-EOF &&
c18dc024e14f08d18d14eea0d747ff692d66d6a3
EOF
git notes list HEAD^^ >actual &&
test_cmp expect actual
ok 57 - list specific note with "git notes list <object>"
expecting success:
test_must_fail git notes list HEAD >actual &&
test_must_be_empty actual
error: no note found for object 7f9ad8836c775acb134c0a055fc55fb4cd1ba361.
ok 58 - listing non-existing notes fails
expecting success:
cat >expect <<-EOF &&
Initial set of notes
More notes appended with git notes append
EOF
git notes add -m "Initial set of notes" &&
git notes append -m "More notes appended with git notes append" &&
git notes show >actual &&
test_cmp expect actual
ok 59 - append to existing note with "git notes append"
expecting success:
cat >expect_list <<-EOF &&
c9c6af7f78bc47490dbf3e822cf2f3c24d4b9061 7a4ca6ee52a974a66cbaa78e33214535dff1d691
4b6ad22357cc8a1296720574b8d2fbc22fab0671 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
c18dc024e14f08d18d14eea0d747ff692d66d6a3 d07d62e5208f22eb5695e7eb47667dc8b9860290
EOF
git notes list >actual &&
test_cmp expect_list actual
ok 60 - "git notes list" does not expand to "git notes list HEAD"
expecting success:
git notes append -m "" &&
git notes show >actual &&
test_cmp expect actual
ok 61 - appending empty string does not change existing note
expecting success:
git notes remove HEAD &&
test_must_fail git notes list HEAD &&
git notes append -m "Initial set of notes${LF}${LF}More notes appended with git notes append" &&
git notes show >actual &&
test_cmp expect actual
Removing note for object HEAD
error: no note found for object 7f9ad8836c775acb134c0a055fc55fb4cd1ba361.
ok 62 - git notes append == add when there is no existing note
expecting success:
git notes remove HEAD &&
test_must_fail git notes list HEAD &&
git notes append -m "" &&
test_must_fail git notes list HEAD
Removing note for object HEAD
error: no note found for object 7f9ad8836c775acb134c0a055fc55fb4cd1ba361.
Removing note for object 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
error: no note found for object 7f9ad8836c775acb134c0a055fc55fb4cd1ba361.
ok 63 - appending empty string to non-existing note does not create note
expecting success:
test_commit 6th &&
GIT_NOTES_REF="refs/notes/other" git notes add -m "other note" &&
cat >expect-not-other <<-EOF &&
commit 2c125331118caba0ff8238b7f4958ac6e93fe39c
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:18:13 2005 -0700
${indent}6th
EOF
cp expect-not-other expect-other &&
cat >>expect-other <<-EOF
Notes (other):
${indent}other note
EOF
[master 2c12533] 6th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 6th.t
ok 64 - create other note on a different notes ref (setup)
expecting success:
git log -1 >actual &&
test_cmp expect-not-other actual
ok 65 - Do not show note on other ref by default
expecting success:
GIT_NOTES_REF="refs/notes/other" git log -1 >actual &&
test_cmp expect-other actual
ok 66 - Do show note when ref is given in GIT_NOTES_REF
expecting success:
test_config core.notesRef "refs/notes/other" &&
git log -1 >actual &&
test_cmp expect-other actual
ok 67 - Do show note when ref is given in core.notesRef config
expecting success:
test_config core.notesRef "refs/notes/other" &&
GIT_NOTES_REF="refs/notes/wrong" git log -1 >actual &&
test_cmp expect-not-other actual
ok 68 - Do not show note when core.notesRef is overridden
expecting success:
cat >expect-both <<-EOF &&
commit 2c125331118caba0ff8238b7f4958ac6e93fe39c
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:18:13 2005 -0700
${indent}6th
Notes:
${indent}order test
Notes (other):
${indent}other note
commit 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
${indent}5th
Notes:
${indent}replacement for deleted note
EOF
GIT_NOTES_REF=refs/notes/commits git notes add \
-m"replacement for deleted note" HEAD^ &&
GIT_NOTES_REF=refs/notes/commits git notes add -m"order test" &&
test_unconfig core.notesRef &&
test_config notes.displayRef "refs/notes/*" &&
git log -2 >actual &&
test_cmp expect-both actual
ok 69 - Show all notes when notes.displayRef=refs/notes/*
expecting success:
test_config core.notesRef refs/notes/commits &&
test_config notes.displayRef refs/notes/other &&
git log -2 >actual &&
test_cmp expect-both actual
ok 70 - core.notesRef is implicitly in notes.displayRef
expecting success:
test_unconfig core.notesRef &&
test_config notes.displayRef refs/notes/commits &&
git config --add notes.displayRef refs/notes/other &&
git log -2 >actual &&
test_cmp expect-both actual
ok 71 - notes.displayRef can be given more than once
expecting success:
cat >expect-both-reversed <<-EOF &&
commit 2c125331118caba0ff8238b7f4958ac6e93fe39c
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:18:13 2005 -0700
${indent}6th
Notes (other):
${indent}other note
Notes:
${indent}order test
EOF
test_config core.notesRef refs/notes/other &&
test_config notes.displayRef refs/notes/commits &&
git log -1 >actual &&
test_cmp expect-both-reversed actual
ok 72 - notes.displayRef respects order
expecting success:
GIT_NOTES_DISPLAY_REF=refs/notes/commits:refs/notes/other \
git log -2 >actual &&
test_cmp expect-both actual
ok 73 - GIT_NOTES_DISPLAY_REF works
expecting success:
cat >expect-none <<-EOF &&
commit 2c125331118caba0ff8238b7f4958ac6e93fe39c
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:18:13 2005 -0700
${indent}6th
commit 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
${indent}5th
EOF
test_config notes.displayRef "refs/notes/*" &&
GIT_NOTES_REF= GIT_NOTES_DISPLAY_REF= git log -2 >actual &&
test_cmp expect-none actual
ok 74 - GIT_NOTES_DISPLAY_REF overrides config
expecting success:
GIT_NOTES_REF= GIT_NOTES_DISPLAY_REF= git log --show-notes=* -2 >actual &&
test_cmp expect-both actual
ok 75 - --show-notes=* adds to GIT_NOTES_DISPLAY_REF
expecting success:
cat >expect-commits <<-EOF &&
commit 2c125331118caba0ff8238b7f4958ac6e93fe39c
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:18:13 2005 -0700
${indent}6th
Notes:
${indent}order test
EOF
git log --no-standard-notes --show-notes=commits -1 >actual &&
test_cmp expect-commits actual
ok 76 - --no-standard-notes
expecting success:
test_config notes.displayRef "refs/notes/*" &&
git log --no-standard-notes --show-notes=commits \
--standard-notes -2 >actual &&
test_cmp expect-both actual
ok 77 - --standard-notes
expecting success:
git log --show-notes=other --show-notes=commits \
--no-standard-notes -1 >actual &&
test_cmp expect-both-reversed actual
ok 78 - --show-notes=ref accumulates
expecting success:
test_config core.notesRef refs/notes/other &&
echo "Note on a tree" >expect &&
git notes add -m "Note on a tree" HEAD: &&
git notes show HEAD: >actual &&
test_cmp expect actual &&
echo "Note on a blob" >expect &&
filename=$(git ls-tree --name-only HEAD | head -n1) &&
git notes add -m "Note on a blob" HEAD:$filename &&
git notes show HEAD:$filename >actual &&
test_cmp expect actual &&
echo "Note on a tag" >expect &&
git tag -a -m "This is an annotated tag" foobar HEAD^ &&
git notes add -m "Note on a tag" foobar &&
git notes show foobar >actual &&
test_cmp expect actual
ok 79 - Allow notes on non-commits (trees, blobs, tags)
expecting success:
cat >expect <<-EOF &&
commit fb01e0ca8c33b6cc0c6451dde747f97df567cb5c
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:19:13 2005 -0700
${indent}7th
Notes:
${indent}order test
EOF
test_commit 7th &&
git notes add -C $(git notes list HEAD^) &&
git log -1 >actual &&
test_cmp expect actual &&
test "$(git notes list HEAD)" = "$(git notes list HEAD^)"
[master fb01e0c] 7th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 7th.t
ok 80 - create note from other note with "git notes add -C"
expecting success:
test_commit 8th &&
test_must_fail git notes add -C deadbeef &&
test_must_fail git notes list HEAD
[master 9a4c31c] 8th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 8th.t
fatal: failed to resolve 'deadbeef' as a valid ref.
error: no note found for object 9a4c31c7f722b5d517e92c64e932dd751e1413bf.
ok 81 - create note from non-existing note with "git notes add -C" fails
expecting success:
commit=$(git rev-parse --verify HEAD) &&
tree=$(git rev-parse --verify HEAD:) &&
test_must_fail git notes add -C $commit &&
test_must_fail git notes add -C $tree &&
test_must_fail git notes list HEAD
fatal: cannot read note data from non-blob object '9a4c31c7f722b5d517e92c64e932dd751e1413bf'.
fatal: cannot read note data from non-blob object '37f6454412e4ed89ae47782f956ed0fb573892f6'.
error: no note found for object 9a4c31c7f722b5d517e92c64e932dd751e1413bf.
ok 82 - create note from non-blob with "git notes add -C" fails
expecting success:
cat >expect <<-EOF &&
commit 9a4c31c7f722b5d517e92c64e932dd751e1413bf
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:20:13 2005 -0700
${indent}8th
Notes:
${indent}This is a blob object
EOF
blob=$(echo "This is a blob object" | git hash-object -w --stdin) &&
git notes add -C $blob &&
git log -1 >actual &&
test_cmp expect actual &&
test "$(git notes list HEAD)" = "$blob"
ok 83 - create note from blob with "git notes add -C" reuses blob id
expecting success:
cat >expect <<-EOF &&
commit 2e0db4bc649e174d667a1cde19e725cf897a5bd2
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:21:13 2005 -0700
${indent}9th
Notes:
${indent}yet another note
EOF
test_commit 9th &&
MSG="yet another note" git notes add -c $(git notes list HEAD^^) &&
git log -1 >actual &&
test_cmp expect actual
[master 2e0db4b] 9th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 9th.t
yet another note
ok 84 - create note from other note with "git notes add -c"
expecting success:
test_commit 10th &&
test_must_fail env MSG="yet another note" git notes add -c deadbeef &&
test_must_fail git notes list HEAD
[master 7c3b87a] 10th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 10th.t
fatal: failed to resolve 'deadbeef' as a valid ref.
error: no note found for object 7c3b87ab368f81e11b1ea87b2ab99a71ccd25406.
ok 85 - create note from non-existing note with "git notes add -c" fails
expecting success:
cat >expect <<-EOF &&
commit 2e0db4bc649e174d667a1cde19e725cf897a5bd2
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:21:13 2005 -0700
${indent}9th
Notes:
${indent}yet another note
${indent}
${indent}yet another note
EOF
git notes append -C $(git notes list HEAD^) HEAD^ &&
git log -1 HEAD^ >actual &&
test_cmp expect actual
ok 86 - append to note from other note with "git notes append -C"
expecting success:
cat >expect <<-EOF &&
commit 7c3b87ab368f81e11b1ea87b2ab99a71ccd25406
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:22:13 2005 -0700
${indent}10th
Notes:
${indent}other note
EOF
MSG="other note" git notes append -c $(git notes list HEAD^) &&
git log -1 >actual &&
test_cmp expect actual
other note
ok 87 - create note from other note with "git notes append -c"
expecting success:
cat >expect <<-EOF &&
commit 7c3b87ab368f81e11b1ea87b2ab99a71ccd25406
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:22:13 2005 -0700
${indent}10th
Notes:
${indent}other note
${indent}
${indent}yet another note
EOF
MSG="yet another note" git notes append -c $(git notes list HEAD) &&
git log -1 >actual &&
test_cmp expect actual
yet another note
ok 88 - append to note from other note with "git notes append -c"
expecting success:
cat >expect <<-EOF &&
commit a446fff8777efdc6eb8f4b7c8a5ff699484df0d5
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:23:13 2005 -0700
${indent}11th
Notes:
${indent}other note
${indent}
${indent}yet another note
EOF
test_commit 11th &&
git notes copy HEAD^ HEAD &&
git log -1 >actual &&
test_cmp expect actual &&
test "$(git notes list HEAD)" = "$(git notes list HEAD^)"
[master a446fff] 11th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 11th.t
ok 89 - copy note with "git notes copy"
expecting success:
test_must_fail git notes copy HEAD~2 HEAD &&
git log -1 >actual &&
test_cmp expect actual &&
test "$(git notes list HEAD)" = "$(git notes list HEAD^)"
error: Cannot copy notes. Found existing notes for object a446fff8777efdc6eb8f4b7c8a5ff699484df0d5. Use '-f' to overwrite existing notes
ok 90 - prevent overwrite with "git notes copy"
expecting success:
cat >expect <<-EOF &&
commit a446fff8777efdc6eb8f4b7c8a5ff699484df0d5
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:23:13 2005 -0700
${indent}11th
Notes:
${indent}yet another note
${indent}
${indent}yet another note
EOF
git notes copy -f HEAD~2 HEAD &&
git log -1 >actual &&
test_cmp expect actual &&
test "$(git notes list HEAD)" = "$(git notes list HEAD~2)"
Overwriting existing notes for object a446fff8777efdc6eb8f4b7c8a5ff699484df0d5
ok 91 - allow overwrite with "git notes copy -f"
expecting success:
test_commit 12th &&
test_commit 13th &&
test_must_fail git notes copy HEAD^ HEAD
[master 65e263d] 12th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 12th.t
[master e871aa6] 13th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 13th.t
error: missing notes on source object 65e263ded02ae4e8839bc151095113737579dc12. Cannot copy.
ok 92 - cannot copy note from object without notes
expecting success:
cat >expect <<-EOF &&
commit e871aa61182b1d95d0a6fb75445d891722863b6b
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:25:13 2005 -0700
${indent}13th
Notes:
${indent}yet another note
${indent}
${indent}yet another note
commit 65e263ded02ae4e8839bc151095113737579dc12
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:24:13 2005 -0700
${indent}12th
Notes:
${indent}other note
${indent}
${indent}yet another note
EOF
(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&
echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
git notes copy --stdin &&
git log -2 >actual &&
test_cmp expect actual &&
test "$(git notes list HEAD)" = "$(git notes list HEAD~2)" &&
test "$(git notes list HEAD^)" = "$(git notes list HEAD~3)"
ok 93 - git notes copy --stdin
expecting success:
cat >expect <<-EOF &&
commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:27:13 2005 -0700
${indent}15th
commit 07c85d77059393ed0154b8c96906547a59dfcddd
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:26:13 2005 -0700
${indent}14th
EOF
test_commit 14th &&
test_commit 15th &&
(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&
echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
git notes copy --for-rewrite=foo &&
git log -2 >actual &&
test_cmp expect actual
[master 07c85d7] 14th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 14th.t
[master 4acf42e] 15th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 15th.t
ok 94 - git notes copy --for-rewrite (unconfigured)
expecting success:
cat >expect <<-EOF &&
commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:27:13 2005 -0700
${indent}15th
Notes:
${indent}yet another note
${indent}
${indent}yet another note
commit 07c85d77059393ed0154b8c96906547a59dfcddd
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:26:13 2005 -0700
${indent}14th
Notes:
${indent}other note
${indent}
${indent}yet another note
EOF
test_config notes.rewriteMode overwrite &&
test_config notes.rewriteRef "refs/notes/*" &&
(echo $(git rev-parse HEAD~3) $(git rev-parse HEAD^) &&
echo $(git rev-parse HEAD~2) $(git rev-parse HEAD)) |
git notes copy --for-rewrite=foo &&
git log -2 >actual &&
test_cmp expect actual
ok 95 - git notes copy --for-rewrite (enabled)
expecting success:
test_config notes.rewrite.bar false &&
echo $(git rev-parse HEAD~3) $(git rev-parse HEAD) |
git notes copy --for-rewrite=bar &&
git log -2 >actual &&
test_cmp expect actual
ok 96 - git notes copy --for-rewrite (disabled)
expecting success:
cat >expect <<-EOF &&
commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:27:13 2005 -0700
${indent}15th
Notes:
${indent}a fresh note
EOF
git notes add -f -m"a fresh note" HEAD^ &&
test_config notes.rewriteMode overwrite &&
test_config notes.rewriteRef "refs/notes/*" &&
echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
git notes copy --for-rewrite=foo &&
git log -1 >actual &&
test_cmp expect actual
Overwriting existing notes for object 07c85d77059393ed0154b8c96906547a59dfcddd
ok 97 - git notes copy --for-rewrite (overwrite)
expecting success:
test_config notes.rewriteMode ignore &&
test_config notes.rewriteRef "refs/notes/*" &&
echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
git notes copy --for-rewrite=foo &&
git log -1 >actual &&
test_cmp expect actual
ok 98 - git notes copy --for-rewrite (ignore)
expecting success:
cat >expect <<-EOF &&
commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:27:13 2005 -0700
${indent}15th
Notes:
${indent}a fresh note
${indent}
${indent}another fresh note
EOF
git notes add -f -m"another fresh note" HEAD^ &&
test_config notes.rewriteMode concatenate &&
test_config notes.rewriteRef "refs/notes/*" &&
echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
git notes copy --for-rewrite=foo &&
git log -1 >actual &&
test_cmp expect actual
Overwriting existing notes for object 07c85d77059393ed0154b8c96906547a59dfcddd
ok 99 - git notes copy --for-rewrite (append)
expecting success:
cat >expect <<-EOF &&
commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:27:13 2005 -0700
${indent}15th
Notes:
${indent}a fresh note
${indent}
${indent}another fresh note
${indent}
${indent}append 1
${indent}
${indent}append 2
EOF
git notes add -f -m"append 1" HEAD^ &&
git notes add -f -m"append 2" HEAD^^ &&
test_config notes.rewriteMode concatenate &&
test_config notes.rewriteRef "refs/notes/*" &&
(echo $(git rev-parse HEAD^) $(git rev-parse HEAD) &&
echo $(git rev-parse HEAD^^) $(git rev-parse HEAD)) |
git notes copy --for-rewrite=foo &&
git log -1 >actual &&
test_cmp expect actual
Overwriting existing notes for object 07c85d77059393ed0154b8c96906547a59dfcddd
Overwriting existing notes for object e871aa61182b1d95d0a6fb75445d891722863b6b
ok 100 - git notes copy --for-rewrite (append two to one)
expecting success:
git notes remove HEAD^ &&
test_config notes.rewriteMode concatenate &&
test_config notes.rewriteRef "refs/notes/*" &&
echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
git notes copy --for-rewrite=foo &&
git log -1 >actual &&
test_cmp expect actual
Removing note for object HEAD^
ok 101 - git notes copy --for-rewrite (append empty)
expecting success:
cat >expect <<-EOF &&
commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:27:13 2005 -0700
${indent}15th
Notes:
${indent}replacement note 1
EOF
test_config notes.rewriteMode concatenate &&
test_config notes.rewriteRef "refs/notes/*" &&
git notes add -f -m"replacement note 1" HEAD^ &&
echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
GIT_NOTES_REWRITE_MODE=overwrite git notes copy --for-rewrite=foo &&
git log -1 >actual &&
test_cmp expect actual
ok 102 - GIT_NOTES_REWRITE_MODE works
expecting success:
cat >expect <<-EOF &&
commit 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:27:13 2005 -0700
${indent}15th
Notes:
${indent}replacement note 2
EOF
git notes add -f -m"replacement note 2" HEAD^ &&
test_config notes.rewriteMode overwrite &&
test_unconfig notes.rewriteRef &&
echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
GIT_NOTES_REWRITE_REF=refs/notes/commits:refs/notes/other \
git notes copy --for-rewrite=foo &&
git log -1 >actual &&
test_cmp expect actual
Overwriting existing notes for object 07c85d77059393ed0154b8c96906547a59dfcddd
ok 103 - GIT_NOTES_REWRITE_REF works
expecting success:
git notes add -f -m"replacement note 3" HEAD^ &&
test_config notes.rewriteMode overwrite &&
test_config notes.rewriteRef refs/notes/other &&
echo $(git rev-parse HEAD^) $(git rev-parse HEAD) |
GIT_NOTES_REWRITE_REF=refs/notes/commits \
git notes copy --for-rewrite=foo &&
git log -1 >actual &&
grep "replacement note 3" actual
Overwriting existing notes for object 07c85d77059393ed0154b8c96906547a59dfcddd
replacement note 3
ok 104 - GIT_NOTES_REWRITE_REF overrides config
expecting success:
test_must_fail git notes copy &&
test_must_fail git notes copy one two three
error: too few parameters
usage: git notes copy [<options>] <from-object> <to-object>
or: git notes copy --stdin [<from-object> <to-object>]...
-f, --force replace existing notes
--stdin read objects from stdin
--for-rewrite <command>
load rewriting config for <command> (implies --stdin)
error: too many parameters
usage: git notes copy [<options>] <from-object> <to-object>
or: git notes copy --stdin [<from-object> <to-object>]...
-f, --force replace existing notes
--stdin read objects from stdin
--for-rewrite <command>
load rewriting config for <command> (implies --stdin)
ok 105 - git notes copy diagnoses too many or too few parameters
expecting success:
test_unconfig core.notesRef &&
sane_unset GIT_NOTES_REF &&
test "$(git notes --ref=refs/heads/master get-ref)" = "refs/notes/refs/heads/master"
ok 106 - git notes get-ref expands refs/heads/master to refs/notes/refs/heads/master
expecting success:
test_unconfig core.notesRef &&
sane_unset GIT_NOTES_REF &&
test "$(git notes get-ref)" = "refs/notes/commits"
ok 107 - git notes get-ref (no overrides)
expecting success:
test_config core.notesRef refs/notes/foo &&
test "$(git notes get-ref)" = "refs/notes/foo"
ok 108 - git notes get-ref (core.notesRef)
expecting success:
test "$(GIT_NOTES_REF=refs/notes/bar git notes get-ref)" = "refs/notes/bar"
ok 109 - git notes get-ref (GIT_NOTES_REF)
expecting success:
test "$(GIT_NOTES_REF=refs/notes/bar git notes --ref=baz get-ref)" = "refs/notes/baz"
ok 110 - git notes get-ref (--ref)
expecting success:
test_unconfig core.notesRef &&
test_commit 16th &&
empty_blob=$(git hash-object -w /dev/null) &&
echo "$empty_blob" >expect_empty
[master 21d0abc] 16th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 16th.t
ok 111 - setup testing of empty notes
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes add &&
test_must_fail git notes list HEAD
Object HEAD has no note
Removing note for object 21d0abcd10f591529d5148ae8bc7703fc1f73398
error: no note found for object 21d0abcd10f591529d5148ae8bc7703fc1f73398.
ok 112 - 'git notes add' removes empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes add --allow-empty &&
git notes list HEAD >actual &&
test_cmp expect_empty actual
Object HEAD has no note
ok 113 - 'git notes add --allow-empty' stores empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes add -F /dev/null &&
test_must_fail git notes list HEAD
Removing note for object HEAD
Removing note for object 21d0abcd10f591529d5148ae8bc7703fc1f73398
error: no note found for object 21d0abcd10f591529d5148ae8bc7703fc1f73398.
ok 114 - 'git notes add -F /dev/null' removes empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes add -F /dev/null --allow-empty &&
git notes list HEAD >actual &&
test_cmp expect_empty actual
Object HEAD has no note
ok 115 - 'git notes add -F /dev/null --allow-empty' stores empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes add -m "" &&
test_must_fail git notes list HEAD
Removing note for object HEAD
Removing note for object 21d0abcd10f591529d5148ae8bc7703fc1f73398
error: no note found for object 21d0abcd10f591529d5148ae8bc7703fc1f73398.
ok 116 - 'git notes add -m ""' removes empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes add -m "" --allow-empty &&
git notes list HEAD >actual &&
test_cmp expect_empty actual
Object HEAD has no note
ok 117 - 'git notes add -m "" --allow-empty' stores empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes add -c "$empty_blob" &&
test_must_fail git notes list HEAD
Removing note for object HEAD
Removing note for object 21d0abcd10f591529d5148ae8bc7703fc1f73398
error: no note found for object 21d0abcd10f591529d5148ae8bc7703fc1f73398.
ok 118 - 'git notes add -c "$empty_blob"' removes empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes add -c "$empty_blob" --allow-empty &&
git notes list HEAD >actual &&
test_cmp expect_empty actual
Object HEAD has no note
ok 119 - 'git notes add -c "$empty_blob" --allow-empty' stores empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes add -C "$empty_blob" &&
test_must_fail git notes list HEAD
Removing note for object HEAD
Removing note for object 21d0abcd10f591529d5148ae8bc7703fc1f73398
error: no note found for object 21d0abcd10f591529d5148ae8bc7703fc1f73398.
ok 120 - 'git notes add -C "$empty_blob"' removes empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes add -C "$empty_blob" --allow-empty &&
git notes list HEAD >actual &&
test_cmp expect_empty actual
Object HEAD has no note
ok 121 - 'git notes add -C "$empty_blob" --allow-empty' stores empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes append &&
test_must_fail git notes list HEAD
Removing note for object HEAD
Removing note for object 21d0abcd10f591529d5148ae8bc7703fc1f73398
error: no note found for object 21d0abcd10f591529d5148ae8bc7703fc1f73398.
ok 122 - 'git notes append' removes empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes append --allow-empty &&
git notes list HEAD >actual &&
test_cmp expect_empty actual
Object HEAD has no note
ok 123 - 'git notes append --allow-empty' stores empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes append -F /dev/null &&
test_must_fail git notes list HEAD
Removing note for object HEAD
Removing note for object 21d0abcd10f591529d5148ae8bc7703fc1f73398
error: no note found for object 21d0abcd10f591529d5148ae8bc7703fc1f73398.
ok 124 - 'git notes append -F /dev/null' removes empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes append -F /dev/null --allow-empty &&
git notes list HEAD >actual &&
test_cmp expect_empty actual
Object HEAD has no note
ok 125 - 'git notes append -F /dev/null --allow-empty' stores empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes append -m "" &&
test_must_fail git notes list HEAD
Removing note for object HEAD
Removing note for object 21d0abcd10f591529d5148ae8bc7703fc1f73398
error: no note found for object 21d0abcd10f591529d5148ae8bc7703fc1f73398.
ok 126 - 'git notes append -m ""' removes empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes append -m "" --allow-empty &&
git notes list HEAD >actual &&
test_cmp expect_empty actual
Object HEAD has no note
ok 127 - 'git notes append -m "" --allow-empty' stores empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes append -c "$empty_blob" &&
test_must_fail git notes list HEAD
Removing note for object HEAD
Removing note for object 21d0abcd10f591529d5148ae8bc7703fc1f73398
error: no note found for object 21d0abcd10f591529d5148ae8bc7703fc1f73398.
ok 128 - 'git notes append -c "$empty_blob"' removes empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes append -c "$empty_blob" --allow-empty &&
git notes list HEAD >actual &&
test_cmp expect_empty actual
Object HEAD has no note
ok 129 - 'git notes append -c "$empty_blob" --allow-empty' stores empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes append -C "$empty_blob" &&
test_must_fail git notes list HEAD
Removing note for object HEAD
Removing note for object 21d0abcd10f591529d5148ae8bc7703fc1f73398
error: no note found for object 21d0abcd10f591529d5148ae8bc7703fc1f73398.
ok 130 - 'git notes append -C "$empty_blob"' removes empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes append -C "$empty_blob" --allow-empty &&
git notes list HEAD >actual &&
test_cmp expect_empty actual
Object HEAD has no note
ok 131 - 'git notes append -C "$empty_blob" --allow-empty' stores empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes edit &&
test_must_fail git notes list HEAD
Removing note for object HEAD
Removing note for object 21d0abcd10f591529d5148ae8bc7703fc1f73398
error: no note found for object 21d0abcd10f591529d5148ae8bc7703fc1f73398.
ok 132 - 'git notes edit' removes empty note
expecting success:
test_might_fail git notes remove HEAD &&
MSG= git notes edit --allow-empty &&
git notes list HEAD >actual &&
test_cmp expect_empty actual
Object HEAD has no note
ok 133 - 'git notes edit --allow-empty' stores empty note
expecting success:
test_commit 17th &&
git log -1 >expect &&
cat >>expect <<-EOF &&
Notes:
EOF
git notes add -C "$empty_blob" --allow-empty &&
git log -1 >actual &&
test_cmp expect actual
[master 27a79f3] 17th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 17th.t
ok 134 - empty notes are displayed by git log
# passed all 134 test(s)
1..134
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3306-notes-prune.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3306-notes-prune/.git/
expecting success:
: > file1 &&
git add file1 &&
test_tick &&
git commit -m 1st &&
git notes add -m "Note #1" &&
: > file2 &&
git add file2 &&
test_tick &&
git commit -m 2nd &&
git notes add -m "Note #2" &&
: > file3 &&
git add file3 &&
test_tick &&
git commit -m 3rd &&
COMMIT_FILE=.git/objects/5e/e1c35e83ea47cd3cc4f8cbee0568915fbbbd29 &&
test -f $COMMIT_FILE &&
test-tool chmtime =+0 $COMMIT_FILE &&
git notes add -m "Note #3"
[master (root-commit) ab5f302] 1st
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file1
[master 08341ad] 2nd
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file2
[master 5ee1c35] 3rd
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file3
ok 1 - setup: create a few commits with notes
expecting success:
git log > actual &&
test_cmp expect actual
ok 2 - verify commits and notes
expecting success:
git reset --hard HEAD~1 &&
git reflog expire --expire=now HEAD &&
git gc --prune=now
HEAD is now at 08341ad 2nd
ok 3 - remove some commits
expecting success:
test_must_fail git cat-file -p 5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29 &&
git cat-file -p 08341ad9e94faa089d60fd3f523affb25c6da189 &&
git cat-file -p ab5f302035f2e7aaf04265f08b42034c23256e1f
fatal: Not a valid object name 5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29
tree aefde3a01f6e10d72fd4899ce14c8b2654d3eb45
parent ab5f302035f2e7aaf04265f08b42034c23256e1f
author A U Thor <author@example.com> 1112912053 -0700
committer C O Mitter <committer@example.com> 1112912053 -0700
2nd
tree ad24149d789e59d4b5f9ce41cda90110ca0f98b7
author A U Thor <author@example.com> 1112911993 -0700
committer C O Mitter <committer@example.com> 1112911993 -0700
1st
ok 4 - verify that commits are gone
expecting success:
git notes show 5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29 &&
git notes show 08341ad9e94faa089d60fd3f523affb25c6da189 &&
git notes show ab5f302035f2e7aaf04265f08b42034c23256e1f
Note #3
Note #2
Note #1
ok 5 - verify that notes are still present
expecting success:
git notes list > expect &&
git notes prune -n &&
git notes list > actual &&
test_cmp expect actual
5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29
ok 6 - prune -n does not remove notes
expecting success:
git notes prune -n > actual &&
test_cmp expect actual
ok 7 - prune -n lists prunable notes
expecting success:
git notes prune
ok 8 - prune notes
expecting success:
test_must_fail git notes show 5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29 &&
git notes show 08341ad9e94faa089d60fd3f523affb25c6da189 &&
git notes show ab5f302035f2e7aaf04265f08b42034c23256e1f
error: no note found for object 5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29.
Note #2
Note #1
ok 9 - verify that notes are gone
expecting success:
git reset --hard HEAD~1 &&
git reflog expire --expire=now HEAD &&
git gc --prune=now
HEAD is now at ab5f302 1st
ok 10 - remove some commits
expecting success:
git notes prune -v > actual &&
test_cmp expect actual
ok 11 - prune -v notes
expecting success:
test_must_fail git notes show 5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29 &&
test_must_fail git notes show 08341ad9e94faa089d60fd3f523affb25c6da189 &&
git notes show ab5f302035f2e7aaf04265f08b42034c23256e1f
error: no note found for object 5ee1c35e83ea47cd3cc4f8cbee0568915fbbbd29.
error: no note found for object 08341ad9e94faa089d60fd3f523affb25c6da189.
Note #1
ok 12 - verify that notes are gone
# passed all 12 test(s)
1..12
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3307-notes-man.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3307-notes-man/.git/
expecting success:
test_commit A &&
test_commit B &&
test_commit C
[master (root-commit) 0ddfaf1] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
[master d9df450] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B.t
[master 35a8500] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C.t
ok 1 - setup
expecting success:
cat <<-\EOF >expect &&
B
Notes:
Acked-by: A C Ker <acker@example.com>
EOF
git notes add -m "Acked-by: A C Ker <acker@example.com>" B &&
git show -s B^{commit} >log &&
tail -n 4 log >actual &&
test_cmp expect actual
ok 2 - example 1: notes to add an Acked-by line
expecting success:
cp "$TEST_DIRECTORY"/test-binary-1.png . &&
git checkout B &&
blob=$(git hash-object -w test-binary-1.png) &&
git notes --ref=logo add -C "$blob" &&
git notes --ref=logo copy B C &&
git notes --ref=logo show C >actual &&
test_cmp test-binary-1.png actual
Note: switching to 'B'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d9df450 B
ok 3 - example 2: binary notes
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3308-notes-merge.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3308-notes-merge/.git/
expecting success:
test_commit 1st &&
test_commit 2nd &&
test_commit 3rd &&
test_commit 4th &&
test_commit 5th &&
# Create notes on 4 first commits
git config core.notesRef refs/notes/x &&
git notes add -m "Notes on 1st commit" 1st &&
git notes add -m "Notes on 2nd commit" 2nd &&
git notes add -m "Notes on 3rd commit" 3rd &&
git notes add -m "Notes on 4th commit" 4th &&
# Copy notes to remote-notes
git fetch . refs/notes/*:refs/remote-notes/origin/*
[master (root-commit) 04ed9a0] 1st
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1st.t
[master 7a4ca6e] 2nd
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2nd.t
[master d07d62e] 3rd
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 3rd.t
[master 0f7aa3e] 4th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 4th.t
[master 7f9ad88] 5th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 5th.t
From .
* [new ref] refs/notes/x -> refs/remote-notes/origin/x
ok 1 - setup
expecting success:
verify_notes x
ok 2 - verify initial notes (x)
expecting success:
test_must_fail git -c "core.notesRef=refs/notes/y" notes merge z
fatal: Cannot merge empty notes ref (refs/notes/z) into empty notes ref (refs/notes/y)
ok 3 - fail to merge empty notes ref into empty notes ref (z => y)
expecting success:
test_must_fail git -c "core.notesRef=refs/notes" notes merge x &&
test_must_fail git -c "core.notesRef=refs/notes/" notes merge x &&
git update-ref refs/notes/dir/foo HEAD &&
test_must_fail git -c "core.notesRef=refs/notes/dir" notes merge x &&
test_must_fail git -c "core.notesRef=refs/notes/dir/" notes merge x &&
test_must_fail git -c "core.notesRef=refs/heads/master" notes merge x &&
test_must_fail git -c "core.notesRef=refs/notes/y:" notes merge x &&
test_must_fail git -c "core.notesRef=refs/notes/y:foo" notes merge x &&
test_must_fail git -c "core.notesRef=refs/notes/foo^{bar" notes merge x
fatal: refusing to merge notes in refs/notes (outside of refs/notes/)
fatal: Failed to resolve local notes ref 'refs/notes/'
fatal: update_ref failed for ref 'refs/notes/dir': cannot lock ref 'refs/notes/dir': 'refs/notes/dir/foo' exists; cannot create 'refs/notes/dir'
fatal: Failed to resolve local notes ref 'refs/notes/dir/'
fatal: refusing to merge notes in refs/heads/master (outside of refs/notes/)
fatal: Failed to resolve local notes ref 'refs/notes/y:'
fatal: Failed to resolve local notes ref 'refs/notes/y:foo'
fatal: Failed to resolve local notes ref 'refs/notes/foo^{bar'
ok 4 - fail to merge into various non-notes refs
expecting success:
git config core.notesRef refs/notes/v &&
git notes merge refs/remote-notes/origin/x &&
verify_notes v &&
# refs/remote-notes/origin/x and v should point to the same notes commit
test "$(git rev-parse refs/remote-notes/origin/x)" = "$(git rev-parse refs/notes/v)"
ok 5 - merge non-notes ref into empty notes ref (remote-notes/origin/x => v)
expecting success:
git config core.notesRef refs/notes/y &&
git notes merge x &&
verify_notes y &&
# x and y should point to the same notes commit
test "$(git rev-parse refs/notes/x)" = "$(git rev-parse refs/notes/y)"
ok 6 - merge notes into empty notes ref (x => y)
expecting success:
git notes merge z &&
# y should not change (still == x)
test "$(git rev-parse refs/notes/x)" = "$(git rev-parse refs/notes/y)"
ok 7 - merge empty notes ref (z => y)
expecting success:
# Not touching notes to 1st commit
git notes remove 2nd &&
git notes append -m "More notes on 3rd commit" 3rd &&
git notes add -f -m "New notes on 4th commit" 4th &&
git notes add -m "Notes on 5th commit" 5th
Removing note for object 2nd
Overwriting existing notes for object 0f7aa3ec6325aeb88b910453bb3eb37c49d75c11
ok 8 - change notes on other notes ref (y)
expecting success:
pre_state="$(git rev-parse refs/notes/y)" &&
git notes merge y^ &&
# y should not move
test "$pre_state" = "$(git rev-parse refs/notes/y)"
Already up to date!
ok 9 - merge previous notes commit (y^ => y) => No-op
expecting success:
verify_notes y
ok 10 - verify changed notes on other notes ref (y)
expecting success:
verify_notes x
ok 11 - verify unchanged notes on original notes ref (x)
expecting success:
git notes merge -vvv x &&
verify_notes y &&
verify_notes x
One merge base found (bf2877f)
Merging remote commit bf2877f into local commit 21b8c5e with merge-base bf2877f
Already up to date!
ok 12 - merge original notes (x) into changed notes (y) => No-op
expecting success:
git config core.notesRef refs/notes/x &&
git notes merge y &&
verify_notes x &&
verify_notes y &&
# x and y should point to same the notes commit
test "$(git rev-parse refs/notes/x)" = "$(git rev-parse refs/notes/y)"
Fast-forward
ok 13 - merge changed (y) into original (x) => Fast-forward
expecting success:
# Prepare empty (but valid) notes ref (z)
git config core.notesRef refs/notes/z &&
git notes add -m "foo" &&
git notes remove &&
git notes >output_notes_z &&
test_must_be_empty output_notes_z &&
# Do the merge (z => y)
git config core.notesRef refs/notes/y &&
git notes merge z &&
verify_notes y &&
# y should no longer point to the same notes commit as x
test "$(git rev-parse refs/notes/x)" != "$(git rev-parse refs/notes/y)"
Removing note for object HEAD
ok 14 - merge empty notes ref (z => y)
expecting success:
# Append to 1st commit notes
git notes append -m "More notes on 1st commit" 1st &&
# Add new notes to 2nd commit
git notes add -m "New notes on 2nd commit" 2nd &&
verify_notes y
ok 15 - change notes on other notes ref (y)
expecting success:
git config core.notesRef refs/notes/x &&
git notes remove 3rd &&
git notes append -m "More notes on 4th commit" 4th &&
verify_notes x
Removing note for object 3rd
ok 16 - change notes on notes ref (x)
expecting success:
git notes merge y &&
verify_notes x &&
verify_notes y
ok 17 - merge y into x => Non-conflicting 3-way merge
expecting success:
git config core.notesRef refs/notes/w &&
# Add same note as refs/notes/y on 2nd commit
git notes add -m "New notes on 2nd commit" 2nd &&
# Add new note on 3rd commit (non-conflicting)
git notes add -m "New notes on 3rd commit" 3rd &&
# Verify state of notes on new, separate notes ref (w)
verify_notes w
ok 18 - create notes on new, separate notes ref (w)
expecting success:
git config core.notesRef refs/notes/x &&
git notes merge w &&
# Verify new state of notes on other notes ref (x)
verify_notes x &&
# Also verify that nothing changed on other notes refs (y and w)
verify_notes y &&
verify_notes w
ok 19 - merge w into x => Non-conflicting history-less merge
# passed all 19 test(s)
1..19
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3309-notes-merge-auto-resolve.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3309-notes-merge-auto-resolve/.git/
expecting success:
test_commit 1st &&
test_commit 2nd &&
test_commit 3rd &&
test_commit 4th &&
test_commit 5th &&
test_commit 6th &&
test_commit 7th &&
test_commit 8th &&
test_commit 9th &&
test_commit 10th &&
test_commit 11th &&
test_commit 12th &&
test_commit 13th &&
test_commit 14th &&
test_commit 15th
[master (root-commit) 04ed9a0] 1st
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1st.t
[master 7a4ca6e] 2nd
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2nd.t
[master d07d62e] 3rd
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 3rd.t
[master 0f7aa3e] 4th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 4th.t
[master 7f9ad88] 5th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 5th.t
[master 2c12533] 6th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 6th.t
[master fb01e0c] 7th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 7th.t
[master 9a4c31c] 8th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 8th.t
[master 2e0db4b] 9th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 9th.t
[master 7c3b87a] 10th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 10th.t
[master a446fff] 11th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 11th.t
[master 65e263d] 12th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 12th.t
[master e871aa6] 13th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 13th.t
[master 07c85d7] 14th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 14th.t
[master 4acf42e] 15th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 15th.t
ok 1 - setup commits
expecting success:
git config core.notesRef refs/notes/x &&
git notes add -m "x notes on 6th commit" 6th &&
git notes add -m "x notes on 7th commit" 7th &&
git notes add -m "x notes on 8th commit" 8th &&
git notes add -m "x notes on 9th commit" 9th &&
git notes add -m "x notes on 10th commit" 10th &&
git notes add -m "x notes on 11th commit" 11th &&
git notes add -m "x notes on 12th commit" 12th &&
git notes add -m "x notes on 13th commit" 13th &&
git notes add -m "x notes on 14th commit" 14th &&
git notes add -m "x notes on 15th commit" 15th
ok 2 - setup merge base (x)
expecting success: verify_notes x x
ok 3 - verify state of merge base (x)
expecting success:
git update-ref refs/notes/y refs/notes/x &&
git config core.notesRef refs/notes/y &&
git notes add -f -m "y notes on 3rd commit" 3rd &&
git notes add -f -m "y notes on 4th commit" 4th &&
git notes add -f -m "y notes on 5th commit" 5th &&
git notes remove 6th &&
git notes remove 7th &&
git notes remove 8th &&
git notes add -f -m "y notes on 12th commit" 12th &&
git notes add -f -m "y notes on 13th commit" 13th &&
git notes add -f -m "y notes on 14th commit" 14th &&
git notes add -f -m "y notes on 15th commit" 15th
Removing note for object 6th
Removing note for object 7th
Removing note for object 8th
Overwriting existing notes for object 65e263ded02ae4e8839bc151095113737579dc12
Overwriting existing notes for object e871aa61182b1d95d0a6fb75445d891722863b6b
Overwriting existing notes for object 07c85d77059393ed0154b8c96906547a59dfcddd
Overwriting existing notes for object 4acf42e847e7fffbbf89ee365c20ac7caf40de89
ok 4 - setup local branch (y)
expecting success: verify_notes y y
ok 5 - verify state of local branch (y)
expecting success:
git update-ref refs/notes/z refs/notes/x &&
git config core.notesRef refs/notes/z &&
git notes add -f -m "z notes on 2nd commit" 2nd &&
git notes add -f -m "y notes on 4th commit" 4th &&
git notes add -f -m "z notes on 5th commit" 5th &&
git notes remove 6th &&
git notes add -f -m "z notes on 8th commit" 8th &&
git notes remove 9th &&
git notes add -f -m "z notes on 11th commit" 11th &&
git notes remove 12th &&
git notes add -f -m "y notes on 14th commit" 14th &&
git notes add -f -m "z notes on 15th commit" 15th
Removing note for object 6th
Overwriting existing notes for object 9a4c31c7f722b5d517e92c64e932dd751e1413bf
Removing note for object 9th
Overwriting existing notes for object a446fff8777efdc6eb8f4b7c8a5ff699484df0d5
Removing note for object 12th
Overwriting existing notes for object 07c85d77059393ed0154b8c96906547a59dfcddd
Overwriting existing notes for object 4acf42e847e7fffbbf89ee365c20ac7caf40de89
ok 6 - setup remote branch (z)
expecting success: verify_notes z z
ok 7 - verify state of remote branch (z)
expecting success:
git config core.notesRef refs/notes/y &&
test_must_fail git notes merge --strategy=foo z &&
# Verify no changes (y)
verify_notes y y
error: unknown -s/--strategy: foo
usage: git notes merge [<options>] <notes-ref>
or: git notes merge --commit [<options>]
or: git notes merge --abort [<options>]
General options
-v, --verbose be more verbose
-q, --quiet be more quiet
Merge options
-s, --strategy <strategy>
resolve notes conflicts using the given strategy (manual/ours/theirs/union/cat_sort_uniq)
Committing unmerged notes
--commit finalize notes merge by committing unmerged notes
Aborting notes merge resolution
--abort abort notes merge
ok 8 - merge z into y with invalid strategy => Fail/No changes
expecting success:
git config core.notesRef refs/notes/y &&
test_must_fail git -c notes.mergeStrategy="foo" notes merge z &&
# Verify no changes (y)
verify_notes y y
error: unknown notes merge strategy foo
fatal: unable to parse 'notes.mergeStrategy' from command-line config
ok 9 - merge z into y with invalid configuration option => Fail/No changes
expecting success:
git notes merge --strategy=ours z &&
verify_notes y ours
Using local notes for 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Using local notes for 65e263ded02ae4e8839bc151095113737579dc12
Using local notes for 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
Using local notes for 9a4c31c7f722b5d517e92c64e932dd751e1413bf
ok 10 - merge z into y with "ours" strategy => Non-conflicting 3-way merge
expecting success:
git update-ref refs/notes/y refs/notes/y^1 &&
# Verify pre-merge state
verify_notes y y
ok 11 - reset to pre-merge state (y)
expecting success:
git -c notes.mergeStrategy="ours" notes merge z &&
verify_notes y ours
Using local notes for 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Using local notes for 65e263ded02ae4e8839bc151095113737579dc12
Using local notes for 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
Using local notes for 9a4c31c7f722b5d517e92c64e932dd751e1413bf
ok 12 - merge z into y with "ours" configuration option => Non-conflicting 3-way merge
expecting success:
git update-ref refs/notes/y refs/notes/y^1 &&
# Verify pre-merge state
verify_notes y y
ok 13 - reset to pre-merge state (y)
expecting success:
git -c notes.y.mergeStrategy="ours" notes merge z &&
verify_notes y ours
Using local notes for 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Using local notes for 65e263ded02ae4e8839bc151095113737579dc12
Using local notes for 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
Using local notes for 9a4c31c7f722b5d517e92c64e932dd751e1413bf
ok 14 - merge z into y with "ours" per-ref configuration option => Non-conflicting 3-way merge
expecting success:
git update-ref refs/notes/y refs/notes/y^1 &&
# Verify pre-merge state
verify_notes y y
ok 15 - reset to pre-merge state (y)
expecting success:
git notes merge --strategy=theirs z &&
verify_notes y theirs
Using remote notes for 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Using remote notes for 65e263ded02ae4e8839bc151095113737579dc12
Using remote notes for 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
Using remote notes for 9a4c31c7f722b5d517e92c64e932dd751e1413bf
ok 16 - merge z into y with "theirs" strategy => Non-conflicting 3-way merge
expecting success:
git update-ref refs/notes/y refs/notes/y^1 &&
# Verify pre-merge state
verify_notes y y
ok 17 - reset to pre-merge state (y)
expecting success:
git -c notes.mergeStrategy="ours" notes merge --strategy=theirs z &&
verify_notes y theirs
Using remote notes for 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Using remote notes for 65e263ded02ae4e8839bc151095113737579dc12
Using remote notes for 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
Using remote notes for 9a4c31c7f722b5d517e92c64e932dd751e1413bf
ok 18 - merge z into y with "theirs" strategy overriding configuration option "ours" => Non-conflicting 3-way merge
expecting success:
git update-ref refs/notes/y refs/notes/y^1 &&
# Verify pre-merge state
verify_notes y y
ok 19 - reset to pre-merge state (y)
expecting success:
git notes merge --strategy=union z &&
verify_notes y union
Concatenating local and remote notes for 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Concatenating local and remote notes for 65e263ded02ae4e8839bc151095113737579dc12
Concatenating local and remote notes for 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
Concatenating local and remote notes for 9a4c31c7f722b5d517e92c64e932dd751e1413bf
ok 20 - merge z into y with "union" strategy => Non-conflicting 3-way merge
expecting success:
git update-ref refs/notes/y refs/notes/y^1 &&
# Verify pre-merge state
verify_notes y y
ok 21 - reset to pre-merge state (y)
expecting success:
git -c notes.y.mergeStrategy="theirs" notes merge --strategy=union z &&
verify_notes y union
Concatenating local and remote notes for 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Concatenating local and remote notes for 65e263ded02ae4e8839bc151095113737579dc12
Concatenating local and remote notes for 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
Concatenating local and remote notes for 9a4c31c7f722b5d517e92c64e932dd751e1413bf
ok 22 - merge z into y with "union" strategy overriding per-ref configuration => Non-conflicting 3-way merge
expecting success:
git update-ref refs/notes/y refs/notes/y^1 &&
# Verify pre-merge state
verify_notes y y
ok 23 - reset to pre-merge state (y)
expecting success:
git -c notes.y.mergeStrategy="union" -c notes.mergeStrategy="theirs" notes merge z &&
verify_notes y union
Concatenating local and remote notes for 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Concatenating local and remote notes for 65e263ded02ae4e8839bc151095113737579dc12
Concatenating local and remote notes for 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
Concatenating local and remote notes for 9a4c31c7f722b5d517e92c64e932dd751e1413bf
ok 24 - merge z into y with "union" per-ref overriding general configuration => Non-conflicting 3-way merge
expecting success:
git update-ref refs/notes/y refs/notes/y^1 &&
# Verify pre-merge state
verify_notes y y
ok 25 - reset to pre-merge state (y)
expecting success:
test_must_fail git -c notes.z.mergeStrategy="union" notes merge z &&
git notes merge --abort &&
verify_notes y y
Automatic notes merge failed. Fix conflicts in .git/NOTES_MERGE_WORKTREE and commit the result with 'git notes merge --commit', or abort the merge with 'git notes merge --abort'.
Auto-merging notes for 4acf42e847e7fffbbf89ee365c20ac7caf40de89
CONFLICT (content): Merge conflict in notes for object 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Auto-merging notes for 65e263ded02ae4e8839bc151095113737579dc12
CONFLICT (delete/modify): Notes for object 65e263ded02ae4e8839bc151095113737579dc12 deleted in refs/notes/z and modified in refs/notes/y. Version from refs/notes/y left in tree.
Auto-merging notes for 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
CONFLICT (add/add): Merge conflict in notes for object 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
Auto-merging notes for 9a4c31c7f722b5d517e92c64e932dd751e1413bf
CONFLICT (delete/modify): Notes for object 9a4c31c7f722b5d517e92c64e932dd751e1413bf deleted in refs/notes/y and modified in refs/notes/z. Version from refs/notes/z left in tree.
ok 26 - merge z into y with "manual" per-ref only checks specific ref configuration => Conflicting 3-way merge
expecting success:
git config core.notesRef refs/notes/z &&
git notes merge --strategy=union y &&
verify_notes z union2
Concatenating local and remote notes for 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Concatenating local and remote notes for 65e263ded02ae4e8839bc151095113737579dc12
Concatenating local and remote notes for 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
Concatenating local and remote notes for 9a4c31c7f722b5d517e92c64e932dd751e1413bf
ok 27 - merge y into z with "union" strategy => Non-conflicting 3-way merge
expecting success:
git update-ref refs/notes/z refs/notes/z^1 &&
# Verify pre-merge state
verify_notes z z
ok 28 - reset to pre-merge state (z)
expecting success:
git notes merge --strategy=cat_sort_uniq y &&
verify_notes z cat_sort_uniq
Concatenating unique lines in local and remote notes for 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Concatenating unique lines in local and remote notes for 65e263ded02ae4e8839bc151095113737579dc12
Concatenating unique lines in local and remote notes for 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
Concatenating unique lines in local and remote notes for 9a4c31c7f722b5d517e92c64e932dd751e1413bf
ok 29 - merge y into z with "cat_sort_uniq" strategy => Non-conflicting 3-way merge
expecting success:
git update-ref refs/notes/z refs/notes/z^1 &&
# Verify pre-merge state
verify_notes z z
ok 30 - reset to pre-merge state (z)
expecting success:
git -c notes.mergeStrategy="cat_sort_uniq" notes merge y &&
verify_notes z cat_sort_uniq
Concatenating unique lines in local and remote notes for 4acf42e847e7fffbbf89ee365c20ac7caf40de89
Concatenating unique lines in local and remote notes for 65e263ded02ae4e8839bc151095113737579dc12
Concatenating unique lines in local and remote notes for 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
Concatenating unique lines in local and remote notes for 9a4c31c7f722b5d517e92c64e932dd751e1413bf
ok 31 - merge y into z with "cat_sort_uniq" strategy configuration option => Non-conflicting 3-way merge
# passed all 31 test(s)
1..31
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3303-notes-subtrees.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3303-notes-subtrees/.git/
expecting success:
(
nr=0 &&
while [ $nr -lt $number_of_commits ]; do
nr=$(($nr+1)) &&
test_tick &&
cat <<INPUT_END
commit refs/heads/master
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
commit #$nr
COMMIT
M 644 inline file
data <<EOF
file in commit #$nr
EOF
INPUT_END
done &&
test_tick &&
cat <<INPUT_END
commit refs/notes/commits
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
data <<COMMIT
no notes
COMMIT
deleteall
INPUT_END
) |
git fast-import --quiet &&
git config core.notesRef refs/notes/commits
ok 1 - setup: create 100 commits
expecting success: test_sha1_based "s|^..|&/|"
ok 2 - test notes in 2/38-fanout
expecting success: verify_notes
ok 3 - verify notes in 2/38-fanout
expecting success: test_sha1_based "s|^\(..\)\(..\)|\1/\2/|"
ok 4 - test notes in 2/2/36-fanout
expecting success: verify_notes
ok 5 - verify notes in 2/2/36-fanout
expecting success: test_sha1_based "s|^\(..\)\(..\)\(..\)|\1/\2/\3/|"
ok 6 - test notes in 2/2/2/34-fanout
expecting success: verify_notes
ok 7 - verify notes in 2/2/2/34-fanout
expecting success: test_same_notes "s|^..|&/|" ""
ok 8 - test same notes in no fanout and 2/38-fanout
expecting success: verify_notes
ok 9 - verify same notes in no fanout and 2/38-fanout
expecting success: test_same_notes "s|^\(..\)\(..\)|\1/\2/|" ""
ok 10 - test same notes in no fanout and 2/2/36-fanout
expecting success: verify_notes
ok 11 - verify same notes in no fanout and 2/2/36-fanout
expecting success: test_same_notes "s|^\(..\)\(..\)|\1/\2/|" "s|^..|&/|"
ok 12 - test same notes in 2/38-fanout and 2/2/36-fanout
expecting success: verify_notes
ok 13 - verify same notes in 2/38-fanout and 2/2/36-fanout
expecting success: test_same_notes "s|^\(..\)\(..\)|\1/\2/|" "s|^\(..\)\(..\)\(..\)|\1/\2/\3/|"
ok 14 - test same notes in 2/2/2/34-fanout and 2/2/36-fanout
expecting success: verify_notes
ok 15 - verify same notes in 2/2/2/34-fanout and 2/2/36-fanout
expecting success: test_concatenated_notes "s|^..|&/|" ""
ok 16 - test notes in no fanout concatenated with 2/38-fanout
expecting success: verify_concatenated_notes
ok 17 - verify notes in no fanout concatenated with 2/38-fanout
expecting success: test_concatenated_notes "s|^\(..\)\(..\)|\1/\2/|" ""
ok 18 - test notes in no fanout concatenated with 2/2/36-fanout
expecting success: verify_concatenated_notes
ok 19 - verify notes in no fanout concatenated with 2/2/36-fanout
expecting success: test_concatenated_notes "s|^\(..\)\(..\)|\1/\2/|" "s|^..|&/|"
ok 20 - test notes in 2/38-fanout concatenated with 2/2/36-fanout
expecting success: verify_concatenated_notes
ok 21 - verify notes in 2/38-fanout concatenated with 2/2/36-fanout
expecting success: test_concatenated_notes "s|^\(..\)\(..\)\(..\)|\1/\2/\3/|" "s|^\(..\)\(..\)|\1/\2/|"
ok 22 - test notes in 2/2/36-fanout concatenated with 2/2/2/34-fanout
expecting success: verify_concatenated_notes
ok 23 - verify notes in 2/2/36-fanout concatenated with 2/2/2/34-fanout
# passed all 23 test(s)
1..23
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3310-notes-merge-manual-resolve.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3310-notes-merge-manual-resolve/.git/
expecting success:
test_commit 1st &&
test_commit 2nd &&
test_commit 3rd &&
test_commit 4th &&
test_commit 5th
[master (root-commit) 04ed9a0] 1st
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1st.t
[master 7a4ca6e] 2nd
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2nd.t
[master d07d62e] 3rd
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 3rd.t
[master 0f7aa3e] 4th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 4th.t
[master 7f9ad88] 5th
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 5th.t
ok 1 - setup commits
expecting success:
git config core.notesRef refs/notes/x &&
git notes add -m "x notes on 2nd commit" 2nd &&
git notes add -m "x notes on 3rd commit" 3rd &&
git notes add -m "x notes on 4th commit" 4th &&
verify_notes x
ok 2 - setup merge base (x)
expecting success:
git update-ref refs/notes/y refs/notes/x &&
git config core.notesRef refs/notes/y &&
git notes add -f -m "y notes on 1st commit" 1st &&
git notes remove 2nd &&
git notes add -f -m "y notes on 3rd commit" 3rd &&
git notes add -f -m "y notes on 4th commit" 4th &&
verify_notes y
Removing note for object 2nd
Overwriting existing notes for object d07d62e5208f22eb5695e7eb47667dc8b9860290
Overwriting existing notes for object 0f7aa3ec6325aeb88b910453bb3eb37c49d75c11
ok 3 - setup local branch (y)
expecting success:
git update-ref refs/notes/z refs/notes/x &&
git config core.notesRef refs/notes/z &&
git notes add -f -m "z notes on 1st commit" 1st &&
git notes add -f -m "z notes on 2nd commit" 2nd &&
git notes remove 3rd &&
git notes add -f -m "z notes on 4th commit" 4th &&
verify_notes z
Overwriting existing notes for object 7a4ca6ee52a974a66cbaa78e33214535dff1d691
Removing note for object 3rd
Overwriting existing notes for object 0f7aa3ec6325aeb88b910453bb3eb37c49d75c11
ok 4 - setup remote branch (z)
expecting success:
git update-ref refs/notes/m refs/notes/y &&
git config core.notesRef refs/notes/m &&
test_must_fail git notes merge z >output 2>&1 &&
# Output should point to where to resolve conflicts
test_i18ngrep "\\.git/NOTES_MERGE_WORKTREE" output &&
# Inspect merge conflicts
ls .git/NOTES_MERGE_WORKTREE >output_conflicts &&
test_cmp expect_conflicts output_conflicts &&
( for f in $(cat expect_conflicts); do
test_cmp "expect_conflict_$f" ".git/NOTES_MERGE_WORKTREE/$f" ||
exit 1
done ) &&
# Verify that current notes tree (pre-merge) has not changed (m == y)
verify_notes y &&
verify_notes m &&
test "$(git rev-parse refs/notes/m)" = "$(cat pre_merge_y)"
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Automatic notes merge failed. Fix conflicts in .git/NOTES_MERGE_WORKTREE and commit the result with 'git notes merge --commit', or abort the merge with 'git notes merge --abort'.
ok 5 - merge z into m (== y) with default ("manual") resolver => Conflicting 3-way merge
expecting success:
git notes --ref z append -m "More z notes on 4th commit" 4th &&
verify_notes z
ok 6 - change notes in z
expecting success:
test -d .git/NOTES_MERGE_WORKTREE &&
test_must_fail git notes merge z >output 2>&1 &&
# Output should indicate what is wrong
test_i18ngrep -q "\\.git/NOTES_MERGE_\\* exists" output
ok 7 - cannot do merge w/conflicts when previous merge is unfinished
expecting success:
git config core.notesRef refs/notes/w &&
git notes add -m "w notes on 1st commit" 1st &&
git notes add -m "x notes on 2nd commit" 2nd &&
verify_notes w
ok 8 - setup unrelated notes ref (w)
expecting success:
test -d .git/NOTES_MERGE_WORKTREE &&
git notes merge x &&
verify_notes w &&
# Verify that other notes refs has not changed (x and y)
verify_notes x &&
verify_notes y
ok 9 - can do merge without conflicts even if previous merge is unfinished (x => w)
expecting success:
test_must_fail git notes merge --commit --abort
error: cannot mix --commit, --abort or -s/--strategy
usage: git notes merge [<options>] <notes-ref>
or: git notes merge --commit [<options>]
or: git notes merge --abort [<options>]
General options
-v, --verbose be more verbose
-q, --quiet be more quiet
Merge options
-s, --strategy <strategy>
resolve notes conflicts using the given strategy (manual/ours/theirs/union/cat_sort_uniq)
Committing unmerged notes
--commit finalize notes merge by committing unmerged notes
Aborting notes merge resolution
--abort abort notes merge
ok 10 - do not allow mixing --commit and --abort
expecting success:
test_must_fail git notes merge --commit --strategy theirs
error: cannot mix --commit, --abort or -s/--strategy
usage: git notes merge [<options>] <notes-ref>
or: git notes merge --commit [<options>]
or: git notes merge --abort [<options>]
General options
-v, --verbose be more verbose
-q, --quiet be more quiet
Merge options
-s, --strategy <strategy>
resolve notes conflicts using the given strategy (manual/ours/theirs/union/cat_sort_uniq)
Committing unmerged notes
--commit finalize notes merge by committing unmerged notes
Aborting notes merge resolution
--abort abort notes merge
ok 11 - do not allow mixing --commit and --strategy
expecting success:
test_must_fail git notes merge --abort --strategy theirs
error: cannot mix --commit, --abort or -s/--strategy
usage: git notes merge [<options>] <notes-ref>
or: git notes merge --commit [<options>]
or: git notes merge --abort [<options>]
General options
-v, --verbose be more verbose
-q, --quiet be more quiet
Merge options
-s, --strategy <strategy>
resolve notes conflicts using the given strategy (manual/ours/theirs/union/cat_sort_uniq)
Committing unmerged notes
--commit finalize notes merge by committing unmerged notes
Aborting notes merge resolution
--abort abort notes merge
ok 12 - do not allow mixing --abort and --strategy
expecting success:
# Resolve conflicts and finalize merge
cat >.git/NOTES_MERGE_WORKTREE/$commit_sha1 <<EOF &&
y and z notes on 1st commit
EOF
cat >.git/NOTES_MERGE_WORKTREE/$commit_sha4 <<EOF &&
y and z notes on 4th commit
EOF
git notes merge --commit &&
# No .git/NOTES_MERGE_* files left
test_might_fail ls .git/NOTES_MERGE_* >output 2>/dev/null &&
test_must_be_empty output &&
# Merge commit has pre-merge y and pre-merge z as parents
test "$(git rev-parse refs/notes/m^1)" = "$(cat pre_merge_y)" &&
test "$(git rev-parse refs/notes/m^2)" = "$(cat pre_merge_z)" &&
# Merge commit mentions the notes refs merged
git log -1 --format=%B refs/notes/m > merge_commit_msg &&
grep -q refs/notes/m merge_commit_msg &&
grep -q refs/notes/z merge_commit_msg &&
# Merge commit mentions conflicting notes
grep -q "Conflicts" merge_commit_msg &&
( for sha1 in $(cat expect_conflicts); do
grep -q "$sha1" merge_commit_msg ||
exit 1
done ) &&
# Verify contents of merge result
verify_notes m &&
# Verify that other notes refs has not changed (w, x, y and z)
verify_notes w &&
verify_notes x &&
verify_notes y &&
verify_notes z
ok 13 - finalize conflicting merge (z => m)
expecting success:
git update-ref refs/notes/m refs/notes/y &&
git config core.notesRef refs/notes/m &&
test_must_fail git notes merge z >output 2>&1 &&
# Output should point to where to resolve conflicts
test_i18ngrep "\\.git/NOTES_MERGE_WORKTREE" output &&
# Inspect merge conflicts
ls .git/NOTES_MERGE_WORKTREE >output_conflicts &&
test_cmp expect_conflicts output_conflicts &&
( for f in $(cat expect_conflicts); do
test_cmp "expect_conflict_$f" ".git/NOTES_MERGE_WORKTREE/$f" ||
exit 1
done ) &&
# Verify that current notes tree (pre-merge) has not changed (m == y)
verify_notes y &&
verify_notes m &&
test "$(git rev-parse refs/notes/m)" = "$(cat pre_merge_y)"
Automatic notes merge failed. Fix conflicts in .git/NOTES_MERGE_WORKTREE and commit the result with 'git notes merge --commit', or abort the merge with 'git notes merge --abort'.
ok 14 - redo merge of z into m (== y) with default ("manual") resolver => Conflicting 3-way merge
expecting success:
git notes merge --abort &&
# No .git/NOTES_MERGE_* files left
test_might_fail ls .git/NOTES_MERGE_* >output 2>/dev/null &&
test_must_be_empty output &&
# m has not moved (still == y)
test "$(git rev-parse refs/notes/m)" = "$(cat pre_merge_y)" &&
# Verify that other notes refs has not changed (w, x, y and z)
verify_notes w &&
verify_notes x &&
verify_notes y &&
verify_notes z
ok 15 - abort notes merge
expecting success:
test_must_fail git notes merge z >output 2>&1 &&
# Output should point to where to resolve conflicts
test_i18ngrep "\\.git/NOTES_MERGE_WORKTREE" output &&
# Inspect merge conflicts
ls .git/NOTES_MERGE_WORKTREE >output_conflicts &&
test_cmp expect_conflicts output_conflicts &&
( for f in $(cat expect_conflicts); do
test_cmp "expect_conflict_$f" ".git/NOTES_MERGE_WORKTREE/$f" ||
exit 1
done ) &&
# Verify that current notes tree (pre-merge) has not changed (m == y)
verify_notes y &&
verify_notes m &&
test "$(git rev-parse refs/notes/m)" = "$(cat pre_merge_y)"
Automatic notes merge failed. Fix conflicts in .git/NOTES_MERGE_WORKTREE and commit the result with 'git notes merge --commit', or abort the merge with 'git notes merge --abort'.
ok 16 - redo merge of z into m (== y) with default ("manual") resolver => Conflicting 3-way merge
expecting success:
# Resolve one conflict
cat >.git/NOTES_MERGE_WORKTREE/$commit_sha1 <<EOF &&
y and z notes on 1st commit
EOF
# Remove another conflict
rm .git/NOTES_MERGE_WORKTREE/$commit_sha4 &&
# Remove a D/F conflict
rm .git/NOTES_MERGE_WORKTREE/$commit_sha3 &&
# Add a new note
echo "new note on 5th commit" > .git/NOTES_MERGE_WORKTREE/$commit_sha5 &&
# Finalize merge
git notes merge --commit &&
# No .git/NOTES_MERGE_* files left
test_might_fail ls .git/NOTES_MERGE_* >output 2>/dev/null &&
test_must_be_empty output &&
# Merge commit has pre-merge y and pre-merge z as parents
test "$(git rev-parse refs/notes/m^1)" = "$(cat pre_merge_y)" &&
test "$(git rev-parse refs/notes/m^2)" = "$(cat pre_merge_z)" &&
# Merge commit mentions the notes refs merged
git log -1 --format=%B refs/notes/m > merge_commit_msg &&
grep -q refs/notes/m merge_commit_msg &&
grep -q refs/notes/z merge_commit_msg &&
# Merge commit mentions conflicting notes
grep -q "Conflicts" merge_commit_msg &&
( for sha1 in $(cat expect_conflicts); do
grep -q "$sha1" merge_commit_msg ||
exit 1
done ) &&
# Verify contents of merge result
verify_notes m &&
# Verify that other notes refs has not changed (w, x, y and z)
verify_notes w &&
verify_notes x &&
verify_notes y &&
verify_notes z
ok 17 - add + remove notes in finalized merge (z => m)
expecting success:
git update-ref refs/notes/m refs/notes/y &&
test_must_fail git notes merge z >output 2>&1 &&
# Output should point to where to resolve conflicts
test_i18ngrep "\\.git/NOTES_MERGE_WORKTREE" output &&
# Inspect merge conflicts
ls .git/NOTES_MERGE_WORKTREE >output_conflicts &&
test_cmp expect_conflicts output_conflicts &&
( for f in $(cat expect_conflicts); do
test_cmp "expect_conflict_$f" ".git/NOTES_MERGE_WORKTREE/$f" ||
exit 1
done ) &&
# Verify that current notes tree (pre-merge) has not changed (m == y)
verify_notes y &&
verify_notes m &&
test "$(git rev-parse refs/notes/m)" = "$(cat pre_merge_y)"
Automatic notes merge failed. Fix conflicts in .git/NOTES_MERGE_WORKTREE and commit the result with 'git notes merge --commit', or abort the merge with 'git notes merge --abort'.
ok 18 - redo merge of z into m (== y) with default ("manual") resolver => Conflicting 3-way merge
expecting success:
git update-ref refs/notes/m refs/notes/w &&
verify_notes m &&
test "$(git rev-parse refs/notes/m)" = "$(git rev-parse refs/notes/w)"
ok 19 - reset notes ref m to somewhere else (w)
expecting success:
# Resolve conflicts
cat >.git/NOTES_MERGE_WORKTREE/$commit_sha1 <<EOF &&
y and z notes on 1st commit
EOF
cat >.git/NOTES_MERGE_WORKTREE/$commit_sha4 <<EOF &&
y and z notes on 4th commit
EOF
# Fail to finalize merge
test_must_fail git notes merge --commit >output 2>&1 &&
# .git/NOTES_MERGE_* must remain
test -f .git/NOTES_MERGE_PARTIAL &&
test -f .git/NOTES_MERGE_REF &&
test -f .git/NOTES_MERGE_WORKTREE/$commit_sha1 &&
test -f .git/NOTES_MERGE_WORKTREE/$commit_sha2 &&
test -f .git/NOTES_MERGE_WORKTREE/$commit_sha3 &&
test -f .git/NOTES_MERGE_WORKTREE/$commit_sha4 &&
# Refs are unchanged
test "$(git rev-parse refs/notes/m)" = "$(git rev-parse refs/notes/w)" &&
test "$(git rev-parse refs/notes/y)" = "$(git rev-parse NOTES_MERGE_PARTIAL^1)" &&
test "$(git rev-parse refs/notes/m)" != "$(git rev-parse NOTES_MERGE_PARTIAL^1)" &&
# Mention refs/notes/m, and its current and expected value in output
test_i18ngrep -q "refs/notes/m" output &&
test_i18ngrep -q "$(git rev-parse refs/notes/m)" output &&
test_i18ngrep -q "$(git rev-parse NOTES_MERGE_PARTIAL^1)" output &&
# Verify that other notes refs has not changed (w, x, y and z)
verify_notes w &&
verify_notes x &&
verify_notes y &&
verify_notes z
ok 20 - fail to finalize conflicting merge if underlying ref has moved in the meantime (m != NOTES_MERGE_PARTIAL^1)
expecting success:
git notes merge --abort &&
# No .git/NOTES_MERGE_* files left
test_might_fail ls .git/NOTES_MERGE_* >output 2>/dev/null &&
test_must_be_empty output &&
# m has not moved (still == w)
test "$(git rev-parse refs/notes/m)" = "$(git rev-parse refs/notes/w)" &&
# Verify that other notes refs has not changed (w, x, y and z)
verify_notes w &&
verify_notes x &&
verify_notes y &&
verify_notes z
ok 21 - resolve situation by aborting the notes merge
expecting success:
git notes add -m foo HEAD &&
git notes --ref=other add -m bar HEAD &&
test_must_fail git notes merge refs/notes/other &&
(
cd .git/NOTES_MERGE_WORKTREE &&
echo "foo" > $(git rev-parse HEAD) &&
echo "bar" >> $(git rev-parse HEAD) &&
git notes merge --commit
) &&
git notes show HEAD > actual_notes &&
test_cmp expect_notes actual_notes
Automatic notes merge failed. Fix conflicts in .git/NOTES_MERGE_WORKTREE and commit the result with 'git notes merge --commit', or abort the merge with 'git notes merge --abort'.
Auto-merging notes for 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
CONFLICT (add/add): Merge conflict in notes for object 7f9ad8836c775acb134c0a055fc55fb4cd1ba361
ok 22 - switch cwd before committing notes merge
# passed all 22 test(s)
1..22
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3320-notes-merge-worktrees.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3320-notes-merge-worktrees/.git/
expecting success:
test_commit tantrum
[master (root-commit) 02f8a63] tantrum
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 tantrum.t
ok 1 - setup commit
expecting success:
git config core.notesRef refs/notes/x &&
git notes add -m "x notes on tantrum" tantrum
ok 2 - setup notes ref (x)
expecting success:
git update-ref refs/notes/y refs/notes/x &&
git config core.notesRef refs/notes/y &&
git notes remove tantrum
Removing note for object tantrum
ok 3 - setup local branch (y)
expecting success:
git update-ref refs/notes/z refs/notes/x &&
git config core.notesRef refs/notes/z &&
git notes add -f -m "conflicting notes on tantrum" tantrum
Overwriting existing notes for object 02f8a63df5a5eb7863e18dffcbc422a31a01d39e
ok 4 - setup remote branch (z)
expecting success:
git config core.notesRef refs/notes/x &&
git notes add -f -m "more conflicting notes on tantrum" tantrum
Overwriting existing notes for object 02f8a63df5a5eb7863e18dffcbc422a31a01d39e
ok 5 - modify notes ref ourselves (x)
expecting success:
git worktree add -b newbranch worktree master &&
git worktree add -b newbranch2 worktree2 master
Preparing worktree (new branch 'newbranch')
HEAD is now at 02f8a63 tantrum
Preparing worktree (new branch 'newbranch2')
HEAD is now at 02f8a63 tantrum
ok 6 - create some new worktrees
expecting success:
git config core.notesRef refs/notes/y &&
test_must_fail git notes merge z &&
echo "ref: refs/notes/y" >expect &&
test_cmp expect .git/NOTES_MERGE_REF
Automatic notes merge failed. Fix conflicts in .git/NOTES_MERGE_WORKTREE and commit the result with 'git notes merge --commit', or abort the merge with 'git notes merge --abort'.
Auto-merging notes for 02f8a63df5a5eb7863e18dffcbc422a31a01d39e
CONFLICT (delete/modify): Notes for object 02f8a63df5a5eb7863e18dffcbc422a31a01d39e deleted in refs/notes/y and modified in refs/notes/z. Version from refs/notes/z left in tree.
ok 7 - merge z into y fails and sets NOTES_MERGE_REF
expecting success:
(
cd worktree &&
git config core.notesRef refs/notes/y &&
test_must_fail git notes merge z 2>err &&
test_i18ngrep "a notes merge into refs/notes/y is already in-progress at" err
) &&
test_path_is_missing .git/worktrees/worktree/NOTES_MERGE_REF
Auto-merging notes for 02f8a63df5a5eb7863e18dffcbc422a31a01d39e
CONFLICT (delete/modify): Notes for object 02f8a63df5a5eb7863e18dffcbc422a31a01d39e deleted in refs/notes/y and modified in refs/notes/z. Version from refs/notes/z left in tree.
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: a notes merge into refs/notes/y is already in-progress at /<<PKGBUILDDIR>>/t/trash directory.t3320-notes-merge-worktrees
ok 8 - merge z into y while mid-merge in another workdir fails
expecting success:
(
cd worktree2 &&
git config core.notesRef refs/notes/x &&
test_must_fail git notes merge z >out 2>&1 &&
test_i18ngrep "Automatic notes merge failed" out &&
grep -v "A notes merge into refs/notes/x is already in-progress in" out
) &&
echo "ref: refs/notes/x" >expect &&
test_cmp expect .git/worktrees/worktree2/NOTES_MERGE_REF
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Automatic notes merge failed. Fix conflicts in /<<PKGBUILDDIR>>/t/trash directory.t3320-notes-merge-worktrees/.git/worktrees/worktree2/NOTES_MERGE_WORKTREE and commit the result with 'git notes merge --commit', or abort the merge with 'git notes merge --abort'.
Automatic notes merge failed. Fix conflicts in /<<PKGBUILDDIR>>/t/trash directory.t3320-notes-merge-worktrees/.git/worktrees/worktree2/NOTES_MERGE_WORKTREE and commit the result with 'git notes merge --commit', or abort the merge with 'git notes merge --abort'.
Auto-merging notes for 02f8a63df5a5eb7863e18dffcbc422a31a01d39e
CONFLICT (content): Merge conflict in notes for object 02f8a63df5a5eb7863e18dffcbc422a31a01d39e
ok 9 - merge z into x while mid-merge on y succeeds
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3400-rebase.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3400-rebase/.git/
expecting success:
git config core.logAllRefUpdates true &&
echo First >A &&
git update-index --add A &&
git commit -m "Add A." &&
git checkout -b force-3way &&
echo Dummy >Y &&
git update-index --add Y &&
git commit -m "Add Y." &&
git checkout -b filemove &&
git reset --soft master &&
mkdir D &&
git mv A D/A &&
git commit -m "Move A." &&
git checkout -b my-topic-branch master &&
echo Second >B &&
git update-index --add B &&
git commit -m "Add B." &&
git checkout -f master &&
echo Third >>A &&
git update-index A &&
git commit -m "Modify A." &&
git checkout -b side my-topic-branch &&
echo Side >>C &&
git add C &&
git commit -m "Add C" &&
git checkout -f my-topic-branch &&
git tag topic
[master (root-commit) 76a5bef] Add A.
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+)
create mode 100644 A
Switched to a new branch 'force-3way'
[force-3way cb161db] Add Y.
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+)
create mode 100644 Y
Switched to a new branch 'filemove'
[filemove bd9b7b4] Move A.
Author: author@name <bogus@email@address>
2 files changed, 1 insertion(+)
rename A => D/A (100%)
create mode 100644 Y
Switched to a new branch 'my-topic-branch'
[my-topic-branch c99b46e] Add B.
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+)
create mode 100644 B
Switched to branch 'master'
[master c00fd01] Modify A.
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+)
Switched to a new branch 'side'
[side 19534d8] Add C
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+)
create mode 100644 C
Switched to branch 'my-topic-branch'
ok 1 - prepare repository with topic branches
expecting success:
echo dirty >>A &&
test_must_fail git rebase master
error: cannot rebase: You have unstaged changes.
error: Please commit or stash them.
ok 2 - rebase on dirty worktree
expecting success:
git add A &&
test_must_fail git rebase master
error: cannot rebase: Your index contains uncommitted changes.
error: Please commit or stash them.
ok 3 - rebase on dirty cache
expecting success:
git reset --hard HEAD &&
git rebase master
HEAD is now at c99b46e Add B.
First, rewinding head to replay your work on top of it...
Applying: Add B.
ok 4 - rebase against master
expecting success:
git checkout -b orig-head topic &&
pre="$(git rev-parse --verify HEAD)" &&
git rebase master &&
test_cmp_rev "$pre" ORIG_HEAD &&
! test_cmp_rev "$pre" HEAD
Switched to a new branch 'orig-head'
First, rewinding head to replay your work on top of it...
Applying: Add B.
error: two revisions point to different objects:
'c99b46e7f8729c0c0eaf6c3a899ac8b6227bce17': c99b46e7f8729c0c0eaf6c3a899ac8b6227bce17
'HEAD': 6eec2dc60eeee0500a2b5e4be220caa7623f035f
ok 5 - rebase sets ORIG_HEAD to pre-rebase state
expecting success:
test_when_finished "git branch -D torebase" &&
git checkout -b torebase my-topic-branch^ &&
upstream=$(git rev-parse ":/Add B") &&
onto=$(git rev-parse ":/Add A") &&
git rebase --onto $onto $upstream &&
git reset --hard my-topic-branch^ &&
git rebase --onto ":/Add A" ":/Add B" &&
git checkout my-topic-branch
Switched to a new branch 'torebase'
First, rewinding head to replay your work on top of it...
Applying: Modify A.
HEAD is now at c00fd01 Modify A.
First, rewinding head to replay your work on top of it...
Applying: Modify A.
Switched to branch 'my-topic-branch'
Deleted branch torebase (was a3b36c6).
ok 6 - rebase, with <onto> and <upstream> specified as :/quuxery
expecting success:
! (git log | grep "Author:" | grep "<>")
ok 7 - the rebase operation should not have destroyed author information
expecting success:
git log -1 |
grep 'Author: author@name <bogus@email@address>'
Author: author@name <bogus@email@address>
ok 8 - the rebase operation should not have destroyed author information (2)
expecting success:
test $(git rev-parse HEAD@{1}) != $(git rev-parse my-topic-branch@{1})
ok 9 - HEAD was detached during rebase
expecting success:
git checkout -b topic side &&
git rebase master
Switched to a new branch 'topic'
First, rewinding head to replay your work on top of it...
Applying: Add B.
Applying: Add C
ok 10 - rebase from ambiguous branch name
expecting success:
git checkout master &&
git checkout HEAD^ &&
git rebase @{-1} >expect.messages &&
git merge-base master HEAD >expect.forkpoint &&
git checkout master &&
git checkout HEAD^ &&
git rebase - >actual.messages &&
git merge-base master HEAD >actual.forkpoint &&
test_cmp expect.forkpoint actual.forkpoint &&
# the next one is dubious---we may want to say "-",
# instead of @{-1}, in the message
test_i18ncmp expect.messages actual.messages
Switched to branch 'master'
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 76a5bef Add A.
Switched to branch 'master'
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 76a5bef Add A.
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 11 - rebase off of the previous branch using "-"
expecting success:
git checkout master &&
git branch -D topic &&
echo 1 >X &&
git add X &&
test_tick &&
git commit -m prepare &&
git checkout -b modechange HEAD^ &&
echo 1 >X &&
git add X &&
test_chmod +x A &&
test_tick &&
git commit -m modechange &&
GIT_TRACE=1 git rebase master
Switched to branch 'master'
Deleted branch topic (was 67e79a6).
[master fdb0e0b] prepare
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+)
create mode 100644 X
Switched to a new branch 'modechange'
[modechange 37f5377] modechange
Author: author@name <bogus@email@address>
2 files changed, 1 insertion(+)
mode change 100644 => 100755 A
create mode 100644 X
trace: built-in: git rebase master
trace: run_command: git format-patch -k --stdout --full-index --cherry-pick --right-only --src-prefix=a/ --dst-prefix=b/ --no-renames --no-cover-letter --pretty=mboxrd --topo-order fdb0e0bc25bb2b0e9c92ac6f1d4f88de0a378a8b...37f5377779df7d0202a2b2f604a871576311ebe3
First, rewinding head to replay your work on top of it...
trace: built-in: git format-patch -k --stdout --full-index --cherry-pick --right-only --src-prefix=a/ --dst-prefix=b/ --no-renames --no-cover-letter --pretty=mboxrd --topo-order fdb0e0bc25bb2b0e9c92ac6f1d4f88de0a378a8b...37f5377779df7d0202a2b2f604a871576311ebe3
trace: run_command: git am --rebasing '--resolvemsg=Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".' --patch-format=mboxrd
trace: built-in: git am --rebasing '--resolvemsg=Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".' --patch-format=mboxrd
trace: run_command: git mailsplit -d4 -o.git/rebase-apply -b --mboxrd --
trace: built-in: git mailsplit -d4 -o.git/rebase-apply -b --mboxrd --
trace: run_command: git apply --build-fake-ancestor=.git/rebase-apply/patch-merge-index .git/rebase-apply/patch
Applying: modechange
trace: built-in: git apply --build-fake-ancestor=.git/rebase-apply/patch-merge-index .git/rebase-apply/patch
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
fdb0e0b prepare
virtual modechange
found 1 common ancestor:
virtual 20d8b2c6c42a40f913517c72113d9d08e124064a
trace: run_command: git gc --auto
trace: built-in: git gc --auto
ok 12 - rebase a single mode change
expecting success:
test_config diff.renames copies &&
git checkout filemove &&
GIT_TRACE=1 git rebase force-3way
Switched to branch 'filemove'
trace: built-in: git rebase force-3way
trace: run_command: git format-patch -k --stdout --full-index --cherry-pick --right-only --src-prefix=a/ --dst-prefix=b/ --no-renames --no-cover-letter --pretty=mboxrd --topo-order cb161db41b8c00e1566b9c82617d4509ef4d25a6...bd9b7b4f23f5ad0a2df1de2eac6a2689aa74d673
First, rewinding head to replay your work on top of it...
trace: built-in: git format-patch -k --stdout --full-index --cherry-pick --right-only --src-prefix=a/ --dst-prefix=b/ --no-renames --no-cover-letter --pretty=mboxrd --topo-order cb161db41b8c00e1566b9c82617d4509ef4d25a6...bd9b7b4f23f5ad0a2df1de2eac6a2689aa74d673
trace: run_command: git am --rebasing '--resolvemsg=Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".' --patch-format=mboxrd
trace: built-in: git am --rebasing '--resolvemsg=Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".' --patch-format=mboxrd
trace: run_command: git mailsplit -d4 -o.git/rebase-apply -b --mboxrd --
trace: built-in: git mailsplit -d4 -o.git/rebase-apply -b --mboxrd --
trace: run_command: git apply --build-fake-ancestor=.git/rebase-apply/patch-merge-index .git/rebase-apply/patch
Applying: Move A.
trace: built-in: git apply --build-fake-ancestor=.git/rebase-apply/patch-merge-index .git/rebase-apply/patch
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
cb161db Add Y.
virtual Move A.
found 1 common ancestor:
virtual 26395c6fe842cd8894b5dde87a6fb53cccfabc06
trace: run_command: git gc --auto
trace: built-in: git gc --auto
ok 13 - rebase is not broken by diff.renames
expecting success:
test_might_fail git rebase --abort &&
git reset --hard &&
git checkout modechange
fatal: No rebase in progress?
HEAD is now at 94810b7 Move A.
Switched to branch 'modechange'
ok 14 - setup: recover
expecting success:
>B &&
test_must_fail git rebase topic 2>output.err >output.out &&
test_i18ngrep "The following untracked working tree files would be overwritten by checkout:" output.err &&
test_i18ngrep B output.err
error: The following untracked working tree files would be overwritten by checkout:
B
ok 15 - Show verbose error when HEAD could not be detached
expecting success:
git checkout topic &&
test_must_fail git rebase
Note: switching to 'topic'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at c99b46e Add B.
You are not currently on a branch.
Please specify which branch you want to rebase against.
See git-rebase(1) for details.
git rebase '<branch>'
ok 16 - fail when upstream arg is missing and not on branch
expecting success:
git checkout -b no-config topic &&
test_must_fail git rebase
Switched to a new branch 'no-config'
There is no tracking information for the current branch.
Please specify which branch you want to rebase against.
See git-rebase(1) for details.
git rebase '<branch>'
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=<remote>/<branch> no-config
ok 17 - fail when upstream arg is missing and not configured
expecting success:
git checkout -b default-base master &&
git checkout -b default topic &&
git config branch.default.remote . &&
git config branch.default.merge refs/heads/default-base &&
git rebase &&
git rev-parse --verify default-base >expect &&
git rev-parse default~1 >actual &&
test_cmp expect actual &&
git checkout default-base &&
git reset --hard HEAD^ &&
git checkout default &&
git rebase &&
git rev-parse --verify default-base >expect &&
git rev-parse default~1 >actual &&
test_cmp expect actual
Switched to a new branch 'default-base'
Switched to a new branch 'default'
First, rewinding head to replay your work on top of it...
Applying: Add B.
Switched to branch 'default-base'
HEAD is now at c00fd01 Modify A.
Switched to branch 'default'
Your branch is ahead of 'default-base' by 2 commits.
(use "git push" to publish your local commits)
First, rewinding head to replay your work on top of it...
Applying: Add B.
ok 18 - default to common base in @{upstream}s reflog if no upstream arg
expecting success:
git checkout default-base &&
echo Amended >A &&
git commit -a --no-edit --amend &&
test_commit B B &&
test_commit new_B B "New B" &&
test_commit C C &&
git checkout default &&
git reset --hard default-base@{4} &&
test_commit D D &&
git cherry-pick -2 default-base^ &&
test_commit final_B B "Final B" &&
git rebase &&
echo Amended >expect &&
test_cmp expect A &&
echo "Final B" >expect &&
test_cmp expect B &&
echo C >expect &&
test_cmp expect C &&
echo D >expect &&
test_cmp expect D
Switched to branch 'default-base'
[default-base b8de778] Modify A.
Author: author@name <bogus@email@address>
Date: Wed Aug 14 07:26:34 2019 +0000
1 file changed, 1 insertion(+), 1 deletion(-)
[default-base c9902c3] B
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+)
create mode 100644 B
[default-base e36a0e3] new_B
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+), 1 deletion(-)
[default-base 082a106] C
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+)
create mode 100644 C
Switched to branch 'default'
Your branch and 'default-base' have diverged,
and have 2 and 4 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
HEAD is now at c00fd01 Modify A.
[default 84c5029] D
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+)
create mode 100644 D
[default 64ac4ad] B
Author: author@name <bogus@email@address>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 B
[default dd89c6a] new_B
Author: author@name <bogus@email@address>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
[default c8b91c6] final_B
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+), 1 deletion(-)
First, rewinding head to replay your work on top of it...
Applying: D
Applying: final_B
ok 19 - cherry-picked commits and fork-point work together
expecting success:
git checkout -b quiet topic &&
git rebase -q master >output.out 2>&1 &&
test_must_be_empty output.out
Switched to a new branch 'quiet'
ok 20 - rebase -q is quiet
expecting success:
(
echo "One" &&
echo "TwoQ" &&
echo "Three" &&
echo "FQur" &&
echo "Five"
) | q_to_cr >CR &&
git add CR &&
test_tick &&
git commit -a -m "A file with a line with CR" &&
git tag file-with-cr &&
git checkout HEAD^0 &&
git rebase --onto HEAD^^ HEAD^ &&
git diff --exit-code file-with-cr:CR HEAD:CR
[quiet 3083166] A file with a line with CR
Author: author@name <bogus@email@address>
1 file changed, 5 insertions(+)
create mode 100644 CR
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 3083166 A file with a line with CR
First, rewinding head to replay your work on top of it...
Applying: A file with a line with CR
ok 21 - Rebase a commit that sprinkles CRs in
expecting success:
git config notes.rewrite.rebase true &&
git config notes.rewriteRef "refs/notes/*" &&
test_commit n1 &&
test_commit n2 &&
test_commit n3 &&
git notes add -m"a note" n3 &&
git rebase --onto n1 n2 &&
test "a note" = "$(git notes show HEAD)"
[detached HEAD e50cd64] n1
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+)
create mode 100644 n1.t
[detached HEAD c561311] n2
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+)
create mode 100644 n2.t
[detached HEAD b7fb431] n3
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+)
create mode 100644 n3.t
First, rewinding head to replay your work on top of it...
Applying: n3
ok 22 - rebase can copy notes
expecting success:
git reset --hard n3 &&
git rebase -m --onto n1 n2 &&
test "a note" = "$(git notes show HEAD)"
HEAD is now at b7fb431 n3
Rebasing (1/1)
Successfully rebased and updated detached HEAD.
ok 23 - rebase -m can copy notes
expecting success:
git reset --hard &&
>old.one && git add old.one && test_tick &&
git commit --date="@12345 +0400" -m "Old one" &&
>old.two && git add old.two && test_tick &&
git commit --date="@23456 +0500" -m "Old two" &&
>old.three && git add old.three && test_tick &&
git commit --date="@34567 +0600" -m "Old three" &&
git cat-file commit HEAD^^ >actual &&
grep "author .* 12345 +0400$" actual &&
git cat-file commit HEAD^ >actual &&
grep "author .* 23456 +0500$" actual &&
git cat-file commit HEAD >actual &&
grep "author .* 34567 +0600$" actual &&
git rebase --onto HEAD^^ HEAD^ &&
git cat-file commit HEAD >actual &&
grep "author .* 34567 +0600$" actual
HEAD is now at 19826f4 n3
[detached HEAD 67fc4dc] Old one
Author: author@name <bogus@email@address>
Date: Thu Jan 1 07:25:45 1970 +0400
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 old.one
[detached HEAD 5c72d1c] Old two
Author: author@name <bogus@email@address>
Date: Thu Jan 1 11:30:56 1970 +0500
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 old.two
[detached HEAD 3d0d7f4] Old three
Author: author@name <bogus@email@address>
Date: Thu Jan 1 15:36:07 1970 +0600
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 old.three
author author@name <bogus@email@address> 12345 +0400
author author@name <bogus@email@address> 23456 +0500
author author@name <bogus@email@address> 34567 +0600
First, rewinding head to replay your work on top of it...
Applying: Old three
author author@name <bogus@email@address> 34567 +0600
ok 24 - rebase commit with an ancient timestamp
expecting success:
git checkout -b preserve-from master~1 &&
cat >From_.msg <<EOF &&
Somebody embedded an mbox in a commit message
This is from so-and-so:
From a@b Mon Sep 17 00:00:00 2001
From: John Doe <nobody@example.com>
Date: Sat, 11 Nov 2017 00:00:00 +0000
Subject: not this message
something
EOF
>From_ &&
git add From_ &&
git commit -F From_.msg &&
git rebase master &&
git log -1 --pretty=format:%B >out &&
test_cmp From_.msg out
Warning: you are leaving 3 commits behind, not connected to
any of your branches:
ce9cc21 Old three
67fc4dc Old one
19826f4 n3
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> ce9cc21
Switched to a new branch 'preserve-from'
[preserve-from 313d977] Somebody embedded an mbox in a commit message
Author: author@name <bogus@email@address>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 From_
First, rewinding head to replay your work on top of it...
Applying: Somebody embedded an mbox in a commit message
ok 25 - rebase with "From " line in commit message
expecting success:
test_create_repo conflict-apply &&
(
cd conflict-apply &&
test_commit init &&
echo one >>init.t &&
git commit -a -m one &&
echo two >>init.t &&
git commit -a -m two &&
git tag two &&
test_must_fail git rebase --onto init HEAD^ &&
GIT_TRACE=1 git rebase --show-current-patch >/dev/null 2>stderr &&
grep "show.*$(git rev-parse two)" stderr
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3400-rebase/conflict-apply/.git/
[master (root-commit) 080fbe0] init
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+)
create mode 100644 init.t
[master 61e26c1] one
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+)
[master 1bf3d8f] two
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+)
First, rewinding head to replay your work on top of it...
Applying: two
Using index info to reconstruct a base tree...
M init.t
Falling back to patching base and 3-way merge...
Merging:
080fbe0 init
virtual two
found 1 common ancestor:
virtual 24619c19508a6b9b476e2c46f4889f730a371ef0
Auto-merging init.t
CONFLICT (content): Merge conflict in init.t
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 two
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
trace: run_command: git show 1bf3d8fe33fb3e440d4f72b014f1eae094a4ac2c --
trace: built-in: git show 1bf3d8fe33fb3e440d4f72b014f1eae094a4ac2c --
ok 26 - rebase --am and --show-current-patch
expecting success:
test_create_repo conflict-merge &&
(
cd conflict-merge &&
test_commit init &&
echo one >>init.t &&
git commit -a -m one &&
echo two >>init.t &&
git commit -a -m two &&
git tag two &&
test_must_fail git rebase --merge --onto init HEAD^ &&
git rebase --show-current-patch >actual.patch &&
GIT_TRACE=1 git rebase --show-current-patch >/dev/null 2>stderr &&
grep "show.*REBASE_HEAD" stderr &&
test "$(git rev-parse REBASE_HEAD)" = "$(git rev-parse two)"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3400-rebase/conflict-merge/.git/
[master (root-commit) 080fbe0] init
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+)
create mode 100644 init.t
[master 61e26c1] one
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+)
[master 1bf3d8f] two
Author: author@name <bogus@email@address>
1 file changed, 1 insertion(+)
Rebasing (1/1)
Auto-merging init.t
CONFLICT (content): Merge conflict in init.t
error: could not apply 1bf3d8f... two
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 1bf3d8f... two
trace: run_command: git show REBASE_HEAD --
trace: built-in: git show REBASE_HEAD --
ok 27 - rebase--merge.sh and --show-current-patch
expecting success:
expected="rebase.useBuiltin support has been removed" &&
# Only warn when the legacy rebase is requested...
test_must_fail git -c rebase.useBuiltin=false rebase 2>err &&
test_i18ngrep "$expected" err &&
test_must_fail env GIT_TEST_REBASE_USE_BUILTIN=false git rebase 2>err &&
test_i18ngrep "$expected" err &&
# ...not when we would have used the built-in anyway
test_must_fail git -c rebase.useBuiltin=true rebase 2>err &&
test_must_be_empty err &&
test_must_fail env GIT_TEST_REBASE_USE_BUILTIN=true git rebase 2>err &&
test_must_be_empty err
There is no tracking information for the current branch.
Please specify which branch you want to rebase against.
See git-rebase(1) for details.
git rebase '<branch>'
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=<remote>/<branch> preserve-from
warning: the rebase.useBuiltin support has been removed!
There is no tracking information for the current branch.
Please specify which branch you want to rebase against.
See git-rebase(1) for details.
git rebase '<branch>'
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=<remote>/<branch> preserve-from
warning: the rebase.useBuiltin support has been removed!
There is no tracking information for the current branch.
Please specify which branch you want to rebase against.
See git-rebase(1) for details.
git rebase '<branch>'
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=<remote>/<branch> preserve-from
There is no tracking information for the current branch.
Please specify which branch you want to rebase against.
See git-rebase(1) for details.
git rebase '<branch>'
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=<remote>/<branch> preserve-from
ok 28 - rebase -c rebase.useBuiltin=false warning
# passed all 28 test(s)
1..28
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3401-rebase-and-am-rename.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3401-rebase-and-am-rename/.git/
expecting success:
test_create_repo dir-rename &&
(
cd dir-rename &&
mkdir x &&
test_seq 1 10 >x/a &&
test_seq 11 20 >x/b &&
test_seq 21 30 >x/c &&
test_write_lines a b c d e f g h i >l &&
git add x l &&
git commit -m "Initial" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv x y &&
git mv l letters &&
git commit -m "Rename x to y, l to letters" &&
git checkout B &&
echo j >>l &&
test_seq 31 40 >x/d &&
git add l x/d &&
git commit -m "Modify l, add x/d"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3401-rebase-and-am-rename/dir-rename/.git/
[master (root-commit) 5ed3270] Initial
Author: A U Thor <author@example.com>
4 files changed, 39 insertions(+)
create mode 100644 l
create mode 100644 x/a
create mode 100644 x/b
create mode 100644 x/c
Switched to branch 'A'
[A f332209] Rename x to y, l to letters
Author: A U Thor <author@example.com>
4 files changed, 0 insertions(+), 0 deletions(-)
rename l => letters (100%)
rename {x => y}/a (100%)
rename {x => y}/b (100%)
rename {x => y}/c (100%)
Switched to branch 'B'
[B c838d89] Modify l, add x/d
Author: A U Thor <author@example.com>
2 files changed, 11 insertions(+)
create mode 100644 x/d
ok 1 - setup testcase where directory rename should be detected
expecting success:
(
cd dir-rename &&
git checkout B^0 &&
set_fake_editor &&
FAKE_LINES="1" git -c merge.directoryRenames=true rebase --interactive A &&
git ls-files -s >out &&
test_line_count = 5 out &&
test_path_is_file y/d &&
test_path_is_missing x/d
)
Note: switching to 'B^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at c838d89 Modify l, add x/d
rebase -i script before editing:
pick c838d89 Modify l, add x/d
rebase -i script after editing:
pick c838d89 Modify l, add x/d
Rebasing (1/1)
Successfully rebased and updated detached HEAD.
ok 2 - rebase --interactive: directory rename detected
checking known breakage:
(
cd dir-rename &&
git checkout B^0 &&
git -c merge.directoryRenames=true rebase A &&
git ls-files -s >out &&
test_line_count = 5 out &&
test_path_is_file y/d &&
test_path_is_missing x/d
)
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
6062529 Modify l, add x/d
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> 6062529
HEAD is now at c838d89 Modify l, add x/d
First, rewinding head to replay your work on top of it...
Applying: Modify l, add x/d
Using index info to reconstruct a base tree...
A l
Falling back to patching base and 3-way merge...
Merging:
f332209 Rename x to y, l to letters
virtual Modify l, add x/d
found 1 common ancestor:
virtual 4f45812d96b9febe1d7595b91de345b0a05fb0d4
File y/d doesn't exist.
not ok 3 - rebase (am): directory rename detected # TODO known breakage
expecting success:
(
cd dir-rename &&
git checkout B^0 &&
git -c merge.directoryRenames=true rebase --merge A &&
git ls-files -s >out &&
test_line_count = 5 out &&
test_path_is_file y/d &&
test_path_is_missing x/d
)
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
4658810 Modify l, add x/d
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> 4658810
HEAD is now at c838d89 Modify l, add x/d
Rebasing (1/1)
Successfully rebased and updated detached HEAD.
ok 4 - rebase --merge: directory rename detected
checking known breakage:
(
cd dir-rename &&
git checkout A^0 &&
git format-patch -1 B &&
git -c merge.directoryRenames=true am --3way 0001*.patch &&
git ls-files -s >out &&
test_line_count = 5 out &&
test_path_is_file y/d &&
test_path_is_missing x/d
)
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
f408194 Modify l, add x/d
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> f408194
HEAD is now at f332209 Rename x to y, l to letters
0001-Modify-l-add-x-d.patch
Applying: Modify l, add x/d
Using index info to reconstruct a base tree...
A l
Falling back to patching base and 3-way merge...
Merging:
f332209 Rename x to y, l to letters
virtual Modify l, add x/d
found 1 common ancestor:
virtual 4f45812d96b9febe1d7595b91de345b0a05fb0d4
File y/d doesn't exist.
not ok 5 - am: directory rename detected # TODO known breakage
expecting success:
test_create_repo no-dir-rename &&
(
cd no-dir-rename &&
mkdir x &&
test_seq 1 10 >x/a &&
test_seq 11 20 >x/b &&
test_seq 21 30 >x/c &&
echo original >project_info &&
git add x project_info &&
git commit -m "Initial" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
echo v2 >project_info &&
git add project_info &&
git commit -m "Modify project_info" &&
git checkout B &&
mkdir y &&
git mv x/c y/c &&
echo v1 >project_info &&
git add project_info &&
git commit -m "Rename x/c to y/c, modify project_info"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3401-rebase-and-am-rename/no-dir-rename/.git/
[master (root-commit) 0e2ec8f] Initial
Author: A U Thor <author@example.com>
4 files changed, 31 insertions(+)
create mode 100644 project_info
create mode 100644 x/a
create mode 100644 x/b
create mode 100644 x/c
Switched to branch 'A'
[A cd95f7f] Modify project_info
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'B'
[B 3cd0cc7] Rename x/c to y/c, modify project_info
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
rename {x => y}/c (100%)
ok 6 - setup testcase where directory rename should NOT be detected
expecting success:
test_when_finished "git -C no-dir-rename rebase --abort" &&
(
cd no-dir-rename &&
git checkout B^0 &&
set_fake_editor &&
test_must_fail env FAKE_LINES="1" git rebase --interactive A &&
git ls-files -s >out &&
test_line_count = 6 out &&
test_path_is_file x/a &&
test_path_is_file x/b &&
test_path_is_missing x/c
)
Note: switching to 'B^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 3cd0cc7 Rename x/c to y/c, modify project_info
rebase -i script before editing:
pick 3cd0cc7 Rename x/c to y/c, modify project_info
rebase -i script after editing:
pick 3cd0cc7 Rename x/c to y/c, modify project_info
Rebasing (1/1)
Auto-merging project_info
CONFLICT (content): Merge conflict in project_info
error: could not apply 3cd0cc7... Rename x/c to y/c, modify project_info
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 3cd0cc7... Rename x/c to y/c, modify project_info
ok 7 - rebase --interactive: NO directory rename
expecting success:
test_when_finished "git -C no-dir-rename rebase --abort" &&
(
cd no-dir-rename &&
git checkout B^0 &&
set_fake_editor &&
test_must_fail git rebase A &&
git ls-files -s >out &&
test_line_count = 6 out &&
test_path_is_file x/a &&
test_path_is_file x/b &&
test_path_is_missing x/c
)
HEAD is now at 3cd0cc7 Rename x/c to y/c, modify project_info
First, rewinding head to replay your work on top of it...
Applying: Rename x/c to y/c, modify project_info
Using index info to reconstruct a base tree...
M project_info
Falling back to patching base and 3-way merge...
Merging:
cd95f7f Modify project_info
virtual Rename x/c to y/c, modify project_info
found 1 common ancestor:
virtual 70041a03917eeabc905137ab5853aed716a92bc6
Auto-merging project_info
CONFLICT (content): Merge conflict in project_info
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 Rename x/c to y/c, modify project_info
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
ok 8 - rebase (am): NO directory rename
expecting success:
test_when_finished "git -C no-dir-rename rebase --abort" &&
(
cd no-dir-rename &&
git checkout B^0 &&
set_fake_editor &&
test_must_fail git rebase --merge A &&
git ls-files -s >out &&
test_line_count = 6 out &&
test_path_is_file x/a &&
test_path_is_file x/b &&
test_path_is_missing x/c
)
HEAD is now at 3cd0cc7 Rename x/c to y/c, modify project_info
Rebasing (1/1)
Auto-merging project_info
CONFLICT (content): Merge conflict in project_info
error: could not apply 3cd0cc7... Rename x/c to y/c, modify project_info
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 3cd0cc7... Rename x/c to y/c, modify project_info
ok 9 - rebase --merge: NO directory rename
expecting success:
test_when_finished "git -C no-dir-rename am --abort" &&
(
cd no-dir-rename &&
git checkout A^0 &&
git format-patch -1 B &&
test_must_fail git am --3way 0001*.patch &&
git ls-files -s >out &&
test_line_count = 6 out &&
test_path_is_file x/a &&
test_path_is_file x/b &&
test_path_is_missing x/c
)
Previous HEAD position was 3cd0cc7 Rename x/c to y/c, modify project_info
HEAD is now at cd95f7f Modify project_info
0001-Rename-x-c-to-y-c-modify-project_info.patch
Applying: Rename x/c to y/c, modify project_info
Using index info to reconstruct a base tree...
M project_info
Falling back to patching base and 3-way merge...
Merging:
cd95f7f Modify project_info
virtual Rename x/c to y/c, modify project_info
found 1 common ancestor:
virtual 70041a03917eeabc905137ab5853aed716a92bc6
Auto-merging project_info
CONFLICT (content): Merge conflict in project_info
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 Rename x/c to y/c, modify project_info
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 10 - am: NO directory rename
# still have 2 known breakage(s)
# passed all remaining 8 test(s)
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3305-notes-fanout.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3305-notes-fanout/.git/
expecting success:
num_notes=300 &&
i=0 &&
while test $i -lt $num_notes
do
i=$(($i + 1)) &&
test_tick &&
echo "file for commit #$i" > file &&
git add file &&
git commit -q -m "commit #$i" &&
git notes add -m "note #$i" || return 1
done
ok 1 - creating many notes with git-notes
expecting success:
git log | grep "^ " > output &&
i=300 &&
while test $i -gt 0
do
echo " commit #$i" &&
echo " note #$i" &&
i=$(($i - 1));
done > expect &&
test_cmp expect output
ok 2 - many notes created correctly with git-notes
expecting success:
# Expect entire notes tree to have a fanout == 1
git ls-tree -r --name-only refs/notes/commits |
while read path
do
case "$path" in
??/??????????????????????????????????????)
: true
;;
*)
echo "Invalid path \"$path\"" &&
return 1
;;
esac
done
ok 3 - many notes created with git-notes triggers fanout
expecting success:
num_notes=250 &&
i=0 &&
git rev-list HEAD |
while test $i -lt $num_notes && read sha1
do
i=$(($i + 1)) &&
test_tick &&
git notes remove "$sha1" ||
exit 1
done
Removing note for object 854fb20b9d7dcaa80548bb9c8c3d8c3f6b0719d4
Removing note for object 200fae4018757111c0a8a5a92f363f20be7decc3
Removing note for object 7d219e25b693893b9d3808a38a0156a8fd225422
Removing note for object 8cae25a6a918d5f7e6d46fa93456a4c1251c6141
Removing note for object 1d0676baebb69788e6c92a458e69b6f2398795f6
Removing note for object 49564c28ac6df710aee85cba0cd6f926f6c7e453
Removing note for object 639a535bf80e6dd9d31bd60679de5bbf5f105d49
Removing note for object 624297b32f29ba1f4f943bd1991d9e28105d4b16
Removing note for object 947e5312513a5f368ac9f1ac84fa95a82365027f
Removing note for object 08cadb1987ea288fcb9fc8e50ab2db73031aa687
Removing note for object 39820b7c24dfdc2ce40c5ecfff5571a80e4c5f47
Removing note for object 5ee4152ac768ed7ad39636ac9fa6365abfe5b346
Removing note for object 385ea09d67fee0b88413bdc5aa9be3718938d022
Removing note for object e900f033cef5fb6f4148c507e1c5f0bd6fabcf48
Removing note for object fd85b59dd4b733d5efad4949e55865798e32a2e8
Removing note for object 9255f5214f6621e4e65172a3b451e1352f9c46d7
Removing note for object 7a4395a549bcabe028edf23408cfffcc11543e12
Removing note for object f324af807a75532bc567e84ff68621b9133830d2
Removing note for object e1e1a803687cc6b143e5940299a84400d94dec9a
Removing note for object 06af34e983844b389c7baed5f6e501c8185e990e
Removing note for object abe5beb280907a2887f37a860035436aed83ccf1
Removing note for object 0314f267e210671b1e3feff2f0af3d4935adf60a
Removing note for object c04519ee674bc0b92ac66cfba80e8f475b3fc386
Removing note for object b88db8824a2bf2dd452828b04c7d018bcb9589d5
Removing note for object a19f1a613ba01f69161de278f9ac914bdff88eab
Removing note for object a828af33c56b650725b709b5e3f701d8466e3b4a
Removing note for object 4b6ebf1f33b72a4dc49886fb89b0738530e6b634
Removing note for object e4f2d464bd3c5f85840d2e11af506f80f7f6e2a8
Removing note for object 580ab2e48c71a4ec87359b16b4b8590613676182
Removing note for object 7b6ec1d3969ea440bb83740f38cd69fdd5574793
Removing note for object ce60e6913571e1e6d20e03ec9c22db9a37bf8321
Removing note for object 1c3fad1c59de999bb6e21f9d49f90cc143974a83
Removing note for object fc6c354c992b4bbc9be797b08db9589793d213bc
Removing note for object d1f96781fe35c3384553726974c6077f8e274315
Removing note for object 5414ccb72e8f8a134a93a5e1615430fa4c5cea2a
Removing note for object c3ba6ecef5ca2aa7ff04a0a65d2afa47f5e1de12
Removing note for object 4bcf332903c4766e6602eec79fbba41db694aeb9
Removing note for object 5b1f9f2c09a25aca558c9e0cb37e351d674c440d
Removing note for object aac25280221d50de418b254851eece2dfebff969
Removing note for object c3705f05305eda98c99ee22de1e9e33c589097f8
Removing note for object 2d5e918dbc8c4892c24ba25ee2807f51f446611b
Removing note for object 0408a5712291f0db8f45430c1b585cabe45b4224
Removing note for object 3a9c6fce2183d03bcb0551f8bf81a41ce8fbd534
Removing note for object 1f88e10aa3a1d395e0543bfa59bbf05220c71db4
Removing note for object 25ff66539025aa98823d9ee038f6cb4892bf1fb5
Removing note for object 0da364524c240e0089baa38f16c711b35240fd57
Removing note for object 7bc603c4f23e35a0d82d3921408eececb05d671e
Removing note for object 40578788b551ff0dd9b9eee4bf00244a3e82fae4
Removing note for object ba037d4f7b23d892ddf3fb69f65daa7b1ce04419
Removing note for object 16b1618654b1b2f2036e510294edaf37145f5e17
Removing note for object 4e775bd4d8a7ef0381e55414046717ae0bca2128
Removing note for object 93e4d12470610c01d9585b03d7c08326c6fb1a8f
Removing note for object 90e80cd3c184dac514093c22fbfcb0a3870040f6
Removing note for object e144c821ba6b3b44fcd1633895072636537c933a
Removing note for object 55f1721c25adc31182d341d82b7289c34ecd4eb2
Removing note for object 978493ba09b63142bcd98617c67fc6c970ca302c
Removing note for object 8b321a102e20a4bddca37566663b6ec9e246ac64
Removing note for object 29ccbf44f205cd5ff48aca4072d6fd845b6c4716
Removing note for object 9a92477f30bbf5248212a031c3e910813b1a2db3
Removing note for object cc4ecd1f77a4e41df92a1d6597dd5122dc0b46a6
Removing note for object 963216b27d8d471c216f4c903c049e5ce5fdac47
Removing note for object fbdbb1b550acb25e4ce7c3bc6f65cbc91de44241
Removing note for object f7f1084ed7006d8843433333ef5055b2adfb5bb1
Removing note for object c87766b583ae086abd511f9e88821d41da3896d5
Removing note for object 33be48ce21601027fb8cde3c6e2d187fcea55571
Removing note for object 8031f54641552a3ad7dd038675834eadba5d7a38
Removing note for object 5526de2cf7102d43882cad71a0575df9c3ce236c
Removing note for object 1db1e2a43118764daf9190e3cad8c1796a71b3b6
Removing note for object b50b64c167ee83ff8a9566e71c6461c148d30582
Removing note for object 95772a637e6cc1d320564d23e879c6567682f59a
Removing note for object 3c63c8dc7def3d6a4b22743c8ed09cef8d4147c2
Removing note for object fb69d1d419d3e88876b2e677bbf8ccd7da8f01d2
Removing note for object df866016f9cd23fe3a8d96f4bca6d5b6776b1095
Removing note for object ec9330714addd1f3f1325166e373cbec7798faa0
Removing note for object ddb1318c0e9b02d7f5ada5b57d5d99690db58347
Removing note for object 0f010abe8ac41027fdd82b5d97d8d20968230f38
Removing note for object 10c04d4b6d6192116238ab18357460223136c73a
Removing note for object 9045e926f3cdf5b6d1915b88cbf388bbde0ad31a
Removing note for object 226e5fdf42381dc26a88f4984821e99b4e404137
Removing note for object be34f41e8d8bacf2ea4f0872bfb8348284b34130
Removing note for object 4d97cd50b4de11a36634454d555b89816af10a17
Removing note for object 85e625d2d7fc35cadec822f54867c684b63a7d71
Removing note for object 90efba6c53df64c07ffc07e7ce2a4f23e352eb88
Removing note for object 469093795f6f0fe36312a14df3b7ab1ccc0c35bf
Removing note for object cba3d318fe07b42721e7593b17f1c449e5c2f240
Removing note for object 056cdb6bdb72c1534f49feab5010b194ccba9dc8
Removing note for object e0d990e2fd3338f16956b9a2e72e73045bd745ab
Removing note for object 1b2fedd64114e8ebf7d8471cda4c324dfffc3c85
Removing note for object 993c654ef73a0e4ed802c6b0e29745d2299508ee
Removing note for object c31cd7d4c6dfae5e044e3c11bca7ed66d7197dcc
Removing note for object 7fe600f3692b9d97dadde89a2f1d08a0ffcc3602
Removing note for object 2f59d1fb1cd8df54d4000e91c50d27c555c245a6
Removing note for object 0110473cfeb6a4894b0457b6aca75543797e0ed3
Removing note for object dbf4ab2a968e38fe629b73331d194678ebd14036
Removing note for object f4c49ddff2b799959eeae06b6a640874beb60fd0
Removing note for object c1711837dcf0bcf93cccb7416ac28ef0cea04b50
Removing note for object 19e4e436c159d353664d6ecbc0e7f5b79b9d3d26
Removing note for object 2691dfa681eaf0e85480b0a3b77c998decf1c01a
Removing note for object f0f0538057240cc979517475b7cf8cb710f9899d
Removing note for object c0945c99795662e0e55e188d3ab36f599b92aa8c
Removing note for object a1591c0212bc193cd6c8b1e38fa214078fad6533
Removing note for object 485e2fa969f41fe446bfcc690d40eef68cc9658c
Removing note for object 380fbe740d51646342dedd80455e677efeab2606
Removing note for object caf193eed10e30dd698b64dff9ba95806daafeae
Removing note for object 4f7bcc29fe25fd03d0afe5122d2f23a494c2de92
Removing note for object 9875586f495475e0e2fe207ca60195ab1e4940bb
Removing note for object bbadc53dcdce0f607d09db9e301f118cf237a5c9
Removing note for object b235894482a0797fcecfe914ca809bd3d255ae71
Removing note for object 93014e8e87513c4c558a587e1c7d2660634ab631
Removing note for object acbd6300f13fee70a9367c9309f0c146a3262b85
Removing note for object 8177b71f61145307c45925d05b6a26c93671d84b
Removing note for object 7add7e518355f216f1f6cddbcbe5f9fa4dc77d6b
Removing note for object 1ef81327895ea6e4f19fc4132285728f8ea9a61f
Removing note for object 73c20b17fe7874494e3c77c21275c898d56f193d
Removing note for object d8972d68d0e3db75ce9aaf8c54ba5abdc496b6fd
Removing note for object 9f89917ff75e84e3e858585f2da4319cec352d81
Removing note for object 6a89826cac65ff99275d8901dc4c25e492982af3
Removing note for object 8bb15e65b3991d361f5c8b300993fb47ab5d84e8
Removing note for object d16b7b8a64a6b7f041215854711b3bf2c72a77f0
Removing note for object 4cfa50d5d4837bc47ddfb0a8304447534769c169
Removing note for object 14fdf2369ba07615c54aa799c639041cb0851572
Removing note for object d26fc2348f9457757a0f1d0d67e7bcfee25c7631
Removing note for object 0c2d2f03d0600d5eaccd2dbed6717274ba8d43a2
Removing note for object 3c1d753e385fa868514c439438e94de3da1473c4
Removing note for object cc8047bae109bb33b1b67a5e9c6198a0f71178e6
Removing note for object 5ae9ca25b6fc42e14aa0695a2678065afc3db3f4
Removing note for object 989815f696ed2ee03e461bc4aedce119cccbdb67
Removing note for object 6742814c2a98f4c2de209034e9f06bfcf4b9e563
Removing note for object 659c73affbf54496483ef3b88fb099872ff2c6c3
Removing note for object 4bb6de84877eb87d499d9ad9a8ee0ab3b3cc02e3
Removing note for object f7b11911f4739b270cb2147aeeef10454234817f
Removing note for object 4aa6bf04bdc1a050c658b9ed7a463285302531a5
Removing note for object 798b896992bd4432404bcc77476b5664a73a4fd5
Removing note for object ff7d168602a59c57ece46da1fd8cc6f12c9de54b
Removing note for object 9f027ed6e69c7b0067303a3bf57977f0c90c693c
Removing note for object d726ae3816b7977b48b19bfdd1d1cb51b645b418
Removing note for object 048de3e70ecf601e0e3038f1435eb7a6591effc0
Removing note for object 61357f089446a216f83d1e926e2fa2bfea6c8e01
Removing note for object d44207e76cfdfa5f111a7a3ed6cad3989e627bdf
Removing note for object 2ad68764e49946ef164b5bccd452428096f61174
Removing note for object 13897d2b6067286c9904cbea9d03fff5755a46b3
Removing note for object 58ce609a332186c88af1324ae30ff11490c59595
Removing note for object 43af7ee63538db2151a1341b71a9f77de73aee67
Removing note for object 9f9992f0edd96c5ea639acf77d9e5b34d7b5ee86
Removing note for object 9e55ec3cc97444141551079f461c5166c4f490b8
Removing note for object 3284ff763e2cb720085cf0ce868f3e5fb92b489b
Removing note for object 9d7d752892d8e0e8b8f9f1978e5987388003f039
Removing note for object 97ebdcc0635a179a2a610c41edda8a79197757dd
Removing note for object 5de5ca14df95545379cb2c270977c7169b5d8e00
Removing note for object 15ce6550074713a3779b0faee4c91c7788f2b8d0
Removing note for object 4c9c25c1c9231a38d7fd72574f0c18096fa08778
Removing note for object 1ab52ac18c59bff8c14a04b68b6ae1dc5d3500af
Removing note for object b5016129acfddf7f6b6c7b38b846c73904e8d730
Removing note for object 2604195b51dd30fdfb0735d7a75e28f6a83750d6
Removing note for object 88647f9a79013152b0f22d19bf65a26428199dcd
Removing note for object eb172f669f5ab6afeff671a04ebbe1ff73b23b5b
Removing note for object f7fc92137d90956060ca13be2b51d606074e8bad
Removing note for object b8734aad512081134bb2d2c7beb30886a526750b
Removing note for object 3ced41967bcc7724cbe8b20fdb5dbb68d2d5b737
Removing note for object 2e27720e46e1a55de5d19437ff9efcc34dc4ea31
Removing note for object 82c68076b3ad95450772a3fcd5d637b4ce6c771b
Removing note for object 4fe43a72413f0480b78c7d2f429190f260cf8322
Removing note for object 43d64298e033e7f2e13d8e481dd5daa0116e07ef
Removing note for object a648f0737cfa015e29f067edca76d783681c4a85
Removing note for object 64fe931feaf50a6b1faa2cc2e33d193b7d1b84ca
Removing note for object 2ca4619fe11731a2b91f5dffc6f40ea568d16c9f
Removing note for object 8fc47225e1642ef62782a484248e5f9616fb1f44
Removing note for object ca9a31a763907e395d7a4e18336933a56e26d2f6
Removing note for object 907b908cd3d9b08d2622734acb5a609b4c28e725
Removing note for object 5518deeb20ed2e51705967f65ab6bafc51724a6a
Removing note for object 53d4c9839624d3781a7715bf748ca74b65e594ec
Removing note for object 8ec05e9f1292feb78fbddb75abdc832080e3c81a
Removing note for object 052dc1876538654b80b4b2accad5802c1ba2e989
Removing note for object ab54081944bdc0c75584c0abb73e68a652cc1061
Removing note for object ce5880a3135a30a6ddf964d6cd42ca46a282d214
Removing note for object f6918e5940e3141d1673ca7df7e6cf0045dcaec0
Removing note for object 848b6059f11ca83d3d46366bf6530065ddd639a4
Removing note for object bea0c28c009f310c2ba45833c0e32d84a86215ce
Removing note for object 04fc9a8e454da77881614184c95bb931398584d5
Removing note for object 05033398c05e56c4bee8b9fb5a9964b418c3fe53
Removing note for object 4338039a875b7a347faf47e0125b3bd521ec37b1
Removing note for object 53fb7902d8eb93a97c4c468e0a9ec26e02181094
Removing note for object 492fb8bd8e511f684cf4814163968ba41f21bd6a
Removing note for object 34238bfe26b514f16d3642360e06e2f8caf93d01
Removing note for object a662cb6d2bf390f731cb48b4b5b9fc255704bd51
Removing note for object 994bf981ffdb4aec475cf4698071f4e5bc9a5f5c
Removing note for object fd1833ffb225f021e6b780ade6719dedfdac03f7
Removing note for object 1e008ec90a144c1a55d67d4182546f2a76f5aaf4
Removing note for object 28c48c82afe4d61f7ffb90a0d0525fcd12a6b733
Removing note for object b23a388efbde108d2ff7b49e7d713248f6b13934
Removing note for object 7a18c00c2fd401cbd5a173627bf8a323fa5093b1
Removing note for object e141ba47d7bc5af5494826f331dcf478f515c832
Removing note for object 501c5a2632fe9b5910bbd36b7e10f21939112cd5
Removing note for object fa72dea14c026dadb9a6a5478b1c66e1753d7387
Removing note for object 3e8a170967bf4d0f1175761fb9e83fe457e1490c
Removing note for object 224d2db2986a7a1e23059bbd0c13d9f38d24b5ad
Removing note for object 69120f7a0bd6104a678d99f0622af9a5afeaa4a1
Removing note for object 87317dba836b40f673606bc458cfcb32f6444b77
Removing note for object c3fe4ddece9187a9b48e2e8a1d91c36d68a361a5
Removing note for object 37c6de9471b2b749fc14c943b27b4f49578bd709
Removing note for object 5604fa1ee57e2caed9fa477488e882ecbe760d4d
Removing note for object 7dae2e0002c87a78e8f4bd9874ed40f0c63d5ac2
Removing note for object ce653ed06af737ed15666e87968d6d62150bdbc3
Removing note for object b8ccff7802b95043ac522363ef387d15b8024708
Removing note for object 6e508180802c403e32d37352623fc7d430484fd4
Removing note for object 976918c7ebcbbfeaf6c7a4089093a4684c53d7a7
Removing note for object 6c422f13003f2cfc5be8d515711009c31c02b189
Removing note for object 9a04cd31480e2602f44a1e74c33ae5c605ac5147
Removing note for object 957391d2c69845865b4f122f079900fbf823c2b7
Removing note for object 0cd299e45bb4709ea1cb36f7aa67ec00488a0b7e
Removing note for object c34b5de2070bd5f59dc615ed22a045fc24209d68
Removing note for object 679b38877386a772d1fb54e55b74973ff5fadf26
Removing note for object c426f6599dc64f513890687cee6659e9f2326e03
Removing note for object 32f64a7a74308a88f26076eb863d7e1cc25db7ed
Removing note for object c515cdc10146949a121ec7d5a333c757e4ef2504
Removing note for object cfc4917130f2cc2681956507da1e1fe4b2f15527
Removing note for object 887a830a1766dc64123467ef38c1a1f809c2cefe
Removing note for object 34481f2ed4378c94bcdccfc1456e59d179e244a9
Removing note for object 2eb6a7cd807a4293fd35648c75044216ccc6ae80
Removing note for object 172059174199b4e733e3223b94adfe1ba0214952
Removing note for object 2ea9f2ed864e157d1c0e6048777c57a0ac2e54d3
Removing note for object 95a216b87992cc1c0f9fbf9fcb8a79e1586d195c
Removing note for object c2a2268ec9f704fcc2a006504fc5ec7bfe76e94e
Removing note for object 343c6341ea84792314deda891657ed8739e3fada
Removing note for object 849eb8f361d17186b71830fbe22b79586058eb74
Removing note for object 7835bffb91c2a59efb1bdabc64404985c235d09f
Removing note for object 0ef965de1ea8542ee31d00d15786e2b94410221e
Removing note for object b68e409dd76226bd14f7dcaddeb437f827a318e2
Removing note for object 988c9859a3b58b94be180a5a563aca9df5b79a37
Removing note for object 7b305811b52ca742180d3fd835f2bbae83c04eec
Removing note for object f131f5a4bc07b251f6e9267c9100610cb3ca5559
Removing note for object 83e55281b21b8461ac450f9ce29cf0939abf5cfc
Removing note for object 601bc579d928b5220982f41ec9a3d732363bdaba
Removing note for object f4744725293c0fb2a7f9c9445fd24adc8f88d5b1
Removing note for object 8a835fbbd02d3ab4f84e6597549382bc195ff397
Removing note for object f391efbe8795fa919a06c97e7c233c331ffb0316
Removing note for object 0df0388f3e81567589dd986e41d615356de703d7
Removing note for object 8ac95266183ec39c83f380a140e3abac5f33725a
Removing note for object c4720417ad9d861573974413a6215765dfab901c
Removing note for object 8d4fc83d3fdb22818f90e6ea7d88979474f49f02
Removing note for object edbea587c93ce562ba9ab42ff6d308daf84894e8
Removing note for object 450aa4b2a6e7238f5ef8a18930e9574ecc570ad0
Removing note for object 23567c85eb402f9b30792bfc0bbb82d295b498bb
Removing note for object 5260386902a703f76811d1bf0a794cf9fb0ac999
Removing note for object 8021bdbd7fd57e8dcb8644b85909739ccfe98e36
Removing note for object 2d537957e4d7a68077c05cb626afadccd1328158
Removing note for object cee1681393ad01c2c9c6f3f701570ec46237453b
Removing note for object cbb9ea240225a17164edb02ffdbaf7e23b8a0786
Removing note for object 392e37fca867d463085bd2345a112cdb157a8369
Removing note for object d8793dcb744793954696daf2188c04060523a1c0
ok 4 - deleting most notes with git-notes
expecting success:
git log HEAD~250 | grep "^ " > output &&
i=50 &&
while test $i -gt 0
do
echo " commit #$i" &&
echo " note #$i" &&
i=$(($i - 1));
done > expect &&
test_cmp expect output
ok 5 - most notes deleted correctly with git-notes
expecting success:
# Expect entire notes tree to have a fanout == 0
git ls-tree -r --name-only refs/notes/commits |
while read path
do
case "$path" in
????????????????????????????????????????)
: true
;;
*)
echo "Invalid path \"$path\"" &&
return 1
;;
esac
done
ok 6 - deleting most notes triggers fanout consolidation
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3402-rebase-merge.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3402-rebase-merge/.git/
expecting success:
git add original &&
git commit -m"initial" &&
git branch side &&
echo "11 $T" >>original &&
git commit -a -m"master updates a bit." &&
echo "12 $T" >>original &&
git commit -a -m"master updates a bit more." &&
git checkout side &&
(echo "0 $T" && cat original) >renamed &&
git add renamed &&
git update-index --force-remove original &&
git commit -a -m"side renames and edits." &&
tr "[a-z]" "[A-Z]" <original >newfile &&
git add newfile &&
git commit -a -m"side edits further." &&
git branch second-side &&
tr "[a-m]" "[A-M]" <original >newfile &&
rm -f original &&
git commit -a -m"side edits once again." &&
git branch test-rebase side &&
git branch test-rebase-pick side &&
git branch test-reference-pick side &&
git branch test-conflicts side &&
git checkout -b test-merge side
[master (root-commit) 93614c5] initial
Author: A U Thor <author@example.com>
1 file changed, 20 insertions(+)
create mode 100644 original
[master 9dc32c2] master updates a bit.
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
[master affb89a] master updates a bit more.
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
Switched to branch 'side'
[side b4e1a87] side renames and edits.
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
rename original => renamed (90%)
[side 6c25875] side edits further.
Author: A U Thor <author@example.com>
1 file changed, 20 insertions(+)
create mode 100644 newfile
[side f44e510] side edits once again.
Author: A U Thor <author@example.com>
1 file changed, 20 insertions(+), 20 deletions(-)
rewrite newfile (100%)
Switched to a new branch 'test-merge'
ok 1 - setup
expecting success:
git merge -s recursive -m "reference merge" master
Merging:
f44e510 side edits once again.
virtual master
found 1 common ancestor:
93614c5 initial
Auto-merging renamed
Merge made by the 'recursive' strategy.
renamed | 4 ++++
1 file changed, 4 insertions(+)
ok 2 - reference merge
expecting success:
git checkout test-rebase &&
GIT_TRACE=1 git rebase --merge master
Switched to branch 'test-rebase'
trace: built-in: git rebase --merge master
trace: run_command: GIT_REFLOG_ACTION='rebase -i (start): checkout master' git checkout affb89a45be605e4bec9cb1b548b13a0560279cd
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
trace: run_command: git notes copy --for-rewrite=rebase
trace: built-in: git notes copy --for-rewrite=rebase
Successfully rebased and updated refs/heads/test-rebase.
ok 3 - rebase
expecting success:
test $PRE_REBASE = $(git rev-parse test-rebase@{1})
ok 4 - test-rebase@{1} is pre rebase
expecting success:
git diff-tree -r test-rebase test-merge >difference &&
if test -s difference
then
cat difference
(exit 1)
else
echo happy
fi
happy
ok 5 - merge and rebase should match
expecting success:
git reset --hard master &&
git rebase --merge side
HEAD is now at affb89a master updates a bit more.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/test-rebase.
ok 6 - rebase the other way
expecting success:
git checkout -b conflicting master~2 &&
echo "AB $T" >> original &&
git commit -mconflicting original &&
git rebase -Xtheirs master &&
grep AB original &&
! grep 11 original
Switched to a new branch 'conflicting'
[conflicting ae1431c] conflicting
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
Rebasing (1/1)
Successfully rebased and updated refs/heads/conflicting.
AB A quick brown fox
ok 7 - rebase -Xtheirs
expecting success:
git checkout --orphan orphan-conflicting master~2 &&
echo "AB $T" >> original &&
git commit -morphan-conflicting original &&
git rebase -Xtheirs master &&
grep AB original &&
! grep 11 original
Switched to a new branch 'orphan-conflicting'
[orphan-conflicting (root-commit) 197a9cd] orphan-conflicting
Author: A U Thor <author@example.com>
1 file changed, 22 insertions(+)
create mode 100644 original
Rebasing (1/1)
Successfully rebased and updated refs/heads/orphan-conflicting.
AB A quick brown fox
ok 8 - rebase -Xtheirs from orphan
expecting success:
git diff-tree -r test-rebase test-merge >difference &&
if test -s difference
then
cat difference
(exit 1)
else
echo happy
fi
happy
ok 9 - merge and rebase should match
expecting success:
git reset --hard side &&
git rebase --merge --onto master side^^ &&
mb=$(git merge-base master HEAD) &&
if test "$mb" = "$(git rev-parse master)"
then
echo happy
else
git show-branch
(exit 1)
fi &&
f=$(git diff-tree --name-only HEAD^ HEAD) &&
g=$(git diff-tree --name-only HEAD^^ HEAD^) &&
case "$f,$g" in
newfile,newfile)
echo happy ;;
*)
echo "$f"
echo "$g"
(exit 1)
esac
HEAD is now at f44e510 side edits once again.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/orphan-conflicting.
happy
happy
ok 10 - picking rebase
expecting success:
test_when_finished "rm -fr test-bin funny.was.run" &&
mkdir test-bin &&
cat >test-bin/git-merge-funny <<-EOF &&
#!$SHELL_PATH
case "\$1" in --opt) ;; *) exit 2 ;; esac
shift &&
>funny.was.run &&
exec git merge-recursive "\$@"
EOF
chmod +x test-bin/git-merge-funny &&
git reset --hard &&
git checkout -b test-funny master^ &&
test_commit funny &&
(
PATH=./test-bin:$PATH &&
git rebase -s funny -Xopt master
) &&
test -f funny.was.run
HEAD is now at 0b9f793 side edits once again.
Switched to a new branch 'test-funny'
[test-funny cb933d2] funny
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 funny.t
Rebasing (1/1)
Merging affb89a45be605e4bec9cb1b548b13a0560279cd with cb933d295ffc6039f1a8981a1fc36c0b7cf69203
Merging:
affb89a master updates a bit more.
cb933d2 funny
found 1 common ancestor:
9dc32c2 master updates a bit.
Successfully rebased and updated refs/heads/test-funny.
ok 11 - rebase -s funny -Xopt
expecting success:
git checkout second-side &&
tr "[A-Z]" "[a-z]" <newfile >tmp &&
mv tmp newfile &&
git commit -a -m"edit conflicting with side" &&
tr "[d-f]" "[D-F]" <newfile >tmp &&
mv tmp newfile &&
git commit -a -m"another edit conflicting with side" &&
test_must_fail git rebase --merge test-conflicts &&
test_must_fail git rebase --skip &&
git rebase --skip
Switched to branch 'second-side'
[second-side 497fdfb] edit conflicting with side
Author: A U Thor <author@example.com>
1 file changed, 20 insertions(+), 20 deletions(-)
rewrite newfile (100%)
[second-side 9f75341] another edit conflicting with side
Author: A U Thor <author@example.com>
1 file changed, 20 insertions(+), 20 deletions(-)
rewrite newfile (100%)
Rebasing (1/2)
Auto-merging newfile
CONFLICT (content): Merge conflict in newfile
error: could not apply 497fdfb... edit conflicting with side
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 497fdfb... edit conflicting with side
Rebasing (2/2)
Auto-merging newfile
CONFLICT (content): Merge conflict in newfile
error: could not apply 9f75341... another edit conflicting with side
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 9f75341... another edit conflicting with side
Successfully rebased and updated refs/heads/second-side.
ok 12 - rebase --skip works with two conflicts in a row
# passed all 12 test(s)
1..12
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3311-notes-merge-fanout.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3311-notes-merge-fanout/.git/
expecting success:
git config core.notesRef refs/notes/x &&
for i in 1 2 3 4 5
do
test_commit "commit$i" >/dev/null &&
git notes add -m "notes for commit$i" || return 1
done
ok 1 - setup a few initial commits with notes (notes ref: x)
expecting success:
verify_notes x commit5 &&
verify_no_fanout x
ok 2 - sanity check (x)
expecting success:
git update-ref refs/notes/y refs/notes/x &&
git config core.notesRef refs/notes/y &&
test_commit_bulk --start=6 --id=commit $((num - 5)) &&
i=0 &&
while test $i -lt $((num - 5))
do
git notes add -m "notes for commit$i" HEAD~$i || return 1
i=$((i + 1))
done &&
test "$(git rev-parse refs/notes/y)" != "$(git rev-parse refs/notes/x)" &&
# Expected number of commits and notes
test $(git rev-list HEAD | wc -l) = $num &&
test $(git notes list | wc -l) = $num &&
# 5 first notes unchanged
verify_notes y commit5
f6db73397fcc379ea00d1fc17a35abb42027a69a
/<<PKGBUILDDIR>>/git-fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects: 5000
Total objects: 885 ( 0 duplicates )
blobs : 295 ( 0 duplicates 0 deltas of 0 attempts)
trees : 295 ( 0 duplicates 289 deltas of 289 attempts)
commits: 295 ( 0 duplicates 0 deltas of 0 attempts)
tags : 0 ( 0 duplicates 0 deltas of 0 attempts)
Total branches: 1 ( 1 loads )
marks: 1024 ( 0 unique )
atoms: 300
Memory total: 2395 KiB
pools: 2122 KiB
objects: 273 KiB
---------------------------------------------------------------------
pack_report: getpagesize() = 4096
pack_report: core.packedGitWindowSize = 33554432
pack_report: core.packedGitLimit = 268435456
pack_report: pack_used_ctr = 296
pack_report: pack_mmap_calls = 1
pack_report: pack_open_windows = 1 / 1
pack_report: pack_mapped = 86456 / 86456
---------------------------------------------------------------------
ok 3 - Add a few hundred commits w/notes to trigger fanout (x -> y)
expecting success: verify_fanout y
ok 4 - notes tree has fanout (y)
expecting success:
git update-ref refs/notes/m refs/notes/y &&
git config core.notesRef refs/notes/m &&
git notes merge x &&
test "$(git rev-parse refs/notes/m)" = "$(git rev-parse refs/notes/y)"
Already up to date!
ok 5 - No-op merge (already included) (x => y)
expecting success:
git update-ref refs/notes/m refs/notes/x &&
git notes merge y &&
test "$(git rev-parse refs/notes/m)" = "$(git rev-parse refs/notes/y)"
Fast-forward
ok 6 - Fast-forward merge (y => x)
expecting success:
git update-ref refs/notes/z refs/notes/x &&
git config core.notesRef refs/notes/z &&
git notes add -f -m "new notes for commit2" commit2 &&
git notes append -m "appended notes for commit3" commit3 &&
git notes remove commit4 &&
git notes remove commit5 &&
verify_notes z commit5
Overwriting existing notes for object 94955c5cd7e5662c6ab40c323ecdfac458c47435
Removing note for object commit4
Removing note for object commit5
ok 7 - change some of the initial 5 notes (x -> z)
expecting success: verify_no_fanout z
ok 8 - notes tree has no fanout (z)
expecting success:
git update-ref refs/notes/m refs/notes/z &&
git config core.notesRef refs/notes/m &&
git notes merge y &&
verify_notes m commit5 &&
# x/y/z unchanged
verify_notes x commit5 &&
verify_notes y commit5 &&
verify_notes z commit5
ok 9 - successful merge without conflicts (y => z)
expecting success: verify_fanout m
ok 10 - notes tree still has fanout after merge (m)
expecting success:
git update-ref refs/notes/w refs/notes/y &&
git config core.notesRef refs/notes/w &&
git notes add -f -m "other notes for commit1" commit1 &&
git notes add -f -m "other notes for commit3" commit3 &&
git notes add -f -m "other notes for commit4" commit4 &&
git notes remove commit5 &&
verify_notes w commit5
Overwriting existing notes for object ef004cfa88883bb87e030b6196934dd90e3548d2
Overwriting existing notes for object e0851358fb6b4703f23d74ef964bc4491bec7ab9
Overwriting existing notes for object 157e8cc0aeac5befb302d276f2e706112bf6e413
Removing note for object commit5
ok 11 - introduce conflicting changes (y -> w)
expecting success:
git update-ref refs/notes/m refs/notes/w &&
git config core.notesRef refs/notes/m &&
git notes merge -s ours z &&
verify_notes m commit5 &&
# w/x/y/z unchanged
verify_notes w commit5 &&
verify_notes x commit5 &&
verify_notes y commit5 &&
verify_notes z commit5
Using local notes for 157e8cc0aeac5befb302d276f2e706112bf6e413
Using local notes for e0851358fb6b4703f23d74ef964bc4491bec7ab9
ok 12 - successful merge using "ours" strategy (z => w)
expecting success: verify_fanout m
ok 13 - notes tree still has fanout after merge (m)
expecting success:
git update-ref refs/notes/m refs/notes/w &&
git notes merge -s theirs z &&
verify_notes m commit5 &&
# w/x/y/z unchanged
verify_notes w commit5 &&
verify_notes x commit5 &&
verify_notes y commit5 &&
verify_notes z commit5
Using remote notes for 157e8cc0aeac5befb302d276f2e706112bf6e413
Using remote notes for e0851358fb6b4703f23d74ef964bc4491bec7ab9
ok 14 - successful merge using "theirs" strategy (z => w)
expecting success: verify_fanout m
ok 15 - notes tree still has fanout after merge (m)
expecting success:
git update-ref refs/notes/m refs/notes/w &&
git notes merge -s union z &&
verify_notes m commit5 &&
# w/x/y/z unchanged
verify_notes w commit5 &&
verify_notes x commit5 &&
verify_notes y commit5 &&
verify_notes z commit5
Concatenating local and remote notes for 157e8cc0aeac5befb302d276f2e706112bf6e413
Concatenating local and remote notes for e0851358fb6b4703f23d74ef964bc4491bec7ab9
ok 16 - successful merge using "union" strategy (z => w)
expecting success: verify_fanout m
ok 17 - notes tree still has fanout after merge (m)
expecting success:
git update-ref refs/notes/m refs/notes/w &&
git notes merge -s cat_sort_uniq z &&
verify_notes m commit5 &&
# w/x/y/z unchanged
verify_notes w commit5 &&
verify_notes x commit5 &&
verify_notes y commit5 &&
verify_notes z commit5
Concatenating unique lines in local and remote notes for 157e8cc0aeac5befb302d276f2e706112bf6e413
Concatenating unique lines in local and remote notes for e0851358fb6b4703f23d74ef964bc4491bec7ab9
ok 18 - successful merge using "cat_sort_uniq" strategy (z => w)
expecting success: verify_fanout m
ok 19 - notes tree still has fanout after merge (m)
expecting success:
git update-ref refs/notes/m refs/notes/w &&
test_must_fail git notes merge z
Automatic notes merge failed. Fix conflicts in .git/NOTES_MERGE_WORKTREE and commit the result with 'git notes merge --commit', or abort the merge with 'git notes merge --abort'.
Auto-merging notes for 157e8cc0aeac5befb302d276f2e706112bf6e413
CONFLICT (delete/modify): Notes for object 157e8cc0aeac5befb302d276f2e706112bf6e413 deleted in refs/notes/z and modified in refs/notes/m. Version from refs/notes/m left in tree.
Auto-merging notes for e0851358fb6b4703f23d74ef964bc4491bec7ab9
CONFLICT (content): Merge conflict in notes for object e0851358fb6b4703f23d74ef964bc4491bec7ab9
ok 20 - fails to merge using "manual" strategy (z => w)
expecting success: verify_fanout m
ok 21 - notes tree still has fanout after merge (m)
expecting success:
ls .git/NOTES_MERGE_WORKTREE >output_conflicts &&
test_cmp expect_conflicts output_conflicts &&
( for f in $(cat expect_conflicts); do
test_cmp "expect_conflict_$f" ".git/NOTES_MERGE_WORKTREE/$f" ||
exit 1
done ) &&
# Verify that current notes tree (pre-merge) has not changed (m == w)
test "$(git rev-parse refs/notes/m)" = "$(git rev-parse refs/notes/w)"
ok 22 - verify conflict entries (with no fanout)
expecting success:
cat >.git/NOTES_MERGE_WORKTREE/$commit_sha3 <<EOF &&
other notes for commit3
appended notes for commit3
EOF
git notes merge --commit &&
verify_notes m commit5 &&
# w/x/y/z unchanged
verify_notes w commit5 &&
verify_notes x commit5 &&
verify_notes y commit5 &&
verify_notes z commit5
ok 23 - resolve and finalize merge (z => w)
expecting success: verify_fanout m
ok 24 - notes tree still has fanout after merge (m)
# passed all 24 test(s)
1..24
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3403-rebase-skip.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3403-rebase-skip/.git/
expecting success:
echo hello > hello &&
git add hello &&
git commit -m "hello" &&
git branch skip-reference &&
echo world >> hello &&
git commit -a -m "hello world" &&
echo goodbye >> hello &&
git commit -a -m "goodbye" &&
git checkout -f skip-reference &&
echo moo > hello &&
git commit -a -m "we should skip this" &&
echo moo > cow &&
git add cow &&
git commit -m "this should not be skipped" &&
git branch pre-rebase skip-reference &&
git branch skip-merge skip-reference
[master (root-commit) 1046abc] hello
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 hello
[master b669237] hello world
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 017d184] goodbye
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'skip-reference'
[skip-reference 0a2c0ab] we should skip this
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[skip-reference f686c92] this should not be skipped
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 cow
ok 1 - setup
expecting success:
test_must_fail git rebase master
First, rewinding head to replay your work on top of it...
Applying: we should skip this
Using index info to reconstruct a base tree...
M hello
Falling back to patching base and 3-way merge...
Merging:
017d184 goodbye
virtual we should skip this
found 1 common ancestor:
virtual b4d01e9b0c4a9356736dfddf8830ba9a54f5271c
Auto-merging hello
CONFLICT (content): Merge conflict in hello
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 we should skip this
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
ok 2 - rebase with git am -3 (default)
expecting success:
test_must_fail git rebase -v --skip &&
test_must_fail git rebase --skip -v
usage: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>]
or: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]
or: git rebase --continue | --abort | --skip | --edit-todo
--onto <revision> rebase onto given branch instead of upstream
--no-verify allow pre-rebase hook to run
-q, --quiet be quiet. implies --no-stat
-v, --verbose display a diffstat of what changed upstream
-n, --no-stat do not show diffstat of what changed upstream
--signoff add a Signed-off-by: line to each commit
--ignore-whitespace passed to 'git am'
--committer-date-is-author-date
passed to 'git am'
--ignore-date passed to 'git am'
-C <n> passed to 'git apply'
--whitespace <action>
passed to 'git apply'
-f, --force-rebase cherry-pick all commits, even if unchanged
--no-ff cherry-pick all commits, even if unchanged
--continue continue
--skip skip current patch and continue
--abort abort and check out the original branch
--quit abort but keep HEAD where it is
--edit-todo edit the todo list during an interactive rebase
--show-current-patch show the patch file being applied or merged
-m, --merge use merging strategies to rebase
-i, --interactive let the user edit the list of commits to rebase
-p, --preserve-merges
(DEPRECATED) try to recreate merges instead of ignoring them
--rerere-autoupdate update the index with reused conflict resolution if possible
-k, --keep-empty preserve empty commits during rebase
--autosquash move commits that begin with squash!/fixup! under -i
-S, --gpg-sign[=<key-id>]
GPG-sign commits
--autostash automatically stash/stash pop before and after
-x, --exec <exec> add exec lines after each commit of the editable list
--allow-empty-message
allow rebasing commits with empty messages
-r, --rebase-merges[=<mode>]
try to rebase merges instead of skipping them
--fork-point use 'merge-base --fork-point' to refine upstream
-s, --strategy <strategy>
use the given merge strategy
-X, --strategy-option <option>
pass the argument through to the merge strategy
--root rebase all reachable commits up to the root(s)
--reschedule-failed-exec
automatically re-schedule any `exec` that fails
usage: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>]
or: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]
or: git rebase --continue | --abort | --skip | --edit-todo
--onto <revision> rebase onto given branch instead of upstream
--no-verify allow pre-rebase hook to run
-q, --quiet be quiet. implies --no-stat
-v, --verbose display a diffstat of what changed upstream
-n, --no-stat do not show diffstat of what changed upstream
--signoff add a Signed-off-by: line to each commit
--ignore-whitespace passed to 'git am'
--committer-date-is-author-date
passed to 'git am'
--ignore-date passed to 'git am'
-C <n> passed to 'git apply'
--whitespace <action>
passed to 'git apply'
-f, --force-rebase cherry-pick all commits, even if unchanged
--no-ff cherry-pick all commits, even if unchanged
--continue continue
--skip skip current patch and continue
--abort abort and check out the original branch
--quit abort but keep HEAD where it is
--edit-todo edit the todo list during an interactive rebase
--show-current-patch show the patch file being applied or merged
-m, --merge use merging strategies to rebase
-i, --interactive let the user edit the list of commits to rebase
-p, --preserve-merges
(DEPRECATED) try to recreate merges instead of ignoring them
--rerere-autoupdate update the index with reused conflict resolution if possible
-k, --keep-empty preserve empty commits during rebase
--autosquash move commits that begin with squash!/fixup! under -i
-S, --gpg-sign[=<key-id>]
GPG-sign commits
--autostash automatically stash/stash pop before and after
-x, --exec <exec> add exec lines after each commit of the editable list
--allow-empty-message
allow rebasing commits with empty messages
-r, --rebase-merges[=<mode>]
try to rebase merges instead of skipping them
--fork-point use 'merge-base --fork-point' to refine upstream
-s, --strategy <strategy>
use the given merge strategy
-X, --strategy-option <option>
pass the argument through to the merge strategy
--root rebase all reachable commits up to the root(s)
--reschedule-failed-exec
automatically re-schedule any `exec` that fails
ok 3 - rebase --skip can not be used with other options
expecting success:
git rebase --skip
Applying: this should not be skipped
ok 4 - rebase --skip with am -3
expecting success:
test refs/heads/skip-reference = $(git symbolic-ref HEAD) &&
git branch post-rebase &&
git reset --hard pre-rebase &&
test_must_fail git rebase master &&
echo "hello" > hello &&
git add hello &&
git rebase --continue &&
test refs/heads/skip-reference = $(git symbolic-ref HEAD) &&
git reset --hard post-rebase
HEAD is now at f686c92 this should not be skipped
First, rewinding head to replay your work on top of it...
Applying: we should skip this
Using index info to reconstruct a base tree...
M hello
Falling back to patching base and 3-way merge...
Merging:
017d184 goodbye
virtual we should skip this
found 1 common ancestor:
virtual b4d01e9b0c4a9356736dfddf8830ba9a54f5271c
Auto-merging hello
CONFLICT (content): Merge conflict in hello
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 we should skip this
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Applying: we should skip this
Applying: this should not be skipped
HEAD is now at 44bb347 this should not be skipped
ok 5 - rebase moves back to skip-reference
expecting success: git checkout -f skip-merge
Switched to branch 'skip-merge'
ok 6 - checkout skip-merge
expecting success:
test_must_fail git rebase --merge master
Rebasing (1/2)
Auto-merging hello
CONFLICT (content): Merge conflict in hello
error: could not apply 0a2c0ab... we should skip this
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 0a2c0ab... we should skip this
ok 7 - rebase with --merge
expecting success:
git rebase --skip
Rebasing (2/2)
Successfully rebased and updated refs/heads/skip-merge.
ok 8 - rebase --skip with --merge
expecting success:
test -z "$(git diff-tree skip-merge skip-reference)"
ok 9 - merge and reference trees equal
expecting success:
test refs/heads/skip-merge = $(git symbolic-ref HEAD)
ok 10 - moved back to branch correctly
# passed all 10 test(s)
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3405-rebase-malformed.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3405-rebase-malformed/.git/
expecting success:
>file1 &&
>file2 &&
git add file1 file2 &&
test_tick &&
git commit -m "Initial commit" &&
git branch diff-in-message &&
git branch empty-message-merge &&
git checkout -b multi-line-subject &&
cat F >file2 &&
git add file2 &&
test_tick &&
git commit -F F &&
git cat-file commit HEAD | sed -e "1,/^\$/d" >F0 &&
git checkout diff-in-message &&
echo "commit log message containing a diff" >G &&
echo "" >>G &&
cat G >file2 &&
git add file2 &&
git diff --cached >>G &&
test_tick &&
git commit -F G &&
git cat-file commit HEAD | sed -e "1,/^\$/d" >G0 &&
git checkout empty-message-merge &&
echo file3 >file3 &&
git add file3 &&
git commit --allow-empty-message -m "" &&
git checkout master &&
echo One >file1 &&
test_tick &&
git add file1 &&
git commit -m "Second commit"
[master (root-commit) a8d727e] Initial commit
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file1
create mode 100644 file2
Switched to a new branch 'multi-line-subject'
[multi-line-subject 5037af6] This is an example of a commit log message that does not conform to git commit convention.
Author: A U Thor <author@example.com>
1 file changed, 5 insertions(+)
Switched to branch 'diff-in-message'
[diff-in-message 132c17c] commit log message containing a diff
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
Switched to branch 'empty-message-merge'
[empty-message-merge 942c0ff]
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
Switched to branch 'master'
[master d5181bc] Second commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
git rebase master multi-line-subject &&
git cat-file commit HEAD | sed -e "1,/^\$/d" >F1 &&
test_cmp F0 F1 &&
test_cmp F F0
First, rewinding head to replay your work on top of it...
Applying: This is an example of a commit log message
ok 2 - rebase commit with multi-line subject
expecting success:
git rebase master diff-in-message &&
git cat-file commit HEAD | sed -e "1,/^$/d" >G1 &&
test_cmp G0 G1 &&
test_cmp G G0
First, rewinding head to replay your work on top of it...
Applying: commit log message containing a diff
ok 3 - rebase commit with diff in message
expecting success:
git rebase -m master empty-message-merge
Rebasing (1/1)
Successfully rebased and updated refs/heads/empty-message-merge.
ok 4 - rebase -m commit with empty message
expecting success:
git checkout diff-in-message &&
set_fake_editor &&
test_must_fail env FAKE_COMMIT_MESSAGE=" " FAKE_LINES="reword 1" \
git rebase -i HEAD^
Switched to branch 'diff-in-message'
rebase -i script before editing:
pick 87b000b commit log message containing a diff
rebase -i script after editing:
reword 87b000b commit log message containing a diff
Rebasing (1/1)
Aborting commit due to empty commit message.
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
ok 5 - rebase -i commit with empty message
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3406-rebase-message.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3406-rebase-message/.git/
expecting success:
test_commit O fileO &&
test_commit X fileX &&
test_commit A fileA &&
test_commit B fileB &&
test_commit Y fileY &&
git checkout -b topic O &&
git cherry-pick A B &&
test_commit Z fileZ &&
git tag start
[master (root-commit) 3749684] O
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileO
[master a2df67f] X
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileX
[master 9491ce3] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileA
[master 83a6553] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileB
[master 545b0d0] Y
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileY
Switched to a new branch 'topic'
[topic 80ec5e8] A
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 fileA
[topic 4ff7882] B
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 fileB
[topic dd88760] Z
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileZ
ok 1 - setup
expecting success:
git rebase -m master >report &&
>expect &&
sed -n -e "/^Already applied: /p" \
-e "/^Committed: /p" report >actual &&
test_cmp expect actual
Rebasing (1/1)
Successfully rebased and updated refs/heads/topic.
ok 2 - rebase -m
expecting success:
git rebase master >out &&
test_i18ngrep "Current branch topic is up to date" out
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Current branch topic is up to date.
ok 3 - rebase against master twice
expecting success:
git rebase --force-rebase master >out &&
test_i18ngrep "Current branch topic is up to date, rebase forced" out
Current branch topic is up to date, rebase forced.
ok 4 - rebase against master twice with --force
expecting success:
git checkout topic^ &&
git rebase master topic >out &&
test_i18ngrep "Current branch topic is up to date" out
Note: switching to 'topic^'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 545b0d0 Y
Current branch topic is up to date.
ok 5 - rebase against master twice from another branch
expecting success:
git checkout topic^ &&
git rebase topic >out &&
test_i18ngrep "Fast-forwarded HEAD to topic" out
Note: switching to 'topic^'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 545b0d0 Y
Fast-forwarded HEAD to topic.
ok 6 - rebase fast-forward to master
expecting success:
git reset --hard start &&
git rebase --stat master >diffstat.txt &&
grep "^ fileX | *1 +$" diffstat.txt
HEAD is now at dd88760 Z
fileX | 1 +
ok 7 - rebase --stat
expecting success:
git reset --hard start &&
git config rebase.stat true &&
git rebase master >diffstat.txt &&
grep "^ fileX | *1 +$" diffstat.txt
HEAD is now at dd88760 Z
fileX | 1 +
ok 8 - rebase w/config rebase.stat
expecting success:
git reset --hard start &&
git config rebase.stat true &&
git rebase -n master >diffstat.txt &&
! grep "^ fileX | *1 +$" diffstat.txt
HEAD is now at dd88760 Z
ok 9 - rebase -n overrides config rebase.stat config
expecting success:
test_must_fail git rebase --onto invalid-ref HEAD HEAD 2>err &&
test_i18ngrep "invalid-ref" err
fatal: Does not point to a valid commit 'invalid-ref'
ok 10 - rebase --onto outputs the invalid ref
expecting success:
test_must_fail git rebase -Cnot-a-number HEAD 2>err &&
test_i18ngrep "numerical value" err &&
test_must_fail git rebase --whitespace=bad HEAD 2>err &&
test_i18ngrep "Invalid whitespace option" err
fatal: switch `C' expects a numerical value
fatal: Invalid whitespace option: 'bad'
ok 11 - error out early upon -C<n> or --whitespace=<bad>
expecting success:
git checkout start &&
test_commit reflog-onto &&
git checkout -b reflog-topic start &&
test_commit reflog-to-rebase &&
git rebase reflog-onto &&
git log -g --format=%gs -3 >actual &&
cat >expect <<-\EOF &&
rebase finished: returning to refs/heads/reflog-topic
rebase: reflog-to-rebase
rebase: checkout reflog-onto
EOF
test_cmp expect actual &&
git checkout -b reflog-prefix reflog-to-rebase &&
GIT_REFLOG_ACTION=change-the-reflog git rebase reflog-onto &&
git log -g --format=%gs -3 >actual &&
cat >expect <<-\EOF &&
rebase finished: returning to refs/heads/reflog-prefix
change-the-reflog: reflog-to-rebase
change-the-reflog: checkout reflog-onto
EOF
test_cmp expect actual
Previous HEAD position was 102672f Z
HEAD is now at dd88760 Z
[detached HEAD de4658a] reflog-onto
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 reflog-onto.t
Previous HEAD position was de4658a reflog-onto
Switched to a new branch 'reflog-topic'
[reflog-topic d91d0e4] reflog-to-rebase
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 reflog-to-rebase.t
reflog-onto.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 reflog-onto.t
First, rewinding head to replay your work on top of it...
Applying: reflog-to-rebase
Switched to a new branch 'reflog-prefix'
reflog-onto.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 reflog-onto.t
First, rewinding head to replay your work on top of it...
Applying: reflog-to-rebase
ok 12 - GIT_REFLOG_ACTION
expecting success:
git init unrelated &&
test_commit -C unrelated 1 &&
git -C unrelated remote add -f origin "$PWD" &&
git -C unrelated branch --set-upstream-to=origin/master &&
git -C unrelated -c core.editor=true rebase -i -v --stat >actual &&
test_i18ngrep "Changes to " actual &&
test_i18ngrep "5 files changed" actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3406-rebase-message/unrelated/.git/
[master (root-commit) 11730cb] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1.t
Updating origin
warning: no common commits
From /<<PKGBUILDDIR>>/t/trash directory.t3406-rebase-message
* [new branch] master -> origin/master
* [new branch] reflog-prefix -> origin/reflog-prefix
* [new branch] reflog-topic -> origin/reflog-topic
* [new branch] topic -> origin/topic
* [new tag] Y -> Y
* [new tag] A -> A
* [new tag] B -> B
* [new tag] O -> O
* [new tag] X -> X
* [new tag] Z -> Z
* [new tag] reflog-onto -> reflog-onto
* [new tag] start -> start
Branch 'master' set up to track remote branch 'master' from 'origin'.
Note: switching to '545b0d0a5d2af9b721d265dc5293dbb3418ab768'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 545b0d0 Y
Rebasing (1/1)
Successfully rebased and updated refs/heads/master.
Changes to 545b0d0a5d2af9b721d265dc5293dbb3418ab768:
5 files changed, 5 insertions(+)
5 files changed, 5 insertions(+)
ok 13 - rebase -i onto unrelated history
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3407-rebase-abort.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3407-rebase-abort/.git/
expecting success:
mkdir -p "$work_dir" &&
cd "$work_dir" &&
git init &&
echo a > a &&
git add a &&
git commit -m a &&
git branch to-rebase &&
echo b > a &&
git commit -a -m b &&
echo c > a &&
git commit -a -m c &&
git checkout to-rebase &&
echo d > a &&
git commit -a -m "merge should fail on this" &&
echo e > a &&
git commit -a -m "merge should fail on this, too" &&
git branch pre-rebase
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3407-rebase-abort/test dir/.git/
[master (root-commit) 6446a1a] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
[master 94c4091] b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 15ae2f7] c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'to-rebase'
[to-rebase 033279b] merge should fail on this
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[to-rebase c9f6693] merge should fail on this, too
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
cd "$work_dir" &&
# Clean up the state from the previous one
git reset --hard pre-rebase &&
test_must_fail git rebase$type master &&
test_path_is_dir "$dotest" &&
git rebase --abort &&
test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
test ! -d "$dotest"
HEAD is now at c9f6693 merge should fail on this, too
First, rewinding head to replay your work on top of it...
Applying: merge should fail on this
Using index info to reconstruct a base tree...
M a
Falling back to patching base and 3-way merge...
Merging:
15ae2f7 c
virtual merge should fail on this
found 1 common ancestor:
virtual aaff74984cccd156a469afa7d9ab10e4777beb24
Auto-merging a
CONFLICT (content): Merge conflict in a
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 merge should fail on this
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
ok 2 - rebase --abort
expecting success:
cd "$work_dir" &&
# Clean up the state from the previous one
git reset --hard pre-rebase &&
test_must_fail git rebase$type master &&
test_path_is_dir "$dotest" &&
test_must_fail git rebase --skip &&
test $(git rev-parse HEAD) = $(git rev-parse master) &&
git rebase --abort &&
test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
test ! -d "$dotest"
HEAD is now at c9f6693 merge should fail on this, too
First, rewinding head to replay your work on top of it...
Applying: merge should fail on this
Using index info to reconstruct a base tree...
M a
Falling back to patching base and 3-way merge...
Merging:
15ae2f7 c
virtual merge should fail on this
found 1 common ancestor:
virtual aaff74984cccd156a469afa7d9ab10e4777beb24
Auto-merging a
CONFLICT (content): Merge conflict in a
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 merge should fail on this
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Applying: merge should fail on this, too
Using index info to reconstruct a base tree...
M a
Falling back to patching base and 3-way merge...
Merging:
15ae2f7 c
virtual merge should fail on this, too
found 1 common ancestor:
virtual f788de73cfc81f8d734fa7efc658cc63ca083f50
Auto-merging a
CONFLICT (content): Merge conflict in a
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0002 merge should fail on this, too
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
ok 3 - rebase --abort after --skip
expecting success:
cd "$work_dir" &&
# Clean up the state from the previous one
git reset --hard pre-rebase &&
test_must_fail git rebase$type master &&
test_path_is_dir "$dotest" &&
echo c > a &&
echo d >> a &&
git add a &&
test_must_fail git rebase --continue &&
test $(git rev-parse HEAD) != $(git rev-parse master) &&
git rebase --abort &&
test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
test ! -d "$dotest"
HEAD is now at c9f6693 merge should fail on this, too
First, rewinding head to replay your work on top of it...
Applying: merge should fail on this
Using index info to reconstruct a base tree...
M a
Falling back to patching base and 3-way merge...
Merging:
15ae2f7 c
virtual merge should fail on this
found 1 common ancestor:
virtual aaff74984cccd156a469afa7d9ab10e4777beb24
Auto-merging a
CONFLICT (content): Merge conflict in a
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 merge should fail on this
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Applying: merge should fail on this
Applying: merge should fail on this, too
Using index info to reconstruct a base tree...
M a
Falling back to patching base and 3-way merge...
Merging:
8bf41bf merge should fail on this
virtual merge should fail on this, too
found 1 common ancestor:
virtual f788de73cfc81f8d734fa7efc658cc63ca083f50
Auto-merging a
CONFLICT (content): Merge conflict in a
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0002 merge should fail on this, too
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
ok 4 - rebase --abort after --continue
expecting success:
cd "$work_dir" &&
# Clean up the state from the previous one
git reset --hard pre-rebase &&
git reflog show to-rebase > reflog_before &&
test_must_fail git rebase$type master &&
git rebase --abort &&
git reflog show to-rebase > reflog_after &&
test_cmp reflog_before reflog_after &&
rm reflog_before reflog_after
HEAD is now at c9f6693 merge should fail on this, too
First, rewinding head to replay your work on top of it...
Applying: merge should fail on this
Using index info to reconstruct a base tree...
M a
Falling back to patching base and 3-way merge...
Merging:
15ae2f7 c
virtual merge should fail on this
found 1 common ancestor:
virtual aaff74984cccd156a469afa7d9ab10e4777beb24
Auto-merging a
CONFLICT (content): Merge conflict in a
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 merge should fail on this
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
ok 5 - rebase --abort does not update reflog
expecting success:
cd "$work_dir" &&
# Clean up the state from the previous one
git reset --hard pre-rebase &&
test_must_fail git rebase$type master &&
test_must_fail git rebase -v --abort &&
test_must_fail git rebase --abort -v &&
git rebase --abort
HEAD is now at c9f6693 merge should fail on this, too
First, rewinding head to replay your work on top of it...
Applying: merge should fail on this
Using index info to reconstruct a base tree...
M a
Falling back to patching base and 3-way merge...
Merging:
15ae2f7 c
virtual merge should fail on this
found 1 common ancestor:
virtual aaff74984cccd156a469afa7d9ab10e4777beb24
Auto-merging a
CONFLICT (content): Merge conflict in a
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 merge should fail on this
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
usage: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>]
or: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]
or: git rebase --continue | --abort | --skip | --edit-todo
--onto <revision> rebase onto given branch instead of upstream
--no-verify allow pre-rebase hook to run
-q, --quiet be quiet. implies --no-stat
-v, --verbose display a diffstat of what changed upstream
-n, --no-stat do not show diffstat of what changed upstream
--signoff add a Signed-off-by: line to each commit
--ignore-whitespace passed to 'git am'
--committer-date-is-author-date
passed to 'git am'
--ignore-date passed to 'git am'
-C <n> passed to 'git apply'
--whitespace <action>
passed to 'git apply'
-f, --force-rebase cherry-pick all commits, even if unchanged
--no-ff cherry-pick all commits, even if unchanged
--continue continue
--skip skip current patch and continue
--abort abort and check out the original branch
--quit abort but keep HEAD where it is
--edit-todo edit the todo list during an interactive rebase
--show-current-patch show the patch file being applied or merged
-m, --merge use merging strategies to rebase
-i, --interactive let the user edit the list of commits to rebase
-p, --preserve-merges
(DEPRECATED) try to recreate merges instead of ignoring them
--rerere-autoupdate update the index with reused conflict resolution if possible
-k, --keep-empty preserve empty commits during rebase
--autosquash move commits that begin with squash!/fixup! under -i
-S, --gpg-sign[=<key-id>]
GPG-sign commits
--autostash automatically stash/stash pop before and after
-x, --exec <exec> add exec lines after each commit of the editable list
--allow-empty-message
allow rebasing commits with empty messages
-r, --rebase-merges[=<mode>]
try to rebase merges instead of skipping them
--fork-point use 'merge-base --fork-point' to refine upstream
-s, --strategy <strategy>
use the given merge strategy
-X, --strategy-option <option>
pass the argument through to the merge strategy
--root rebase all reachable commits up to the root(s)
--reschedule-failed-exec
automatically re-schedule any `exec` that fails
usage: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>]
or: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]
or: git rebase --continue | --abort | --skip | --edit-todo
--onto <revision> rebase onto given branch instead of upstream
--no-verify allow pre-rebase hook to run
-q, --quiet be quiet. implies --no-stat
-v, --verbose display a diffstat of what changed upstream
-n, --no-stat do not show diffstat of what changed upstream
--signoff add a Signed-off-by: line to each commit
--ignore-whitespace passed to 'git am'
--committer-date-is-author-date
passed to 'git am'
--ignore-date passed to 'git am'
-C <n> passed to 'git apply'
--whitespace <action>
passed to 'git apply'
-f, --force-rebase cherry-pick all commits, even if unchanged
--no-ff cherry-pick all commits, even if unchanged
--continue continue
--skip skip current patch and continue
--abort abort and check out the original branch
--quit abort but keep HEAD where it is
--edit-todo edit the todo list during an interactive rebase
--show-current-patch show the patch file being applied or merged
-m, --merge use merging strategies to rebase
-i, --interactive let the user edit the list of commits to rebase
-p, --preserve-merges
(DEPRECATED) try to recreate merges instead of ignoring them
--rerere-autoupdate update the index with reused conflict resolution if possible
-k, --keep-empty preserve empty commits during rebase
--autosquash move commits that begin with squash!/fixup! under -i
-S, --gpg-sign[=<key-id>]
GPG-sign commits
--autostash automatically stash/stash pop before and after
-x, --exec <exec> add exec lines after each commit of the editable list
--allow-empty-message
allow rebasing commits with empty messages
-r, --rebase-merges[=<mode>]
try to rebase merges instead of skipping them
--fork-point use 'merge-base --fork-point' to refine upstream
-s, --strategy <strategy>
use the given merge strategy
-X, --strategy-option <option>
pass the argument through to the merge strategy
--root rebase all reachable commits up to the root(s)
--reschedule-failed-exec
automatically re-schedule any `exec` that fails
ok 6 - rebase --abort can not be used with other options
expecting success:
cd "$work_dir" &&
# Clean up the state from the previous one
git reset --hard pre-rebase &&
test_must_fail git rebase$type master &&
test_path_is_dir "$dotest" &&
git rebase --abort &&
test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
test ! -d "$dotest"
HEAD is now at c9f6693 merge should fail on this, too
Rebasing (1/2)
Auto-merging a
CONFLICT (content): Merge conflict in a
error: could not apply 033279b... merge should fail on this
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 033279b... merge should fail on this
ok 7 - rebase --merge --abort
expecting success:
cd "$work_dir" &&
# Clean up the state from the previous one
git reset --hard pre-rebase &&
test_must_fail git rebase$type master &&
test_path_is_dir "$dotest" &&
test_must_fail git rebase --skip &&
test $(git rev-parse HEAD) = $(git rev-parse master) &&
git rebase --abort &&
test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
test ! -d "$dotest"
HEAD is now at c9f6693 merge should fail on this, too
Rebasing (1/2)
Auto-merging a
CONFLICT (content): Merge conflict in a
error: could not apply 033279b... merge should fail on this
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 033279b... merge should fail on this
Rebasing (2/2)
Auto-merging a
CONFLICT (content): Merge conflict in a
error: could not apply c9f6693... merge should fail on this, too
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply c9f6693... merge should fail on this, too
ok 8 - rebase --merge --abort after --skip
expecting success:
cd "$work_dir" &&
# Clean up the state from the previous one
git reset --hard pre-rebase &&
test_must_fail git rebase$type master &&
test_path_is_dir "$dotest" &&
echo c > a &&
echo d >> a &&
git add a &&
test_must_fail git rebase --continue &&
test $(git rev-parse HEAD) != $(git rev-parse master) &&
git rebase --abort &&
test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase) &&
test ! -d "$dotest"
HEAD is now at c9f6693 merge should fail on this, too
Rebasing (1/2)
Auto-merging a
CONFLICT (content): Merge conflict in a
error: could not apply 033279b... merge should fail on this
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 033279b... merge should fail on this
[detached HEAD 166f31b] merge should fail on this
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Rebasing (2/2)
Auto-merging a
CONFLICT (content): Merge conflict in a
error: could not apply c9f6693... merge should fail on this, too
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply c9f6693... merge should fail on this, too
ok 9 - rebase --merge --abort after --continue
expecting success:
cd "$work_dir" &&
# Clean up the state from the previous one
git reset --hard pre-rebase &&
git reflog show to-rebase > reflog_before &&
test_must_fail git rebase$type master &&
git rebase --abort &&
git reflog show to-rebase > reflog_after &&
test_cmp reflog_before reflog_after &&
rm reflog_before reflog_after
HEAD is now at c9f6693 merge should fail on this, too
Rebasing (1/2)
Auto-merging a
CONFLICT (content): Merge conflict in a
error: could not apply 033279b... merge should fail on this
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 033279b... merge should fail on this
ok 10 - rebase --merge --abort does not update reflog
expecting success:
cd "$work_dir" &&
# Clean up the state from the previous one
git reset --hard pre-rebase &&
test_must_fail git rebase$type master &&
test_must_fail git rebase -v --abort &&
test_must_fail git rebase --abort -v &&
git rebase --abort
HEAD is now at c9f6693 merge should fail on this, too
Rebasing (1/2)
Auto-merging a
CONFLICT (content): Merge conflict in a
error: could not apply 033279b... merge should fail on this
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 033279b... merge should fail on this
usage: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>]
or: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]
or: git rebase --continue | --abort | --skip | --edit-todo
--onto <revision> rebase onto given branch instead of upstream
--no-verify allow pre-rebase hook to run
-q, --quiet be quiet. implies --no-stat
-v, --verbose display a diffstat of what changed upstream
-n, --no-stat do not show diffstat of what changed upstream
--signoff add a Signed-off-by: line to each commit
--ignore-whitespace passed to 'git am'
--committer-date-is-author-date
passed to 'git am'
--ignore-date passed to 'git am'
-C <n> passed to 'git apply'
--whitespace <action>
passed to 'git apply'
-f, --force-rebase cherry-pick all commits, even if unchanged
--no-ff cherry-pick all commits, even if unchanged
--continue continue
--skip skip current patch and continue
--abort abort and check out the original branch
--quit abort but keep HEAD where it is
--edit-todo edit the todo list during an interactive rebase
--show-current-patch show the patch file being applied or merged
-m, --merge use merging strategies to rebase
-i, --interactive let the user edit the list of commits to rebase
-p, --preserve-merges
(DEPRECATED) try to recreate merges instead of ignoring them
--rerere-autoupdate update the index with reused conflict resolution if possible
-k, --keep-empty preserve empty commits during rebase
--autosquash move commits that begin with squash!/fixup! under -i
-S, --gpg-sign[=<key-id>]
GPG-sign commits
--autostash automatically stash/stash pop before and after
-x, --exec <exec> add exec lines after each commit of the editable list
--allow-empty-message
allow rebasing commits with empty messages
-r, --rebase-merges[=<mode>]
try to rebase merges instead of skipping them
--fork-point use 'merge-base --fork-point' to refine upstream
-s, --strategy <strategy>
use the given merge strategy
-X, --strategy-option <option>
pass the argument through to the merge strategy
--root rebase all reachable commits up to the root(s)
--reschedule-failed-exec
automatically re-schedule any `exec` that fails
usage: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>]
or: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]
or: git rebase --continue | --abort | --skip | --edit-todo
--onto <revision> rebase onto given branch instead of upstream
--no-verify allow pre-rebase hook to run
-q, --quiet be quiet. implies --no-stat
-v, --verbose display a diffstat of what changed upstream
-n, --no-stat do not show diffstat of what changed upstream
--signoff add a Signed-off-by: line to each commit
--ignore-whitespace passed to 'git am'
--committer-date-is-author-date
passed to 'git am'
--ignore-date passed to 'git am'
-C <n> passed to 'git apply'
--whitespace <action>
passed to 'git apply'
-f, --force-rebase cherry-pick all commits, even if unchanged
--no-ff cherry-pick all commits, even if unchanged
--continue continue
--skip skip current patch and continue
--abort abort and check out the original branch
--quit abort but keep HEAD where it is
--edit-todo edit the todo list during an interactive rebase
--show-current-patch show the patch file being applied or merged
-m, --merge use merging strategies to rebase
-i, --interactive let the user edit the list of commits to rebase
-p, --preserve-merges
(DEPRECATED) try to recreate merges instead of ignoring them
--rerere-autoupdate update the index with reused conflict resolution if possible
-k, --keep-empty preserve empty commits during rebase
--autosquash move commits that begin with squash!/fixup! under -i
-S, --gpg-sign[=<key-id>]
GPG-sign commits
--autostash automatically stash/stash pop before and after
-x, --exec <exec> add exec lines after each commit of the editable list
--allow-empty-message
allow rebasing commits with empty messages
-r, --rebase-merges[=<mode>]
try to rebase merges instead of skipping them
--fork-point use 'merge-base --fork-point' to refine upstream
-s, --strategy <strategy>
use the given merge strategy
-X, --strategy-option <option>
pass the argument through to the merge strategy
--root rebase all reachable commits up to the root(s)
--reschedule-failed-exec
automatically re-schedule any `exec` that fails
ok 11 - rebase --abort can not be used with other options
expecting success:
cd "$work_dir" &&
# Clean up the state from the previous one
git reset --hard pre-rebase &&
test_must_fail git rebase master &&
test_path_is_dir .git/rebase-apply &&
head_before=$(git rev-parse HEAD) &&
git rebase --quit &&
test $(git rev-parse HEAD) = $head_before &&
test ! -d .git/rebase-apply
HEAD is now at c9f6693 merge should fail on this, too
First, rewinding head to replay your work on top of it...
Applying: merge should fail on this
Using index info to reconstruct a base tree...
M a
Falling back to patching base and 3-way merge...
Merging:
15ae2f7 c
virtual merge should fail on this
found 1 common ancestor:
virtual aaff74984cccd156a469afa7d9ab10e4777beb24
Auto-merging a
CONFLICT (content): Merge conflict in a
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 merge should fail on this
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
ok 12 - rebase --quit
expecting success:
cd "$work_dir" &&
# Clean up the state from the previous one
git reset --hard pre-rebase &&
test_must_fail git rebase --merge master &&
test_path_is_dir .git/rebase-merge &&
head_before=$(git rev-parse HEAD) &&
git rebase --quit &&
test $(git rev-parse HEAD) = $head_before &&
test ! -d .git/rebase-merge
HEAD is now at c9f6693 merge should fail on this, too
Rebasing (1/2)
Auto-merging a
CONFLICT (content): Merge conflict in a
error: could not apply 033279b... merge should fail on this
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 033279b... merge should fail on this
ok 13 - rebase --merge --quit
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3408-rebase-multi-line.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3408-rebase-multi-line/.git/
expecting success:
>file &&
git add file &&
test_tick &&
git commit -m initial &&
echo hello >file &&
test_tick &&
git commit -a -m "A sample commit log message that has a long
summary that spills over multiple lines.
But otherwise with a sane description." &&
git branch side &&
git reset --hard HEAD^ &&
>elif &&
git add elif &&
test_tick &&
git commit -m second &&
git checkout -b side2 &&
>afile &&
git add afile &&
test_tick &&
git commit -m third &&
echo hello >afile &&
test_tick &&
git commit -a -m fourth &&
git checkout -b side-merge &&
git reset --hard HEAD^^ &&
git merge --no-ff -m "A merge commit log message that has a long
summary that spills over multiple lines.
But otherwise with a sane description." side2 &&
git branch side-merge-original
[master (root-commit) 1bd44cb] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
[master 1708bf0] A sample commit log message that has a long summary that spills over multiple lines.
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
HEAD is now at 1bd44cb initial
[master e79e348] second
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 elif
Switched to a new branch 'side2'
[side2 0c9638e] third
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 afile
[side2 5efd714] fourth
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to a new branch 'side-merge'
HEAD is now at e79e348 second
Merging:
e79e348 second
virtual side2
found 1 common ancestor:
e79e348 second
Merge made by the 'recursive' strategy.
afile | 1 +
1 file changed, 1 insertion(+)
create mode 100644 afile
ok 1 - setup
expecting success:
git checkout side &&
git rebase master &&
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
git cat-file commit side@{1} | sed -e "1,/^\$/d" >expect &&
test_cmp expect actual
Switched to branch 'side'
First, rewinding head to replay your work on top of it...
Applying: A sample commit log message that has a long
ok 2 - rebase
checking prerequisite: REBASE_P
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test -z "$GIT_TEST_SKIP_REBASE_P"
)
prerequisite REBASE_P ok
expecting success:
git checkout side-merge &&
git rebase -p side &&
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
git cat-file commit side-merge-original | sed -e "1,/^\$/d" >expect &&
test_cmp expect actual
Switched to branch 'side-merge'
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated refs/heads/side-merge.
ok 3 - rebasep
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3409-rebase-preserve-merges.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3409-rebase-preserve-merges/.git/
checking prerequisite: REBASE_P
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test -z "$GIT_TEST_SKIP_REBASE_P"
)
prerequisite REBASE_P ok
expecting success: echo First > A &&
git add A &&
git commit -m "Add A1" &&
git checkout -b topic &&
echo Second > B &&
git add B &&
git commit -m "Add B1" &&
git checkout -f master &&
echo Third >> A &&
git commit -a -m "Modify A2" &&
echo Fifth > B &&
git add B &&
git commit -m "Add different B" &&
git clone ./. clone2 &&
(
cd clone2 &&
git checkout -b topic origin/topic &&
test_must_fail git merge origin/master &&
echo Resolved >B &&
git add B &&
git commit -m "Merge origin/master into topic"
) &&
git clone ./. clone3 &&
(
cd clone3 &&
git checkout -b topic2 origin/topic &&
echo Sixth > A &&
git commit -a -m "Modify A3" &&
git checkout -b topic origin/topic &&
git merge --no-ff topic2
) &&
git clone ./. clone4 &&
(
cd clone4 &&
git checkout -b topic2 origin/topic &&
echo Sixth > A &&
git commit -a -m "Modify A3" &&
git checkout -b topic origin/topic &&
git merge --no-ff topic2
) &&
git checkout topic &&
echo Fourth >> B &&
git commit -a -m "Modify B2"
[master (root-commit) d57765b] Add A1
Author: A U Thor <bogus_email_address>
1 file changed, 1 insertion(+)
create mode 100644 A
Switched to a new branch 'topic'
[topic 3e657d0] Add B1
Author: A U Thor <bogus_email_address>
1 file changed, 1 insertion(+)
create mode 100644 B
Switched to branch 'master'
[master b9d731c] Modify A2
Author: A U Thor <bogus_email_address>
1 file changed, 1 insertion(+)
[master 29fe299] Add different B
Author: A U Thor <bogus_email_address>
1 file changed, 1 insertion(+)
create mode 100644 B
Cloning into 'clone2'...
done.
Switched to a new branch 'topic'
Branch 'topic' set up to track remote branch 'topic' from 'origin'.
Merging:
3e657d0 Add B1
virtual origin/master
found 1 common ancestor:
d57765b Add A1
CONFLICT (add/add): Merge conflict in B
Auto-merging B
Automatic merge failed; fix conflicts and then commit the result.
[topic 768df69] Merge origin/master into topic
Author: A U Thor <bogus_email_address>
Cloning into 'clone3'...
done.
Switched to a new branch 'topic2'
Branch 'topic2' set up to track remote branch 'topic' from 'origin'.
[topic2 7b6a2ea] Modify A3
Author: A U Thor <bogus_email_address>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'topic'
Branch 'topic' set up to track remote branch 'topic' from 'origin'.
Merging:
3e657d0 Add B1
virtual topic2
found 1 common ancestor:
3e657d0 Add B1
Merge made by the 'recursive' strategy.
A | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Cloning into 'clone4'...
done.
Switched to a new branch 'topic2'
Branch 'topic2' set up to track remote branch 'topic' from 'origin'.
[topic2 7b6a2ea] Modify A3
Author: A U Thor <bogus_email_address>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'topic'
Branch 'topic' set up to track remote branch 'topic' from 'origin'.
Merging:
3e657d0 Add B1
virtual topic2
found 1 common ancestor:
3e657d0 Add B1
Merge made by the 'recursive' strategy.
A | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'topic'
[topic 77ada16] Modify B2
Author: A U Thor <bogus_email_address>
1 file changed, 1 insertion(+)
ok 1 - setup for merge-preserving rebase
expecting success:
(
cd clone2 &&
git fetch &&
test_must_fail git rebase -p origin/topic &&
test 2 = $(git ls-files B | wc -l) &&
echo Resolved again > B &&
test_must_fail git rebase --continue &&
grep "^@@@ " .git/rebase-merge/patch &&
git add B &&
git rebase --continue &&
test 1 = $(git rev-list --all --pretty=oneline | grep "Modify A" | wc -l) &&
test 1 = $(git rev-list --all --pretty=oneline | grep "Add different" | wc -l) &&
test 1 = $(git rev-list --all --pretty=oneline | grep "Merge origin" | wc -l)
)
From /<<PKGBUILDDIR>>/t/trash directory.t3409-rebase-preserve-merges/./.
3e657d0..77ada16 topic -> origin/topic
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/1)
Merging:
77ada16 Modify B2
virtual 29fe299bceb7671998b66a7e48ecd75b7be3e244
found 1 common ancestor:
d57765b Add A1
CONFLICT (add/add): Merge conflict in B
Auto-merging B
Automatic merge failed; fix conflicts and then commit the result.
Error redoing merge 768df69d93ccdc0c7153414bf3f9152155967220
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
B: needs merge
You must edit all merge conflicts and then
mark them as resolved using git add
@@@ -1,1 -1,1 +1,1 @@@
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
[detached HEAD c30465b] Merge origin/master into topic
Author: A U Thor <bogus_email_address>
Rebasing (1/1)
Successfully rebased and updated refs/heads/topic.
ok 2 - --continue works after a conflict
expecting success:
(
cd clone3 &&
git fetch &&
git rebase -p origin/topic &&
test 3 = $(git rev-list --all --pretty=oneline | grep "Modify A" | wc -l) &&
test 1 = $(git rev-list --all --pretty=oneline | grep "Merge branch" | wc -l)
)
From /<<PKGBUILDDIR>>/t/trash directory.t3409-rebase-preserve-merges/./.
3e657d0..77ada16 topic -> origin/topic
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/topic.
ok 3 - rebase -p preserves no-ff merges
expecting success:
(
cd clone4 &&
git fetch &&
git -c merge.log=1 rebase -p origin/topic &&
echo >expected &&
git log --format="%b" -1 >current &&
test_cmp expected current
)
From /<<PKGBUILDDIR>>/t/trash directory.t3409-rebase-preserve-merges/./.
3e657d0..77ada16 topic -> origin/topic
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/topic.
ok 4 - rebase -p ignores merge.log config
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3410-rebase-preserve-dropped-merges.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3410-rebase-preserve-dropped-merges/.git/
checking prerequisite: REBASE_P
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test -z "$GIT_TEST_SKIP_REBASE_P"
)
prerequisite REBASE_P ok
expecting success:
test_commit A file1 &&
test_commit B file1 1 &&
test_commit C file2 &&
test_commit D file1 2 &&
test_commit E file3 &&
git checkout A &&
test_commit F file4 &&
test_commit G file1 3 &&
test_commit H file5 &&
git checkout F &&
test_commit I file6
[master (root-commit) 6e62bf8] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1
[master 5c95b17] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 7be4cc1] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
[master 3d13cae] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 1fe5a44] E
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 6e62bf8 A
[detached HEAD cfefd94] F
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file4
[detached HEAD 66ee775] G
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD 25e63b2] H
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file5
Previous HEAD position was 25e63b2 H
HEAD is now at cfefd94 F
[detached HEAD 615be62] I
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file6
ok 1 - setup
expecting success:
git checkout H &&
test_must_fail git merge E &&
test_commit L file1 23 &&
git checkout I &&
test_commit G2 file1 3 &&
test_must_fail git merge E &&
test_commit J file1 23 &&
test_commit K file7 file7 &&
git rebase -i -p L &&
test $(git rev-parse HEAD^^) = $(git rev-parse L) &&
test "23" = "$(cat file1)" &&
test "I" = "$(cat file6)" &&
test "file7" = "$(cat file7)"
Previous HEAD position was 615be62 I
HEAD is now at 25e63b2 H
Merging:
25e63b2 H
virtual E
found 1 common ancestor:
6e62bf8 A
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Automatic merge failed; fix conflicts and then commit the result.
[detached HEAD 70a312a] L
Author: A U Thor <author@example.com>
Previous HEAD position was 70a312a L
HEAD is now at 615be62 I
[detached HEAD 93b50ed] G2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Merging:
93b50ed G2
virtual E
found 1 common ancestor:
6e62bf8 A
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Automatic merge failed; fix conflicts and then commit the result.
[detached HEAD 6b192df] J
Author: A U Thor <author@example.com>
[detached HEAD 273eec6] K
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file7
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
ok 2 - skip same-resolution merges with -p
expecting success:
git checkout H &&
test_must_fail git merge E &&
test_commit L2 file1 23 &&
git checkout I &&
test_commit G3 file1 4 &&
test_must_fail git merge E &&
test_commit J2 file1 24 &&
test_commit K2 file7 file7 &&
test_must_fail git rebase -i -p L2 &&
echo 234 > file1 &&
git add file1 &&
git rebase --continue &&
test $(git rev-parse HEAD^^^) = $(git rev-parse L2) &&
test "234" = "$(cat file1)" &&
test "I" = "$(cat file6)" &&
test "file7" = "$(cat file7)"
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
519f02c K
e785c42 I
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> 519f02c
HEAD is now at 25e63b2 H
Merging:
25e63b2 H
virtual E
found 1 common ancestor:
6e62bf8 A
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Automatic merge failed; fix conflicts and then commit the result.
[detached HEAD 4c4dd24] L2
Author: A U Thor <author@example.com>
Previous HEAD position was 4c4dd24 L2
HEAD is now at 615be62 I
[detached HEAD 6e00aee] G3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Merging:
6e00aee G3
virtual E
found 1 common ancestor:
6e62bf8 A
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Automatic merge failed; fix conflicts and then commit the result.
[detached HEAD 4917c92] J2
Author: A U Thor <author@example.com>
[detached HEAD c670ef0] K2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file7
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/4)
Rebasing (2/4)
Auto-merging file1
CONFLICT (content): Merge conflict in file1
error: could not apply 6e00aee... G3
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not pick 6e00aee07e42a4daf7ffd5d296964868ea26ad79
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
[detached HEAD ff7174a] G3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated detached HEAD.
ok 3 - keep different-resolution merges with -p
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3411-rebase-preserve-around-merges.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3411-rebase-preserve-around-merges/.git/
checking prerequisite: REBASE_P
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test -z "$GIT_TEST_SKIP_REBASE_P"
)
prerequisite REBASE_P ok
expecting success:
test_commit A1 &&
test_commit B1 &&
test_commit C1 &&
git reset --hard B1 &&
test_commit D1 &&
test_merge E1 C1 &&
test_commit F1
[master (root-commit) 6fb0b66] A1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A1.t
[master 37e5de5] B1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B1.t
[master 9db6c33] C1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C1.t
HEAD is now at 37e5de5 B1
[master 98f5076] D1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D1.t
Merging:
98f5076 D1
virtual C1
found 1 common ancestor:
37e5de5 B1
Merge made by the 'recursive' strategy.
C1.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 C1.t
[master 0f3967e] F1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 F1.t
ok 1 - setup
expecting success:
FAKE_LINES="1 squash 4 2 3" git rebase -i -p B1 &&
test "$(git rev-parse HEAD^2)" = "$(git rev-parse C1)" &&
test "$(git rev-parse HEAD~2)" = "$(git rev-parse B1)" &&
git tag E2
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
rebase -i script before editing:
pick 98f5076 D1
pick 9db6c33 C1
pick b855587 E1
pick 0f3967e F1
rebase -i script after editing:
pick 98f5076 D1
squash 0f3967e F1
pick 9db6c33 C1
pick b855587 E1
Rebasing (1/4)
Rebasing (2/4)
[detached HEAD 5d81168] D1
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
2 files changed, 2 insertions(+)
create mode 100644 D1.t
create mode 100644 F1.t
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated refs/heads/master.
ok 2 - squash F1 into D1
expecting success:
git checkout A1 &&
test_commit G1 &&
test_commit H1 &&
test_commit I1 &&
git checkout -b branch3 H1 &&
test_commit J1 &&
test_merge K1 I1 &&
git checkout -b branch2 G1 &&
test_commit L1 &&
test_merge M1 K1 &&
GIT_EDITOR=: git rebase -i -p E2 &&
test "$(git rev-parse HEAD~3)" = "$(git rev-parse E2)" &&
test "$(git rev-parse HEAD~2)" = "$(git rev-parse HEAD^2^2~2)" &&
test "$(git rev-parse HEAD^2^1^1)" = "$(git rev-parse HEAD^2^2^1)"
Note: switching to 'A1'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 6fb0b66 A1
[detached HEAD f51c4db] G1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 G1.t
[detached HEAD 8227962] H1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 H1.t
[detached HEAD f56baeb] I1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 I1.t
Previous HEAD position was f56baeb I1
Switched to a new branch 'branch3'
[branch3 904e05f] J1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 J1.t
Merging:
904e05f J1
virtual I1
found 1 common ancestor:
8227962 H1
Merge made by the 'recursive' strategy.
I1.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 I1.t
Switched to a new branch 'branch2'
[branch2 86c413d] L1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 L1.t
Merging:
86c413d L1
virtual K1
found 1 common ancestor:
f51c4db G1
Merge made by the 'recursive' strategy.
H1.t | 1 +
I1.t | 1 +
J1.t | 1 +
3 files changed, 3 insertions(+)
create mode 100644 H1.t
create mode 100644 I1.t
create mode 100644 J1.t
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/7)
Rebasing (2/7)
Rebasing (3/7)
Rebasing (4/7)
Rebasing (5/7)
Rebasing (6/7)
Rebasing (7/7)
Successfully rebased and updated refs/heads/branch2.
ok 3 - rebase two levels of merge
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3070-wildmatch.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3070-wildmatch/.git/
checking prerequisite: EXPENSIVE_ON_WINDOWS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq EXPENSIVE || test_have_prereq !MINGW,!CYGWIN
)
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
prerequisite EXPENSIVE_ON_WINDOWS ok
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
ok 1 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 2 - setup match file test for foo
expecting success:
test-tool wildmatch wildmatch 'foo' 'foo'
ok 3 - wildmatch: match 'foo' 'foo'
expecting success:
printf '%s' 'foo' >expect &&
git --glob-pathspecs ls-files -z -- 'foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 4 - wildmatch (via ls-files): match 'foo' 'foo'
expecting success:
test-tool wildmatch iwildmatch 'foo' 'foo'
ok 5 - iwildmatch: match 'foo' 'foo'
expecting success:
printf '%s' 'foo' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 6 - iwildmatch (via ls-files): match 'foo' 'foo'
expecting success:
test-tool wildmatch pathmatch 'foo' 'foo'
ok 7 - pathmatch: match 'foo' 'foo'
expecting success:
printf '%s' 'foo' >expect &&
git ls-files -z -- 'foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 8 - pathmatch (via ls-files): match 'foo' 'foo'
expecting success:
test-tool wildmatch ipathmatch 'foo' 'foo'
ok 9 - ipathmatch: match 'foo' 'foo'
expecting success:
printf '%s' 'foo' >expect &&
git --icase-pathspecs ls-files -z -- 'foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 10 - ipathmatch (via ls-files): match 'foo' 'foo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo
ok 11 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 12 - setup match file test for foo
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo' 'bar'
ok 13 - wildmatch: no match 'foo' 'bar'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 14 - wildmatch (via ls-files): no match 'bar' 'foo'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo' 'bar'
ok 15 - iwildmatch: no match 'foo' 'bar'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 16 - iwildmatch (via ls-files): no match 'bar' 'foo'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'foo' 'bar'
ok 17 - pathmatch: no match 'foo' 'bar'
expecting success:
>expect &&
git ls-files -z -- 'bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 18 - pathmatch (via ls-files): no match 'bar' 'foo'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'foo' 'bar'
ok 19 - ipathmatch: no match 'foo' 'bar'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- 'bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 20 - ipathmatch (via ls-files): no match 'bar' 'foo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo
ok 21 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 22 - setup match file test for
expecting success:
test-tool wildmatch wildmatch '' ''
ok 23 - wildmatch: match '' ''
checking known breakage: false
not ok 24 - wildmatch (via ls-files): match skip '' '' # TODO known breakage
expecting success:
test-tool wildmatch iwildmatch '' ''
ok 25 - iwildmatch: match '' ''
checking known breakage: false
not ok 26 - iwildmatch (via ls-files): match skip '' '' # TODO known breakage
expecting success:
test-tool wildmatch pathmatch '' ''
ok 27 - pathmatch: match '' ''
checking known breakage: false
not ok 28 - pathmatch (via ls-files): match skip '' '' # TODO known breakage
expecting success:
test-tool wildmatch ipathmatch '' ''
ok 29 - ipathmatch: match '' ''
checking known breakage: false
not ok 30 - ipathmatch (via ls-files): match skip '' '' # TODO known breakage
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
ok 31 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 32 - setup match file test for foo
expecting success:
test-tool wildmatch wildmatch 'foo' '???'
ok 33 - wildmatch: match 'foo' '???'
expecting success:
printf '%s' 'foo' >expect &&
git --glob-pathspecs ls-files -z -- '???' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 34 - wildmatch (via ls-files): match '???' 'foo'
expecting success:
test-tool wildmatch iwildmatch 'foo' '???'
ok 35 - iwildmatch: match 'foo' '???'
expecting success:
printf '%s' 'foo' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '???' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 36 - iwildmatch (via ls-files): match '???' 'foo'
expecting success:
test-tool wildmatch pathmatch 'foo' '???'
ok 37 - pathmatch: match 'foo' '???'
expecting success:
printf '%s' 'foo' >expect &&
git ls-files -z -- '???' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 38 - pathmatch (via ls-files): match '???' 'foo'
expecting success:
test-tool wildmatch ipathmatch 'foo' '???'
ok 39 - ipathmatch: match 'foo' '???'
expecting success:
printf '%s' 'foo' >expect &&
git --icase-pathspecs ls-files -z -- '???' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 40 - ipathmatch (via ls-files): match '???' 'foo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo
ok 41 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 42 - setup match file test for foo
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo' '??'
ok 43 - wildmatch: no match 'foo' '??'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '??' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 44 - wildmatch (via ls-files): no match '??' 'foo'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo' '??'
ok 45 - iwildmatch: no match 'foo' '??'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '??' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 46 - iwildmatch (via ls-files): no match '??' 'foo'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'foo' '??'
ok 47 - pathmatch: no match 'foo' '??'
expecting success:
>expect &&
git ls-files -z -- '??' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 48 - pathmatch (via ls-files): no match '??' 'foo'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'foo' '??'
ok 49 - ipathmatch: no match 'foo' '??'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '??' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 50 - ipathmatch (via ls-files): no match '??' 'foo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo
ok 51 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 52 - setup match file test for foo
expecting success:
test-tool wildmatch wildmatch 'foo' '*'
ok 53 - wildmatch: match 'foo' '*'
expecting success:
printf '%s' 'foo' >expect &&
git --glob-pathspecs ls-files -z -- '*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 54 - wildmatch (via ls-files): match '*' 'foo'
expecting success:
test-tool wildmatch iwildmatch 'foo' '*'
ok 55 - iwildmatch: match 'foo' '*'
expecting success:
printf '%s' 'foo' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 56 - iwildmatch (via ls-files): match '*' 'foo'
expecting success:
test-tool wildmatch pathmatch 'foo' '*'
ok 57 - pathmatch: match 'foo' '*'
expecting success:
printf '%s' 'foo' >expect &&
git ls-files -z -- '*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 58 - pathmatch (via ls-files): match '*' 'foo'
expecting success:
test-tool wildmatch ipathmatch 'foo' '*'
ok 59 - ipathmatch: match 'foo' '*'
expecting success:
printf '%s' 'foo' >expect &&
git --icase-pathspecs ls-files -z -- '*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 60 - ipathmatch (via ls-files): match '*' 'foo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo
ok 61 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 62 - setup match file test for foo
expecting success:
test-tool wildmatch wildmatch 'foo' 'f*'
ok 63 - wildmatch: match 'foo' 'f*'
expecting success:
printf '%s' 'foo' >expect &&
git --glob-pathspecs ls-files -z -- 'f*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 64 - wildmatch (via ls-files): match 'f*' 'foo'
expecting success:
test-tool wildmatch iwildmatch 'foo' 'f*'
ok 65 - iwildmatch: match 'foo' 'f*'
expecting success:
printf '%s' 'foo' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'f*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 66 - iwildmatch (via ls-files): match 'f*' 'foo'
expecting success:
test-tool wildmatch pathmatch 'foo' 'f*'
ok 67 - pathmatch: match 'foo' 'f*'
expecting success:
printf '%s' 'foo' >expect &&
git ls-files -z -- 'f*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 68 - pathmatch (via ls-files): match 'f*' 'foo'
expecting success:
test-tool wildmatch ipathmatch 'foo' 'f*'
ok 69 - ipathmatch: match 'foo' 'f*'
expecting success:
printf '%s' 'foo' >expect &&
git --icase-pathspecs ls-files -z -- 'f*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 70 - ipathmatch (via ls-files): match 'f*' 'foo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo
ok 71 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 72 - setup match file test for foo
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo' '*f'
ok 73 - wildmatch: no match 'foo' '*f'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '*f' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 74 - wildmatch (via ls-files): no match '*f' 'foo'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo' '*f'
ok 75 - iwildmatch: no match 'foo' '*f'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*f' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 76 - iwildmatch (via ls-files): no match '*f' 'foo'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'foo' '*f'
ok 77 - pathmatch: no match 'foo' '*f'
expecting success:
>expect &&
git ls-files -z -- '*f' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 78 - pathmatch (via ls-files): no match '*f' 'foo'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'foo' '*f'
ok 79 - ipathmatch: no match 'foo' '*f'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '*f' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 80 - ipathmatch (via ls-files): no match '*f' 'foo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo
ok 81 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 82 - setup match file test for foo
expecting success:
test-tool wildmatch wildmatch 'foo' '*foo*'
ok 83 - wildmatch: match 'foo' '*foo*'
expecting success:
printf '%s' 'foo' >expect &&
git --glob-pathspecs ls-files -z -- '*foo*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 84 - wildmatch (via ls-files): match '*foo*' 'foo'
expecting success:
test-tool wildmatch iwildmatch 'foo' '*foo*'
ok 85 - iwildmatch: match 'foo' '*foo*'
expecting success:
printf '%s' 'foo' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*foo*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 86 - iwildmatch (via ls-files): match '*foo*' 'foo'
expecting success:
test-tool wildmatch pathmatch 'foo' '*foo*'
ok 87 - pathmatch: match 'foo' '*foo*'
expecting success:
printf '%s' 'foo' >expect &&
git ls-files -z -- '*foo*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 88 - pathmatch (via ls-files): match '*foo*' 'foo'
expecting success:
test-tool wildmatch ipathmatch 'foo' '*foo*'
ok 89 - ipathmatch: match 'foo' '*foo*'
expecting success:
printf '%s' 'foo' >expect &&
git --icase-pathspecs ls-files -z -- '*foo*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 90 - ipathmatch (via ls-files): match '*foo*' 'foo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo
ok 91 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 92 - setup match file test for foobar
expecting success:
test-tool wildmatch wildmatch 'foobar' '*ob*a*r*'
ok 93 - wildmatch: match 'foobar' '*ob*a*r*'
expecting success:
printf '%s' 'foobar' >expect &&
git --glob-pathspecs ls-files -z -- '*ob*a*r*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 94 - wildmatch (via ls-files): match '*ob*a*r*' 'foobar'
expecting success:
test-tool wildmatch iwildmatch 'foobar' '*ob*a*r*'
ok 95 - iwildmatch: match 'foobar' '*ob*a*r*'
expecting success:
printf '%s' 'foobar' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*ob*a*r*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 96 - iwildmatch (via ls-files): match '*ob*a*r*' 'foobar'
expecting success:
test-tool wildmatch pathmatch 'foobar' '*ob*a*r*'
ok 97 - pathmatch: match 'foobar' '*ob*a*r*'
expecting success:
printf '%s' 'foobar' >expect &&
git ls-files -z -- '*ob*a*r*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 98 - pathmatch (via ls-files): match '*ob*a*r*' 'foobar'
expecting success:
test-tool wildmatch ipathmatch 'foobar' '*ob*a*r*'
ok 99 - ipathmatch: match 'foobar' '*ob*a*r*'
expecting success:
printf '%s' 'foobar' >expect &&
git --icase-pathspecs ls-files -z -- '*ob*a*r*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 100 - ipathmatch (via ls-files): match '*ob*a*r*' 'foobar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foobar
ok 101 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 102 - setup match file test for aaaaaaabababab
expecting success:
test-tool wildmatch wildmatch 'aaaaaaabababab' '*ab'
ok 103 - wildmatch: match 'aaaaaaabababab' '*ab'
expecting success:
printf '%s' 'aaaaaaabababab' >expect &&
git --glob-pathspecs ls-files -z -- '*ab' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 104 - wildmatch (via ls-files): match '*ab' 'aaaaaaabababab'
expecting success:
test-tool wildmatch iwildmatch 'aaaaaaabababab' '*ab'
ok 105 - iwildmatch: match 'aaaaaaabababab' '*ab'
expecting success:
printf '%s' 'aaaaaaabababab' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*ab' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 106 - iwildmatch (via ls-files): match '*ab' 'aaaaaaabababab'
expecting success:
test-tool wildmatch pathmatch 'aaaaaaabababab' '*ab'
ok 107 - pathmatch: match 'aaaaaaabababab' '*ab'
expecting success:
printf '%s' 'aaaaaaabababab' >expect &&
git ls-files -z -- '*ab' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 108 - pathmatch (via ls-files): match '*ab' 'aaaaaaabababab'
expecting success:
test-tool wildmatch ipathmatch 'aaaaaaabababab' '*ab'
ok 109 - ipathmatch: match 'aaaaaaabababab' '*ab'
expecting success:
printf '%s' 'aaaaaaabababab' >expect &&
git --icase-pathspecs ls-files -z -- '*ab' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 110 - ipathmatch (via ls-files): match '*ab' 'aaaaaaabababab'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing aaaaaaabababab
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 111 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 112 - setup match file test for foo*
expecting success:
test-tool wildmatch wildmatch 'foo*' 'foo\*'
ok 113 - wildmatch: match 'foo*' 'foo\*'
expecting success:
printf '%s' 'foo*' >expect &&
git --glob-pathspecs ls-files -z -- 'foo\*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 114 - wildmatch (via ls-files): match 'foo\*' 'foo*'
expecting success:
test-tool wildmatch iwildmatch 'foo*' 'foo\*'
ok 115 - iwildmatch: match 'foo*' 'foo\*'
expecting success:
printf '%s' 'foo*' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo\*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 116 - iwildmatch (via ls-files): match 'foo\*' 'foo*'
expecting success:
test-tool wildmatch pathmatch 'foo*' 'foo\*'
ok 117 - pathmatch: match 'foo*' 'foo\*'
expecting success:
printf '%s' 'foo*' >expect &&
git ls-files -z -- 'foo\*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 118 - pathmatch (via ls-files): match 'foo\*' 'foo*'
expecting success:
test-tool wildmatch ipathmatch 'foo*' 'foo\*'
ok 119 - ipathmatch: match 'foo*' 'foo\*'
expecting success:
printf '%s' 'foo*' >expect &&
git --icase-pathspecs ls-files -z -- 'foo\*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 120 - ipathmatch (via ls-files): match 'foo\*' 'foo*'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo*
ok 121 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 122 - setup match file test for foobar
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foobar' 'foo\*bar'
ok 123 - wildmatch: no match 'foobar' 'foo\*bar'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'foo\*bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 124 - wildmatch (via ls-files): no match 'foo\*bar' 'foobar'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foobar' 'foo\*bar'
ok 125 - iwildmatch: no match 'foobar' 'foo\*bar'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo\*bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 126 - iwildmatch (via ls-files): no match 'foo\*bar' 'foobar'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'foobar' 'foo\*bar'
ok 127 - pathmatch: no match 'foobar' 'foo\*bar'
expecting success:
>expect &&
git ls-files -z -- 'foo\*bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 128 - pathmatch (via ls-files): no match 'foo\*bar' 'foobar'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'foobar' 'foo\*bar'
ok 129 - ipathmatch: no match 'foobar' 'foo\*bar'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- 'foo\*bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 130 - ipathmatch (via ls-files): no match 'foo\*bar' 'foobar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foobar
ok 131 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 132 - setup match file test for f\oo
expecting success:
test-tool wildmatch wildmatch 'f\oo' 'f\\oo'
ok 133 - wildmatch: match 'f\oo' 'f\\oo'
expecting success:
printf '%s' 'f\oo' >expect &&
git --glob-pathspecs ls-files -z -- 'f\\oo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 134 - wildmatch (via ls-files): match 'f\\oo' 'f\oo'
expecting success:
test-tool wildmatch iwildmatch 'f\oo' 'f\\oo'
ok 135 - iwildmatch: match 'f\oo' 'f\\oo'
expecting success:
printf '%s' 'f\oo' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'f\\oo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 136 - iwildmatch (via ls-files): match 'f\\oo' 'f\oo'
expecting success:
test-tool wildmatch pathmatch 'f\oo' 'f\\oo'
ok 137 - pathmatch: match 'f\oo' 'f\\oo'
expecting success:
printf '%s' 'f\oo' >expect &&
git ls-files -z -- 'f\\oo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 138 - pathmatch (via ls-files): match 'f\\oo' 'f\oo'
expecting success:
test-tool wildmatch ipathmatch 'f\oo' 'f\\oo'
ok 139 - ipathmatch: match 'f\oo' 'f\\oo'
expecting success:
printf '%s' 'f\oo' >expect &&
git --icase-pathspecs ls-files -z -- 'f\\oo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 140 - ipathmatch (via ls-files): match 'f\\oo' 'f\oo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing "f\\oo"
ok 141 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 142 - setup match file test for ball
expecting success:
test-tool wildmatch wildmatch 'ball' '*[al]?'
ok 143 - wildmatch: match 'ball' '*[al]?'
expecting success:
printf '%s' 'ball' >expect &&
git --glob-pathspecs ls-files -z -- '*[al]?' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 144 - wildmatch (via ls-files): match '*[al]?' 'ball'
expecting success:
test-tool wildmatch iwildmatch 'ball' '*[al]?'
ok 145 - iwildmatch: match 'ball' '*[al]?'
expecting success:
printf '%s' 'ball' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*[al]?' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 146 - iwildmatch (via ls-files): match '*[al]?' 'ball'
expecting success:
test-tool wildmatch pathmatch 'ball' '*[al]?'
ok 147 - pathmatch: match 'ball' '*[al]?'
expecting success:
printf '%s' 'ball' >expect &&
git ls-files -z -- '*[al]?' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 148 - pathmatch (via ls-files): match '*[al]?' 'ball'
expecting success:
test-tool wildmatch ipathmatch 'ball' '*[al]?'
ok 149 - ipathmatch: match 'ball' '*[al]?'
expecting success:
printf '%s' 'ball' >expect &&
git --icase-pathspecs ls-files -z -- '*[al]?' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 150 - ipathmatch (via ls-files): match '*[al]?' 'ball'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing ball
Removing expect
ok 151 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 152 - setup match file test for ten
expecting success:
test_must_fail test-tool wildmatch wildmatch 'ten' '[ten]'
ok 153 - wildmatch: no match 'ten' '[ten]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[ten]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 154 - wildmatch (via ls-files): no match '[ten]' 'ten'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'ten' '[ten]'
ok 155 - iwildmatch: no match 'ten' '[ten]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[ten]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 156 - iwildmatch (via ls-files): no match '[ten]' 'ten'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'ten' '[ten]'
ok 157 - pathmatch: no match 'ten' '[ten]'
expecting success:
>expect &&
git ls-files -z -- '[ten]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 158 - pathmatch (via ls-files): no match '[ten]' 'ten'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'ten' '[ten]'
ok 159 - ipathmatch: no match 'ten' '[ten]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[ten]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 160 - ipathmatch (via ls-files): no match '[ten]' 'ten'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing ten
ok 161 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 162 - setup match file test for ten
expecting success:
test-tool wildmatch wildmatch 'ten' '**[!te]'
ok 163 - wildmatch: match 'ten' '**[!te]'
expecting success:
printf '%s' 'ten' >expect &&
git --glob-pathspecs ls-files -z -- '**[!te]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 164 - wildmatch (via ls-files): match '**[!te]' 'ten'
expecting success:
test-tool wildmatch iwildmatch 'ten' '**[!te]'
ok 165 - iwildmatch: match 'ten' '**[!te]'
expecting success:
printf '%s' 'ten' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '**[!te]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 166 - iwildmatch (via ls-files): match '**[!te]' 'ten'
expecting success:
test-tool wildmatch pathmatch 'ten' '**[!te]'
ok 167 - pathmatch: match 'ten' '**[!te]'
expecting success:
printf '%s' 'ten' >expect &&
git ls-files -z -- '**[!te]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 168 - pathmatch (via ls-files): match '**[!te]' 'ten'
expecting success:
test-tool wildmatch ipathmatch 'ten' '**[!te]'
ok 169 - ipathmatch: match 'ten' '**[!te]'
expecting success:
printf '%s' 'ten' >expect &&
git --icase-pathspecs ls-files -z -- '**[!te]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 170 - ipathmatch (via ls-files): match '**[!te]' 'ten'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing ten
ok 171 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 172 - setup match file test for ten
expecting success:
test_must_fail test-tool wildmatch wildmatch 'ten' '**[!ten]'
ok 173 - wildmatch: no match 'ten' '**[!ten]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '**[!ten]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 174 - wildmatch (via ls-files): no match '**[!ten]' 'ten'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'ten' '**[!ten]'
ok 175 - iwildmatch: no match 'ten' '**[!ten]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '**[!ten]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 176 - iwildmatch (via ls-files): no match '**[!ten]' 'ten'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'ten' '**[!ten]'
ok 177 - pathmatch: no match 'ten' '**[!ten]'
expecting success:
>expect &&
git ls-files -z -- '**[!ten]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 178 - pathmatch (via ls-files): no match '**[!ten]' 'ten'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'ten' '**[!ten]'
ok 179 - ipathmatch: no match 'ten' '**[!ten]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '**[!ten]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 180 - ipathmatch (via ls-files): no match '**[!ten]' 'ten'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing ten
ok 181 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 182 - setup match file test for ten
expecting success:
test-tool wildmatch wildmatch 'ten' 't[a-g]n'
ok 183 - wildmatch: match 'ten' 't[a-g]n'
expecting success:
printf '%s' 'ten' >expect &&
git --glob-pathspecs ls-files -z -- 't[a-g]n' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 184 - wildmatch (via ls-files): match 't[a-g]n' 'ten'
expecting success:
test-tool wildmatch iwildmatch 'ten' 't[a-g]n'
ok 185 - iwildmatch: match 'ten' 't[a-g]n'
expecting success:
printf '%s' 'ten' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 't[a-g]n' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 186 - iwildmatch (via ls-files): match 't[a-g]n' 'ten'
expecting success:
test-tool wildmatch pathmatch 'ten' 't[a-g]n'
ok 187 - pathmatch: match 'ten' 't[a-g]n'
expecting success:
printf '%s' 'ten' >expect &&
git ls-files -z -- 't[a-g]n' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 188 - pathmatch (via ls-files): match 't[a-g]n' 'ten'
expecting success:
test-tool wildmatch ipathmatch 'ten' 't[a-g]n'
ok 189 - ipathmatch: match 'ten' 't[a-g]n'
expecting success:
printf '%s' 'ten' >expect &&
git --icase-pathspecs ls-files -z -- 't[a-g]n' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 190 - ipathmatch (via ls-files): match 't[a-g]n' 'ten'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing ten
ok 191 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 192 - setup match file test for ten
expecting success:
test_must_fail test-tool wildmatch wildmatch 'ten' 't[!a-g]n'
ok 193 - wildmatch: no match 'ten' 't[!a-g]n'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 't[!a-g]n' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 194 - wildmatch (via ls-files): no match 't[!a-g]n' 'ten'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'ten' 't[!a-g]n'
ok 195 - iwildmatch: no match 'ten' 't[!a-g]n'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 't[!a-g]n' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 196 - iwildmatch (via ls-files): no match 't[!a-g]n' 'ten'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'ten' 't[!a-g]n'
ok 197 - pathmatch: no match 'ten' 't[!a-g]n'
expecting success:
>expect &&
git ls-files -z -- 't[!a-g]n' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 198 - pathmatch (via ls-files): no match 't[!a-g]n' 'ten'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'ten' 't[!a-g]n'
ok 199 - ipathmatch: no match 'ten' 't[!a-g]n'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- 't[!a-g]n' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 200 - ipathmatch (via ls-files): no match 't[!a-g]n' 'ten'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing ten
ok 201 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 202 - setup match file test for ton
expecting success:
test-tool wildmatch wildmatch 'ton' 't[!a-g]n'
ok 203 - wildmatch: match 'ton' 't[!a-g]n'
expecting success:
printf '%s' 'ton' >expect &&
git --glob-pathspecs ls-files -z -- 't[!a-g]n' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 204 - wildmatch (via ls-files): match 't[!a-g]n' 'ton'
expecting success:
test-tool wildmatch iwildmatch 'ton' 't[!a-g]n'
ok 205 - iwildmatch: match 'ton' 't[!a-g]n'
expecting success:
printf '%s' 'ton' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 't[!a-g]n' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 206 - iwildmatch (via ls-files): match 't[!a-g]n' 'ton'
expecting success:
test-tool wildmatch pathmatch 'ton' 't[!a-g]n'
ok 207 - pathmatch: match 'ton' 't[!a-g]n'
expecting success:
printf '%s' 'ton' >expect &&
git ls-files -z -- 't[!a-g]n' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 208 - pathmatch (via ls-files): match 't[!a-g]n' 'ton'
expecting success:
test-tool wildmatch ipathmatch 'ton' 't[!a-g]n'
ok 209 - ipathmatch: match 'ton' 't[!a-g]n'
expecting success:
printf '%s' 'ton' >expect &&
git --icase-pathspecs ls-files -z -- 't[!a-g]n' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 210 - ipathmatch (via ls-files): match 't[!a-g]n' 'ton'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing ton
ok 211 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 212 - setup match file test for ton
expecting success:
test-tool wildmatch wildmatch 'ton' 't[^a-g]n'
ok 213 - wildmatch: match 'ton' 't[^a-g]n'
expecting success:
printf '%s' 'ton' >expect &&
git --glob-pathspecs ls-files -z -- 't[^a-g]n' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 214 - wildmatch (via ls-files): match 't[^a-g]n' 'ton'
expecting success:
test-tool wildmatch iwildmatch 'ton' 't[^a-g]n'
ok 215 - iwildmatch: match 'ton' 't[^a-g]n'
expecting success:
printf '%s' 'ton' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 't[^a-g]n' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 216 - iwildmatch (via ls-files): match 't[^a-g]n' 'ton'
expecting success:
test-tool wildmatch pathmatch 'ton' 't[^a-g]n'
ok 217 - pathmatch: match 'ton' 't[^a-g]n'
expecting success:
printf '%s' 'ton' >expect &&
git ls-files -z -- 't[^a-g]n' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 218 - pathmatch (via ls-files): match 't[^a-g]n' 'ton'
expecting success:
test-tool wildmatch ipathmatch 'ton' 't[^a-g]n'
ok 219 - ipathmatch: match 'ton' 't[^a-g]n'
expecting success:
printf '%s' 'ton' >expect &&
git --icase-pathspecs ls-files -z -- 't[^a-g]n' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 220 - ipathmatch (via ls-files): match 't[^a-g]n' 'ton'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing ton
ok 221 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 222 - setup match file test for a]b
expecting success:
test-tool wildmatch wildmatch 'a]b' 'a[]]b'
ok 223 - wildmatch: match 'a]b' 'a[]]b'
expecting success:
printf '%s' 'a]b' >expect &&
git --glob-pathspecs ls-files -z -- 'a[]]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 224 - wildmatch (via ls-files): match 'a[]]b' 'a]b'
expecting success:
test-tool wildmatch iwildmatch 'a]b' 'a[]]b'
ok 225 - iwildmatch: match 'a]b' 'a[]]b'
expecting success:
printf '%s' 'a]b' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'a[]]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 226 - iwildmatch (via ls-files): match 'a[]]b' 'a]b'
expecting success:
test-tool wildmatch pathmatch 'a]b' 'a[]]b'
ok 227 - pathmatch: match 'a]b' 'a[]]b'
expecting success:
printf '%s' 'a]b' >expect &&
git ls-files -z -- 'a[]]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 228 - pathmatch (via ls-files): match 'a[]]b' 'a]b'
expecting success:
test-tool wildmatch ipathmatch 'a]b' 'a[]]b'
ok 229 - ipathmatch: match 'a]b' 'a[]]b'
expecting success:
printf '%s' 'a]b' >expect &&
git --icase-pathspecs ls-files -z -- 'a[]]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 230 - ipathmatch (via ls-files): match 'a[]]b' 'a]b'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing a]b
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 231 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 232 - setup match file test for a-b
expecting success:
test-tool wildmatch wildmatch 'a-b' 'a[]-]b'
ok 233 - wildmatch: match 'a-b' 'a[]-]b'
expecting success:
printf '%s' 'a-b' >expect &&
git --glob-pathspecs ls-files -z -- 'a[]-]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 234 - wildmatch (via ls-files): match 'a[]-]b' 'a-b'
expecting success:
test-tool wildmatch iwildmatch 'a-b' 'a[]-]b'
ok 235 - iwildmatch: match 'a-b' 'a[]-]b'
expecting success:
printf '%s' 'a-b' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'a[]-]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 236 - iwildmatch (via ls-files): match 'a[]-]b' 'a-b'
expecting success:
test-tool wildmatch pathmatch 'a-b' 'a[]-]b'
ok 237 - pathmatch: match 'a-b' 'a[]-]b'
expecting success:
printf '%s' 'a-b' >expect &&
git ls-files -z -- 'a[]-]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 238 - pathmatch (via ls-files): match 'a[]-]b' 'a-b'
expecting success:
test-tool wildmatch ipathmatch 'a-b' 'a[]-]b'
ok 239 - ipathmatch: match 'a-b' 'a[]-]b'
expecting success:
printf '%s' 'a-b' >expect &&
git --icase-pathspecs ls-files -z -- 'a[]-]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 240 - ipathmatch (via ls-files): match 'a[]-]b' 'a-b'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing a-b
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 241 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 242 - setup match file test for a]b
expecting success:
test-tool wildmatch wildmatch 'a]b' 'a[]-]b'
ok 243 - wildmatch: match 'a]b' 'a[]-]b'
expecting success:
printf '%s' 'a]b' >expect &&
git --glob-pathspecs ls-files -z -- 'a[]-]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 244 - wildmatch (via ls-files): match 'a[]-]b' 'a]b'
expecting success:
test-tool wildmatch iwildmatch 'a]b' 'a[]-]b'
ok 245 - iwildmatch: match 'a]b' 'a[]-]b'
expecting success:
printf '%s' 'a]b' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'a[]-]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 246 - iwildmatch (via ls-files): match 'a[]-]b' 'a]b'
expecting success:
test-tool wildmatch pathmatch 'a]b' 'a[]-]b'
ok 247 - pathmatch: match 'a]b' 'a[]-]b'
expecting success:
printf '%s' 'a]b' >expect &&
git ls-files -z -- 'a[]-]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 248 - pathmatch (via ls-files): match 'a[]-]b' 'a]b'
expecting success:
test-tool wildmatch ipathmatch 'a]b' 'a[]-]b'
ok 249 - ipathmatch: match 'a]b' 'a[]-]b'
expecting success:
printf '%s' 'a]b' >expect &&
git --icase-pathspecs ls-files -z -- 'a[]-]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 250 - ipathmatch (via ls-files): match 'a[]-]b' 'a]b'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing a]b
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 251 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 252 - setup match file test for aab
expecting success:
test_must_fail test-tool wildmatch wildmatch 'aab' 'a[]-]b'
ok 253 - wildmatch: no match 'aab' 'a[]-]b'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'a[]-]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 254 - wildmatch (via ls-files): no match 'a[]-]b' 'aab'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'aab' 'a[]-]b'
ok 255 - iwildmatch: no match 'aab' 'a[]-]b'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'a[]-]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 256 - iwildmatch (via ls-files): no match 'a[]-]b' 'aab'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'aab' 'a[]-]b'
ok 257 - pathmatch: no match 'aab' 'a[]-]b'
expecting success:
>expect &&
git ls-files -z -- 'a[]-]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 258 - pathmatch (via ls-files): no match 'a[]-]b' 'aab'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'aab' 'a[]-]b'
ok 259 - ipathmatch: no match 'aab' 'a[]-]b'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- 'a[]-]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 260 - ipathmatch (via ls-files): no match 'a[]-]b' 'aab'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing aab
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 261 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 262 - setup match file test for aab
expecting success:
test-tool wildmatch wildmatch 'aab' 'a[]a-]b'
ok 263 - wildmatch: match 'aab' 'a[]a-]b'
expecting success:
printf '%s' 'aab' >expect &&
git --glob-pathspecs ls-files -z -- 'a[]a-]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 264 - wildmatch (via ls-files): match 'a[]a-]b' 'aab'
expecting success:
test-tool wildmatch iwildmatch 'aab' 'a[]a-]b'
ok 265 - iwildmatch: match 'aab' 'a[]a-]b'
expecting success:
printf '%s' 'aab' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'a[]a-]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 266 - iwildmatch (via ls-files): match 'a[]a-]b' 'aab'
expecting success:
test-tool wildmatch pathmatch 'aab' 'a[]a-]b'
ok 267 - pathmatch: match 'aab' 'a[]a-]b'
expecting success:
printf '%s' 'aab' >expect &&
git ls-files -z -- 'a[]a-]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 268 - pathmatch (via ls-files): match 'a[]a-]b' 'aab'
expecting success:
test-tool wildmatch ipathmatch 'aab' 'a[]a-]b'
ok 269 - ipathmatch: match 'aab' 'a[]a-]b'
expecting success:
printf '%s' 'aab' >expect &&
git --icase-pathspecs ls-files -z -- 'a[]a-]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 270 - ipathmatch (via ls-files): match 'a[]a-]b' 'aab'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing aab
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 271 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 272 - setup match file test for ]
expecting success:
test-tool wildmatch wildmatch ']' ']'
ok 273 - wildmatch: match ']' ']'
expecting success:
printf '%s' ']' >expect &&
git --glob-pathspecs ls-files -z -- ']' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 274 - wildmatch (via ls-files): match ']' ']'
expecting success:
test-tool wildmatch iwildmatch ']' ']'
ok 275 - iwildmatch: match ']' ']'
expecting success:
printf '%s' ']' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- ']' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 276 - iwildmatch (via ls-files): match ']' ']'
expecting success:
test-tool wildmatch pathmatch ']' ']'
ok 277 - pathmatch: match ']' ']'
expecting success:
printf '%s' ']' >expect &&
git ls-files -z -- ']' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 278 - pathmatch (via ls-files): match ']' ']'
expecting success:
test-tool wildmatch ipathmatch ']' ']'
ok 279 - ipathmatch: match ']' ']'
expecting success:
printf '%s' ']' >expect &&
git --icase-pathspecs ls-files -z -- ']' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 280 - ipathmatch (via ls-files): match ']' ']'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ]
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 281 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 282 - setup match file test for foo/baz/bar
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/baz/bar' 'foo*bar'
ok 283 - wildmatch: no match 'foo/baz/bar' 'foo*bar'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'foo*bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 284 - wildmatch (via ls-files): no match 'foo*bar' 'foo/baz/bar'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/baz/bar' 'foo*bar'
ok 285 - iwildmatch: no match 'foo/baz/bar' 'foo*bar'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo*bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 286 - iwildmatch (via ls-files): no match 'foo*bar' 'foo/baz/bar'
expecting success:
test-tool wildmatch pathmatch 'foo/baz/bar' 'foo*bar'
ok 287 - pathmatch: match 'foo/baz/bar' 'foo*bar'
expecting success:
printf '%s' 'foo/baz/bar' >expect &&
git ls-files -z -- 'foo*bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 288 - pathmatch (via ls-files): match 'foo*bar' 'foo/baz/bar'
expecting success:
test-tool wildmatch ipathmatch 'foo/baz/bar' 'foo*bar'
ok 289 - ipathmatch: match 'foo/baz/bar' 'foo*bar'
expecting success:
printf '%s' 'foo/baz/bar' >expect &&
git --icase-pathspecs ls-files -z -- 'foo*bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 290 - ipathmatch (via ls-files): match 'foo*bar' 'foo/baz/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 291 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 292 - setup match file test for foo/baz/bar
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/baz/bar' 'foo**bar'
ok 293 - wildmatch: no match 'foo/baz/bar' 'foo**bar'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'foo**bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 294 - wildmatch (via ls-files): no match 'foo**bar' 'foo/baz/bar'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/baz/bar' 'foo**bar'
ok 295 - iwildmatch: no match 'foo/baz/bar' 'foo**bar'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo**bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 296 - iwildmatch (via ls-files): no match 'foo**bar' 'foo/baz/bar'
expecting success:
test-tool wildmatch pathmatch 'foo/baz/bar' 'foo**bar'
ok 297 - pathmatch: match 'foo/baz/bar' 'foo**bar'
expecting success:
printf '%s' 'foo/baz/bar' >expect &&
git ls-files -z -- 'foo**bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 298 - pathmatch (via ls-files): match 'foo**bar' 'foo/baz/bar'
expecting success:
test-tool wildmatch ipathmatch 'foo/baz/bar' 'foo**bar'
ok 299 - ipathmatch: match 'foo/baz/bar' 'foo**bar'
expecting success:
printf '%s' 'foo/baz/bar' >expect &&
git --icase-pathspecs ls-files -z -- 'foo**bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 300 - ipathmatch (via ls-files): match 'foo**bar' 'foo/baz/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 301 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 302 - setup match file test for foobazbar
expecting success:
test-tool wildmatch wildmatch 'foobazbar' 'foo**bar'
ok 303 - wildmatch: match 'foobazbar' 'foo**bar'
expecting success:
printf '%s' 'foobazbar' >expect &&
git --glob-pathspecs ls-files -z -- 'foo**bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 304 - wildmatch (via ls-files): match 'foo**bar' 'foobazbar'
expecting success:
test-tool wildmatch iwildmatch 'foobazbar' 'foo**bar'
ok 305 - iwildmatch: match 'foobazbar' 'foo**bar'
expecting success:
printf '%s' 'foobazbar' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo**bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 306 - iwildmatch (via ls-files): match 'foo**bar' 'foobazbar'
expecting success:
test-tool wildmatch pathmatch 'foobazbar' 'foo**bar'
ok 307 - pathmatch: match 'foobazbar' 'foo**bar'
expecting success:
printf '%s' 'foobazbar' >expect &&
git ls-files -z -- 'foo**bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 308 - pathmatch (via ls-files): match 'foo**bar' 'foobazbar'
expecting success:
test-tool wildmatch ipathmatch 'foobazbar' 'foo**bar'
ok 309 - ipathmatch: match 'foobazbar' 'foo**bar'
expecting success:
printf '%s' 'foobazbar' >expect &&
git --icase-pathspecs ls-files -z -- 'foo**bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 310 - ipathmatch (via ls-files): match 'foo**bar' 'foobazbar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foobazbar
ok 311 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 312 - setup match file test for foo/baz/bar
expecting success:
test-tool wildmatch wildmatch 'foo/baz/bar' 'foo/**/bar'
ok 313 - wildmatch: match 'foo/baz/bar' 'foo/**/bar'
expecting success:
printf '%s' 'foo/baz/bar' >expect &&
git --glob-pathspecs ls-files -z -- 'foo/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 314 - wildmatch (via ls-files): match 'foo/**/bar' 'foo/baz/bar'
expecting success:
test-tool wildmatch iwildmatch 'foo/baz/bar' 'foo/**/bar'
ok 315 - iwildmatch: match 'foo/baz/bar' 'foo/**/bar'
expecting success:
printf '%s' 'foo/baz/bar' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 316 - iwildmatch (via ls-files): match 'foo/**/bar' 'foo/baz/bar'
expecting success:
test-tool wildmatch pathmatch 'foo/baz/bar' 'foo/**/bar'
ok 317 - pathmatch: match 'foo/baz/bar' 'foo/**/bar'
expecting success:
printf '%s' 'foo/baz/bar' >expect &&
git ls-files -z -- 'foo/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 318 - pathmatch (via ls-files): match 'foo/**/bar' 'foo/baz/bar'
expecting success:
test-tool wildmatch ipathmatch 'foo/baz/bar' 'foo/**/bar'
ok 319 - ipathmatch: match 'foo/baz/bar' 'foo/**/bar'
expecting success:
printf '%s' 'foo/baz/bar' >expect &&
git --icase-pathspecs ls-files -z -- 'foo/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 320 - ipathmatch (via ls-files): match 'foo/**/bar' 'foo/baz/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 321 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 322 - setup match file test for foo/baz/bar
expecting success:
test-tool wildmatch wildmatch 'foo/baz/bar' 'foo/**/**/bar'
ok 323 - wildmatch: match 'foo/baz/bar' 'foo/**/**/bar'
expecting success:
printf '%s' 'foo/baz/bar' >expect &&
git --glob-pathspecs ls-files -z -- 'foo/**/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 324 - wildmatch (via ls-files): match 'foo/**/**/bar' 'foo/baz/bar'
expecting success:
test-tool wildmatch iwildmatch 'foo/baz/bar' 'foo/**/**/bar'
ok 325 - iwildmatch: match 'foo/baz/bar' 'foo/**/**/bar'
expecting success:
printf '%s' 'foo/baz/bar' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo/**/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 326 - iwildmatch (via ls-files): match 'foo/**/**/bar' 'foo/baz/bar'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'foo/baz/bar' 'foo/**/**/bar'
ok 327 - pathmatch: no match 'foo/baz/bar' 'foo/**/**/bar'
expecting success:
>expect &&
git ls-files -z -- 'foo/**/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 328 - pathmatch (via ls-files): no match 'foo/**/**/bar' 'foo/baz/bar'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'foo/baz/bar' 'foo/**/**/bar'
ok 329 - ipathmatch: no match 'foo/baz/bar' 'foo/**/**/bar'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- 'foo/**/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 330 - ipathmatch (via ls-files): no match 'foo/**/**/bar' 'foo/baz/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 331 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 332 - setup match file test for foo/b/a/z/bar
expecting success:
test-tool wildmatch wildmatch 'foo/b/a/z/bar' 'foo/**/bar'
ok 333 - wildmatch: match 'foo/b/a/z/bar' 'foo/**/bar'
expecting success:
printf '%s' 'foo/b/a/z/bar' >expect &&
git --glob-pathspecs ls-files -z -- 'foo/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 334 - wildmatch (via ls-files): match 'foo/**/bar' 'foo/b/a/z/bar'
expecting success:
test-tool wildmatch iwildmatch 'foo/b/a/z/bar' 'foo/**/bar'
ok 335 - iwildmatch: match 'foo/b/a/z/bar' 'foo/**/bar'
expecting success:
printf '%s' 'foo/b/a/z/bar' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 336 - iwildmatch (via ls-files): match 'foo/**/bar' 'foo/b/a/z/bar'
expecting success:
test-tool wildmatch pathmatch 'foo/b/a/z/bar' 'foo/**/bar'
ok 337 - pathmatch: match 'foo/b/a/z/bar' 'foo/**/bar'
expecting success:
printf '%s' 'foo/b/a/z/bar' >expect &&
git ls-files -z -- 'foo/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 338 - pathmatch (via ls-files): match 'foo/**/bar' 'foo/b/a/z/bar'
expecting success:
test-tool wildmatch ipathmatch 'foo/b/a/z/bar' 'foo/**/bar'
ok 339 - ipathmatch: match 'foo/b/a/z/bar' 'foo/**/bar'
expecting success:
printf '%s' 'foo/b/a/z/bar' >expect &&
git --icase-pathspecs ls-files -z -- 'foo/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 340 - ipathmatch (via ls-files): match 'foo/**/bar' 'foo/b/a/z/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 341 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 342 - setup match file test for foo/b/a/z/bar
expecting success:
test-tool wildmatch wildmatch 'foo/b/a/z/bar' 'foo/**/**/bar'
ok 343 - wildmatch: match 'foo/b/a/z/bar' 'foo/**/**/bar'
expecting success:
printf '%s' 'foo/b/a/z/bar' >expect &&
git --glob-pathspecs ls-files -z -- 'foo/**/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 344 - wildmatch (via ls-files): match 'foo/**/**/bar' 'foo/b/a/z/bar'
expecting success:
test-tool wildmatch iwildmatch 'foo/b/a/z/bar' 'foo/**/**/bar'
ok 345 - iwildmatch: match 'foo/b/a/z/bar' 'foo/**/**/bar'
expecting success:
printf '%s' 'foo/b/a/z/bar' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo/**/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 346 - iwildmatch (via ls-files): match 'foo/**/**/bar' 'foo/b/a/z/bar'
expecting success:
test-tool wildmatch pathmatch 'foo/b/a/z/bar' 'foo/**/**/bar'
ok 347 - pathmatch: match 'foo/b/a/z/bar' 'foo/**/**/bar'
expecting success:
printf '%s' 'foo/b/a/z/bar' >expect &&
git ls-files -z -- 'foo/**/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 348 - pathmatch (via ls-files): match 'foo/**/**/bar' 'foo/b/a/z/bar'
expecting success:
test-tool wildmatch ipathmatch 'foo/b/a/z/bar' 'foo/**/**/bar'
ok 349 - ipathmatch: match 'foo/b/a/z/bar' 'foo/**/**/bar'
expecting success:
printf '%s' 'foo/b/a/z/bar' >expect &&
git --icase-pathspecs ls-files -z -- 'foo/**/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 350 - ipathmatch (via ls-files): match 'foo/**/**/bar' 'foo/b/a/z/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 351 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 352 - setup match file test for foo/bar
expecting success:
test-tool wildmatch wildmatch 'foo/bar' 'foo/**/bar'
ok 353 - wildmatch: match 'foo/bar' 'foo/**/bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git --glob-pathspecs ls-files -z -- 'foo/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 354 - wildmatch (via ls-files): match 'foo/**/bar' 'foo/bar'
expecting success:
test-tool wildmatch iwildmatch 'foo/bar' 'foo/**/bar'
ok 355 - iwildmatch: match 'foo/bar' 'foo/**/bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 356 - iwildmatch (via ls-files): match 'foo/**/bar' 'foo/bar'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'foo/bar' 'foo/**/bar'
ok 357 - pathmatch: no match 'foo/bar' 'foo/**/bar'
expecting success:
>expect &&
git ls-files -z -- 'foo/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 358 - pathmatch (via ls-files): no match 'foo/**/bar' 'foo/bar'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'foo/bar' 'foo/**/bar'
ok 359 - ipathmatch: no match 'foo/bar' 'foo/**/bar'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- 'foo/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 360 - ipathmatch (via ls-files): no match 'foo/**/bar' 'foo/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 361 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 362 - setup match file test for foo/bar
expecting success:
test-tool wildmatch wildmatch 'foo/bar' 'foo/**/**/bar'
ok 363 - wildmatch: match 'foo/bar' 'foo/**/**/bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git --glob-pathspecs ls-files -z -- 'foo/**/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 364 - wildmatch (via ls-files): match 'foo/**/**/bar' 'foo/bar'
expecting success:
test-tool wildmatch iwildmatch 'foo/bar' 'foo/**/**/bar'
ok 365 - iwildmatch: match 'foo/bar' 'foo/**/**/bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo/**/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 366 - iwildmatch (via ls-files): match 'foo/**/**/bar' 'foo/bar'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'foo/bar' 'foo/**/**/bar'
ok 367 - pathmatch: no match 'foo/bar' 'foo/**/**/bar'
expecting success:
>expect &&
git ls-files -z -- 'foo/**/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 368 - pathmatch (via ls-files): no match 'foo/**/**/bar' 'foo/bar'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'foo/bar' 'foo/**/**/bar'
ok 369 - ipathmatch: no match 'foo/bar' 'foo/**/**/bar'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- 'foo/**/**/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 370 - ipathmatch (via ls-files): no match 'foo/**/**/bar' 'foo/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 371 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 372 - setup match file test for foo/bar
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/bar' 'foo?bar'
ok 373 - wildmatch: no match 'foo/bar' 'foo?bar'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'foo?bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 374 - wildmatch (via ls-files): no match 'foo?bar' 'foo/bar'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/bar' 'foo?bar'
ok 375 - iwildmatch: no match 'foo/bar' 'foo?bar'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo?bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 376 - iwildmatch (via ls-files): no match 'foo?bar' 'foo/bar'
expecting success:
test-tool wildmatch pathmatch 'foo/bar' 'foo?bar'
ok 377 - pathmatch: match 'foo/bar' 'foo?bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git ls-files -z -- 'foo?bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 378 - pathmatch (via ls-files): match 'foo?bar' 'foo/bar'
expecting success:
test-tool wildmatch ipathmatch 'foo/bar' 'foo?bar'
ok 379 - ipathmatch: match 'foo/bar' 'foo?bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git --icase-pathspecs ls-files -z -- 'foo?bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 380 - ipathmatch (via ls-files): match 'foo?bar' 'foo/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 381 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 382 - setup match file test for foo/bar
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/bar' 'foo[/]bar'
ok 383 - wildmatch: no match 'foo/bar' 'foo[/]bar'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'foo[/]bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 384 - wildmatch (via ls-files): no match 'foo[/]bar' 'foo/bar'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/bar' 'foo[/]bar'
ok 385 - iwildmatch: no match 'foo/bar' 'foo[/]bar'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo[/]bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 386 - iwildmatch (via ls-files): no match 'foo[/]bar' 'foo/bar'
expecting success:
test-tool wildmatch pathmatch 'foo/bar' 'foo[/]bar'
ok 387 - pathmatch: match 'foo/bar' 'foo[/]bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git ls-files -z -- 'foo[/]bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 388 - pathmatch (via ls-files): match 'foo[/]bar' 'foo/bar'
expecting success:
test-tool wildmatch ipathmatch 'foo/bar' 'foo[/]bar'
ok 389 - ipathmatch: match 'foo/bar' 'foo[/]bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git --icase-pathspecs ls-files -z -- 'foo[/]bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 390 - ipathmatch (via ls-files): match 'foo[/]bar' 'foo/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 391 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 392 - setup match file test for foo/bar
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/bar' 'foo[^a-z]bar'
ok 393 - wildmatch: no match 'foo/bar' 'foo[^a-z]bar'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'foo[^a-z]bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 394 - wildmatch (via ls-files): no match 'foo[^a-z]bar' 'foo/bar'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/bar' 'foo[^a-z]bar'
ok 395 - iwildmatch: no match 'foo/bar' 'foo[^a-z]bar'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo[^a-z]bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 396 - iwildmatch (via ls-files): no match 'foo[^a-z]bar' 'foo/bar'
expecting success:
test-tool wildmatch pathmatch 'foo/bar' 'foo[^a-z]bar'
ok 397 - pathmatch: match 'foo/bar' 'foo[^a-z]bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git ls-files -z -- 'foo[^a-z]bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 398 - pathmatch (via ls-files): match 'foo[^a-z]bar' 'foo/bar'
expecting success:
test-tool wildmatch ipathmatch 'foo/bar' 'foo[^a-z]bar'
ok 399 - ipathmatch: match 'foo/bar' 'foo[^a-z]bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git --icase-pathspecs ls-files -z -- 'foo[^a-z]bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 400 - ipathmatch (via ls-files): match 'foo[^a-z]bar' 'foo/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 401 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 402 - setup match file test for foo/bar
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
ok 403 - wildmatch: no match 'foo/bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 404 - wildmatch (via ls-files): no match 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r' 'foo/bar'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
ok 405 - iwildmatch: no match 'foo/bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 406 - iwildmatch (via ls-files): no match 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r' 'foo/bar'
expecting success:
test-tool wildmatch pathmatch 'foo/bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
ok 407 - pathmatch: match 'foo/bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
expecting success:
printf '%s' 'foo/bar' >expect &&
git ls-files -z -- 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 408 - pathmatch (via ls-files): match 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r' 'foo/bar'
expecting success:
test-tool wildmatch ipathmatch 'foo/bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
ok 409 - ipathmatch: match 'foo/bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
expecting success:
printf '%s' 'foo/bar' >expect &&
git --icase-pathspecs ls-files -z -- 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 410 - ipathmatch (via ls-files): match 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r' 'foo/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 411 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 412 - setup match file test for foo-bar
expecting success:
test-tool wildmatch wildmatch 'foo-bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
ok 413 - wildmatch: match 'foo-bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
expecting success:
printf '%s' 'foo-bar' >expect &&
git --glob-pathspecs ls-files -z -- 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 414 - wildmatch (via ls-files): match 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r' 'foo-bar'
expecting success:
test-tool wildmatch iwildmatch 'foo-bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
ok 415 - iwildmatch: match 'foo-bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
expecting success:
printf '%s' 'foo-bar' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 416 - iwildmatch (via ls-files): match 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r' 'foo-bar'
expecting success:
test-tool wildmatch pathmatch 'foo-bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
ok 417 - pathmatch: match 'foo-bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
expecting success:
printf '%s' 'foo-bar' >expect &&
git ls-files -z -- 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 418 - pathmatch (via ls-files): match 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r' 'foo-bar'
expecting success:
test-tool wildmatch ipathmatch 'foo-bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
ok 419 - ipathmatch: match 'foo-bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
expecting success:
printf '%s' 'foo-bar' >expect &&
git --icase-pathspecs ls-files -z -- 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 420 - ipathmatch (via ls-files): match 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r' 'foo-bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo-bar
ok 421 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 422 - setup match file test for foo
expecting success:
test-tool wildmatch wildmatch 'foo' '**/foo'
ok 423 - wildmatch: match 'foo' '**/foo'
expecting success:
printf '%s' 'foo' >expect &&
git --glob-pathspecs ls-files -z -- '**/foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 424 - wildmatch (via ls-files): match '**/foo' 'foo'
expecting success:
test-tool wildmatch iwildmatch 'foo' '**/foo'
ok 425 - iwildmatch: match 'foo' '**/foo'
expecting success:
printf '%s' 'foo' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '**/foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 426 - iwildmatch (via ls-files): match '**/foo' 'foo'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'foo' '**/foo'
ok 427 - pathmatch: no match 'foo' '**/foo'
expecting success:
>expect &&
git ls-files -z -- '**/foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 428 - pathmatch (via ls-files): no match '**/foo' 'foo'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'foo' '**/foo'
ok 429 - ipathmatch: no match 'foo' '**/foo'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '**/foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 430 - ipathmatch (via ls-files): no match '**/foo' 'foo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo
ok 431 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 432 - setup match file test for XXX/foo
expecting success:
test-tool wildmatch wildmatch 'XXX/foo' '**/foo'
ok 433 - wildmatch: match 'XXX/foo' '**/foo'
expecting success:
printf '%s' 'XXX/foo' >expect &&
git --glob-pathspecs ls-files -z -- '**/foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 434 - wildmatch (via ls-files): match '**/foo' 'XXX/foo'
expecting success:
test-tool wildmatch iwildmatch 'XXX/foo' '**/foo'
ok 435 - iwildmatch: match 'XXX/foo' '**/foo'
expecting success:
printf '%s' 'XXX/foo' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '**/foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 436 - iwildmatch (via ls-files): match '**/foo' 'XXX/foo'
expecting success:
test-tool wildmatch pathmatch 'XXX/foo' '**/foo'
ok 437 - pathmatch: match 'XXX/foo' '**/foo'
expecting success:
printf '%s' 'XXX/foo' >expect &&
git ls-files -z -- '**/foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 438 - pathmatch (via ls-files): match '**/foo' 'XXX/foo'
expecting success:
test-tool wildmatch ipathmatch 'XXX/foo' '**/foo'
ok 439 - ipathmatch: match 'XXX/foo' '**/foo'
expecting success:
printf '%s' 'XXX/foo' >expect &&
git --icase-pathspecs ls-files -z -- '**/foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 440 - ipathmatch (via ls-files): match '**/foo' 'XXX/foo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing XXX/
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 441 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 442 - setup match file test for bar/baz/foo
expecting success:
test-tool wildmatch wildmatch 'bar/baz/foo' '**/foo'
ok 443 - wildmatch: match 'bar/baz/foo' '**/foo'
expecting success:
printf '%s' 'bar/baz/foo' >expect &&
git --glob-pathspecs ls-files -z -- '**/foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 444 - wildmatch (via ls-files): match '**/foo' 'bar/baz/foo'
expecting success:
test-tool wildmatch iwildmatch 'bar/baz/foo' '**/foo'
ok 445 - iwildmatch: match 'bar/baz/foo' '**/foo'
expecting success:
printf '%s' 'bar/baz/foo' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '**/foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 446 - iwildmatch (via ls-files): match '**/foo' 'bar/baz/foo'
expecting success:
test-tool wildmatch pathmatch 'bar/baz/foo' '**/foo'
ok 447 - pathmatch: match 'bar/baz/foo' '**/foo'
expecting success:
printf '%s' 'bar/baz/foo' >expect &&
git ls-files -z -- '**/foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 448 - pathmatch (via ls-files): match '**/foo' 'bar/baz/foo'
expecting success:
test-tool wildmatch ipathmatch 'bar/baz/foo' '**/foo'
ok 449 - ipathmatch: match 'bar/baz/foo' '**/foo'
expecting success:
printf '%s' 'bar/baz/foo' >expect &&
git --icase-pathspecs ls-files -z -- '**/foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 450 - ipathmatch (via ls-files): match '**/foo' 'bar/baz/foo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing bar/
Removing expect
ok 451 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 452 - setup match file test for bar/baz/foo
expecting success:
test_must_fail test-tool wildmatch wildmatch 'bar/baz/foo' '*/foo'
ok 453 - wildmatch: no match 'bar/baz/foo' '*/foo'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '*/foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 454 - wildmatch (via ls-files): no match '*/foo' 'bar/baz/foo'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'bar/baz/foo' '*/foo'
ok 455 - iwildmatch: no match 'bar/baz/foo' '*/foo'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*/foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 456 - iwildmatch (via ls-files): no match '*/foo' 'bar/baz/foo'
expecting success:
test-tool wildmatch pathmatch 'bar/baz/foo' '*/foo'
ok 457 - pathmatch: match 'bar/baz/foo' '*/foo'
expecting success:
printf '%s' 'bar/baz/foo' >expect &&
git ls-files -z -- '*/foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 458 - pathmatch (via ls-files): match '*/foo' 'bar/baz/foo'
expecting success:
test-tool wildmatch ipathmatch 'bar/baz/foo' '*/foo'
ok 459 - ipathmatch: match 'bar/baz/foo' '*/foo'
expecting success:
printf '%s' 'bar/baz/foo' >expect &&
git --icase-pathspecs ls-files -z -- '*/foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 460 - ipathmatch (via ls-files): match '*/foo' 'bar/baz/foo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing bar/
Removing expect
ok 461 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 462 - setup match file test for foo/bar/baz
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/bar/baz' '**/bar*'
ok 463 - wildmatch: no match 'foo/bar/baz' '**/bar*'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '**/bar*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 464 - wildmatch (via ls-files): no match '**/bar*' 'foo/bar/baz'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/bar/baz' '**/bar*'
ok 465 - iwildmatch: no match 'foo/bar/baz' '**/bar*'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '**/bar*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 466 - iwildmatch (via ls-files): no match '**/bar*' 'foo/bar/baz'
expecting success:
test-tool wildmatch pathmatch 'foo/bar/baz' '**/bar*'
ok 467 - pathmatch: match 'foo/bar/baz' '**/bar*'
expecting success:
printf '%s' 'foo/bar/baz' >expect &&
git ls-files -z -- '**/bar*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 468 - pathmatch (via ls-files): match '**/bar*' 'foo/bar/baz'
expecting success:
test-tool wildmatch ipathmatch 'foo/bar/baz' '**/bar*'
ok 469 - ipathmatch: match 'foo/bar/baz' '**/bar*'
expecting success:
printf '%s' 'foo/bar/baz' >expect &&
git --icase-pathspecs ls-files -z -- '**/bar*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 470 - ipathmatch (via ls-files): match '**/bar*' 'foo/bar/baz'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 471 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 472 - setup match file test for deep/foo/bar/baz
expecting success:
test-tool wildmatch wildmatch 'deep/foo/bar/baz' '**/bar/*'
ok 473 - wildmatch: match 'deep/foo/bar/baz' '**/bar/*'
expecting success:
printf '%s' 'deep/foo/bar/baz' >expect &&
git --glob-pathspecs ls-files -z -- '**/bar/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 474 - wildmatch (via ls-files): match '**/bar/*' 'deep/foo/bar/baz'
expecting success:
test-tool wildmatch iwildmatch 'deep/foo/bar/baz' '**/bar/*'
ok 475 - iwildmatch: match 'deep/foo/bar/baz' '**/bar/*'
expecting success:
printf '%s' 'deep/foo/bar/baz' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '**/bar/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 476 - iwildmatch (via ls-files): match '**/bar/*' 'deep/foo/bar/baz'
expecting success:
test-tool wildmatch pathmatch 'deep/foo/bar/baz' '**/bar/*'
ok 477 - pathmatch: match 'deep/foo/bar/baz' '**/bar/*'
expecting success:
printf '%s' 'deep/foo/bar/baz' >expect &&
git ls-files -z -- '**/bar/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 478 - pathmatch (via ls-files): match '**/bar/*' 'deep/foo/bar/baz'
expecting success:
test-tool wildmatch ipathmatch 'deep/foo/bar/baz' '**/bar/*'
ok 479 - ipathmatch: match 'deep/foo/bar/baz' '**/bar/*'
expecting success:
printf '%s' 'deep/foo/bar/baz' >expect &&
git --icase-pathspecs ls-files -z -- '**/bar/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 480 - ipathmatch (via ls-files): match '**/bar/*' 'deep/foo/bar/baz'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing deep/
Removing expect
ok 481 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 482 - setup match file test for deep/foo/bar/baz/
expecting success:
test_must_fail test-tool wildmatch wildmatch 'deep/foo/bar/baz/' '**/bar/*'
ok 483 - wildmatch: no match 'deep/foo/bar/baz/' '**/bar/*'
checking known breakage: false
not ok 484 - wildmatch (via ls-files): no match skip '**/bar/*' 'deep/foo/bar/baz/' # TODO known breakage
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'deep/foo/bar/baz/' '**/bar/*'
ok 485 - iwildmatch: no match 'deep/foo/bar/baz/' '**/bar/*'
checking known breakage: false
not ok 486 - iwildmatch (via ls-files): no match skip '**/bar/*' 'deep/foo/bar/baz/' # TODO known breakage
expecting success:
test-tool wildmatch pathmatch 'deep/foo/bar/baz/' '**/bar/*'
ok 487 - pathmatch: match 'deep/foo/bar/baz/' '**/bar/*'
checking known breakage: false
not ok 488 - pathmatch (via ls-files): match skip '**/bar/*' 'deep/foo/bar/baz/' # TODO known breakage
expecting success:
test-tool wildmatch ipathmatch 'deep/foo/bar/baz/' '**/bar/*'
ok 489 - ipathmatch: match 'deep/foo/bar/baz/' '**/bar/*'
checking known breakage: false
not ok 490 - ipathmatch (via ls-files): match skip '**/bar/*' 'deep/foo/bar/baz/' # TODO known breakage
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
ok 491 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 492 - setup match file test for deep/foo/bar/baz/
expecting success:
test-tool wildmatch wildmatch 'deep/foo/bar/baz/' '**/bar/**'
ok 493 - wildmatch: match 'deep/foo/bar/baz/' '**/bar/**'
checking known breakage: false
not ok 494 - wildmatch (via ls-files): match skip '**/bar/**' 'deep/foo/bar/baz/' # TODO known breakage
expecting success:
test-tool wildmatch iwildmatch 'deep/foo/bar/baz/' '**/bar/**'
ok 495 - iwildmatch: match 'deep/foo/bar/baz/' '**/bar/**'
checking known breakage: false
not ok 496 - iwildmatch (via ls-files): match skip '**/bar/**' 'deep/foo/bar/baz/' # TODO known breakage
expecting success:
test-tool wildmatch pathmatch 'deep/foo/bar/baz/' '**/bar/**'
ok 497 - pathmatch: match 'deep/foo/bar/baz/' '**/bar/**'
checking known breakage: false
not ok 498 - pathmatch (via ls-files): match skip '**/bar/**' 'deep/foo/bar/baz/' # TODO known breakage
expecting success:
test-tool wildmatch ipathmatch 'deep/foo/bar/baz/' '**/bar/**'
ok 499 - ipathmatch: match 'deep/foo/bar/baz/' '**/bar/**'
checking known breakage: false
not ok 500 - ipathmatch (via ls-files): match skip '**/bar/**' 'deep/foo/bar/baz/' # TODO known breakage
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
ok 501 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 502 - setup match file test for deep/foo/bar
expecting success:
test_must_fail test-tool wildmatch wildmatch 'deep/foo/bar' '**/bar/*'
ok 503 - wildmatch: no match 'deep/foo/bar' '**/bar/*'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '**/bar/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 504 - wildmatch (via ls-files): no match '**/bar/*' 'deep/foo/bar'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'deep/foo/bar' '**/bar/*'
ok 505 - iwildmatch: no match 'deep/foo/bar' '**/bar/*'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '**/bar/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 506 - iwildmatch (via ls-files): no match '**/bar/*' 'deep/foo/bar'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'deep/foo/bar' '**/bar/*'
ok 507 - pathmatch: no match 'deep/foo/bar' '**/bar/*'
expecting success:
>expect &&
git ls-files -z -- '**/bar/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 508 - pathmatch (via ls-files): no match '**/bar/*' 'deep/foo/bar'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'deep/foo/bar' '**/bar/*'
ok 509 - ipathmatch: no match 'deep/foo/bar' '**/bar/*'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '**/bar/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 510 - ipathmatch (via ls-files): no match '**/bar/*' 'deep/foo/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing deep/
Removing expect
ok 511 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 512 - setup match file test for deep/foo/bar/
expecting success:
test-tool wildmatch wildmatch 'deep/foo/bar/' '**/bar/**'
ok 513 - wildmatch: match 'deep/foo/bar/' '**/bar/**'
checking known breakage: false
not ok 514 - wildmatch (via ls-files): match skip '**/bar/**' 'deep/foo/bar/' # TODO known breakage
expecting success:
test-tool wildmatch iwildmatch 'deep/foo/bar/' '**/bar/**'
ok 515 - iwildmatch: match 'deep/foo/bar/' '**/bar/**'
checking known breakage: false
not ok 516 - iwildmatch (via ls-files): match skip '**/bar/**' 'deep/foo/bar/' # TODO known breakage
expecting success:
test-tool wildmatch pathmatch 'deep/foo/bar/' '**/bar/**'
ok 517 - pathmatch: match 'deep/foo/bar/' '**/bar/**'
checking known breakage: false
not ok 518 - pathmatch (via ls-files): match skip '**/bar/**' 'deep/foo/bar/' # TODO known breakage
expecting success:
test-tool wildmatch ipathmatch 'deep/foo/bar/' '**/bar/**'
ok 519 - ipathmatch: match 'deep/foo/bar/' '**/bar/**'
checking known breakage: false
not ok 520 - ipathmatch (via ls-files): match skip '**/bar/**' 'deep/foo/bar/' # TODO known breakage
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
ok 521 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 522 - setup match file test for foo/bar/baz
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/bar/baz' '**/bar**'
ok 523 - wildmatch: no match 'foo/bar/baz' '**/bar**'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '**/bar**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 524 - wildmatch (via ls-files): no match '**/bar**' 'foo/bar/baz'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/bar/baz' '**/bar**'
ok 525 - iwildmatch: no match 'foo/bar/baz' '**/bar**'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '**/bar**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 526 - iwildmatch (via ls-files): no match '**/bar**' 'foo/bar/baz'
expecting success:
test-tool wildmatch pathmatch 'foo/bar/baz' '**/bar**'
ok 527 - pathmatch: match 'foo/bar/baz' '**/bar**'
expecting success:
printf '%s' 'foo/bar/baz' >expect &&
git ls-files -z -- '**/bar**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 528 - pathmatch (via ls-files): match '**/bar**' 'foo/bar/baz'
expecting success:
test-tool wildmatch ipathmatch 'foo/bar/baz' '**/bar**'
ok 529 - ipathmatch: match 'foo/bar/baz' '**/bar**'
expecting success:
printf '%s' 'foo/bar/baz' >expect &&
git --icase-pathspecs ls-files -z -- '**/bar**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 530 - ipathmatch (via ls-files): match '**/bar**' 'foo/bar/baz'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 531 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 532 - setup match file test for foo/bar/baz/x
expecting success:
test-tool wildmatch wildmatch 'foo/bar/baz/x' '*/bar/**'
ok 533 - wildmatch: match 'foo/bar/baz/x' '*/bar/**'
expecting success:
printf '%s' 'foo/bar/baz/x' >expect &&
git --glob-pathspecs ls-files -z -- '*/bar/**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 534 - wildmatch (via ls-files): match '*/bar/**' 'foo/bar/baz/x'
expecting success:
test-tool wildmatch iwildmatch 'foo/bar/baz/x' '*/bar/**'
ok 535 - iwildmatch: match 'foo/bar/baz/x' '*/bar/**'
expecting success:
printf '%s' 'foo/bar/baz/x' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*/bar/**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 536 - iwildmatch (via ls-files): match '*/bar/**' 'foo/bar/baz/x'
expecting success:
test-tool wildmatch pathmatch 'foo/bar/baz/x' '*/bar/**'
ok 537 - pathmatch: match 'foo/bar/baz/x' '*/bar/**'
expecting success:
printf '%s' 'foo/bar/baz/x' >expect &&
git ls-files -z -- '*/bar/**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 538 - pathmatch (via ls-files): match '*/bar/**' 'foo/bar/baz/x'
expecting success:
test-tool wildmatch ipathmatch 'foo/bar/baz/x' '*/bar/**'
ok 539 - ipathmatch: match 'foo/bar/baz/x' '*/bar/**'
expecting success:
printf '%s' 'foo/bar/baz/x' >expect &&
git --icase-pathspecs ls-files -z -- '*/bar/**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 540 - ipathmatch (via ls-files): match '*/bar/**' 'foo/bar/baz/x'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 541 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 542 - setup match file test for deep/foo/bar/baz/x
expecting success:
test_must_fail test-tool wildmatch wildmatch 'deep/foo/bar/baz/x' '*/bar/**'
ok 543 - wildmatch: no match 'deep/foo/bar/baz/x' '*/bar/**'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '*/bar/**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 544 - wildmatch (via ls-files): no match '*/bar/**' 'deep/foo/bar/baz/x'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'deep/foo/bar/baz/x' '*/bar/**'
ok 545 - iwildmatch: no match 'deep/foo/bar/baz/x' '*/bar/**'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*/bar/**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 546 - iwildmatch (via ls-files): no match '*/bar/**' 'deep/foo/bar/baz/x'
expecting success:
test-tool wildmatch pathmatch 'deep/foo/bar/baz/x' '*/bar/**'
ok 547 - pathmatch: match 'deep/foo/bar/baz/x' '*/bar/**'
expecting success:
printf '%s' 'deep/foo/bar/baz/x' >expect &&
git ls-files -z -- '*/bar/**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 548 - pathmatch (via ls-files): match '*/bar/**' 'deep/foo/bar/baz/x'
expecting success:
test-tool wildmatch ipathmatch 'deep/foo/bar/baz/x' '*/bar/**'
ok 549 - ipathmatch: match 'deep/foo/bar/baz/x' '*/bar/**'
expecting success:
printf '%s' 'deep/foo/bar/baz/x' >expect &&
git --icase-pathspecs ls-files -z -- '*/bar/**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 550 - ipathmatch (via ls-files): match '*/bar/**' 'deep/foo/bar/baz/x'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing deep/
Removing expect
ok 551 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 552 - setup match file test for deep/foo/bar/baz/x
expecting success:
test-tool wildmatch wildmatch 'deep/foo/bar/baz/x' '**/bar/*/*'
ok 553 - wildmatch: match 'deep/foo/bar/baz/x' '**/bar/*/*'
expecting success:
printf '%s' 'deep/foo/bar/baz/x' >expect &&
git --glob-pathspecs ls-files -z -- '**/bar/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 554 - wildmatch (via ls-files): match '**/bar/*/*' 'deep/foo/bar/baz/x'
expecting success:
test-tool wildmatch iwildmatch 'deep/foo/bar/baz/x' '**/bar/*/*'
ok 555 - iwildmatch: match 'deep/foo/bar/baz/x' '**/bar/*/*'
expecting success:
printf '%s' 'deep/foo/bar/baz/x' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '**/bar/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 556 - iwildmatch (via ls-files): match '**/bar/*/*' 'deep/foo/bar/baz/x'
expecting success:
test-tool wildmatch pathmatch 'deep/foo/bar/baz/x' '**/bar/*/*'
ok 557 - pathmatch: match 'deep/foo/bar/baz/x' '**/bar/*/*'
expecting success:
printf '%s' 'deep/foo/bar/baz/x' >expect &&
git ls-files -z -- '**/bar/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 558 - pathmatch (via ls-files): match '**/bar/*/*' 'deep/foo/bar/baz/x'
expecting success:
test-tool wildmatch ipathmatch 'deep/foo/bar/baz/x' '**/bar/*/*'
ok 559 - ipathmatch: match 'deep/foo/bar/baz/x' '**/bar/*/*'
expecting success:
printf '%s' 'deep/foo/bar/baz/x' >expect &&
git --icase-pathspecs ls-files -z -- '**/bar/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 560 - ipathmatch (via ls-files): match '**/bar/*/*' 'deep/foo/bar/baz/x'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing deep/
Removing expect
ok 561 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 562 - setup match file test for acrt
expecting success:
test_must_fail test-tool wildmatch wildmatch 'acrt' 'a[c-c]st'
ok 563 - wildmatch: no match 'acrt' 'a[c-c]st'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'a[c-c]st' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 564 - wildmatch (via ls-files): no match 'a[c-c]st' 'acrt'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'acrt' 'a[c-c]st'
ok 565 - iwildmatch: no match 'acrt' 'a[c-c]st'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'a[c-c]st' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 566 - iwildmatch (via ls-files): no match 'a[c-c]st' 'acrt'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'acrt' 'a[c-c]st'
ok 567 - pathmatch: no match 'acrt' 'a[c-c]st'
expecting success:
>expect &&
git ls-files -z -- 'a[c-c]st' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 568 - pathmatch (via ls-files): no match 'a[c-c]st' 'acrt'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'acrt' 'a[c-c]st'
ok 569 - ipathmatch: no match 'acrt' 'a[c-c]st'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- 'a[c-c]st' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 570 - ipathmatch (via ls-files): no match 'a[c-c]st' 'acrt'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing acrt
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 571 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 572 - setup match file test for acrt
expecting success:
test-tool wildmatch wildmatch 'acrt' 'a[c-c]rt'
ok 573 - wildmatch: match 'acrt' 'a[c-c]rt'
expecting success:
printf '%s' 'acrt' >expect &&
git --glob-pathspecs ls-files -z -- 'a[c-c]rt' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 574 - wildmatch (via ls-files): match 'a[c-c]rt' 'acrt'
expecting success:
test-tool wildmatch iwildmatch 'acrt' 'a[c-c]rt'
ok 575 - iwildmatch: match 'acrt' 'a[c-c]rt'
expecting success:
printf '%s' 'acrt' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'a[c-c]rt' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 576 - iwildmatch (via ls-files): match 'a[c-c]rt' 'acrt'
expecting success:
test-tool wildmatch pathmatch 'acrt' 'a[c-c]rt'
ok 577 - pathmatch: match 'acrt' 'a[c-c]rt'
expecting success:
printf '%s' 'acrt' >expect &&
git ls-files -z -- 'a[c-c]rt' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 578 - pathmatch (via ls-files): match 'a[c-c]rt' 'acrt'
expecting success:
test-tool wildmatch ipathmatch 'acrt' 'a[c-c]rt'
ok 579 - ipathmatch: match 'acrt' 'a[c-c]rt'
expecting success:
printf '%s' 'acrt' >expect &&
git --icase-pathspecs ls-files -z -- 'a[c-c]rt' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 580 - ipathmatch (via ls-files): match 'a[c-c]rt' 'acrt'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing acrt
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 581 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 582 - setup match file test for ]
expecting success:
test_must_fail test-tool wildmatch wildmatch ']' '[!]-]'
ok 583 - wildmatch: no match ']' '[!]-]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[!]-]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 584 - wildmatch (via ls-files): no match '[!]-]' ']'
expecting success:
test_must_fail test-tool wildmatch iwildmatch ']' '[!]-]'
ok 585 - iwildmatch: no match ']' '[!]-]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[!]-]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 586 - iwildmatch (via ls-files): no match '[!]-]' ']'
expecting success:
test_must_fail test-tool wildmatch pathmatch ']' '[!]-]'
ok 587 - pathmatch: no match ']' '[!]-]'
expecting success:
>expect &&
git ls-files -z -- '[!]-]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 588 - pathmatch (via ls-files): no match '[!]-]' ']'
expecting success:
test_must_fail test-tool wildmatch ipathmatch ']' '[!]-]'
ok 589 - ipathmatch: no match ']' '[!]-]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[!]-]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 590 - ipathmatch (via ls-files): no match '[!]-]' ']'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ]
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 591 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 592 - setup match file test for a
expecting success:
test-tool wildmatch wildmatch 'a' '[!]-]'
ok 593 - wildmatch: match 'a' '[!]-]'
expecting success:
printf '%s' 'a' >expect &&
git --glob-pathspecs ls-files -z -- '[!]-]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 594 - wildmatch (via ls-files): match '[!]-]' 'a'
expecting success:
test-tool wildmatch iwildmatch 'a' '[!]-]'
ok 595 - iwildmatch: match 'a' '[!]-]'
expecting success:
printf '%s' 'a' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[!]-]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 596 - iwildmatch (via ls-files): match '[!]-]' 'a'
expecting success:
test-tool wildmatch pathmatch 'a' '[!]-]'
ok 597 - pathmatch: match 'a' '[!]-]'
expecting success:
printf '%s' 'a' >expect &&
git ls-files -z -- '[!]-]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 598 - pathmatch (via ls-files): match '[!]-]' 'a'
expecting success:
test-tool wildmatch ipathmatch 'a' '[!]-]'
ok 599 - ipathmatch: match 'a' '[!]-]'
expecting success:
printf '%s' 'a' >expect &&
git --icase-pathspecs ls-files -z -- '[!]-]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 600 - ipathmatch (via ls-files): match '[!]-]' 'a'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing a
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 601 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 602 - setup match file test for
expecting success:
test_must_fail test-tool wildmatch wildmatch '' '\'
ok 603 - wildmatch: no match '' '\'
checking known breakage: false
not ok 604 - wildmatch (via ls-files): no match skip '\' '' # TODO known breakage
expecting success:
test_must_fail test-tool wildmatch iwildmatch '' '\'
ok 605 - iwildmatch: no match '' '\'
checking known breakage: false
not ok 606 - iwildmatch (via ls-files): no match skip '\' '' # TODO known breakage
expecting success:
test_must_fail test-tool wildmatch pathmatch '' '\'
ok 607 - pathmatch: no match '' '\'
checking known breakage: false
not ok 608 - pathmatch (via ls-files): no match skip '\' '' # TODO known breakage
expecting success:
test_must_fail test-tool wildmatch ipathmatch '' '\'
ok 609 - ipathmatch: no match '' '\'
checking known breakage: false
not ok 610 - ipathmatch (via ls-files): no match skip '\' '' # TODO known breakage
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
ok 611 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 612 - setup match file test for \
expecting success:
test_must_fail test-tool wildmatch wildmatch '\' '\'
ok 613 - wildmatch: no match '\' '\'
expecting success:
printf '%s' '\' >expect &&
git --glob-pathspecs ls-files -z -- '\' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 614 - wildmatch (via ls-files): match '\' '\'
expecting success:
test_must_fail test-tool wildmatch iwildmatch '\' '\'
ok 615 - iwildmatch: no match '\' '\'
expecting success:
printf '%s' '\' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '\' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 616 - iwildmatch (via ls-files): match '\' '\'
expecting success:
test_must_fail test-tool wildmatch pathmatch '\' '\'
ok 617 - pathmatch: no match '\' '\'
expecting success:
printf '%s' '\' >expect &&
git ls-files -z -- '\' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 618 - pathmatch (via ls-files): match '\' '\'
expecting success:
test_must_fail test-tool wildmatch ipathmatch '\' '\'
ok 619 - ipathmatch: no match '\' '\'
expecting success:
printf '%s' '\' >expect &&
git --icase-pathspecs ls-files -z -- '\' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 620 - ipathmatch (via ls-files): match '\' '\'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing "\\"
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 621 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 622 - setup match file test for XXX/\
expecting success:
test_must_fail test-tool wildmatch wildmatch 'XXX/\' '*/\'
ok 623 - wildmatch: no match 'XXX/\' '*/\'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '*/\' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 624 - wildmatch (via ls-files): no match '*/\' 'XXX/\'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'XXX/\' '*/\'
ok 625 - iwildmatch: no match 'XXX/\' '*/\'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*/\' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 626 - iwildmatch (via ls-files): no match '*/\' 'XXX/\'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'XXX/\' '*/\'
ok 627 - pathmatch: no match 'XXX/\' '*/\'
expecting success:
>expect &&
git ls-files -z -- '*/\' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 628 - pathmatch (via ls-files): no match '*/\' 'XXX/\'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'XXX/\' '*/\'
ok 629 - ipathmatch: no match 'XXX/\' '*/\'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '*/\' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 630 - ipathmatch (via ls-files): no match '*/\' 'XXX/\'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing XXX/
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 631 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 632 - setup match file test for XXX/\
expecting success:
test-tool wildmatch wildmatch 'XXX/\' '*/\\'
ok 633 - wildmatch: match 'XXX/\' '*/\\'
expecting success:
printf '%s' 'XXX/\' >expect &&
git --glob-pathspecs ls-files -z -- '*/\\' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 634 - wildmatch (via ls-files): match '*/\\' 'XXX/\'
expecting success:
test-tool wildmatch iwildmatch 'XXX/\' '*/\\'
ok 635 - iwildmatch: match 'XXX/\' '*/\\'
expecting success:
printf '%s' 'XXX/\' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*/\\' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 636 - iwildmatch (via ls-files): match '*/\\' 'XXX/\'
expecting success:
test-tool wildmatch pathmatch 'XXX/\' '*/\\'
ok 637 - pathmatch: match 'XXX/\' '*/\\'
expecting success:
printf '%s' 'XXX/\' >expect &&
git ls-files -z -- '*/\\' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 638 - pathmatch (via ls-files): match '*/\\' 'XXX/\'
expecting success:
test-tool wildmatch ipathmatch 'XXX/\' '*/\\'
ok 639 - ipathmatch: match 'XXX/\' '*/\\'
expecting success:
printf '%s' 'XXX/\' >expect &&
git --icase-pathspecs ls-files -z -- '*/\\' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 640 - ipathmatch (via ls-files): match '*/\\' 'XXX/\'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing XXX/
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 641 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 642 - setup match file test for foo
expecting success:
test-tool wildmatch wildmatch 'foo' 'foo'
ok 643 - wildmatch: match 'foo' 'foo'
expecting success:
printf '%s' 'foo' >expect &&
git --glob-pathspecs ls-files -z -- 'foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 644 - wildmatch (via ls-files): match 'foo' 'foo'
expecting success:
test-tool wildmatch iwildmatch 'foo' 'foo'
ok 645 - iwildmatch: match 'foo' 'foo'
expecting success:
printf '%s' 'foo' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 646 - iwildmatch (via ls-files): match 'foo' 'foo'
expecting success:
test-tool wildmatch pathmatch 'foo' 'foo'
ok 647 - pathmatch: match 'foo' 'foo'
expecting success:
printf '%s' 'foo' >expect &&
git ls-files -z -- 'foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 648 - pathmatch (via ls-files): match 'foo' 'foo'
expecting success:
test-tool wildmatch ipathmatch 'foo' 'foo'
ok 649 - ipathmatch: match 'foo' 'foo'
expecting success:
printf '%s' 'foo' >expect &&
git --icase-pathspecs ls-files -z -- 'foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 650 - ipathmatch (via ls-files): match 'foo' 'foo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo
ok 651 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 652 - setup match file test for @foo
expecting success:
test-tool wildmatch wildmatch '@foo' '@foo'
ok 653 - wildmatch: match '@foo' '@foo'
expecting success:
printf '%s' '@foo' >expect &&
git --glob-pathspecs ls-files -z -- '@foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 654 - wildmatch (via ls-files): match '@foo' '@foo'
expecting success:
test-tool wildmatch iwildmatch '@foo' '@foo'
ok 655 - iwildmatch: match '@foo' '@foo'
expecting success:
printf '%s' '@foo' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '@foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 656 - iwildmatch (via ls-files): match '@foo' '@foo'
expecting success:
test-tool wildmatch pathmatch '@foo' '@foo'
ok 657 - pathmatch: match '@foo' '@foo'
expecting success:
printf '%s' '@foo' >expect &&
git ls-files -z -- '@foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 658 - pathmatch (via ls-files): match '@foo' '@foo'
expecting success:
test-tool wildmatch ipathmatch '@foo' '@foo'
ok 659 - ipathmatch: match '@foo' '@foo'
expecting success:
printf '%s' '@foo' >expect &&
git --icase-pathspecs ls-files -z -- '@foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 660 - ipathmatch (via ls-files): match '@foo' '@foo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing @foo
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 661 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 662 - setup match file test for foo
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo' '@foo'
ok 663 - wildmatch: no match 'foo' '@foo'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '@foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 664 - wildmatch (via ls-files): no match '@foo' 'foo'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo' '@foo'
ok 665 - iwildmatch: no match 'foo' '@foo'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '@foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 666 - iwildmatch (via ls-files): no match '@foo' 'foo'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'foo' '@foo'
ok 667 - pathmatch: no match 'foo' '@foo'
expecting success:
>expect &&
git ls-files -z -- '@foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 668 - pathmatch (via ls-files): no match '@foo' 'foo'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'foo' '@foo'
ok 669 - ipathmatch: no match 'foo' '@foo'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '@foo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 670 - ipathmatch (via ls-files): no match '@foo' 'foo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo
ok 671 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 672 - setup match file test for [ab]
expecting success:
test-tool wildmatch wildmatch '[ab]' '\[ab]'
ok 673 - wildmatch: match '[ab]' '\[ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git --glob-pathspecs ls-files -z -- '\[ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 674 - wildmatch (via ls-files): match '\[ab]' '[ab]'
expecting success:
test-tool wildmatch iwildmatch '[ab]' '\[ab]'
ok 675 - iwildmatch: match '[ab]' '\[ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '\[ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 676 - iwildmatch (via ls-files): match '\[ab]' '[ab]'
expecting success:
test-tool wildmatch pathmatch '[ab]' '\[ab]'
ok 677 - pathmatch: match '[ab]' '\[ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git ls-files -z -- '\[ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 678 - pathmatch (via ls-files): match '\[ab]' '[ab]'
expecting success:
test-tool wildmatch ipathmatch '[ab]' '\[ab]'
ok 679 - ipathmatch: match '[ab]' '\[ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git --icase-pathspecs ls-files -z -- '\[ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 680 - ipathmatch (via ls-files): match '\[ab]' '[ab]'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing [ab]
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 681 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 682 - setup match file test for [ab]
expecting success:
test-tool wildmatch wildmatch '[ab]' '[[]ab]'
ok 683 - wildmatch: match '[ab]' '[[]ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git --glob-pathspecs ls-files -z -- '[[]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 684 - wildmatch (via ls-files): match '[[]ab]' '[ab]'
expecting success:
test-tool wildmatch iwildmatch '[ab]' '[[]ab]'
ok 685 - iwildmatch: match '[ab]' '[[]ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 686 - iwildmatch (via ls-files): match '[[]ab]' '[ab]'
expecting success:
test-tool wildmatch pathmatch '[ab]' '[[]ab]'
ok 687 - pathmatch: match '[ab]' '[[]ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git ls-files -z -- '[[]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 688 - pathmatch (via ls-files): match '[[]ab]' '[ab]'
expecting success:
test-tool wildmatch ipathmatch '[ab]' '[[]ab]'
ok 689 - ipathmatch: match '[ab]' '[[]ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git --icase-pathspecs ls-files -z -- '[[]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 690 - ipathmatch (via ls-files): match '[[]ab]' '[ab]'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing [ab]
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 691 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 692 - setup match file test for [ab]
expecting success:
test-tool wildmatch wildmatch '[ab]' '[[:]ab]'
ok 693 - wildmatch: match '[ab]' '[[:]ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git --glob-pathspecs ls-files -z -- '[[:]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 694 - wildmatch (via ls-files): match '[[:]ab]' '[ab]'
expecting success:
test-tool wildmatch iwildmatch '[ab]' '[[:]ab]'
ok 695 - iwildmatch: match '[ab]' '[[:]ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[:]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 696 - iwildmatch (via ls-files): match '[[:]ab]' '[ab]'
expecting success:
test-tool wildmatch pathmatch '[ab]' '[[:]ab]'
ok 697 - pathmatch: match '[ab]' '[[:]ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git ls-files -z -- '[[:]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 698 - pathmatch (via ls-files): match '[[:]ab]' '[ab]'
expecting success:
test-tool wildmatch ipathmatch '[ab]' '[[:]ab]'
ok 699 - ipathmatch: match '[ab]' '[[:]ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git --icase-pathspecs ls-files -z -- '[[:]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 700 - ipathmatch (via ls-files): match '[[:]ab]' '[ab]'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing [ab]
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 701 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 702 - setup match file test for [ab]
expecting success:
test_must_fail test-tool wildmatch wildmatch '[ab]' '[[::]ab]'
ok 703 - wildmatch: no match '[ab]' '[[::]ab]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[[::]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 704 - wildmatch (via ls-files): no match '[[::]ab]' '[ab]'
expecting success:
test_must_fail test-tool wildmatch iwildmatch '[ab]' '[[::]ab]'
ok 705 - iwildmatch: no match '[ab]' '[[::]ab]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[::]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 706 - iwildmatch (via ls-files): no match '[[::]ab]' '[ab]'
expecting success:
test_must_fail test-tool wildmatch pathmatch '[ab]' '[[::]ab]'
ok 707 - pathmatch: no match '[ab]' '[[::]ab]'
expecting success:
>expect &&
git ls-files -z -- '[[::]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 708 - pathmatch (via ls-files): no match '[[::]ab]' '[ab]'
expecting success:
test_must_fail test-tool wildmatch ipathmatch '[ab]' '[[::]ab]'
ok 709 - ipathmatch: no match '[ab]' '[[::]ab]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[[::]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 710 - ipathmatch (via ls-files): no match '[[::]ab]' '[ab]'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing [ab]
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 711 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 712 - setup match file test for [ab]
expecting success:
test-tool wildmatch wildmatch '[ab]' '[[:digit]ab]'
ok 713 - wildmatch: match '[ab]' '[[:digit]ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git --glob-pathspecs ls-files -z -- '[[:digit]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 714 - wildmatch (via ls-files): match '[[:digit]ab]' '[ab]'
expecting success:
test-tool wildmatch iwildmatch '[ab]' '[[:digit]ab]'
ok 715 - iwildmatch: match '[ab]' '[[:digit]ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[:digit]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 716 - iwildmatch (via ls-files): match '[[:digit]ab]' '[ab]'
expecting success:
test-tool wildmatch pathmatch '[ab]' '[[:digit]ab]'
ok 717 - pathmatch: match '[ab]' '[[:digit]ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git ls-files -z -- '[[:digit]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 718 - pathmatch (via ls-files): match '[[:digit]ab]' '[ab]'
expecting success:
test-tool wildmatch ipathmatch '[ab]' '[[:digit]ab]'
ok 719 - ipathmatch: match '[ab]' '[[:digit]ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git --icase-pathspecs ls-files -z -- '[[:digit]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 720 - ipathmatch (via ls-files): match '[[:digit]ab]' '[ab]'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing [ab]
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 721 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 722 - setup match file test for [ab]
expecting success:
test-tool wildmatch wildmatch '[ab]' '[\[:]ab]'
ok 723 - wildmatch: match '[ab]' '[\[:]ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git --glob-pathspecs ls-files -z -- '[\[:]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 724 - wildmatch (via ls-files): match '[\[:]ab]' '[ab]'
expecting success:
test-tool wildmatch iwildmatch '[ab]' '[\[:]ab]'
ok 725 - iwildmatch: match '[ab]' '[\[:]ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[\[:]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 726 - iwildmatch (via ls-files): match '[\[:]ab]' '[ab]'
expecting success:
test-tool wildmatch pathmatch '[ab]' '[\[:]ab]'
ok 727 - pathmatch: match '[ab]' '[\[:]ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git ls-files -z -- '[\[:]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 728 - pathmatch (via ls-files): match '[\[:]ab]' '[ab]'
expecting success:
test-tool wildmatch ipathmatch '[ab]' '[\[:]ab]'
ok 729 - ipathmatch: match '[ab]' '[\[:]ab]'
expecting success:
printf '%s' '[ab]' >expect &&
git --icase-pathspecs ls-files -z -- '[\[:]ab]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 730 - ipathmatch (via ls-files): match '[\[:]ab]' '[ab]'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing [ab]
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 731 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 732 - setup match file test for ?a?b
expecting success:
test-tool wildmatch wildmatch '?a?b' '\??\?b'
ok 733 - wildmatch: match '?a?b' '\??\?b'
expecting success:
printf '%s' '?a?b' >expect &&
git --glob-pathspecs ls-files -z -- '\??\?b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 734 - wildmatch (via ls-files): match '\??\?b' '?a?b'
expecting success:
test-tool wildmatch iwildmatch '?a?b' '\??\?b'
ok 735 - iwildmatch: match '?a?b' '\??\?b'
expecting success:
printf '%s' '?a?b' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '\??\?b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 736 - iwildmatch (via ls-files): match '\??\?b' '?a?b'
expecting success:
test-tool wildmatch pathmatch '?a?b' '\??\?b'
ok 737 - pathmatch: match '?a?b' '\??\?b'
expecting success:
printf '%s' '?a?b' >expect &&
git ls-files -z -- '\??\?b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 738 - pathmatch (via ls-files): match '\??\?b' '?a?b'
expecting success:
test-tool wildmatch ipathmatch '?a?b' '\??\?b'
ok 739 - ipathmatch: match '?a?b' '\??\?b'
expecting success:
printf '%s' '?a?b' >expect &&
git --icase-pathspecs ls-files -z -- '\??\?b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 740 - ipathmatch (via ls-files): match '\??\?b' '?a?b'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ?a?b
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 741 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 742 - setup match file test for abc
expecting success:
test-tool wildmatch wildmatch 'abc' '\a\b\c'
ok 743 - wildmatch: match 'abc' '\a\b\c'
expecting success:
printf '%s' 'abc' >expect &&
git --glob-pathspecs ls-files -z -- '\a\b\c' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 744 - wildmatch (via ls-files): match '\a\b\c' 'abc'
expecting success:
test-tool wildmatch iwildmatch 'abc' '\a\b\c'
ok 745 - iwildmatch: match 'abc' '\a\b\c'
expecting success:
printf '%s' 'abc' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '\a\b\c' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 746 - iwildmatch (via ls-files): match '\a\b\c' 'abc'
expecting success:
test-tool wildmatch pathmatch 'abc' '\a\b\c'
ok 747 - pathmatch: match 'abc' '\a\b\c'
expecting success:
printf '%s' 'abc' >expect &&
git ls-files -z -- '\a\b\c' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 748 - pathmatch (via ls-files): match '\a\b\c' 'abc'
expecting success:
test-tool wildmatch ipathmatch 'abc' '\a\b\c'
ok 749 - ipathmatch: match 'abc' '\a\b\c'
expecting success:
printf '%s' 'abc' >expect &&
git --icase-pathspecs ls-files -z -- '\a\b\c' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 750 - ipathmatch (via ls-files): match '\a\b\c' 'abc'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing abc
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 751 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 752 - setup match file test for foo
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo' ''
ok 753 - wildmatch: no match 'foo' ''
expecting success:
printf '%s' 'foo' >expect &&
test_must_fail git --glob-pathspecs ls-files -z -- ''
fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
ok 754 - wildmatch (via ls-files): match dies on '' 'foo'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo' ''
ok 755 - iwildmatch: no match 'foo' ''
expecting success:
printf '%s' 'foo' >expect &&
test_must_fail git --glob-pathspecs --icase-pathspecs ls-files -z -- ''
fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
ok 756 - iwildmatch (via ls-files): match dies on '' 'foo'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'foo' ''
ok 757 - pathmatch: no match 'foo' ''
expecting success:
printf '%s' 'foo' >expect &&
test_must_fail git ls-files -z -- ''
fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
ok 758 - pathmatch (via ls-files): match dies on '' 'foo'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'foo' ''
ok 759 - ipathmatch: no match 'foo' ''
expecting success:
printf '%s' 'foo' >expect &&
test_must_fail git --icase-pathspecs ls-files -z -- ''
fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
ok 760 - ipathmatch (via ls-files): match dies on '' 'foo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing expect
Removing foo
ok 761 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 762 - setup match file test for foo/bar/baz/to
expecting success:
test-tool wildmatch wildmatch 'foo/bar/baz/to' '**/t[o]'
ok 763 - wildmatch: match 'foo/bar/baz/to' '**/t[o]'
expecting success:
printf '%s' 'foo/bar/baz/to' >expect &&
git --glob-pathspecs ls-files -z -- '**/t[o]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 764 - wildmatch (via ls-files): match '**/t[o]' 'foo/bar/baz/to'
expecting success:
test-tool wildmatch iwildmatch 'foo/bar/baz/to' '**/t[o]'
ok 765 - iwildmatch: match 'foo/bar/baz/to' '**/t[o]'
expecting success:
printf '%s' 'foo/bar/baz/to' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '**/t[o]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 766 - iwildmatch (via ls-files): match '**/t[o]' 'foo/bar/baz/to'
expecting success:
test-tool wildmatch pathmatch 'foo/bar/baz/to' '**/t[o]'
ok 767 - pathmatch: match 'foo/bar/baz/to' '**/t[o]'
expecting success:
printf '%s' 'foo/bar/baz/to' >expect &&
git ls-files -z -- '**/t[o]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 768 - pathmatch (via ls-files): match '**/t[o]' 'foo/bar/baz/to'
expecting success:
test-tool wildmatch ipathmatch 'foo/bar/baz/to' '**/t[o]'
ok 769 - ipathmatch: match 'foo/bar/baz/to' '**/t[o]'
expecting success:
printf '%s' 'foo/bar/baz/to' >expect &&
git --icase-pathspecs ls-files -z -- '**/t[o]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 770 - ipathmatch (via ls-files): match '**/t[o]' 'foo/bar/baz/to'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 771 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 772 - setup match file test for a1B
expecting success:
test-tool wildmatch wildmatch 'a1B' '[[:alpha:]][[:digit:]][[:upper:]]'
ok 773 - wildmatch: match 'a1B' '[[:alpha:]][[:digit:]][[:upper:]]'
expecting success:
printf '%s' 'a1B' >expect &&
git --glob-pathspecs ls-files -z -- '[[:alpha:]][[:digit:]][[:upper:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 774 - wildmatch (via ls-files): match '[[:alpha:]][[:digit:]][[:upper:]]' 'a1B'
expecting success:
test-tool wildmatch iwildmatch 'a1B' '[[:alpha:]][[:digit:]][[:upper:]]'
ok 775 - iwildmatch: match 'a1B' '[[:alpha:]][[:digit:]][[:upper:]]'
expecting success:
printf '%s' 'a1B' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[:alpha:]][[:digit:]][[:upper:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 776 - iwildmatch (via ls-files): match '[[:alpha:]][[:digit:]][[:upper:]]' 'a1B'
expecting success:
test-tool wildmatch pathmatch 'a1B' '[[:alpha:]][[:digit:]][[:upper:]]'
ok 777 - pathmatch: match 'a1B' '[[:alpha:]][[:digit:]][[:upper:]]'
expecting success:
printf '%s' 'a1B' >expect &&
git ls-files -z -- '[[:alpha:]][[:digit:]][[:upper:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 778 - pathmatch (via ls-files): match '[[:alpha:]][[:digit:]][[:upper:]]' 'a1B'
expecting success:
test-tool wildmatch ipathmatch 'a1B' '[[:alpha:]][[:digit:]][[:upper:]]'
ok 779 - ipathmatch: match 'a1B' '[[:alpha:]][[:digit:]][[:upper:]]'
expecting success:
printf '%s' 'a1B' >expect &&
git --icase-pathspecs ls-files -z -- '[[:alpha:]][[:digit:]][[:upper:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 780 - ipathmatch (via ls-files): match '[[:alpha:]][[:digit:]][[:upper:]]' 'a1B'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing a1B
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 781 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 782 - setup match file test for a
expecting success:
test_must_fail test-tool wildmatch wildmatch 'a' '[[:digit:][:upper:][:space:]]'
ok 783 - wildmatch: no match 'a' '[[:digit:][:upper:][:space:]]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[[:digit:][:upper:][:space:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 784 - wildmatch (via ls-files): no match '[[:digit:][:upper:][:space:]]' 'a'
expecting success:
test-tool wildmatch iwildmatch 'a' '[[:digit:][:upper:][:space:]]'
ok 785 - iwildmatch: match 'a' '[[:digit:][:upper:][:space:]]'
expecting success:
printf '%s' 'a' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[:digit:][:upper:][:space:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 786 - iwildmatch (via ls-files): match '[[:digit:][:upper:][:space:]]' 'a'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'a' '[[:digit:][:upper:][:space:]]'
ok 787 - pathmatch: no match 'a' '[[:digit:][:upper:][:space:]]'
expecting success:
>expect &&
git ls-files -z -- '[[:digit:][:upper:][:space:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 788 - pathmatch (via ls-files): no match '[[:digit:][:upper:][:space:]]' 'a'
expecting success:
test-tool wildmatch ipathmatch 'a' '[[:digit:][:upper:][:space:]]'
ok 789 - ipathmatch: match 'a' '[[:digit:][:upper:][:space:]]'
expecting success:
printf '%s' 'a' >expect &&
git --icase-pathspecs ls-files -z -- '[[:digit:][:upper:][:space:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 790 - ipathmatch (via ls-files): match '[[:digit:][:upper:][:space:]]' 'a'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing a
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 791 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 792 - setup match file test for A
expecting success:
test-tool wildmatch wildmatch 'A' '[[:digit:][:upper:][:space:]]'
ok 793 - wildmatch: match 'A' '[[:digit:][:upper:][:space:]]'
expecting success:
printf '%s' 'A' >expect &&
git --glob-pathspecs ls-files -z -- '[[:digit:][:upper:][:space:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 794 - wildmatch (via ls-files): match '[[:digit:][:upper:][:space:]]' 'A'
expecting success:
test-tool wildmatch iwildmatch 'A' '[[:digit:][:upper:][:space:]]'
ok 795 - iwildmatch: match 'A' '[[:digit:][:upper:][:space:]]'
expecting success:
printf '%s' 'A' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[:digit:][:upper:][:space:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 796 - iwildmatch (via ls-files): match '[[:digit:][:upper:][:space:]]' 'A'
expecting success:
test-tool wildmatch pathmatch 'A' '[[:digit:][:upper:][:space:]]'
ok 797 - pathmatch: match 'A' '[[:digit:][:upper:][:space:]]'
expecting success:
printf '%s' 'A' >expect &&
git ls-files -z -- '[[:digit:][:upper:][:space:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 798 - pathmatch (via ls-files): match '[[:digit:][:upper:][:space:]]' 'A'
expecting success:
test-tool wildmatch ipathmatch 'A' '[[:digit:][:upper:][:space:]]'
ok 799 - ipathmatch: match 'A' '[[:digit:][:upper:][:space:]]'
expecting success:
printf '%s' 'A' >expect &&
git --icase-pathspecs ls-files -z -- '[[:digit:][:upper:][:space:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 800 - ipathmatch (via ls-files): match '[[:digit:][:upper:][:space:]]' 'A'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing A
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 801 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 802 - setup match file test for 1
expecting success:
test-tool wildmatch wildmatch '1' '[[:digit:][:upper:][:space:]]'
ok 803 - wildmatch: match '1' '[[:digit:][:upper:][:space:]]'
expecting success:
printf '%s' '1' >expect &&
git --glob-pathspecs ls-files -z -- '[[:digit:][:upper:][:space:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 804 - wildmatch (via ls-files): match '[[:digit:][:upper:][:space:]]' '1'
expecting success:
test-tool wildmatch iwildmatch '1' '[[:digit:][:upper:][:space:]]'
ok 805 - iwildmatch: match '1' '[[:digit:][:upper:][:space:]]'
expecting success:
printf '%s' '1' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[:digit:][:upper:][:space:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 806 - iwildmatch (via ls-files): match '[[:digit:][:upper:][:space:]]' '1'
expecting success:
test-tool wildmatch pathmatch '1' '[[:digit:][:upper:][:space:]]'
ok 807 - pathmatch: match '1' '[[:digit:][:upper:][:space:]]'
expecting success:
printf '%s' '1' >expect &&
git ls-files -z -- '[[:digit:][:upper:][:space:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 808 - pathmatch (via ls-files): match '[[:digit:][:upper:][:space:]]' '1'
expecting success:
test-tool wildmatch ipathmatch '1' '[[:digit:][:upper:][:space:]]'
ok 809 - ipathmatch: match '1' '[[:digit:][:upper:][:space:]]'
expecting success:
printf '%s' '1' >expect &&
git --icase-pathspecs ls-files -z -- '[[:digit:][:upper:][:space:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 810 - ipathmatch (via ls-files): match '[[:digit:][:upper:][:space:]]' '1'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing 1
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 811 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 812 - setup match file test for 1
expecting success:
test_must_fail test-tool wildmatch wildmatch '1' '[[:digit:][:upper:][:spaci:]]'
ok 813 - wildmatch: no match '1' '[[:digit:][:upper:][:spaci:]]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[[:digit:][:upper:][:spaci:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 814 - wildmatch (via ls-files): no match '[[:digit:][:upper:][:spaci:]]' '1'
expecting success:
test_must_fail test-tool wildmatch iwildmatch '1' '[[:digit:][:upper:][:spaci:]]'
ok 815 - iwildmatch: no match '1' '[[:digit:][:upper:][:spaci:]]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[:digit:][:upper:][:spaci:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 816 - iwildmatch (via ls-files): no match '[[:digit:][:upper:][:spaci:]]' '1'
expecting success:
test_must_fail test-tool wildmatch pathmatch '1' '[[:digit:][:upper:][:spaci:]]'
ok 817 - pathmatch: no match '1' '[[:digit:][:upper:][:spaci:]]'
expecting success:
>expect &&
git ls-files -z -- '[[:digit:][:upper:][:spaci:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 818 - pathmatch (via ls-files): no match '[[:digit:][:upper:][:spaci:]]' '1'
expecting success:
test_must_fail test-tool wildmatch ipathmatch '1' '[[:digit:][:upper:][:spaci:]]'
ok 819 - ipathmatch: no match '1' '[[:digit:][:upper:][:spaci:]]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[[:digit:][:upper:][:spaci:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 820 - ipathmatch (via ls-files): no match '[[:digit:][:upper:][:spaci:]]' '1'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing 1
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 821 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 822 - setup match file test for
expecting success:
test-tool wildmatch wildmatch ' ' '[[:digit:][:upper:][:space:]]'
ok 823 - wildmatch: match ' ' '[[:digit:][:upper:][:space:]]'
expecting success:
printf '%s' ' ' >expect &&
git --glob-pathspecs ls-files -z -- '[[:digit:][:upper:][:space:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 824 - wildmatch (via ls-files): match '[[:digit:][:upper:][:space:]]' ' '
expecting success:
test-tool wildmatch iwildmatch ' ' '[[:digit:][:upper:][:space:]]'
ok 825 - iwildmatch: match ' ' '[[:digit:][:upper:][:space:]]'
expecting success:
printf '%s' ' ' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[:digit:][:upper:][:space:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 826 - iwildmatch (via ls-files): match '[[:digit:][:upper:][:space:]]' ' '
expecting success:
test-tool wildmatch pathmatch ' ' '[[:digit:][:upper:][:space:]]'
ok 827 - pathmatch: match ' ' '[[:digit:][:upper:][:space:]]'
expecting success:
printf '%s' ' ' >expect &&
git ls-files -z -- '[[:digit:][:upper:][:space:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 828 - pathmatch (via ls-files): match '[[:digit:][:upper:][:space:]]' ' '
expecting success:
test-tool wildmatch ipathmatch ' ' '[[:digit:][:upper:][:space:]]'
ok 829 - ipathmatch: match ' ' '[[:digit:][:upper:][:space:]]'
expecting success:
printf '%s' ' ' >expect &&
git --icase-pathspecs ls-files -z -- '[[:digit:][:upper:][:space:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 830 - ipathmatch (via ls-files): match '[[:digit:][:upper:][:space:]]' ' '
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 831 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 832 - setup match file test for .
expecting success:
test_must_fail test-tool wildmatch wildmatch '.' '[[:digit:][:upper:][:space:]]'
ok 833 - wildmatch: no match '.' '[[:digit:][:upper:][:space:]]'
checking known breakage: false
not ok 834 - wildmatch (via ls-files): no match skip '[[:digit:][:upper:][:space:]]' '.' # TODO known breakage
expecting success:
test_must_fail test-tool wildmatch iwildmatch '.' '[[:digit:][:upper:][:space:]]'
ok 835 - iwildmatch: no match '.' '[[:digit:][:upper:][:space:]]'
checking known breakage: false
not ok 836 - iwildmatch (via ls-files): no match skip '[[:digit:][:upper:][:space:]]' '.' # TODO known breakage
expecting success:
test_must_fail test-tool wildmatch pathmatch '.' '[[:digit:][:upper:][:space:]]'
ok 837 - pathmatch: no match '.' '[[:digit:][:upper:][:space:]]'
checking known breakage: false
not ok 838 - pathmatch (via ls-files): no match skip '[[:digit:][:upper:][:space:]]' '.' # TODO known breakage
expecting success:
test_must_fail test-tool wildmatch ipathmatch '.' '[[:digit:][:upper:][:space:]]'
ok 839 - ipathmatch: no match '.' '[[:digit:][:upper:][:space:]]'
checking known breakage: false
not ok 840 - ipathmatch (via ls-files): no match skip '[[:digit:][:upper:][:space:]]' '.' # TODO known breakage
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
ok 841 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 842 - setup match file test for .
expecting success:
test-tool wildmatch wildmatch '.' '[[:digit:][:punct:][:space:]]'
ok 843 - wildmatch: match '.' '[[:digit:][:punct:][:space:]]'
checking known breakage: false
not ok 844 - wildmatch (via ls-files): match skip '[[:digit:][:punct:][:space:]]' '.' # TODO known breakage
expecting success:
test-tool wildmatch iwildmatch '.' '[[:digit:][:punct:][:space:]]'
ok 845 - iwildmatch: match '.' '[[:digit:][:punct:][:space:]]'
checking known breakage: false
not ok 846 - iwildmatch (via ls-files): match skip '[[:digit:][:punct:][:space:]]' '.' # TODO known breakage
expecting success:
test-tool wildmatch pathmatch '.' '[[:digit:][:punct:][:space:]]'
ok 847 - pathmatch: match '.' '[[:digit:][:punct:][:space:]]'
checking known breakage: false
not ok 848 - pathmatch (via ls-files): match skip '[[:digit:][:punct:][:space:]]' '.' # TODO known breakage
expecting success:
test-tool wildmatch ipathmatch '.' '[[:digit:][:punct:][:space:]]'
ok 849 - ipathmatch: match '.' '[[:digit:][:punct:][:space:]]'
checking known breakage: false
not ok 850 - ipathmatch (via ls-files): match skip '[[:digit:][:punct:][:space:]]' '.' # TODO known breakage
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
ok 851 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 852 - setup match file test for 5
expecting success:
test-tool wildmatch wildmatch '5' '[[:xdigit:]]'
ok 853 - wildmatch: match '5' '[[:xdigit:]]'
expecting success:
printf '%s' '5' >expect &&
git --glob-pathspecs ls-files -z -- '[[:xdigit:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 854 - wildmatch (via ls-files): match '[[:xdigit:]]' '5'
expecting success:
test-tool wildmatch iwildmatch '5' '[[:xdigit:]]'
ok 855 - iwildmatch: match '5' '[[:xdigit:]]'
expecting success:
printf '%s' '5' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[:xdigit:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 856 - iwildmatch (via ls-files): match '[[:xdigit:]]' '5'
expecting success:
test-tool wildmatch pathmatch '5' '[[:xdigit:]]'
ok 857 - pathmatch: match '5' '[[:xdigit:]]'
expecting success:
printf '%s' '5' >expect &&
git ls-files -z -- '[[:xdigit:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 858 - pathmatch (via ls-files): match '[[:xdigit:]]' '5'
expecting success:
test-tool wildmatch ipathmatch '5' '[[:xdigit:]]'
ok 859 - ipathmatch: match '5' '[[:xdigit:]]'
expecting success:
printf '%s' '5' >expect &&
git --icase-pathspecs ls-files -z -- '[[:xdigit:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 860 - ipathmatch (via ls-files): match '[[:xdigit:]]' '5'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing 5
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 861 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 862 - setup match file test for f
expecting success:
test-tool wildmatch wildmatch 'f' '[[:xdigit:]]'
ok 863 - wildmatch: match 'f' '[[:xdigit:]]'
expecting success:
printf '%s' 'f' >expect &&
git --glob-pathspecs ls-files -z -- '[[:xdigit:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 864 - wildmatch (via ls-files): match '[[:xdigit:]]' 'f'
expecting success:
test-tool wildmatch iwildmatch 'f' '[[:xdigit:]]'
ok 865 - iwildmatch: match 'f' '[[:xdigit:]]'
expecting success:
printf '%s' 'f' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[:xdigit:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 866 - iwildmatch (via ls-files): match '[[:xdigit:]]' 'f'
expecting success:
test-tool wildmatch pathmatch 'f' '[[:xdigit:]]'
ok 867 - pathmatch: match 'f' '[[:xdigit:]]'
expecting success:
printf '%s' 'f' >expect &&
git ls-files -z -- '[[:xdigit:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 868 - pathmatch (via ls-files): match '[[:xdigit:]]' 'f'
expecting success:
test-tool wildmatch ipathmatch 'f' '[[:xdigit:]]'
ok 869 - ipathmatch: match 'f' '[[:xdigit:]]'
expecting success:
printf '%s' 'f' >expect &&
git --icase-pathspecs ls-files -z -- '[[:xdigit:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 870 - ipathmatch (via ls-files): match '[[:xdigit:]]' 'f'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing f
ok 871 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 872 - setup match file test for D
expecting success:
test-tool wildmatch wildmatch 'D' '[[:xdigit:]]'
ok 873 - wildmatch: match 'D' '[[:xdigit:]]'
expecting success:
printf '%s' 'D' >expect &&
git --glob-pathspecs ls-files -z -- '[[:xdigit:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 874 - wildmatch (via ls-files): match '[[:xdigit:]]' 'D'
expecting success:
test-tool wildmatch iwildmatch 'D' '[[:xdigit:]]'
ok 875 - iwildmatch: match 'D' '[[:xdigit:]]'
expecting success:
printf '%s' 'D' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[:xdigit:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 876 - iwildmatch (via ls-files): match '[[:xdigit:]]' 'D'
expecting success:
test-tool wildmatch pathmatch 'D' '[[:xdigit:]]'
ok 877 - pathmatch: match 'D' '[[:xdigit:]]'
expecting success:
printf '%s' 'D' >expect &&
git ls-files -z -- '[[:xdigit:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 878 - pathmatch (via ls-files): match '[[:xdigit:]]' 'D'
expecting success:
test-tool wildmatch ipathmatch 'D' '[[:xdigit:]]'
ok 879 - ipathmatch: match 'D' '[[:xdigit:]]'
expecting success:
printf '%s' 'D' >expect &&
git --icase-pathspecs ls-files -z -- '[[:xdigit:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 880 - ipathmatch (via ls-files): match '[[:xdigit:]]' 'D'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing D
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 881 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 882 - setup match file test for _
expecting success:
test-tool wildmatch wildmatch '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
ok 883 - wildmatch: match '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
expecting success:
printf '%s' '_' >expect &&
git --glob-pathspecs ls-files -z -- '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 884 - wildmatch (via ls-files): match '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]' '_'
expecting success:
test-tool wildmatch iwildmatch '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
ok 885 - iwildmatch: match '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
expecting success:
printf '%s' '_' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 886 - iwildmatch (via ls-files): match '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]' '_'
expecting success:
test-tool wildmatch pathmatch '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
ok 887 - pathmatch: match '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
expecting success:
printf '%s' '_' >expect &&
git ls-files -z -- '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 888 - pathmatch (via ls-files): match '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]' '_'
expecting success:
test-tool wildmatch ipathmatch '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
ok 889 - ipathmatch: match '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
expecting success:
printf '%s' '_' >expect &&
git --icase-pathspecs ls-files -z -- '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 890 - ipathmatch (via ls-files): match '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]' '_'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing _
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 891 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 892 - setup match file test for .
expecting success:
test-tool wildmatch wildmatch '.' '[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]'
ok 893 - wildmatch: match '.' '[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]'
checking known breakage: false
not ok 894 - wildmatch (via ls-files): match skip '[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]' '.' # TODO known breakage
expecting success:
test-tool wildmatch iwildmatch '.' '[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]'
ok 895 - iwildmatch: match '.' '[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]'
checking known breakage: false
not ok 896 - iwildmatch (via ls-files): match skip '[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]' '.' # TODO known breakage
expecting success:
test-tool wildmatch pathmatch '.' '[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]'
ok 897 - pathmatch: match '.' '[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]'
checking known breakage: false
not ok 898 - pathmatch (via ls-files): match skip '[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]' '.' # TODO known breakage
expecting success:
test-tool wildmatch ipathmatch '.' '[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]'
ok 899 - ipathmatch: match '.' '[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]'
checking known breakage: false
not ok 900 - ipathmatch (via ls-files): match skip '[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]' '.' # TODO known breakage
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
ok 901 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 902 - setup match file test for 5
expecting success:
test-tool wildmatch wildmatch '5' '[a-c[:digit:]x-z]'
ok 903 - wildmatch: match '5' '[a-c[:digit:]x-z]'
expecting success:
printf '%s' '5' >expect &&
git --glob-pathspecs ls-files -z -- '[a-c[:digit:]x-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 904 - wildmatch (via ls-files): match '[a-c[:digit:]x-z]' '5'
expecting success:
test-tool wildmatch iwildmatch '5' '[a-c[:digit:]x-z]'
ok 905 - iwildmatch: match '5' '[a-c[:digit:]x-z]'
expecting success:
printf '%s' '5' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[a-c[:digit:]x-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 906 - iwildmatch (via ls-files): match '[a-c[:digit:]x-z]' '5'
expecting success:
test-tool wildmatch pathmatch '5' '[a-c[:digit:]x-z]'
ok 907 - pathmatch: match '5' '[a-c[:digit:]x-z]'
expecting success:
printf '%s' '5' >expect &&
git ls-files -z -- '[a-c[:digit:]x-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 908 - pathmatch (via ls-files): match '[a-c[:digit:]x-z]' '5'
expecting success:
test-tool wildmatch ipathmatch '5' '[a-c[:digit:]x-z]'
ok 909 - ipathmatch: match '5' '[a-c[:digit:]x-z]'
expecting success:
printf '%s' '5' >expect &&
git --icase-pathspecs ls-files -z -- '[a-c[:digit:]x-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 910 - ipathmatch (via ls-files): match '[a-c[:digit:]x-z]' '5'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing 5
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 911 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 912 - setup match file test for b
expecting success:
test-tool wildmatch wildmatch 'b' '[a-c[:digit:]x-z]'
ok 913 - wildmatch: match 'b' '[a-c[:digit:]x-z]'
expecting success:
printf '%s' 'b' >expect &&
git --glob-pathspecs ls-files -z -- '[a-c[:digit:]x-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 914 - wildmatch (via ls-files): match '[a-c[:digit:]x-z]' 'b'
expecting success:
test-tool wildmatch iwildmatch 'b' '[a-c[:digit:]x-z]'
ok 915 - iwildmatch: match 'b' '[a-c[:digit:]x-z]'
expecting success:
printf '%s' 'b' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[a-c[:digit:]x-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 916 - iwildmatch (via ls-files): match '[a-c[:digit:]x-z]' 'b'
expecting success:
test-tool wildmatch pathmatch 'b' '[a-c[:digit:]x-z]'
ok 917 - pathmatch: match 'b' '[a-c[:digit:]x-z]'
expecting success:
printf '%s' 'b' >expect &&
git ls-files -z -- '[a-c[:digit:]x-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 918 - pathmatch (via ls-files): match '[a-c[:digit:]x-z]' 'b'
expecting success:
test-tool wildmatch ipathmatch 'b' '[a-c[:digit:]x-z]'
ok 919 - ipathmatch: match 'b' '[a-c[:digit:]x-z]'
expecting success:
printf '%s' 'b' >expect &&
git --icase-pathspecs ls-files -z -- '[a-c[:digit:]x-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 920 - ipathmatch (via ls-files): match '[a-c[:digit:]x-z]' 'b'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing b
Removing expect
ok 921 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 922 - setup match file test for y
expecting success:
test-tool wildmatch wildmatch 'y' '[a-c[:digit:]x-z]'
ok 923 - wildmatch: match 'y' '[a-c[:digit:]x-z]'
expecting success:
printf '%s' 'y' >expect &&
git --glob-pathspecs ls-files -z -- '[a-c[:digit:]x-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 924 - wildmatch (via ls-files): match '[a-c[:digit:]x-z]' 'y'
expecting success:
test-tool wildmatch iwildmatch 'y' '[a-c[:digit:]x-z]'
ok 925 - iwildmatch: match 'y' '[a-c[:digit:]x-z]'
expecting success:
printf '%s' 'y' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[a-c[:digit:]x-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 926 - iwildmatch (via ls-files): match '[a-c[:digit:]x-z]' 'y'
expecting success:
test-tool wildmatch pathmatch 'y' '[a-c[:digit:]x-z]'
ok 927 - pathmatch: match 'y' '[a-c[:digit:]x-z]'
expecting success:
printf '%s' 'y' >expect &&
git ls-files -z -- '[a-c[:digit:]x-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 928 - pathmatch (via ls-files): match '[a-c[:digit:]x-z]' 'y'
expecting success:
test-tool wildmatch ipathmatch 'y' '[a-c[:digit:]x-z]'
ok 929 - ipathmatch: match 'y' '[a-c[:digit:]x-z]'
expecting success:
printf '%s' 'y' >expect &&
git --icase-pathspecs ls-files -z -- '[a-c[:digit:]x-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 930 - ipathmatch (via ls-files): match '[a-c[:digit:]x-z]' 'y'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing y
ok 931 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 932 - setup match file test for q
expecting success:
test_must_fail test-tool wildmatch wildmatch 'q' '[a-c[:digit:]x-z]'
ok 933 - wildmatch: no match 'q' '[a-c[:digit:]x-z]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[a-c[:digit:]x-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 934 - wildmatch (via ls-files): no match '[a-c[:digit:]x-z]' 'q'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'q' '[a-c[:digit:]x-z]'
ok 935 - iwildmatch: no match 'q' '[a-c[:digit:]x-z]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[a-c[:digit:]x-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 936 - iwildmatch (via ls-files): no match '[a-c[:digit:]x-z]' 'q'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'q' '[a-c[:digit:]x-z]'
ok 937 - pathmatch: no match 'q' '[a-c[:digit:]x-z]'
expecting success:
>expect &&
git ls-files -z -- '[a-c[:digit:]x-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 938 - pathmatch (via ls-files): no match '[a-c[:digit:]x-z]' 'q'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'q' '[a-c[:digit:]x-z]'
ok 939 - ipathmatch: no match 'q' '[a-c[:digit:]x-z]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[a-c[:digit:]x-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 940 - ipathmatch (via ls-files): no match '[a-c[:digit:]x-z]' 'q'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing q
ok 941 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 942 - setup match file test for ]
expecting success:
test-tool wildmatch wildmatch ']' '[\\-^]'
ok 943 - wildmatch: match ']' '[\\-^]'
expecting success:
printf '%s' ']' >expect &&
git --glob-pathspecs ls-files -z -- '[\\-^]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 944 - wildmatch (via ls-files): match '[\\-^]' ']'
expecting success:
test-tool wildmatch iwildmatch ']' '[\\-^]'
ok 945 - iwildmatch: match ']' '[\\-^]'
expecting success:
printf '%s' ']' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[\\-^]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 946 - iwildmatch (via ls-files): match '[\\-^]' ']'
expecting success:
test-tool wildmatch pathmatch ']' '[\\-^]'
ok 947 - pathmatch: match ']' '[\\-^]'
expecting success:
printf '%s' ']' >expect &&
git ls-files -z -- '[\\-^]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 948 - pathmatch (via ls-files): match '[\\-^]' ']'
expecting success:
test-tool wildmatch ipathmatch ']' '[\\-^]'
ok 949 - ipathmatch: match ']' '[\\-^]'
expecting success:
printf '%s' ']' >expect &&
git --icase-pathspecs ls-files -z -- '[\\-^]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 950 - ipathmatch (via ls-files): match '[\\-^]' ']'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ]
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 951 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 952 - setup match file test for [
expecting success:
test_must_fail test-tool wildmatch wildmatch '[' '[\\-^]'
ok 953 - wildmatch: no match '[' '[\\-^]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[\\-^]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 954 - wildmatch (via ls-files): no match '[\\-^]' '['
expecting success:
test_must_fail test-tool wildmatch iwildmatch '[' '[\\-^]'
ok 955 - iwildmatch: no match '[' '[\\-^]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[\\-^]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 956 - iwildmatch (via ls-files): no match '[\\-^]' '['
expecting success:
test_must_fail test-tool wildmatch pathmatch '[' '[\\-^]'
ok 957 - pathmatch: no match '[' '[\\-^]'
expecting success:
>expect &&
git ls-files -z -- '[\\-^]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 958 - pathmatch (via ls-files): no match '[\\-^]' '['
expecting success:
test_must_fail test-tool wildmatch ipathmatch '[' '[\\-^]'
ok 959 - ipathmatch: no match '[' '[\\-^]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[\\-^]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 960 - ipathmatch (via ls-files): no match '[\\-^]' '['
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing [
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 961 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 962 - setup match file test for -
expecting success:
test-tool wildmatch wildmatch '-' '[\-_]'
ok 963 - wildmatch: match '-' '[\-_]'
expecting success:
printf '%s' '-' >expect &&
git --glob-pathspecs ls-files -z -- '[\-_]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 964 - wildmatch (via ls-files): match '[\-_]' '-'
expecting success:
test-tool wildmatch iwildmatch '-' '[\-_]'
ok 965 - iwildmatch: match '-' '[\-_]'
expecting success:
printf '%s' '-' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[\-_]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 966 - iwildmatch (via ls-files): match '[\-_]' '-'
expecting success:
test-tool wildmatch pathmatch '-' '[\-_]'
ok 967 - pathmatch: match '-' '[\-_]'
expecting success:
printf '%s' '-' >expect &&
git ls-files -z -- '[\-_]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 968 - pathmatch (via ls-files): match '[\-_]' '-'
expecting success:
test-tool wildmatch ipathmatch '-' '[\-_]'
ok 969 - ipathmatch: match '-' '[\-_]'
expecting success:
printf '%s' '-' >expect &&
git --icase-pathspecs ls-files -z -- '[\-_]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 970 - ipathmatch (via ls-files): match '[\-_]' '-'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing -
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 971 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 972 - setup match file test for ]
expecting success:
test-tool wildmatch wildmatch ']' '[\]]'
ok 973 - wildmatch: match ']' '[\]]'
expecting success:
printf '%s' ']' >expect &&
git --glob-pathspecs ls-files -z -- '[\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 974 - wildmatch (via ls-files): match '[\]]' ']'
expecting success:
test-tool wildmatch iwildmatch ']' '[\]]'
ok 975 - iwildmatch: match ']' '[\]]'
expecting success:
printf '%s' ']' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 976 - iwildmatch (via ls-files): match '[\]]' ']'
expecting success:
test-tool wildmatch pathmatch ']' '[\]]'
ok 977 - pathmatch: match ']' '[\]]'
expecting success:
printf '%s' ']' >expect &&
git ls-files -z -- '[\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 978 - pathmatch (via ls-files): match '[\]]' ']'
expecting success:
test-tool wildmatch ipathmatch ']' '[\]]'
ok 979 - ipathmatch: match ']' '[\]]'
expecting success:
printf '%s' ']' >expect &&
git --icase-pathspecs ls-files -z -- '[\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 980 - ipathmatch (via ls-files): match '[\]]' ']'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ]
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 981 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 982 - setup match file test for \]
expecting success:
test_must_fail test-tool wildmatch wildmatch '\]' '[\]]'
ok 983 - wildmatch: no match '\]' '[\]]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 984 - wildmatch (via ls-files): no match '[\]]' '\]'
expecting success:
test_must_fail test-tool wildmatch iwildmatch '\]' '[\]]'
ok 985 - iwildmatch: no match '\]' '[\]]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 986 - iwildmatch (via ls-files): no match '[\]]' '\]'
expecting success:
test_must_fail test-tool wildmatch pathmatch '\]' '[\]]'
ok 987 - pathmatch: no match '\]' '[\]]'
expecting success:
>expect &&
git ls-files -z -- '[\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 988 - pathmatch (via ls-files): no match '[\]]' '\]'
expecting success:
test_must_fail test-tool wildmatch ipathmatch '\]' '[\]]'
ok 989 - ipathmatch: no match '\]' '[\]]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 990 - ipathmatch (via ls-files): no match '[\]]' '\]'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing "\\]"
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 991 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 992 - setup match file test for \
expecting success:
test_must_fail test-tool wildmatch wildmatch '\' '[\]]'
ok 993 - wildmatch: no match '\' '[\]]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 994 - wildmatch (via ls-files): no match '[\]]' '\'
expecting success:
test_must_fail test-tool wildmatch iwildmatch '\' '[\]]'
ok 995 - iwildmatch: no match '\' '[\]]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 996 - iwildmatch (via ls-files): no match '[\]]' '\'
expecting success:
test_must_fail test-tool wildmatch pathmatch '\' '[\]]'
ok 997 - pathmatch: no match '\' '[\]]'
expecting success:
>expect &&
git ls-files -z -- '[\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 998 - pathmatch (via ls-files): no match '[\]]' '\'
expecting success:
test_must_fail test-tool wildmatch ipathmatch '\' '[\]]'
ok 999 - ipathmatch: no match '\' '[\]]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1000 - ipathmatch (via ls-files): no match '[\]]' '\'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing "\\"
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1001 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1002 - setup match file test for ab
expecting success:
test_must_fail test-tool wildmatch wildmatch 'ab' 'a[]b'
ok 1003 - wildmatch: no match 'ab' 'a[]b'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'a[]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1004 - wildmatch (via ls-files): no match 'a[]b' 'ab'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'ab' 'a[]b'
ok 1005 - iwildmatch: no match 'ab' 'a[]b'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'a[]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1006 - iwildmatch (via ls-files): no match 'a[]b' 'ab'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'ab' 'a[]b'
ok 1007 - pathmatch: no match 'ab' 'a[]b'
expecting success:
>expect &&
git ls-files -z -- 'a[]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1008 - pathmatch (via ls-files): no match 'a[]b' 'ab'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'ab' 'a[]b'
ok 1009 - ipathmatch: no match 'ab' 'a[]b'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- 'a[]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1010 - ipathmatch (via ls-files): no match 'a[]b' 'ab'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ab
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1011 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1012 - setup match file test for a[]b
expecting success:
test_must_fail test-tool wildmatch wildmatch 'a[]b' 'a[]b'
ok 1013 - wildmatch: no match 'a[]b' 'a[]b'
expecting success:
printf '%s' 'a[]b' >expect &&
git --glob-pathspecs ls-files -z -- 'a[]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1014 - wildmatch (via ls-files): match 'a[]b' 'a[]b'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'a[]b' 'a[]b'
ok 1015 - iwildmatch: no match 'a[]b' 'a[]b'
expecting success:
printf '%s' 'a[]b' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'a[]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1016 - iwildmatch (via ls-files): match 'a[]b' 'a[]b'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'a[]b' 'a[]b'
ok 1017 - pathmatch: no match 'a[]b' 'a[]b'
expecting success:
printf '%s' 'a[]b' >expect &&
git ls-files -z -- 'a[]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1018 - pathmatch (via ls-files): match 'a[]b' 'a[]b'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'a[]b' 'a[]b'
ok 1019 - ipathmatch: no match 'a[]b' 'a[]b'
expecting success:
printf '%s' 'a[]b' >expect &&
git --icase-pathspecs ls-files -z -- 'a[]b' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1020 - ipathmatch (via ls-files): match 'a[]b' 'a[]b'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing a[]b
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1021 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1022 - setup match file test for ab[
expecting success:
test_must_fail test-tool wildmatch wildmatch 'ab[' 'ab['
ok 1023 - wildmatch: no match 'ab[' 'ab['
expecting success:
printf '%s' 'ab[' >expect &&
git --glob-pathspecs ls-files -z -- 'ab[' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1024 - wildmatch (via ls-files): match 'ab[' 'ab['
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'ab[' 'ab['
ok 1025 - iwildmatch: no match 'ab[' 'ab['
expecting success:
printf '%s' 'ab[' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'ab[' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1026 - iwildmatch (via ls-files): match 'ab[' 'ab['
expecting success:
test_must_fail test-tool wildmatch pathmatch 'ab[' 'ab['
ok 1027 - pathmatch: no match 'ab[' 'ab['
expecting success:
printf '%s' 'ab[' >expect &&
git ls-files -z -- 'ab[' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1028 - pathmatch (via ls-files): match 'ab[' 'ab['
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'ab[' 'ab['
ok 1029 - ipathmatch: no match 'ab[' 'ab['
expecting success:
printf '%s' 'ab[' >expect &&
git --icase-pathspecs ls-files -z -- 'ab[' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1030 - ipathmatch (via ls-files): match 'ab[' 'ab['
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ab[
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1031 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1032 - setup match file test for ab
expecting success:
test_must_fail test-tool wildmatch wildmatch 'ab' '[!'
ok 1033 - wildmatch: no match 'ab' '[!'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[!' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1034 - wildmatch (via ls-files): no match '[!' 'ab'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'ab' '[!'
ok 1035 - iwildmatch: no match 'ab' '[!'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[!' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1036 - iwildmatch (via ls-files): no match '[!' 'ab'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'ab' '[!'
ok 1037 - pathmatch: no match 'ab' '[!'
expecting success:
>expect &&
git ls-files -z -- '[!' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1038 - pathmatch (via ls-files): no match '[!' 'ab'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'ab' '[!'
ok 1039 - ipathmatch: no match 'ab' '[!'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[!' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1040 - ipathmatch (via ls-files): no match '[!' 'ab'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ab
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1041 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1042 - setup match file test for ab
expecting success:
test_must_fail test-tool wildmatch wildmatch 'ab' '[-'
ok 1043 - wildmatch: no match 'ab' '[-'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[-' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1044 - wildmatch (via ls-files): no match '[-' 'ab'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'ab' '[-'
ok 1045 - iwildmatch: no match 'ab' '[-'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[-' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1046 - iwildmatch (via ls-files): no match '[-' 'ab'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'ab' '[-'
ok 1047 - pathmatch: no match 'ab' '[-'
expecting success:
>expect &&
git ls-files -z -- '[-' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1048 - pathmatch (via ls-files): no match '[-' 'ab'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'ab' '[-'
ok 1049 - ipathmatch: no match 'ab' '[-'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[-' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1050 - ipathmatch (via ls-files): no match '[-' 'ab'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ab
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1051 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1052 - setup match file test for -
expecting success:
test-tool wildmatch wildmatch '-' '[-]'
ok 1053 - wildmatch: match '-' '[-]'
expecting success:
printf '%s' '-' >expect &&
git --glob-pathspecs ls-files -z -- '[-]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1054 - wildmatch (via ls-files): match '[-]' '-'
expecting success:
test-tool wildmatch iwildmatch '-' '[-]'
ok 1055 - iwildmatch: match '-' '[-]'
expecting success:
printf '%s' '-' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[-]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1056 - iwildmatch (via ls-files): match '[-]' '-'
expecting success:
test-tool wildmatch pathmatch '-' '[-]'
ok 1057 - pathmatch: match '-' '[-]'
expecting success:
printf '%s' '-' >expect &&
git ls-files -z -- '[-]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1058 - pathmatch (via ls-files): match '[-]' '-'
expecting success:
test-tool wildmatch ipathmatch '-' '[-]'
ok 1059 - ipathmatch: match '-' '[-]'
expecting success:
printf '%s' '-' >expect &&
git --icase-pathspecs ls-files -z -- '[-]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1060 - ipathmatch (via ls-files): match '[-]' '-'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing -
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1061 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1062 - setup match file test for -
expecting success:
test_must_fail test-tool wildmatch wildmatch '-' '[a-'
ok 1063 - wildmatch: no match '-' '[a-'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[a-' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1064 - wildmatch (via ls-files): no match '[a-' '-'
expecting success:
test_must_fail test-tool wildmatch iwildmatch '-' '[a-'
ok 1065 - iwildmatch: no match '-' '[a-'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[a-' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1066 - iwildmatch (via ls-files): no match '[a-' '-'
expecting success:
test_must_fail test-tool wildmatch pathmatch '-' '[a-'
ok 1067 - pathmatch: no match '-' '[a-'
expecting success:
>expect &&
git ls-files -z -- '[a-' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1068 - pathmatch (via ls-files): no match '[a-' '-'
expecting success:
test_must_fail test-tool wildmatch ipathmatch '-' '[a-'
ok 1069 - ipathmatch: no match '-' '[a-'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[a-' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1070 - ipathmatch (via ls-files): no match '[a-' '-'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing -
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1071 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1072 - setup match file test for -
expecting success:
test_must_fail test-tool wildmatch wildmatch '-' '[!a-'
ok 1073 - wildmatch: no match '-' '[!a-'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[!a-' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1074 - wildmatch (via ls-files): no match '[!a-' '-'
expecting success:
test_must_fail test-tool wildmatch iwildmatch '-' '[!a-'
ok 1075 - iwildmatch: no match '-' '[!a-'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[!a-' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1076 - iwildmatch (via ls-files): no match '[!a-' '-'
expecting success:
test_must_fail test-tool wildmatch pathmatch '-' '[!a-'
ok 1077 - pathmatch: no match '-' '[!a-'
expecting success:
>expect &&
git ls-files -z -- '[!a-' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1078 - pathmatch (via ls-files): no match '[!a-' '-'
expecting success:
test_must_fail test-tool wildmatch ipathmatch '-' '[!a-'
ok 1079 - ipathmatch: no match '-' '[!a-'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[!a-' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1080 - ipathmatch (via ls-files): no match '[!a-' '-'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing -
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1081 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1082 - setup match file test for -
expecting success:
test-tool wildmatch wildmatch '-' '[--A]'
ok 1083 - wildmatch: match '-' '[--A]'
expecting success:
printf '%s' '-' >expect &&
git --glob-pathspecs ls-files -z -- '[--A]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1084 - wildmatch (via ls-files): match '[--A]' '-'
expecting success:
test-tool wildmatch iwildmatch '-' '[--A]'
ok 1085 - iwildmatch: match '-' '[--A]'
expecting success:
printf '%s' '-' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[--A]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1086 - iwildmatch (via ls-files): match '[--A]' '-'
expecting success:
test-tool wildmatch pathmatch '-' '[--A]'
ok 1087 - pathmatch: match '-' '[--A]'
expecting success:
printf '%s' '-' >expect &&
git ls-files -z -- '[--A]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1088 - pathmatch (via ls-files): match '[--A]' '-'
expecting success:
test-tool wildmatch ipathmatch '-' '[--A]'
ok 1089 - ipathmatch: match '-' '[--A]'
expecting success:
printf '%s' '-' >expect &&
git --icase-pathspecs ls-files -z -- '[--A]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1090 - ipathmatch (via ls-files): match '[--A]' '-'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing -
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1091 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1092 - setup match file test for 5
expecting success:
test-tool wildmatch wildmatch '5' '[--A]'
ok 1093 - wildmatch: match '5' '[--A]'
expecting success:
printf '%s' '5' >expect &&
git --glob-pathspecs ls-files -z -- '[--A]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1094 - wildmatch (via ls-files): match '[--A]' '5'
expecting success:
test-tool wildmatch iwildmatch '5' '[--A]'
ok 1095 - iwildmatch: match '5' '[--A]'
expecting success:
printf '%s' '5' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[--A]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1096 - iwildmatch (via ls-files): match '[--A]' '5'
expecting success:
test-tool wildmatch pathmatch '5' '[--A]'
ok 1097 - pathmatch: match '5' '[--A]'
expecting success:
printf '%s' '5' >expect &&
git ls-files -z -- '[--A]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1098 - pathmatch (via ls-files): match '[--A]' '5'
expecting success:
test-tool wildmatch ipathmatch '5' '[--A]'
ok 1099 - ipathmatch: match '5' '[--A]'
expecting success:
printf '%s' '5' >expect &&
git --icase-pathspecs ls-files -z -- '[--A]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1100 - ipathmatch (via ls-files): match '[--A]' '5'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing 5
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1101 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1102 - setup match file test for
expecting success:
test-tool wildmatch wildmatch ' ' '[ --]'
ok 1103 - wildmatch: match ' ' '[ --]'
expecting success:
printf '%s' ' ' >expect &&
git --glob-pathspecs ls-files -z -- '[ --]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1104 - wildmatch (via ls-files): match '[ --]' ' '
expecting success:
test-tool wildmatch iwildmatch ' ' '[ --]'
ok 1105 - iwildmatch: match ' ' '[ --]'
expecting success:
printf '%s' ' ' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[ --]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1106 - iwildmatch (via ls-files): match '[ --]' ' '
expecting success:
test-tool wildmatch pathmatch ' ' '[ --]'
ok 1107 - pathmatch: match ' ' '[ --]'
expecting success:
printf '%s' ' ' >expect &&
git ls-files -z -- '[ --]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1108 - pathmatch (via ls-files): match '[ --]' ' '
expecting success:
test-tool wildmatch ipathmatch ' ' '[ --]'
ok 1109 - ipathmatch: match ' ' '[ --]'
expecting success:
printf '%s' ' ' >expect &&
git --icase-pathspecs ls-files -z -- '[ --]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1110 - ipathmatch (via ls-files): match '[ --]' ' '
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1111 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1112 - setup match file test for $
expecting success:
test-tool wildmatch wildmatch '$' '[ --]'
ok 1113 - wildmatch: match '$' '[ --]'
expecting success:
printf '%s' '$' >expect &&
git --glob-pathspecs ls-files -z -- '[ --]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1114 - wildmatch (via ls-files): match '[ --]' '$'
expecting success:
test-tool wildmatch iwildmatch '$' '[ --]'
ok 1115 - iwildmatch: match '$' '[ --]'
expecting success:
printf '%s' '$' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[ --]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1116 - iwildmatch (via ls-files): match '[ --]' '$'
expecting success:
test-tool wildmatch pathmatch '$' '[ --]'
ok 1117 - pathmatch: match '$' '[ --]'
expecting success:
printf '%s' '$' >expect &&
git ls-files -z -- '[ --]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1118 - pathmatch (via ls-files): match '[ --]' '$'
expecting success:
test-tool wildmatch ipathmatch '$' '[ --]'
ok 1119 - ipathmatch: match '$' '[ --]'
expecting success:
printf '%s' '$' >expect &&
git --icase-pathspecs ls-files -z -- '[ --]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1120 - ipathmatch (via ls-files): match '[ --]' '$'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing $
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1121 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1122 - setup match file test for -
expecting success:
test-tool wildmatch wildmatch '-' '[ --]'
ok 1123 - wildmatch: match '-' '[ --]'
expecting success:
printf '%s' '-' >expect &&
git --glob-pathspecs ls-files -z -- '[ --]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1124 - wildmatch (via ls-files): match '[ --]' '-'
expecting success:
test-tool wildmatch iwildmatch '-' '[ --]'
ok 1125 - iwildmatch: match '-' '[ --]'
expecting success:
printf '%s' '-' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[ --]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1126 - iwildmatch (via ls-files): match '[ --]' '-'
expecting success:
test-tool wildmatch pathmatch '-' '[ --]'
ok 1127 - pathmatch: match '-' '[ --]'
expecting success:
printf '%s' '-' >expect &&
git ls-files -z -- '[ --]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1128 - pathmatch (via ls-files): match '[ --]' '-'
expecting success:
test-tool wildmatch ipathmatch '-' '[ --]'
ok 1129 - ipathmatch: match '-' '[ --]'
expecting success:
printf '%s' '-' >expect &&
git --icase-pathspecs ls-files -z -- '[ --]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1130 - ipathmatch (via ls-files): match '[ --]' '-'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing -
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1131 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1132 - setup match file test for 0
expecting success:
test_must_fail test-tool wildmatch wildmatch '0' '[ --]'
ok 1133 - wildmatch: no match '0' '[ --]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[ --]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1134 - wildmatch (via ls-files): no match '[ --]' '0'
expecting success:
test_must_fail test-tool wildmatch iwildmatch '0' '[ --]'
ok 1135 - iwildmatch: no match '0' '[ --]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[ --]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1136 - iwildmatch (via ls-files): no match '[ --]' '0'
expecting success:
test_must_fail test-tool wildmatch pathmatch '0' '[ --]'
ok 1137 - pathmatch: no match '0' '[ --]'
expecting success:
>expect &&
git ls-files -z -- '[ --]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1138 - pathmatch (via ls-files): no match '[ --]' '0'
expecting success:
test_must_fail test-tool wildmatch ipathmatch '0' '[ --]'
ok 1139 - ipathmatch: no match '0' '[ --]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[ --]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1140 - ipathmatch (via ls-files): no match '[ --]' '0'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing 0
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1141 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1142 - setup match file test for -
expecting success:
test-tool wildmatch wildmatch '-' '[---]'
ok 1143 - wildmatch: match '-' '[---]'
expecting success:
printf '%s' '-' >expect &&
git --glob-pathspecs ls-files -z -- '[---]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1144 - wildmatch (via ls-files): match '[---]' '-'
expecting success:
test-tool wildmatch iwildmatch '-' '[---]'
ok 1145 - iwildmatch: match '-' '[---]'
expecting success:
printf '%s' '-' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[---]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1146 - iwildmatch (via ls-files): match '[---]' '-'
expecting success:
test-tool wildmatch pathmatch '-' '[---]'
ok 1147 - pathmatch: match '-' '[---]'
expecting success:
printf '%s' '-' >expect &&
git ls-files -z -- '[---]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1148 - pathmatch (via ls-files): match '[---]' '-'
expecting success:
test-tool wildmatch ipathmatch '-' '[---]'
ok 1149 - ipathmatch: match '-' '[---]'
expecting success:
printf '%s' '-' >expect &&
git --icase-pathspecs ls-files -z -- '[---]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1150 - ipathmatch (via ls-files): match '[---]' '-'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing -
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1151 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1152 - setup match file test for -
expecting success:
test-tool wildmatch wildmatch '-' '[------]'
ok 1153 - wildmatch: match '-' '[------]'
expecting success:
printf '%s' '-' >expect &&
git --glob-pathspecs ls-files -z -- '[------]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1154 - wildmatch (via ls-files): match '[------]' '-'
expecting success:
test-tool wildmatch iwildmatch '-' '[------]'
ok 1155 - iwildmatch: match '-' '[------]'
expecting success:
printf '%s' '-' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[------]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1156 - iwildmatch (via ls-files): match '[------]' '-'
expecting success:
test-tool wildmatch pathmatch '-' '[------]'
ok 1157 - pathmatch: match '-' '[------]'
expecting success:
printf '%s' '-' >expect &&
git ls-files -z -- '[------]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1158 - pathmatch (via ls-files): match '[------]' '-'
expecting success:
test-tool wildmatch ipathmatch '-' '[------]'
ok 1159 - ipathmatch: match '-' '[------]'
expecting success:
printf '%s' '-' >expect &&
git --icase-pathspecs ls-files -z -- '[------]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1160 - ipathmatch (via ls-files): match '[------]' '-'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing -
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1161 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1162 - setup match file test for j
expecting success:
test_must_fail test-tool wildmatch wildmatch 'j' '[a-e-n]'
ok 1163 - wildmatch: no match 'j' '[a-e-n]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[a-e-n]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1164 - wildmatch (via ls-files): no match '[a-e-n]' 'j'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'j' '[a-e-n]'
ok 1165 - iwildmatch: no match 'j' '[a-e-n]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[a-e-n]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1166 - iwildmatch (via ls-files): no match '[a-e-n]' 'j'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'j' '[a-e-n]'
ok 1167 - pathmatch: no match 'j' '[a-e-n]'
expecting success:
>expect &&
git ls-files -z -- '[a-e-n]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1168 - pathmatch (via ls-files): no match '[a-e-n]' 'j'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'j' '[a-e-n]'
ok 1169 - ipathmatch: no match 'j' '[a-e-n]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[a-e-n]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1170 - ipathmatch (via ls-files): no match '[a-e-n]' 'j'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing j
ok 1171 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1172 - setup match file test for -
expecting success:
test-tool wildmatch wildmatch '-' '[a-e-n]'
ok 1173 - wildmatch: match '-' '[a-e-n]'
expecting success:
printf '%s' '-' >expect &&
git --glob-pathspecs ls-files -z -- '[a-e-n]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1174 - wildmatch (via ls-files): match '[a-e-n]' '-'
expecting success:
test-tool wildmatch iwildmatch '-' '[a-e-n]'
ok 1175 - iwildmatch: match '-' '[a-e-n]'
expecting success:
printf '%s' '-' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[a-e-n]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1176 - iwildmatch (via ls-files): match '[a-e-n]' '-'
expecting success:
test-tool wildmatch pathmatch '-' '[a-e-n]'
ok 1177 - pathmatch: match '-' '[a-e-n]'
expecting success:
printf '%s' '-' >expect &&
git ls-files -z -- '[a-e-n]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1178 - pathmatch (via ls-files): match '[a-e-n]' '-'
expecting success:
test-tool wildmatch ipathmatch '-' '[a-e-n]'
ok 1179 - ipathmatch: match '-' '[a-e-n]'
expecting success:
printf '%s' '-' >expect &&
git --icase-pathspecs ls-files -z -- '[a-e-n]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1180 - ipathmatch (via ls-files): match '[a-e-n]' '-'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing -
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1181 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1182 - setup match file test for a
expecting success:
test-tool wildmatch wildmatch 'a' '[!------]'
ok 1183 - wildmatch: match 'a' '[!------]'
expecting success:
printf '%s' 'a' >expect &&
git --glob-pathspecs ls-files -z -- '[!------]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1184 - wildmatch (via ls-files): match '[!------]' 'a'
expecting success:
test-tool wildmatch iwildmatch 'a' '[!------]'
ok 1185 - iwildmatch: match 'a' '[!------]'
expecting success:
printf '%s' 'a' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[!------]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1186 - iwildmatch (via ls-files): match '[!------]' 'a'
expecting success:
test-tool wildmatch pathmatch 'a' '[!------]'
ok 1187 - pathmatch: match 'a' '[!------]'
expecting success:
printf '%s' 'a' >expect &&
git ls-files -z -- '[!------]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1188 - pathmatch (via ls-files): match '[!------]' 'a'
expecting success:
test-tool wildmatch ipathmatch 'a' '[!------]'
ok 1189 - ipathmatch: match 'a' '[!------]'
expecting success:
printf '%s' 'a' >expect &&
git --icase-pathspecs ls-files -z -- '[!------]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1190 - ipathmatch (via ls-files): match '[!------]' 'a'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing a
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1191 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1192 - setup match file test for [
expecting success:
test_must_fail test-tool wildmatch wildmatch '[' '[]-a]'
ok 1193 - wildmatch: no match '[' '[]-a]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[]-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1194 - wildmatch (via ls-files): no match '[]-a]' '['
expecting success:
test_must_fail test-tool wildmatch iwildmatch '[' '[]-a]'
ok 1195 - iwildmatch: no match '[' '[]-a]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[]-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1196 - iwildmatch (via ls-files): no match '[]-a]' '['
expecting success:
test_must_fail test-tool wildmatch pathmatch '[' '[]-a]'
ok 1197 - pathmatch: no match '[' '[]-a]'
expecting success:
>expect &&
git ls-files -z -- '[]-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1198 - pathmatch (via ls-files): no match '[]-a]' '['
expecting success:
test_must_fail test-tool wildmatch ipathmatch '[' '[]-a]'
ok 1199 - ipathmatch: no match '[' '[]-a]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[]-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1200 - ipathmatch (via ls-files): no match '[]-a]' '['
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing [
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1201 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1202 - setup match file test for ^
expecting success:
test-tool wildmatch wildmatch '^' '[]-a]'
ok 1203 - wildmatch: match '^' '[]-a]'
expecting success:
printf '%s' '^' >expect &&
git --glob-pathspecs ls-files -z -- '[]-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1204 - wildmatch (via ls-files): match '[]-a]' '^'
expecting success:
test-tool wildmatch iwildmatch '^' '[]-a]'
ok 1205 - iwildmatch: match '^' '[]-a]'
expecting success:
printf '%s' '^' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[]-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1206 - iwildmatch (via ls-files): match '[]-a]' '^'
expecting success:
test-tool wildmatch pathmatch '^' '[]-a]'
ok 1207 - pathmatch: match '^' '[]-a]'
expecting success:
printf '%s' '^' >expect &&
git ls-files -z -- '[]-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1208 - pathmatch (via ls-files): match '[]-a]' '^'
expecting success:
test-tool wildmatch ipathmatch '^' '[]-a]'
ok 1209 - ipathmatch: match '^' '[]-a]'
expecting success:
printf '%s' '^' >expect &&
git --icase-pathspecs ls-files -z -- '[]-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1210 - ipathmatch (via ls-files): match '[]-a]' '^'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ^
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1211 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1212 - setup match file test for ^
expecting success:
test_must_fail test-tool wildmatch wildmatch '^' '[!]-a]'
ok 1213 - wildmatch: no match '^' '[!]-a]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[!]-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1214 - wildmatch (via ls-files): no match '[!]-a]' '^'
expecting success:
test_must_fail test-tool wildmatch iwildmatch '^' '[!]-a]'
ok 1215 - iwildmatch: no match '^' '[!]-a]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[!]-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1216 - iwildmatch (via ls-files): no match '[!]-a]' '^'
expecting success:
test_must_fail test-tool wildmatch pathmatch '^' '[!]-a]'
ok 1217 - pathmatch: no match '^' '[!]-a]'
expecting success:
>expect &&
git ls-files -z -- '[!]-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1218 - pathmatch (via ls-files): no match '[!]-a]' '^'
expecting success:
test_must_fail test-tool wildmatch ipathmatch '^' '[!]-a]'
ok 1219 - ipathmatch: no match '^' '[!]-a]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[!]-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1220 - ipathmatch (via ls-files): no match '[!]-a]' '^'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ^
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1221 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1222 - setup match file test for [
expecting success:
test-tool wildmatch wildmatch '[' '[!]-a]'
ok 1223 - wildmatch: match '[' '[!]-a]'
expecting success:
printf '%s' '[' >expect &&
git --glob-pathspecs ls-files -z -- '[!]-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1224 - wildmatch (via ls-files): match '[!]-a]' '['
expecting success:
test-tool wildmatch iwildmatch '[' '[!]-a]'
ok 1225 - iwildmatch: match '[' '[!]-a]'
expecting success:
printf '%s' '[' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[!]-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1226 - iwildmatch (via ls-files): match '[!]-a]' '['
expecting success:
test-tool wildmatch pathmatch '[' '[!]-a]'
ok 1227 - pathmatch: match '[' '[!]-a]'
expecting success:
printf '%s' '[' >expect &&
git ls-files -z -- '[!]-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1228 - pathmatch (via ls-files): match '[!]-a]' '['
expecting success:
test-tool wildmatch ipathmatch '[' '[!]-a]'
ok 1229 - ipathmatch: match '[' '[!]-a]'
expecting success:
printf '%s' '[' >expect &&
git --icase-pathspecs ls-files -z -- '[!]-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1230 - ipathmatch (via ls-files): match '[!]-a]' '['
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing [
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1231 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1232 - setup match file test for ^
expecting success:
test-tool wildmatch wildmatch '^' '[a^bc]'
ok 1233 - wildmatch: match '^' '[a^bc]'
expecting success:
printf '%s' '^' >expect &&
git --glob-pathspecs ls-files -z -- '[a^bc]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1234 - wildmatch (via ls-files): match '[a^bc]' '^'
expecting success:
test-tool wildmatch iwildmatch '^' '[a^bc]'
ok 1235 - iwildmatch: match '^' '[a^bc]'
expecting success:
printf '%s' '^' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[a^bc]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1236 - iwildmatch (via ls-files): match '[a^bc]' '^'
expecting success:
test-tool wildmatch pathmatch '^' '[a^bc]'
ok 1237 - pathmatch: match '^' '[a^bc]'
expecting success:
printf '%s' '^' >expect &&
git ls-files -z -- '[a^bc]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1238 - pathmatch (via ls-files): match '[a^bc]' '^'
expecting success:
test-tool wildmatch ipathmatch '^' '[a^bc]'
ok 1239 - ipathmatch: match '^' '[a^bc]'
expecting success:
printf '%s' '^' >expect &&
git --icase-pathspecs ls-files -z -- '[a^bc]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1240 - ipathmatch (via ls-files): match '[a^bc]' '^'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ^
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1241 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1242 - setup match file test for -b]
expecting success:
test-tool wildmatch wildmatch '-b]' '[a-]b]'
ok 1243 - wildmatch: match '-b]' '[a-]b]'
expecting success:
printf '%s' '-b]' >expect &&
git --glob-pathspecs ls-files -z -- '[a-]b]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1244 - wildmatch (via ls-files): match '[a-]b]' '-b]'
expecting success:
test-tool wildmatch iwildmatch '-b]' '[a-]b]'
ok 1245 - iwildmatch: match '-b]' '[a-]b]'
expecting success:
printf '%s' '-b]' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[a-]b]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1246 - iwildmatch (via ls-files): match '[a-]b]' '-b]'
expecting success:
test-tool wildmatch pathmatch '-b]' '[a-]b]'
ok 1247 - pathmatch: match '-b]' '[a-]b]'
expecting success:
printf '%s' '-b]' >expect &&
git ls-files -z -- '[a-]b]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1248 - pathmatch (via ls-files): match '[a-]b]' '-b]'
expecting success:
test-tool wildmatch ipathmatch '-b]' '[a-]b]'
ok 1249 - ipathmatch: match '-b]' '[a-]b]'
expecting success:
printf '%s' '-b]' >expect &&
git --icase-pathspecs ls-files -z -- '[a-]b]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1250 - ipathmatch (via ls-files): match '[a-]b]' '-b]'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing -b]
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1251 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1252 - setup match file test for \
expecting success:
test_must_fail test-tool wildmatch wildmatch '\' '[\]'
ok 1253 - wildmatch: no match '\' '[\]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[\]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1254 - wildmatch (via ls-files): no match '[\]' '\'
expecting success:
test_must_fail test-tool wildmatch iwildmatch '\' '[\]'
ok 1255 - iwildmatch: no match '\' '[\]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[\]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1256 - iwildmatch (via ls-files): no match '[\]' '\'
expecting success:
test_must_fail test-tool wildmatch pathmatch '\' '[\]'
ok 1257 - pathmatch: no match '\' '[\]'
expecting success:
>expect &&
git ls-files -z -- '[\]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1258 - pathmatch (via ls-files): no match '[\]' '\'
expecting success:
test_must_fail test-tool wildmatch ipathmatch '\' '[\]'
ok 1259 - ipathmatch: no match '\' '[\]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[\]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1260 - ipathmatch (via ls-files): no match '[\]' '\'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing "\\"
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1261 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1262 - setup match file test for \
expecting success:
test-tool wildmatch wildmatch '\' '[\\]'
ok 1263 - wildmatch: match '\' '[\\]'
expecting success:
printf '%s' '\' >expect &&
git --glob-pathspecs ls-files -z -- '[\\]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1264 - wildmatch (via ls-files): match '[\\]' '\'
expecting success:
test-tool wildmatch iwildmatch '\' '[\\]'
ok 1265 - iwildmatch: match '\' '[\\]'
expecting success:
printf '%s' '\' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[\\]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1266 - iwildmatch (via ls-files): match '[\\]' '\'
expecting success:
test-tool wildmatch pathmatch '\' '[\\]'
ok 1267 - pathmatch: match '\' '[\\]'
expecting success:
printf '%s' '\' >expect &&
git ls-files -z -- '[\\]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1268 - pathmatch (via ls-files): match '[\\]' '\'
expecting success:
test-tool wildmatch ipathmatch '\' '[\\]'
ok 1269 - ipathmatch: match '\' '[\\]'
expecting success:
printf '%s' '\' >expect &&
git --icase-pathspecs ls-files -z -- '[\\]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1270 - ipathmatch (via ls-files): match '[\\]' '\'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing "\\"
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1271 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1272 - setup match file test for \
expecting success:
test_must_fail test-tool wildmatch wildmatch '\' '[!\\]'
ok 1273 - wildmatch: no match '\' '[!\\]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[!\\]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1274 - wildmatch (via ls-files): no match '[!\\]' '\'
expecting success:
test_must_fail test-tool wildmatch iwildmatch '\' '[!\\]'
ok 1275 - iwildmatch: no match '\' '[!\\]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[!\\]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1276 - iwildmatch (via ls-files): no match '[!\\]' '\'
expecting success:
test_must_fail test-tool wildmatch pathmatch '\' '[!\\]'
ok 1277 - pathmatch: no match '\' '[!\\]'
expecting success:
>expect &&
git ls-files -z -- '[!\\]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1278 - pathmatch (via ls-files): no match '[!\\]' '\'
expecting success:
test_must_fail test-tool wildmatch ipathmatch '\' '[!\\]'
ok 1279 - ipathmatch: no match '\' '[!\\]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[!\\]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1280 - ipathmatch (via ls-files): no match '[!\\]' '\'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing "\\"
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1281 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1282 - setup match file test for G
expecting success:
test-tool wildmatch wildmatch 'G' '[A-\\]'
ok 1283 - wildmatch: match 'G' '[A-\\]'
expecting success:
printf '%s' 'G' >expect &&
git --glob-pathspecs ls-files -z -- '[A-\\]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1284 - wildmatch (via ls-files): match '[A-\\]' 'G'
expecting success:
test-tool wildmatch iwildmatch 'G' '[A-\\]'
ok 1285 - iwildmatch: match 'G' '[A-\\]'
expecting success:
printf '%s' 'G' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[A-\\]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1286 - iwildmatch (via ls-files): match '[A-\\]' 'G'
expecting success:
test-tool wildmatch pathmatch 'G' '[A-\\]'
ok 1287 - pathmatch: match 'G' '[A-\\]'
expecting success:
printf '%s' 'G' >expect &&
git ls-files -z -- '[A-\\]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1288 - pathmatch (via ls-files): match '[A-\\]' 'G'
expecting success:
test-tool wildmatch ipathmatch 'G' '[A-\\]'
ok 1289 - ipathmatch: match 'G' '[A-\\]'
expecting success:
printf '%s' 'G' >expect &&
git --icase-pathspecs ls-files -z -- '[A-\\]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1290 - ipathmatch (via ls-files): match '[A-\\]' 'G'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing G
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1291 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1292 - setup match file test for aaabbb
expecting success:
test_must_fail test-tool wildmatch wildmatch 'aaabbb' 'b*a'
ok 1293 - wildmatch: no match 'aaabbb' 'b*a'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'b*a' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1294 - wildmatch (via ls-files): no match 'b*a' 'aaabbb'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'aaabbb' 'b*a'
ok 1295 - iwildmatch: no match 'aaabbb' 'b*a'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'b*a' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1296 - iwildmatch (via ls-files): no match 'b*a' 'aaabbb'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'aaabbb' 'b*a'
ok 1297 - pathmatch: no match 'aaabbb' 'b*a'
expecting success:
>expect &&
git ls-files -z -- 'b*a' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1298 - pathmatch (via ls-files): no match 'b*a' 'aaabbb'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'aaabbb' 'b*a'
ok 1299 - ipathmatch: no match 'aaabbb' 'b*a'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- 'b*a' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1300 - ipathmatch (via ls-files): no match 'b*a' 'aaabbb'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing aaabbb
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1301 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1302 - setup match file test for aabcaa
expecting success:
test_must_fail test-tool wildmatch wildmatch 'aabcaa' '*ba*'
ok 1303 - wildmatch: no match 'aabcaa' '*ba*'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '*ba*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1304 - wildmatch (via ls-files): no match '*ba*' 'aabcaa'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'aabcaa' '*ba*'
ok 1305 - iwildmatch: no match 'aabcaa' '*ba*'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*ba*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1306 - iwildmatch (via ls-files): no match '*ba*' 'aabcaa'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'aabcaa' '*ba*'
ok 1307 - pathmatch: no match 'aabcaa' '*ba*'
expecting success:
>expect &&
git ls-files -z -- '*ba*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1308 - pathmatch (via ls-files): no match '*ba*' 'aabcaa'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'aabcaa' '*ba*'
ok 1309 - ipathmatch: no match 'aabcaa' '*ba*'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '*ba*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1310 - ipathmatch (via ls-files): no match '*ba*' 'aabcaa'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing aabcaa
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1311 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1312 - setup match file test for ,
expecting success:
test-tool wildmatch wildmatch ',' '[,]'
ok 1313 - wildmatch: match ',' '[,]'
expecting success:
printf '%s' ',' >expect &&
git --glob-pathspecs ls-files -z -- '[,]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1314 - wildmatch (via ls-files): match '[,]' ','
expecting success:
test-tool wildmatch iwildmatch ',' '[,]'
ok 1315 - iwildmatch: match ',' '[,]'
expecting success:
printf '%s' ',' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[,]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1316 - iwildmatch (via ls-files): match '[,]' ','
expecting success:
test-tool wildmatch pathmatch ',' '[,]'
ok 1317 - pathmatch: match ',' '[,]'
expecting success:
printf '%s' ',' >expect &&
git ls-files -z -- '[,]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1318 - pathmatch (via ls-files): match '[,]' ','
expecting success:
test-tool wildmatch ipathmatch ',' '[,]'
ok 1319 - ipathmatch: match ',' '[,]'
expecting success:
printf '%s' ',' >expect &&
git --icase-pathspecs ls-files -z -- '[,]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1320 - ipathmatch (via ls-files): match '[,]' ','
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ,
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1321 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1322 - setup match file test for ,
expecting success:
test-tool wildmatch wildmatch ',' '[\\,]'
ok 1323 - wildmatch: match ',' '[\\,]'
expecting success:
printf '%s' ',' >expect &&
git --glob-pathspecs ls-files -z -- '[\\,]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1324 - wildmatch (via ls-files): match '[\\,]' ','
expecting success:
test-tool wildmatch iwildmatch ',' '[\\,]'
ok 1325 - iwildmatch: match ',' '[\\,]'
expecting success:
printf '%s' ',' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[\\,]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1326 - iwildmatch (via ls-files): match '[\\,]' ','
expecting success:
test-tool wildmatch pathmatch ',' '[\\,]'
ok 1327 - pathmatch: match ',' '[\\,]'
expecting success:
printf '%s' ',' >expect &&
git ls-files -z -- '[\\,]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1328 - pathmatch (via ls-files): match '[\\,]' ','
expecting success:
test-tool wildmatch ipathmatch ',' '[\\,]'
ok 1329 - ipathmatch: match ',' '[\\,]'
expecting success:
printf '%s' ',' >expect &&
git --icase-pathspecs ls-files -z -- '[\\,]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1330 - ipathmatch (via ls-files): match '[\\,]' ','
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ,
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1331 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1332 - setup match file test for \
expecting success:
test-tool wildmatch wildmatch '\' '[\\,]'
ok 1333 - wildmatch: match '\' '[\\,]'
expecting success:
printf '%s' '\' >expect &&
git --glob-pathspecs ls-files -z -- '[\\,]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1334 - wildmatch (via ls-files): match '[\\,]' '\'
expecting success:
test-tool wildmatch iwildmatch '\' '[\\,]'
ok 1335 - iwildmatch: match '\' '[\\,]'
expecting success:
printf '%s' '\' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[\\,]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1336 - iwildmatch (via ls-files): match '[\\,]' '\'
expecting success:
test-tool wildmatch pathmatch '\' '[\\,]'
ok 1337 - pathmatch: match '\' '[\\,]'
expecting success:
printf '%s' '\' >expect &&
git ls-files -z -- '[\\,]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1338 - pathmatch (via ls-files): match '[\\,]' '\'
expecting success:
test-tool wildmatch ipathmatch '\' '[\\,]'
ok 1339 - ipathmatch: match '\' '[\\,]'
expecting success:
printf '%s' '\' >expect &&
git --icase-pathspecs ls-files -z -- '[\\,]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1340 - ipathmatch (via ls-files): match '[\\,]' '\'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing "\\"
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1341 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1342 - setup match file test for -
expecting success:
test-tool wildmatch wildmatch '-' '[,-.]'
ok 1343 - wildmatch: match '-' '[,-.]'
expecting success:
printf '%s' '-' >expect &&
git --glob-pathspecs ls-files -z -- '[,-.]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1344 - wildmatch (via ls-files): match '[,-.]' '-'
expecting success:
test-tool wildmatch iwildmatch '-' '[,-.]'
ok 1345 - iwildmatch: match '-' '[,-.]'
expecting success:
printf '%s' '-' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[,-.]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1346 - iwildmatch (via ls-files): match '[,-.]' '-'
expecting success:
test-tool wildmatch pathmatch '-' '[,-.]'
ok 1347 - pathmatch: match '-' '[,-.]'
expecting success:
printf '%s' '-' >expect &&
git ls-files -z -- '[,-.]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1348 - pathmatch (via ls-files): match '[,-.]' '-'
expecting success:
test-tool wildmatch ipathmatch '-' '[,-.]'
ok 1349 - ipathmatch: match '-' '[,-.]'
expecting success:
printf '%s' '-' >expect &&
git --icase-pathspecs ls-files -z -- '[,-.]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1350 - ipathmatch (via ls-files): match '[,-.]' '-'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing -
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1351 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1352 - setup match file test for +
expecting success:
test_must_fail test-tool wildmatch wildmatch '+' '[,-.]'
ok 1353 - wildmatch: no match '+' '[,-.]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[,-.]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1354 - wildmatch (via ls-files): no match '[,-.]' '+'
expecting success:
test_must_fail test-tool wildmatch iwildmatch '+' '[,-.]'
ok 1355 - iwildmatch: no match '+' '[,-.]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[,-.]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1356 - iwildmatch (via ls-files): no match '[,-.]' '+'
expecting success:
test_must_fail test-tool wildmatch pathmatch '+' '[,-.]'
ok 1357 - pathmatch: no match '+' '[,-.]'
expecting success:
>expect &&
git ls-files -z -- '[,-.]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1358 - pathmatch (via ls-files): no match '[,-.]' '+'
expecting success:
test_must_fail test-tool wildmatch ipathmatch '+' '[,-.]'
ok 1359 - ipathmatch: no match '+' '[,-.]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[,-.]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1360 - ipathmatch (via ls-files): no match '[,-.]' '+'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing +
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1361 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1362 - setup match file test for -.]
expecting success:
test_must_fail test-tool wildmatch wildmatch '-.]' '[,-.]'
ok 1363 - wildmatch: no match '-.]' '[,-.]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[,-.]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1364 - wildmatch (via ls-files): no match '[,-.]' '-.]'
expecting success:
test_must_fail test-tool wildmatch iwildmatch '-.]' '[,-.]'
ok 1365 - iwildmatch: no match '-.]' '[,-.]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[,-.]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1366 - iwildmatch (via ls-files): no match '[,-.]' '-.]'
expecting success:
test_must_fail test-tool wildmatch pathmatch '-.]' '[,-.]'
ok 1367 - pathmatch: no match '-.]' '[,-.]'
expecting success:
>expect &&
git ls-files -z -- '[,-.]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1368 - pathmatch (via ls-files): no match '[,-.]' '-.]'
expecting success:
test_must_fail test-tool wildmatch ipathmatch '-.]' '[,-.]'
ok 1369 - ipathmatch: no match '-.]' '[,-.]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[,-.]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1370 - ipathmatch (via ls-files): no match '[,-.]' '-.]'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing -.]
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1371 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1372 - setup match file test for 2
expecting success:
test-tool wildmatch wildmatch '2' '[\1-\3]'
ok 1373 - wildmatch: match '2' '[\1-\3]'
expecting success:
printf '%s' '2' >expect &&
git --glob-pathspecs ls-files -z -- '[\1-\3]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1374 - wildmatch (via ls-files): match '[\1-\3]' '2'
expecting success:
test-tool wildmatch iwildmatch '2' '[\1-\3]'
ok 1375 - iwildmatch: match '2' '[\1-\3]'
expecting success:
printf '%s' '2' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[\1-\3]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1376 - iwildmatch (via ls-files): match '[\1-\3]' '2'
expecting success:
test-tool wildmatch pathmatch '2' '[\1-\3]'
ok 1377 - pathmatch: match '2' '[\1-\3]'
expecting success:
printf '%s' '2' >expect &&
git ls-files -z -- '[\1-\3]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1378 - pathmatch (via ls-files): match '[\1-\3]' '2'
expecting success:
test-tool wildmatch ipathmatch '2' '[\1-\3]'
ok 1379 - ipathmatch: match '2' '[\1-\3]'
expecting success:
printf '%s' '2' >expect &&
git --icase-pathspecs ls-files -z -- '[\1-\3]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1380 - ipathmatch (via ls-files): match '[\1-\3]' '2'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing 2
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1381 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1382 - setup match file test for 3
expecting success:
test-tool wildmatch wildmatch '3' '[\1-\3]'
ok 1383 - wildmatch: match '3' '[\1-\3]'
expecting success:
printf '%s' '3' >expect &&
git --glob-pathspecs ls-files -z -- '[\1-\3]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1384 - wildmatch (via ls-files): match '[\1-\3]' '3'
expecting success:
test-tool wildmatch iwildmatch '3' '[\1-\3]'
ok 1385 - iwildmatch: match '3' '[\1-\3]'
expecting success:
printf '%s' '3' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[\1-\3]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1386 - iwildmatch (via ls-files): match '[\1-\3]' '3'
expecting success:
test-tool wildmatch pathmatch '3' '[\1-\3]'
ok 1387 - pathmatch: match '3' '[\1-\3]'
expecting success:
printf '%s' '3' >expect &&
git ls-files -z -- '[\1-\3]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1388 - pathmatch (via ls-files): match '[\1-\3]' '3'
expecting success:
test-tool wildmatch ipathmatch '3' '[\1-\3]'
ok 1389 - ipathmatch: match '3' '[\1-\3]'
expecting success:
printf '%s' '3' >expect &&
git --icase-pathspecs ls-files -z -- '[\1-\3]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1390 - ipathmatch (via ls-files): match '[\1-\3]' '3'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing 3
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1391 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1392 - setup match file test for 4
expecting success:
test_must_fail test-tool wildmatch wildmatch '4' '[\1-\3]'
ok 1393 - wildmatch: no match '4' '[\1-\3]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[\1-\3]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1394 - wildmatch (via ls-files): no match '[\1-\3]' '4'
expecting success:
test_must_fail test-tool wildmatch iwildmatch '4' '[\1-\3]'
ok 1395 - iwildmatch: no match '4' '[\1-\3]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[\1-\3]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1396 - iwildmatch (via ls-files): no match '[\1-\3]' '4'
expecting success:
test_must_fail test-tool wildmatch pathmatch '4' '[\1-\3]'
ok 1397 - pathmatch: no match '4' '[\1-\3]'
expecting success:
>expect &&
git ls-files -z -- '[\1-\3]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1398 - pathmatch (via ls-files): no match '[\1-\3]' '4'
expecting success:
test_must_fail test-tool wildmatch ipathmatch '4' '[\1-\3]'
ok 1399 - ipathmatch: no match '4' '[\1-\3]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[\1-\3]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1400 - ipathmatch (via ls-files): no match '[\1-\3]' '4'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing 4
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1401 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1402 - setup match file test for \
expecting success:
test-tool wildmatch wildmatch '\' '[[-\]]'
ok 1403 - wildmatch: match '\' '[[-\]]'
expecting success:
printf '%s' '\' >expect &&
git --glob-pathspecs ls-files -z -- '[[-\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1404 - wildmatch (via ls-files): match '[[-\]]' '\'
expecting success:
test-tool wildmatch iwildmatch '\' '[[-\]]'
ok 1405 - iwildmatch: match '\' '[[-\]]'
expecting success:
printf '%s' '\' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[-\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1406 - iwildmatch (via ls-files): match '[[-\]]' '\'
expecting success:
test-tool wildmatch pathmatch '\' '[[-\]]'
ok 1407 - pathmatch: match '\' '[[-\]]'
expecting success:
printf '%s' '\' >expect &&
git ls-files -z -- '[[-\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1408 - pathmatch (via ls-files): match '[[-\]]' '\'
expecting success:
test-tool wildmatch ipathmatch '\' '[[-\]]'
ok 1409 - ipathmatch: match '\' '[[-\]]'
expecting success:
printf '%s' '\' >expect &&
git --icase-pathspecs ls-files -z -- '[[-\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1410 - ipathmatch (via ls-files): match '[[-\]]' '\'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing "\\"
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1411 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1412 - setup match file test for [
expecting success:
test-tool wildmatch wildmatch '[' '[[-\]]'
ok 1413 - wildmatch: match '[' '[[-\]]'
expecting success:
printf '%s' '[' >expect &&
git --glob-pathspecs ls-files -z -- '[[-\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1414 - wildmatch (via ls-files): match '[[-\]]' '['
expecting success:
test-tool wildmatch iwildmatch '[' '[[-\]]'
ok 1415 - iwildmatch: match '[' '[[-\]]'
expecting success:
printf '%s' '[' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[-\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1416 - iwildmatch (via ls-files): match '[[-\]]' '['
expecting success:
test-tool wildmatch pathmatch '[' '[[-\]]'
ok 1417 - pathmatch: match '[' '[[-\]]'
expecting success:
printf '%s' '[' >expect &&
git ls-files -z -- '[[-\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1418 - pathmatch (via ls-files): match '[[-\]]' '['
expecting success:
test-tool wildmatch ipathmatch '[' '[[-\]]'
ok 1419 - ipathmatch: match '[' '[[-\]]'
expecting success:
printf '%s' '[' >expect &&
git --icase-pathspecs ls-files -z -- '[[-\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1420 - ipathmatch (via ls-files): match '[[-\]]' '['
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing [
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1421 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1422 - setup match file test for ]
expecting success:
test-tool wildmatch wildmatch ']' '[[-\]]'
ok 1423 - wildmatch: match ']' '[[-\]]'
expecting success:
printf '%s' ']' >expect &&
git --glob-pathspecs ls-files -z -- '[[-\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1424 - wildmatch (via ls-files): match '[[-\]]' ']'
expecting success:
test-tool wildmatch iwildmatch ']' '[[-\]]'
ok 1425 - iwildmatch: match ']' '[[-\]]'
expecting success:
printf '%s' ']' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[-\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1426 - iwildmatch (via ls-files): match '[[-\]]' ']'
expecting success:
test-tool wildmatch pathmatch ']' '[[-\]]'
ok 1427 - pathmatch: match ']' '[[-\]]'
expecting success:
printf '%s' ']' >expect &&
git ls-files -z -- '[[-\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1428 - pathmatch (via ls-files): match '[[-\]]' ']'
expecting success:
test-tool wildmatch ipathmatch ']' '[[-\]]'
ok 1429 - ipathmatch: match ']' '[[-\]]'
expecting success:
printf '%s' ']' >expect &&
git --icase-pathspecs ls-files -z -- '[[-\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1430 - ipathmatch (via ls-files): match '[[-\]]' ']'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ]
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1431 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1432 - setup match file test for -
expecting success:
test_must_fail test-tool wildmatch wildmatch '-' '[[-\]]'
ok 1433 - wildmatch: no match '-' '[[-\]]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[[-\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1434 - wildmatch (via ls-files): no match '[[-\]]' '-'
expecting success:
test_must_fail test-tool wildmatch iwildmatch '-' '[[-\]]'
ok 1435 - iwildmatch: no match '-' '[[-\]]'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[-\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1436 - iwildmatch (via ls-files): no match '[[-\]]' '-'
expecting success:
test_must_fail test-tool wildmatch pathmatch '-' '[[-\]]'
ok 1437 - pathmatch: no match '-' '[[-\]]'
expecting success:
>expect &&
git ls-files -z -- '[[-\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1438 - pathmatch (via ls-files): no match '[[-\]]' '-'
expecting success:
test_must_fail test-tool wildmatch ipathmatch '-' '[[-\]]'
ok 1439 - ipathmatch: no match '-' '[[-\]]'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '[[-\]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1440 - ipathmatch (via ls-files): no match '[[-\]]' '-'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing -
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1441 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1442 - setup match file test for -adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1
expecting success:
test-tool wildmatch wildmatch '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
ok 1443 - wildmatch: match '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
expecting success:
printf '%s' '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1' >expect &&
git --glob-pathspecs ls-files -z -- '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1444 - wildmatch (via ls-files): match '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1'
expecting success:
test-tool wildmatch iwildmatch '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
ok 1445 - iwildmatch: match '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
expecting success:
printf '%s' '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1446 - iwildmatch (via ls-files): match '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1'
expecting success:
test-tool wildmatch pathmatch '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
ok 1447 - pathmatch: match '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
expecting success:
printf '%s' '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1' >expect &&
git ls-files -z -- '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1448 - pathmatch (via ls-files): match '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1'
expecting success:
test-tool wildmatch ipathmatch '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
ok 1449 - ipathmatch: match '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
expecting success:
printf '%s' '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1' >expect &&
git --icase-pathspecs ls-files -z -- '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1450 - ipathmatch (via ls-files): match '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing -adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1451 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1452 - setup match file test for -adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1
expecting success:
test_must_fail test-tool wildmatch wildmatch '-adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
ok 1453 - wildmatch: no match '-adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1454 - wildmatch (via ls-files): no match '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' '-adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1'
expecting success:
test_must_fail test-tool wildmatch iwildmatch '-adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
ok 1455 - iwildmatch: no match '-adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1456 - iwildmatch (via ls-files): no match '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' '-adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1'
expecting success:
test_must_fail test-tool wildmatch pathmatch '-adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
ok 1457 - pathmatch: no match '-adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
expecting success:
>expect &&
git ls-files -z -- '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1458 - pathmatch (via ls-files): no match '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' '-adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1'
expecting success:
test_must_fail test-tool wildmatch ipathmatch '-adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
ok 1459 - ipathmatch: no match '-adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1460 - ipathmatch (via ls-files): no match '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' '-adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing -adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1461 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1462 - setup match file test for -adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1
expecting success:
test_must_fail test-tool wildmatch wildmatch '-adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
ok 1463 - wildmatch: no match '-adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1464 - wildmatch (via ls-files): no match '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' '-adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1'
expecting success:
test_must_fail test-tool wildmatch iwildmatch '-adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
ok 1465 - iwildmatch: no match '-adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1466 - iwildmatch (via ls-files): no match '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' '-adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1'
expecting success:
test_must_fail test-tool wildmatch pathmatch '-adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
ok 1467 - pathmatch: no match '-adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
expecting success:
>expect &&
git ls-files -z -- '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1468 - pathmatch (via ls-files): no match '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' '-adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1'
expecting success:
test_must_fail test-tool wildmatch ipathmatch '-adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
ok 1469 - ipathmatch: no match '-adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1470 - ipathmatch (via ls-files): no match '-*-*-*-*-*-*-12-*-*-*-m-*-*-*' '-adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing -adobe-courier-bold-o-normal--12-120-75-75-/
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1471 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1472 - setup match file test for XXX/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1
expecting success:
test-tool wildmatch wildmatch 'XXX/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
ok 1473 - wildmatch: match 'XXX/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
checking known breakage: false
not ok 1474 - wildmatch (via ls-files): match skip 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*' 'XXX/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1' # TODO known breakage
expecting success:
test-tool wildmatch iwildmatch 'XXX/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
ok 1475 - iwildmatch: match 'XXX/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
checking known breakage: false
not ok 1476 - iwildmatch (via ls-files): match skip 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*' 'XXX/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1' # TODO known breakage
expecting success:
test-tool wildmatch pathmatch 'XXX/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
ok 1477 - pathmatch: match 'XXX/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
checking known breakage: false
not ok 1478 - pathmatch (via ls-files): match skip 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*' 'XXX/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1' # TODO known breakage
expecting success:
test-tool wildmatch ipathmatch 'XXX/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
ok 1479 - ipathmatch: match 'XXX/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
checking known breakage: false
not ok 1480 - ipathmatch (via ls-files): match skip 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*' 'XXX/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1' # TODO known breakage
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
ok 1481 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1482 - setup match file test for XXX/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1
expecting success:
test_must_fail test-tool wildmatch wildmatch 'XXX/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
ok 1483 - wildmatch: no match 'XXX/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
checking known breakage: false
not ok 1484 - wildmatch (via ls-files): no match skip 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*' 'XXX/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1' # TODO known breakage
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'XXX/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
ok 1485 - iwildmatch: no match 'XXX/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
checking known breakage: false
not ok 1486 - iwildmatch (via ls-files): no match skip 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*' 'XXX/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1' # TODO known breakage
expecting success:
test_must_fail test-tool wildmatch pathmatch 'XXX/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
ok 1487 - pathmatch: no match 'XXX/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
checking known breakage: false
not ok 1488 - pathmatch (via ls-files): no match skip 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*' 'XXX/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1' # TODO known breakage
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'XXX/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
ok 1489 - ipathmatch: no match 'XXX/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'
checking known breakage: false
not ok 1490 - ipathmatch (via ls-files): no match skip 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*' 'XXX/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1' # TODO known breakage
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
ok 1491 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1492 - setup match file test for abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt
expecting success:
test-tool wildmatch wildmatch 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' '**/*a*b*g*n*t'
ok 1493 - wildmatch: match 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' '**/*a*b*g*n*t'
expecting success:
printf '%s' 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' >expect &&
git --glob-pathspecs ls-files -z -- '**/*a*b*g*n*t' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1494 - wildmatch (via ls-files): match '**/*a*b*g*n*t' 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt'
expecting success:
test-tool wildmatch iwildmatch 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' '**/*a*b*g*n*t'
ok 1495 - iwildmatch: match 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' '**/*a*b*g*n*t'
expecting success:
printf '%s' 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '**/*a*b*g*n*t' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1496 - iwildmatch (via ls-files): match '**/*a*b*g*n*t' 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt'
expecting success:
test-tool wildmatch pathmatch 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' '**/*a*b*g*n*t'
ok 1497 - pathmatch: match 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' '**/*a*b*g*n*t'
expecting success:
printf '%s' 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' >expect &&
git ls-files -z -- '**/*a*b*g*n*t' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1498 - pathmatch (via ls-files): match '**/*a*b*g*n*t' 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt'
expecting success:
test-tool wildmatch ipathmatch 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' '**/*a*b*g*n*t'
ok 1499 - ipathmatch: match 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' '**/*a*b*g*n*t'
expecting success:
printf '%s' 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' >expect &&
git --icase-pathspecs ls-files -z -- '**/*a*b*g*n*t' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1500 - ipathmatch (via ls-files): match '**/*a*b*g*n*t' 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing abcd/
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1501 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1502 - setup match file test for abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz
expecting success:
test_must_fail test-tool wildmatch wildmatch 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz' '**/*a*b*g*n*t'
ok 1503 - wildmatch: no match 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz' '**/*a*b*g*n*t'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '**/*a*b*g*n*t' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1504 - wildmatch (via ls-files): no match '**/*a*b*g*n*t' 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz' '**/*a*b*g*n*t'
ok 1505 - iwildmatch: no match 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz' '**/*a*b*g*n*t'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '**/*a*b*g*n*t' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1506 - iwildmatch (via ls-files): no match '**/*a*b*g*n*t' 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz' '**/*a*b*g*n*t'
ok 1507 - pathmatch: no match 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz' '**/*a*b*g*n*t'
expecting success:
>expect &&
git ls-files -z -- '**/*a*b*g*n*t' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1508 - pathmatch (via ls-files): no match '**/*a*b*g*n*t' 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz' '**/*a*b*g*n*t'
ok 1509 - ipathmatch: no match 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz' '**/*a*b*g*n*t'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '**/*a*b*g*n*t' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1510 - ipathmatch (via ls-files): no match '**/*a*b*g*n*t' 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing abcd/
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1511 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1512 - setup match file test for foo
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo' '*/*/*'
ok 1513 - wildmatch: no match 'foo' '*/*/*'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '*/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1514 - wildmatch (via ls-files): no match '*/*/*' 'foo'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo' '*/*/*'
ok 1515 - iwildmatch: no match 'foo' '*/*/*'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1516 - iwildmatch (via ls-files): no match '*/*/*' 'foo'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'foo' '*/*/*'
ok 1517 - pathmatch: no match 'foo' '*/*/*'
expecting success:
>expect &&
git ls-files -z -- '*/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1518 - pathmatch (via ls-files): no match '*/*/*' 'foo'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'foo' '*/*/*'
ok 1519 - ipathmatch: no match 'foo' '*/*/*'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '*/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1520 - ipathmatch (via ls-files): no match '*/*/*' 'foo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo
ok 1521 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1522 - setup match file test for foo/bar
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/bar' '*/*/*'
ok 1523 - wildmatch: no match 'foo/bar' '*/*/*'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '*/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1524 - wildmatch (via ls-files): no match '*/*/*' 'foo/bar'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/bar' '*/*/*'
ok 1525 - iwildmatch: no match 'foo/bar' '*/*/*'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1526 - iwildmatch (via ls-files): no match '*/*/*' 'foo/bar'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'foo/bar' '*/*/*'
ok 1527 - pathmatch: no match 'foo/bar' '*/*/*'
expecting success:
>expect &&
git ls-files -z -- '*/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1528 - pathmatch (via ls-files): no match '*/*/*' 'foo/bar'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'foo/bar' '*/*/*'
ok 1529 - ipathmatch: no match 'foo/bar' '*/*/*'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- '*/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1530 - ipathmatch (via ls-files): no match '*/*/*' 'foo/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 1531 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1532 - setup match file test for foo/bba/arr
expecting success:
test-tool wildmatch wildmatch 'foo/bba/arr' '*/*/*'
ok 1533 - wildmatch: match 'foo/bba/arr' '*/*/*'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git --glob-pathspecs ls-files -z -- '*/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1534 - wildmatch (via ls-files): match '*/*/*' 'foo/bba/arr'
expecting success:
test-tool wildmatch iwildmatch 'foo/bba/arr' '*/*/*'
ok 1535 - iwildmatch: match 'foo/bba/arr' '*/*/*'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1536 - iwildmatch (via ls-files): match '*/*/*' 'foo/bba/arr'
expecting success:
test-tool wildmatch pathmatch 'foo/bba/arr' '*/*/*'
ok 1537 - pathmatch: match 'foo/bba/arr' '*/*/*'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git ls-files -z -- '*/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1538 - pathmatch (via ls-files): match '*/*/*' 'foo/bba/arr'
expecting success:
test-tool wildmatch ipathmatch 'foo/bba/arr' '*/*/*'
ok 1539 - ipathmatch: match 'foo/bba/arr' '*/*/*'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git --icase-pathspecs ls-files -z -- '*/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1540 - ipathmatch (via ls-files): match '*/*/*' 'foo/bba/arr'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 1541 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1542 - setup match file test for foo/bb/aa/rr
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/bb/aa/rr' '*/*/*'
ok 1543 - wildmatch: no match 'foo/bb/aa/rr' '*/*/*'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '*/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1544 - wildmatch (via ls-files): no match '*/*/*' 'foo/bb/aa/rr'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/bb/aa/rr' '*/*/*'
ok 1545 - iwildmatch: no match 'foo/bb/aa/rr' '*/*/*'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1546 - iwildmatch (via ls-files): no match '*/*/*' 'foo/bb/aa/rr'
expecting success:
test-tool wildmatch pathmatch 'foo/bb/aa/rr' '*/*/*'
ok 1547 - pathmatch: match 'foo/bb/aa/rr' '*/*/*'
expecting success:
printf '%s' 'foo/bb/aa/rr' >expect &&
git ls-files -z -- '*/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1548 - pathmatch (via ls-files): match '*/*/*' 'foo/bb/aa/rr'
expecting success:
test-tool wildmatch ipathmatch 'foo/bb/aa/rr' '*/*/*'
ok 1549 - ipathmatch: match 'foo/bb/aa/rr' '*/*/*'
expecting success:
printf '%s' 'foo/bb/aa/rr' >expect &&
git --icase-pathspecs ls-files -z -- '*/*/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1550 - ipathmatch (via ls-files): match '*/*/*' 'foo/bb/aa/rr'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 1551 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1552 - setup match file test for foo/bb/aa/rr
expecting success:
test-tool wildmatch wildmatch 'foo/bb/aa/rr' '**/**/**'
ok 1553 - wildmatch: match 'foo/bb/aa/rr' '**/**/**'
expecting success:
printf '%s' 'foo/bb/aa/rr' >expect &&
git --glob-pathspecs ls-files -z -- '**/**/**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1554 - wildmatch (via ls-files): match '**/**/**' 'foo/bb/aa/rr'
expecting success:
test-tool wildmatch iwildmatch 'foo/bb/aa/rr' '**/**/**'
ok 1555 - iwildmatch: match 'foo/bb/aa/rr' '**/**/**'
expecting success:
printf '%s' 'foo/bb/aa/rr' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '**/**/**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1556 - iwildmatch (via ls-files): match '**/**/**' 'foo/bb/aa/rr'
expecting success:
test-tool wildmatch pathmatch 'foo/bb/aa/rr' '**/**/**'
ok 1557 - pathmatch: match 'foo/bb/aa/rr' '**/**/**'
expecting success:
printf '%s' 'foo/bb/aa/rr' >expect &&
git ls-files -z -- '**/**/**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1558 - pathmatch (via ls-files): match '**/**/**' 'foo/bb/aa/rr'
expecting success:
test-tool wildmatch ipathmatch 'foo/bb/aa/rr' '**/**/**'
ok 1559 - ipathmatch: match 'foo/bb/aa/rr' '**/**/**'
expecting success:
printf '%s' 'foo/bb/aa/rr' >expect &&
git --icase-pathspecs ls-files -z -- '**/**/**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1560 - ipathmatch (via ls-files): match '**/**/**' 'foo/bb/aa/rr'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 1561 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1562 - setup match file test for abcXdefXghi
expecting success:
test-tool wildmatch wildmatch 'abcXdefXghi' '*X*i'
ok 1563 - wildmatch: match 'abcXdefXghi' '*X*i'
expecting success:
printf '%s' 'abcXdefXghi' >expect &&
git --glob-pathspecs ls-files -z -- '*X*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1564 - wildmatch (via ls-files): match '*X*i' 'abcXdefXghi'
expecting success:
test-tool wildmatch iwildmatch 'abcXdefXghi' '*X*i'
ok 1565 - iwildmatch: match 'abcXdefXghi' '*X*i'
expecting success:
printf '%s' 'abcXdefXghi' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*X*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1566 - iwildmatch (via ls-files): match '*X*i' 'abcXdefXghi'
expecting success:
test-tool wildmatch pathmatch 'abcXdefXghi' '*X*i'
ok 1567 - pathmatch: match 'abcXdefXghi' '*X*i'
expecting success:
printf '%s' 'abcXdefXghi' >expect &&
git ls-files -z -- '*X*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1568 - pathmatch (via ls-files): match '*X*i' 'abcXdefXghi'
expecting success:
test-tool wildmatch ipathmatch 'abcXdefXghi' '*X*i'
ok 1569 - ipathmatch: match 'abcXdefXghi' '*X*i'
expecting success:
printf '%s' 'abcXdefXghi' >expect &&
git --icase-pathspecs ls-files -z -- '*X*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1570 - ipathmatch (via ls-files): match '*X*i' 'abcXdefXghi'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing abcXdefXghi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1571 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1572 - setup match file test for ab/cXd/efXg/hi
expecting success:
test_must_fail test-tool wildmatch wildmatch 'ab/cXd/efXg/hi' '*X*i'
ok 1573 - wildmatch: no match 'ab/cXd/efXg/hi' '*X*i'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '*X*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1574 - wildmatch (via ls-files): no match '*X*i' 'ab/cXd/efXg/hi'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'ab/cXd/efXg/hi' '*X*i'
ok 1575 - iwildmatch: no match 'ab/cXd/efXg/hi' '*X*i'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*X*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1576 - iwildmatch (via ls-files): no match '*X*i' 'ab/cXd/efXg/hi'
expecting success:
test-tool wildmatch pathmatch 'ab/cXd/efXg/hi' '*X*i'
ok 1577 - pathmatch: match 'ab/cXd/efXg/hi' '*X*i'
expecting success:
printf '%s' 'ab/cXd/efXg/hi' >expect &&
git ls-files -z -- '*X*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1578 - pathmatch (via ls-files): match '*X*i' 'ab/cXd/efXg/hi'
expecting success:
test-tool wildmatch ipathmatch 'ab/cXd/efXg/hi' '*X*i'
ok 1579 - ipathmatch: match 'ab/cXd/efXg/hi' '*X*i'
expecting success:
printf '%s' 'ab/cXd/efXg/hi' >expect &&
git --icase-pathspecs ls-files -z -- '*X*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1580 - ipathmatch (via ls-files): match '*X*i' 'ab/cXd/efXg/hi'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ab/
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1581 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1582 - setup match file test for ab/cXd/efXg/hi
expecting success:
test-tool wildmatch wildmatch 'ab/cXd/efXg/hi' '*/*X*/*/*i'
ok 1583 - wildmatch: match 'ab/cXd/efXg/hi' '*/*X*/*/*i'
expecting success:
printf '%s' 'ab/cXd/efXg/hi' >expect &&
git --glob-pathspecs ls-files -z -- '*/*X*/*/*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1584 - wildmatch (via ls-files): match '*/*X*/*/*i' 'ab/cXd/efXg/hi'
expecting success:
test-tool wildmatch iwildmatch 'ab/cXd/efXg/hi' '*/*X*/*/*i'
ok 1585 - iwildmatch: match 'ab/cXd/efXg/hi' '*/*X*/*/*i'
expecting success:
printf '%s' 'ab/cXd/efXg/hi' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*/*X*/*/*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1586 - iwildmatch (via ls-files): match '*/*X*/*/*i' 'ab/cXd/efXg/hi'
expecting success:
test-tool wildmatch pathmatch 'ab/cXd/efXg/hi' '*/*X*/*/*i'
ok 1587 - pathmatch: match 'ab/cXd/efXg/hi' '*/*X*/*/*i'
expecting success:
printf '%s' 'ab/cXd/efXg/hi' >expect &&
git ls-files -z -- '*/*X*/*/*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1588 - pathmatch (via ls-files): match '*/*X*/*/*i' 'ab/cXd/efXg/hi'
expecting success:
test-tool wildmatch ipathmatch 'ab/cXd/efXg/hi' '*/*X*/*/*i'
ok 1589 - ipathmatch: match 'ab/cXd/efXg/hi' '*/*X*/*/*i'
expecting success:
printf '%s' 'ab/cXd/efXg/hi' >expect &&
git --icase-pathspecs ls-files -z -- '*/*X*/*/*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1590 - ipathmatch (via ls-files): match '*/*X*/*/*i' 'ab/cXd/efXg/hi'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ab/
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1591 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1592 - setup match file test for ab/cXd/efXg/hi
expecting success:
test-tool wildmatch wildmatch 'ab/cXd/efXg/hi' '**/*X*/**/*i'
ok 1593 - wildmatch: match 'ab/cXd/efXg/hi' '**/*X*/**/*i'
expecting success:
printf '%s' 'ab/cXd/efXg/hi' >expect &&
git --glob-pathspecs ls-files -z -- '**/*X*/**/*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1594 - wildmatch (via ls-files): match '**/*X*/**/*i' 'ab/cXd/efXg/hi'
expecting success:
test-tool wildmatch iwildmatch 'ab/cXd/efXg/hi' '**/*X*/**/*i'
ok 1595 - iwildmatch: match 'ab/cXd/efXg/hi' '**/*X*/**/*i'
expecting success:
printf '%s' 'ab/cXd/efXg/hi' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '**/*X*/**/*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1596 - iwildmatch (via ls-files): match '**/*X*/**/*i' 'ab/cXd/efXg/hi'
expecting success:
test-tool wildmatch pathmatch 'ab/cXd/efXg/hi' '**/*X*/**/*i'
ok 1597 - pathmatch: match 'ab/cXd/efXg/hi' '**/*X*/**/*i'
expecting success:
printf '%s' 'ab/cXd/efXg/hi' >expect &&
git ls-files -z -- '**/*X*/**/*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1598 - pathmatch (via ls-files): match '**/*X*/**/*i' 'ab/cXd/efXg/hi'
expecting success:
test-tool wildmatch ipathmatch 'ab/cXd/efXg/hi' '**/*X*/**/*i'
ok 1599 - ipathmatch: match 'ab/cXd/efXg/hi' '**/*X*/**/*i'
expecting success:
printf '%s' 'ab/cXd/efXg/hi' >expect &&
git --icase-pathspecs ls-files -z -- '**/*X*/**/*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1600 - ipathmatch (via ls-files): match '**/*X*/**/*i' 'ab/cXd/efXg/hi'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ab/
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1601 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1602 - setup match file test for foo
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo' 'fo'
ok 1603 - wildmatch: no match 'foo' 'fo'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'fo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1604 - wildmatch (via ls-files): no match 'fo' 'foo'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo' 'fo'
ok 1605 - iwildmatch: no match 'foo' 'fo'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'fo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1606 - iwildmatch (via ls-files): no match 'fo' 'foo'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'foo' 'fo'
ok 1607 - pathmatch: no match 'foo' 'fo'
expecting success:
>expect &&
git ls-files -z -- 'fo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1608 - pathmatch (via ls-files): no match 'fo' 'foo'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'foo' 'fo'
ok 1609 - ipathmatch: no match 'foo' 'fo'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- 'fo' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1610 - ipathmatch (via ls-files): no match 'fo' 'foo'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo
ok 1611 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1612 - setup match file test for foo/bar
expecting success:
test-tool wildmatch wildmatch 'foo/bar' 'foo/bar'
ok 1613 - wildmatch: match 'foo/bar' 'foo/bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git --glob-pathspecs ls-files -z -- 'foo/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1614 - wildmatch (via ls-files): match 'foo/bar' 'foo/bar'
expecting success:
test-tool wildmatch iwildmatch 'foo/bar' 'foo/bar'
ok 1615 - iwildmatch: match 'foo/bar' 'foo/bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1616 - iwildmatch (via ls-files): match 'foo/bar' 'foo/bar'
expecting success:
test-tool wildmatch pathmatch 'foo/bar' 'foo/bar'
ok 1617 - pathmatch: match 'foo/bar' 'foo/bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git ls-files -z -- 'foo/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1618 - pathmatch (via ls-files): match 'foo/bar' 'foo/bar'
expecting success:
test-tool wildmatch ipathmatch 'foo/bar' 'foo/bar'
ok 1619 - ipathmatch: match 'foo/bar' 'foo/bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git --icase-pathspecs ls-files -z -- 'foo/bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1620 - ipathmatch (via ls-files): match 'foo/bar' 'foo/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 1621 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1622 - setup match file test for foo/bar
expecting success:
test-tool wildmatch wildmatch 'foo/bar' 'foo/*'
ok 1623 - wildmatch: match 'foo/bar' 'foo/*'
expecting success:
printf '%s' 'foo/bar' >expect &&
git --glob-pathspecs ls-files -z -- 'foo/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1624 - wildmatch (via ls-files): match 'foo/*' 'foo/bar'
expecting success:
test-tool wildmatch iwildmatch 'foo/bar' 'foo/*'
ok 1625 - iwildmatch: match 'foo/bar' 'foo/*'
expecting success:
printf '%s' 'foo/bar' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1626 - iwildmatch (via ls-files): match 'foo/*' 'foo/bar'
expecting success:
test-tool wildmatch pathmatch 'foo/bar' 'foo/*'
ok 1627 - pathmatch: match 'foo/bar' 'foo/*'
expecting success:
printf '%s' 'foo/bar' >expect &&
git ls-files -z -- 'foo/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1628 - pathmatch (via ls-files): match 'foo/*' 'foo/bar'
expecting success:
test-tool wildmatch ipathmatch 'foo/bar' 'foo/*'
ok 1629 - ipathmatch: match 'foo/bar' 'foo/*'
expecting success:
printf '%s' 'foo/bar' >expect &&
git --icase-pathspecs ls-files -z -- 'foo/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1630 - ipathmatch (via ls-files): match 'foo/*' 'foo/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 1631 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1632 - setup match file test for foo/bba/arr
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/bba/arr' 'foo/*'
ok 1633 - wildmatch: no match 'foo/bba/arr' 'foo/*'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'foo/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1634 - wildmatch (via ls-files): no match 'foo/*' 'foo/bba/arr'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/bba/arr' 'foo/*'
ok 1635 - iwildmatch: no match 'foo/bba/arr' 'foo/*'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1636 - iwildmatch (via ls-files): no match 'foo/*' 'foo/bba/arr'
expecting success:
test-tool wildmatch pathmatch 'foo/bba/arr' 'foo/*'
ok 1637 - pathmatch: match 'foo/bba/arr' 'foo/*'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git ls-files -z -- 'foo/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1638 - pathmatch (via ls-files): match 'foo/*' 'foo/bba/arr'
expecting success:
test-tool wildmatch ipathmatch 'foo/bba/arr' 'foo/*'
ok 1639 - ipathmatch: match 'foo/bba/arr' 'foo/*'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git --icase-pathspecs ls-files -z -- 'foo/*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1640 - ipathmatch (via ls-files): match 'foo/*' 'foo/bba/arr'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 1641 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1642 - setup match file test for foo/bba/arr
expecting success:
test-tool wildmatch wildmatch 'foo/bba/arr' 'foo/**'
ok 1643 - wildmatch: match 'foo/bba/arr' 'foo/**'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git --glob-pathspecs ls-files -z -- 'foo/**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1644 - wildmatch (via ls-files): match 'foo/**' 'foo/bba/arr'
expecting success:
test-tool wildmatch iwildmatch 'foo/bba/arr' 'foo/**'
ok 1645 - iwildmatch: match 'foo/bba/arr' 'foo/**'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo/**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1646 - iwildmatch (via ls-files): match 'foo/**' 'foo/bba/arr'
expecting success:
test-tool wildmatch pathmatch 'foo/bba/arr' 'foo/**'
ok 1647 - pathmatch: match 'foo/bba/arr' 'foo/**'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git ls-files -z -- 'foo/**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1648 - pathmatch (via ls-files): match 'foo/**' 'foo/bba/arr'
expecting success:
test-tool wildmatch ipathmatch 'foo/bba/arr' 'foo/**'
ok 1649 - ipathmatch: match 'foo/bba/arr' 'foo/**'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git --icase-pathspecs ls-files -z -- 'foo/**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1650 - ipathmatch (via ls-files): match 'foo/**' 'foo/bba/arr'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 1651 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1652 - setup match file test for foo/bba/arr
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/bba/arr' 'foo*'
ok 1653 - wildmatch: no match 'foo/bba/arr' 'foo*'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'foo*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1654 - wildmatch (via ls-files): no match 'foo*' 'foo/bba/arr'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/bba/arr' 'foo*'
ok 1655 - iwildmatch: no match 'foo/bba/arr' 'foo*'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1656 - iwildmatch (via ls-files): no match 'foo*' 'foo/bba/arr'
expecting success:
test-tool wildmatch pathmatch 'foo/bba/arr' 'foo*'
ok 1657 - pathmatch: match 'foo/bba/arr' 'foo*'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git ls-files -z -- 'foo*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1658 - pathmatch (via ls-files): match 'foo*' 'foo/bba/arr'
expecting success:
test-tool wildmatch ipathmatch 'foo/bba/arr' 'foo*'
ok 1659 - ipathmatch: match 'foo/bba/arr' 'foo*'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git --icase-pathspecs ls-files -z -- 'foo*' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1660 - ipathmatch (via ls-files): match 'foo*' 'foo/bba/arr'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 1661 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1662 - setup match file test for foo/bba/arr
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/bba/arr' 'foo**'
ok 1663 - wildmatch: no match 'foo/bba/arr' 'foo**'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git --glob-pathspecs ls-files -z -- 'foo**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1664 - wildmatch (via ls-files): match 'foo**' 'foo/bba/arr'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/bba/arr' 'foo**'
ok 1665 - iwildmatch: no match 'foo/bba/arr' 'foo**'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1666 - iwildmatch (via ls-files): match 'foo**' 'foo/bba/arr'
expecting success:
test-tool wildmatch pathmatch 'foo/bba/arr' 'foo**'
ok 1667 - pathmatch: match 'foo/bba/arr' 'foo**'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git ls-files -z -- 'foo**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1668 - pathmatch (via ls-files): match 'foo**' 'foo/bba/arr'
expecting success:
test-tool wildmatch ipathmatch 'foo/bba/arr' 'foo**'
ok 1669 - ipathmatch: match 'foo/bba/arr' 'foo**'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git --icase-pathspecs ls-files -z -- 'foo**' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1670 - ipathmatch (via ls-files): match 'foo**' 'foo/bba/arr'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 1671 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1672 - setup match file test for foo/bba/arr
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/bba/arr' 'foo/*arr'
ok 1673 - wildmatch: no match 'foo/bba/arr' 'foo/*arr'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'foo/*arr' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1674 - wildmatch (via ls-files): no match 'foo/*arr' 'foo/bba/arr'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/bba/arr' 'foo/*arr'
ok 1675 - iwildmatch: no match 'foo/bba/arr' 'foo/*arr'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo/*arr' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1676 - iwildmatch (via ls-files): no match 'foo/*arr' 'foo/bba/arr'
expecting success:
test-tool wildmatch pathmatch 'foo/bba/arr' 'foo/*arr'
ok 1677 - pathmatch: match 'foo/bba/arr' 'foo/*arr'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git ls-files -z -- 'foo/*arr' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1678 - pathmatch (via ls-files): match 'foo/*arr' 'foo/bba/arr'
expecting success:
test-tool wildmatch ipathmatch 'foo/bba/arr' 'foo/*arr'
ok 1679 - ipathmatch: match 'foo/bba/arr' 'foo/*arr'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git --icase-pathspecs ls-files -z -- 'foo/*arr' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1680 - ipathmatch (via ls-files): match 'foo/*arr' 'foo/bba/arr'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 1681 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1682 - setup match file test for foo/bba/arr
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/bba/arr' 'foo/**arr'
ok 1683 - wildmatch: no match 'foo/bba/arr' 'foo/**arr'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'foo/**arr' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1684 - wildmatch (via ls-files): no match 'foo/**arr' 'foo/bba/arr'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/bba/arr' 'foo/**arr'
ok 1685 - iwildmatch: no match 'foo/bba/arr' 'foo/**arr'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo/**arr' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1686 - iwildmatch (via ls-files): no match 'foo/**arr' 'foo/bba/arr'
expecting success:
test-tool wildmatch pathmatch 'foo/bba/arr' 'foo/**arr'
ok 1687 - pathmatch: match 'foo/bba/arr' 'foo/**arr'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git ls-files -z -- 'foo/**arr' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1688 - pathmatch (via ls-files): match 'foo/**arr' 'foo/bba/arr'
expecting success:
test-tool wildmatch ipathmatch 'foo/bba/arr' 'foo/**arr'
ok 1689 - ipathmatch: match 'foo/bba/arr' 'foo/**arr'
expecting success:
printf '%s' 'foo/bba/arr' >expect &&
git --icase-pathspecs ls-files -z -- 'foo/**arr' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1690 - ipathmatch (via ls-files): match 'foo/**arr' 'foo/bba/arr'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 1691 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1692 - setup match file test for foo/bba/arr
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/bba/arr' 'foo/*z'
ok 1693 - wildmatch: no match 'foo/bba/arr' 'foo/*z'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'foo/*z' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1694 - wildmatch (via ls-files): no match 'foo/*z' 'foo/bba/arr'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/bba/arr' 'foo/*z'
ok 1695 - iwildmatch: no match 'foo/bba/arr' 'foo/*z'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo/*z' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1696 - iwildmatch (via ls-files): no match 'foo/*z' 'foo/bba/arr'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'foo/bba/arr' 'foo/*z'
ok 1697 - pathmatch: no match 'foo/bba/arr' 'foo/*z'
expecting success:
>expect &&
git ls-files -z -- 'foo/*z' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1698 - pathmatch (via ls-files): no match 'foo/*z' 'foo/bba/arr'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'foo/bba/arr' 'foo/*z'
ok 1699 - ipathmatch: no match 'foo/bba/arr' 'foo/*z'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- 'foo/*z' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1700 - ipathmatch (via ls-files): no match 'foo/*z' 'foo/bba/arr'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 1701 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1702 - setup match file test for foo/bba/arr
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/bba/arr' 'foo/**z'
ok 1703 - wildmatch: no match 'foo/bba/arr' 'foo/**z'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'foo/**z' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1704 - wildmatch (via ls-files): no match 'foo/**z' 'foo/bba/arr'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/bba/arr' 'foo/**z'
ok 1705 - iwildmatch: no match 'foo/bba/arr' 'foo/**z'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo/**z' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1706 - iwildmatch (via ls-files): no match 'foo/**z' 'foo/bba/arr'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'foo/bba/arr' 'foo/**z'
ok 1707 - pathmatch: no match 'foo/bba/arr' 'foo/**z'
expecting success:
>expect &&
git ls-files -z -- 'foo/**z' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1708 - pathmatch (via ls-files): no match 'foo/**z' 'foo/bba/arr'
expecting success:
test_must_fail test-tool wildmatch ipathmatch 'foo/bba/arr' 'foo/**z'
ok 1709 - ipathmatch: no match 'foo/bba/arr' 'foo/**z'
expecting success:
>expect &&
git --icase-pathspecs ls-files -z -- 'foo/**z' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1710 - ipathmatch (via ls-files): no match 'foo/**z' 'foo/bba/arr'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 1711 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1712 - setup match file test for foo/bar
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/bar' 'foo?bar'
ok 1713 - wildmatch: no match 'foo/bar' 'foo?bar'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'foo?bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1714 - wildmatch (via ls-files): no match 'foo?bar' 'foo/bar'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/bar' 'foo?bar'
ok 1715 - iwildmatch: no match 'foo/bar' 'foo?bar'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo?bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1716 - iwildmatch (via ls-files): no match 'foo?bar' 'foo/bar'
expecting success:
test-tool wildmatch pathmatch 'foo/bar' 'foo?bar'
ok 1717 - pathmatch: match 'foo/bar' 'foo?bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git ls-files -z -- 'foo?bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1718 - pathmatch (via ls-files): match 'foo?bar' 'foo/bar'
expecting success:
test-tool wildmatch ipathmatch 'foo/bar' 'foo?bar'
ok 1719 - ipathmatch: match 'foo/bar' 'foo?bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git --icase-pathspecs ls-files -z -- 'foo?bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1720 - ipathmatch (via ls-files): match 'foo?bar' 'foo/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 1721 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1722 - setup match file test for foo/bar
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/bar' 'foo[/]bar'
ok 1723 - wildmatch: no match 'foo/bar' 'foo[/]bar'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'foo[/]bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1724 - wildmatch (via ls-files): no match 'foo[/]bar' 'foo/bar'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/bar' 'foo[/]bar'
ok 1725 - iwildmatch: no match 'foo/bar' 'foo[/]bar'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo[/]bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1726 - iwildmatch (via ls-files): no match 'foo[/]bar' 'foo/bar'
expecting success:
test-tool wildmatch pathmatch 'foo/bar' 'foo[/]bar'
ok 1727 - pathmatch: match 'foo/bar' 'foo[/]bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git ls-files -z -- 'foo[/]bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1728 - pathmatch (via ls-files): match 'foo[/]bar' 'foo/bar'
expecting success:
test-tool wildmatch ipathmatch 'foo/bar' 'foo[/]bar'
ok 1729 - ipathmatch: match 'foo/bar' 'foo[/]bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git --icase-pathspecs ls-files -z -- 'foo[/]bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1730 - ipathmatch (via ls-files): match 'foo[/]bar' 'foo/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 1731 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1732 - setup match file test for foo/bar
expecting success:
test_must_fail test-tool wildmatch wildmatch 'foo/bar' 'foo[^a-z]bar'
ok 1733 - wildmatch: no match 'foo/bar' 'foo[^a-z]bar'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- 'foo[^a-z]bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1734 - wildmatch (via ls-files): no match 'foo[^a-z]bar' 'foo/bar'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'foo/bar' 'foo[^a-z]bar'
ok 1735 - iwildmatch: no match 'foo/bar' 'foo[^a-z]bar'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- 'foo[^a-z]bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1736 - iwildmatch (via ls-files): no match 'foo[^a-z]bar' 'foo/bar'
expecting success:
test-tool wildmatch pathmatch 'foo/bar' 'foo[^a-z]bar'
ok 1737 - pathmatch: match 'foo/bar' 'foo[^a-z]bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git ls-files -z -- 'foo[^a-z]bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1738 - pathmatch (via ls-files): match 'foo[^a-z]bar' 'foo/bar'
expecting success:
test-tool wildmatch ipathmatch 'foo/bar' 'foo[^a-z]bar'
ok 1739 - ipathmatch: match 'foo/bar' 'foo[^a-z]bar'
expecting success:
printf '%s' 'foo/bar' >expect &&
git --icase-pathspecs ls-files -z -- 'foo[^a-z]bar' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1740 - ipathmatch (via ls-files): match 'foo[^a-z]bar' 'foo/bar'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing foo/
ok 1741 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1742 - setup match file test for ab/cXd/efXg/hi
expecting success:
test_must_fail test-tool wildmatch wildmatch 'ab/cXd/efXg/hi' '*Xg*i'
ok 1743 - wildmatch: no match 'ab/cXd/efXg/hi' '*Xg*i'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '*Xg*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1744 - wildmatch (via ls-files): no match '*Xg*i' 'ab/cXd/efXg/hi'
expecting success:
test_must_fail test-tool wildmatch iwildmatch 'ab/cXd/efXg/hi' '*Xg*i'
ok 1745 - iwildmatch: no match 'ab/cXd/efXg/hi' '*Xg*i'
expecting success:
>expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '*Xg*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1746 - iwildmatch (via ls-files): no match '*Xg*i' 'ab/cXd/efXg/hi'
expecting success:
test-tool wildmatch pathmatch 'ab/cXd/efXg/hi' '*Xg*i'
ok 1747 - pathmatch: match 'ab/cXd/efXg/hi' '*Xg*i'
expecting success:
printf '%s' 'ab/cXd/efXg/hi' >expect &&
git ls-files -z -- '*Xg*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1748 - pathmatch (via ls-files): match '*Xg*i' 'ab/cXd/efXg/hi'
expecting success:
test-tool wildmatch ipathmatch 'ab/cXd/efXg/hi' '*Xg*i'
ok 1749 - ipathmatch: match 'ab/cXd/efXg/hi' '*Xg*i'
expecting success:
printf '%s' 'ab/cXd/efXg/hi' >expect &&
git --icase-pathspecs ls-files -z -- '*Xg*i' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1750 - ipathmatch (via ls-files): match '*Xg*i' 'ab/cXd/efXg/hi'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing ab/
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1751 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1752 - setup match file test for a
expecting success:
test_must_fail test-tool wildmatch wildmatch 'a' '[A-Z]'
ok 1753 - wildmatch: no match 'a' '[A-Z]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[A-Z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1754 - wildmatch (via ls-files): no match '[A-Z]' 'a'
expecting success:
test-tool wildmatch iwildmatch 'a' '[A-Z]'
ok 1755 - iwildmatch: match 'a' '[A-Z]'
expecting success:
printf '%s' 'a' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[A-Z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1756 - iwildmatch (via ls-files): match '[A-Z]' 'a'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'a' '[A-Z]'
ok 1757 - pathmatch: no match 'a' '[A-Z]'
expecting success:
>expect &&
git ls-files -z -- '[A-Z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1758 - pathmatch (via ls-files): no match '[A-Z]' 'a'
expecting success:
test-tool wildmatch ipathmatch 'a' '[A-Z]'
ok 1759 - ipathmatch: match 'a' '[A-Z]'
expecting success:
printf '%s' 'a' >expect &&
git --icase-pathspecs ls-files -z -- '[A-Z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1760 - ipathmatch (via ls-files): match '[A-Z]' 'a'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing a
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1761 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1762 - setup match file test for A
expecting success:
test-tool wildmatch wildmatch 'A' '[A-Z]'
ok 1763 - wildmatch: match 'A' '[A-Z]'
expecting success:
printf '%s' 'A' >expect &&
git --glob-pathspecs ls-files -z -- '[A-Z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1764 - wildmatch (via ls-files): match '[A-Z]' 'A'
expecting success:
test-tool wildmatch iwildmatch 'A' '[A-Z]'
ok 1765 - iwildmatch: match 'A' '[A-Z]'
expecting success:
printf '%s' 'A' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[A-Z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1766 - iwildmatch (via ls-files): match '[A-Z]' 'A'
expecting success:
test-tool wildmatch pathmatch 'A' '[A-Z]'
ok 1767 - pathmatch: match 'A' '[A-Z]'
expecting success:
printf '%s' 'A' >expect &&
git ls-files -z -- '[A-Z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1768 - pathmatch (via ls-files): match '[A-Z]' 'A'
expecting success:
test-tool wildmatch ipathmatch 'A' '[A-Z]'
ok 1769 - ipathmatch: match 'A' '[A-Z]'
expecting success:
printf '%s' 'A' >expect &&
git --icase-pathspecs ls-files -z -- '[A-Z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1770 - ipathmatch (via ls-files): match '[A-Z]' 'A'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing A
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1771 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1772 - setup match file test for A
expecting success:
test_must_fail test-tool wildmatch wildmatch 'A' '[a-z]'
ok 1773 - wildmatch: no match 'A' '[a-z]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[a-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1774 - wildmatch (via ls-files): no match '[a-z]' 'A'
expecting success:
test-tool wildmatch iwildmatch 'A' '[a-z]'
ok 1775 - iwildmatch: match 'A' '[a-z]'
expecting success:
printf '%s' 'A' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[a-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1776 - iwildmatch (via ls-files): match '[a-z]' 'A'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'A' '[a-z]'
ok 1777 - pathmatch: no match 'A' '[a-z]'
expecting success:
>expect &&
git ls-files -z -- '[a-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1778 - pathmatch (via ls-files): no match '[a-z]' 'A'
expecting success:
test-tool wildmatch ipathmatch 'A' '[a-z]'
ok 1779 - ipathmatch: match 'A' '[a-z]'
expecting success:
printf '%s' 'A' >expect &&
git --icase-pathspecs ls-files -z -- '[a-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1780 - ipathmatch (via ls-files): match '[a-z]' 'A'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing A
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1781 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1782 - setup match file test for a
expecting success:
test-tool wildmatch wildmatch 'a' '[a-z]'
ok 1783 - wildmatch: match 'a' '[a-z]'
expecting success:
printf '%s' 'a' >expect &&
git --glob-pathspecs ls-files -z -- '[a-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1784 - wildmatch (via ls-files): match '[a-z]' 'a'
expecting success:
test-tool wildmatch iwildmatch 'a' '[a-z]'
ok 1785 - iwildmatch: match 'a' '[a-z]'
expecting success:
printf '%s' 'a' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[a-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1786 - iwildmatch (via ls-files): match '[a-z]' 'a'
expecting success:
test-tool wildmatch pathmatch 'a' '[a-z]'
ok 1787 - pathmatch: match 'a' '[a-z]'
expecting success:
printf '%s' 'a' >expect &&
git ls-files -z -- '[a-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1788 - pathmatch (via ls-files): match '[a-z]' 'a'
expecting success:
test-tool wildmatch ipathmatch 'a' '[a-z]'
ok 1789 - ipathmatch: match 'a' '[a-z]'
expecting success:
printf '%s' 'a' >expect &&
git --icase-pathspecs ls-files -z -- '[a-z]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1790 - ipathmatch (via ls-files): match '[a-z]' 'a'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing a
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1791 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1792 - setup match file test for a
expecting success:
test_must_fail test-tool wildmatch wildmatch 'a' '[[:upper:]]'
ok 1793 - wildmatch: no match 'a' '[[:upper:]]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[[:upper:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1794 - wildmatch (via ls-files): no match '[[:upper:]]' 'a'
expecting success:
test-tool wildmatch iwildmatch 'a' '[[:upper:]]'
ok 1795 - iwildmatch: match 'a' '[[:upper:]]'
expecting success:
printf '%s' 'a' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[:upper:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1796 - iwildmatch (via ls-files): match '[[:upper:]]' 'a'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'a' '[[:upper:]]'
ok 1797 - pathmatch: no match 'a' '[[:upper:]]'
expecting success:
>expect &&
git ls-files -z -- '[[:upper:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1798 - pathmatch (via ls-files): no match '[[:upper:]]' 'a'
expecting success:
test-tool wildmatch ipathmatch 'a' '[[:upper:]]'
ok 1799 - ipathmatch: match 'a' '[[:upper:]]'
expecting success:
printf '%s' 'a' >expect &&
git --icase-pathspecs ls-files -z -- '[[:upper:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1800 - ipathmatch (via ls-files): match '[[:upper:]]' 'a'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing a
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1801 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1802 - setup match file test for A
expecting success:
test-tool wildmatch wildmatch 'A' '[[:upper:]]'
ok 1803 - wildmatch: match 'A' '[[:upper:]]'
expecting success:
printf '%s' 'A' >expect &&
git --glob-pathspecs ls-files -z -- '[[:upper:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1804 - wildmatch (via ls-files): match '[[:upper:]]' 'A'
expecting success:
test-tool wildmatch iwildmatch 'A' '[[:upper:]]'
ok 1805 - iwildmatch: match 'A' '[[:upper:]]'
expecting success:
printf '%s' 'A' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[:upper:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1806 - iwildmatch (via ls-files): match '[[:upper:]]' 'A'
expecting success:
test-tool wildmatch pathmatch 'A' '[[:upper:]]'
ok 1807 - pathmatch: match 'A' '[[:upper:]]'
expecting success:
printf '%s' 'A' >expect &&
git ls-files -z -- '[[:upper:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1808 - pathmatch (via ls-files): match '[[:upper:]]' 'A'
expecting success:
test-tool wildmatch ipathmatch 'A' '[[:upper:]]'
ok 1809 - ipathmatch: match 'A' '[[:upper:]]'
expecting success:
printf '%s' 'A' >expect &&
git --icase-pathspecs ls-files -z -- '[[:upper:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1810 - ipathmatch (via ls-files): match '[[:upper:]]' 'A'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing A
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1811 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1812 - setup match file test for A
expecting success:
test_must_fail test-tool wildmatch wildmatch 'A' '[[:lower:]]'
ok 1813 - wildmatch: no match 'A' '[[:lower:]]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[[:lower:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1814 - wildmatch (via ls-files): no match '[[:lower:]]' 'A'
expecting success:
test-tool wildmatch iwildmatch 'A' '[[:lower:]]'
ok 1815 - iwildmatch: match 'A' '[[:lower:]]'
expecting success:
printf '%s' 'A' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[:lower:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1816 - iwildmatch (via ls-files): match '[[:lower:]]' 'A'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'A' '[[:lower:]]'
ok 1817 - pathmatch: no match 'A' '[[:lower:]]'
expecting success:
>expect &&
git ls-files -z -- '[[:lower:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1818 - pathmatch (via ls-files): no match '[[:lower:]]' 'A'
expecting success:
test-tool wildmatch ipathmatch 'A' '[[:lower:]]'
ok 1819 - ipathmatch: match 'A' '[[:lower:]]'
expecting success:
printf '%s' 'A' >expect &&
git --icase-pathspecs ls-files -z -- '[[:lower:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1820 - ipathmatch (via ls-files): match '[[:lower:]]' 'A'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing A
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1821 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1822 - setup match file test for a
expecting success:
test-tool wildmatch wildmatch 'a' '[[:lower:]]'
ok 1823 - wildmatch: match 'a' '[[:lower:]]'
expecting success:
printf '%s' 'a' >expect &&
git --glob-pathspecs ls-files -z -- '[[:lower:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1824 - wildmatch (via ls-files): match '[[:lower:]]' 'a'
expecting success:
test-tool wildmatch iwildmatch 'a' '[[:lower:]]'
ok 1825 - iwildmatch: match 'a' '[[:lower:]]'
expecting success:
printf '%s' 'a' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[[:lower:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1826 - iwildmatch (via ls-files): match '[[:lower:]]' 'a'
expecting success:
test-tool wildmatch pathmatch 'a' '[[:lower:]]'
ok 1827 - pathmatch: match 'a' '[[:lower:]]'
expecting success:
printf '%s' 'a' >expect &&
git ls-files -z -- '[[:lower:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1828 - pathmatch (via ls-files): match '[[:lower:]]' 'a'
expecting success:
test-tool wildmatch ipathmatch 'a' '[[:lower:]]'
ok 1829 - ipathmatch: match 'a' '[[:lower:]]'
expecting success:
printf '%s' 'a' >expect &&
git --icase-pathspecs ls-files -z -- '[[:lower:]]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1830 - ipathmatch (via ls-files): match '[[:lower:]]' 'a'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing a
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1831 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1832 - setup match file test for A
expecting success:
test_must_fail test-tool wildmatch wildmatch 'A' '[B-Za]'
ok 1833 - wildmatch: no match 'A' '[B-Za]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[B-Za]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1834 - wildmatch (via ls-files): no match '[B-Za]' 'A'
expecting success:
test-tool wildmatch iwildmatch 'A' '[B-Za]'
ok 1835 - iwildmatch: match 'A' '[B-Za]'
expecting success:
printf '%s' 'A' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[B-Za]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1836 - iwildmatch (via ls-files): match '[B-Za]' 'A'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'A' '[B-Za]'
ok 1837 - pathmatch: no match 'A' '[B-Za]'
expecting success:
>expect &&
git ls-files -z -- '[B-Za]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1838 - pathmatch (via ls-files): no match '[B-Za]' 'A'
expecting success:
test-tool wildmatch ipathmatch 'A' '[B-Za]'
ok 1839 - ipathmatch: match 'A' '[B-Za]'
expecting success:
printf '%s' 'A' >expect &&
git --icase-pathspecs ls-files -z -- '[B-Za]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1840 - ipathmatch (via ls-files): match '[B-Za]' 'A'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing A
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1841 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1842 - setup match file test for a
expecting success:
test-tool wildmatch wildmatch 'a' '[B-Za]'
ok 1843 - wildmatch: match 'a' '[B-Za]'
expecting success:
printf '%s' 'a' >expect &&
git --glob-pathspecs ls-files -z -- '[B-Za]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1844 - wildmatch (via ls-files): match '[B-Za]' 'a'
expecting success:
test-tool wildmatch iwildmatch 'a' '[B-Za]'
ok 1845 - iwildmatch: match 'a' '[B-Za]'
expecting success:
printf '%s' 'a' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[B-Za]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1846 - iwildmatch (via ls-files): match '[B-Za]' 'a'
expecting success:
test-tool wildmatch pathmatch 'a' '[B-Za]'
ok 1847 - pathmatch: match 'a' '[B-Za]'
expecting success:
printf '%s' 'a' >expect &&
git ls-files -z -- '[B-Za]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1848 - pathmatch (via ls-files): match '[B-Za]' 'a'
expecting success:
test-tool wildmatch ipathmatch 'a' '[B-Za]'
ok 1849 - ipathmatch: match 'a' '[B-Za]'
expecting success:
printf '%s' 'a' >expect &&
git --icase-pathspecs ls-files -z -- '[B-Za]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1850 - ipathmatch (via ls-files): match '[B-Za]' 'a'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing a
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1851 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1852 - setup match file test for A
expecting success:
test_must_fail test-tool wildmatch wildmatch 'A' '[B-a]'
ok 1853 - wildmatch: no match 'A' '[B-a]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[B-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1854 - wildmatch (via ls-files): no match '[B-a]' 'A'
expecting success:
test-tool wildmatch iwildmatch 'A' '[B-a]'
ok 1855 - iwildmatch: match 'A' '[B-a]'
expecting success:
printf '%s' 'A' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[B-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1856 - iwildmatch (via ls-files): match '[B-a]' 'A'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'A' '[B-a]'
ok 1857 - pathmatch: no match 'A' '[B-a]'
expecting success:
>expect &&
git ls-files -z -- '[B-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1858 - pathmatch (via ls-files): no match '[B-a]' 'A'
expecting success:
test-tool wildmatch ipathmatch 'A' '[B-a]'
ok 1859 - ipathmatch: match 'A' '[B-a]'
expecting success:
printf '%s' 'A' >expect &&
git --icase-pathspecs ls-files -z -- '[B-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1860 - ipathmatch (via ls-files): match '[B-a]' 'A'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing A
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1861 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1862 - setup match file test for a
expecting success:
test-tool wildmatch wildmatch 'a' '[B-a]'
ok 1863 - wildmatch: match 'a' '[B-a]'
expecting success:
printf '%s' 'a' >expect &&
git --glob-pathspecs ls-files -z -- '[B-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1864 - wildmatch (via ls-files): match '[B-a]' 'a'
expecting success:
test-tool wildmatch iwildmatch 'a' '[B-a]'
ok 1865 - iwildmatch: match 'a' '[B-a]'
expecting success:
printf '%s' 'a' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[B-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1866 - iwildmatch (via ls-files): match '[B-a]' 'a'
expecting success:
test-tool wildmatch pathmatch 'a' '[B-a]'
ok 1867 - pathmatch: match 'a' '[B-a]'
expecting success:
printf '%s' 'a' >expect &&
git ls-files -z -- '[B-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1868 - pathmatch (via ls-files): match '[B-a]' 'a'
expecting success:
test-tool wildmatch ipathmatch 'a' '[B-a]'
ok 1869 - ipathmatch: match 'a' '[B-a]'
expecting success:
printf '%s' 'a' >expect &&
git --icase-pathspecs ls-files -z -- '[B-a]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1870 - ipathmatch (via ls-files): match '[B-a]' 'a'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing a
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
ok 1871 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1872 - setup match file test for z
expecting success:
test_must_fail test-tool wildmatch wildmatch 'z' '[Z-y]'
ok 1873 - wildmatch: no match 'z' '[Z-y]'
expecting success:
>expect &&
git --glob-pathspecs ls-files -z -- '[Z-y]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1874 - wildmatch (via ls-files): no match '[Z-y]' 'z'
expecting success:
test-tool wildmatch iwildmatch 'z' '[Z-y]'
ok 1875 - iwildmatch: match 'z' '[Z-y]'
expecting success:
printf '%s' 'z' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[Z-y]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1876 - iwildmatch (via ls-files): match '[Z-y]' 'z'
expecting success:
test_must_fail test-tool wildmatch pathmatch 'z' '[Z-y]'
ok 1877 - pathmatch: no match 'z' '[Z-y]'
expecting success:
>expect &&
git ls-files -z -- '[Z-y]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1878 - pathmatch (via ls-files): no match '[Z-y]' 'z'
expecting success:
test-tool wildmatch ipathmatch 'z' '[Z-y]'
ok 1879 - ipathmatch: match 'z' '[Z-y]'
expecting success:
printf '%s' 'z' >expect &&
git --icase-pathspecs ls-files -z -- '[Z-y]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1880 - ipathmatch (via ls-files): match '[Z-y]' 'z'
expecting success:
if test -e .git/created_test_file
then
git reset &&
git clean -df
fi
Removing actual
Removing actual.err
Removing actual.raw
Removing expect
Removing z
ok 1881 - cleanup after previous file test
expecting success:
file=$(cat .git/expected_test_file) &&
if should_create_test_file "$file"
then
dirs=${file%/*}
if test "$file" != "$dirs"
then
mkdir -p -- "$dirs" &&
touch -- "./$text"
else
touch -- "./$file"
fi &&
git add -A &&
printf "%s" "$file" >.git/created_test_file
elif test -e .git/created_test_file
then
rm .git/created_test_file
fi
ok 1882 - setup match file test for Z
expecting success:
test-tool wildmatch wildmatch 'Z' '[Z-y]'
ok 1883 - wildmatch: match 'Z' '[Z-y]'
expecting success:
printf '%s' 'Z' >expect &&
git --glob-pathspecs ls-files -z -- '[Z-y]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1884 - wildmatch (via ls-files): match '[Z-y]' 'Z'
expecting success:
test-tool wildmatch iwildmatch 'Z' '[Z-y]'
ok 1885 - iwildmatch: match 'Z' '[Z-y]'
expecting success:
printf '%s' 'Z' >expect &&
git --glob-pathspecs --icase-pathspecs ls-files -z -- '[Z-y]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1886 - iwildmatch (via ls-files): match '[Z-y]' 'Z'
expecting success:
test-tool wildmatch pathmatch 'Z' '[Z-y]'
ok 1887 - pathmatch: match 'Z' '[Z-y]'
expecting success:
printf '%s' 'Z' >expect &&
git ls-files -z -- '[Z-y]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1888 - pathmatch (via ls-files): match '[Z-y]' 'Z'
expecting success:
test-tool wildmatch ipathmatch 'Z' '[Z-y]'
ok 1889 - ipathmatch: match 'Z' '[Z-y]'
expecting success:
printf '%s' 'Z' >expect &&
git --icase-pathspecs ls-files -z -- '[Z-y]' >actual.raw 2>actual.err &&
tr -d '\0' <actual.raw >actual &&
test_must_be_empty actual.err &&
test_cmp expect actual
ok 1890 - ipathmatch (via ls-files): match '[Z-y]' 'Z'
# still have 40 known breakage(s)
# passed all remaining 1850 test(s)
1..1890
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3413-rebase-hook.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3413-rebase-hook/.git/
expecting success:
echo hello >file &&
git add file &&
test_tick &&
git commit -m initial &&
echo goodbye >file &&
git add file &&
test_tick &&
git commit -m second &&
git checkout -b side HEAD^ &&
echo world >git &&
git add git &&
test_tick &&
git commit -m side &&
git checkout master &&
git log --pretty=oneline --abbrev-commit --graph --all &&
git branch test side
[master (root-commit) 6637599] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 20a11a4] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'side'
[side c847452] side
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 git
Switched to branch 'master'
* c847452 side
| * 20a11a4 second
|/
* 6637599 initial
ok 1 - setup
expecting success:
git checkout test &&
git reset --hard side &&
git rebase master &&
test "z$(cat git)" = zworld
Switched to branch 'test'
HEAD is now at c847452 side
First, rewinding head to replay your work on top of it...
Applying: side
ok 2 - rebase
expecting success:
git checkout test &&
git reset --hard side &&
EDITOR=true git rebase -i master &&
test "z$(cat git)" = zworld
Already on 'test'
HEAD is now at c847452 side
Rebasing (1/1)
Successfully rebased and updated refs/heads/test.
ok 3 - rebase -i
expecting success:
mkdir -p .git/hooks &&
cat >.git/hooks/pre-rebase <<EOF &&
#!$SHELL_PATH
echo "\$1,\$2" >.git/PRE-REBASE-INPUT
EOF
chmod +x .git/hooks/pre-rebase
ok 4 - setup pre-rebase hook
expecting success:
git checkout test &&
git reset --hard side &&
git rebase master &&
test "z$(cat git)" = zworld &&
test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,
Already on 'test'
HEAD is now at c847452 side
First, rewinding head to replay your work on top of it...
Applying: side
ok 5 - pre-rebase hook gets correct input (1)
expecting success:
git checkout test &&
git reset --hard side &&
git rebase master test &&
test "z$(cat git)" = zworld &&
test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,test
Already on 'test'
HEAD is now at c847452 side
First, rewinding head to replay your work on top of it...
Applying: side
ok 6 - pre-rebase hook gets correct input (2)
expecting success:
git checkout test &&
git reset --hard side &&
git checkout master &&
git rebase master test &&
test "z$(cat git)" = zworld &&
test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,test
Already on 'test'
HEAD is now at c847452 side
Switched to branch 'master'
First, rewinding head to replay your work on top of it...
Applying: side
ok 7 - pre-rebase hook gets correct input (3)
expecting success:
git checkout test &&
git reset --hard side &&
EDITOR=true git rebase -i master &&
test "z$(cat git)" = zworld &&
test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,
Already on 'test'
HEAD is now at c847452 side
Rebasing (1/1)
Successfully rebased and updated refs/heads/test.
ok 8 - pre-rebase hook gets correct input (4)
expecting success:
git checkout test &&
git reset --hard side &&
EDITOR=true git rebase -i master test &&
test "z$(cat git)" = zworld &&
test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,test
Already on 'test'
HEAD is now at c847452 side
Rebasing (1/1)
Successfully rebased and updated refs/heads/test.
ok 9 - pre-rebase hook gets correct input (5)
expecting success:
git checkout test &&
git reset --hard side &&
git checkout master &&
EDITOR=true git rebase -i master test &&
test "z$(cat git)" = zworld &&
test "z$(cat .git/PRE-REBASE-INPUT)" = zmaster,test
Already on 'test'
HEAD is now at c847452 side
Switched to branch 'master'
Rebasing (1/1)
Successfully rebased and updated refs/heads/test.
ok 10 - pre-rebase hook gets correct input (6)
expecting success:
mkdir -p .git/hooks &&
cat >.git/hooks/pre-rebase <<EOF &&
#!$SHELL_PATH
false
EOF
chmod +x .git/hooks/pre-rebase
ok 11 - setup pre-rebase hook that fails
expecting success:
git checkout test &&
git reset --hard side &&
test_must_fail git rebase master &&
test "z$(git symbolic-ref HEAD)" = zrefs/heads/test &&
test 0 = $(git rev-list HEAD...side | wc -l)
Already on 'test'
HEAD is now at c847452 side
fatal: The pre-rebase hook refused to rebase.
ok 12 - pre-rebase hook stops rebase (1)
expecting success:
git checkout test &&
git reset --hard side &&
test_must_fail env EDITOR=: git rebase -i master &&
test "z$(git symbolic-ref HEAD)" = zrefs/heads/test &&
test 0 = $(git rev-list HEAD...side | wc -l)
Already on 'test'
HEAD is now at c847452 side
fatal: The pre-rebase hook refused to rebase.
ok 13 - pre-rebase hook stops rebase (2)
expecting success:
git checkout test &&
git reset --hard side &&
git rebase --no-verify master &&
test "z$(git symbolic-ref HEAD)" = zrefs/heads/test &&
test "z$(cat git)" = zworld
Already on 'test'
HEAD is now at c847452 side
First, rewinding head to replay your work on top of it...
Applying: side
ok 14 - rebase --no-verify overrides pre-rebase (1)
expecting success:
git checkout test &&
git reset --hard side &&
EDITOR=true git rebase --no-verify -i master &&
test "z$(git symbolic-ref HEAD)" = zrefs/heads/test &&
test "z$(cat git)" = zworld
Already on 'test'
HEAD is now at c847452 side
Rebasing (1/1)
Successfully rebased and updated refs/heads/test.
ok 15 - rebase --no-verify overrides pre-rebase (2)
# passed all 15 test(s)
1..15
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3412-rebase-root.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3412-rebase-root/.git/
expecting success:
test_commit 1 A &&
test_commit 2 A &&
git symbolic-ref HEAD refs/heads/other &&
rm .git/index &&
test_commit 3 B &&
test_commit 1b A 1 &&
test_commit 4 B
[master (root-commit) c746ea0] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A
[master 46611ad] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[other (root-commit) 2c64091] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B
[other 1c4476a] 1b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A
[other 41e7797] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - prepare repository
expecting success:
git checkout -B fail other &&
test_must_fail git rebase --onto master --root fail fail
Switched to a new branch 'fail'
usage: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>]
or: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]
or: git rebase --continue | --abort | --skip | --edit-todo
--onto <revision> rebase onto given branch instead of upstream
--no-verify allow pre-rebase hook to run
-q, --quiet be quiet. implies --no-stat
-v, --verbose display a diffstat of what changed upstream
-n, --no-stat do not show diffstat of what changed upstream
--signoff add a Signed-off-by: line to each commit
--ignore-whitespace passed to 'git am'
--committer-date-is-author-date
passed to 'git am'
--ignore-date passed to 'git am'
-C <n> passed to 'git apply'
--whitespace <action>
passed to 'git apply'
-f, --force-rebase cherry-pick all commits, even if unchanged
--no-ff cherry-pick all commits, even if unchanged
--continue continue
--skip skip current patch and continue
--abort abort and check out the original branch
--quit abort but keep HEAD where it is
--edit-todo edit the todo list during an interactive rebase
--show-current-patch show the patch file being applied or merged
-m, --merge use merging strategies to rebase
-i, --interactive let the user edit the list of commits to rebase
-p, --preserve-merges
(DEPRECATED) try to recreate merges instead of ignoring them
--rerere-autoupdate update the index with reused conflict resolution if possible
-k, --keep-empty preserve empty commits during rebase
--autosquash move commits that begin with squash!/fixup! under -i
-S, --gpg-sign[=<key-id>]
GPG-sign commits
--autostash automatically stash/stash pop before and after
-x, --exec <exec> add exec lines after each commit of the editable list
--allow-empty-message
allow rebasing commits with empty messages
-r, --rebase-merges[=<mode>]
try to rebase merges instead of skipping them
--fork-point use 'merge-base --fork-point' to refine upstream
-s, --strategy <strategy>
use the given merge strategy
-X, --strategy-option <option>
pass the argument through to the merge strategy
--root rebase all reachable commits up to the root(s)
--reschedule-failed-exec
automatically re-schedule any `exec` that fails
ok 2 - rebase --root fails with too many args
expecting success:
mkdir -p .git/hooks &&
cat >.git/hooks/pre-rebase <<EOF &&
#!$SHELL_PATH
echo "\$1,\$2" >.git/PRE-REBASE-INPUT
EOF
chmod +x .git/hooks/pre-rebase
ok 3 - setup pre-rebase hook
expecting success:
git checkout -b work other &&
git rebase --root --onto master &&
git log --pretty=tformat:"%s" > rebased &&
test_cmp expect rebased
Switched to a new branch 'work'
First, rewinding head to replay your work on top of it...
Applying: 3
Applying: 4
ok 4 - rebase --root --onto <newbase>
expecting success:
test "z$(cat .git/PRE-REBASE-INPUT)" = z--root,
ok 5 - pre-rebase got correct input (1)
expecting success:
git branch work2 other &&
git rebase --root --onto master work2 &&
git log --pretty=tformat:"%s" > rebased2 &&
test_cmp expect rebased2
First, rewinding head to replay your work on top of it...
Applying: 3
Applying: 4
ok 6 - rebase --root --onto <newbase> <branch>
expecting success:
test "z$(cat .git/PRE-REBASE-INPUT)" = z--root,work2
ok 7 - pre-rebase got correct input (2)
expecting success:
git checkout -b work3 other &&
git rebase -i --root --onto master &&
git log --pretty=tformat:"%s" > rebased3 &&
test_cmp expect rebased3
Switched to a new branch 'work3'
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/work3.
ok 8 - rebase -i --root --onto <newbase>
expecting success:
test "z$(cat .git/PRE-REBASE-INPUT)" = z--root,
ok 9 - pre-rebase got correct input (3)
expecting success:
git branch work4 other &&
git rebase -i --root --onto master work4 &&
git log --pretty=tformat:"%s" > rebased4 &&
test_cmp expect rebased4
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/work4.
ok 10 - rebase -i --root --onto <newbase> <branch>
expecting success:
test "z$(cat .git/PRE-REBASE-INPUT)" = z--root,work4
ok 11 - pre-rebase got correct input (4)
checking prerequisite: REBASE_P
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test -z "$GIT_TEST_SKIP_REBASE_P"
)
prerequisite REBASE_P ok
expecting success:
git checkout -b work5 other &&
git rebase -i -p --root --onto master &&
git log --pretty=tformat:"%s" > rebased5 &&
test_cmp expect rebased5
Switched to a new branch 'work5'
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/work5.
ok 12 - rebase -i -p with linear history
expecting success:
test "z$(cat .git/PRE-REBASE-INPUT)" = z--root,
ok 13 - pre-rebase got correct input (5)
expecting success:
git checkout other^ &&
git checkout -b side &&
test_commit 5 C &&
git checkout other &&
git merge side
Note: switching to 'other^'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 1c4476a 1b
Switched to a new branch 'side'
[side 0c9a4e9] 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C
Switched to branch 'other'
Merging:
41e7797 4
virtual side
found 1 common ancestor:
1c4476a 1b
Merge made by the 'recursive' strategy.
C | 1 +
1 file changed, 1 insertion(+)
create mode 100644 C
ok 14 - set up merge history
expecting success:
git checkout -b work6 other &&
git rebase -i -p --root --onto master &&
log_with_names work6 > rebased6 &&
test_cmp expect-side rebased6
Switched to a new branch 'work6'
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/4)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated refs/heads/work6.
ok 15 - rebase -i -p with merge
expecting success:
git symbolic-ref HEAD refs/heads/third &&
rm .git/index &&
rm A B C &&
test_commit 6 D &&
git checkout other &&
git merge --allow-unrelated-histories third
[third (root-commit) 00ac2af] 6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D
Switched to branch 'other'
Merging:
ddb0186 Merge branch 'side' into other
virtual third
found 0 common ancestors:
Merge made by the 'recursive' strategy.
D | 1 +
1 file changed, 1 insertion(+)
create mode 100644 D
ok 16 - set up second root and merge
expecting success:
git checkout -b work7 other &&
git rebase -i -p --root --onto master &&
log_with_names work7 > rebased7 &&
test_cmp expect-third rebased7
Switched to a new branch 'work7'
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/6)
Rebasing (2/6)
Rebasing (3/6)
Rebasing (4/6)
Rebasing (5/6)
Rebasing (6/6)
Successfully rebased and updated refs/heads/work7.
ok 17 - rebase -i -p with two roots
expecting success:
mkdir -p .git/hooks &&
cat >.git/hooks/pre-rebase <<EOF &&
#!$SHELL_PATH
false
EOF
chmod +x .git/hooks/pre-rebase
ok 18 - setup pre-rebase hook that fails
expecting success:
git checkout -b stops1 other &&
test_must_fail git rebase --root --onto master &&
test "z$(git symbolic-ref HEAD)" = zrefs/heads/stops1 &&
test 0 = $(git rev-list other...stops1 | wc -l)
Switched to a new branch 'stops1'
fatal: The pre-rebase hook refused to rebase.
ok 19 - pre-rebase hook stops rebase
expecting success:
git checkout -b stops2 other &&
test_must_fail git rebase --root --onto master &&
test "z$(git symbolic-ref HEAD)" = zrefs/heads/stops2 &&
test 0 = $(git rev-list other...stops2 | wc -l)
Switched to a new branch 'stops2'
fatal: The pre-rebase hook refused to rebase.
ok 20 - pre-rebase hook stops rebase -i
expecting success:
rm -f .git/hooks/pre-rebase
ok 21 - remove pre-rebase hook
expecting success:
git checkout master &&
echo conflict > B &&
git add B &&
git commit -m conflict
Switched to branch 'master'
[master f80eebe] conflict
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B
ok 22 - set up a conflict
expecting success:
git checkout -b conflict1 other &&
test_must_fail git rebase --root --onto master &&
git ls-files -u | grep "B$"
Switched to a new branch 'conflict1'
First, rewinding head to replay your work on top of it...
Applying: 3
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
f80eebe conflict
virtual 3
found 1 common ancestor:
virtual 4b825dc642cb6eb9a060e54bf8d69288fbee4904
CONFLICT (add/add): Merge conflict in B
Auto-merging B
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 3
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
100644 9b1719f5cf069568785080a0bbabbe7c377e22ae 2 B
100644 00750edc07d6415dcc07ae0351e9397b0222b7ba 3 B
ok 23 - rebase --root with conflict (first part)
expecting success:
echo 3 > B &&
git add B
ok 24 - fix the conflict
expecting success:
git rebase --continue &&
git log --pretty=tformat:"%s" > conflict1 &&
test_cmp expect-conflict conflict1
Applying: 3
Applying: 4
Applying: 5
Applying: 6
ok 25 - rebase --root with conflict (second part)
expecting success:
git checkout -b conflict2 other &&
test_must_fail git rebase -i --root --onto master &&
git ls-files -u | grep "B$"
Switched to a new branch 'conflict2'
Rebasing (1/4)
CONFLICT (add/add): Merge conflict in B
Auto-merging B
error: could not apply 2c64091... 3
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 2c64091... 3
100644 9b1719f5cf069568785080a0bbabbe7c377e22ae 2 B
100644 00750edc07d6415dcc07ae0351e9397b0222b7ba 3 B
ok 26 - rebase -i --root with conflict (first part)
expecting success:
echo 3 > B &&
git add B
ok 27 - fix the conflict
expecting success:
git rebase --continue &&
git log --pretty=tformat:"%s" > conflict2 &&
test_cmp expect-conflict conflict2
[detached HEAD 308ae33] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated refs/heads/conflict2.
ok 28 - rebase -i --root with conflict (second part)
expecting success:
git checkout -b conflict3 other &&
test_must_fail git rebase -i -p --root --onto master &&
git ls-files -u | grep "B$"
Switched to a new branch 'conflict3'
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/6)
CONFLICT (add/add): Merge conflict in B
Auto-merging B
error: could not apply 2c64091... 3
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not pick 2c64091600777cfca4ad9dca6ec274f5a2554d69
100644 9b1719f5cf069568785080a0bbabbe7c377e22ae 2 B
100644 00750edc07d6415dcc07ae0351e9397b0222b7ba 3 B
ok 29 - rebase -i -p --root with conflict (first part)
expecting success:
echo 3 > B &&
git add B
ok 30 - fix the conflict
expecting success:
git rebase --continue &&
log_with_names conflict3 >out &&
test_cmp expect-conflict-p out
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
[detached HEAD 308ae33] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/6)
Rebasing (3/6)
Rebasing (4/6)
Rebasing (5/6)
Rebasing (6/6)
Successfully rebased and updated refs/heads/conflict3.
ok 31 - rebase -i -p --root with conflict (second part)
# passed all 31 test(s)
1..31
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3415-rebase-autosquash.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3415-rebase-autosquash/.git/
expecting success:
echo 0 >file0 &&
git add . &&
test_tick &&
git commit -m "initial commit" &&
echo 0 >file1 &&
echo 2 >file2 &&
git add . &&
test_tick &&
git commit -m "first commit" &&
git tag first-commit &&
echo 3 >file3 &&
git add . &&
test_tick &&
git commit -m "second commit" &&
git tag base
[master (root-commit) d78c915] initial commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file0
[master 244a0fe] first commit
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 file1
create mode 100644 file2
[master f0c2a7e] second commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
ok 1 - setup
expecting success:
test_auto_fixup final-fixup-option --autosquash
HEAD is now at f0c2a7e second commit
[master e17f730] fixup! first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated refs/heads/master.
ok 2 - auto fixup (option)
expecting success:
git config rebase.autosquash true &&
test_auto_fixup final-fixup-config-true &&
test_must_fail test_auto_fixup fixup-config-true-no --no-autosquash &&
git config rebase.autosquash false &&
test_must_fail test_auto_fixup final-fixup-config-false
HEAD is now at f0c2a7e second commit
[master f84b6d6] fixup! first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated refs/heads/master.
HEAD is now at f0c2a7e second commit
[master 03041cb] fixup! first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/master.
test_line_count: line count for actual != 3
03041cb fixup! first
f0c2a7e second commit
244a0fe first commit
d78c915 initial commit
HEAD is now at f0c2a7e second commit
[master bee11d3] fixup! first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/master.
test_line_count: line count for actual != 3
bee11d3 fixup! first
f0c2a7e second commit
244a0fe first commit
d78c915 initial commit
ok 3 - auto fixup (config)
expecting success:
test_auto_squash final-squash --autosquash
HEAD is now at f0c2a7e second commit
[master 19ce186] squash! first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/3)
[detached HEAD 9064ef2] first commit
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
2 files changed, 2 insertions(+)
create mode 100644 file1
create mode 100644 file2
Rebasing (3/3)
Successfully rebased and updated refs/heads/master.
ok 4 - auto squash (option)
expecting success:
git config rebase.autosquash true &&
test_auto_squash final-squash-config-true &&
test_must_fail test_auto_squash squash-config-true-no --no-autosquash &&
git config rebase.autosquash false &&
test_must_fail test_auto_squash final-squash-config-false
HEAD is now at f0c2a7e second commit
[master a95a906] squash! first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/3)
[detached HEAD 46676fa] first commit
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
2 files changed, 2 insertions(+)
create mode 100644 file1
create mode 100644 file2
Rebasing (3/3)
Successfully rebased and updated refs/heads/master.
HEAD is now at f0c2a7e second commit
[master fc8ff6e] squash! first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/master.
test_line_count: line count for actual != 3
fc8ff6e squash! first
f0c2a7e second commit
244a0fe first commit
d78c915 initial commit
HEAD is now at f0c2a7e second commit
[master 336ee2b] squash! first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/master.
test_line_count: line count for actual != 3
336ee2b squash! first
f0c2a7e second commit
244a0fe first commit
d78c915 initial commit
ok 5 - auto squash (config)
expecting success:
git reset --hard base &&
echo 1 >file1 &&
git add -u &&
test_tick &&
git commit -m "squash! forst" &&
git tag final-missquash &&
test_tick &&
git rebase --autosquash -i HEAD^^^ &&
git log --oneline >actual &&
test_line_count = 4 actual &&
git diff --exit-code final-missquash &&
test 0 = $(git rev-list final-missquash...HEAD | wc -l)
HEAD is now at f0c2a7e second commit
[master bdc406a] squash! forst
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/master.
ok 6 - misspelled auto squash
expecting success:
git reset --hard base &&
echo 4 >file4 &&
git add file4 &&
test_tick &&
git commit -m "first new commit" &&
echo 1 >file1 &&
git add -u &&
test_tick &&
git commit -m "squash! first" &&
git tag final-multisquash &&
test_tick &&
git rebase --autosquash -i HEAD~4 &&
git log --oneline >actual &&
test_line_count = 4 actual &&
git diff --exit-code final-multisquash &&
test 1 = "$(git cat-file blob HEAD^^:file1)" &&
test 2 = $(git cat-file commit HEAD^^ | grep first | wc -l) &&
test 1 = $(git cat-file commit HEAD | grep first | wc -l)
HEAD is now at f0c2a7e second commit
[master 671d0de] first new commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file4
[master 1cded01] squash! first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/4)
[detached HEAD 8cc2a0e] first commit
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
2 files changed, 2 insertions(+)
create mode 100644 file1
create mode 100644 file2
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated refs/heads/master.
ok 7 - auto squash that matches 2 commits
expecting success:
git reset --hard base &&
echo 1 >file1 &&
git add -u &&
test_tick &&
git commit -m "squash! third" &&
echo 4 >file4 &&
git add file4 &&
test_tick &&
git commit -m "third commit" &&
git tag final-presquash &&
test_tick &&
git rebase --autosquash -i HEAD~4 &&
git log --oneline >actual &&
test_line_count = 5 actual &&
git diff --exit-code final-presquash &&
test 0 = "$(git cat-file blob HEAD^^:file1)" &&
test 1 = "$(git cat-file blob HEAD^:file1)" &&
test 1 = $(git cat-file commit HEAD | grep third | wc -l) &&
test 1 = $(git cat-file commit HEAD^ | grep third | wc -l)
HEAD is now at f0c2a7e second commit
[master 3a205cd] squash! third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 76ae28b] third commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file4
Successfully rebased and updated refs/heads/master.
ok 8 - auto squash that matches a commit after the squash
expecting success:
git reset --hard base &&
echo 1 >file1 &&
git add -u &&
test_tick &&
git commit -m "squash! $(git rev-parse --short HEAD^)" &&
git tag final-shasquash &&
test_tick &&
git rebase --autosquash -i HEAD^^^ &&
git log --oneline >actual &&
test_line_count = 3 actual &&
git diff --exit-code final-shasquash &&
test 1 = "$(git cat-file blob HEAD^:file1)" &&
test 1 = $(git cat-file commit HEAD^ | grep squash | wc -l)
HEAD is now at f0c2a7e second commit
[master 2592f98] squash! 244a0fe
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/3)
[detached HEAD ba6c8cf] first commit
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
2 files changed, 2 insertions(+)
create mode 100644 file1
create mode 100644 file2
Rebasing (3/3)
Successfully rebased and updated refs/heads/master.
ok 9 - auto squash that matches a sha1
expecting success:
git reset --hard base &&
echo 1 >file1 &&
git add -u &&
test_tick &&
git commit -m "squash! $(git rev-parse --short=11 HEAD^)" &&
git tag final-longshasquash &&
test_tick &&
git rebase --autosquash -i HEAD^^^ &&
git log --oneline >actual &&
test_line_count = 3 actual &&
git diff --exit-code final-longshasquash &&
test 1 = "$(git cat-file blob HEAD^:file1)" &&
test 1 = $(git cat-file commit HEAD^ | grep squash | wc -l)
HEAD is now at f0c2a7e second commit
[master 358ddef] squash! 244a0fe611d
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/3)
[detached HEAD 2fb404b] first commit
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
2 files changed, 2 insertions(+)
create mode 100644 file1
create mode 100644 file2
Rebasing (3/3)
Successfully rebased and updated refs/heads/master.
ok 10 - auto squash that matches longer sha1
expecting success:
test_auto_commit_flags fixup 1
HEAD is now at f0c2a7e second commit
[master ec3ac31] fixup! first commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated refs/heads/master.
ok 11 - use commit --fixup
expecting success:
test_auto_commit_flags squash 2
HEAD is now at f0c2a7e second commit
[master 56a0d48] squash! first commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/3)
[detached HEAD ca39a78] first commit
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
2 files changed, 2 insertions(+)
create mode 100644 file1
create mode 100644 file2
Rebasing (3/3)
Successfully rebased and updated refs/heads/master.
ok 12 - use commit --squash
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
expecting success:
test_auto_fixup_fixup fixup fixup
HEAD is now at f0c2a7e second commit
[master f2259fa] fixup! first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master a8ab281] fixup! fixup! first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
error: There was a problem with the editor '"$FAKE_EDITOR"'.
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated refs/heads/master.
ok 13 - fixup! fixup!
expecting success:
test_auto_fixup_fixup fixup squash
HEAD is now at f0c2a7e second commit
[master a1ad567] fixup! first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master ec0f8ee] fixup! squash! first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
error: There was a problem with the editor '"$FAKE_EDITOR"'.
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated refs/heads/master.
ok 14 - fixup! squash!
expecting success:
test_auto_fixup_fixup squash squash
HEAD is now at f0c2a7e second commit
[master b3c0532] squash! first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 90b2119] squash! squash! first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
error: There was a problem with the editor '"$FAKE_EDITOR"'.
Rebasing (2/4)
Rebasing (3/4)
[detached HEAD 0c6388e] first commit
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
2 files changed, 2 insertions(+)
create mode 100644 file1
create mode 100644 file2
Rebasing (4/4)
Successfully rebased and updated refs/heads/master.
ok 15 - squash! squash!
expecting success:
test_auto_fixup_fixup squash fixup
HEAD is now at f0c2a7e second commit
[master 9e62506] squash! first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master baa3050] squash! fixup! first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
error: There was a problem with the editor '"$FAKE_EDITOR"'.
Rebasing (2/4)
Rebasing (3/4)
[detached HEAD f53dd90] first commit
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
2 files changed, 2 insertions(+)
create mode 100644 file1
create mode 100644 file2
Rebasing (4/4)
Successfully rebased and updated refs/heads/master.
ok 16 - squash! fixup!
expecting success:
git reset --hard base &&
git config --add rebase.instructionFormat "[%an @ %ar] %s" &&
echo 2 >file1 &&
git add -u &&
test_tick &&
git commit -m "squash! $(git rev-parse --short HEAD^)" &&
echo 1 >file1 &&
git add -u &&
test_tick &&
git commit -m "squash! $(git log -n 1 --format=%s HEAD~2)" &&
git tag final-squash-instFmt &&
test_tick &&
git rebase --autosquash -i HEAD~4 &&
git log --oneline >actual &&
test_line_count = 3 actual &&
git diff --exit-code final-squash-instFmt &&
test 1 = "$(git cat-file blob HEAD^:file1)" &&
test 2 = $(git cat-file commit HEAD^ | grep squash | wc -l)
HEAD is now at f0c2a7e second commit
[master 8c2a608] squash! 244a0fe
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master ab98abd] squash! first commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/4)
Rebasing (3/4)
[detached HEAD a066413] first commit
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
2 files changed, 2 insertions(+)
create mode 100644 file1
create mode 100644 file2
Rebasing (4/4)
Successfully rebased and updated refs/heads/master.
ok 17 - autosquash with custom inst format
expecting success:
git reset --hard base &&
test_commit empty-instructionFormat-test &&
(
set_cat_todo_editor &&
test_must_fail git -c rebase.instructionFormat= \
rebase --autosquash --force-rebase -i HEAD^ >actual &&
git log -1 --format="pick %h %s" >expect &&
test_cmp expect actual
)
HEAD is now at f0c2a7e second commit
[master c73d304] empty-instructionFormat-test
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 empty-instructionFormat-test.t
error: There was a problem with the editor '"$FAKE_EDITOR"'.
ok 18 - autosquash with empty custom instructionFormat
expecting success:
test_tick &&
git commit --allow-empty -m "empty" &&
test_tick &&
git commit --allow-empty -m "empty2" &&
test_tick &&
>fixup &&
git add fixup &&
git commit --fixup HEAD^^ &&
(
set_backup_editor &&
GIT_USE_REBASE_HELPER=false \
git rebase -i --force-rebase --autosquash HEAD~4 &&
grep empty2 .git/backup-git-rebase-todo
)
[master f0b00cc] empty
Author: A U Thor <author@example.com>
[master 57d336e] empty2
Author: A U Thor <author@example.com>
[master 214c1c2] fixup! empty-instructionFormat-test
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 fixup
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/master.
# pick 57d336ec506cd26f9ae698f8800eb63788ef86fe [A U Thor @ 14 years ago] empty2
ok 19 - autosquash with multiple empty patches
expecting success:
base=$(git rev-parse HEAD) &&
test_commit to-fixup &&
git commit --allow-empty -m "fixup! to-fixup" &&
git rebase -i --autosquash --keep-empty HEAD~2 &&
parent=$(git rev-parse HEAD^) &&
test $base = $parent
[master e70b585] to-fixup
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 to-fixup.t
[master 0b5a07e] fixup! to-fixup
Author: A U Thor <author@example.com>
Rebasing (2/2)
Successfully rebased and updated refs/heads/master.
ok 20 - extra spaces after fixup!
expecting success:
if test -d .git/rebase-merge; then git rebase --abort; fi &&
base=$(git rev-parse HEAD) &&
echo "wrapped subject" >wrapped &&
git add wrapped &&
test_tick &&
git commit --allow-empty -m "$(printf "To\nfixup")" &&
test_tick &&
git commit --allow-empty -m "fixup! To fixup" &&
git rebase -i --autosquash --keep-empty HEAD~2 &&
parent=$(git rev-parse HEAD^) &&
test $base = $parent
[master 8785f39] To fixup
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 wrapped
[master c4fe568] fixup! To fixup
Author: A U Thor <author@example.com>
Rebasing (2/2)
Successfully rebased and updated refs/heads/master.
ok 21 - wrapped original subject
expecting success:
test_when_finished "test_might_fail git rebase --abort" &&
test_when_finished "git checkout master" &&
git checkout -b some-squashes &&
git commit --allow-empty -m first &&
git commit --allow-empty --squash HEAD &&
git commit --allow-empty -m second &&
git commit --allow-empty --squash HEAD &&
test_must_fail git -c core.editor="grep -q ^pick" \
rebase -ki --autosquash HEAD~4 &&
: do not finish the squash, but resolve it manually &&
git commit --allow-empty --amend -m edited-first &&
git rebase --skip &&
git show >actual &&
! grep first actual
Switched to a new branch 'some-squashes'
[some-squashes ceaf0dc] first
Author: A U Thor <author@example.com>
[some-squashes fd6f13b] squash! first
Author: A U Thor <author@example.com>
[some-squashes 66b5018] second
Author: A U Thor <author@example.com>
[some-squashes 10808aa] squash! second
Author: A U Thor <author@example.com>
Rebasing (2/4)
error: There was a problem with the editor 'grep -q ^pick'.
Please supply the message using either -m or -F option.
Could not apply fd6f13b... [A U Thor @ 14 years ago] squash! first
[detached HEAD 4808a4c] edited-first
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:09:13 2005 -0700
Rebasing (3/4)
Rebasing (4/4)
[detached HEAD 3e50d0a] second
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:09:13 2005 -0700
Successfully rebased and updated refs/heads/some-squashes.
Switched to branch 'master'
fatal: No rebase in progress?
ok 22 - abort last squash
# passed all 22 test(s)
1..22
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3414-rebase-preserve-onto.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3414-rebase-preserve-onto/.git/
checking prerequisite: REBASE_P
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test -z "$GIT_TEST_SKIP_REBASE_P"
)
prerequisite REBASE_P ok
expecting success:
test_commit A1 &&
test_commit B1 &&
test_commit C1 &&
test_commit D1 &&
git reset --hard B1 &&
test_commit E1 &&
test_commit F1 &&
test_merge G1 D1 &&
git reset --hard A1 &&
test_commit H1
[master (root-commit) 6fb0b66] A1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A1.t
[master 37e5de5] B1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B1.t
[master 9db6c33] C1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C1.t
[master d7157d8] D1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D1.t
HEAD is now at 37e5de5 B1
[master b959d6c] E1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 E1.t
[master 81dc3a6] F1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 F1.t
Merging:
81dc3a6 F1
virtual D1
found 1 common ancestor:
37e5de5 B1
Merge made by the 'recursive' strategy.
C1.t | 1 +
D1.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 C1.t
create mode 100644 D1.t
HEAD is now at 6fb0b66 A1
[master 4950a7c] H1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 H1.t
ok 1 - setup
expecting success:
git checkout G1 &&
git rebase -p --onto H1 B1 &&
test "$(git rev-parse HEAD^1^1^1)" = "$(git rev-parse H1)" &&
test "$(git rev-parse HEAD^2^1^1)" = "$(git rev-parse H1)"
Note: switching to 'G1'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 52308dd G1
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/5)
Rebasing (2/5)
Rebasing (3/5)
Rebasing (4/5)
Rebasing (5/5)
Successfully rebased and updated detached HEAD.
ok 2 - rebase from B1 onto H1
expecting success:
git checkout G1 &&
git rebase -p --onto H1 E1 &&
test "$(git rev-parse HEAD^1^1)" = "$(git rev-parse H1)" &&
test "$(git rev-parse HEAD^2)" = "$(git rev-parse D1)"
Warning: you are leaving 5 commits behind, not connected to
any of your branches:
ab2e25c G1
eb95cad F1
52202eb D1
227fb12 E1
9e481e9 C1
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> ab2e25c
HEAD is now at 52308dd G1
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 3 - rebase from E1 onto H1
expecting success:
git checkout G1 &&
git rev-list --first-parent --pretty=oneline C1..G1 &&
git rebase -p --onto H1 C1 &&
test "$(git rev-parse HEAD^2^1)" = "$(git rev-parse H1)" &&
test "$(git rev-parse HEAD^1)" = "$(git rev-parse F1)"
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
a6d9fc8 G1
4d3dd7d F1
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> a6d9fc8
HEAD is now at 52308dd G1
52308dd60394ebd5599b39fb69108f164975ed7a G1
81dc3a6494c9a0091f921c65194433ffa66d8dac F1
b959d6cc0d4f2d10f0d432e45cd5578c75065af5 E1
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 4 - rebase from C1 onto H1
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3416-rebase-onto-threedots.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3416-rebase-onto-threedots/.git/
expecting success:
test_commit A &&
test_commit B &&
git branch side &&
test_commit C &&
git branch topic &&
git checkout side &&
test_commit H &&
git checkout master &&
test_tick &&
git merge H &&
git tag D &&
test_commit E &&
git checkout topic &&
test_commit F &&
test_commit G &&
git checkout side &&
test_tick &&
git merge C &&
git tag I &&
test_commit J &&
test_commit K
[master (root-commit) 0ddfaf1] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
[master d9df450] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B.t
[master 35a8500] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C.t
Switched to branch 'side'
[side e9f30f6] H
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 H.t
Switched to branch 'master'
Merging:
35a8500 C
virtual H
found 1 common ancestor:
d9df450 B
Merge made by the 'recursive' strategy.
H.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 H.t
[master 0cd72fb] E
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 E.t
Switched to branch 'topic'
[topic 0fb828b] F
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 F.t
[topic a08c965] G
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 G.t
Switched to branch 'side'
Merging:
e9f30f6 H
virtual C
found 1 common ancestor:
d9df450 B
Merge made by the 'recursive' strategy.
C.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 C.t
[side 9eed7bf] J
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 J.t
[side 4d3c411] K
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 K.t
ok 1 - setup
expecting success:
git reset --hard &&
git checkout topic &&
git reset --hard G &&
git rebase --onto master...topic F &&
git rev-parse HEAD^1 >actual &&
git rev-parse C^0 >expect &&
test_cmp expect actual
HEAD is now at 4d3c411 K
Switched to branch 'topic'
HEAD is now at a08c965 G
First, rewinding head to replay your work on top of it...
Applying: G
ok 2 - rebase --onto master...topic
expecting success:
git reset --hard &&
git checkout topic &&
git reset --hard G &&
git rebase --onto master... F &&
git rev-parse HEAD^1 >actual &&
git rev-parse C^0 >expect &&
test_cmp expect actual
HEAD is now at f576ef2 G
Already on 'topic'
HEAD is now at a08c965 G
First, rewinding head to replay your work on top of it...
Applying: G
ok 3 - rebase --onto master...
expecting success:
git reset --hard &&
git checkout side &&
git reset --hard K &&
test_must_fail git rebase --onto master...side J
HEAD is now at f576ef2 G
Switched to branch 'side'
HEAD is now at 4d3c411 K
fatal: 'master...side': need exactly one merge base
ok 4 - rebase --onto master...side
expecting success:
git reset --hard &&
git checkout topic &&
git reset --hard G &&
set_fake_editor &&
EXPECT_COUNT=1 git rebase -i --onto master...topic F &&
git rev-parse HEAD^1 >actual &&
git rev-parse C^0 >expect &&
test_cmp expect actual
HEAD is now at 4d3c411 K
Switched to branch 'topic'
HEAD is now at a08c965 G
Rebasing (1/1)
Successfully rebased and updated refs/heads/topic.
ok 5 - rebase -i --onto master...topic
expecting success:
git reset --hard &&
git checkout topic &&
git reset --hard G &&
set_fake_editor &&
EXPECT_COUNT=1 git rebase -i --onto master... F &&
git rev-parse HEAD^1 >actual &&
git rev-parse C^0 >expect &&
test_cmp expect actual
HEAD is now at f576ef2 G
Already on 'topic'
HEAD is now at a08c965 G
Rebasing (1/1)
Successfully rebased and updated refs/heads/topic.
ok 6 - rebase -i --onto master...
expecting success:
git reset --hard &&
git checkout side &&
git reset --hard K &&
test_must_fail git rebase -i --onto master...side J
HEAD is now at f576ef2 G
Switched to branch 'side'
HEAD is now at 4d3c411 K
fatal: 'master...side': need exactly one merge base
ok 7 - rebase -i --onto master...side
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3417-rebase-whitespace-fix.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3417-rebase-whitespace-fix/.git/
expecting success:
git commit --allow-empty -m "Initial empty commit" &&
git add file && git commit -m first &&
mv second file &&
git add file && git commit -m second &&
git rebase --whitespace=fix HEAD^^ &&
git diff --exit-code HEAD^:file expect-first &&
test_cmp expect-second file
[master (root-commit) bbc2acc] Initial empty commit
Author: A U Thor <author@example.com>
[master eb7a127] first
Author: A U Thor <author@example.com>
1 file changed, 4 insertions(+)
create mode 100644 file
[master 6afe848] second
Author: A U Thor <author@example.com>
1 file changed, 7 insertions(+)
Current branch master is up to date, rebase forced.
First, rewinding head to replay your work on top of it...
Applying: first
Applying: second
ok 1 - blank line at end of file; extend at end of file
expecting success:
cp third file && git add file && git commit -m third &&
git rebase --whitespace=fix HEAD^^ &&
git diff --exit-code HEAD^:file expect-second &&
test_cmp expect-third file
[master 262742d] third
Author: A U Thor <author@example.com>
1 file changed, 7 insertions(+)
Current branch master is up to date, rebase forced.
First, rewinding head to replay your work on top of it...
Applying: second
Applying: third
ok 2 - two blanks line at end of file; extend at end of file
expecting success:
git config core.whitespace "-blank-at-eol" &&
git reset --hard HEAD^ &&
cp third file && git add file && git commit -m third &&
git rebase --whitespace=fix HEAD^^ &&
git diff --exit-code HEAD^:file expect-second &&
test_cmp file third
HEAD is now at 4dcab1a second
[master 262742d] third
Author: A U Thor <author@example.com>
1 file changed, 7 insertions(+)
Current branch master is up to date, rebase forced.
First, rewinding head to replay your work on top of it...
Applying: second
Applying: third
ok 3 - same, but do not remove trailing spaces
expecting success:
git config core.whitespace "blank-at-eol" &&
cp beginning file &&
git commit -m beginning file &&
for i in 1 2 3 4 5; do
echo $i
done >> file &&
git commit -m more file &&
git rebase --whitespace=fix HEAD^^ &&
test_cmp expect-beginning file
[master b3af8b5] beginning
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+), 13 deletions(-)
[master 052ab0d] more
Author: A U Thor <author@example.com>
1 file changed, 5 insertions(+)
Current branch master is up to date, rebase forced.
First, rewinding head to replay your work on top of it...
Applying: beginning
Applying: more
ok 4 - at beginning of file
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3419-rebase-patch-id.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3419-rebase-patch-id/.git/
expecting success:
git commit --allow-empty -m initial &&
git tag root
[master (root-commit) 1404778] initial
Author: A U Thor <author@example.com>
ok 1 - setup
expecting success:
rm -f .gitattributes &&
git checkout -q -f master &&
git reset --hard root &&
count 500 >file &&
git add file &&
git commit -q -m initial &&
git branch -f other &&
scramble file &&
git add file &&
git commit -q -m 'change big file' &&
git checkout -q other &&
: >newfile &&
git add newfile &&
git commit -q -m 'add small file' &&
git cherry-pick master >/dev/null 2>&1
HEAD is now at 1404778 initial
ok 2 - setup: 500 lines
expecting success:
echo 'file binary' >.gitattributes
ok 3 - setup attributes
expecting success:
git checkout -q master &&
scramble file &&
git add file &&
git commit -q -m "change big file again" &&
git checkout -q other^{} &&
git rebase master &&
test_must_fail test -n "$(git rev-list master...HEAD~)"
First, rewinding head to replay your work on top of it...
Applying: add small file
ok 4 - detect upstream patch
expecting success:
git branch -f squashed master &&
git checkout -q -f squashed &&
git reset -q --soft HEAD~2 &&
git commit -q -m squashed &&
git checkout -q other^{} &&
test_must_fail git rebase squashed &&
rm -rf .git/rebase-apply
First, rewinding head to replay your work on top of it...
Applying: add small file
Applying: change big file
warning: Cannot merge binary files: file (HEAD vs. change big file)
Using index info to reconstruct a base tree...
M file
Falling back to patching base and 3-way merge...
Merging:
258e97e add small file
virtual change big file
found 1 common ancestor:
virtual e5dcc7c81f494dce9da11f93c6ea59bdc75c6013
Auto-merging file
CONFLICT (content): Merge conflict in file
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0002 change big file
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
ok 5 - do not drop patch
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
skipping test: setup: 50000 lines
rm -f .gitattributes &&
git checkout -q -f master &&
git reset --hard root &&
count 50000 >file &&
git add file &&
git commit -q -m initial &&
git branch -f other &&
scramble file &&
git add file &&
git commit -q -m 'change big file' &&
git checkout -q other &&
: >newfile &&
git add newfile &&
git commit -q -m 'add small file' &&
git cherry-pick master >/dev/null 2>&1
ok 6 # skip setup: 50000 lines (missing EXPENSIVE)
skipping test: setup attributes
echo 'file binary' >.gitattributes
ok 7 # skip setup attributes (missing EXPENSIVE)
skipping test: detect upstream patch
git checkout -q master &&
scramble file &&
git add file &&
git commit -q -m "change big file again" &&
git checkout -q other^{} &&
git rebase master &&
test_must_fail test -n "$(git rev-list master...HEAD~)"
ok 8 # skip detect upstream patch (missing EXPENSIVE)
skipping test: do not drop patch
git branch -f squashed master &&
git checkout -q -f squashed &&
git reset -q --soft HEAD~2 &&
git commit -q -m squashed &&
git checkout -q other^{} &&
test_must_fail git rebase squashed &&
rm -rf .git/rebase-apply
ok 9 # skip do not drop patch (missing EXPENSIVE)
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3404-rebase-interactive.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3404-rebase-interactive/.git/
expecting success:
test_commit A file1 &&
test_commit B file1 &&
test_commit C file2 &&
test_commit D file1 &&
test_commit E file3 &&
git checkout -b branch1 A &&
test_commit F file4 &&
test_commit G file1 &&
test_commit H file5 &&
git checkout -b branch2 F &&
test_commit I file6 &&
git checkout -b conflict-branch A &&
test_commit one conflict &&
test_commit two conflict &&
test_commit three conflict &&
test_commit four conflict &&
git checkout -b no-conflict-branch A &&
test_commit J fileJ &&
test_commit K fileK &&
test_commit L fileL &&
test_commit M fileM &&
git checkout -b no-ff-branch A &&
test_commit N fileN &&
test_commit O fileO &&
test_commit P fileP
[master (root-commit) 6e62bf8] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1
[master 313fe96] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master d0f65f2] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
[master 0547e3f] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 8f99a4f] E
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
Switched to a new branch 'branch1'
[branch1 cfefd94] F
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file4
[branch1 83751a6] G
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[branch1 4373208] H
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file5
Switched to a new branch 'branch2'
[branch2 615be62] I
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file6
Switched to a new branch 'conflict-branch'
[conflict-branch b895952] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 conflict
[conflict-branch 766a798] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[conflict-branch 1eadf03] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[conflict-branch f91a2b3] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'no-conflict-branch'
[no-conflict-branch 808874f] J
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileJ
[no-conflict-branch 265b89e] K
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileK
[no-conflict-branch 6b0f5e6] L
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileL
[no-conflict-branch 3389558] M
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileM
Switched to a new branch 'no-ff-branch'
[no-ff-branch 53b4423] N
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileN
[no-ff-branch cc47714] O
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileO
[no-ff-branch faef1a5] P
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fileP
ok 1 - setup
expecting success:
git checkout -b emptybranch master &&
git commit --allow-empty -m "empty" &&
git rebase --keep-empty -i HEAD~2 &&
git log --oneline >actual &&
test_line_count = 6 actual
Switched to a new branch 'emptybranch'
[emptybranch da33401] empty
Author: A U Thor <author@example.com>
Successfully rebased and updated refs/heads/emptybranch.
ok 2 - rebase --keep-empty
expecting success:
cat >expect <<-\EOF &&
error: nothing to do
EOF
set_fake_editor &&
test_must_fail env FAKE_LINES="1 exec_true" git rebase -i HEAD^ >actual 2>&1 &&
test_i18ncmp expect actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 3 - rebase -i with empty HEAD
expecting success:
git checkout master &&
(
set_fake_editor &&
FAKE_LINES="1 exec_>touch-one
2 exec_>touch-two exec_false exec_>touch-three
3 4 exec_>\"touch-file__name_with_spaces\";_>touch-after-semicolon 5" &&
export FAKE_LINES &&
test_must_fail git rebase -i A
) &&
test_path_is_file touch-one &&
test_path_is_file touch-two &&
test_path_is_missing touch-three " (should have stopped before)" &&
test_cmp_rev C HEAD &&
git rebase --continue &&
test_path_is_file touch-three &&
test_path_is_file "touch-file name with spaces" &&
test_path_is_file touch-after-semicolon &&
test_cmp_rev master HEAD &&
rm -f touch-*
Switched to branch 'master'
rebase -i script before editing:
pick 313fe96 B
pick d0f65f2 C
pick 0547e3f D
pick 8f99a4f E
rebase -i script after editing:
pick 313fe96 B
exec >touch-one
pick d0f65f2 C
exec >touch-two
exec false
exec >touch-three
pick 0547e3f D
pick 8f99a4f E
exec >"touch-file name with spaces"; >touch-after-semicolon
Rebasing (2/9)
Executing: >touch-one
Rebasing (3/9)
Rebasing (4/9)
Executing: >touch-two
Rebasing (5/9)
Executing: false
warning: execution failed: false
You can fix the problem, and then run
git rebase --continue
Rebasing (6/9)
Executing: >touch-three
Rebasing (7/9)
Rebasing (8/9)
Rebasing (9/9)
Executing: >"touch-file name with spaces"; >touch-after-semicolon
Successfully rebased and updated refs/heads/master.
ok 4 - rebase -i with the exec command
expecting success:
git checkout master &&
mkdir subdir && (cd subdir &&
set_fake_editor &&
FAKE_LINES="1 exec_>touch-subdir" \
git rebase -i HEAD^
) &&
test_path_is_file touch-subdir &&
rm -fr subdir
Already on 'master'
rebase -i script before editing:
pick 8f99a4f E
rebase -i script after editing:
pick 8f99a4f E
exec >touch-subdir
Rebasing (2/2)
Executing: >touch-subdir
Successfully rebased and updated refs/heads/master.
ok 5 - rebase -i with the exec command runs from tree root
expecting success:
test_when_finished "rm -rf subdir" &&
test_when_finished "git rebase --abort ||:" &&
git checkout master &&
mkdir subdir && (cd subdir &&
set_fake_editor &&
FAKE_LINES="1 x_cd_subdir_&&_git_rev-parse_--is-inside-work-tree" \
git rebase -i HEAD^
)
Already on 'master'
rebase -i script before editing:
pick 8f99a4f E
rebase -i script after editing:
pick 8f99a4f E
x cd subdir && git rev-parse --is-inside-work-tree
Rebasing (2/2)
Executing: cd subdir && git rev-parse --is-inside-work-tree
true
Successfully rebased and updated refs/heads/master.
fatal: No rebase in progress?
ok 6 - rebase -i with exec allows git commands in subdirs
expecting success:
test_when_finished "rm -rf subdir" &&
test_when_finished "test_might_fail git rebase --abort" &&
mkdir subdir &&
git rebase -x "(cd subdir && git rev-parse --show-toplevel)" HEAD^ \
>actual &&
! grep "/subdir$" actual
Rebasing (2/2)
Executing: (cd subdir && git rev-parse --show-toplevel)
Successfully rebased and updated refs/heads/master.
fatal: No rebase in progress?
ok 7 - rebase -i sets work tree properly
expecting success:
git checkout master &&
set_fake_editor &&
test_must_fail env FAKE_LINES="exec_echo_foo_>file1 1" git rebase -i HEAD^ &&
test_cmp_rev master^ HEAD &&
git reset --hard &&
git rebase --continue
Already on 'master'
rebase -i script before editing:
pick 8f99a4f E
rebase -i script after editing:
exec echo foo >file1
pick 8f99a4f E
Rebasing (1/2)
Executing: echo foo >file1
error: cannot rebase: You have unstaged changes.
warning: execution succeeded: echo foo >file1
but left changes to the index and/or the working tree
Commit or stash your changes, and then run
git rebase --continue
HEAD is now at 0547e3f D
Rebasing (2/2)
Successfully rebased and updated refs/heads/master.
ok 8 - rebase -i with the exec command checks tree cleanness
expecting success:
test_when_finished "git rebase --abort ||:" &&
test_must_fail env git rebase -x "" @ 2>actual &&
test_write_lines "error: empty exec command" >expected &&
test_i18ncmp expected actual &&
test_must_fail env git rebase -x " " @ 2>actual &&
test_i18ncmp expected actual
fatal: No rebase in progress?
ok 9 - rebase -x with empty command fails
expecting success:
test_when_finished "git rebase --abort ||:" &&
test_must_fail env git rebase -x "a${LF}b" @ 2>actual &&
test_write_lines "error: exec commands cannot contain newlines" \
>expected &&
test_i18ncmp expected actual
fatal: No rebase in progress?
ok 10 - rebase -x with newline in command fails
expecting success:
git checkout master &&
test_when_finished "git rebase --abort" &&
set_fake_editor &&
test_must_fail env FAKE_LINES="exec_this-command-does-not-exist 1" \
git rebase -i HEAD^ >actual 2>&1 &&
! grep "Maybe git-rebase is broken" actual
Already on 'master'
ok 11 - rebase -i with exec of inexistent command
expecting success:
test_when_finished "git rebase --abort ||:" &&
GIT_SEQUENCE_EDITOR="echo bad >" git rebase -x"echo one" @^
Rebasing (2/2)
Executing: echo one
one
Successfully rebased and updated refs/heads/master.
fatal: No rebase in progress?
ok 12 - implicit interactive rebase does not invoke sequence editor
expecting success:
git checkout branch2 &&
set_fake_editor &&
git rebase -i F &&
test "$(git symbolic-ref -q HEAD)" = "refs/heads/branch2" &&
test $(git rev-parse I) = $(git rev-parse HEAD)
Switched to branch 'branch2'
Successfully rebased and updated refs/heads/branch2.
ok 13 - no changes are a nop
expecting success:
git checkout -b dead-end &&
git rm file6 &&
git commit -m "stop here" &&
set_fake_editor &&
git rebase -i F branch2 &&
test "$(git symbolic-ref -q HEAD)" = "refs/heads/branch2" &&
test $(git rev-parse I) = $(git rev-parse branch2) &&
test $(git rev-parse I) = $(git rev-parse HEAD)
Switched to a new branch 'dead-end'
rm 'file6'
[dead-end f814f58] stop here
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 file6
Successfully rebased and updated refs/heads/branch2.
ok 14 - test the [branch] option
expecting success:
git checkout -b test-onto branch2 &&
set_fake_editor &&
git rebase -i --onto branch1 F &&
test "$(git symbolic-ref -q HEAD)" = "refs/heads/test-onto" &&
test $(git rev-parse HEAD^) = $(git rev-parse branch1) &&
test $(git rev-parse I) = $(git rev-parse branch2)
Switched to a new branch 'test-onto'
Rebasing (1/1)
Successfully rebased and updated refs/heads/test-onto.
ok 15 - test --onto <branch>
expecting success:
git checkout branch1 &&
git tag original-branch1 &&
set_fake_editor &&
git rebase -i branch2 &&
test file6 = $(git diff --name-only original-branch1) &&
test "$(git symbolic-ref -q HEAD)" = "refs/heads/branch1" &&
test $(git rev-parse I) = $(git rev-parse branch2) &&
test $(git rev-parse I) = $(git rev-parse HEAD~2)
Switched to branch 'branch1'
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/branch1.
ok 16 - rebase on top of a non-conflicting commit
expecting success:
test $(git rev-parse branch1@{1}) = $(git rev-parse original-branch1)
ok 17 - reflog for the branch shows state before rebase
expecting success:
printf "rebase -i (finish): refs/heads/branch1 onto %s\n" \
"$(git rev-parse branch2)" >expected &&
git log -g --pretty=%gs -1 refs/heads/branch1 >actual &&
test_cmp expected actual
ok 18 - reflog for the branch shows correct finish message
expecting success:
set_fake_editor &&
FAKE_LINES="2 1" git rebase -i HEAD~2 &&
test H = $(git cat-file commit HEAD^ | sed -ne \$p) &&
test G = $(git cat-file commit HEAD | sed -ne \$p)
rebase -i script before editing:
pick ae8f65e G
pick f5f5249 H
rebase -i script after editing:
pick f5f5249 H
pick ae8f65e G
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/branch1.
ok 19 - exchange two commits
expecting success:
cat >expect <<-\EOF &&
diff --git a/file1 b/file1
index f70f10e..fd79235 100644
--- a/file1
+++ b/file1
@@ -1 +1 @@
-A
+G
EOF
cat >expect2 <<-\EOF &&
<<<<<<< HEAD
D
=======
G
>>>>>>> 5d18e54... G
EOF
git tag new-branch1 &&
set_fake_editor &&
test_must_fail git rebase -i master &&
test "$(git rev-parse HEAD~3)" = "$(git rev-parse master)" &&
test_cmp expect .git/rebase-merge/patch &&
test_cmp expect2 file1 &&
test "$(git diff --name-status |
sed -n -e "/^U/s/^U[^a-z]*//p")" = file1 &&
test 4 = $(grep -v "^#" < .git/rebase-merge/done | wc -l) &&
test 0 = $(grep -c "^[^#]" < .git/rebase-merge/git-rebase-todo)
Rebasing (1/4)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Auto-merging file1
CONFLICT (content): Merge conflict in file1
error: could not apply 5d18e54... G
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 5d18e54... G
ok 20 - stop on conflicting pick
expecting success:
GIT_TRACE=1 git rebase --show-current-patch >/dev/null 2>stderr &&
grep "show.*REBASE_HEAD" stderr &&
# the original stopped-sha1 is abbreviated
stopped_sha1="$(git rev-parse $(cat ".git/rebase-merge/stopped-sha"))" &&
test "$(git rev-parse REBASE_HEAD)" = "$stopped_sha1"
trace: run_command: git show REBASE_HEAD --
trace: built-in: git show REBASE_HEAD --
ok 21 - show conflicted patch
expecting success:
git rebase --abort &&
test $(git rev-parse new-branch1) = $(git rev-parse HEAD) &&
test "$(git symbolic-ref -q HEAD)" = "refs/heads/branch1" &&
test_path_is_missing .git/rebase-merge
ok 22 - abort
expecting success:
git rm --cached file1 &&
git commit -m "remove file in base" &&
set_fake_editor &&
test_must_fail git rebase -i master > output 2>&1 &&
test_i18ngrep "The following untracked working tree files would be overwritten by checkout:" \
output &&
test_i18ngrep "file1" output &&
test_path_is_missing .git/rebase-merge &&
git reset --hard HEAD^
rm 'file1'
[branch1 2dd5570] remove file in base
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 file1
error: The following untracked working tree files would be overwritten by checkout:
file1
HEAD is now at 5d18e54 G
ok 23 - abort with error when new base cannot be checked out
expecting success:
echo A > file7 &&
git add file7 &&
test_tick &&
GIT_AUTHOR_NAME="Twerp Snog" git commit -m "different author" &&
git tag twerp &&
set_fake_editor &&
git rebase -i --onto master HEAD^ &&
git show HEAD | grep "^Author: Twerp Snog"
[branch1 2596307] different author
Author: Twerp Snog <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file7
Rebasing (1/1)
Successfully rebased and updated refs/heads/branch1.
Author: Twerp Snog <author@example.com>
ok 24 - retain authorship
expecting success:
oGIT_AUTHOR_NAME=$GIT_AUTHOR_NAME &&
test_when_finished "GIT_AUTHOR_NAME=\$oGIT_AUTHOR_NAME" &&
git reset --hard twerp &&
test_commit a conflict a conflict-a &&
git reset --hard twerp &&
GIT_AUTHOR_NAME=AttributeMe &&
export GIT_AUTHOR_NAME &&
test_commit b conflict b conflict-b &&
GIT_AUTHOR_NAME=$oGIT_AUTHOR_NAME &&
set_fake_editor &&
test_must_fail git rebase -i conflict-a &&
echo resolved >conflict &&
git add conflict &&
git rebase --continue &&
test $(git rev-parse conflict-a^0) = $(git rev-parse HEAD^) &&
git show >out &&
grep AttributeMe out
HEAD is now at 2596307 different author
[branch1 748a43d] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 conflict
HEAD is now at 2596307 different author
[branch1 34d1a6c] b
Author: AttributeMe <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 conflict
Rebasing (1/1)
CONFLICT (add/add): Merge conflict in conflict
Auto-merging conflict
error: could not apply 34d1a6c... b
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 34d1a6c... b
[detached HEAD 7866b12] b
Author: AttributeMe <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/branch1.
Author: AttributeMe <author@example.com>
ok 25 - retain authorship w/ conflicts
expecting success:
git reset --hard twerp &&
echo B > file7 &&
test_tick &&
GIT_AUTHOR_NAME="Nitfol" git commit -m "nitfol" file7 &&
echo "******************************" &&
set_fake_editor &&
FAKE_LINES="1 squash 2" EXPECT_HEADER_COUNT=2 \
git rebase -i --onto master HEAD~2 &&
test B = $(cat file7) &&
test $(git rev-parse HEAD^) = $(git rev-parse master)
HEAD is now at 2596307 different author
[branch1 cdf577a] nitfol
Author: Nitfol <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
******************************
rebase -i script before editing:
pick 2596307 different author
pick cdf577a nitfol
rebase -i script after editing:
pick 2596307 different author
squash cdf577a nitfol
Rebasing (1/2)
Rebasing (2/2)
[detached HEAD d2d5ba7] different author
Author: Twerp Snog <author@example.com>
Date: Thu Apr 7 15:33:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 file7
Successfully rebased and updated refs/heads/branch1.
ok 26 - squash
expecting success:
git show HEAD | grep "^Author: Twerp Snog"
Author: Twerp Snog <author@example.com>
ok 27 - retain authorship when squashing
checking prerequisite: REBASE_P
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test -z "$GIT_TEST_SKIP_REBASE_P"
)
prerequisite REBASE_P ok
expecting success:
HEAD=$(git rev-parse HEAD) &&
set_fake_editor &&
git rebase -i -p HEAD^ &&
git update-index --refresh &&
git diff-files --quiet &&
git diff-index --quiet --cached HEAD -- &&
test $HEAD = $(git rev-parse HEAD)
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/1)
Successfully rebased and updated refs/heads/branch1.
ok 28 - -p handles "no changes" gracefully
checking known breakage:
git checkout H &&
set_fake_editor &&
FAKE_LINES="2 1" git rebase -i -p HEAD~2 &&
test H = $(git cat-file commit HEAD^ | sed -ne \$p) &&
test G = $(git cat-file commit HEAD | sed -ne \$p)
Note: switching to 'H'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 4373208 H
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
rebase -i script before editing:
pick 83751a6 G
pick 4373208 H
rebase -i script after editing:
pick 4373208 H
pick 83751a6 G
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
not ok 29 - exchange two commits with -p # TODO known breakage
expecting success:
git checkout -b to-be-preserved master^ &&
: > unrelated-file &&
git add unrelated-file &&
test_tick &&
git commit -m "unrelated" &&
git checkout -b another-branch master &&
echo B > file1 &&
test_tick &&
git commit -m J file1 &&
test_tick &&
git merge to-be-preserved &&
echo C > file1 &&
test_tick &&
git commit -m K file1 &&
echo D > file1 &&
test_tick &&
git commit -m L1 file1 &&
git checkout HEAD^ &&
echo 1 > unrelated-file &&
test_tick &&
git commit -m L2 unrelated-file &&
test_tick &&
git merge another-branch &&
echo E > file1 &&
test_tick &&
git commit -m M file1 &&
git checkout -b to-be-rebased &&
test_tick &&
set_fake_editor &&
git rebase -i -p --onto branch1 master &&
git update-index --refresh &&
git diff-files --quiet &&
git diff-index --quiet --cached HEAD -- &&
test $(git rev-parse HEAD~6) = $(git rev-parse branch1) &&
test $(git rev-parse HEAD~4^2) = $(git rev-parse to-be-preserved) &&
test $(git rev-parse HEAD^^2^) = $(git rev-parse HEAD^^^) &&
test $(git show HEAD~5:file1) = B &&
test $(git show HEAD~3:file1) = C &&
test $(git show HEAD:file1) = E &&
test $(git show HEAD:unrelated-file) = 1
Previous HEAD position was 83751a6 G
Switched to a new branch 'to-be-preserved'
[to-be-preserved 8dba1b0] unrelated
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 unrelated-file
Switched to a new branch 'another-branch'
[another-branch b55ddc1] J
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Merging:
b55ddc1 J
virtual to-be-preserved
found 1 common ancestor:
0547e3f D
Merge made by the 'recursive' strategy.
unrelated-file | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 unrelated-file
[another-branch 28ab3c9] K
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[another-branch b22c0b1] L1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 28ab3c9 K
[detached HEAD 9986375] L2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Merging:
9986375 L2
virtual another-branch
found 1 common ancestor:
28ab3c9 K
Merge made by the 'recursive' strategy.
file1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD 806db33] M
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'to-be-rebased'
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/7)
Rebasing (2/7)
Rebasing (3/7)
Rebasing (4/7)
Rebasing (5/7)
Rebasing (6/7)
Rebasing (7/7)
Successfully rebased and updated refs/heads/to-be-rebased.
ok 30 - preserve merges with -p
expecting success:
set_fake_editor &&
FAKE_LINES="1 2 edit 3 4" git rebase -i -p HEAD~3 &&
echo 2 > unrelated-file &&
test_tick &&
git commit -m L2-modified --amend unrelated-file &&
git rebase --continue &&
git update-index --refresh &&
git diff-files --quiet &&
git diff-index --quiet --cached HEAD -- &&
test $(git show HEAD:unrelated-file) = 2
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
rebase -i script before editing:
pick 028896d L2
pick 44a20cd L1
pick 5f48528 Merge branch 'another-branch' into HEAD
pick 2c6682a M
rebase -i script after editing:
pick 028896d L2
pick 44a20cd L1
edit 5f48528 Merge branch 'another-branch' into HEAD
pick 2c6682a M
Rebasing (1/4)
Rebasing (2/4)
Rebasing (3/4)
Stopped at 5f48528... Merge branch 'another-branch' into HEAD
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
[detached HEAD ed60d45] L2-modified
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:43:13 2005 -0700
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (4/4)
Successfully rebased and updated refs/heads/to-be-rebased.
ok 31 - edit ancestor with -p
expecting success:
git reset --hard D &&
test_tick &&
set_fake_editor &&
test_must_fail git rebase -i --onto new-branch1 HEAD^ &&
echo resolved > file1 &&
git add file1 &&
FAKE_COMMIT_MESSAGE="chouette!" git rebase --continue &&
test $(git rev-parse HEAD^) = $(git rev-parse new-branch1) &&
git show HEAD | grep chouette
HEAD is now at 0547e3f D
Rebasing (1/1)
Auto-merging file1
CONFLICT (content): Merge conflict in file1
error: could not apply 0547e3f... D
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 0547e3f... D
[detached HEAD eb2be51] chouette!
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/to-be-rebased.
chouette!
ok 32 - --continue tries to commit
expecting success:
git reset --hard master@{1} &&
test_tick &&
set_fake_editor &&
test_must_fail git rebase -v -i --onto new-branch1 HEAD^ &&
echo resolved > file1 &&
git add file1 &&
git rebase --continue > output &&
grep "^ file1 | 2 +-$" output
HEAD is now at 0547e3f D
Changes from 6e62bf890e21973b771e4e6fc28f5ade62edb4bc to 5d18e5414f663da21d1363c271f2d684aeda7b5b:
file1 | 2 +-
file4 | 1 +
file5 | 1 +
file6 | 1 +
4 files changed, 4 insertions(+), 1 deletion(-)
create mode 100644 file4
create mode 100644 file5
create mode 100644 file6
Note: switching to '5d18e5414f663da21d1363c271f2d684aeda7b5b'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 5d18e54 G
Rebasing (1/1)
Auto-merging file1
CONFLICT (content): Merge conflict in file1
error: could not apply 0547e3f... D
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 0547e3f... D
Successfully rebased and updated refs/heads/to-be-rebased.
file1 | 2 +-
ok 33 - verbose flag is heeded, even after --continue
expecting success:
base=$(git rev-parse HEAD~4) &&
set_fake_editor &&
FAKE_COMMIT_AMEND="ONCE" FAKE_LINES="1 squash 2 squash 3 squash 4" \
EXPECT_HEADER_COUNT=4 \
git rebase -i $base &&
test $base = $(git rev-parse HEAD^) &&
test 1 = $(git show | grep ONCE | wc -l)
rebase -i script before editing:
pick 615be62 I
pick 0626e8d H
pick 5d18e54 G
pick 2e6badc D
rebase -i script after editing:
pick 615be62 I
squash 0626e8d H
squash 5d18e54 G
squash 2e6badc D
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
[detached HEAD e5aa6ef] I
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:21:13 2005 -0700
3 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 file5
create mode 100644 file6
Successfully rebased and updated refs/heads/to-be-rebased.
ok 34 - multi-squash only fires up editor once
expecting success:
git checkout -b multi-fixup E &&
base=$(git rev-parse HEAD~4) &&
set_fake_editor &&
FAKE_COMMIT_AMEND="NEVER" FAKE_LINES="1 fixup 2 fixup 3 fixup 4" \
git rebase -i $base &&
test $base = $(git rev-parse HEAD^) &&
test 0 = $(git show | grep NEVER | wc -l) &&
git checkout @{-1} &&
git branch -D multi-fixup
Switched to a new branch 'multi-fixup'
rebase -i script before editing:
pick 313fe96 B
pick d0f65f2 C
pick 0547e3f D
pick 8f99a4f E
rebase -i script after editing:
pick 313fe96 B
fixup d0f65f2 C
fixup 0547e3f D
fixup 8f99a4f E
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated refs/heads/multi-fixup.
Switched to branch 'to-be-rebased'
Deleted branch multi-fixup (was acbd024).
ok 35 - multi-fixup does not fire up editor
expecting success:
git checkout -b conflict-fixup conflict-branch &&
base=$(git rev-parse HEAD~4) &&
set_fake_editor &&
test_must_fail env FAKE_LINES="1 fixup 3 fixup 4" git rebase -i $base &&
echo three > conflict &&
git add conflict &&
FAKE_COMMIT_AMEND="ONCE" EXPECT_HEADER_COUNT=2 \
git rebase --continue &&
test $base = $(git rev-parse HEAD^) &&
test 1 = $(git show | grep ONCE | wc -l) &&
git checkout @{-1} &&
git branch -D conflict-fixup
Switched to a new branch 'conflict-fixup'
rebase -i script before editing:
pick b895952 one
pick 766a798 two
pick 1eadf03 three
pick f91a2b3 four
rebase -i script after editing:
pick b895952 one
fixup 1eadf03 three
fixup f91a2b3 four
Rebasing (2/3)
Auto-merging conflict
CONFLICT (content): Merge conflict in conflict
error: could not apply 1eadf03... three
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 1eadf03... three
[detached HEAD c36af95] one
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:22:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 conflict
Rebasing (3/3)
Successfully rebased and updated refs/heads/conflict-fixup.
Switched to branch 'to-be-rebased'
Deleted branch conflict-fixup (was 221ec56).
ok 36 - commit message used after conflict
expecting success:
git checkout -b conflict-squash conflict-branch &&
base=$(git rev-parse HEAD~4) &&
set_fake_editor &&
test_must_fail env FAKE_LINES="1 fixup 3 squash 4" git rebase -i $base &&
echo three > conflict &&
git add conflict &&
FAKE_COMMIT_AMEND="TWICE" EXPECT_HEADER_COUNT=2 \
git rebase --continue &&
test $base = $(git rev-parse HEAD^) &&
test 2 = $(git show | grep TWICE | wc -l) &&
git checkout @{-1} &&
git branch -D conflict-squash
Switched to a new branch 'conflict-squash'
rebase -i script before editing:
pick b895952 one
pick 766a798 two
pick 1eadf03 three
pick f91a2b3 four
rebase -i script after editing:
pick b895952 one
fixup 1eadf03 three
squash f91a2b3 four
Rebasing (2/3)
Auto-merging conflict
CONFLICT (content): Merge conflict in conflict
error: could not apply 1eadf03... three
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 1eadf03... three
[detached HEAD 191a914] one
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:22:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 conflict
Rebasing (3/3)
[detached HEAD 60ec801] one
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:22:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 conflict
Successfully rebased and updated refs/heads/conflict-squash.
Switched to branch 'to-be-rebased'
Deleted branch conflict-squash (was 60ec801).
ok 37 - commit message retained after conflict
expecting success:
cat >expect-squash-fixup <<-\EOF &&
B
D
ONCE
EOF
git checkout -b squash-fixup E &&
base=$(git rev-parse HEAD~4) &&
set_fake_editor &&
FAKE_COMMIT_AMEND="ONCE" FAKE_LINES="1 fixup 2 squash 3 fixup 4" \
EXPECT_HEADER_COUNT=4 \
git rebase -i $base &&
git cat-file commit HEAD | sed -e 1,/^\$/d > actual-squash-fixup &&
test_cmp expect-squash-fixup actual-squash-fixup &&
git cat-file commit HEAD@{2} |
grep "^# This is a combination of 3 commits\." &&
git cat-file commit HEAD@{3} |
grep "^# This is a combination of 2 commits\." &&
git checkout @{-1} &&
git branch -D squash-fixup
Switched to a new branch 'squash-fixup'
rebase -i script before editing:
pick 313fe96 B
pick d0f65f2 C
pick 0547e3f D
pick 8f99a4f E
rebase -i script after editing:
pick 313fe96 B
fixup d0f65f2 C
squash 0547e3f D
fixup 8f99a4f E
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
[detached HEAD 74d534c] B
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
3 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 file2
create mode 100644 file3
Successfully rebased and updated refs/heads/squash-fixup.
# This is a combination of 3 commits.
# This is a combination of 2 commits.
Switched to branch 'to-be-rebased'
Deleted branch squash-fixup (was 74d534c).
ok 38 - squash and fixup generate correct log messages
expecting success:
git checkout -b skip-comments E &&
base=$(git rev-parse HEAD~4) &&
set_fake_editor &&
FAKE_COMMIT_AMEND="ONCE" FAKE_LINES="# 1 # squash 2 # squash 3 # squash 4 #" \
EXPECT_HEADER_COUNT=4 \
git rebase -i $base &&
test $base = $(git rev-parse HEAD^) &&
test 1 = $(git show | grep ONCE | wc -l) &&
git checkout @{-1} &&
git branch -D skip-comments
Switched to a new branch 'skip-comments'
rebase -i script before editing:
pick 313fe96 B
pick d0f65f2 C
pick 0547e3f D
pick 8f99a4f E
rebase -i script after editing:
# comment
pick 313fe96 B
# comment
squash d0f65f2 C
# comment
squash 0547e3f D
# comment
squash 8f99a4f E
# comment
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
[detached HEAD f397ac4] B
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
3 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 file2
create mode 100644 file3
Successfully rebased and updated refs/heads/skip-comments.
Switched to branch 'to-be-rebased'
Deleted branch skip-comments (was f397ac4).
ok 39 - squash ignores comments
expecting success:
git checkout -b skip-blank-lines E &&
base=$(git rev-parse HEAD~4) &&
set_fake_editor &&
FAKE_COMMIT_AMEND="ONCE" FAKE_LINES="> 1 > squash 2 > squash 3 > squash 4 >" \
EXPECT_HEADER_COUNT=4 \
git rebase -i $base &&
test $base = $(git rev-parse HEAD^) &&
test 1 = $(git show | grep ONCE | wc -l) &&
git checkout @{-1} &&
git branch -D skip-blank-lines
Switched to a new branch 'skip-blank-lines'
rebase -i script before editing:
pick 313fe96 B
pick d0f65f2 C
pick 0547e3f D
pick 8f99a4f E
rebase -i script after editing:
pick 313fe96 B
squash d0f65f2 C
squash 0547e3f D
squash 8f99a4f E
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
[detached HEAD f397ac4] B
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
3 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 file2
create mode 100644 file3
Successfully rebased and updated refs/heads/skip-blank-lines.
Switched to branch 'to-be-rebased'
Deleted branch skip-blank-lines (was f397ac4).
ok 40 - squash ignores blank lines
expecting success:
git checkout -b squash-works no-conflict-branch &&
one=$(git rev-parse HEAD~3) &&
set_fake_editor &&
FAKE_LINES="1 s 3 2" EXPECT_HEADER_COUNT=2 \
git rebase -i HEAD~3 &&
test $one = $(git rev-parse HEAD~2)
Switched to a new branch 'squash-works'
rebase -i script before editing:
pick 265b89e K
pick 6b0f5e6 L
pick 3389558 M
rebase -i script after editing:
pick 265b89e K
s 3389558 M
pick 6b0f5e6 L
Rebasing (2/3)
[detached HEAD fb01347] K
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:27:13 2005 -0700
2 files changed, 2 insertions(+)
create mode 100644 fileK
create mode 100644 fileM
Rebasing (3/3)
Successfully rebased and updated refs/heads/squash-works.
ok 41 - squash works as expected
expecting success:
git checkout -b interrupted-squash conflict-branch &&
one=$(git rev-parse HEAD~3) &&
set_fake_editor &&
test_must_fail env FAKE_LINES="1 squash 3 2" git rebase -i HEAD~3 &&
test_write_lines one two four > conflict &&
git add conflict &&
test_must_fail git rebase --continue &&
echo resolved > conflict &&
git add conflict &&
git rebase --continue &&
test $one = $(git rev-parse HEAD~2)
Switched to a new branch 'interrupted-squash'
rebase -i script before editing:
pick 766a798 two
pick 1eadf03 three
pick f91a2b3 four
rebase -i script after editing:
pick 766a798 two
squash f91a2b3 four
pick 1eadf03 three
Rebasing (2/3)
Auto-merging conflict
CONFLICT (content): Merge conflict in conflict
error: could not apply f91a2b3... four
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply f91a2b3... four
[detached HEAD d1cbea4] two
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:23:13 2005 -0700
1 file changed, 2 insertions(+)
Rebasing (3/3)
Auto-merging conflict
CONFLICT (content): Merge conflict in conflict
error: could not apply 1eadf03... three
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 1eadf03... three
[detached HEAD 634f347] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 3 deletions(-)
Successfully rebased and updated refs/heads/interrupted-squash.
ok 42 - interrupted squash works as expected
expecting success:
git checkout -b interrupted-squash2 conflict-branch &&
one=$(git rev-parse HEAD~3) &&
set_fake_editor &&
test_must_fail env FAKE_LINES="3 squash 1 2" git rebase -i HEAD~3 &&
test_write_lines one four > conflict &&
git add conflict &&
test_must_fail git rebase --continue &&
test_write_lines one two four > conflict &&
git add conflict &&
test_must_fail git rebase --continue &&
echo resolved > conflict &&
git add conflict &&
git rebase --continue &&
test $one = $(git rev-parse HEAD~2)
Switched to a new branch 'interrupted-squash2'
rebase -i script before editing:
pick 766a798 two
pick 1eadf03 three
pick f91a2b3 four
rebase -i script after editing:
pick f91a2b3 four
squash 766a798 two
pick 1eadf03 three
Rebasing (1/3)
Auto-merging conflict
CONFLICT (content): Merge conflict in conflict
error: could not apply f91a2b3... four
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply f91a2b3... four
[detached HEAD d5ff450] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Rebasing (2/3)
Auto-merging conflict
CONFLICT (content): Merge conflict in conflict
error: could not apply 766a798... two
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 766a798... two
[detached HEAD ea11a0c] four
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:25:13 2005 -0700
1 file changed, 2 insertions(+)
Rebasing (3/3)
Auto-merging conflict
CONFLICT (content): Merge conflict in conflict
error: could not apply 1eadf03... three
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 1eadf03... three
[detached HEAD f26b32e] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 3 deletions(-)
Successfully rebased and updated refs/heads/interrupted-squash2.
ok 43 - interrupted squash works as expected (case 2)
expecting success:
echo unrelated > file7 &&
git add file7 &&
test_tick &&
git commit -m "unrelated change" &&
parent=$(git rev-parse HEAD^) &&
test_tick &&
set_fake_editor &&
FAKE_LINES="edit 1" git rebase -i HEAD^ &&
echo edited > file7 &&
git add file7 &&
FAKE_COMMIT_MESSAGE="chouette!" git rebase --continue &&
test edited = $(git show HEAD:file7) &&
git show HEAD | grep chouette &&
test $parent = $(git rev-parse HEAD^)
[interrupted-squash2 1c8cc7a] unrelated change
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file7
rebase -i script before editing:
pick 1c8cc7a unrelated change
rebase -i script after editing:
edit 1c8cc7a unrelated change
Rebasing (1/1)
Stopped at 1c8cc7a... unrelated change
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
[detached HEAD d64edb7] chouette!
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:49:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 file7
Successfully rebased and updated refs/heads/interrupted-squash2.
chouette!
ok 44 - --continue tries to commit, even for "edit"
expecting success:
old=$(git rev-parse HEAD) &&
test_tick &&
set_fake_editor &&
FAKE_LINES="edit 1" git rebase -i HEAD^ &&
echo "edited again" > file7 &&
git add file7 &&
test_must_fail env FAKE_COMMIT_MESSAGE=" " git rebase --continue &&
test $old = $(git rev-parse HEAD) &&
git rebase --abort
rebase -i script before editing:
pick d64edb7 chouette!
rebase -i script after editing:
edit d64edb7 chouette!
Rebasing (1/1)
Stopped at d64edb7... chouette!
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
Aborting commit due to empty commit message.
error: could not commit staged changes.
ok 45 - aborted --continue does not squash commits after "edit"
expecting success:
test_tick &&
set_fake_editor &&
FAKE_LINES="edit 1" git rebase -i HEAD^ &&
echo "edited again" > file7 &&
git add file7 &&
FAKE_COMMIT_MESSAGE="edited file7 again" git commit &&
echo "and again" > file7 &&
git add file7 &&
test_tick &&
test_must_fail env FAKE_COMMIT_MESSAGE="and again" git rebase --continue &&
git rebase --abort
rebase -i script before editing:
pick d64edb7 chouette!
rebase -i script after editing:
edit d64edb7 chouette!
Rebasing (1/1)
Stopped at d64edb7... chouette!
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
[detached HEAD 53dfc25] edited file7 again
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
error:
You have uncommitted changes in your working tree. Please, commit them
first and then run 'git rebase --continue' again.
ok 46 - auto-amend only edited commits after "edit"
expecting success:
test_tick &&
test_when_finished "git rebase --abort || :" &&
set_fake_editor &&
test_must_fail env FAKE_LINES="1 exec_false" git rebase -i HEAD^ &&
echo "edited again" > file7 &&
git add file7 &&
test_must_fail git rebase --continue 2>error &&
test_i18ngrep "you have staged changes in your working tree" error
rebase -i script before editing:
pick d64edb7 chouette!
rebase -i script after editing:
pick d64edb7 chouette!
exec false
Rebasing (2/2)
Executing: false
warning: execution failed: false
You can fix the problem, and then run
git rebase --continue
error: you have staged changes in your working tree
ok 47 - clean error after failed "exec"
expecting success:
grandparent=$(git rev-parse HEAD~2) &&
git checkout $(git rev-parse HEAD) &&
test_tick &&
set_fake_editor &&
FAKE_LINES="2 1" git rebase -i HEAD~2 &&
test $grandparent = $(git rev-parse HEAD~2)
Note: switching to 'd64edb765ae5cc14a814411cd3214035536d1e31'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d64edb7 chouette!
rebase -i script before editing:
pick f26b32e three
pick d64edb7 chouette!
rebase -i script after editing:
pick d64edb7 chouette!
pick f26b32e three
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 48 - rebase a detached HEAD
expecting success:
mkdir -p .git/hooks &&
write_script .git/hooks/pre-commit <<-\EOF &&
test -z "$(git diff --cached --check)"
EOF
echo "monde! " >> file1 &&
test_tick &&
test_must_fail git commit -m doesnt-verify file1 &&
git commit -m doesnt-verify --no-verify file1 &&
test_tick &&
set_fake_editor &&
FAKE_LINES=2 git rebase -i HEAD~2
[detached HEAD 79b5ca4] doesnt-verify
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rebase -i script before editing:
pick cb222ac three
pick 79b5ca4 doesnt-verify
rebase -i script after editing:
pick 79b5ca4 doesnt-verify
Rebasing (1/1)
Successfully rebased and updated detached HEAD.
ok 49 - rebase a commit violating pre-commit
expecting success:
rm -fr .git/hooks &&
git reset --hard &&
git checkout -b branch3 A &&
(
GIT_AUTHOR_NAME="Squashed Away" &&
export GIT_AUTHOR_NAME &&
>HEAD &&
git add HEAD &&
git commit -m "Add head" &&
>BODY &&
git add BODY &&
git commit -m "Add body"
) &&
set_fake_editor &&
FAKE_LINES="1 squash 2" git rebase -i @{-1} &&
test "$(git show -s --pretty=format:%an)" = "Squashed Away"
HEAD is now at 35fbfac doesnt-verify
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
35fbfac doesnt-verify
a2662df chouette!
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> 35fbfac
Switched to a new branch 'branch3'
[branch3 565f314] Add head
Author: Squashed Away <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 HEAD
[branch3 95bb066] Add body
Author: Squashed Away <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 BODY
rebase -i script before editing:
pick 565f314 Add head
pick 95bb066 Add body
rebase -i script after editing:
pick 565f314 Add head
squash 95bb066 Add body
Rebasing (1/2)
Rebasing (2/2)
[detached HEAD 970d070] Add head
Author: Squashed Away <author@example.com>
Date: Thu Apr 7 15:57:13 2005 -0700
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 BODY
create mode 100644 HEAD
Successfully rebased and updated refs/heads/branch3.
ok 50 - rebase with a file named HEAD in worktree
expecting success:
git checkout -b branch4 HEAD &&
GIT_EDITOR=: git commit --amend \
--author="Somebody else <somebody@else.com>" &&
test $(git rev-parse branch3) != $(git rev-parse branch4) &&
set_fake_editor &&
git rebase -i branch3 &&
test $(git rev-parse branch3) = $(git rev-parse branch4)
Switched to a new branch 'branch4'
[branch4 f319a3b] Add head
Author: Somebody else <somebody@else.com>
Date: Thu Apr 7 15:57:13 2005 -0700
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 BODY
create mode 100644 HEAD
Successfully rebased and updated refs/heads/branch4.
ok 51 - do "noop" when there is nothing to cherry-pick
expecting success:
git checkout A &&
mkdir sub &&
(
cd sub && git init && >elif &&
git add elif && git commit -m "submodule initial"
) &&
echo 1 >file1 &&
git add file1 sub &&
test_tick &&
git commit -m "One" &&
echo 2 >file1 &&
test_tick &&
git commit -a -m "Two" &&
(
cd sub && echo 3 >elif &&
git commit -a -m "submodule second"
) &&
test_tick &&
set_fake_editor &&
git commit -a -m "Three changes submodule"
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 6e62bf8 A
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3404-rebase-interactive/sub/.git/
[master (root-commit) e55c6ab] submodule initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 elif
warning: adding embedded git repository: sub
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sub
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sub
hint:
hint: See "git help submodule" for more information.
[detached HEAD 5ce31eb] One
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 160000 sub
[detached HEAD 33d2172] Two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 09b09c5] submodule second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[detached HEAD e33b8b0] Three changes submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 52 - submodule rebase setup
expecting success:
set_fake_editor &&
FAKE_LINES="1 squash 2 3" git rebase -i A
rebase -i script before editing:
pick 5ce31eb One
pick 33d2172 Two
pick e33b8b0 Three changes submodule
rebase -i script after editing:
pick 5ce31eb One
squash 33d2172 Two
pick e33b8b0 Three changes submodule
Rebasing (2/3)
[detached HEAD 54e1cc5] One
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:58:13 2005 -0700
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 160000 sub
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
ok 53 - submodule rebase -i
expecting success:
git tag submodule-base &&
git checkout HEAD^ &&
(
cd sub && git checkout HEAD^ && echo 4 >elif &&
git add elif && git commit -m "submodule conflict"
) &&
git add sub &&
test_tick &&
git commit -m "Conflict in submodule" &&
git tag submodule-topic
Previous HEAD position was 598b989 Three changes submodule
HEAD is now at 54e1cc5 One
M sub
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at e55c6ab submodule initial
[detached HEAD 87d979c] submodule conflict
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[detached HEAD 38f6f82] Conflict in submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 54 - submodule conflict setup
expecting success:
set_fake_editor &&
test_must_fail git rebase -i submodule-base &&
git add sub &&
git rebase --continue &&
test $(git rev-parse submodule-base) != $(git rev-parse HEAD)
Rebasing (1/1)
Failed to merge submodule sub (merge following commits not found)
Auto-merging sub
CONFLICT (submodule): Merge conflict in sub
error: could not apply 38f6f82... Conflict in submodule
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 38f6f82... Conflict in submodule
[detached HEAD ce1c879] Conflict in submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated detached HEAD.
ok 55 - rebase -i continue with only submodule staged
expecting success:
git checkout submodule-topic &&
git reset --hard &&
set_fake_editor &&
test_must_fail git rebase -i submodule-base &&
git reset &&
git rebase --continue &&
test $(git rev-parse submodule-base) = $(git rev-parse HEAD)
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
ce1c879 Conflict in submodule
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> ce1c879
HEAD is now at 38f6f82 Conflict in submodule
HEAD is now at 38f6f82 Conflict in submodule
Rebasing (1/1)
Failed to merge submodule sub (merge following commits not found)
Auto-merging sub
CONFLICT (submodule): Merge conflict in sub
error: could not apply 38f6f82... Conflict in submodule
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 38f6f82... Conflict in submodule
Unstaged changes after reset:
M sub
Successfully rebased and updated detached HEAD.
ok 56 - rebase -i continue with unstaged submodule
expecting success:
git checkout master &&
git reset --hard &&
test-tool chmtime =123456789 file3 &&
git update-index --refresh &&
HEAD=$(git rev-parse HEAD) &&
set_fake_editor &&
git rebase -i HEAD~4 &&
test $HEAD = $(git rev-parse HEAD) &&
MTIME=$(test-tool chmtime --get file3) &&
test 123456789 = $MTIME
warning: unable to rmdir 'sub': Directory not empty
Previous HEAD position was 598b989 Three changes submodule
Switched to branch 'master'
HEAD is now at 8f99a4f E
Successfully rebased and updated refs/heads/master.
ok 57 - avoid unnecessary reset
expecting success:
git checkout -b reword-branch master &&
set_fake_editor &&
FAKE_LINES="1 2 3 reword 4" FAKE_COMMIT_MESSAGE="E changed" git rebase -i A &&
git show HEAD | grep "E changed" &&
test $(git rev-parse master) != $(git rev-parse HEAD) &&
test $(git rev-parse master^) = $(git rev-parse HEAD^) &&
FAKE_LINES="1 2 reword 3 4" FAKE_COMMIT_MESSAGE="D changed" git rebase -i A &&
git show HEAD^ | grep "D changed" &&
FAKE_LINES="reword 1 2 3 4" FAKE_COMMIT_MESSAGE="B changed" git rebase -i A &&
git show HEAD~3 | grep "B changed" &&
FAKE_LINES="1 r 2 pick 3 p 4" FAKE_COMMIT_MESSAGE="C changed" git rebase -i A &&
git show HEAD~2 | grep "C changed"
Switched to a new branch 'reword-branch'
rebase -i script before editing:
pick 313fe96 B
pick d0f65f2 C
pick 0547e3f D
pick 8f99a4f E
rebase -i script after editing:
pick 313fe96 B
pick d0f65f2 C
pick 0547e3f D
reword 8f99a4f E
Rebasing (4/4)
[detached HEAD d090e5d] E changed
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 file3
Successfully rebased and updated refs/heads/reword-branch.
E changed
rebase -i script before editing:
pick 313fe96 B
pick d0f65f2 C
pick 0547e3f D
pick d090e5d E changed
rebase -i script after editing:
pick 313fe96 B
pick d0f65f2 C
reword 0547e3f D
pick d090e5d E changed
Rebasing (3/4)
[detached HEAD 3e3c54e] D changed
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (4/4)
Successfully rebased and updated refs/heads/reword-branch.
D changed
rebase -i script before editing:
pick 313fe96 B
pick d0f65f2 C
pick 3e3c54e D changed
pick 5538627 E changed
rebase -i script after editing:
reword 313fe96 B
pick d0f65f2 C
pick 3e3c54e D changed
pick 5538627 E changed
Rebasing (1/4)
[detached HEAD 9af66bc] B changed
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated refs/heads/reword-branch.
B changed
rebase -i script before editing:
pick 9af66bc B changed
pick 5744507 C
pick 115ebf7 D changed
pick e9c082b E changed
rebase -i script after editing:
pick 9af66bc B changed
r 5744507 C
pick 115ebf7 D changed
p e9c082b E changed
Rebasing (2/4)
[detached HEAD 6469cec] C changed
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 file2
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated refs/heads/reword-branch.
C changed
ok 58 - reword
expecting success:
git config notes.rewrite.rebase true &&
git config notes.rewriteRef "refs/notes/*" &&
test_commit n1 &&
test_commit n2 &&
test_commit n3 &&
git notes add -m"a note" n3 &&
set_fake_editor &&
git rebase -i --onto n1 n2 &&
test "a note" = "$(git notes show HEAD)"
[reword-branch 6236f90] n1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 n1.t
[reword-branch db9ef12] n2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 n2.t
[reword-branch e992e2d] n3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 n3.t
Rebasing (1/1)
Successfully rebased and updated refs/heads/reword-branch.
ok 59 - rebase -i can copy notes
expecting success:
cat >expect <<-\EOF &&
an earlier note
a note
EOF
git reset --hard n3 &&
git notes add -m"an earlier note" n2 &&
set_fake_editor &&
GIT_NOTES_REWRITE_MODE=concatenate FAKE_LINES="1 f 2" git rebase -i n1 &&
git notes show > output &&
test_cmp expect output
HEAD is now at e992e2d n3
rebase -i script before editing:
pick db9ef12 n2
pick e992e2d n3
rebase -i script after editing:
pick db9ef12 n2
f e992e2d n3
Rebasing (2/2)
Successfully rebased and updated refs/heads/reword-branch.
ok 60 - rebase -i can copy notes over a fixup
expecting success:
git symbolic-ref HEAD &&
grandparent=$(git rev-parse HEAD~2) &&
test_tick &&
set_fake_editor &&
FAKE_LINES="2 1" git rebase -i HEAD~2 HEAD^0 &&
test $grandparent = $(git rev-parse HEAD~2) &&
test_must_fail git symbolic-ref HEAD
refs/heads/reword-branch
rebase -i script before editing:
pick 6236f90 n1
pick 5ad6f48 n2
rebase -i script after editing:
pick 5ad6f48 n2
pick 6236f90 n1
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
fatal: ref HEAD is not a symbolic ref
ok 61 - rebase while detaching HEAD
expecting success:
git checkout no-ff-branch &&
git tag original-no-ff-branch &&
set_fake_editor &&
git rebase -i --no-ff A &&
for p in 0 1 2
do
test ! $(git rev-parse HEAD~$p) = $(git rev-parse original-no-ff-branch~$p) &&
git diff HEAD~$p original-no-ff-branch~$p > out &&
test_must_be_empty out
done &&
test $(git rev-parse HEAD~3) = $(git rev-parse original-no-ff-branch~3) &&
git diff HEAD~3 original-no-ff-branch~3 > out &&
test_must_be_empty out
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
0561539 n1
9fcdde4 n2
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> 0561539
Switched to branch 'no-ff-branch'
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated refs/heads/no-ff-branch.
ok 62 - always cherry-pick with --no-ff
expecting success:
git checkout -b funny A &&
echo >>file1 &&
test_tick &&
git commit -a -m "end with slash\\" &&
echo >>file1 &&
test_tick &&
git commit -a -m "something (\000) that looks like octal" &&
echo >>file1 &&
test_tick &&
git commit -a -m "something (\n) that looks like a newline" &&
echo >>file1 &&
test_tick &&
git commit -a -m "another commit"
Switched to a new branch 'funny'
[funny 1f68fbe] end with slash\
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[funny fe25f5f] something (\000) that looks like octal
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[funny 48b04f6] something (\n) that looks like a newline
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[funny d415089] another commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 63 - set up commits with funny messages
expecting success:
git rev-list A..funny >expect &&
test_tick &&
set_fake_editor &&
FAKE_LINES="1 2 3 4" git rebase -i A &&
git rev-list A.. >actual &&
test_cmp expect actual
rebase -i script before editing:
pick 1f68fbe end with slash\
pick fe25f5f something (\000) that looks like octal
pick 48b04f6 something (\n) that looks like a newline
pick d415089 another commit
rebase -i script after editing:
pick 1f68fbe end with slash\
pick fe25f5f something (\000) that looks like octal
pick 48b04f6 something (\n) that looks like a newline
pick d415089 another commit
Successfully rebased and updated refs/heads/funny.
ok 64 - rebase-i history with funny messages
expecting success:
git checkout master &&
git checkout -b execute &&
test_commit one_exec main.txt one_exec &&
test_commit two_exec main.txt two_exec &&
test_commit three_exec main.txt three_exec
Switched to branch 'master'
Switched to a new branch 'execute'
[execute 7ea0247] one_exec
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 main.txt
[execute 43ac844] two_exec
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[execute 2e6b0ae] three_exec
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 65 - prepare for rebase -i --exec
expecting success:
set_fake_editor &&
git rebase -i --exec "git show HEAD" HEAD~2 >actual &&
(
FAKE_LINES="1 exec_git_show_HEAD 2 exec_git_show_HEAD" &&
export FAKE_LINES &&
git rebase -i HEAD~2 >expect
) &&
sed -e "1,9d" expect >expected &&
test_cmp expected actual
Rebasing (2/4)
Executing: git show HEAD
Rebasing (3/4)
Rebasing (4/4)
Executing: git show HEAD
Successfully rebased and updated refs/heads/execute.
Rebasing (2/4)
Executing: git show HEAD
Rebasing (3/4)
Rebasing (4/4)
Executing: git show HEAD
Successfully rebased and updated refs/heads/execute.
ok 66 - running "git rebase -i --exec git show HEAD"
expecting success:
git reset --hard execute &&
set_fake_editor &&
git rebase --exec "git show HEAD" -i HEAD~2 >actual &&
(
FAKE_LINES="1 exec_git_show_HEAD 2 exec_git_show_HEAD" &&
export FAKE_LINES &&
git rebase -i HEAD~2 >expect
) &&
sed -e "1,9d" expect >expected &&
test_cmp expected actual
HEAD is now at 2e6b0ae three_exec
Rebasing (2/4)
Executing: git show HEAD
Rebasing (3/4)
Rebasing (4/4)
Executing: git show HEAD
Successfully rebased and updated refs/heads/execute.
Rebasing (2/4)
Executing: git show HEAD
Rebasing (3/4)
Rebasing (4/4)
Executing: git show HEAD
Successfully rebased and updated refs/heads/execute.
ok 67 - running "git rebase --exec git show HEAD -i"
expecting success:
git reset --hard execute &&
set_fake_editor &&
git rebase -ix "git show HEAD" HEAD~2 >actual &&
(
FAKE_LINES="1 exec_git_show_HEAD 2 exec_git_show_HEAD" &&
export FAKE_LINES &&
git rebase -i HEAD~2 >expect
) &&
sed -e "1,9d" expect >expected &&
test_cmp expected actual
HEAD is now at 2e6b0ae three_exec
Rebasing (2/4)
Executing: git show HEAD
Rebasing (3/4)
Rebasing (4/4)
Executing: git show HEAD
Successfully rebased and updated refs/heads/execute.
Rebasing (2/4)
Executing: git show HEAD
Rebasing (3/4)
Rebasing (4/4)
Executing: git show HEAD
Successfully rebased and updated refs/heads/execute.
ok 68 - running "git rebase -ix git show HEAD"
expecting success:
git reset --hard execute &&
set_fake_editor &&
git rebase -ix "git show HEAD; pwd" HEAD~2 >actual &&
(
FAKE_LINES="1 exec_git_show_HEAD;_pwd 2 exec_git_show_HEAD;_pwd" &&
export FAKE_LINES &&
git rebase -i HEAD~2 >expect
) &&
sed -e "1,9d" expect >expected &&
test_cmp expected actual
HEAD is now at 2e6b0ae three_exec
Rebasing (2/4)
Executing: git show HEAD; pwd
Rebasing (3/4)
Rebasing (4/4)
Executing: git show HEAD; pwd
Successfully rebased and updated refs/heads/execute.
Rebasing (2/4)
Executing: git show HEAD; pwd
Rebasing (3/4)
Rebasing (4/4)
Executing: git show HEAD; pwd
Successfully rebased and updated refs/heads/execute.
ok 69 - rebase -ix with several <CMD>
expecting success:
git reset --hard execute &&
set_fake_editor &&
git rebase -i --exec "git show HEAD" --exec "pwd" HEAD~2 >actual &&
(
FAKE_LINES="1 exec_git_show_HEAD exec_pwd 2
exec_git_show_HEAD exec_pwd" &&
export FAKE_LINES &&
git rebase -i HEAD~2 >expect
) &&
sed -e "1,11d" expect >expected &&
test_cmp expected actual
HEAD is now at 2e6b0ae three_exec
Rebasing (2/6)
Executing: git show HEAD
Rebasing (3/6)
Executing: pwd
Rebasing (4/6)
Rebasing (5/6)
Executing: git show HEAD
Rebasing (6/6)
Executing: pwd
Successfully rebased and updated refs/heads/execute.
Rebasing (2/6)
Executing: git show HEAD
Rebasing (3/6)
Executing: pwd
Rebasing (4/6)
Rebasing (5/6)
Executing: git show HEAD
Rebasing (6/6)
Executing: pwd
Successfully rebased and updated refs/heads/execute.
ok 70 - rebase -ix with several instances of --exec
expecting success:
git reset --hard execute &&
git checkout -b autosquash &&
echo second >second.txt &&
git add second.txt &&
git commit -m "fixup! two_exec" &&
echo bis >bis.txt &&
git add bis.txt &&
git commit -m "fixup! two_exec" &&
set_fake_editor &&
(
git checkout -b autosquash_actual &&
git rebase -i --exec "git show HEAD" --autosquash HEAD~4 >actual
) &&
git checkout autosquash &&
(
git checkout -b autosquash_expected &&
FAKE_LINES="1 fixup 3 fixup 4 exec_git_show_HEAD 2 exec_git_show_HEAD" &&
export FAKE_LINES &&
git rebase -i HEAD~4 >expect
) &&
sed -e "1,13d" expect >expected &&
test_cmp expected actual
HEAD is now at 2e6b0ae three_exec
Switched to a new branch 'autosquash'
[autosquash 0282a0b] fixup! two_exec
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 second.txt
[autosquash 8afa978] fixup! two_exec
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bis.txt
Switched to a new branch 'autosquash_actual'
Rebasing (2/6)
Rebasing (3/6)
Rebasing (4/6)
Executing: git show HEAD
Rebasing (5/6)
Rebasing (6/6)
Executing: git show HEAD
Successfully rebased and updated refs/heads/autosquash_actual.
Switched to branch 'autosquash'
Switched to a new branch 'autosquash_expected'
Rebasing (2/6)
Rebasing (3/6)
Rebasing (4/6)
Executing: git show HEAD
Rebasing (5/6)
Rebasing (6/6)
Executing: git show HEAD
Successfully rebased and updated refs/heads/autosquash_expected.
ok 71 - rebase -ix with --autosquash
expecting success:
git reset --hard execute &&
rm -rf exec_output &&
EDITOR="echo >invoked_editor" git rebase --exec "echo a line >>exec_output" HEAD~2 2>actual &&
test_i18ngrep "Successfully rebased and updated" actual &&
test_line_count = 2 exec_output &&
test_path_is_missing invoked_editor
HEAD is now at 2e6b0ae three_exec
Successfully rebased and updated refs/heads/autosquash_expected.
ok 72 - rebase --exec works without -i
expecting success:
git reset --hard execute &&
set_fake_editor &&
test_must_fail git rebase -i --exec 2>actual &&
test_i18ngrep "requires a value" actual &&
git checkout master
HEAD is now at 2e6b0ae three_exec
error: option `exec' requires a value
Switched to branch 'master'
ok 73 - rebase -i --exec without <CMD>
expecting success:
git checkout E &&
set_fake_editor &&
FAKE_LINES="3 1 2 5" git rebase -i --root &&
test E = $(git cat-file commit HEAD | sed -ne \$p) &&
test B = $(git cat-file commit HEAD^ | sed -ne \$p) &&
test A = $(git cat-file commit HEAD^^ | sed -ne \$p) &&
test C = $(git cat-file commit HEAD^^^ | sed -ne \$p) &&
test 0 = $(git cat-file commit HEAD^^^ | grep -c ^parent\ )
Note: switching to 'E'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8f99a4f E
rebase -i script before editing:
pick 6e62bf8 A
pick 313fe96 B
pick d0f65f2 C
pick 0547e3f D
pick 8f99a4f E
rebase -i script after editing:
pick d0f65f2 C
pick 6e62bf8 A
pick 313fe96 B
pick 8f99a4f E
Rebasing (1/4)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated detached HEAD.
ok 74 - rebase -i --root re-order and drop commits
expecting success:
git checkout A &&
echo B >file7 &&
git add file7 &&
GIT_AUTHOR_NAME="Twerp Snog" git commit -m "different author" &&
set_fake_editor &&
FAKE_LINES="2" git rebase -i --root &&
git cat-file commit HEAD | grep -q "^author Twerp Snog" &&
git cat-file commit HEAD | grep -q "^different author$"
Warning: you are leaving 4 commits behind, not connected to
any of your branches:
47650e9 E
08e1905 B
180496a A
67a3cca C
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> 47650e9
HEAD is now at 6e62bf8 A
[detached HEAD 58dccf5] different author
Author: Twerp Snog <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file7
rebase -i script before editing:
pick 6e62bf8 A
pick 58dccf5 different author
rebase -i script after editing:
pick 58dccf5 different author
Rebasing (1/1)
Successfully rebased and updated detached HEAD.
ok 75 - rebase -i --root retain root commit author and message
expecting success:
git checkout B &&
set_fake_editor &&
test_must_fail env FAKE_LINES="2" git rebase -i --root &&
git cat-file commit HEAD | grep "^tree 4b825dc642cb" &&
git rebase --abort
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
9a68227 different author
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> 9a68227
HEAD is now at 313fe96 B
warning: cancelling a cherry picking in progress
rebase -i script before editing:
pick 6e62bf8 A
pick 313fe96 B
rebase -i script after editing:
pick 313fe96 B
Rebasing (1/1)
CONFLICT (modify/delete): file1 deleted in HEAD and modified in 313fe96... B. Version 313fe96... B of file1 left in tree.
error: could not apply 313fe96... B
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 313fe96... B
tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
ok 76 - rebase -i --root temporary sentinel commit
expecting success:
git checkout B &&
set_fake_editor &&
FAKE_LINES="1 fixup 2" git rebase -i --root &&
test A = $(git cat-file commit HEAD | sed -ne \$p) &&
test B = $(git show HEAD:file1) &&
test 0 = $(git cat-file commit HEAD | grep -c ^parent\ )
HEAD is now at 313fe96 B
rebase -i script before editing:
pick 6e62bf8 A
pick 313fe96 B
rebase -i script after editing:
pick 6e62bf8 A
fixup 313fe96 B
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 77 - rebase -i --root fixup root commit
expecting success:
test_when_finished "test_might_fail git rebase --abort" &&
git checkout -b reword-root-branch master &&
set_fake_editor &&
FAKE_LINES="reword 1 2" FAKE_COMMIT_MESSAGE="A changed" \
git rebase -i --root &&
git show HEAD^ | grep "A changed" &&
test -z "$(git show -s --format=%p HEAD^)"
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
bdd3fb6 A
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> bdd3fb6
Switched to a new branch 'reword-root-branch'
rebase -i script before editing:
pick 6e62bf8 A
pick 313fe96 B
pick d0f65f2 C
pick 0547e3f D
pick 8f99a4f E
rebase -i script after editing:
reword 6e62bf8 A
pick 313fe96 B
Rebasing (1/2)
[detached HEAD 2c7b91b] A changed
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 file1
Rebasing (2/2)
Successfully rebased and updated refs/heads/reword-root-branch.
A changed
fatal: No rebase in progress?
ok 78 - rebase -i --root reword root commit
expecting success:
test_when_finished "reset_rebase" &&
git checkout -b failing-root-pick A &&
echo x >file2 &&
git rm file1 &&
git commit -m "remove file 1 add file 2" &&
echo z >file1 &&
set_fake_editor &&
test_must_fail env FAKE_LINES="1 2" git rebase -i --root &&
rm file1 &&
git rebase --continue &&
test "$(git log -1 --format=%B)" = "remove file 1 add file 2" &&
test "$(git rev-list --count HEAD)" = 2
Switched to a new branch 'failing-root-pick'
rm 'file1'
[failing-root-pick 6a91dc2] remove file 1 add file 2
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 file1
rebase -i script before editing:
pick 6e62bf8 A
pick 6a91dc2 remove file 1 add file 2
rebase -i script after editing:
pick 6e62bf8 A
pick 6a91dc2 remove file 1 add file 2
Rebasing (1/2)
error: The following untracked working tree files would be overwritten by merge:
file1
Please move or remove them before you merge.
Aborting
hint: Could not execute the todo command
hint:
hint: pick 6e62bf890e21973b771e4e6fc28f5ade62edb4bc A
hint:
hint: It has been rescheduled; To edit the command before continuing, please
hint: edit the todo list first:
hint:
hint: git rebase --edit-todo
hint: git rebase --continue
Could not apply 6e62bf8... A
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated refs/heads/failing-root-pick.
fatal: No rebase in progress?
HEAD is now at 6a91dc2 remove file 1 add file 2
Removing actual
Removing actual-squash-fixup
Removing error
Removing exec_output
Removing expect
Removing expect-squash-fixup
Removing expect2
Removing expected
Removing fake-editor.sh
Removing file2
Removing out
Removing output
Removing stderr
Removing touch-subdir
ok 79 - rebase -i --root when root has untracked file conflict
expecting success:
test_when_finished "reset_rebase" &&
echo z>file1 &&
set_fake_editor &&
test_must_fail env FAKE_LINES="reword 1 2" \
FAKE_COMMIT_MESSAGE="Modified A" git rebase -i --root &&
rm file1 &&
FAKE_COMMIT_MESSAGE="Reworded A" git rebase --continue &&
test "$(git log -1 --format=%B HEAD^)" = "Reworded A" &&
test "$(git rev-list --count HEAD)" = 2
rebase -i script before editing:
pick 6e62bf8 A
pick 6a91dc2 remove file 1 add file 2
rebase -i script after editing:
reword 6e62bf8 A
pick 6a91dc2 remove file 1 add file 2
Rebasing (1/2)
error: The following untracked working tree files would be overwritten by merge:
file1
Please move or remove them before you merge.
Aborting
hint: Could not execute the todo command
hint:
hint: reword 6e62bf890e21973b771e4e6fc28f5ade62edb4bc A
hint:
hint: It has been rescheduled; To edit the command before continuing, please
hint: edit the todo list first:
hint:
hint: git rebase --edit-todo
hint: git rebase --continue
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
Rebasing (2/3)
[detached HEAD 147eda3] Reworded A
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 file1
Rebasing (3/3)
Successfully rebased and updated refs/heads/failing-root-pick.
fatal: No rebase in progress?
HEAD is now at 98014b8 remove file 1 add file 2
Removing fake-editor.sh
ok 80 - rebase -i --root reword root when root has untracked file conflict
expecting success:
git checkout reword-root-branch &&
git reset --hard &&
git checkout conflict-branch &&
set_fake_editor &&
test_must_fail git rebase --onto HEAD~2 HEAD~ &&
test_must_fail git rebase --edit-todo &&
git rebase --abort
Switched to branch 'reword-root-branch'
HEAD is now at 5b5ca66 B
Switched to branch 'conflict-branch'
First, rewinding head to replay your work on top of it...
Applying: four
Using index info to reconstruct a base tree...
M conflict
Falling back to patching base and 3-way merge...
Merging:
766a798 two
virtual four
found 1 common ancestor:
virtual 3d3da6c4fe4fab218d150e2af365b8b07d465a22
Auto-merging conflict
CONFLICT (content): Merge conflict in conflict
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 four
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
fatal: The --edit-todo action can only be used during interactive rebase.
ok 81 - rebase --edit-todo does not work on non-interactive rebase
expecting success:
git reset --hard &&
git checkout no-conflict-branch^0 &&
set_fake_editor &&
FAKE_LINES="edit 1 2 3" git rebase -i HEAD~3 &&
FAKE_LINES="2 1" git rebase --edit-todo &&
git rebase --continue &&
test M = $(git cat-file commit HEAD^ | sed -ne \$p) &&
test L = $(git cat-file commit HEAD | sed -ne \$p)
HEAD is now at f91a2b3 four
Note: switching to 'no-conflict-branch^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 3389558 M
rebase -i script before editing:
pick 265b89e K
pick 6b0f5e6 L
pick 3389558 M
rebase -i script after editing:
edit 265b89e K
pick 6b0f5e6 L
pick 3389558 M
Rebasing (1/3)
Stopped at 265b89e... K
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
rebase -i script before editing:
pick 6b0f5e6 L
pick 3389558 M
rebase -i script after editing:
pick 3389558 M
pick 6b0f5e6 L
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
ok 82 - rebase --edit-todo can be used to modify todo
expecting success:
git reset --hard &&
git branch -f branch-reflog-test H &&
set_fake_editor &&
git rebase -i --onto I F branch-reflog-test &&
cat >expect <<-\EOF &&
rebase -i (finish): returning to refs/heads/branch-reflog-test
rebase -i (pick): H
rebase -i (pick): G
rebase -i (start): checkout I
EOF
git reflog -n4 HEAD |
sed "s/[^:]*: //" >actual &&
test_cmp expect actual
HEAD is now at e451a0c L
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/branch-reflog-test.
ok 83 - rebase -i produces readable reflog
expecting success:
git reset --hard &&
git checkout E^0 &&
test_config core.commentchar "\\" &&
write_script remove-all-but-first.sh <<-\EOF &&
sed -e "2,\$s/^/\\\\/" "$1" >"$1.tmp" &&
mv "$1.tmp" "$1"
EOF
test_set_editor "$(pwd)/remove-all-but-first.sh" &&
git rebase -i B &&
test B = $(git cat-file commit HEAD^ | sed -ne \$p)
HEAD is now at 0f12e8b H
Note: switching to 'E^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8f99a4f E
Successfully rebased and updated detached HEAD.
ok 84 - rebase -i respects core.commentchar
expecting success:
test_config core.commentchar auto &&
write_script copy-edit-script.sh <<-\EOF &&
cp "$1" edit-script
EOF
test_set_editor "$(pwd)/copy-edit-script.sh" &&
test_when_finished "git rebase --abort || :" &&
git rebase -i HEAD^ &&
test -z "$(grep -ve "^#" -e "^\$" -e "^pick" edit-script)"
Successfully rebased and updated detached HEAD.
fatal: No rebase in progress?
ok 85 - rebase -i respects core.commentchar=auto
expecting success:
test_when_finished "git branch -D torebase" &&
git checkout -b torebase branch1 &&
upstream=$(git rev-parse ":/J") &&
onto=$(git rev-parse ":/A") &&
git rebase --onto $onto $upstream &&
git reset --hard branch1 &&
git rebase --onto ":/A" ":/J" &&
git checkout branch1
Previous HEAD position was d0f65f2 C
Switched to a new branch 'torebase'
First, rewinding head to replay your work on top of it...
Applying: different author
HEAD is now at d2d5ba7 different author
First, rewinding head to replay your work on top of it...
Applying: different author
Switched to branch 'branch1'
Deleted branch torebase (was fecb626).
ok 86 - rebase -i, with <onto> and <upstream> specified as :/quuxery
expecting success:
git checkout -b conflict-merge-use-theirs conflict-branch &&
git reset --hard HEAD^ &&
echo five >conflict &&
echo Z >file1 &&
git commit -a -m "one file conflict" &&
EDITOR=true git rebase -i --strategy=recursive -Xours conflict-branch &&
test $(git show conflict-branch:conflict) = $(cat conflict) &&
test $(cat file1) = Z
Switched to a new branch 'conflict-merge-use-theirs'
HEAD is now at 1eadf03 three
[conflict-merge-use-theirs 6c260ff] one file conflict
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
Rebasing (1/1)
Successfully rebased and updated refs/heads/conflict-merge-use-theirs.
ok 87 - rebase -i with --strategy and -X
expecting success:
git checkout -b conflict-merge-use-theirs-interrupted conflict-branch &&
git reset --hard HEAD^ &&
>breakpoint &&
git add breakpoint &&
git commit -m "breakpoint for interactive mode" &&
echo five >conflict &&
echo Z >file1 &&
git commit -a -m "one file conflict" &&
set_fake_editor &&
FAKE_LINES="edit 1 2" git rebase -i --strategy=recursive -Xours conflict-branch &&
git rebase --continue &&
test $(git show conflict-branch:conflict) = $(cat conflict) &&
test $(cat file1) = Z
Switched to a new branch 'conflict-merge-use-theirs-interrupted'
HEAD is now at 1eadf03 three
[conflict-merge-use-theirs-interrupted 954dbfe] breakpoint for interactive mode
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 breakpoint
[conflict-merge-use-theirs-interrupted 7844180] one file conflict
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
rebase -i script before editing:
pick 954dbfe breakpoint for interactive mode
pick 7844180 one file conflict
rebase -i script after editing:
edit 954dbfe breakpoint for interactive mode
pick 7844180 one file conflict
Rebasing (1/2)
Stopped at 954dbfe... breakpoint for interactive mode
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
Rebasing (2/2)
Successfully rebased and updated refs/heads/conflict-merge-use-theirs-interrupted.
ok 88 - interrupted rebase -i with --strategy and -X
expecting success:
current_head=$(git rev-parse HEAD) &&
test_when_finished "git rebase --abort; git reset --hard $current_head; rm -f error" &&
test_commit TO-REMOVE will-conflict old-content &&
test_commit "\temp" will-conflict new-content dummy &&
test_must_fail env EDITOR=true git rebase -i HEAD^ --onto HEAD^^ 2>error &&
test_expect_code 1 grep " emp" error
[conflict-merge-use-theirs-interrupted e934043] TO-REMOVE
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 will-conflict
[conflict-merge-use-theirs-interrupted 39e7bea] \temp
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
CONFLICT (modify/delete): will-conflict deleted in HEAD and modified in 39e7bea... \temp. Version 39e7bea... \temp of will-conflict left in tree.
HEAD is now at aa41e68 one file conflict
ok 89 - rebase -i error on commits with \ in message
expecting success:
test_when_finished "git checkout master" &&
git checkout --orphan collide &&
git rm -rf . &&
(
unset test_tick &&
test_commit collide1 collide &&
test_commit --notick collide2 collide &&
test_commit --notick collide3 collide
)
Switched to a new branch 'collide'
rm 'breakpoint'
rm 'conflict'
rm 'file1'
[collide (root-commit) 674fc94] collide1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 collide
[collide 0b53f45] collide2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[collide 6bcda37] collide3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'master'
ok 90 - short SHA-1 setup
expecting success:
test_when_finished "reset_rebase && git checkout master" &&
git checkout collide &&
(
unset test_tick &&
test_tick &&
set_fake_editor &&
FAKE_COMMIT_MESSAGE="collide2 ac4f2ee" \
FAKE_LINES="reword 1 2" git rebase -i HEAD~2
)
Switched to branch 'collide'
rebase -i script before editing:
pick 0b53f45 collide2
pick 6bcda37 collide3
rebase -i script after editing:
reword 0b53f45 collide2
pick 6bcda37 collide3
Rebasing (1/2)
[detached HEAD 6bcda37f] collide2 ac4f2ee
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
Successfully rebased and updated refs/heads/collide.
fatal: No rebase in progress?
HEAD is now at fbe3cf5 collide3
Removing actual
Removing copy-edit-script.sh
Removing edit-script
Removing expect
Removing fake-editor.sh
Removing remove-all-but-first.sh
Switched to branch 'master'
ok 91 - short SHA-1 collide
expecting success:
git config core.abbrev 12 &&
set_cat_todo_editor &&
test_must_fail git rebase -i HEAD~4 >todo-list &&
test 4 = $(grep -c "pick [0-9a-f]\{12,\}" todo-list)
error: There was a problem with the editor '"$FAKE_EDITOR"'.
ok 92 - respect core.abbrev
expecting success:
write_script dump-raw.sh <<-\EOF &&
cat "$1"
EOF
test_set_editor "$(pwd)/dump-raw.sh" &&
git rebase -i HEAD~4 >actual &&
test_i18ngrep "^# Rebase ..* onto ..* ([0-9]" actual
Successfully rebased and updated refs/heads/master.
# Rebase 6e62bf890e21..8f99a4f1fbbd onto 8f99a4f1fbbd (4 commands)
ok 93 - todo count
expecting success:
git checkout --force branch2 &&
git clean -f &&
set_fake_editor &&
FAKE_LINES="edit 1 2" git rebase -i A &&
test_cmp_rev HEAD F &&
test_path_is_missing file6 &&
>file6 &&
test_must_fail git rebase --continue &&
test_cmp_rev HEAD F &&
rm file6 &&
git rebase --continue &&
test_cmp_rev HEAD I
Switched to branch 'branch2'
Removing actual
Removing dump-raw.sh
Removing fake-editor.sh
Removing todo-list
rebase -i script before editing:
pick cfefd94ba3b7 F
pick 615be62cadc1 I
rebase -i script after editing:
edit cfefd94ba3b7 F
pick 615be62cadc1 I
Rebasing (1/2)
Stopped at cfefd94ba3b7... F
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
Rebasing (2/2)
error: The following untracked working tree files would be overwritten by merge:
file6
Please move or remove them before you merge.
Aborting
hint: Could not execute the todo command
hint:
hint: pick 615be62cadc1c85c6ac7d6974210b1aa1721c98f I
hint:
hint: It has been rescheduled; To edit the command before continuing, please
hint: edit the todo list first:
hint:
hint: git rebase --edit-todo
hint: git rebase --continue
Could not apply 615be62cadc1... I
Rebasing (3/3)
Successfully rebased and updated refs/heads/branch2.
ok 94 - rebase -i commits that overwrite untracked files (pick)
expecting success:
git checkout --force branch2 &&
git clean -f &&
git tag original-branch2 &&
set_fake_editor &&
FAKE_LINES="edit 1 squash 2" git rebase -i A &&
test_cmp_rev HEAD F &&
test_path_is_missing file6 &&
>file6 &&
test_must_fail git rebase --continue &&
test_cmp_rev HEAD F &&
rm file6 &&
git rebase --continue &&
test $(git cat-file commit HEAD | sed -ne \$p) = I &&
git reset --hard original-branch2
Already on 'branch2'
Removing fake-editor.sh
rebase -i script before editing:
pick cfefd94ba3b7 F
pick 615be62cadc1 I
rebase -i script after editing:
edit cfefd94ba3b7 F
squash 615be62cadc1 I
Rebasing (1/2)
Stopped at cfefd94ba3b7... F
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
Rebasing (2/2)
error: The following untracked working tree files would be overwritten by merge:
file6
Please move or remove them before you merge.
Aborting
error: merging of trees eb689cc8eed0e8a6ed5383618d1f03cc48bd9f81 and f9b09c5f252e2ce55ab159967e1595879f4525bd failed
hint: Could not execute the todo command
hint:
hint: squash 615be62cadc1c85c6ac7d6974210b1aa1721c98f I
hint:
hint: It has been rescheduled; To edit the command before continuing, please
hint: edit the todo list first:
hint:
hint: git rebase --edit-todo
hint: git rebase --continue
Could not apply 615be62cadc1... I
Rebasing (3/3)
[detached HEAD 331e6d7185ad] F
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:18:13 2005 -0700
2 files changed, 2 insertions(+)
create mode 100644 file4
create mode 100644 file6
Successfully rebased and updated refs/heads/branch2.
HEAD is now at 615be62cadc1 I
ok 95 - rebase -i commits that overwrite untracked files (squash)
expecting success:
git checkout --force branch2 &&
git clean -f &&
set_fake_editor &&
FAKE_LINES="edit 1 2" git rebase -i --no-ff A &&
test $(git cat-file commit HEAD | sed -ne \$p) = F &&
test_path_is_missing file6 &&
>file6 &&
test_must_fail git rebase --continue &&
test $(git cat-file commit HEAD | sed -ne \$p) = F &&
rm file6 &&
git rebase --continue &&
test $(git cat-file commit HEAD | sed -ne \$p) = I
Already on 'branch2'
Removing fake-editor.sh
rebase -i script before editing:
pick cfefd94ba3b7 F
pick 615be62cadc1 I
rebase -i script after editing:
edit cfefd94ba3b7 F
pick 615be62cadc1 I
Rebasing (1/2)
Stopped at cfefd94ba3b7... F
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
Rebasing (2/2)
error: The following untracked working tree files would be overwritten by merge:
file6
Please move or remove them before you merge.
Aborting
error: merging of trees eb689cc8eed0e8a6ed5383618d1f03cc48bd9f81 and f9b09c5f252e2ce55ab159967e1595879f4525bd failed
hint: Could not execute the todo command
hint:
hint: pick 615be62cadc1c85c6ac7d6974210b1aa1721c98f I
hint:
hint: It has been rescheduled; To edit the command before continuing, please
hint: edit the todo list first:
hint:
hint: git rebase --edit-todo
hint: git rebase --continue
Could not apply 615be62cadc1... I
Rebasing (3/3)
Successfully rebased and updated refs/heads/branch2.
ok 96 - rebase -i commits that overwrite untracked files (no ff)
expecting success:
git checkout -b commit-to-skip &&
for double in X 3 1
do
test_seq 5 | sed "s/$double/&&/" >seq &&
git add seq &&
test_tick &&
git commit -m seq-$double
done &&
git tag seq-onto &&
git reset --hard HEAD~2 &&
git cherry-pick seq-onto &&
set_fake_editor &&
test_must_fail env FAKE_LINES= git rebase -i seq-onto &&
test -d .git/rebase-merge &&
git rebase --continue &&
git diff --exit-code seq-onto &&
test ! -d .git/rebase-merge &&
test ! -f .git/CHERRY_PICK_HEAD
Switched to a new branch 'commit-to-skip'
[commit-to-skip 0d911602373a] seq-X
Author: A U Thor <author@example.com>
1 file changed, 5 insertions(+)
create mode 100644 seq
[commit-to-skip c65c87e22263] seq-3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[commit-to-skip f767a3cdc7cb] seq-1
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+), 2 deletions(-)
HEAD is now at 0d911602373a seq-X
Auto-merging seq
[commit-to-skip b846798e3219] seq-1
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:19:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (1/1)
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:
git commit --allow-empty
Otherwise, please use 'git cherry-pick --skip'
interactive rebase in progress; onto f767a3cdc7cb
Last command done (1 command done):
pick b846798e3219 seq-1
No commands remaining.
You are currently rebasing branch 'commit-to-skip' on 'f767a3cdc7cb'.
Untracked files:
fake-editor.sh
sub/
nothing added to commit but untracked files present
Could not apply b846798e3219... seq-1
Successfully rebased and updated refs/heads/commit-to-skip.
ok 97 - rebase --continue removes CHERRY_PICK_HEAD
expecting success:
rebase_setup_and_clean drop-test &&
set_fake_editor &&
FAKE_LINES="1 drop 2 3 d 4 5" git rebase -i --root &&
test E = $(git cat-file commit HEAD | sed -ne \$p) &&
test C = $(git cat-file commit HEAD^ | sed -ne \$p) &&
test A = $(git cat-file commit HEAD^^ | sed -ne \$p)
Switched to a new branch 'drop-test'
rebase -i script before editing:
pick 6e62bf890e21 A
pick 313fe965c048 B
pick d0f65f2f81ee C
pick 0547e3f1350d D
pick 8f99a4f1fbbd E
rebase -i script after editing:
pick 6e62bf890e21 A
drop 313fe965c048 B
pick d0f65f2f81ee C
d 0547e3f1350d D
pick 8f99a4f1fbbd E
Rebasing (1/5)
Rebasing (2/5)
Rebasing (3/5)
Rebasing (4/5)
Rebasing (5/5)
Successfully rebased and updated refs/heads/drop-test.
Switched to branch 'master'
Deleted branch drop-test (was 78e7968917a0).
fatal: No rebase in progress?
ok 98 - drop
expecting success:
test_config rebase.missingCommitsCheck ignore &&
rebase_setup_and_clean missing-commit &&
set_fake_editor &&
FAKE_LINES="1 2 3 4" \
git rebase -i --root 2>actual &&
test D = $(git cat-file commit HEAD | sed -ne \$p) &&
test_i18ngrep \
"Successfully rebased and updated refs/heads/missing-commit" \
actual
Switched to a new branch 'missing-commit'
rebase -i script before editing:
pick 6e62bf890e21 A
pick 313fe965c048 B
pick d0f65f2f81ee C
pick 0547e3f1350d D
pick 8f99a4f1fbbd E
rebase -i script after editing:
pick 6e62bf890e21 A
pick 313fe965c048 B
pick d0f65f2f81ee C
pick 0547e3f1350d D
Rebasing (1/4)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated refs/heads/missing-commit.
Switched to branch 'master'
Deleted branch missing-commit (was 0547e3f1350d).
fatal: No rebase in progress?
ok 99 - rebase -i respects rebase.missingCommitsCheck = ignore
expecting success:
cat >expect <<-EOF &&
Warning: some commits may have been dropped accidentally.
Dropped commits (newer to older):
- $(git rev-list --pretty=oneline --abbrev-commit -1 master)
To avoid this message, use "drop" to explicitly remove a commit.
EOF
test_config rebase.missingCommitsCheck warn &&
rebase_setup_and_clean missing-commit &&
set_fake_editor &&
FAKE_LINES="1 2 3 4" \
git rebase -i --root 2>actual.2 &&
head -n4 actual.2 >actual &&
test_i18ncmp expect actual &&
test D = $(git cat-file commit HEAD | sed -ne \$p)
Switched to a new branch 'missing-commit'
rebase -i script before editing:
pick 6e62bf890e21 A
pick 313fe965c048 B
pick d0f65f2f81ee C
pick 0547e3f1350d D
pick 8f99a4f1fbbd E
rebase -i script after editing:
pick 6e62bf890e21 A
pick 313fe965c048 B
pick d0f65f2f81ee C
pick 0547e3f1350d D
Switched to branch 'master'
Deleted branch missing-commit (was 0547e3f1350d).
fatal: No rebase in progress?
ok 100 - rebase -i respects rebase.missingCommitsCheck = warn
expecting success:
cat >expect <<-EOF &&
Warning: some commits may have been dropped accidentally.
Dropped commits (newer to older):
- $(git rev-list --pretty=oneline --abbrev-commit -1 master)
- $(git rev-list --pretty=oneline --abbrev-commit -1 master~2)
To avoid this message, use "drop" to explicitly remove a commit.
Use 'git config rebase.missingCommitsCheck' to change the level of warnings.
The possible behaviours are: ignore, warn, error.
You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.
Or you can abort the rebase with 'git rebase --abort'.
EOF
test_config rebase.missingCommitsCheck error &&
rebase_setup_and_clean missing-commit &&
set_fake_editor &&
test_must_fail env FAKE_LINES="1 2 4" \
git rebase -i --root 2>actual &&
test_i18ncmp expect actual &&
cp .git/rebase-merge/git-rebase-todo.backup \
.git/rebase-merge/git-rebase-todo &&
FAKE_LINES="1 2 drop 3 4 drop 5" \
git rebase --edit-todo &&
git rebase --continue &&
test D = $(git cat-file commit HEAD | sed -ne \$p) &&
test B = $(git cat-file commit HEAD^ | sed -ne \$p)
Switched to a new branch 'missing-commit'
rebase -i script before editing:
pick 6e62bf890e21 A
pick 313fe965c048 B
pick d0f65f2f81ee C
pick 0547e3f1350d D
pick 8f99a4f1fbbd E
rebase -i script after editing:
pick 6e62bf890e21 A
pick 313fe965c048 B
pick 0547e3f1350d D
rebase -i script before editing:
pick 6e62bf890e21 A
pick 313fe965c048 B
pick d0f65f2f81ee C
pick 0547e3f1350d D
pick 8f99a4f1fbbd E
rebase -i script after editing:
pick 6e62bf890e21 A
pick 313fe965c048 B
drop d0f65f2f81ee C
pick 0547e3f1350d D
drop 8f99a4f1fbbd E
Rebasing (1/5)
Rebasing (2/5)
Rebasing (3/5)
Rebasing (4/5)
Rebasing (5/5)
Successfully rebased and updated refs/heads/missing-commit.
Switched to branch 'master'
Deleted branch missing-commit (was 491b05c4cd85).
fatal: No rebase in progress?
ok 101 - rebase -i respects rebase.missingCommitsCheck = error
expecting success:
rebase_setup_and_clean abbrevcmd &&
test_commit "first" file1.txt "first line" first &&
test_commit "second" file1.txt "another line" second &&
test_commit "fixup! first" file2.txt "first line again" first_fixup &&
test_commit "squash! second" file1.txt "another line here" second_squash &&
cat >expected <<-EOF &&
p $(git rev-list --abbrev-commit -1 first) first
f $(git rev-list --abbrev-commit -1 first_fixup) fixup! first
x git show HEAD
p $(git rev-list --abbrev-commit -1 second) second
s $(git rev-list --abbrev-commit -1 second_squash) squash! second
x git show HEAD
EOF
git checkout abbrevcmd &&
set_cat_todo_editor &&
test_config rebase.abbreviateCommands true &&
test_must_fail git rebase -i --exec "git show HEAD" \
--autosquash master >actual &&
test_cmp expected actual
Switched to a new branch 'abbrevcmd'
[abbrevcmd b00005ce3fdf] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1.txt
[abbrevcmd fd8da51bc9b7] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[abbrevcmd 4425d02c0e30] fixup! first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2.txt
[abbrevcmd 1d2b15ce346d] squash! second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Already on 'abbrevcmd'
error: There was a problem with the editor '"$FAKE_EDITOR"'.
Switched to branch 'master'
Deleted branch abbrevcmd (was 1d2b15ce346d).
fatal: No rebase in progress?
ok 102 - respects rebase.abbreviateCommands with fixup, squash and exec
expecting success:
rebase_setup_and_clean bad-cmd &&
set_fake_editor &&
test_must_fail env FAKE_LINES="1 2 3 bad 4 5" \
git rebase -i --root 2>actual &&
test_i18ngrep "badcmd $(git rev-list --oneline -1 master~1)" actual &&
test_i18ngrep "You can fix this with .git rebase --edit-todo.." actual &&
FAKE_LINES="1 2 3 drop 4 5" git rebase --edit-todo &&
git rebase --continue &&
test E = $(git cat-file commit HEAD | sed -ne \$p) &&
test C = $(git cat-file commit HEAD^ | sed -ne \$p)
Switched to a new branch 'bad-cmd'
rebase -i script before editing:
pick 6e62bf890e21 A
pick 313fe965c048 B
pick d0f65f2f81ee C
pick 0547e3f1350d D
pick 8f99a4f1fbbd E
rebase -i script after editing:
pick 6e62bf890e21 A
pick 313fe965c048 B
pick d0f65f2f81ee C
badcmd 0547e3f1350d D
pick 8f99a4f1fbbd E
error: invalid line 4: badcmd 0547e3f1350d D
You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.
error: invalid line 4: badcmd 0547e3f1350d D
rebase -i script before editing:
pick 6e62bf890e21 A
pick 313fe965c048 B
pick d0f65f2f81ee C
badcmd 0547e3f1350d D
pick 8f99a4f1fbbd E
rebase -i script after editing:
pick 6e62bf890e21 A
pick 313fe965c048 B
pick d0f65f2f81ee C
pick 8f99a4f1fbbd E
Rebasing (1/4)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated refs/heads/bad-cmd.
Switched to branch 'master'
Deleted branch bad-cmd (was 4437898dd1d6).
fatal: No rebase in progress?
ok 103 - static check of bad command
expecting success:
rebase_setup_and_clean indented-comment &&
write_script add-indent.sh <<-\EOF &&
(
# Turn single spaces into space/tab mix
sed "1s/ / /g; 2s/ / /g; 3s/ / /g" "$1"
printf "\n\t# comment\n #more\n\t # comment\n"
) >"$1.new"
mv "$1.new" "$1"
EOF
test_set_editor "$(pwd)/add-indent.sh" &&
git rebase -i HEAD^^^ &&
test E = $(git cat-file commit HEAD | sed -ne \$p)
Switched to a new branch 'indented-comment'
Successfully rebased and updated refs/heads/indented-comment.
Switched to branch 'master'
Deleted branch indented-comment (was 8f99a4f1fbbd).
fatal: No rebase in progress?
ok 104 - tabs and spaces are accepted in the todolist
expecting success:
rebase_setup_and_clean bad-sha &&
set_fake_editor &&
test_must_fail env FAKE_LINES="1 2 edit fakesha 3 4 5 #" \
git rebase -i --root 2>actual &&
test_i18ngrep "edit XXXXXXX False commit" actual &&
test_i18ngrep "You can fix this with .git rebase --edit-todo.." actual &&
FAKE_LINES="1 2 4 5 6" git rebase --edit-todo &&
git rebase --continue &&
test E = $(git cat-file commit HEAD | sed -ne \$p)
Switched to a new branch 'bad-sha'
rebase -i script before editing:
pick 6e62bf890e21 A
pick 313fe965c048 B
pick d0f65f2f81ee C
pick 0547e3f1350d D
pick 8f99a4f1fbbd E
rebase -i script after editing:
pick 6e62bf890e21 A
pick 313fe965c048 B
edit XXXXXXX False commit
pick d0f65f2f81ee C
pick 0547e3f1350d D
pick 8f99a4f1fbbd E
# comment
error: invalid line 3: edit XXXXXXX False commit
You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.
error: could not parse 'False commit
pick d0f65f2f81ee C
pick 0547e3f1350d D
pick 8f99a4f1fbbd E
'
error: invalid line 3: edit XXXXXXX False commit
rebase -i script before editing:
pick 6e62bf890e21 A
pick 313fe965c048 B
edit XXXXXXX False commit
pick d0f65f2f81ee C
pick 0547e3f1350d D
pick 8f99a4f1fbbd E
rebase -i script after editing:
pick 6e62bf890e21 A
pick 313fe965c048 B
pick d0f65f2f81ee C
pick 0547e3f1350d D
pick 8f99a4f1fbbd E
Rebasing (1/5)
Rebasing (2/5)
Rebasing (3/5)
Rebasing (4/5)
Rebasing (5/5)
Successfully rebased and updated refs/heads/bad-sha.
Switched to branch 'master'
Deleted branch bad-sha (was 8f99a4f1fbbd).
fatal: No rebase in progress?
ok 105 - static check of bad SHA-1
expecting success:
git checkout -b with-crlf &&
write_script add-crs.sh <<-\EOF &&
sed -e "s/\$/Q/" <"$1" | tr Q "\\015" >"$1".new &&
mv -f "$1".new "$1"
EOF
(
test_set_editor "$(pwd)/add-crs.sh" &&
git rebase -i HEAD^
)
Switched to a new branch 'with-crlf'
Successfully rebased and updated refs/heads/with-crlf.
ok 106 - editor saves as CR/LF
expecting success:
test_when_finished "test_might_fail git rebase --abort" &&
set_fake_editor &&
FAKE_LINES="edit 1" git rebase -i --gpg-sign="\"S I Gner\"" HEAD^ \
>out 2>err &&
test_i18ngrep "$SQ-S\"S I Gner\"$SQ" err
git commit --amend '-S"S I Gner"'
ok 107 - rebase -i --gpg-sign=<key-id>
expecting success:
test_when_finished "test_might_fail git rebase --abort" &&
test_config commit.gpgsign true &&
set_fake_editor &&
FAKE_LINES="edit 1" git rebase -i --gpg-sign="\"S I Gner\"" HEAD^ \
>out 2>err &&
test_i18ngrep "$SQ-S\"S I Gner\"$SQ" err
git commit --amend '-S"S I Gner"'
ok 108 - rebase -i --gpg-sign=<key-id> overrides commit.gpgSign
expecting success:
rebase_setup_and_clean author-header no-conflict-branch &&
set_fake_editor &&
git commit --amend --author="Au ${SQ}thor <author@example.com>" --no-edit &&
git cat-file commit HEAD | grep ^author >expected &&
FAKE_LINES="5 1" git rebase -i --root &&
git cat-file commit HEAD^ | grep ^author >actual &&
test_cmp expected actual
Switched to a new branch 'author-header'
[author-header 8885cf119513] M
Author: Au 'thor <author@example.com>
Date: Thu Apr 7 15:29:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 fileM
rebase -i script before editing:
pick 6e62bf890e21 A
pick 808874f7b187 J
pick 265b89e813d4 K
pick 6b0f5e6c3e83 L
pick 8885cf119513 M
rebase -i script after editing:
pick 8885cf119513 M
pick 6e62bf890e21 A
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/author-header.
Switched to branch 'master'
Deleted branch author-header (was a256495e7fd6).
fatal: No rebase in progress?
ok 109 - valid author header after --root swap
expecting success:
rebase_setup_and_clean author-header no-conflict-branch &&
set_fake_editor &&
git commit --amend --author="Au ${SQ}thor <author@example.com>" --no-edit &&
git cat-file commit HEAD | grep ^author >expected &&
FAKE_LINES="2" git rebase -i HEAD~2 &&
git cat-file commit HEAD | grep ^author >actual &&
test_cmp expected actual
Switched to a new branch 'author-header'
[author-header 8885cf119513] M
Author: Au 'thor <author@example.com>
Date: Thu Apr 7 15:29:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 fileM
rebase -i script before editing:
pick 6b0f5e6c3e83 L
pick 8885cf119513 M
rebase -i script after editing:
pick 8885cf119513 M
Rebasing (1/1)
Successfully rebased and updated refs/heads/author-header.
Switched to branch 'master'
Deleted branch author-header (was 6c06a33b188d).
fatal: No rebase in progress?
ok 110 - valid author header when author contains single quote
# still have 1 known breakage(s)
# passed all remaining 109 test(s)
1..110
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3422-rebase-incompatible-options.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3422-rebase-incompatible-options/.git/
expecting success:
test_seq 2 9 >foo &&
git add foo &&
git commit -m orig &&
git branch A &&
git branch B &&
git checkout A &&
test_seq 1 9 >foo &&
git add foo &&
git commit -m A &&
git checkout B &&
echo "q qfoo();" | q_to_tab >>foo &&
git add foo &&
git commit -m B
[master (root-commit) 441d77d] orig
Author: A U Thor <author@example.com>
1 file changed, 8 insertions(+)
create mode 100644 foo
Switched to branch 'A'
[A c115684] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'B'
[B 8c4de28] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
git checkout B^0 &&
test_must_fail git rebase --whitespace=fix --merge A
Note: switching to 'B^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 2 - --whitespace=fix incompatible with --merge
expecting success:
git checkout B^0 &&
test_must_fail git rebase --whitespace=fix --strategy=ours A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 3 - --whitespace=fix incompatible with --strategy=ours
expecting success:
git checkout B^0 &&
test_must_fail git rebase --whitespace=fix --strategy-option=ours A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 4 - --whitespace=fix incompatible with --strategy-option=ours
expecting success:
git checkout B^0 &&
test_must_fail git rebase --whitespace=fix --interactive A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 5 - --whitespace=fix incompatible with --interactive
expecting success:
git checkout B^0 &&
test_must_fail git rebase --whitespace=fix --exec 'true' A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 6 - --whitespace=fix incompatible with --exec
expecting success:
git checkout B^0 &&
test_must_fail git rebase --ignore-whitespace --merge A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 7 - --ignore-whitespace incompatible with --merge
expecting success:
git checkout B^0 &&
test_must_fail git rebase --ignore-whitespace --strategy=ours A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 8 - --ignore-whitespace incompatible with --strategy=ours
expecting success:
git checkout B^0 &&
test_must_fail git rebase --ignore-whitespace --strategy-option=ours A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 9 - --ignore-whitespace incompatible with --strategy-option=ours
expecting success:
git checkout B^0 &&
test_must_fail git rebase --ignore-whitespace --interactive A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 10 - --ignore-whitespace incompatible with --interactive
expecting success:
git checkout B^0 &&
test_must_fail git rebase --ignore-whitespace --exec 'true' A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 11 - --ignore-whitespace incompatible with --exec
expecting success:
git checkout B^0 &&
test_must_fail git rebase --committer-date-is-author-date --merge A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 12 - --committer-date-is-author-date incompatible with --merge
expecting success:
git checkout B^0 &&
test_must_fail git rebase --committer-date-is-author-date --strategy=ours A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 13 - --committer-date-is-author-date incompatible with --strategy=ours
expecting success:
git checkout B^0 &&
test_must_fail git rebase --committer-date-is-author-date --strategy-option=ours A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 14 - --committer-date-is-author-date incompatible with --strategy-option=ours
expecting success:
git checkout B^0 &&
test_must_fail git rebase --committer-date-is-author-date --interactive A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 15 - --committer-date-is-author-date incompatible with --interactive
expecting success:
git checkout B^0 &&
test_must_fail git rebase --committer-date-is-author-date --exec 'true' A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 16 - --committer-date-is-author-date incompatible with --exec
expecting success:
git checkout B^0 &&
test_must_fail git rebase -C4 --merge A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 17 - -C4 incompatible with --merge
expecting success:
git checkout B^0 &&
test_must_fail git rebase -C4 --strategy=ours A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 18 - -C4 incompatible with --strategy=ours
expecting success:
git checkout B^0 &&
test_must_fail git rebase -C4 --strategy-option=ours A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 19 - -C4 incompatible with --strategy-option=ours
expecting success:
git checkout B^0 &&
test_must_fail git rebase -C4 --interactive A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 20 - -C4 incompatible with --interactive
expecting success:
git checkout B^0 &&
test_must_fail git rebase -C4 --exec 'true' A
HEAD is now at 8c4de28 B
fatal: cannot combine am options with either interactive or merge options
ok 21 - -C4 incompatible with --exec
checking prerequisite: REBASE_P
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test -z "$GIT_TEST_SKIP_REBASE_P"
)
prerequisite REBASE_P ok
expecting success:
git checkout B^0 &&
test_must_fail git rebase --preserve-merges --signoff A
HEAD is now at 8c4de28 B
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
fatal: cannot combine '--signoff' with '--preserve-merges'
ok 22 - --preserve-merges incompatible with --signoff
expecting success:
git checkout B^0 &&
test_must_fail git rebase --preserve-merges --rebase-merges A
HEAD is now at 8c4de28 B
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
fatal: cannot combine '--preserve-merges' with '--rebase-merges'
ok 23 - --preserve-merges incompatible with --rebase-merges
expecting success:
git checkout B^0 &&
test_must_fail git rebase --rebase-merges -s resolve A
HEAD is now at 8c4de28 B
fatal: cannot combine '--rebase-merges' with '--strategy'
ok 24 - --rebase-merges incompatible with --strategy
expecting success:
git checkout B^0 &&
test_must_fail git rebase --rebase-merges -Xignore-space-change A
HEAD is now at 8c4de28 B
fatal: cannot combine '--rebase-merges' with '--strategy-option'
ok 25 - --rebase-merges incompatible with --strategy-option
# passed all 25 test(s)
1..25
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3423-rebase-reword.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3423-rebase-reword/.git/
expecting success:
test_commit master file-1 test &&
git checkout -b stuff &&
test_commit feature_a file-2 aaa &&
test_commit feature_b file-2 ddd
[master (root-commit) 1b67fbb] master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file-1
Switched to a new branch 'stuff'
[stuff 94f30ac] feature_a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file-2
[stuff 97706f8] feature_b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
test_when_finished "reset_rebase" &&
git checkout stuff^0 &&
set_fake_editor &&
FAKE_LINES="pick 1 reword 2" FAKE_COMMIT_MESSAGE="feature_b_reworded" \
git rebase -i -v master &&
test "$(git log -1 --format=%B)" = "feature_b_reworded" &&
test $(git rev-list --count HEAD) = 3
Note: switching to 'stuff^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 97706f8 feature_b
warning: refname 'master' is ambiguous.
warning: refname 'master' is ambiguous.
Changes from 1b67fbb47bfbc89766d785c152239ac6bc83af30 to 1b67fbb47bfbc89766d785c152239ac6bc83af30:
rebase -i script before editing:
pick 94f30ac feature_a
pick 97706f8 feature_b
rebase -i script after editing:
pick 94f30ac feature_a
reword 97706f8 feature_b
Previous HEAD position was 97706f8 feature_b
HEAD is now at 94f30ac feature_a
Rebasing (2/2)
[detached HEAD ac09183] feature_b_reworded
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated detached HEAD.
fatal: No rebase in progress?
HEAD is now at ac09183 feature_b_reworded
Removing fake-editor.sh
ok 2 - reword without issues functions as intended
expecting success:
test_when_finished "reset_rebase" &&
git checkout stuff^0 &&
set_fake_editor &&
test_must_fail env FAKE_LINES="reword 2" \
git rebase -i -v master &&
git checkout --theirs file-2 &&
git add file-2 &&
FAKE_COMMIT_MESSAGE="feature_b_reworded" git rebase --continue &&
test "$(git log -1 --format=%B)" = "feature_b_reworded" &&
test $(git rev-list --count HEAD) = 2
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
ac09183 feature_b_reworded
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> ac09183
HEAD is now at 97706f8 feature_b
warning: refname 'master' is ambiguous.
warning: refname 'master' is ambiguous.
Changes from 1b67fbb47bfbc89766d785c152239ac6bc83af30 to 1b67fbb47bfbc89766d785c152239ac6bc83af30:
rebase -i script before editing:
pick 94f30ac feature_a
pick 97706f8 feature_b
rebase -i script after editing:
reword 97706f8 feature_b
Previous HEAD position was 97706f8 feature_b
HEAD is now at 1b67fbb master
Rebasing (1/1)
CONFLICT (modify/delete): file-2 deleted in HEAD and modified in 97706f8... feature_b. Version 97706f8... feature_b of file-2 left in tree.
error: could not apply 97706f8... feature_b
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 97706f8... feature_b
Updated 1 path from the index
[detached HEAD 1c9291c] feature_b_reworded
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file-2
Successfully rebased and updated detached HEAD.
fatal: No rebase in progress?
HEAD is now at 1c9291c feature_b_reworded
Removing fake-editor.sh
ok 3 - reword after a conflict preserves commit
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3420-rebase-autostash.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3420-rebase-autostash/.git/
expecting success:
echo hello-world >file0 &&
git add . &&
test_tick &&
git commit -m "initial commit" &&
git checkout -b feature-branch &&
echo another-hello >file1 &&
echo goodbye >file2 &&
git add . &&
test_tick &&
git commit -m "second commit" &&
echo final-goodbye >file3 &&
git add . &&
test_tick &&
git commit -m "third commit" &&
git checkout -b unrelated-onto-branch master &&
echo unrelated >file4 &&
git add . &&
test_tick &&
git commit -m "unrelated commit" &&
git checkout -b related-onto-branch master &&
echo conflicting-change >file2 &&
git add . &&
test_tick &&
git commit -m "related commit" &&
remove_progress_re="$(printf "s/.*\\r//")"
[master (root-commit) bfa4f02] initial commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file0
Switched to a new branch 'feature-branch'
[feature-branch 6fe95e2] second commit
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 file1
create mode 100644 file2
[feature-branch 0c4d2f1] third commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
Switched to a new branch 'unrelated-onto-branch'
[unrelated-onto-branch 4aede2f] unrelated commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file4
Switched to a new branch 'related-onto-branch'
[related-onto-branch c57d250] related commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
ok 1 - setup
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b behind-feature-branch feature-branch~1 &&
test_when_finished git branch -D behind-feature-branch &&
echo dirty >>file1 &&
git rebase feature-branch &&
grep dirty file1 &&
git checkout feature-branch
HEAD is now at c57d250 related commit
Switched to a new branch 'behind-feature-branch'
Created autostash: b346341
HEAD is now at 6fe95e2 second commit
First, rewinding head to replay your work on top of it...
Fast-forwarded behind-feature-branch to feature-branch.
Applied autostash.
dirty
Switched to branch 'feature-branch'
M file1
Deleted branch behind-feature-branch (was 0c4d2f1).
ok 2 - rebase: fast-forward rebase
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b same-feature-branch feature-branch &&
test_when_finished git branch -D same-feature-branch &&
echo dirty >>file1 &&
git rebase feature-branch &&
grep dirty file1 &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'same-feature-branch'
Created autostash: 925afbd
HEAD is now at 0c4d2f1 third commit
Current branch same-feature-branch is up to date.
Applied autostash.
dirty
Switched to branch 'feature-branch'
M file1
Deleted branch same-feature-branch (was 0c4d2f1).
ok 3 - rebase: noop rebase
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
test_when_finished git branch -D rebased-feature-branch &&
test_when_finished git checkout feature-branch &&
echo dirty >>file3 &&
test_must_fail git rebase$type --no-autostash unrelated-onto-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
error: cannot rebase: You have unstaged changes.
error: Please commit or stash them.
Switched to branch 'feature-branch'
M file3
Deleted branch rebased-feature-branch (was 0c4d2f1).
ok 4 - rebase: dirty worktree, --no-autostash
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
echo dirty >>file3 &&
git rebase$type unrelated-onto-branch >actual 2>&1 &&
grep unrelated file4 &&
grep dirty file3 &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
unrelated
dirty
Switched to branch 'feature-branch'
M file3
ok 5 - rebase: dirty worktree, non-conflicting rebase
expecting success:
test_when_finished git branch -D rebased-feature-branch &&
suffix=${type#\ --} && suffix=${suffix:-am} &&
if test ${suffix} = "merge"; then
suffix=interactive
fi &&
create_expected_success_$suffix &&
sed "$remove_progress_re" <actual >actual2 &&
test_i18ncmp expected actual2
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Deleted branch rebased-feature-branch (was b607b14).
ok 6 - rebase --autostash: check output
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
test_when_finished git branch -D rebased-feature-branch &&
echo dirty >>file3 &&
git add file3 &&
git rebase$type unrelated-onto-branch &&
grep unrelated file4 &&
grep dirty file3 &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
Created autostash: 7305f55
HEAD is now at 0c4d2f1 third commit
First, rewinding head to replay your work on top of it...
Applying: second commit
Applying: third commit
Applied autostash.
unrelated
dirty
Switched to branch 'feature-branch'
M file3
Deleted branch rebased-feature-branch (was b607b14).
ok 7 - rebase: dirty index, non-conflicting rebase
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
test_when_finished git branch -D rebased-feature-branch &&
echo dirty >>file3 &&
test_must_fail git rebase$type related-onto-branch &&
test_path_is_file $dotest/autostash &&
test_path_is_missing file3 &&
rm -rf $dotest &&
git reset --hard &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
Created autostash: ce96636
HEAD is now at 0c4d2f1 third commit
First, rewinding head to replay your work on top of it...
Applying: second commit
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
c57d250 related commit
virtual second commit
found 1 common ancestor:
virtual 4b825dc642cb6eb9a060e54bf8d69288fbee4904
CONFLICT (add/add): Merge conflict in file2
Auto-merging file2
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 second commit
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
HEAD is now at c57d250 related commit
Previous HEAD position was c57d250 related commit
Switched to branch 'feature-branch'
Deleted branch rebased-feature-branch (was 0c4d2f1).
ok 8 - rebase: conflicting rebase
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
test_when_finished git branch -D rebased-feature-branch &&
echo dirty >>file3 &&
test_must_fail git rebase$type related-onto-branch &&
test_path_is_file $dotest/autostash &&
test_path_is_missing file3 &&
echo "conflicting-plus-goodbye" >file2 &&
git add file2 &&
git rebase --continue &&
test_path_is_missing $dotest/autostash &&
grep dirty file3 &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
Created autostash: ce96636
HEAD is now at 0c4d2f1 third commit
First, rewinding head to replay your work on top of it...
Applying: second commit
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
c57d250 related commit
virtual second commit
found 1 common ancestor:
virtual 4b825dc642cb6eb9a060e54bf8d69288fbee4904
CONFLICT (add/add): Merge conflict in file2
Auto-merging file2
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 second commit
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Applying: second commit
Applying: third commit
Applied autostash.
dirty
Switched to branch 'feature-branch'
M file3
Deleted branch rebased-feature-branch (was 51f2c81).
ok 9 - rebase: --continue
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
test_when_finished git branch -D rebased-feature-branch &&
echo dirty >>file3 &&
test_must_fail git rebase$type related-onto-branch &&
test_path_is_file $dotest/autostash &&
test_path_is_missing file3 &&
git rebase --skip &&
test_path_is_missing $dotest/autostash &&
grep dirty file3 &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
Created autostash: ce96636
HEAD is now at 0c4d2f1 third commit
First, rewinding head to replay your work on top of it...
Applying: second commit
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
c57d250 related commit
virtual second commit
found 1 common ancestor:
virtual 4b825dc642cb6eb9a060e54bf8d69288fbee4904
CONFLICT (add/add): Merge conflict in file2
Auto-merging file2
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 second commit
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Applying: third commit
Applied autostash.
dirty
Switched to branch 'feature-branch'
M file3
Deleted branch rebased-feature-branch (was fa02356).
ok 10 - rebase: --skip
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
test_when_finished git branch -D rebased-feature-branch &&
echo dirty >>file3 &&
test_must_fail git rebase$type related-onto-branch &&
test_path_is_file $dotest/autostash &&
test_path_is_missing file3 &&
git rebase --abort &&
test_path_is_missing $dotest/autostash &&
grep dirty file3 &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
Created autostash: ce96636
HEAD is now at 0c4d2f1 third commit
First, rewinding head to replay your work on top of it...
Applying: second commit
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
c57d250 related commit
virtual second commit
found 1 common ancestor:
virtual 4b825dc642cb6eb9a060e54bf8d69288fbee4904
CONFLICT (add/add): Merge conflict in file2
Auto-merging file2
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 second commit
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Applied autostash.
dirty
Switched to branch 'feature-branch'
M file3
Deleted branch rebased-feature-branch (was 0c4d2f1).
ok 11 - rebase: --abort
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
echo dirty >file4 &&
git add file4 &&
git rebase$type unrelated-onto-branch >actual 2>&1 &&
test_path_is_missing $dotest &&
git reset --hard &&
grep unrelated file4 &&
! grep dirty file4 &&
git checkout feature-branch &&
git stash pop &&
grep dirty file4
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
HEAD is now at b607b14 third commit
unrelated
Switched to branch 'feature-branch'
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 28566cc718f43a597c158e8411c19d7048328a85
On branch feature-branch
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: file4
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
actual2
expected
Dropped refs/stash@{0} (1b6501f85530697b9c800b37ca0a8c6ef37e954c)
dirty
ok 12 - rebase: non-conflicting rebase, conflicting stash
expecting success:
test_when_finished git branch -D rebased-feature-branch &&
suffix=${type#\ --} && suffix=${suffix:-am} &&
if test ${suffix} = "merge"; then
suffix=interactive
fi &&
create_expected_failure_$suffix &&
sed "$remove_progress_re" <actual >actual2 &&
test_i18ncmp expected actual2
Deleted branch rebased-feature-branch (was b607b14).
ok 13 - rebase: check output with conflicting stash
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
test_when_finished git branch -D rebased-feature-branch &&
test_when_finished git checkout feature-branch &&
echo dirty >>file3 &&
test_must_fail git rebase$type --no-autostash unrelated-onto-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
error: cannot rebase: You have unstaged changes.
error: Please commit or stash them.
Switched to branch 'feature-branch'
M file3
Deleted branch rebased-feature-branch (was 0c4d2f1).
ok 14 - rebase --merge: dirty worktree, --no-autostash
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
echo dirty >>file3 &&
git rebase$type unrelated-onto-branch >actual 2>&1 &&
grep unrelated file4 &&
grep dirty file3 &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
unrelated
dirty
Switched to branch 'feature-branch'
M file3
ok 15 - rebase --merge: dirty worktree, non-conflicting rebase
expecting success:
test_when_finished git branch -D rebased-feature-branch &&
suffix=${type#\ --} && suffix=${suffix:-am} &&
if test ${suffix} = "merge"; then
suffix=interactive
fi &&
create_expected_success_$suffix &&
sed "$remove_progress_re" <actual >actual2 &&
test_i18ncmp expected actual2
Deleted branch rebased-feature-branch (was b607b14).
ok 16 - rebase --merge --autostash: check output
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
test_when_finished git branch -D rebased-feature-branch &&
echo dirty >>file3 &&
git add file3 &&
git rebase$type unrelated-onto-branch &&
grep unrelated file4 &&
grep dirty file3 &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
Created autostash: 7305f55
HEAD is now at 0c4d2f1 third commit
Rebasing (1/2)
Rebasing (2/2)
Applied autostash.
Successfully rebased and updated refs/heads/rebased-feature-branch.
unrelated
dirty
Switched to branch 'feature-branch'
M file3
Deleted branch rebased-feature-branch (was b607b14).
ok 17 - rebase --merge: dirty index, non-conflicting rebase
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
test_when_finished git branch -D rebased-feature-branch &&
echo dirty >>file3 &&
test_must_fail git rebase$type related-onto-branch &&
test_path_is_file $dotest/autostash &&
test_path_is_missing file3 &&
rm -rf $dotest &&
git reset --hard &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
Created autostash: ce96636
HEAD is now at 0c4d2f1 third commit
Rebasing (1/2)
CONFLICT (add/add): Merge conflict in file2
Auto-merging file2
error: could not apply 6fe95e2... second commit
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 6fe95e2... second commit
HEAD is now at c57d250 related commit
Previous HEAD position was c57d250 related commit
Switched to branch 'feature-branch'
Deleted branch rebased-feature-branch (was 0c4d2f1).
ok 18 - rebase --merge: conflicting rebase
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
test_when_finished git branch -D rebased-feature-branch &&
echo dirty >>file3 &&
test_must_fail git rebase$type related-onto-branch &&
test_path_is_file $dotest/autostash &&
test_path_is_missing file3 &&
echo "conflicting-plus-goodbye" >file2 &&
git add file2 &&
git rebase --continue &&
test_path_is_missing $dotest/autostash &&
grep dirty file3 &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
Created autostash: ce96636
HEAD is now at 0c4d2f1 third commit
Rebasing (1/2)
CONFLICT (add/add): Merge conflict in file2
Auto-merging file2
error: could not apply 6fe95e2... second commit
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 6fe95e2... second commit
[detached HEAD 62edf38] second commit
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 file1
Rebasing (2/2)
Applied autostash.
Successfully rebased and updated refs/heads/rebased-feature-branch.
dirty
Switched to branch 'feature-branch'
M file3
Deleted branch rebased-feature-branch (was 51f2c81).
ok 19 - rebase --merge: --continue
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
test_when_finished git branch -D rebased-feature-branch &&
echo dirty >>file3 &&
test_must_fail git rebase$type related-onto-branch &&
test_path_is_file $dotest/autostash &&
test_path_is_missing file3 &&
git rebase --skip &&
test_path_is_missing $dotest/autostash &&
grep dirty file3 &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
Created autostash: ce96636
HEAD is now at 0c4d2f1 third commit
Rebasing (1/2)
CONFLICT (add/add): Merge conflict in file2
Auto-merging file2
error: could not apply 6fe95e2... second commit
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 6fe95e2... second commit
Rebasing (2/2)
Applied autostash.
Successfully rebased and updated refs/heads/rebased-feature-branch.
dirty
Switched to branch 'feature-branch'
M file3
Deleted branch rebased-feature-branch (was fa02356).
ok 20 - rebase --merge: --skip
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
test_when_finished git branch -D rebased-feature-branch &&
echo dirty >>file3 &&
test_must_fail git rebase$type related-onto-branch &&
test_path_is_file $dotest/autostash &&
test_path_is_missing file3 &&
git rebase --abort &&
test_path_is_missing $dotest/autostash &&
grep dirty file3 &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
Created autostash: ce96636
HEAD is now at 0c4d2f1 third commit
Rebasing (1/2)
CONFLICT (add/add): Merge conflict in file2
Auto-merging file2
error: could not apply 6fe95e2... second commit
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 6fe95e2... second commit
Applied autostash.
dirty
Switched to branch 'feature-branch'
M file3
Deleted branch rebased-feature-branch (was 0c4d2f1).
ok 21 - rebase --merge: --abort
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
echo dirty >file4 &&
git add file4 &&
git rebase$type unrelated-onto-branch >actual 2>&1 &&
test_path_is_missing $dotest &&
git reset --hard &&
grep unrelated file4 &&
! grep dirty file4 &&
git checkout feature-branch &&
git stash pop &&
grep dirty file4
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
HEAD is now at b607b14 third commit
unrelated
Switched to branch 'feature-branch'
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 28566cc718f43a597c158e8411c19d7048328a85
On branch feature-branch
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: file4
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
actual2
expected
Dropped refs/stash@{0} (1b6501f85530697b9c800b37ca0a8c6ef37e954c)
dirty
ok 22 - rebase --merge: non-conflicting rebase, conflicting stash
expecting success:
test_when_finished git branch -D rebased-feature-branch &&
suffix=${type#\ --} && suffix=${suffix:-am} &&
if test ${suffix} = "merge"; then
suffix=interactive
fi &&
create_expected_failure_$suffix &&
sed "$remove_progress_re" <actual >actual2 &&
test_i18ncmp expected actual2
Deleted branch rebased-feature-branch (was b607b14).
ok 23 - rebase --merge: check output with conflicting stash
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
test_when_finished git branch -D rebased-feature-branch &&
test_when_finished git checkout feature-branch &&
echo dirty >>file3 &&
test_must_fail git rebase$type --no-autostash unrelated-onto-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
error: cannot rebase: You have unstaged changes.
error: Please commit or stash them.
Switched to branch 'feature-branch'
M file3
Deleted branch rebased-feature-branch (was 0c4d2f1).
ok 24 - rebase --interactive: dirty worktree, --no-autostash
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
echo dirty >>file3 &&
git rebase$type unrelated-onto-branch >actual 2>&1 &&
grep unrelated file4 &&
grep dirty file3 &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
unrelated
dirty
Switched to branch 'feature-branch'
M file3
ok 25 - rebase --interactive: dirty worktree, non-conflicting rebase
expecting success:
test_when_finished git branch -D rebased-feature-branch &&
suffix=${type#\ --} && suffix=${suffix:-am} &&
if test ${suffix} = "merge"; then
suffix=interactive
fi &&
create_expected_success_$suffix &&
sed "$remove_progress_re" <actual >actual2 &&
test_i18ncmp expected actual2
Deleted branch rebased-feature-branch (was b607b14).
ok 26 - rebase --interactive --autostash: check output
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
test_when_finished git branch -D rebased-feature-branch &&
echo dirty >>file3 &&
git add file3 &&
git rebase$type unrelated-onto-branch &&
grep unrelated file4 &&
grep dirty file3 &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
Created autostash: 7305f55
HEAD is now at 0c4d2f1 third commit
Rebasing (1/2)
Rebasing (2/2)
Applied autostash.
Successfully rebased and updated refs/heads/rebased-feature-branch.
unrelated
dirty
Switched to branch 'feature-branch'
M file3
Deleted branch rebased-feature-branch (was b607b14).
ok 27 - rebase --interactive: dirty index, non-conflicting rebase
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
test_when_finished git branch -D rebased-feature-branch &&
echo dirty >>file3 &&
test_must_fail git rebase$type related-onto-branch &&
test_path_is_file $dotest/autostash &&
test_path_is_missing file3 &&
rm -rf $dotest &&
git reset --hard &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
Created autostash: ce96636
HEAD is now at 0c4d2f1 third commit
Rebasing (1/2)
CONFLICT (add/add): Merge conflict in file2
Auto-merging file2
error: could not apply 6fe95e2... second commit
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 6fe95e2... second commit
HEAD is now at c57d250 related commit
Previous HEAD position was c57d250 related commit
Switched to branch 'feature-branch'
Deleted branch rebased-feature-branch (was 0c4d2f1).
ok 28 - rebase --interactive: conflicting rebase
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
test_when_finished git branch -D rebased-feature-branch &&
echo dirty >>file3 &&
test_must_fail git rebase$type related-onto-branch &&
test_path_is_file $dotest/autostash &&
test_path_is_missing file3 &&
echo "conflicting-plus-goodbye" >file2 &&
git add file2 &&
git rebase --continue &&
test_path_is_missing $dotest/autostash &&
grep dirty file3 &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
Created autostash: ce96636
HEAD is now at 0c4d2f1 third commit
Rebasing (1/2)
CONFLICT (add/add): Merge conflict in file2
Auto-merging file2
error: could not apply 6fe95e2... second commit
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 6fe95e2... second commit
[detached HEAD 62edf38] second commit
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 file1
Rebasing (2/2)
Applied autostash.
Successfully rebased and updated refs/heads/rebased-feature-branch.
dirty
Switched to branch 'feature-branch'
M file3
Deleted branch rebased-feature-branch (was 51f2c81).
ok 29 - rebase --interactive: --continue
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
test_when_finished git branch -D rebased-feature-branch &&
echo dirty >>file3 &&
test_must_fail git rebase$type related-onto-branch &&
test_path_is_file $dotest/autostash &&
test_path_is_missing file3 &&
git rebase --skip &&
test_path_is_missing $dotest/autostash &&
grep dirty file3 &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
Created autostash: ce96636
HEAD is now at 0c4d2f1 third commit
Rebasing (1/2)
CONFLICT (add/add): Merge conflict in file2
Auto-merging file2
error: could not apply 6fe95e2... second commit
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 6fe95e2... second commit
Rebasing (2/2)
Applied autostash.
Successfully rebased and updated refs/heads/rebased-feature-branch.
dirty
Switched to branch 'feature-branch'
M file3
Deleted branch rebased-feature-branch (was fa02356).
ok 30 - rebase --interactive: --skip
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
test_when_finished git branch -D rebased-feature-branch &&
echo dirty >>file3 &&
test_must_fail git rebase$type related-onto-branch &&
test_path_is_file $dotest/autostash &&
test_path_is_missing file3 &&
git rebase --abort &&
test_path_is_missing $dotest/autostash &&
grep dirty file3 &&
git checkout feature-branch
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
Created autostash: ce96636
HEAD is now at 0c4d2f1 third commit
Rebasing (1/2)
CONFLICT (add/add): Merge conflict in file2
Auto-merging file2
error: could not apply 6fe95e2... second commit
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 6fe95e2... second commit
Applied autostash.
dirty
Switched to branch 'feature-branch'
M file3
Deleted branch rebased-feature-branch (was 0c4d2f1).
ok 31 - rebase --interactive: --abort
expecting success:
test_config rebase.autostash true &&
git reset --hard &&
git checkout -b rebased-feature-branch feature-branch &&
echo dirty >file4 &&
git add file4 &&
git rebase$type unrelated-onto-branch >actual 2>&1 &&
test_path_is_missing $dotest &&
git reset --hard &&
grep unrelated file4 &&
! grep dirty file4 &&
git checkout feature-branch &&
git stash pop &&
grep dirty file4
HEAD is now at 0c4d2f1 third commit
Switched to a new branch 'rebased-feature-branch'
HEAD is now at b607b14 third commit
unrelated
Switched to branch 'feature-branch'
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 28566cc718f43a597c158e8411c19d7048328a85
On branch feature-branch
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: file4
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
actual2
expected
Dropped refs/stash@{0} (1b6501f85530697b9c800b37ca0a8c6ef37e954c)
dirty
ok 32 - rebase --interactive: non-conflicting rebase, conflicting stash
expecting success:
test_when_finished git branch -D rebased-feature-branch &&
suffix=${type#\ --} && suffix=${suffix:-am} &&
if test ${suffix} = "merge"; then
suffix=interactive
fi &&
create_expected_failure_$suffix &&
sed "$remove_progress_re" <actual >actual2 &&
test_i18ncmp expected actual2
Deleted branch rebased-feature-branch (was b607b14).
ok 33 - rebase --interactive: check output with conflicting stash
expecting success:
test_when_finished "git reset --hard" &&
echo uncommitted-content >file0 &&
(
write_script abort-editor.sh <<-\EOF &&
echo >"$1"
EOF
test_set_editor "$(pwd)/abort-editor.sh" &&
test_must_fail git rebase -i --autostash HEAD^ &&
rm -f abort-editor.sh
) &&
echo uncommitted-content >expected &&
test_cmp expected file0
Created autostash: d9b9f3e
HEAD is now at 0c4d2f1 third commit
Applied autostash.
error: nothing to do
HEAD is now at 0c4d2f1 third commit
ok 34 - abort rebase -i with --autostash
expecting success:
test_when_finished "git reset --hard" &&
echo uncommitted-content >file0 &&
(
test_set_editor "false" &&
test_must_fail git rebase -i --autostash HEAD^
) &&
echo uncommitted-content >expected &&
test_cmp expected file0
Created autostash: 083685b
HEAD is now at 0c4d2f1 third commit
error: There was a problem with the editor '"$FAKE_EDITOR"'.
Applied autostash.
HEAD is now at 0c4d2f1 third commit
ok 35 - restore autostash on editor failure
expecting success:
test_when_finished "git reset --hard" &&
echo uncommitted-content >file0 &&
(
write_script abort-editor.sh <<-\EOF &&
echo conflicting-content >file0
exit 1
EOF
test_set_editor "$(pwd)/abort-editor.sh" &&
test_must_fail git rebase -i --autostash HEAD^ &&
rm -f abort-editor.sh
) &&
echo conflicting-content >expected &&
test_cmp expected file0 &&
git checkout file0 &&
git stash pop &&
echo uncommitted-content >expected &&
test_cmp expected file0
Created autostash: 083685b
HEAD is now at 0c4d2f1 third commit
error: There was a problem with the editor '"$FAKE_EDITOR"'.
Applying autostash resulted in conflicts.
Your changes are safe in the stash.
You can run "git stash pop" or "git stash drop" at any time.
Updated 1 path from the index
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 28566cc718f43a597c158e8411c19d7048328a85
On branch feature-branch
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file0
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
actual2
expected
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (083685bba8c747d8dec51b2a5ffc97733bf5a961)
HEAD is now at 0c4d2f1 third commit
ok 36 - autostash is saved on editor failure with conflict
expecting success:
test_when_finished "git reset --hard && git checkout master" &&
git checkout -b with-submodule &&
git submodule add ./ sub &&
test_tick &&
git commit -m add-submodule &&
echo changed >sub/file0 &&
git rebase -i --autostash HEAD
Switched to a new branch 'with-submodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3420-rebase-autostash/sub'...
done.
[with-submodule 42dcd38] add-submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub
Successfully rebased and updated refs/heads/with-submodule.
HEAD is now at 42dcd38 add-submodule
warning: unable to rmdir 'sub': Directory not empty
Switched to branch 'master'
ok 37 - autostash with dirty submodules
expecting success:
git checkout -b unchanged-branch &&
echo changed >file0 &&
git rebase --autostash unchanged-branch &&
test changed = "$(cat file0)" &&
test unchanged-branch = "$(git rev-parse --abbrev-ref HEAD)"
Switched to a new branch 'unchanged-branch'
Created autostash: 84b1204
HEAD is now at bfa4f02 initial commit
Current branch unchanged-branch is up to date.
Applied autostash.
ok 38 - branch is left alone when possible
# passed all 38 test(s)
1..38
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3418-rebase-continue.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3418-rebase-continue/.git/
expecting success:
test_commit "commit-new-file-F1" F1 1 &&
test_commit "commit-new-file-F2" F2 2 &&
git checkout -b topic HEAD^ &&
test_commit "commit-new-file-F2-on-topic-branch" F2 22 &&
git checkout master
[master (root-commit) dac1376] commit-new-file-F1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 F1
[master 953b3db] commit-new-file-F2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 F2
Switched to a new branch 'topic'
[topic 24c5d85] commit-new-file-F2-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 F2
Switched to branch 'master'
ok 1 - setup
expecting success:
rm -fr .git/rebase-* &&
git reset --hard &&
git checkout master &&
FAKE_LINES="edit 1" git rebase -i HEAD^ &&
test-tool chmtime =-60 F1 &&
git rebase --continue
HEAD is now at 953b3db commit-new-file-F2
Already on 'master'
rebase -i script before editing:
pick 953b3db commit-new-file-F2
rebase -i script after editing:
edit 953b3db commit-new-file-F2
Rebasing (1/1)
Stopped at 953b3db... commit-new-file-F2
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
Successfully rebased and updated refs/heads/master.
ok 2 - interactive rebase --continue works with touched file
expecting success:
rm -fr .git/rebase-* &&
git reset --hard &&
git checkout master &&
test_must_fail git rebase --onto master master topic &&
echo "Resolved" >F2 &&
git add F2 &&
test-tool chmtime =-60 F1 &&
git rebase --continue
HEAD is now at 953b3db commit-new-file-F2
Already on 'master'
First, rewinding head to replay your work on top of it...
Applying: commit-new-file-F2-on-topic-branch
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
953b3db commit-new-file-F2
virtual commit-new-file-F2-on-topic-branch
found 1 common ancestor:
virtual 4b825dc642cb6eb9a060e54bf8d69288fbee4904
CONFLICT (add/add): Merge conflict in F2
Auto-merging F2
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 commit-new-file-F2-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Applying: commit-new-file-F2-on-topic-branch
ok 3 - non-interactive rebase --continue works with touched file
expecting success:
test_must_fail git rebase -v --continue &&
test_must_fail git rebase --continue -v
usage: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>]
or: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]
or: git rebase --continue | --abort | --skip | --edit-todo
--onto <revision> rebase onto given branch instead of upstream
--no-verify allow pre-rebase hook to run
-q, --quiet be quiet. implies --no-stat
-v, --verbose display a diffstat of what changed upstream
-n, --no-stat do not show diffstat of what changed upstream
--signoff add a Signed-off-by: line to each commit
--ignore-whitespace passed to 'git am'
--committer-date-is-author-date
passed to 'git am'
--ignore-date passed to 'git am'
-C <n> passed to 'git apply'
--whitespace <action>
passed to 'git apply'
-f, --force-rebase cherry-pick all commits, even if unchanged
--no-ff cherry-pick all commits, even if unchanged
--continue continue
--skip skip current patch and continue
--abort abort and check out the original branch
--quit abort but keep HEAD where it is
--edit-todo edit the todo list during an interactive rebase
--show-current-patch show the patch file being applied or merged
-m, --merge use merging strategies to rebase
-i, --interactive let the user edit the list of commits to rebase
-p, --preserve-merges
(DEPRECATED) try to recreate merges instead of ignoring them
--rerere-autoupdate update the index with reused conflict resolution if possible
-k, --keep-empty preserve empty commits during rebase
--autosquash move commits that begin with squash!/fixup! under -i
-S, --gpg-sign[=<key-id>]
GPG-sign commits
--autostash automatically stash/stash pop before and after
-x, --exec <exec> add exec lines after each commit of the editable list
--allow-empty-message
allow rebasing commits with empty messages
-r, --rebase-merges[=<mode>]
try to rebase merges instead of skipping them
--fork-point use 'merge-base --fork-point' to refine upstream
-s, --strategy <strategy>
use the given merge strategy
-X, --strategy-option <option>
pass the argument through to the merge strategy
--root rebase all reachable commits up to the root(s)
--reschedule-failed-exec
automatically re-schedule any `exec` that fails
usage: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>]
or: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]
or: git rebase --continue | --abort | --skip | --edit-todo
--onto <revision> rebase onto given branch instead of upstream
--no-verify allow pre-rebase hook to run
-q, --quiet be quiet. implies --no-stat
-v, --verbose display a diffstat of what changed upstream
-n, --no-stat do not show diffstat of what changed upstream
--signoff add a Signed-off-by: line to each commit
--ignore-whitespace passed to 'git am'
--committer-date-is-author-date
passed to 'git am'
--ignore-date passed to 'git am'
-C <n> passed to 'git apply'
--whitespace <action>
passed to 'git apply'
-f, --force-rebase cherry-pick all commits, even if unchanged
--no-ff cherry-pick all commits, even if unchanged
--continue continue
--skip skip current patch and continue
--abort abort and check out the original branch
--quit abort but keep HEAD where it is
--edit-todo edit the todo list during an interactive rebase
--show-current-patch show the patch file being applied or merged
-m, --merge use merging strategies to rebase
-i, --interactive let the user edit the list of commits to rebase
-p, --preserve-merges
(DEPRECATED) try to recreate merges instead of ignoring them
--rerere-autoupdate update the index with reused conflict resolution if possible
-k, --keep-empty preserve empty commits during rebase
--autosquash move commits that begin with squash!/fixup! under -i
-S, --gpg-sign[=<key-id>]
GPG-sign commits
--autostash automatically stash/stash pop before and after
-x, --exec <exec> add exec lines after each commit of the editable list
--allow-empty-message
allow rebasing commits with empty messages
-r, --rebase-merges[=<mode>]
try to rebase merges instead of skipping them
--fork-point use 'merge-base --fork-point' to refine upstream
-s, --strategy <strategy>
use the given merge strategy
-X, --strategy-option <option>
pass the argument through to the merge strategy
--root rebase all reachable commits up to the root(s)
--reschedule-failed-exec
automatically re-schedule any `exec` that fails
ok 4 - rebase --continue can not be used with other options
expecting success:
rm -fr .git/rebase-* &&
git reset --hard commit-new-file-F2-on-topic-branch &&
test_commit "commit-new-file-F3-on-topic-branch" F3 32 &&
test_when_finished "rm -fr test-bin funny.was.run" &&
mkdir test-bin &&
cat >test-bin/git-merge-funny <<-EOF &&
#!$SHELL_PATH
case "\$1" in --opt) ;; *) exit 2 ;; esac
shift &&
>funny.was.run &&
exec git merge-recursive "\$@"
EOF
chmod +x test-bin/git-merge-funny &&
(
PATH=./test-bin:$PATH &&
test_must_fail git rebase -s funny -Xopt master topic
) &&
test -f funny.was.run &&
rm funny.was.run &&
echo "Resolved" >F2 &&
git add F2 &&
(
PATH=./test-bin:$PATH &&
git rebase --continue
) &&
test -f funny.was.run
HEAD is now at 24c5d85 commit-new-file-F2-on-topic-branch
[topic 39de9a1] commit-new-file-F3-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 F3
Rebasing (1/2)
Merging 953b3db31f61f8fc41bbcb85a1c76eadc748cf75 with 24c5d85f362d6c25d316c040586afc3e0548165a
Merging:
953b3db commit-new-file-F2
24c5d85 commit-new-file-F2-on-topic-branch
found 1 common ancestor:
dac1376 commit-new-file-F1
CONFLICT (add/add): Merge conflict in F2
Auto-merging F2
error: could not apply 24c5d85... commit-new-file-F2-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 24c5d85... commit-new-file-F2-on-topic-branch
[detached HEAD 6396a51] commit-new-file-F2-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
Merging 6396a513d945e21e13de4128c5f8af13443529d5 with 39de9a17650c52c96f2d6848fba0d846df88a78f
Merging:
6396a51 commit-new-file-F2-on-topic-branch
39de9a1 commit-new-file-F3-on-topic-branch
found 1 common ancestor:
24c5d85 commit-new-file-F2-on-topic-branch
Successfully rebased and updated refs/heads/topic.
ok 5 - rebase --continue remembers merge strategy and options
expecting success:
rm -fr .git/rebase-* &&
git reset --hard commit-new-file-F2-on-topic-branch &&
test_commit "commit-new-file-F3-on-topic-branch-for-dash-i" F3 32 &&
test_when_finished "rm -fr test-bin funny.was.run funny.args" &&
mkdir test-bin &&
cat >test-bin/git-merge-funny <<-EOF &&
#!$SHELL_PATH
echo "\$@" >>funny.args
case "\$1" in --opt) ;; *) exit 2 ;; esac
case "\$2" in --foo) ;; *) exit 2 ;; esac
case "\$4" in --) ;; *) exit 2 ;; esac
shift 2 &&
>funny.was.run &&
exec git merge-recursive "\$@"
EOF
chmod +x test-bin/git-merge-funny &&
(
PATH=./test-bin:$PATH &&
test_must_fail git rebase -i -s funny -Xopt -Xfoo master topic
) &&
test -f funny.was.run &&
rm funny.was.run &&
echo "Resolved" >F2 &&
git add F2 &&
(
PATH=./test-bin:$PATH &&
git rebase --continue
) &&
test -f funny.was.run
HEAD is now at 24c5d85 commit-new-file-F2-on-topic-branch
[topic 963eb48] commit-new-file-F3-on-topic-branch-for-dash-i
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 F3
Rebasing (1/2)
Merging 953b3db31f61f8fc41bbcb85a1c76eadc748cf75 with 24c5d85f362d6c25d316c040586afc3e0548165a
Merging:
953b3db commit-new-file-F2
24c5d85 commit-new-file-F2-on-topic-branch
found 1 common ancestor:
dac1376 commit-new-file-F1
CONFLICT (add/add): Merge conflict in F2
Auto-merging F2
error: could not apply 24c5d85... commit-new-file-F2-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 24c5d85... commit-new-file-F2-on-topic-branch
[detached HEAD 84ceed5] commit-new-file-F2-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
Merging 84ceed57d34824df114c1313ed936f74d03a6be0 with 963eb48ce133debc7d85d334a2a2342cde830c00
Merging:
84ceed5 commit-new-file-F2-on-topic-branch
963eb48 commit-new-file-F3-on-topic-branch-for-dash-i
found 1 common ancestor:
24c5d85 commit-new-file-F2-on-topic-branch
Successfully rebased and updated refs/heads/topic.
ok 6 - rebase -i --continue handles merge strategy and options
checking prerequisite: REBASE_P
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test -z "$GIT_TEST_SKIP_REBASE_P"
)
prerequisite REBASE_P ok
expecting success:
rm -fr .git/rebase-* &&
git reset --hard commit-new-file-F3-on-topic-branch &&
test_commit theirs-to-merge &&
git reset --hard HEAD^ &&
test_commit some-commit &&
test_tick &&
git merge --no-ff theirs-to-merge &&
FAKE_LINES="1 edit 2 3" git rebase -i -f -p -m \
-s recursive --strategy-option=theirs HEAD~2 &&
test_commit force-change &&
git rebase --continue
HEAD is now at 39de9a1 commit-new-file-F3-on-topic-branch
[topic 97e738b] theirs-to-merge
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 theirs-to-merge.t
HEAD is now at 39de9a1 commit-new-file-F3-on-topic-branch
[topic d03082c] some-commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 some-commit.t
Merging:
d03082c some-commit
virtual theirs-to-merge
found 1 common ancestor:
39de9a1 commit-new-file-F3-on-topic-branch
Merge made by the 'recursive' strategy.
theirs-to-merge.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 theirs-to-merge.t
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
rebase -i script before editing:
pick d03082c some-commit
pick 97e738b theirs-to-merge
pick 1566438 Merge tag 'theirs-to-merge' into topic
rebase -i script after editing:
pick d03082c some-commit
edit 97e738b theirs-to-merge
pick 1566438 Merge tag 'theirs-to-merge' into topic
Rebasing (1/3)
Rebasing (2/3)
Stopped at 97e738b... theirs-to-merge
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
[detached HEAD 5484d4d] force-change
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 force-change.t
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (3/3)
Successfully rebased and updated refs/heads/topic.
ok 7 - rebase passes merge strategy options correctly
expecting success:
test_when_finished "test_might_fail git rebase --abort" &&
git checkout -b with-conflicting-fixup &&
test_commit wants-fixup &&
test_commit "fixup! wants-fixup" wants-fixup.t 1 wants-fixup-1 &&
test_commit "fixup! wants-fixup" wants-fixup.t 2 wants-fixup-2 &&
test_commit "fixup! wants-fixup" wants-fixup.t 3 wants-fixup-3 &&
test_must_fail env FAKE_LINES="1 fixup 2 squash 4" \
git rebase -i HEAD~4 &&
: now there is a conflict, and comments in the commit message &&
git show HEAD >out &&
grep "fixup! wants-fixup" out &&
: skip and continue &&
echo "cp \"\$1\" .git/copy.txt" | write_script copy-editor.sh &&
(test_set_editor "$PWD/copy-editor.sh" && git rebase --skip) &&
: the user should not have had to edit the commit message &&
test_path_is_missing .git/copy.txt &&
: now the comments in the commit message should have been cleaned up &&
git show HEAD >out &&
! grep "fixup! wants-fixup" out &&
: now, let us ensure that "squash" is handled correctly &&
git reset --hard wants-fixup-3 &&
test_must_fail env FAKE_LINES="1 squash 4 squash 2 squash 4" \
git rebase -i HEAD~4 &&
: the first squash failed, but there are two more in the chain &&
(test_set_editor "$PWD/copy-editor.sh" &&
test_must_fail git rebase --skip) &&
: not the final squash, no need to edit the commit message &&
test_path_is_missing .git/copy.txt &&
: The first squash was skipped, therefore: &&
git show HEAD >out &&
test_i18ngrep "# This is a combination of 2 commits" out &&
test_i18ngrep "# This is the commit message #2:" out &&
(test_set_editor "$PWD/copy-editor.sh" && git rebase --skip) &&
git show HEAD >out &&
test_i18ngrep ! "# This is a combination" out &&
: Final squash failed, but there was still a squash &&
test_i18ngrep "# This is a combination of 2 commits" .git/copy.txt &&
test_i18ngrep "# This is the commit message #2:" .git/copy.txt
Switched to a new branch 'with-conflicting-fixup'
[with-conflicting-fixup 51d2e0c] wants-fixup
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 wants-fixup.t
[with-conflicting-fixup ce20d9c] fixup! wants-fixup
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[with-conflicting-fixup ec87ea9] fixup! wants-fixup
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[with-conflicting-fixup 7736dce] fixup! wants-fixup
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
rebase -i script before editing:
pick 51d2e0c wants-fixup
pick ce20d9c fixup! wants-fixup
pick ec87ea9 fixup! wants-fixup
pick 7736dce fixup! wants-fixup
rebase -i script after editing:
pick 51d2e0c wants-fixup
fixup ce20d9c fixup! wants-fixup
squash 7736dce fixup! wants-fixup
Rebasing (2/3)
Rebasing (3/3)
Auto-merging wants-fixup.t
CONFLICT (content): Merge conflict in wants-fixup.t
error: could not apply 7736dce... fixup! wants-fixup
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 7736dce... fixup! wants-fixup
# fixup! wants-fixup
Successfully rebased and updated refs/heads/with-conflicting-fixup.
HEAD is now at 7736dce fixup! wants-fixup
rebase -i script before editing:
pick 51d2e0c wants-fixup
pick ce20d9c fixup! wants-fixup
pick ec87ea9 fixup! wants-fixup
pick 7736dce fixup! wants-fixup
rebase -i script after editing:
pick 51d2e0c wants-fixup
squash 7736dce fixup! wants-fixup
squash ce20d9c fixup! wants-fixup
squash 7736dce fixup! wants-fixup
Rebasing (2/4)
Auto-merging wants-fixup.t
CONFLICT (content): Merge conflict in wants-fixup.t
error: could not apply 7736dce... fixup! wants-fixup
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 7736dce... fixup! wants-fixup
Rebasing (3/4)
Rebasing (4/4)
Auto-merging wants-fixup.t
CONFLICT (content): Merge conflict in wants-fixup.t
error: could not apply 7736dce... fixup! wants-fixup
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 7736dce... fixup! wants-fixup
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
# This is a combination of 2 commits.
# This is the commit message #2:
[detached HEAD 278546c] wants-fixup
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:22:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 wants-fixup.t
Successfully rebased and updated refs/heads/with-conflicting-fixup.
# This is a combination of 2 commits.
# This is the commit message #2:
fatal: No rebase in progress?
ok 8 - --skip after failed fixup cleans commit message
expecting success:
rm -fr .git/rebase-* &&
git reset --hard commit-new-file-F3-on-topic-branch &&
git checkout master &&
test_commit "commit-new-file-F3" F3 3 &&
test_config rerere.enabled true &&
git update-ref refs/heads/topic commit-new-file-F3-on-topic-branch &&
test_must_fail git rebase -m master topic &&
echo "Resolved" >F2 &&
cp F2 expected-F2 &&
git add F2 &&
test_must_fail git rebase --continue &&
echo "Resolved" >F3 &&
cp F3 expected-F3 &&
git add F3 &&
git rebase --continue &&
git reset --hard topic@{1}
HEAD is now at 39de9a1 commit-new-file-F3-on-topic-branch
Switched to branch 'master'
[master 822b3db] commit-new-file-F3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 F3
Rebasing (1/2)
CONFLICT (add/add): Merge conflict in F2
Auto-merging F2
error: could not apply 24c5d85... commit-new-file-F2-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Recorded preimage for 'F2'
Could not apply 24c5d85... commit-new-file-F2-on-topic-branch
Recorded resolution for 'F2'.
[detached HEAD c75c6da] commit-new-file-F2-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
CONFLICT (add/add): Merge conflict in F3
Auto-merging F3
error: could not apply 39de9a1... commit-new-file-F3-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Recorded preimage for 'F3'
Could not apply 39de9a1... commit-new-file-F3-on-topic-branch
Recorded resolution for 'F3'.
[detached HEAD df6a131] commit-new-file-F3-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/topic.
HEAD is now at 39de9a1 commit-new-file-F3-on-topic-branch
ok 9 - setup rerere database
expecting success:
prepare &&
test_must_fail git rebase $action --rerere-autoupdate master topic &&
test_cmp expected-F2 F2 &&
git diff-files --quiet &&
test_must_fail git rebase --continue &&
test_cmp expected-F3 F3 &&
git diff-files --quiet &&
git rebase --continue
HEAD is now at 39de9a1 commit-new-file-F3-on-topic-branch
Switched to branch 'master'
First, rewinding head to replay your work on top of it...
Applying: commit-new-file-F2-on-topic-branch
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
822b3db commit-new-file-F3
virtual commit-new-file-F2-on-topic-branch
found 1 common ancestor:
virtual 4b825dc642cb6eb9a060e54bf8d69288fbee4904
CONFLICT (add/add): Merge conflict in F2
Auto-merging F2
Staged 'F2' using previous resolution.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 commit-new-file-F2-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Applying: commit-new-file-F2-on-topic-branch
Applying: commit-new-file-F3-on-topic-branch
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
c75c6da commit-new-file-F2-on-topic-branch
virtual commit-new-file-F3-on-topic-branch
found 1 common ancestor:
virtual 4b825dc642cb6eb9a060e54bf8d69288fbee4904
CONFLICT (add/add): Merge conflict in F3
Auto-merging F3
Staged 'F3' using previous resolution.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0002 commit-new-file-F3-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Applying: commit-new-file-F3-on-topic-branch
ok 10 - rebase --continue remembers --rerere-autoupdate
expecting success:
prepare &&
test_config rerere.autoupdate true &&
test_must_fail git rebase $action master topic &&
test_cmp expected-F2 F2 &&
git diff-files --quiet &&
test_must_fail git rebase --continue &&
test_cmp expected-F3 F3 &&
git diff-files --quiet &&
git rebase --continue
HEAD is now at 39de9a1 commit-new-file-F3-on-topic-branch
Switched to branch 'master'
First, rewinding head to replay your work on top of it...
Applying: commit-new-file-F2-on-topic-branch
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
822b3db commit-new-file-F3
virtual commit-new-file-F2-on-topic-branch
found 1 common ancestor:
virtual 4b825dc642cb6eb9a060e54bf8d69288fbee4904
CONFLICT (add/add): Merge conflict in F2
Auto-merging F2
Staged 'F2' using previous resolution.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 commit-new-file-F2-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Applying: commit-new-file-F2-on-topic-branch
Applying: commit-new-file-F3-on-topic-branch
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
c75c6da commit-new-file-F2-on-topic-branch
virtual commit-new-file-F3-on-topic-branch
found 1 common ancestor:
virtual 4b825dc642cb6eb9a060e54bf8d69288fbee4904
CONFLICT (add/add): Merge conflict in F3
Auto-merging F3
Staged 'F3' using previous resolution.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0002 commit-new-file-F3-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Applying: commit-new-file-F3-on-topic-branch
ok 11 - rebase --continue honors rerere.autoUpdate
expecting success:
prepare &&
test_config rerere.autoupdate true &&
test_must_fail git rebase $action --no-rerere-autoupdate master topic &&
test_cmp expected-F2 F2 &&
test_must_fail git diff-files --quiet &&
git add F2 &&
test_must_fail git rebase --continue &&
test_cmp expected-F3 F3 &&
test_must_fail git diff-files --quiet &&
git add F3 &&
git rebase --continue
HEAD is now at 39de9a1 commit-new-file-F3-on-topic-branch
Switched to branch 'master'
First, rewinding head to replay your work on top of it...
Applying: commit-new-file-F2-on-topic-branch
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
822b3db commit-new-file-F3
virtual commit-new-file-F2-on-topic-branch
found 1 common ancestor:
virtual 4b825dc642cb6eb9a060e54bf8d69288fbee4904
CONFLICT (add/add): Merge conflict in F2
Auto-merging F2
Resolved 'F2' using previous resolution.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 commit-new-file-F2-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Applying: commit-new-file-F2-on-topic-branch
Applying: commit-new-file-F3-on-topic-branch
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
c75c6da commit-new-file-F2-on-topic-branch
virtual commit-new-file-F3-on-topic-branch
found 1 common ancestor:
virtual 4b825dc642cb6eb9a060e54bf8d69288fbee4904
CONFLICT (add/add): Merge conflict in F3
Auto-merging F3
Resolved 'F3' using previous resolution.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0002 commit-new-file-F3-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Applying: commit-new-file-F3-on-topic-branch
ok 12 - rebase --continue remembers --no-rerere-autoupdate
expecting success:
prepare &&
test_must_fail git rebase $action --rerere-autoupdate master topic &&
test_cmp expected-F2 F2 &&
git diff-files --quiet &&
test_must_fail git rebase --continue &&
test_cmp expected-F3 F3 &&
git diff-files --quiet &&
git rebase --continue
HEAD is now at 39de9a1 commit-new-file-F3-on-topic-branch
Switched to branch 'master'
Rebasing (1/2)
CONFLICT (add/add): Merge conflict in F2
Auto-merging F2
error: could not apply 24c5d85... commit-new-file-F2-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Staged 'F2' using previous resolution.
Could not apply 24c5d85... commit-new-file-F2-on-topic-branch
[detached HEAD c75c6da] commit-new-file-F2-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
CONFLICT (add/add): Merge conflict in F3
Auto-merging F3
error: could not apply 39de9a1... commit-new-file-F3-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Staged 'F3' using previous resolution.
Could not apply 39de9a1... commit-new-file-F3-on-topic-branch
[detached HEAD df6a131] commit-new-file-F3-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/topic.
ok 13 - rebase -m --continue remembers --rerere-autoupdate
expecting success:
prepare &&
test_config rerere.autoupdate true &&
test_must_fail git rebase $action master topic &&
test_cmp expected-F2 F2 &&
git diff-files --quiet &&
test_must_fail git rebase --continue &&
test_cmp expected-F3 F3 &&
git diff-files --quiet &&
git rebase --continue
HEAD is now at 39de9a1 commit-new-file-F3-on-topic-branch
Switched to branch 'master'
Rebasing (1/2)
CONFLICT (add/add): Merge conflict in F2
Auto-merging F2
error: could not apply 24c5d85... commit-new-file-F2-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Staged 'F2' using previous resolution.
Could not apply 24c5d85... commit-new-file-F2-on-topic-branch
[detached HEAD c75c6da] commit-new-file-F2-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
CONFLICT (add/add): Merge conflict in F3
Auto-merging F3
error: could not apply 39de9a1... commit-new-file-F3-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Staged 'F3' using previous resolution.
Could not apply 39de9a1... commit-new-file-F3-on-topic-branch
[detached HEAD df6a131] commit-new-file-F3-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/topic.
ok 14 - rebase -m --continue honors rerere.autoUpdate
expecting success:
prepare &&
test_config rerere.autoupdate true &&
test_must_fail git rebase $action --no-rerere-autoupdate master topic &&
test_cmp expected-F2 F2 &&
test_must_fail git diff-files --quiet &&
git add F2 &&
test_must_fail git rebase --continue &&
test_cmp expected-F3 F3 &&
test_must_fail git diff-files --quiet &&
git add F3 &&
git rebase --continue
HEAD is now at 39de9a1 commit-new-file-F3-on-topic-branch
Switched to branch 'master'
Rebasing (1/2)
CONFLICT (add/add): Merge conflict in F2
Auto-merging F2
error: could not apply 24c5d85... commit-new-file-F2-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Resolved 'F2' using previous resolution.
Could not apply 24c5d85... commit-new-file-F2-on-topic-branch
[detached HEAD c75c6da] commit-new-file-F2-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
CONFLICT (add/add): Merge conflict in F3
Auto-merging F3
error: could not apply 39de9a1... commit-new-file-F3-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Resolved 'F3' using previous resolution.
Could not apply 39de9a1... commit-new-file-F3-on-topic-branch
[detached HEAD df6a131] commit-new-file-F3-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/topic.
ok 15 - rebase -m --continue remembers --no-rerere-autoupdate
expecting success:
prepare &&
test_must_fail git rebase $action --rerere-autoupdate master topic &&
test_cmp expected-F2 F2 &&
git diff-files --quiet &&
test_must_fail git rebase --continue &&
test_cmp expected-F3 F3 &&
git diff-files --quiet &&
git rebase --continue
HEAD is now at 39de9a1 commit-new-file-F3-on-topic-branch
Switched to branch 'master'
Rebasing (1/2)
CONFLICT (add/add): Merge conflict in F2
Auto-merging F2
error: could not apply 24c5d85... commit-new-file-F2-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Staged 'F2' using previous resolution.
Could not apply 24c5d85... commit-new-file-F2-on-topic-branch
[detached HEAD c75c6da] commit-new-file-F2-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
CONFLICT (add/add): Merge conflict in F3
Auto-merging F3
error: could not apply 39de9a1... commit-new-file-F3-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Staged 'F3' using previous resolution.
Could not apply 39de9a1... commit-new-file-F3-on-topic-branch
[detached HEAD df6a131] commit-new-file-F3-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/topic.
ok 16 - rebase -i --continue remembers --rerere-autoupdate
expecting success:
prepare &&
test_config rerere.autoupdate true &&
test_must_fail git rebase $action master topic &&
test_cmp expected-F2 F2 &&
git diff-files --quiet &&
test_must_fail git rebase --continue &&
test_cmp expected-F3 F3 &&
git diff-files --quiet &&
git rebase --continue
HEAD is now at 39de9a1 commit-new-file-F3-on-topic-branch
Switched to branch 'master'
Rebasing (1/2)
CONFLICT (add/add): Merge conflict in F2
Auto-merging F2
error: could not apply 24c5d85... commit-new-file-F2-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Staged 'F2' using previous resolution.
Could not apply 24c5d85... commit-new-file-F2-on-topic-branch
[detached HEAD c75c6da] commit-new-file-F2-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
CONFLICT (add/add): Merge conflict in F3
Auto-merging F3
error: could not apply 39de9a1... commit-new-file-F3-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Staged 'F3' using previous resolution.
Could not apply 39de9a1... commit-new-file-F3-on-topic-branch
[detached HEAD df6a131] commit-new-file-F3-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/topic.
ok 17 - rebase -i --continue honors rerere.autoUpdate
expecting success:
prepare &&
test_config rerere.autoupdate true &&
test_must_fail git rebase $action --no-rerere-autoupdate master topic &&
test_cmp expected-F2 F2 &&
test_must_fail git diff-files --quiet &&
git add F2 &&
test_must_fail git rebase --continue &&
test_cmp expected-F3 F3 &&
test_must_fail git diff-files --quiet &&
git add F3 &&
git rebase --continue
HEAD is now at 39de9a1 commit-new-file-F3-on-topic-branch
Switched to branch 'master'
Rebasing (1/2)
CONFLICT (add/add): Merge conflict in F2
Auto-merging F2
error: could not apply 24c5d85... commit-new-file-F2-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Resolved 'F2' using previous resolution.
Could not apply 24c5d85... commit-new-file-F2-on-topic-branch
[detached HEAD c75c6da] commit-new-file-F2-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
CONFLICT (add/add): Merge conflict in F3
Auto-merging F3
error: could not apply 39de9a1... commit-new-file-F3-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Resolved 'F3' using previous resolution.
Could not apply 39de9a1... commit-new-file-F3-on-topic-branch
[detached HEAD df6a131] commit-new-file-F3-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/topic.
ok 18 - rebase -i --continue remembers --no-rerere-autoupdate
expecting success:
prepare &&
test_must_fail git rebase $action --rerere-autoupdate master topic &&
test_cmp expected-F2 F2 &&
git diff-files --quiet &&
test_must_fail git rebase --continue &&
test_cmp expected-F3 F3 &&
git diff-files --quiet &&
git rebase --continue
HEAD is now at 39de9a1 commit-new-file-F3-on-topic-branch
Switched to branch 'master'
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
CONFLICT (add/add): Merge conflict in F2
Auto-merging F2
error: could not apply 24c5d85... commit-new-file-F2-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Staged 'F2' using previous resolution.
Could not pick 24c5d85f362d6c25d316c040586afc3e0548165a
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
[detached HEAD c75c6da] commit-new-file-F2-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
CONFLICT (add/add): Merge conflict in F3
Auto-merging F3
error: could not apply 39de9a1... commit-new-file-F3-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Staged 'F3' using previous resolution.
Could not pick 39de9a17650c52c96f2d6848fba0d846df88a78f
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
[detached HEAD df6a131] commit-new-file-F3-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
Successfully rebased and updated refs/heads/topic.
ok 19 - rebase --preserve-merges --continue remembers --rerere-autoupdate
expecting success:
prepare &&
test_config rerere.autoupdate true &&
test_must_fail git rebase $action master topic &&
test_cmp expected-F2 F2 &&
git diff-files --quiet &&
test_must_fail git rebase --continue &&
test_cmp expected-F3 F3 &&
git diff-files --quiet &&
git rebase --continue
HEAD is now at 39de9a1 commit-new-file-F3-on-topic-branch
Switched to branch 'master'
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
CONFLICT (add/add): Merge conflict in F2
Auto-merging F2
error: could not apply 24c5d85... commit-new-file-F2-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Staged 'F2' using previous resolution.
Could not pick 24c5d85f362d6c25d316c040586afc3e0548165a
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
[detached HEAD c75c6da] commit-new-file-F2-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
CONFLICT (add/add): Merge conflict in F3
Auto-merging F3
error: could not apply 39de9a1... commit-new-file-F3-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Staged 'F3' using previous resolution.
Could not pick 39de9a17650c52c96f2d6848fba0d846df88a78f
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
[detached HEAD df6a131] commit-new-file-F3-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
Successfully rebased and updated refs/heads/topic.
ok 20 - rebase --preserve-merges --continue honors rerere.autoUpdate
expecting success:
prepare &&
test_config rerere.autoupdate true &&
test_must_fail git rebase $action --no-rerere-autoupdate master topic &&
test_cmp expected-F2 F2 &&
test_must_fail git diff-files --quiet &&
git add F2 &&
test_must_fail git rebase --continue &&
test_cmp expected-F3 F3 &&
test_must_fail git diff-files --quiet &&
git add F3 &&
git rebase --continue
HEAD is now at 39de9a1 commit-new-file-F3-on-topic-branch
Switched to branch 'master'
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
CONFLICT (add/add): Merge conflict in F2
Auto-merging F2
error: could not apply 24c5d85... commit-new-file-F2-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Resolved 'F2' using previous resolution.
Could not pick 24c5d85f362d6c25d316c040586afc3e0548165a
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
[detached HEAD c75c6da] commit-new-file-F2-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
CONFLICT (add/add): Merge conflict in F3
Auto-merging F3
error: could not apply 39de9a1... commit-new-file-F3-on-topic-branch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Resolved 'F3' using previous resolution.
Could not pick 39de9a17650c52c96f2d6848fba0d846df88a78f
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
[detached HEAD df6a131] commit-new-file-F3-on-topic-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
Successfully rebased and updated refs/heads/topic.
ok 21 - rebase --preserve-merges --continue remembers --no-rerere-autoupdate
expecting success:
rm -f execed &&
FAKE_LINES="break b exec_>execed" git rebase -i HEAD &&
test_path_is_missing execed &&
git rebase --continue &&
test_path_is_missing execed &&
git rebase --continue &&
test_path_is_file execed
rebase -i script before editing:
noop
rebase -i script after editing:
break
b
exec >execed
Rebasing (1/3)
Stopped at df6a131... commit-new-file-F3-on-topic-branch
Rebasing (2/3)
Stopped at df6a131... commit-new-file-F3-on-topic-branch
Rebasing (3/3)
Executing: >execed
Successfully rebased and updated refs/heads/topic.
ok 22 - the todo command "break" works
expecting success:
test_when_finished "git rebase --abort" &&
test_must_fail git rebase -x false --reschedule-failed-exec HEAD^ &&
grep "^exec false" .git/rebase-merge/git-rebase-todo &&
git rebase --abort &&
test_must_fail git -c rebase.rescheduleFailedExec=true \
rebase -x false HEAD^ 2>err &&
grep "^exec false" .git/rebase-merge/git-rebase-todo &&
test_i18ngrep "has been rescheduled" err
Rebasing (2/2)
Executing: false
warning: execution failed: false
You can fix the problem, and then run
git rebase --continue
hint: Could not execute the todo command
hint:
hint: exec false
hint:
hint: It has been rescheduled; To edit the command before continuing, please
hint: edit the todo list first:
hint:
hint: git rebase --edit-todo
hint: git rebase --continue
exec false
exec false
hint: It has been rescheduled; To edit the command before continuing, please
ok 23 - --reschedule-failed-exec
expecting success:
test_config rebase.reschedulefailedexec true &&
test_must_fail git rebase -x false HEAD^ &&
grep "^exec false" .git/rebase-merge/git-rebase-todo &&
git rebase --abort &&
git rebase HEAD^
Rebasing (2/2)
Executing: false
warning: execution failed: false
You can fix the problem, and then run
git rebase --continue
hint: Could not execute the todo command
hint:
hint: exec false
hint:
hint: It has been rescheduled; To edit the command before continuing, please
hint: edit the todo list first:
hint:
hint: git rebase --edit-todo
hint: git rebase --continue
exec false
Current branch topic is up to date.
ok 24 - rebase.reschedulefailedexec only affects `rebase -i`
# passed all 24 test(s)
1..24
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3427-rebase-subtree.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3427-rebase-subtree/.git/
expecting success:
test_commit README &&
mkdir files &&
(
cd files &&
git init &&
test_commit master1 &&
test_commit master2 &&
test_commit master3
) &&
git fetch files master &&
git branch files-master FETCH_HEAD &&
git read-tree --prefix=files_subtree files-master &&
git checkout -- files_subtree &&
tree=$(git write-tree) &&
head=$(git rev-parse HEAD) &&
rev=$(git rev-parse --verify files-master^0) &&
commit=$(git commit-tree -p $head -p $rev -m "Add subproject master" $tree) &&
git update-ref HEAD $commit &&
(
cd files_subtree &&
test_commit master4
) &&
test_commit files_subtree/master5
[master (root-commit) 9b47b78] README
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 README.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3427-rebase-subtree/files/.git/
[master (root-commit) ba4017d] master1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 master1.t
[master eb398b9] master2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 master2.t
[master 138d8fa] master3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 master3.t
warning: no common commits
From files
* branch master -> FETCH_HEAD
[master 8aaa705] master4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 files_subtree/master4.t
[master 8bb50ad] files_subtree/master5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 files_subtree/master5.t
ok 1 - setup
checking prerequisite: REBASE_P
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test -z "$GIT_TEST_SKIP_REBASE_P"
)
prerequisite REBASE_P ok
checking known breakage:
reset_rebase &&
git checkout -b rebase-preserve-merges-4 master &&
git filter-branch --prune-empty -f --subdirectory-filter files_subtree &&
git commit -m "Empty commit" --allow-empty &&
git rebase -Xsubtree=files_subtree --preserve-merges --onto files-master master &&
verbose test "$(commit_message HEAD~)" = "files_subtree/master4"
fatal: No rebase in progress?
HEAD is now at 8bb50ad files_subtree/master5
Switched to a new branch 'rebase-preserve-merges-4'
Rewrite 857c354c14dec65ebdcbe167a352a0809dfe91f4 (1/3) (0 seconds passed, remaining 0 predicted)
Rewrite 8aaa705aa976a6676d7a4f353323a6c49c23b5a2 (2/3) (0 seconds passed, remaining 0 predicted)
Rewrite 8bb50adc9630aa0deade7689343795f582e5d715 (3/3) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/rebase-preserve-merges-4' was rewritten
[rebase-preserve-merges-4 6ceeae2] Empty commit
Author: A U Thor <author@example.com>
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/1)
Successfully rebased and updated refs/heads/rebase-preserve-merges-4.
command failed: 'test' 'master2' '=' 'files_subtree/master4'
not ok 2 - Rebase -Xsubtree --preserve-merges --onto commit 4 # TODO known breakage
checking known breakage:
reset_rebase &&
git checkout -b rebase-preserve-merges-5 master &&
git filter-branch --prune-empty -f --subdirectory-filter files_subtree &&
git commit -m "Empty commit" --allow-empty &&
git rebase -Xsubtree=files_subtree --preserve-merges --onto files-master master &&
verbose test "$(commit_message HEAD)" = "files_subtree/master5"
fatal: No rebase in progress?
HEAD is now at 138d8fa master3
Switched to a new branch 'rebase-preserve-merges-5'
Rewrite 857c354c14dec65ebdcbe167a352a0809dfe91f4 (1/3) (0 seconds passed, remaining 0 predicted)
Rewrite 8aaa705aa976a6676d7a4f353323a6c49c23b5a2 (2/3) (0 seconds passed, remaining 0 predicted)
Rewrite 8bb50adc9630aa0deade7689343795f582e5d715 (3/3) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/rebase-preserve-merges-5' was rewritten
[rebase-preserve-merges-5 6ceeae2] Empty commit
Author: A U Thor <author@example.com>
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/1)
Successfully rebased and updated refs/heads/rebase-preserve-merges-5.
command failed: 'test' 'master3' '=' 'files_subtree/master5'
not ok 3 - Rebase -Xsubtree --preserve-merges --onto commit 5 # TODO known breakage
checking known breakage:
reset_rebase &&
git checkout -b rebase-keep-empty-4 master &&
git filter-branch --prune-empty -f --subdirectory-filter files_subtree &&
git commit -m "Empty commit" --allow-empty &&
git rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-master master &&
verbose test "$(commit_message HEAD~2)" = "files_subtree/master4"
fatal: No rebase in progress?
HEAD is now at 138d8fa master3
Switched to a new branch 'rebase-keep-empty-4'
Rewrite 857c354c14dec65ebdcbe167a352a0809dfe91f4 (1/3) (0 seconds passed, remaining 0 predicted)
Rewrite 8aaa705aa976a6676d7a4f353323a6c49c23b5a2 (2/3) (0 seconds passed, remaining 0 predicted)
Rewrite 8bb50adc9630aa0deade7689343795f582e5d715 (3/3) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/rebase-keep-empty-4' was rewritten
[rebase-keep-empty-4 6ceeae2] Empty commit
Author: A U Thor <author@example.com>
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/1)
Successfully rebased and updated refs/heads/rebase-keep-empty-4.
command failed: 'test' 'master1' '=' 'files_subtree/master4'
not ok 4 - Rebase -Xsubtree --keep-empty --preserve-merges --onto commit 4 # TODO known breakage
checking known breakage:
reset_rebase &&
git checkout -b rebase-keep-empty-5 master &&
git filter-branch --prune-empty -f --subdirectory-filter files_subtree &&
git commit -m "Empty commit" --allow-empty &&
git rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-master master &&
verbose test "$(commit_message HEAD~)" = "files_subtree/master5"
fatal: No rebase in progress?
HEAD is now at 138d8fa master3
Switched to a new branch 'rebase-keep-empty-5'
Rewrite 857c354c14dec65ebdcbe167a352a0809dfe91f4 (1/3) (0 seconds passed, remaining 0 predicted)
Rewrite 8aaa705aa976a6676d7a4f353323a6c49c23b5a2 (2/3) (1 seconds passed, remaining 0 predicted)
Rewrite 8bb50adc9630aa0deade7689343795f582e5d715 (2/3) (1 seconds passed, remaining 0 predicted)
Ref 'refs/heads/rebase-keep-empty-5' was rewritten
[rebase-keep-empty-5 6ceeae2] Empty commit
Author: A U Thor <author@example.com>
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/1)
Successfully rebased and updated refs/heads/rebase-keep-empty-5.
command failed: 'test' 'master2' '=' 'files_subtree/master5'
not ok 5 - Rebase -Xsubtree --keep-empty --preserve-merges --onto commit 5 # TODO known breakage
checking known breakage:
reset_rebase &&
git checkout -b rebase-keep-empty-empty master &&
git filter-branch --prune-empty -f --subdirectory-filter files_subtree &&
git commit -m "Empty commit" --allow-empty &&
git rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-master master &&
verbose test "$(commit_message HEAD)" = "Empty commit"
fatal: No rebase in progress?
HEAD is now at 138d8fa master3
Switched to a new branch 'rebase-keep-empty-empty'
Rewrite 857c354c14dec65ebdcbe167a352a0809dfe91f4 (1/3) (0 seconds passed, remaining 0 predicted)
Rewrite 8aaa705aa976a6676d7a4f353323a6c49c23b5a2 (2/3) (0 seconds passed, remaining 0 predicted)
Rewrite 8bb50adc9630aa0deade7689343795f582e5d715 (3/3) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/rebase-keep-empty-empty' was rewritten
[rebase-keep-empty-empty 6ceeae2] Empty commit
Author: A U Thor <author@example.com>
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/1)
Successfully rebased and updated refs/heads/rebase-keep-empty-empty.
command failed: 'test' 'master3' '=' 'Empty commit'
not ok 6 - Rebase -Xsubtree --keep-empty --preserve-merges --onto empty commit # TODO known breakage
checking known breakage:
reset_rebase &&
git checkout -b rebase-onto-4 master &&
git filter-branch --prune-empty -f --subdirectory-filter files_subtree &&
git commit -m "Empty commit" --allow-empty &&
git rebase -Xsubtree=files_subtree --onto files-master master &&
verbose test "$(commit_message HEAD~2)" = "files_subtree/master4"
fatal: No rebase in progress?
HEAD is now at 138d8fa master3
Switched to a new branch 'rebase-onto-4'
Rewrite 857c354c14dec65ebdcbe167a352a0809dfe91f4 (1/3) (0 seconds passed, remaining 0 predicted)
Rewrite 8aaa705aa976a6676d7a4f353323a6c49c23b5a2 (2/3) (0 seconds passed, remaining 0 predicted)
Rewrite 8bb50adc9630aa0deade7689343795f582e5d715 (3/3) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/rebase-onto-4' was rewritten
[rebase-onto-4 6ceeae2] Empty commit
Author: A U Thor <author@example.com>
Rebasing (1/3)
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:
git commit --allow-empty
Otherwise, please use 'git cherry-pick --skip'
interactive rebase in progress; onto 138d8fa
Last command done (1 command done):
pick c2298a8 Add subproject master
Next commands to do (2 remaining commands):
pick ffbb8e9 master4
pick 1059aa6 files_subtree/master5
You are currently rebasing branch 'rebase-onto-4' on '138d8fa'.
Untracked files:
files/
nothing added to commit but untracked files present
Could not apply c2298a8... Add subproject master
not ok 7 - Rebase -Xsubtree --onto commit 4 # TODO known breakage
checking known breakage:
reset_rebase &&
git checkout -b rebase-onto-5 master &&
git filter-branch --prune-empty -f --subdirectory-filter files_subtree &&
git commit -m "Empty commit" --allow-empty &&
git rebase -Xsubtree=files_subtree --onto files-master master &&
verbose test "$(commit_message HEAD~)" = "files_subtree/master5"
HEAD is now at 6ceeae2 Empty commit
Switched to a new branch 'rebase-onto-5'
Rewrite 857c354c14dec65ebdcbe167a352a0809dfe91f4 (1/3) (0 seconds passed, remaining 0 predicted)
Rewrite 8aaa705aa976a6676d7a4f353323a6c49c23b5a2 (2/3) (0 seconds passed, remaining 0 predicted)
Rewrite 8bb50adc9630aa0deade7689343795f582e5d715 (3/3) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/rebase-onto-5' was rewritten
[rebase-onto-5 6ceeae2] Empty commit
Author: A U Thor <author@example.com>
Rebasing (1/3)
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:
git commit --allow-empty
Otherwise, please use 'git cherry-pick --skip'
interactive rebase in progress; onto 138d8fa
Last command done (1 command done):
pick c2298a8 Add subproject master
Next commands to do (2 remaining commands):
pick ffbb8e9 master4
pick 1059aa6 files_subtree/master5
You are currently rebasing branch 'rebase-onto-5' on '138d8fa'.
Untracked files:
files/
nothing added to commit but untracked files present
Could not apply c2298a8... Add subproject master
not ok 8 - Rebase -Xsubtree --onto commit 5 # TODO known breakage
checking known breakage:
reset_rebase &&
git checkout -b rebase-onto-empty master &&
git filter-branch --prune-empty -f --subdirectory-filter files_subtree &&
git commit -m "Empty commit" --allow-empty &&
git rebase -Xsubtree=files_subtree --onto files-master master &&
verbose test "$(commit_message HEAD)" = "Empty commit"
HEAD is now at 6ceeae2 Empty commit
Switched to a new branch 'rebase-onto-empty'
Rewrite 857c354c14dec65ebdcbe167a352a0809dfe91f4 (1/3) (0 seconds passed, remaining 0 predicted)
Rewrite 8aaa705aa976a6676d7a4f353323a6c49c23b5a2 (2/3) (0 seconds passed, remaining 0 predicted)
Rewrite 8bb50adc9630aa0deade7689343795f582e5d715 (3/3) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/rebase-onto-empty' was rewritten
[rebase-onto-empty 6ceeae2] Empty commit
Author: A U Thor <author@example.com>
Rebasing (1/3)
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:
git commit --allow-empty
Otherwise, please use 'git cherry-pick --skip'
interactive rebase in progress; onto 138d8fa
Last command done (1 command done):
pick c2298a8 Add subproject master
Next commands to do (2 remaining commands):
pick ffbb8e9 master4
pick 1059aa6 files_subtree/master5
You are currently rebasing branch 'rebase-onto-empty' on '138d8fa'.
Untracked files:
files/
nothing added to commit but untracked files present
Could not apply c2298a8... Add subproject master
not ok 9 - Rebase -Xsubtree --onto empty commit # TODO known breakage
# still have 8 known breakage(s)
# passed all remaining 1 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3428-rebase-signoff.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3428-rebase-signoff/.git/
expecting success:
git commit --allow-empty -m "Initial empty commit" &&
git add file && git commit -m first &&
git config alias.rbs "rebase --signoff" &&
git rbs HEAD^ &&
git cat-file commit HEAD | sed -e "1,/^\$/d" > actual &&
test_cmp expected-signed actual
[master (root-commit) ba17f2f] Initial empty commit
Author: A U Thor <author@example.com>
[master 4f6fdae] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Current branch master is up to date, rebase forced.
First, rewinding head to replay your work on top of it...
Applying: first
ok 1 - rebase --signoff adds a sign-off line
expecting success:
git commit --amend -m "first" &&
git rbs --no-signoff HEAD^ &&
git cat-file commit HEAD | sed -e "1,/^\$/d" > actual &&
test_cmp expected-unsigned actual
[master 9d50552] first
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:42 2019 +0000
1 file changed, 1 insertion(+)
create mode 100644 file
Current branch master is up to date.
ok 2 - rebase --no-signoff does not add a sign-off line
expecting success:
test_when_finished "rm exec" &&
git commit --amend -m "first" &&
git rebase --exec "touch exec" --signoff HEAD^ &&
test_path_is_file exec &&
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
test_cmp expected-signed actual
[master 9d50552] first
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:42 2019 +0000
1 file changed, 1 insertion(+)
create mode 100644 file
Rebasing (1/2)
Rebasing (2/2)
Executing: touch exec
Successfully rebased and updated refs/heads/master.
ok 3 - rebase --exec --signoff adds a sign-off line
expecting success:
git commit --amend -m "first" &&
git rebase --root --keep-empty --signoff &&
git cat-file commit HEAD^ | sed -e "1,/^\$/d" >actual &&
test_cmp expected-initial-signed actual &&
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
test_cmp expected-signed actual
[master 9d50552] first
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:42 2019 +0000
1 file changed, 1 insertion(+)
create mode 100644 file
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/master.
ok 4 - rebase --root --signoff adds a sign-off line
expecting success:
git commit --amend -m "first" &&
git rebase -i --signoff HEAD^ &&
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
test_cmp expected-signed actual
[master 4ec1c15] first
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:42 2019 +0000
1 file changed, 1 insertion(+)
create mode 100644 file
Rebasing (1/1)
Successfully rebased and updated refs/heads/master.
ok 5 - rebase -i --signoff fails
expecting success:
git commit --amend -m "first" &&
git rebase -m --signoff HEAD^ &&
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
test_cmp expected-signed actual
[master 4ec1c15] first
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:42 2019 +0000
1 file changed, 1 insertion(+)
create mode 100644 file
Rebasing (1/1)
Successfully rebased and updated refs/heads/master.
ok 6 - rebase -m --signoff fails
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3429-rebase-edit-todo.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3429-rebase-edit-todo/.git/
expecting success:
test_commit initial &&
todo=.git/rebase-merge/git-rebase-todo &&
git rebase HEAD -x "echo exec touch F >>$todo" &&
test -e F
[master (root-commit) 24b24cf] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
Rebasing (2/2)
Executing: echo exec touch F >>.git/rebase-merge/git-rebase-todo
Rebasing (3/3)
Executing: touch F
Successfully rebased and updated refs/heads/master.
ok 1 - rebase exec modifies rebase-todo
checking prerequisite: SHA1
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test $(git hash-object /dev/null) = e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
)
prerequisite SHA1 ok
expecting success:
GIT_REBASE_TODO=.git/rebase-merge/git-rebase-todo &&
export GIT_REBASE_TODO &&
write_script append-todo.sh <<-\EOS &&
# For values 5 and 6, this yields SHA-1s with the same first two digits
echo "pick $(git rev-parse --short \
$(printf "%s\\n" \
"tree $EMPTY_TREE" \
"author A U Thor <author@example.org> $1 +0000" \
"committer A U Thor <author@example.org> $1 +0000" \
"" \
"$1" |
git hash-object -t commit -w --stdin))" >>$GIT_REBASE_TODO
shift
test -z "$*" ||
echo "exec $0 $*" >>$GIT_REBASE_TODO
EOS
git rebase HEAD -x "./append-todo.sh 5 6"
Rebasing (2/2)
Executing: ./append-todo.sh 5 6
Rebasing (3/4)
Rebasing (4/4)
Executing: ./append-todo.sh 6
Rebasing (5/5)
Successfully rebased and updated refs/heads/master.
ok 2 - loose object cache vs re-reading todo list
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3430-rebase-merges.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3430-rebase-merges/.git/
expecting success:
write_script replace-editor.sh <<-\EOF &&
mv "$1" "$(git rev-parse --git-path ORIGINAL-TODO)"
cp script-from-scratch "$1"
EOF
test_commit A &&
git checkout -b first &&
test_commit B &&
git checkout master &&
test_commit C &&
test_commit D &&
git merge --no-commit B &&
test_tick &&
git commit -m E &&
git tag -m E E &&
git checkout -b second C &&
test_commit F &&
test_commit G &&
git checkout master &&
git merge --no-commit G &&
test_tick &&
git commit -m H &&
git tag -m H H &&
git checkout A &&
test_commit conflicting-G G.t
[master (root-commit) 0ddfaf1] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
Switched to a new branch 'first'
[first d9df450] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B.t
Switched to branch 'master'
[master 5dee784] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C.t
[master 12bd07b] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D.t
Merging:
12bd07b D
virtual B
found 1 common ancestor:
0ddfaf1 A
Automatic merge went well; stopped before committing as requested
[master 2051b56] E
Author: A U Thor <author@example.com>
Switched to a new branch 'second'
[second ca2c861] F
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 F.t
[second 088b00a] G
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 G.t
Switched to branch 'master'
Merging:
2051b56 E
virtual G
found 1 common ancestor:
5dee784 C
Automatic merge went well; stopped before committing as requested
[master 233d48a] H
Author: A U Thor <author@example.com>
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 0ddfaf1 A
[detached HEAD 82776a5] conflicting-G
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 G.t
ok 1 - setup
expecting success:
cat >script-from-scratch <<-\EOF &&
label onto
# onebranch
pick G
pick D
label onebranch
# second
reset onto
pick B
label second
reset onto
merge -C H second
merge onebranch # Merge the topic branch 'onebranch'
EOF
test_config sequence.editor \""$PWD"/replace-editor.sh\" &&
test_tick &&
git rebase -i -r A master &&
test_cmp_graph <<-\EOF
* Merge the topic branch 'onebranch'
|\
| * D
| * G
* | H
|\ \
| |/
|/|
| * B
|/
* A
EOF
Rebasing (1/10)
Rebasing (2/10)
Rebasing (3/10)
Rebasing (4/10)
Rebasing (5/10)
Rebasing (6/10)
Rebasing (7/10)
Rebasing (8/10)
Rebasing (9/10)
Rebasing (10/10)
[detached HEAD c2c3fe3] Merge the topic branch 'onebranch'
Author: A U Thor <author@example.com>
Successfully rebased and updated refs/heads/master.
ok 2 - create completely different structure
expecting success:
cat >expect <<-\EOF &&
label onto
reset onto
pick d9df450 B
label E
reset onto
pick 5dee784 C
label branch-point
pick ca2c861 F
pick 088b00a G
label H
reset branch-point # C
pick 12bd07b D
merge -C 2051b56 E # E
merge -C 233d48a H # H
EOF
grep -v "^#" <.git/ORIGINAL-TODO >output &&
test_cmp expect output
ok 3 - generate correct todo list
expecting success:
git checkout -b refuse-to-reset &&
test_commit dont-overwrite-untracked &&
git checkout @{-1} &&
: >dont-overwrite-untracked.t &&
echo "reset refs/tags/dont-overwrite-untracked" >script-from-scratch &&
test_config sequence.editor \""$PWD"/replace-editor.sh\" &&
test_must_fail git rebase -ir HEAD &&
git rebase --abort
Switched to a new branch 'refuse-to-reset'
[refuse-to-reset 5f910bb] dont-overwrite-untracked
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dont-overwrite-untracked.t
Switched to branch 'master'
Rebasing (1/1)
error: The following untracked working tree files would be overwritten by reset:
dont-overwrite-untracked.t
Please move or remove them before you reset.
Aborting
hint: Could not execute the todo command
hint:
hint: reset refs/tags/dont-overwrite-untracked
hint:
hint: It has been rescheduled; To edit the command before continuing, please
hint: edit the todo list first:
hint:
hint: git rebase --edit-todo
hint: git rebase --continue
ok 4 - `reset` refuses to overwrite untracked files
expecting success:
test_when_finished "test_might_fail git rebase --abort" &&
git checkout -b conflicting-merge A &&
: fail because of conflicting untracked file &&
>G.t &&
echo "merge -C H G" >script-from-scratch &&
test_config sequence.editor \""$PWD"/replace-editor.sh\" &&
test_tick &&
test_must_fail git rebase -ir HEAD &&
grep "^merge -C .* G$" .git/rebase-merge/done &&
grep "^merge -C .* G$" .git/rebase-merge/git-rebase-todo &&
test_path_is_file .git/rebase-merge/patch &&
: fail because of merge conflict &&
rm G.t .git/rebase-merge/patch &&
git reset --hard conflicting-G &&
test_must_fail git rebase --continue &&
! grep "^merge -C .* G$" .git/rebase-merge/git-rebase-todo &&
test_path_is_file .git/rebase-merge/patch
Switched to a new branch 'conflicting-merge'
Rebasing (1/1)
error: The following untracked working tree files would be overwritten by merge:
G.t
Please move or remove them before you merge.
Aborting
error: could not even attempt to merge 'G'
hint: Could not execute the todo command
hint:
hint: merge -C 233d48a5caa0e14494fac2553a0b1179ff65b118 G
hint:
hint: It has been rescheduled; To edit the command before continuing, please
hint: edit the todo list first:
hint:
hint: git rebase --edit-todo
hint: git rebase --continue
Could not apply 233d48a... G
Merging:
0ddfaf1 A
088b00a G
found 1 common ancestor:
0ddfaf1 A
error: merging of trees da5497437fd67ca928333aab79c4b4b55036ea66 and bf63c5363cd51ea548b29818f0df98d80cc273ff failed
merge -C 233d48a5caa0e14494fac2553a0b1179ff65b118 G
merge -C 233d48a5caa0e14494fac2553a0b1179ff65b118 G
HEAD is now at 82776a5 conflicting-G
Rebasing (2/2)
Could not apply 233d48a... G
Merging:
82776a5 conflicting-G
088b00a G
found 1 common ancestor:
0ddfaf1 A
CONFLICT (add/add): Merge conflict in G.t
Auto-merging G.t
ok 5 - failed `merge -C` writes patch (may be rescheduled, too)
expecting success:
test_when_finished "test_might_fail git rebase --abort" &&
git checkout conflicting-G &&
echo "merge G" >script-from-scratch &&
test_config sequence.editor \""$PWD"/replace-editor.sh\" &&
test_tick &&
test_must_fail git rebase -ir HEAD &&
! grep "^merge G$" .git/rebase-merge/git-rebase-todo &&
grep "^Merge branch ${SQ}G${SQ}$" .git/rebase-merge/message
Note: switching to 'conflicting-G'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 82776a5 conflicting-G
Rebasing (1/1)
Could not merge G
Merging:
82776a5 conflicting-G
088b00a G
found 1 common ancestor:
0ddfaf1 A
CONFLICT (add/add): Merge conflict in G.t
Auto-merging G.t
Merge branch 'G'
ok 6 - failed `merge <branch>` does not crash
expecting success:
git checkout -b fast-forward-merge-c H &&
(
set_fake_editor &&
FAKE_COMMIT_MESSAGE=edited \
GIT_SEQUENCE_EDITOR="echo merge -c H G >" \
git rebase -ir @^
) &&
echo edited >expected &&
git log --pretty=format:%B -1 >actual &&
test_cmp expected actual
Previous HEAD position was 82776a5 conflicting-G
Switched to a new branch 'fast-forward-merge-c'
Rebasing (1/1)
[detached HEAD b61b5c2] edited
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:20:13 2005 -0700
Successfully rebased and updated refs/heads/fast-forward-merge-c.
ok 7 - fast-forward merge -c still rewords
expecting success:
git checkout -b already-upstream master &&
base="$(git rev-parse --verify HEAD)" &&
test_commit A1 &&
test_commit A2 &&
git reset --hard $base &&
test_commit B1 &&
test_tick &&
git merge -m "Merge branch A" A2 &&
git checkout -b upstream-with-a2 $base &&
test_tick &&
git cherry-pick A2 &&
git checkout already-upstream &&
test_tick &&
git rebase -i -r upstream-with-a2 &&
test_cmp_graph upstream-with-a2.. <<-\EOF
* Merge branch A
|\
| * A1
* | B1
|/
o A2
EOF
Switched to a new branch 'already-upstream'
[already-upstream cac3b13] A1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A1.t
[already-upstream 0466126] A2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A2.t
HEAD is now at c2c3fe3 Merge the topic branch 'onebranch'
[already-upstream fa07690] B1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B1.t
Merging:
fa07690 B1
virtual A2
found 1 common ancestor:
c2c3fe3 Merge the topic branch 'onebranch'
Merge made by the 'recursive' strategy.
A1.t | 1 +
A2.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 A1.t
create mode 100644 A2.t
Switched to a new branch 'upstream-with-a2'
[upstream-with-a2 071ab27] A2
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:27:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 A2.t
Switched to branch 'already-upstream'
Rebasing (1/7)
Rebasing (2/7)
Rebasing (3/7)
Rebasing (4/7)
Rebasing (5/7)
Rebasing (6/7)
Rebasing (7/7)
Successfully rebased and updated refs/heads/already-upstream.
ok 8 - with a branch tip that was cherry-picked already
expecting success:
git checkout -b cousins master &&
before="$(git rev-parse --verify HEAD)" &&
test_tick &&
git rebase -r HEAD^ &&
test_cmp_rev HEAD $before &&
test_tick &&
git rebase --rebase-merges=rebase-cousins HEAD^ &&
test_cmp_graph HEAD^.. <<-\EOF
* Merge the topic branch 'onebranch'
|\
| * D
| * G
|/
o H
EOF
Switched to a new branch 'cousins'
Rebasing (1/7)
Rebasing (2/7)
Rebasing (3/7)
Rebasing (4/7)
Rebasing (5/7)
Rebasing (6/7)
Rebasing (7/7)
Successfully rebased and updated refs/heads/cousins.
Rebasing (1/7)
Rebasing (2/7)
Rebasing (3/7)
Rebasing (4/7)
Rebasing (5/7)
Rebasing (6/7)
Rebasing (7/7)
Successfully rebased and updated refs/heads/cousins.
ok 9 - do not rebase cousins unless asked for
expecting success:
git worktree add wt &&
cat >wt/script-from-scratch <<-\EOF &&
label xyz
exec GIT_DIR=../.git git rev-parse --verify refs/rewritten/xyz >a || :
exec git rev-parse --verify refs/rewritten/xyz >b
EOF
test_config -C wt sequence.editor \""$PWD"/replace-editor.sh\" &&
git -C wt rebase -i HEAD &&
test_must_be_empty wt/a &&
test_cmp_rev HEAD "$(cat wt/b)"
Preparing worktree (new branch 'wt')
HEAD is now at 28125a1 Merge the topic branch 'onebranch'
Rebasing (1/3)
Rebasing (2/3)
Executing: GIT_DIR=../.git git rev-parse --verify refs/rewritten/xyz >a || :
fatal: Needed a single revision
Rebasing (3/3)
Executing: git rev-parse --verify refs/rewritten/xyz >b
Successfully rebased and updated refs/heads/wt.
ok 10 - refs/rewritten/* is worktree-local
expecting success:
git checkout -b abort-cleans-refs-rewritten H &&
GIT_SEQUENCE_EDITOR="echo break >>" git rebase -ir @^ &&
git rev-parse --verify refs/rewritten/onto &&
git rebase --abort &&
test_must_fail git rev-parse --verify refs/rewritten/onto
Switched to a new branch 'abort-cleans-refs-rewritten'
Rebasing (1/8)
Rebasing (2/8)
Rebasing (3/8)
Rebasing (4/8)
Rebasing (5/8)
Rebasing (6/8)
Rebasing (7/8)
Rebasing (8/8)
Stopped at 233d48a... H
2051b561a3f30f5455d33a5269d3851790a86f42
fatal: Needed a single revision
ok 11 - --abort cleans up refs/rewritten
expecting success:
git checkout -b quit-cleans-refs-rewritten H &&
GIT_SEQUENCE_EDITOR="echo break >>" git rebase -ir @^ &&
git rev-parse --verify refs/rewritten/onto &&
git rebase --quit &&
test_must_fail git rev-parse --verify refs/rewritten/onto
Switched to a new branch 'quit-cleans-refs-rewritten'
Rebasing (1/8)
Rebasing (2/8)
Rebasing (3/8)
Rebasing (4/8)
Rebasing (5/8)
Rebasing (6/8)
Rebasing (7/8)
Rebasing (8/8)
Stopped at 233d48a... H
2051b561a3f30f5455d33a5269d3851790a86f42
fatal: Needed a single revision
ok 12 - --quit cleans up refs/rewritten
expecting success:
git checkout -b post-rewrite H &&
test_commit same1 &&
git reset --hard HEAD^ &&
test_commit same2 &&
git merge -m "to fix up" same1 &&
echo same old same old >same2.t &&
test_tick &&
git commit --fixup HEAD same2.t &&
fixup="$(git rev-parse HEAD)" &&
mkdir -p .git/hooks &&
test_when_finished "rm .git/hooks/post-rewrite" &&
echo "cat >actual" | write_script .git/hooks/post-rewrite &&
test_tick &&
git rebase -i --autosquash -r HEAD^^^ &&
printf "%s %s\n%s %s\n%s %s\n%s %s\n" >expect $(git rev-parse \
$fixup^^2 HEAD^2 \
$fixup^^ HEAD^ \
$fixup^ HEAD \
$fixup HEAD) &&
test_cmp expect actual
Switched to a new branch 'post-rewrite'
[post-rewrite 8ccf841] same1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 same1.t
HEAD is now at 233d48a H
[post-rewrite 30f9b1b] same2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 same2.t
Merging:
30f9b1b same2
virtual same1
found 1 common ancestor:
233d48a H
Merge made by the 'recursive' strategy.
same1.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 same1.t
[post-rewrite 62ae8be] fixup! to fix up
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (1/8)
Rebasing (2/8)
Rebasing (3/8)
Rebasing (4/8)
Rebasing (5/8)
Rebasing (6/8)
Rebasing (7/8)
Rebasing (8/8)
Successfully rebased and updated refs/heads/post-rewrite.
ok 13 - post-rewrite hook and fixups work for merges
expecting success:
echo "merge HEAD^" >script-from-scratch &&
test_config -C wt sequence.editor \""$PWD"/replace-editor.sh\" &&
before="$(git rev-parse HEAD)" &&
git rebase -i HEAD &&
test_cmp_rev HEAD $before
Rebasing (1/1)
Successfully rebased and updated refs/heads/post-rewrite.
ok 14 - refuse to merge ancestors of HEAD
expecting success:
git checkout --orphan unrelated &&
(GIT_AUTHOR_NAME="Parsnip" GIT_AUTHOR_EMAIL="root@example.com" \
test_commit second-root) &&
test_commit third-root &&
cat >script-from-scratch <<-\EOF &&
pick third-root
label first-branch
reset [new root]
pick second-root
merge first-branch # Merge the 3rd root
EOF
test_config sequence.editor \""$PWD"/replace-editor.sh\" &&
test_tick &&
git rebase -i --force-rebase --root -r &&
test "Parsnip" = "$(git show -s --format=%an HEAD^)" &&
test $(git rev-parse second-root^0) != $(git rev-parse HEAD^) &&
test $(git rev-parse second-root:second-root.t) = \
$(git rev-parse HEAD^:second-root.t) &&
test_cmp_graph HEAD <<-\EOF &&
* Merge the 3rd root
|\
| * third-root
* second-root
EOF
: fast forward if possible &&
before="$(git rev-parse --verify HEAD)" &&
test_might_fail git config --unset sequence.editor &&
test_tick &&
git rebase -i --root -r &&
test_cmp_rev HEAD $before
Switched to a new branch 'unrelated'
[unrelated (root-commit) ca4bbbb] second-root
Author: Parsnip <root@example.com>
9 files changed, 9 insertions(+)
create mode 100644 A.t
create mode 100644 B.t
create mode 100644 C.t
create mode 100644 D.t
create mode 100644 F.t
create mode 100644 G.t
create mode 100644 same1.t
create mode 100644 same2.t
create mode 100644 second-root.t
[unrelated 2d056ae] third-root
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 third-root.t
Rebasing (1/5)
Rebasing (2/5)
Rebasing (3/5)
Rebasing (4/5)
Rebasing (5/5)
[detached HEAD 9d9ec48] Merge the 3rd root
Author: A U Thor <author@example.com>
Successfully rebased and updated refs/heads/unrelated.
Rebasing (1/7)
Rebasing (2/7)
Rebasing (3/7)
Rebasing (4/7)
Rebasing (5/7)
Rebasing (6/7)
Rebasing (7/7)
Successfully rebased and updated refs/heads/unrelated.
ok 15 - root commits
expecting success:
head=$(git rev-parse HEAD) &&
cat >script-from-scratch <<-EOF &&
reset [new root]
merge $head
EOF
test_config sequence.editor \""$PWD"/replace-editor.sh\" &&
test_tick &&
git rebase -i -r HEAD^ &&
test_cmp_rev HEAD $head
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/unrelated.
ok 16 - a "merge" into a root commit is a fast-forward
expecting success:
git checkout --orphan khnum &&
test_commit yama &&
git checkout -b asherah master &&
test_commit shamkat &&
git merge --allow-unrelated-histories khnum &&
test_tick &&
git rebase -f -r HEAD^ &&
! test_cmp_rev HEAD^2 khnum &&
test_cmp_graph HEAD^.. <<-\EOF &&
* Merge branch 'khnum' into asherah
|\
| * yama
o shamkat
EOF
test_tick &&
git rebase --rebase-merges=rebase-cousins HEAD^ &&
test_cmp_graph HEAD^.. <<-\EOF
* Merge branch 'khnum' into asherah
|\
| * yama
|/
o shamkat
EOF
Switched to a new branch 'khnum'
[khnum (root-commit) 1c2c8c9] yama
Author: A U Thor <author@example.com>
11 files changed, 11 insertions(+)
create mode 100644 A.t
create mode 100644 B.t
create mode 100644 C.t
create mode 100644 D.t
create mode 100644 F.t
create mode 100644 G.t
create mode 100644 same1.t
create mode 100644 same2.t
create mode 100644 second-root.t
create mode 100644 third-root.t
create mode 100644 yama.t
Switched to a new branch 'asherah'
[asherah c0fbd4e] shamkat
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 shamkat.t
Merging:
c0fbd4e shamkat
virtual khnum
found 0 common ancestors:
Merge made by the 'recursive' strategy.
C.t | 1 +
F.t | 1 +
same1.t | 1 +
same2.t | 1 +
second-root.t | 1 +
third-root.t | 1 +
yama.t | 1 +
7 files changed, 7 insertions(+)
create mode 100644 C.t
create mode 100644 F.t
create mode 100644 same1.t
create mode 100644 same2.t
create mode 100644 second-root.t
create mode 100644 third-root.t
create mode 100644 yama.t
Rebasing (1/6)
Rebasing (2/6)
Rebasing (3/6)
Rebasing (4/6)
Rebasing (5/6)
Rebasing (6/6)
Successfully rebased and updated refs/heads/asherah.
error: two revisions point to different objects:
'HEAD^2': fdb426082a48f6d427387d5acfa816c8742b4a64
'khnum': 1c2c8c97824d302c0015c09e79da8a38cea3db19
Rebasing (1/6)
Rebasing (2/6)
Rebasing (3/6)
Rebasing (4/6)
Rebasing (5/6)
Rebasing (6/6)
Successfully rebased and updated refs/heads/asherah.
ok 17 - A root commit can be a cousin, treat it that way
expecting success:
git checkout -b third B &&
test_commit I &&
third=$(git rev-parse HEAD) &&
git checkout -b labels master &&
git merge --no-commit third &&
test_tick &&
git commit -m "Merge commit '$third' into labels" &&
echo noop >script-from-scratch &&
test_config sequence.editor \""$PWD"/replace-editor.sh\" &&
test_tick &&
git rebase -i -r A &&
grep "^label $third-" .git/ORIGINAL-TODO &&
! grep "^label $third$" .git/ORIGINAL-TODO
Switched to a new branch 'third'
[third 2c3fb7c] I
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 I.t
Switched to a new branch 'labels'
Merging:
c2c3fe3 Merge the topic branch 'onebranch'
virtual third
found 1 common ancestor:
d9df450 B
Automatic merge went well; stopped before committing as requested
[labels 965a0f1] Merge commit '2c3fb7c3b5ab0c436e798f81257c51ea0bfd64a7' into labels
Author: A U Thor <author@example.com>
Successfully rebased and updated refs/heads/labels.
label 2c3fb7c3b5ab0c436e798f81257c51ea0bfd64a7-2
ok 18 - labels that are object IDs are rewritten
expecting success:
git checkout -b three &&
test_commit before-octopus &&
test_commit three &&
git checkout -b two HEAD^ &&
test_commit two &&
git checkout -b one HEAD^ &&
test_commit one &&
test_tick &&
(GIT_AUTHOR_NAME="Hank" GIT_AUTHOR_EMAIL="hank@sea.world" \
git merge -m "Tüntenfüsch" two three) &&
: fast forward if possible &&
before="$(git rev-parse --verify HEAD)" &&
test_tick &&
git rebase -i -r HEAD^^ &&
test_cmp_rev HEAD $before &&
test_tick &&
git rebase -i --force-rebase -r HEAD^^ &&
test "Hank" = "$(git show -s --format=%an HEAD)" &&
test "$before" != $(git rev-parse HEAD) &&
test_cmp_graph HEAD^^.. <<-\EOF
*-. Tüntenfüsch
|\ \
| | * three
| * | two
| |/
* | one
|/
o before-octopus
EOF
Switched to a new branch 'three'
[three ae5e7b4] before-octopus
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 before-octopus.t
[three c52c521] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
Switched to a new branch 'two'
[two 0af080b] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
Switched to a new branch 'one'
[one 444e548] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
warning: refname 'two' is ambiguous.
warning: refname 'three' is ambiguous.
Trying simple merge with two
Trying simple merge with three
Merge made by the 'octopus' strategy.
three.t | 1 +
two.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 three.t
create mode 100644 two.t
Rebasing (1/10)
Rebasing (2/10)
Rebasing (3/10)
Rebasing (4/10)
Rebasing (5/10)
Rebasing (6/10)
Rebasing (7/10)
Rebasing (8/10)
Rebasing (9/10)
Rebasing (10/10)
Successfully rebased and updated refs/heads/one.
Rebasing (1/10)
Rebasing (2/10)
Rebasing (3/10)
Rebasing (4/10)
Rebasing (5/10)
Rebasing (6/10)
Rebasing (7/10)
Rebasing (8/10)
Rebasing (9/10)
Rebasing (10/10)
Trying simple merge with 80e7b2bd8db0484fa486b62748fb047f4feea1bc
Trying simple merge with 2ad64730bee2c244a75542ad0813d60731471629
Merge made by the 'octopus' strategy.
Successfully rebased and updated refs/heads/one.
ok 19 - octopus merges
expecting success:
git checkout -b with-exec H &&
echo Booh >B.t &&
test_tick &&
git commit --fixup B B.t &&
write_script show.sh <<-\EOF &&
subject="$(git show -s --format=%s HEAD)"
content="$(git diff HEAD^! | tail -n 1)"
echo "$subject: $content"
EOF
test_tick &&
git rebase -ir --autosquash --exec ./show.sh A >actual &&
grep "B: +Booh" actual &&
grep "E: +Booh" actual &&
grep "G: +G" actual
Switched to a new branch 'with-exec'
[with-exec 9c716d0] fixup! B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (1/22)
Rebasing (2/22)
Rebasing (3/22)
Rebasing (4/22)
Rebasing (5/22)
Executing: ./show.sh
Rebasing (6/22)
Rebasing (7/22)
Rebasing (8/22)
Rebasing (9/22)
Executing: ./show.sh
Rebasing (10/22)
Rebasing (11/22)
Rebasing (12/22)
Executing: ./show.sh
Rebasing (13/22)
Rebasing (14/22)
Executing: ./show.sh
Rebasing (15/22)
Rebasing (16/22)
Rebasing (17/22)
Rebasing (18/22)
Executing: ./show.sh
Rebasing (19/22)
Rebasing (20/22)
Executing: ./show.sh
Rebasing (21/22)
Rebasing (22/22)
Executing: ./show.sh
Successfully rebased and updated refs/heads/with-exec.
B: +Booh
E: +Booh
G: +G
ok 20 - with --autosquash and --exec
expecting success:
git checkout -b already-has-g E &&
git cherry-pick E..G &&
test_commit H2 &&
git checkout -b conflicts-in-merge H &&
test_commit H2 H2.t conflicts H2-conflict &&
test_must_fail git rebase -r already-has-g &&
grep conflicts H2.t &&
echo resolved >H2.t &&
git add -u &&
git rebase --continue &&
test_must_fail git rev-parse --verify HEAD^2 &&
test_path_is_missing .git/MERGE_HEAD
Switched to a new branch 'already-has-g'
[already-has-g 24dad35] F
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:18:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 F.t
[already-has-g 2d3f054] G
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:19:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 G.t
[already-has-g 71891ff] H2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 H2.t
Switched to a new branch 'conflicts-in-merge'
[conflicts-in-merge 6a8cc62] H2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 H2.t
Rebasing (1/6)
Rebasing (2/6)
Rebasing (3/6)
Rebasing (4/6)
Rebasing (5/6)
Rebasing (6/6)
CONFLICT (add/add): Merge conflict in H2.t
Auto-merging H2.t
error: could not apply 6a8cc62... H2
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 6a8cc62... H2
conflicts
[detached HEAD 393eca8] H2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/conflicts-in-merge.
fatal: Needed a single revision
ok 21 - --continue after resolving conflicts after a merge
# passed all 21 test(s)
1..21
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3500-cherry.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3500-cherry/.git/
expecting success: echo First > A &&
git update-index --add A &&
test_tick &&
git commit -m "Add A." &&
git checkout -b my-topic-branch &&
echo Second > B &&
git update-index --add B &&
test_tick &&
git commit -m "Add B." &&
echo AnotherSecond > C &&
git update-index --add C &&
test_tick &&
git commit -m "Add C." &&
git checkout -f master &&
rm -f B C &&
echo Third >> A &&
git update-index A &&
test_tick &&
git commit -m "Modify A." &&
expr "$(echo $(git cherry master my-topic-branch) )" : "+ [^ ]* + .*"
[master (root-commit) 4655d1a] Add A.
Author: A U Thor <bogus_email_address>
1 file changed, 1 insertion(+)
create mode 100644 A
Switched to a new branch 'my-topic-branch'
[my-topic-branch 75dd694] Add B.
Author: A U Thor <bogus_email_address>
1 file changed, 1 insertion(+)
create mode 100644 B
[my-topic-branch c8d60d2] Add C.
Author: A U Thor <bogus_email_address>
1 file changed, 1 insertion(+)
create mode 100644 C
Switched to branch 'master'
[master 90cb8ed] Modify A.
Author: A U Thor <bogus_email_address>
1 file changed, 1 insertion(+)
85
ok 1 - prepare repository with topic branch, and check cherry finds the 2 patches from there
expecting success: expr "$(echo $(git cherry master my-topic-branch my-topic-branch^1) )" : "+ [^ ]*"
42
ok 2 - check that cherry with limit returns only the top patch
expecting success: git cherry-pick my-topic-branch^0 &&
echo $(git cherry master my-topic-branch) &&
expr "$(echo $(git cherry master my-topic-branch) )" : "+ [^ ]* - .*"
[master 3a1a38a] Add C.
Author: A U Thor <bogus_email_address>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 C
+ 75dd694131e593dac8cf8ea0a377f1b73a80c1ad - c8d60d26f42936e7a055747f5412d41a6bce7d77
85
ok 3 - cherry-pick one of the 2 patches, and check cherry recognized one and only one as new
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3501-revert-cherry-pick.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3501-revert-cherry-pick/.git/
expecting success:
for l in a b c d e f g h i j k l m n o
do
echo $l$l$l$l$l$l$l$l$l
done >oops &&
test_tick &&
git add oops &&
git commit -m initial &&
git tag initial &&
test_tick &&
echo "Add extra line at the end" >>oops &&
git commit -a -m added &&
git tag added &&
test_tick &&
git mv oops spoo &&
git commit -m rename1 &&
git tag rename1 &&
test_tick &&
git checkout -b side initial &&
git mv oops opos &&
git commit -m rename2 &&
git tag rename2
[master (root-commit) a242c62] initial
Author: A U Thor <author@example.com>
1 file changed, 15 insertions(+)
create mode 100644 oops
[master 4399171] added
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 31df260] rename1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename oops => spoo (100%)
Switched to a new branch 'side'
[side f6d0551] rename2
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename oops => opos (100%)
ok 1 - setup
expecting success:
pos=$(git rev-parse HEAD) &&
git diff --exit-code HEAD &&
test_must_fail git cherry-pick --nonsense 2>msg &&
git diff --exit-code HEAD "$pos" &&
test_i18ngrep [Uu]sage: msg
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
usage: git cherry-pick [<options>] <commit-ish>...
ok 2 - cherry-pick --nonsense
expecting success:
pos=$(git rev-parse HEAD) &&
git diff --exit-code HEAD &&
test_must_fail git revert --nonsense 2>msg &&
git diff --exit-code HEAD "$pos" &&
test_i18ngrep [Uu]sage: msg
usage: git revert [<options>] <commit-ish>...
ok 3 - revert --nonsense
expecting success:
git checkout rename2 &&
git cherry-pick added &&
test $(git rev-parse HEAD^) = $(git rev-parse rename2) &&
test -f opos &&
grep "Add extra line at the end" opos &&
git reflog -1 | grep cherry-pick
Note: switching to 'rename2'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at f6d0551 rename2
[detached HEAD 2da2754] added
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+)
Add extra line at the end
2da2754 HEAD@{0}: cherry-pick: added
ok 4 - cherry-pick after renaming branch
expecting success:
git checkout rename1 &&
git revert added &&
test $(git rev-parse HEAD^) = $(git rev-parse rename1) &&
test -f spoo &&
! grep "Add extra line at the end" spoo &&
git reflog -1 | grep revert
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
2da2754 added
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> 2da2754
HEAD is now at 31df260 rename1
[detached HEAD 9990ddc] Revert "added"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 deletion(-)
9990ddc HEAD@{0}: revert: Revert "added"
ok 5 - revert after renaming branch
expecting success:
git clone . copy &&
(
cd copy &&
git checkout initial &&
test-tool chmtime +40 oops &&
git cherry-pick added
)
Cloning into 'copy'...
done.
Note: switching to '9990ddca844ef3875d864da986dfd141d1a88865'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
9990ddc Revert "added"
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> 9990ddc
HEAD is now at a242c62 initial
[detached HEAD 096ed54] added
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+)
ok 6 - cherry-pick on stat-dirty working tree
expecting success:
echo content >extra_file &&
git add extra_file &&
test_must_fail git revert HEAD 2>errors &&
test_i18ngrep "your local changes would be overwritten by " errors
error: your local changes would be overwritten by revert.
ok 7 - revert forbidden on dirty working tree
expecting success:
git checkout --orphan unborn &&
git rm --cached -r . &&
rm -rf * &&
git cherry-pick initial &&
git diff --quiet initial &&
! test_cmp_rev initial HEAD
Switched to a new branch 'unborn'
A extra_file
rm 'extra_file'
rm 'spoo'
[unborn 38e6d75] initial
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 15 insertions(+)
create mode 100644 oops
error: two revisions point to different objects:
'initial': a242c628eb0a8dc3b46a2304662d9ada7621ef18
'HEAD': 38e6d75e0aa3f58322a336b3c203eff724d10493
ok 8 - cherry-pick on unborn branch
expecting success:
git checkout unborn &&
test_commit to-pick actual content &&
git checkout master &&
git cherry-pick - &&
echo content >expect &&
test_cmp expect actual
Already on 'unborn'
[unborn d9ba711] to-pick
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 actual
Switched to branch 'master'
Skipped spoo (merged same as existing)
[master 7c68b81] to-pick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 actual
ok 9 - cherry-pick "-" to pick from previous branch
expecting success:
test_create_repo afresh &&
(
cd afresh &&
test_commit one &&
test_commit two &&
test_commit three &&
test_must_fail git cherry-pick -
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3501-revert-cherry-pick/afresh/.git/
[master (root-commit) 26cc6ba] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 776892e] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[master 6c11eb3] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
fatal: bad revision '@{-1}'
ok 10 - cherry-pick "-" is meaningless without checkout
expecting success:
git checkout -b side-branch &&
test_commit change actual change &&
git checkout master &&
git cherry-pick -s - &&
echo "Signed-off-by: C O Mitter <committer@example.com>" >expect &&
git cat-file commit HEAD | grep ^Signed-off-by: >signoff &&
test_cmp expect signoff &&
echo change >expect &&
test_cmp expect actual
Switched to a new branch 'side-branch'
[side-branch 94f7852] change
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'master'
[master a524e05] change
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:18:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 11 - cherry-pick "-" works with arguments
expecting success:
test_commit to-rename &&
git checkout -b unrelated &&
test_commit unrelated &&
git checkout @{-1} &&
git mv to-rename.t renamed &&
test_tick &&
git commit -m renamed &&
echo modified >renamed &&
git cherry-pick refs/heads/unrelated >out &&
test $(git rev-parse :0:renamed) = $(git rev-parse HEAD~2:to-rename.t) &&
grep -q "^modified$" renamed
[master 035700e] to-rename
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 to-rename.t
Switched to a new branch 'unrelated'
[unrelated ef4075f] unrelated
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 unrelated.t
Switched to branch 'master'
[master 356b685] renamed
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename to-rename.t => renamed (100%)
ok 12 - cherry-pick works with dirty renamed file
# passed all 12 test(s)
1..12
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3502-cherry-pick-merge.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3502-cherry-pick-merge/.git/
expecting success:
>A &&
>B &&
git add A B &&
git commit -m "Initial" &&
git tag initial &&
git branch side &&
echo new line >A &&
git commit -m "add line to A" A &&
git tag a &&
git checkout side &&
echo new line >B &&
git commit -m "add line to B" B &&
git tag b &&
git checkout master &&
git merge side &&
git tag c
[master (root-commit) 7fb44ff] Initial
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 A
create mode 100644 B
[master a3ac56f] add line to A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'side'
[side 04bd9d5] add line to B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'master'
Merging:
a3ac56f add line to A
virtual side
found 1 common ancestor:
7fb44ff Initial
Merge made by the 'recursive' strategy.
B | 1 +
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
# expect 129 here to distinguish between cases where
# there was nothing to cherry-pick
test_expect_code 129 git cherry-pick -m &&
test_expect_code 129 git cherry-pick -m foo b &&
test_expect_code 129 git cherry-pick -m -1 b &&
test_expect_code 129 git cherry-pick -m 0 b
error: switch `m' requires a value
error: option `mainline' expects a number greater than zero
error: option `mainline' expects a number greater than zero
error: option `mainline' expects a number greater than zero
ok 2 - cherry-pick -m complains of bogus numbers
expecting success:
git reset --hard &&
git checkout a^0 &&
git cherry-pick -m 1 b &&
git diff --exit-code c --
HEAD is now at 042d421 Merge branch 'side'
Note: switching to 'a^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at a3ac56f add line to A
[detached HEAD d00300f] add line to B
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:54 2019 +0000
1 file changed, 1 insertion(+)
ok 3 - cherry-pick explicit first parent of a non-merge
expecting success:
git reset --hard &&
git checkout a^0 &&
test_must_fail git cherry-pick c &&
git diff --exit-code a --
HEAD is now at d00300f add line to B
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
d00300f add line to B
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> d00300f
HEAD is now at a3ac56f add line to A
error: commit 042d421e17dce1ac7a83a49c8fd089a61bd99fbf is a merge but no -m option was given.
fatal: cherry-pick failed
ok 4 - cherry pick a merge without -m should fail
expecting success:
git reset --hard &&
git checkout a^0 &&
git cherry-pick -m 1 c &&
git diff --exit-code c
HEAD is now at a3ac56f add line to A
HEAD is now at a3ac56f add line to A
[detached HEAD 627581f] Merge branch 'side'
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:55 2019 +0000
1 file changed, 1 insertion(+)
ok 5 - cherry pick a merge (1)
expecting success:
git reset --hard &&
git checkout b^0 &&
git cherry-pick -m 2 c &&
git diff --exit-code c
HEAD is now at 627581f Merge branch 'side'
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
627581f Merge branch 'side'
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> 627581f
HEAD is now at 04bd9d5 add line to B
[detached HEAD d10a1b6] Merge branch 'side'
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:55 2019 +0000
1 file changed, 1 insertion(+)
ok 6 - cherry pick a merge (2)
expecting success:
git reset --hard &&
git checkout b^0 &&
test_must_fail git cherry-pick -m 3 c
HEAD is now at d10a1b6 Merge branch 'side'
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
d10a1b6 Merge branch 'side'
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> d10a1b6
HEAD is now at 04bd9d5 add line to B
error: commit 042d421e17dce1ac7a83a49c8fd089a61bd99fbf does not have parent 3
fatal: cherry-pick failed
ok 7 - cherry pick a merge relative to nonexistent parent should fail
expecting success:
git reset --hard &&
git checkout c^0 &&
git revert -m 1 b &&
git diff --exit-code a --
HEAD is now at 04bd9d5 add line to B
Previous HEAD position was 04bd9d5 add line to B
HEAD is now at 042d421 Merge branch 'side'
[detached HEAD 6a3b1d9] Revert "add line to B"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:55 2019 +0000
1 file changed, 1 deletion(-)
ok 8 - revert explicit first parent of a non-merge
expecting success:
git reset --hard &&
git checkout c^0 &&
test_must_fail git revert c &&
git diff --exit-code c
HEAD is now at 6a3b1d9 Revert "add line to B"
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
6a3b1d9 Revert "add line to B"
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> 6a3b1d9
HEAD is now at 042d421 Merge branch 'side'
error: commit 042d421e17dce1ac7a83a49c8fd089a61bd99fbf is a merge but no -m option was given.
fatal: revert failed
ok 9 - revert a merge without -m should fail
expecting success:
git reset --hard &&
git checkout c^0 &&
git revert -m 1 c &&
git diff --exit-code a --
HEAD is now at 042d421 Merge branch 'side'
HEAD is now at 042d421 Merge branch 'side'
[detached HEAD 665a0ad] Revert "Merge branch 'side'"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:55 2019 +0000
1 file changed, 1 deletion(-)
ok 10 - revert a merge (1)
expecting success:
git reset --hard &&
git checkout c^0 &&
git revert -m 2 c &&
git diff --exit-code b --
HEAD is now at 665a0ad Revert "Merge branch 'side'"
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
665a0ad Revert "Merge branch 'side'"
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> 665a0ad
HEAD is now at 042d421 Merge branch 'side'
[detached HEAD 3353a8e] Revert "Merge branch 'side'"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:55 2019 +0000
1 file changed, 1 deletion(-)
ok 11 - revert a merge (2)
expecting success:
git reset --hard &&
git checkout c^0 &&
test_must_fail git revert -m 3 c &&
git diff --exit-code c
HEAD is now at 3353a8e Revert "Merge branch 'side'"
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
3353a8e Revert "Merge branch 'side'"
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> 3353a8e
HEAD is now at 042d421 Merge branch 'side'
error: commit 042d421e17dce1ac7a83a49c8fd089a61bd99fbf does not have parent 3
fatal: revert failed
ok 12 - revert a merge relative to nonexistent parent should fail
# passed all 12 test(s)
1..12
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3503-cherry-pick-root.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3503-cherry-pick-root/.git/
expecting success:
echo first > file1 &&
git add file1 &&
test_tick &&
git commit -m "first" &&
git symbolic-ref HEAD refs/heads/second &&
rm .git/index file1 &&
echo second > file2 &&
git add file2 &&
test_tick &&
git commit -m "second" &&
git symbolic-ref HEAD refs/heads/third &&
rm .git/index file2 &&
echo third > file3 &&
git add file3 &&
test_tick &&
git commit -m "third"
[master (root-commit) 0c72e4f] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1
[second (root-commit) bbcd39a] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
[third (root-commit) 4911fa6] third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
ok 1 - setup
expecting success:
git checkout second^0 &&
git cherry-pick master &&
echo first >expect &&
test_cmp expect file1
Note: switching to 'second^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at bbcd39a second
[detached HEAD 3e6f574] first
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 file1
ok 2 - cherry-pick a root commit
expecting success:
git revert master &&
test_path_is_missing file1
Removing file1
[detached HEAD 3eb7e0d] Revert "first"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 deletion(-)
delete mode 100644 file1
ok 3 - revert a root commit
expecting success:
git cherry-pick --strategy=resolve master &&
echo first >expect &&
test_cmp expect file1
Trying simple merge.
[detached HEAD 54587e2] first
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 file1
ok 4 - cherry-pick a root commit with an external strategy
expecting success:
git revert --strategy=resolve master &&
test_path_is_missing file1
Removing file1
[detached HEAD a457399] Revert "first"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 deletion(-)
delete mode 100644 file1
ok 5 - revert a root commit with an external strategy
expecting success:
echo first >expect.file1 &&
echo second >expect.file2 &&
echo third >expect.file3 &&
git checkout second^0 &&
git cherry-pick master third &&
test_cmp expect.file1 file1 &&
test_cmp expect.file2 file2 &&
test_cmp expect.file3 file3 &&
git rev-parse --verify HEAD^^ &&
test_must_fail git rev-parse --verify HEAD^^^
Warning: you are leaving 4 commits behind, not connected to
any of your branches:
a457399 Revert "first"
54587e2 first
3eb7e0d Revert "first"
3e6f574 first
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> a457399
HEAD is now at bbcd39a second
[detached HEAD 3e6f574] first
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 file1
[detached HEAD 2069bd1] third
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 file3
bbcd39af5b7918b8e79c884f958eeddbace1fd46
fatal: Needed a single revision
ok 6 - cherry-pick two root commits
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3504-cherry-pick-rerere.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3504-cherry-pick-rerere/.git/
expecting success:
test_commit foo &&
test_commit foo-master foo &&
test_commit bar-master bar &&
git checkout -b dev foo &&
test_commit foo-dev foo &&
test_commit bar-dev bar &&
git config rerere.enabled true
[master (root-commit) ddd63c9] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
[master 07d3a39] foo-master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
[master 04a71fd] bar-master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
Switched to a new branch 'dev'
[dev 1d8ba7e] foo-dev
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
[dev 5392a79] bar-dev
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
ok 1 - setup
expecting success:
test_must_fail git merge master
Merging:
5392a79 bar-dev
virtual master
found 1 common ancestor:
ddd63c9 foo
CONFLICT (add/add): Merge conflict in foo
Auto-merging foo
CONFLICT (add/add): Merge conflict in bar
Auto-merging bar
Recorded preimage for 'bar'
Recorded preimage for 'foo'
Automatic merge failed; fix conflicts and then commit the result.
ok 2 - conflicting merge
expecting success:
echo foo-resolved >foo &&
echo bar-resolved >bar &&
git commit -am resolved &&
cp foo foo-expect &&
cp bar bar-expect &&
git reset --hard HEAD^
Recorded resolution for 'bar'.
Recorded resolution for 'foo'.
[dev b8bd488] resolved
Author: A U Thor <author@example.com>
HEAD is now at 5392a79 bar-dev
ok 3 - fixup
expecting success:
test_must_fail git cherry-pick --rerere-autoupdate foo..bar-master &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
test_must_fail git cherry-pick --continue &&
test_cmp bar-expect bar &&
git diff-files --quiet &&
git cherry-pick --continue &&
git reset --hard bar-dev
CONFLICT (add/add): Merge conflict in foo
Auto-merging foo
error: could not apply 07d3a39... foo-master
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Staged 'foo' using previous resolution.
[dev 7d941fc] foo-master
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
CONFLICT (add/add): Merge conflict in bar
Auto-merging bar
error: could not apply 04a71fd... bar-master
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Staged 'bar' using previous resolution.
[dev f23d681] bar-master
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at 5392a79 bar-dev
ok 4 - cherry-pick conflict with --rerere-autoupdate
expecting success:
test_config rerere.autoUpdate true &&
test_must_fail git cherry-pick foo..bar-master &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
test_must_fail git cherry-pick --continue &&
test_cmp bar-expect bar &&
git diff-files --quiet &&
git cherry-pick --continue &&
git reset --hard bar-dev
CONFLICT (add/add): Merge conflict in foo
Auto-merging foo
error: could not apply 07d3a39... foo-master
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Staged 'foo' using previous resolution.
[dev 7d941fc] foo-master
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
CONFLICT (add/add): Merge conflict in bar
Auto-merging bar
error: could not apply 04a71fd... bar-master
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Staged 'bar' using previous resolution.
[dev f23d681] bar-master
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at 5392a79 bar-dev
ok 5 - cherry-pick conflict repsects rerere.autoUpdate
expecting success:
test_config rerere.autoUpdate true &&
test_must_fail git cherry-pick --no-rerere-autoupdate foo..bar-master &&
test_cmp foo-expect foo &&
test_must_fail git diff-files --quiet &&
git add foo &&
test_must_fail git cherry-pick --continue &&
test_cmp bar-expect bar &&
test_must_fail git diff-files --quiet &&
git add bar &&
git cherry-pick --continue &&
git reset --hard bar-dev
CONFLICT (add/add): Merge conflict in foo
Auto-merging foo
error: could not apply 07d3a39... foo-master
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Resolved 'foo' using previous resolution.
[dev 7d941fc] foo-master
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
CONFLICT (add/add): Merge conflict in bar
Auto-merging bar
error: could not apply 04a71fd... bar-master
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Resolved 'bar' using previous resolution.
[dev f23d681] bar-master
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at 5392a79 bar-dev
ok 6 - cherry-pick conflict with --no-rerere-autoupdate
expecting success:
test_must_fail git cherry-pick --rerere-autoupdate foo..bar-master &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
test_must_fail git cherry-pick --continue --rerere-autoupdate >actual 2>&1 &&
echo "fatal: cherry-pick: --rerere-autoupdate cannot be used with --continue" >expect &&
test_i18ncmp expect actual &&
test_must_fail git cherry-pick --continue --no-rerere-autoupdate >actual 2>&1 &&
echo "fatal: cherry-pick: --no-rerere-autoupdate cannot be used with --continue" >expect &&
test_i18ncmp expect actual &&
git cherry-pick --abort
CONFLICT (add/add): Merge conflict in foo
Auto-merging foo
error: could not apply 07d3a39... foo-master
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Staged 'foo' using previous resolution.
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 7 - cherry-pick --continue rejects --rerere-autoupdate
expecting success:
test_must_fail git cherry-pick --rerere-autoupdate --rerere-autoupdate foo..bar-master &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
git cherry-pick --abort &&
test_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate --rerere-autoupdate foo..bar-master &&
test_cmp foo-expect foo &&
git diff-files --quiet &&
git cherry-pick --abort &&
test_must_fail git cherry-pick --rerere-autoupdate --no-rerere-autoupdate foo..bar-master &&
test_must_fail git diff-files --quiet &&
git cherry-pick --abort
CONFLICT (add/add): Merge conflict in foo
Auto-merging foo
error: could not apply 07d3a39... foo-master
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Staged 'foo' using previous resolution.
CONFLICT (add/add): Merge conflict in foo
Auto-merging foo
error: could not apply 07d3a39... foo-master
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Staged 'foo' using previous resolution.
CONFLICT (add/add): Merge conflict in foo
Auto-merging foo
error: could not apply 07d3a39... foo-master
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Resolved 'foo' using previous resolution.
ok 8 - cherry-pick --rerere-autoupdate more than once
expecting success:
test_config rerere.enabled false &&
test_must_fail git cherry-pick master &&
test_must_fail test_cmp expect foo
CONFLICT (add/add): Merge conflict in bar
Auto-merging bar
error: could not apply 04a71fd... bar-master
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
--- expect 2019-08-14 07:27:58.287536947 +0000
+++ foo 2019-08-14 07:27:58.559540451 +0000
@@ -1 +1 @@
-fatal: cherry-pick: --no-rerere-autoupdate cannot be used with --continue
+foo-dev
ok 9 - cherry-pick conflict without rerere
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3425-rebase-topology-merges.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3425-rebase-topology-merges/.git/
expecting success:
test_commit a &&
test_commit b &&
test_commit c &&
git checkout b &&
test_commit d &&
test_commit e &&
git checkout c &&
test_commit g &&
revert h g &&
git checkout d &&
cherry_pick gp g &&
test_commit i &&
git checkout b &&
test_commit f &&
git checkout d &&
test_commit n &&
test_commit o &&
test_merge w e &&
test_merge v c &&
git checkout o &&
test_commit z
[master (root-commit) ce450c7] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a.t
[master 020ea9b] b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b.t
[master d9ea348] c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c.t
Note: switching to 'b'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 020ea9b b
[detached HEAD 1bd0260] d
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 d.t
[detached HEAD 67a7211] e
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 e.t
Previous HEAD position was 67a7211 e
HEAD is now at d9ea348 c
[detached HEAD 5573dba] g
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 g.t
Removing g.t
[detached HEAD 09e6546] h
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 g.t
Previous HEAD position was 09e6546 h
HEAD is now at 1bd0260 d
[detached HEAD 00eccdb] gp
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 g.t
[detached HEAD 3317c29] i
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 i.t
Previous HEAD position was 3317c29 i
HEAD is now at 020ea9b b
[detached HEAD 09e072f] f
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 f.t
Previous HEAD position was 09e072f f
HEAD is now at 1bd0260 d
[detached HEAD 35a5a4f] n
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 n.t
[detached HEAD a60ff6b] o
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 o.t
Merging:
a60ff6b o
virtual e
found 1 common ancestor:
1bd0260 d
Merge made by the 'recursive' strategy.
e.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 e.t
Merging:
df2bcbf w
virtual c
found 1 common ancestor:
020ea9b b
Merge made by the 'recursive' strategy.
c.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 c.t
Previous HEAD position was 253142b v
HEAD is now at a60ff6b o
[detached HEAD 6fadda8] z
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 z.t
ok 1 - setup of non-linear-history
expecting success:
reset_rebase &&
git rebase e w &&
test_cmp_rev e HEAD~2 &&
test_linear_range 'n o' e..
fatal: No rebase in progress?
HEAD is now at 6fadda8 z
First, rewinding head to replay your work on top of it...
Applying: n
Applying: o
ok 2 - rebase after merge from upstream
expecting success:
reset_rebase &&
git rebase -m e w &&
test_cmp_rev e HEAD~2 &&
test_linear_range 'n o' e..
fatal: No rebase in progress?
HEAD is now at 4cd4d2a o
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 3 - rebase -m after merge from upstream
expecting success:
reset_rebase &&
git rebase -i e w &&
test_cmp_rev e HEAD~2 &&
test_linear_range 'n o' e..
fatal: No rebase in progress?
HEAD is now at 4cd4d2a o
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 4 - rebase -i after merge from upstream
expecting success:
reset_rebase &&
git rebase d w &&
test_cmp_rev d HEAD~3 &&
test_linear_range 'n o e' d..
fatal: No rebase in progress?
HEAD is now at 4cd4d2a o
First, rewinding head to replay your work on top of it...
Applying: n
Applying: o
Applying: e
ok 5 - rebase of non-linear history is linearized in place
expecting success:
reset_rebase &&
git rebase -m d w &&
test_cmp_rev d HEAD~3 &&
test_linear_range 'n o e' d..
fatal: No rebase in progress?
HEAD is now at 9e9424c e
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
ok 6 - rebase -m of non-linear history is linearized in place
expecting success:
reset_rebase &&
git rebase -i d w &&
test_cmp_rev d HEAD~3 &&
test_linear_range 'n o e' d..
fatal: No rebase in progress?
HEAD is now at ef67882 e
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
ok 7 - rebase -i of non-linear history is linearized in place
expecting success:
reset_rebase &&
git rebase c w &&
test_cmp_rev c HEAD~4 &&
test_linear_range 'd n o e' c..
fatal: No rebase in progress?
HEAD is now at ef67882 e
First, rewinding head to replay your work on top of it...
Applying: d
Applying: n
Applying: o
Applying: e
ok 8 - rebase of non-linear history is linearized upstream
expecting success:
reset_rebase &&
git rebase -m c w &&
test_cmp_rev c HEAD~4 &&
test_linear_range 'd n o e' c..
fatal: No rebase in progress?
HEAD is now at 7946025 e
Rebasing (1/4)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated detached HEAD.
ok 9 - rebase -m of non-linear history is linearized upstream
expecting success:
reset_rebase &&
git rebase -i c w &&
test_cmp_rev c HEAD~4 &&
test_linear_range 'd n o e' c..
fatal: No rebase in progress?
HEAD is now at 7946025 e
Rebasing (1/4)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated detached HEAD.
ok 10 - rebase -i of non-linear history is linearized upstream
expecting success:
reset_rebase &&
git rebase c v &&
test_cmp_rev c HEAD~4 &&
test_linear_range 'd n o e' c..
fatal: No rebase in progress?
HEAD is now at 7946025 e
First, rewinding head to replay your work on top of it...
Applying: d
Applying: n
Applying: o
Applying: e
ok 11 - rebase of non-linear history with merges after upstream merge is linearized
expecting success:
reset_rebase &&
git rebase -m c v &&
test_cmp_rev c HEAD~4 &&
test_linear_range 'd n o e' c..
fatal: No rebase in progress?
HEAD is now at 7946025 e
Rebasing (1/4)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated detached HEAD.
ok 12 - rebase -m of non-linear history with merges after upstream merge is linearized
expecting success:
reset_rebase &&
git rebase -i c v &&
test_cmp_rev c HEAD~4 &&
test_linear_range 'd n o e' c..
fatal: No rebase in progress?
HEAD is now at 7946025 e
Rebasing (1/4)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated detached HEAD.
ok 13 - rebase -i of non-linear history with merges after upstream merge is linearized
checking prerequisite: REBASE_P
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test -z "$GIT_TEST_SKIP_REBASE_P"
)
prerequisite REBASE_P ok
expecting success:
reset_rebase &&
git rebase -p d w &&
test_cmp_rev w HEAD
fatal: No rebase in progress?
HEAD is now at 7946025 e
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/4)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated detached HEAD.
ok 14 - rebase -p is no-op in non-linear history
expecting success:
reset_rebase &&
git rebase -p e w &&
test_cmp_rev w HEAD
fatal: No rebase in progress?
HEAD is now at df2bcbf w
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/1)
Successfully rebased and updated detached HEAD.
ok 15 - rebase -p is no-op when base inside second parent
checking known breakage:
reset_rebase &&
git rebase -p --root w &&
test_cmp_rev w HEAD
fatal: No rebase in progress?
HEAD is now at df2bcbf w
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/7)
Rebasing (2/7)
Rebasing (3/7)
Rebasing (4/7)
Rebasing (5/7)
Rebasing (6/7)
Rebasing (7/7)
Successfully rebased and updated detached HEAD.
error: two revisions point to different objects:
'w': df2bcbf6cf61eb2cff7270cb2481591f50190257
'HEAD': 9c7d2562716d5ad262798a2dc378a6f977240a94
not ok 16 - rebase -p --root on non-linear history is a no-op # TODO known breakage
expecting success:
reset_rebase &&
git rebase -p z w &&
test_cmp_rev z HEAD^ &&
test_cmp_rev w^2 HEAD^2
fatal: No rebase in progress?
HEAD is now at 9c7d256 w
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/1)
Successfully rebased and updated detached HEAD.
ok 17 - rebase -p re-creates merge from side branch
expecting success:
reset_rebase &&
git rebase -p c w &&
test_cmp_rev c HEAD~4 &&
test_cmp_rev HEAD^2^ HEAD~3 &&
test_revision_subjects 'd n e o w' HEAD~3 HEAD~2 HEAD^2 HEAD^ HEAD
fatal: No rebase in progress?
HEAD is now at 3547a5b w
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/5)
Rebasing (2/5)
Rebasing (3/5)
Rebasing (4/5)
Rebasing (5/5)
Successfully rebased and updated detached HEAD.
ok 18 - rebase -p re-creates internal merge
expecting success:
reset_rebase &&
git rebase -p --onto c d w &&
test_cmp_rev c HEAD~3 &&
test_cmp_rev c HEAD^2^ &&
test_revision_subjects 'n e o w' HEAD~2 HEAD^2 HEAD^ HEAD
fatal: No rebase in progress?
HEAD is now at a09c328 w
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/4)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated detached HEAD.
ok 19 - rebase -p can re-create two branches on onto
expecting success:
git checkout e &&
test_merge u i
Warning: you are leaving 4 commits behind, not connected to
any of your branches:
a53b63e w
8d709cf o
d0455e3 e
712812d n
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> a53b63e
HEAD is now at 67a7211 e
Merging:
67a7211 e
virtual i
found 1 common ancestor:
1bd0260 d
Merge made by the 'recursive' strategy.
g.t | 1 +
i.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 g.t
create mode 100644 i.t
ok 20 - setup of non-linear-history for patch-equivalence tests
expecting success:
reset_rebase &&
git rebase -p h u &&
test_cmp_rev h HEAD~3 &&
test_cmp_rev HEAD^2^ HEAD~2 &&
test_revision_subjects 'd i e u' HEAD~2 HEAD^2 HEAD^ HEAD
fatal: No rebase in progress?
HEAD is now at 9a9bb96 u
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/4)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated detached HEAD.
ok 21 - rebase -p re-creates history around dropped commit matching upstream
expecting success:
reset_rebase &&
git rebase -p --onto f h u &&
test_cmp_rev f HEAD~3 &&
test_cmp_rev HEAD^2^ HEAD~2 &&
test_revision_subjects 'd i e u' HEAD~2 HEAD^2 HEAD^ HEAD
fatal: No rebase in progress?
HEAD is now at e5af6fe u
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/4)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated detached HEAD.
ok 22 - rebase -p --onto in merged history drops patches in upstream
expecting success:
reset_rebase &&
git rebase -p --onto h f u &&
test_cmp_rev h HEAD~3 &&
test_cmp_rev HEAD^2~2 HEAD~2 &&
test_revision_subjects 'd gp i e u' HEAD~2 HEAD^2^ HEAD^2 HEAD^ HEAD
fatal: No rebase in progress?
HEAD is now at 97f19d6 u
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/5)
Rebasing (2/5)
Rebasing (3/5)
Rebasing (4/5)
Rebasing (5/5)
Successfully rebased and updated detached HEAD.
ok 23 - rebase -p --onto in merged history does not drop patches in onto
expecting success:
git checkout gp &&
test_merge s e &&
git checkout e &&
test_merge t gp
Warning: you are leaving 5 commits behind, not connected to
any of your branches:
c80436f u
86b2452 e
7637afd i
45d528f d
bfc420a gp
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> c80436f
HEAD is now at 00eccdb gp
Merging:
00eccdb gp
virtual e
found 1 common ancestor:
1bd0260 d
Merge made by the 'recursive' strategy.
e.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 e.t
Previous HEAD position was cd98db9 s
HEAD is now at 67a7211 e
Merging:
67a7211 e
virtual gp
found 1 common ancestor:
1bd0260 d
Merge made by the 'recursive' strategy.
g.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 g.t
ok 24 - setup of non-linear-history for dropping whole side
checking known breakage:
reset_rebase &&
git rebase -p h s &&
test_cmp_rev h HEAD~2 &&
test_linear_range 'd e' h..
fatal: No rebase in progress?
HEAD is now at cc19be7 t
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
not ok 25 - rebase -p drops merge commit when entire first-parent side is dropped # TODO known breakage
expecting success:
reset_rebase &&
git rebase -p h t &&
test_cmp_rev h HEAD~2 &&
test_linear_range 'd e' h..
fatal: No rebase in progress?
HEAD is now at df14409 s
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
ok 26 - rebase -p drops merge commit when entire second-parent side is dropped
expecting success:
git checkout n &&
git merge --no-commit e &&
git reset n . &&
git commit -m r &&
git reset --hard &&
git clean -f &&
git tag r
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
03b6df6 e
c8a9e3b d
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> 03b6df6
HEAD is now at 35a5a4f n
Merging:
35a5a4f n
virtual e
found 1 common ancestor:
1bd0260 d
Automatic merge went well; stopped before committing as requested
[detached HEAD b5d7f15] r
Author: A U Thor <author@example.com>
HEAD is now at b5d7f15 r
Removing e.t
ok 27 - setup of non-linear-history for empty commits
expecting success:
reset_rebase &&
git rebase -p c r &&
test_cmp_rev c HEAD~3 &&
test_cmp_rev HEAD^2^ HEAD~2 &&
test_revision_subjects 'd e n r' HEAD~2 HEAD^2 HEAD^ HEAD
fatal: No rebase in progress?
HEAD is now at b5d7f15 r
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/4)
Rebasing (2/4)
Rebasing (3/4)
Rebasing (4/4)
Successfully rebased and updated detached HEAD.
ok 28 - rebase -p re-creates empty internal merge commit
expecting success:
reset_rebase &&
git rebase -p o r &&
test_cmp_rev e HEAD^2 &&
test_cmp_rev o HEAD^ &&
test_revision_subjects 'r' HEAD
fatal: No rebase in progress?
HEAD is now at 40b3097 r
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/1)
Successfully rebased and updated detached HEAD.
ok 29 - rebase -p re-creates empty merge commit
# still have 2 known breakage(s)
# passed all remaining 27 test(s)
1..29
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3421-rebase-topology-linear.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3421-rebase-topology-linear/.git/
expecting success:
test_commit a &&
test_commit b &&
test_commit c &&
git checkout b &&
test_commit d &&
test_commit e
[master (root-commit) ce450c7] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a.t
[master 020ea9b] b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b.t
[master d9ea348] c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c.t
Note: switching to 'b'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 020ea9b b
[detached HEAD 1bd0260] d
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 d.t
[detached HEAD 67a7211] e
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 e.t
ok 1 - setup
expecting success:
reset_rebase &&
git rebase c e &&
test_cmp_rev c HEAD~2 &&
test_linear_range 'd e' c..
fatal: No rebase in progress?
HEAD is now at 67a7211 e
First, rewinding head to replay your work on top of it...
Applying: d
Applying: e
ok 2 - simple rebase
expecting success:
reset_rebase &&
git rebase -m c e &&
test_cmp_rev c HEAD~2 &&
test_linear_range 'd e' c..
fatal: No rebase in progress?
HEAD is now at 7d728d6 e
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 3 - simple rebase -m
expecting success:
reset_rebase &&
git rebase -i c e &&
test_cmp_rev c HEAD~2 &&
test_linear_range 'd e' c..
fatal: No rebase in progress?
HEAD is now at 7d728d6 e
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 4 - simple rebase -i
checking prerequisite: REBASE_P
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test -z "$GIT_TEST_SKIP_REBASE_P"
)
prerequisite REBASE_P ok
expecting success:
reset_rebase &&
git rebase -p c e &&
test_cmp_rev c HEAD~2 &&
test_linear_range 'd e' c..
fatal: No rebase in progress?
HEAD is now at 7d728d6 e
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 5 - simple rebase -p
expecting success:
reset_rebase &&
git rebase b e &&
test_cmp_rev e HEAD
fatal: No rebase in progress?
HEAD is now at 7d728d6 e
Current branch e is up to date.
ok 6 - rebase is no-op if upstream is an ancestor
expecting success:
reset_rebase &&
git rebase -m b e &&
test_cmp_rev e HEAD
fatal: No rebase in progress?
HEAD is now at 67a7211 e
Successfully rebased and updated detached HEAD.
ok 7 - rebase -m is no-op if upstream is an ancestor
expecting success:
reset_rebase &&
git rebase -i b e &&
test_cmp_rev e HEAD
fatal: No rebase in progress?
HEAD is now at 67a7211 e
Successfully rebased and updated detached HEAD.
ok 8 - rebase -i is no-op if upstream is an ancestor
expecting success:
reset_rebase &&
git rebase -p b e &&
test_cmp_rev e HEAD
fatal: No rebase in progress?
HEAD is now at 67a7211 e
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 9 - rebase -p is no-op if upstream is an ancestor
expecting success:
reset_rebase &&
git rebase -f b e &&
! test_cmp_rev e HEAD &&
test_cmp_rev b HEAD~2 &&
test_linear_range 'd e' b..
fatal: No rebase in progress?
HEAD is now at 67a7211 e
Current branch e is up to date, rebase forced.
First, rewinding head to replay your work on top of it...
Applying: d
Applying: e
error: two revisions point to different objects:
'e': 67a72118d5806fada2b50e3a56bde3a2b3e5bc77
'HEAD': 354afb0674237d49586fff12326488e8e1d7737f
ok 10 - rebase -f rewrites even if upstream is an ancestor
expecting success:
reset_rebase &&
git rebase -m -f b e &&
! test_cmp_rev e HEAD &&
test_cmp_rev b HEAD~2 &&
test_linear_range 'd e' b..
fatal: No rebase in progress?
HEAD is now at 354afb0 e
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
error: two revisions point to different objects:
'e': 67a72118d5806fada2b50e3a56bde3a2b3e5bc77
'HEAD': 354afb0674237d49586fff12326488e8e1d7737f
ok 11 - rebase -m -f rewrites even if upstream is an ancestor
expecting success:
reset_rebase &&
git rebase -i -f b e &&
! test_cmp_rev e HEAD &&
test_cmp_rev b HEAD~2 &&
test_linear_range 'd e' b..
fatal: No rebase in progress?
HEAD is now at 354afb0 e
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
error: two revisions point to different objects:
'e': 67a72118d5806fada2b50e3a56bde3a2b3e5bc77
'HEAD': 354afb0674237d49586fff12326488e8e1d7737f
ok 12 - rebase -i -f rewrites even if upstream is an ancestor
checking known breakage:
reset_rebase &&
git rebase -p -f b e &&
! test_cmp_rev e HEAD &&
test_cmp_rev b HEAD~2 &&
test_linear_range 'd e' b..
fatal: No rebase in progress?
HEAD is now at 354afb0 e
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
not ok 13 - rebase -p -f rewrites even if upstream is an ancestor # TODO known breakage
expecting success:
reset_rebase &&
git rebase e b &&
test_cmp_rev e HEAD
fatal: No rebase in progress?
HEAD is now at 67a7211 e
First, rewinding head to replay your work on top of it...
Fast-forwarded b to e.
ok 14 - rebase fast-forwards from ancestor of upstream
expecting success:
reset_rebase &&
git rebase -m e b &&
test_cmp_rev e HEAD
fatal: No rebase in progress?
HEAD is now at 67a7211 e
Successfully rebased and updated detached HEAD.
ok 15 - rebase -m fast-forwards from ancestor of upstream
expecting success:
reset_rebase &&
git rebase -i e b &&
test_cmp_rev e HEAD
fatal: No rebase in progress?
HEAD is now at 67a7211 e
Successfully rebased and updated detached HEAD.
ok 16 - rebase -i fast-forwards from ancestor of upstream
expecting success:
reset_rebase &&
git rebase -p e b &&
test_cmp_rev e HEAD
fatal: No rebase in progress?
HEAD is now at 67a7211 e
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/1)
Successfully rebased and updated detached HEAD.
ok 17 - rebase -p fast-forwards from ancestor of upstream
expecting success:
git checkout c &&
test_commit g &&
revert h g &&
git checkout d &&
cherry_pick gp g &&
test_commit i &&
git checkout b &&
test_commit f
Previous HEAD position was 67a7211 e
HEAD is now at d9ea348 c
[detached HEAD 5573dba] g
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 g.t
Removing g.t
[detached HEAD 09e6546] h
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 g.t
Previous HEAD position was 09e6546 h
HEAD is now at 1bd0260 d
[detached HEAD 00eccdb] gp
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 g.t
[detached HEAD 3317c29] i
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 i.t
Previous HEAD position was 3317c29 i
HEAD is now at 020ea9b b
[detached HEAD 09e072f] f
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 f.t
ok 18 - setup of linear history for range selection tests
expecting success:
reset_rebase &&
git rebase h i &&
test_cmp_rev h HEAD~2 &&
test_linear_range 'd i' h..
fatal: No rebase in progress?
HEAD is now at 09e072f f
First, rewinding head to replay your work on top of it...
Applying: d
Applying: i
ok 19 - rebase drops patches in upstream
expecting success:
reset_rebase &&
git rebase -m h i &&
test_cmp_rev h HEAD~2 &&
test_linear_range 'd i' h..
fatal: No rebase in progress?
HEAD is now at 5c158e9 i
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 20 - rebase -m drops patches in upstream
expecting success:
reset_rebase &&
git rebase -i h i &&
test_cmp_rev h HEAD~2 &&
test_linear_range 'd i' h..
fatal: No rebase in progress?
HEAD is now at 5c158e9 i
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 21 - rebase -i drops patches in upstream
expecting success:
reset_rebase &&
git rebase -p h i &&
test_cmp_rev h HEAD~2 &&
test_linear_range 'd i' h..
fatal: No rebase in progress?
HEAD is now at 5c158e9 i
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 22 - rebase -p drops patches in upstream
expecting success:
reset_rebase &&
git rebase h gp &&
test_cmp_rev h HEAD^ &&
test_linear_range 'd' h..
fatal: No rebase in progress?
HEAD is now at 5c158e9 i
First, rewinding head to replay your work on top of it...
Applying: d
ok 23 - rebase can drop last patch if in upstream
expecting success:
reset_rebase &&
git rebase -m h gp &&
test_cmp_rev h HEAD^ &&
test_linear_range 'd' h..
fatal: No rebase in progress?
HEAD is now at e937a8e d
Rebasing (1/1)
Successfully rebased and updated detached HEAD.
ok 24 - rebase -m can drop last patch if in upstream
expecting success:
reset_rebase &&
git rebase -i h gp &&
test_cmp_rev h HEAD^ &&
test_linear_range 'd' h..
fatal: No rebase in progress?
HEAD is now at e937a8e d
Rebasing (1/1)
Successfully rebased and updated detached HEAD.
ok 25 - rebase -i can drop last patch if in upstream
expecting success:
reset_rebase &&
git rebase -p h gp &&
test_cmp_rev h HEAD^ &&
test_linear_range 'd' h..
fatal: No rebase in progress?
HEAD is now at e937a8e d
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/1)
Successfully rebased and updated detached HEAD.
ok 26 - rebase -p can drop last patch if in upstream
expecting success:
reset_rebase &&
git rebase --onto f h i &&
test_cmp_rev f HEAD~2 &&
test_linear_range 'd i' f..
fatal: No rebase in progress?
HEAD is now at e937a8e d
First, rewinding head to replay your work on top of it...
Applying: d
Applying: i
ok 27 - rebase --onto drops patches in upstream
expecting success:
reset_rebase &&
git rebase -m --onto f h i &&
test_cmp_rev f HEAD~2 &&
test_linear_range 'd i' f..
fatal: No rebase in progress?
HEAD is now at bcc98eb i
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 28 - rebase -m --onto drops patches in upstream
expecting success:
reset_rebase &&
git rebase -i --onto f h i &&
test_cmp_rev f HEAD~2 &&
test_linear_range 'd i' f..
fatal: No rebase in progress?
HEAD is now at bcc98eb i
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 29 - rebase -i --onto drops patches in upstream
expecting success:
reset_rebase &&
git rebase -p --onto f h i &&
test_cmp_rev f HEAD~2 &&
test_linear_range 'd i' f..
fatal: No rebase in progress?
HEAD is now at bcc98eb i
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 30 - rebase -p --onto drops patches in upstream
expecting success:
reset_rebase &&
git rebase --onto h f i &&
test_cmp_rev h HEAD~3 &&
test_linear_range 'd gp i' h..
fatal: No rebase in progress?
HEAD is now at bcc98eb i
First, rewinding head to replay your work on top of it...
Applying: d
Applying: gp
Applying: i
ok 31 - rebase --onto does not drop patches in onto
expecting success:
reset_rebase &&
git rebase -m --onto h f i &&
test_cmp_rev h HEAD~3 &&
test_linear_range 'd gp i' h..
fatal: No rebase in progress?
HEAD is now at bbe8f41 i
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
ok 32 - rebase -m --onto does not drop patches in onto
expecting success:
reset_rebase &&
git rebase -i --onto h f i &&
test_cmp_rev h HEAD~3 &&
test_linear_range 'd gp i' h..
fatal: No rebase in progress?
HEAD is now at bbe8f41 i
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
ok 33 - rebase -i --onto does not drop patches in onto
expecting success:
reset_rebase &&
git rebase -p --onto h f i &&
test_cmp_rev h HEAD~3 &&
test_linear_range 'd gp i' h..
fatal: No rebase in progress?
HEAD is now at bbe8f41 i
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
ok 34 - rebase -p --onto does not drop patches in onto
expecting success:
git checkout c &&
make_empty j &&
git checkout d &&
make_empty k &&
test_commit l
Warning: you are leaving 3 commits behind, not connected to
any of your branches:
bbe8f41 i
4a12efe gp
e937a8e d
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> bbe8f41
HEAD is now at d9ea348 c
[detached HEAD 5b67321] j
Author: A U Thor <author@example.com>
Previous HEAD position was 5b67321 j
HEAD is now at 1bd0260 d
[detached HEAD 753370d] k
Author: A U Thor <author@example.com>
[detached HEAD 49cf309] l
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 l.t
ok 35 - setup of linear history for empty commit tests
expecting success:
reset_rebase &&
git rebase c l &&
test_cmp_rev c HEAD~2 &&
test_linear_range 'd l' c..
fatal: No rebase in progress?
HEAD is now at 49cf309 l
First, rewinding head to replay your work on top of it...
Applying: d
Applying: l
ok 36 - rebase drops empty commit
expecting success:
reset_rebase &&
git rebase -m c l &&
test_cmp_rev c HEAD~2 &&
test_linear_range 'd l' c..
fatal: No rebase in progress?
HEAD is now at ef60b8d l
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 37 - rebase -m drops empty commit
expecting success:
reset_rebase &&
git rebase -i c l &&
test_cmp_rev c HEAD~2 &&
test_linear_range 'd l' c..
fatal: No rebase in progress?
HEAD is now at ef60b8d l
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 38 - rebase -i drops empty commit
expecting success:
reset_rebase &&
git rebase -p c l &&
test_cmp_rev c HEAD~2 &&
test_linear_range 'd l' c..
fatal: No rebase in progress?
HEAD is now at ef60b8d l
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 39 - rebase -p drops empty commit
expecting success:
reset_rebase &&
git rebase --keep-empty c l &&
test_cmp_rev c HEAD~3 &&
test_linear_range 'd k l' c..
fatal: No rebase in progress?
HEAD is now at ef60b8d l
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
ok 40 - rebase --keep-empty
expecting success:
reset_rebase &&
git rebase -m --keep-empty c l &&
test_cmp_rev c HEAD~3 &&
test_linear_range 'd k l' c..
fatal: No rebase in progress?
HEAD is now at f90e7ce l
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
ok 41 - rebase -m --keep-empty
expecting success:
reset_rebase &&
git rebase -i --keep-empty c l &&
test_cmp_rev c HEAD~3 &&
test_linear_range 'd k l' c..
fatal: No rebase in progress?
HEAD is now at f90e7ce l
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
ok 42 - rebase -i --keep-empty
checking known breakage:
reset_rebase &&
git rebase -p --keep-empty c l &&
test_cmp_rev c HEAD~3 &&
test_linear_range 'd k l' c..
fatal: No rebase in progress?
HEAD is now at f90e7ce l
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/3)
Rebasing (2/3)
Already up to date!
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:
git commit --allow-empty
Otherwise, please use 'git cherry-pick --skip'
interactive rebase in progress; onto d9ea348
Last commands done (2 commands done):
pick 1bd0260 d
pick 753370d k
Next command to do (1 remaining command):
pick 49cf309 l
You are currently rebasing.
nothing to commit, working tree clean
Could not pick 753370ddaccf1cee7fe7a98997789c7c2de20f79
not ok 43 - rebase -p --keep-empty # TODO known breakage
expecting success:
reset_rebase &&
git rebase --keep-empty j l &&
test_cmp_rev j HEAD~3 &&
test_linear_range 'd k l' j..
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
HEAD is now at 49cf309 l
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
ok 44 - rebase --keep-empty keeps empty even if already in upstream
expecting success:
reset_rebase &&
git rebase -m --keep-empty j l &&
test_cmp_rev j HEAD~3 &&
test_linear_range 'd k l' j..
fatal: No rebase in progress?
HEAD is now at 5395ede l
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
ok 45 - rebase -m --keep-empty keeps empty even if already in upstream
expecting success:
reset_rebase &&
git rebase -i --keep-empty j l &&
test_cmp_rev j HEAD~3 &&
test_linear_range 'd k l' j..
fatal: No rebase in progress?
HEAD is now at 5395ede l
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
ok 46 - rebase -i --keep-empty keeps empty even if already in upstream
checking known breakage:
reset_rebase &&
git rebase -p --keep-empty j l &&
test_cmp_rev j HEAD~3 &&
test_linear_range 'd k l' j..
fatal: No rebase in progress?
HEAD is now at 5395ede l
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
error: two revisions point to different objects:
'j': 5b67321bb4e1ef5cbccc64d00cd3c3f7768ff359
'HEAD~3': d9ea348e0fe8827f205c231ed0a5b8258841fd37
not ok 47 - rebase -p --keep-empty keeps empty even if already in upstream # TODO known breakage
expecting success:
reset_rebase &&
git rebase --rebase-merges --keep-empty j l &&
test_cmp_rev j HEAD~3 &&
test_linear_range 'd k l' j..
fatal: No rebase in progress?
HEAD is now at 1612308 l
Rebasing (1/5)
Rebasing (2/5)
Rebasing (3/5)
Rebasing (4/5)
Rebasing (5/5)
Successfully rebased and updated detached HEAD.
ok 48 - rebase --rebase-merges --keep-empty keeps empty even if already in upstream
expecting success:
git checkout b &&
revert m b &&
git checkout --orphan disjoint &&
git rm -rf . &&
test_commit x &&
test_commit y &&
cherry_pick bp b
Warning: you are leaving 3 commits behind, not connected to
any of your branches:
5395ede l
9a731c2 k
60768b3 d
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> 5395ede
HEAD is now at 020ea9b b
Removing b.t
[detached HEAD 6db5543] m
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 b.t
Switched to a new branch 'disjoint'
rm 'a.t'
[disjoint (root-commit) 059091f] x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 x.t
[disjoint be1e399] y
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 y.t
[disjoint b7cb922] bp
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b.t
ok 49 - setup of linear history for test involving root
expecting success:
reset_rebase &&
git rebase --onto c --root y &&
test_cmp_rev c HEAD~2 &&
test_linear_range 'x y' c..
fatal: No rebase in progress?
HEAD is now at b7cb922 bp
First, rewinding head to replay your work on top of it...
Applying: x
Applying: y
ok 50 - rebase --onto --root
expecting success:
reset_rebase &&
git rebase -m --onto c --root y &&
test_cmp_rev c HEAD~2 &&
test_linear_range 'x y' c..
fatal: No rebase in progress?
HEAD is now at 7e2f0ad y
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 51 - rebase -m --onto --root
expecting success:
reset_rebase &&
git rebase -i --onto c --root y &&
test_cmp_rev c HEAD~2 &&
test_linear_range 'x y' c..
fatal: No rebase in progress?
HEAD is now at 7e2f0ad y
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 52 - rebase -i --onto --root
expecting success:
reset_rebase &&
git rebase -p --onto c --root y &&
test_cmp_rev c HEAD~2 &&
test_linear_range 'x y' c..
fatal: No rebase in progress?
HEAD is now at 7e2f0ad y
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 53 - rebase -p --onto --root
expecting success:
reset_rebase &&
git rebase c y &&
test_cmp_rev c HEAD~2 &&
test_linear_range 'x y' c..
fatal: No rebase in progress?
HEAD is now at 7e2f0ad y
First, rewinding head to replay your work on top of it...
Applying: x
Applying: y
ok 54 - rebase without --onto --root with disjoint history
expecting success:
reset_rebase &&
git rebase -m c y &&
test_cmp_rev c HEAD~2 &&
test_linear_range 'x y' c..
fatal: No rebase in progress?
HEAD is now at 7e2f0ad y
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 55 - rebase -m without --onto --root with disjoint history
expecting success:
reset_rebase &&
git rebase -i c y &&
test_cmp_rev c HEAD~2 &&
test_linear_range 'x y' c..
fatal: No rebase in progress?
HEAD is now at 7e2f0ad y
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 56 - rebase -i without --onto --root with disjoint history
checking known breakage:
reset_rebase &&
git rebase -p c y &&
test_cmp_rev c HEAD~2 &&
test_linear_range 'x y' c..
fatal: No rebase in progress?
HEAD is now at 7e2f0ad y
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/1)
Successfully rebased and updated detached HEAD.
error: two revisions point to different objects:
'c': d9ea348e0fe8827f205c231ed0a5b8258841fd37
'HEAD~2': ce450c7fd6766cb1f2df873857da7b928ff743a8
not ok 57 - rebase -p without --onto --root with disjoint history # TODO known breakage
expecting success:
reset_rebase &&
git rebase --onto m --root bp &&
test_cmp_rev m HEAD~2 &&
test_linear_range 'x y' m..
fatal: No rebase in progress?
HEAD is now at d9ea348 c
First, rewinding head to replay your work on top of it...
Applying: x
Applying: y
ok 58 - rebase --onto --root drops patch in onto
expecting success:
reset_rebase &&
git rebase -m --onto m --root bp &&
test_cmp_rev m HEAD~2 &&
test_linear_range 'x y' m..
fatal: No rebase in progress?
HEAD is now at 1daea3a y
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 59 - rebase -m --onto --root drops patch in onto
expecting success:
reset_rebase &&
git rebase -i --onto m --root bp &&
test_cmp_rev m HEAD~2 &&
test_linear_range 'x y' m..
fatal: No rebase in progress?
HEAD is now at 1daea3a y
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 60 - rebase -i --onto --root drops patch in onto
expecting success:
reset_rebase &&
git rebase -p --onto m --root bp &&
test_cmp_rev m HEAD~2 &&
test_linear_range 'x y' m..
fatal: No rebase in progress?
HEAD is now at 1daea3a y
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 61 - rebase -p --onto --root drops patch in onto
expecting success:
reset_rebase &&
git rebase --onto m --root g &&
test_cmp_rev m HEAD~2 &&
test_linear_range 'c g' m..
fatal: No rebase in progress?
HEAD is now at 1daea3a y
First, rewinding head to replay your work on top of it...
Applying: c
Applying: g
ok 62 - rebase --onto --root with merge-base does not go to root
expecting success:
reset_rebase &&
git rebase -m --onto m --root g &&
test_cmp_rev m HEAD~2 &&
test_linear_range 'c g' m..
fatal: No rebase in progress?
HEAD is now at 9921398 g
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 63 - rebase -m --onto --root with merge-base does not go to root
expecting success:
reset_rebase &&
git rebase -i --onto m --root g &&
test_cmp_rev m HEAD~2 &&
test_linear_range 'c g' m..
fatal: No rebase in progress?
HEAD is now at 9921398 g
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 64 - rebase -i --onto --root with merge-base does not go to root
checking known breakage:
reset_rebase &&
git rebase -p --onto m --root g &&
test_cmp_rev m HEAD~2 &&
test_linear_range 'c g' m..
fatal: No rebase in progress?
HEAD is now at 9921398 g
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
error: two revisions point to different objects:
'm': 6db5543d43a2166fae6f6d320a0b715c6c1c4278
'HEAD~2': 020ea9b5b2051d958f4737afacdc8821a33ac9a9
not ok 65 - rebase -p --onto --root with merge-base does not go to root # TODO known breakage
expecting success:
reset_rebase &&
git rebase m bp &&
test_cmp_rev m HEAD~2 &&
test_linear_range 'x y' m..
fatal: No rebase in progress?
HEAD is now at 5573dba g
First, rewinding head to replay your work on top of it...
Applying: x
Applying: y
ok 66 - rebase without --onto --root with disjoint history drops patch in onto
expecting success:
reset_rebase &&
git rebase -m m bp &&
test_cmp_rev m HEAD~2 &&
test_linear_range 'x y' m..
fatal: No rebase in progress?
HEAD is now at 1daea3a y
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 67 - rebase -m without --onto --root with disjoint history drops patch in onto
expecting success:
reset_rebase &&
git rebase -i m bp &&
test_cmp_rev m HEAD~2 &&
test_linear_range 'x y' m..
fatal: No rebase in progress?
HEAD is now at 1daea3a y
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated detached HEAD.
ok 68 - rebase -i without --onto --root with disjoint history drops patch in onto
checking known breakage:
reset_rebase &&
git rebase -p m bp &&
test_cmp_rev m HEAD~2 &&
test_linear_range 'x y' m..
fatal: No rebase in progress?
HEAD is now at 1daea3a y
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/1)
Successfully rebased and updated detached HEAD.
error: two revisions point to different objects:
'm': 6db5543d43a2166fae6f6d320a0b715c6c1c4278
'HEAD~2': ce450c7fd6766cb1f2df873857da7b928ff743a8
not ok 69 - rebase -p without --onto --root with disjoint history drops patch in onto # TODO known breakage
expecting success:
reset_rebase &&
git rebase --root c &&
test_cmp_rev c HEAD
fatal: No rebase in progress?
HEAD is now at 6db5543 m
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
ok 70 - rebase --root on linear history is a no-op
expecting success:
reset_rebase &&
git rebase -m --root c &&
test_cmp_rev c HEAD
fatal: No rebase in progress?
HEAD is now at d9ea348 c
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
ok 71 - rebase -m --root on linear history is a no-op
expecting success:
reset_rebase &&
git rebase -i --root c &&
test_cmp_rev c HEAD
fatal: No rebase in progress?
HEAD is now at d9ea348 c
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
ok 72 - rebase -i --root on linear history is a no-op
checking known breakage:
reset_rebase &&
git rebase -p --root c &&
test_cmp_rev c HEAD
fatal: No rebase in progress?
HEAD is now at d9ea348 c
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
error: two revisions point to different objects:
'c': d9ea348e0fe8827f205c231ed0a5b8258841fd37
'HEAD': 8b0b08f11e6fffcd7a364144d5399bf69ae313f5
not ok 73 - rebase -p --root on linear history is a no-op # TODO known breakage
expecting success:
reset_rebase &&
git rebase -f --root c &&
! test_cmp_rev a HEAD~2 &&
test_linear_range 'a b c' HEAD
fatal: No rebase in progress?
HEAD is now at 8b0b08f c
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
error: two revisions point to different objects:
'a': ce450c7fd6766cb1f2df873857da7b928ff743a8
'HEAD~2': 060c4193c2500f886c89b8fa8d63916f8aa4d912
ok 74 - rebase -f --root on linear history causes re-write
expecting success:
reset_rebase &&
git rebase -m -f --root c &&
! test_cmp_rev a HEAD~2 &&
test_linear_range 'a b c' HEAD
fatal: No rebase in progress?
HEAD is now at 8b0b08f c
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
error: two revisions point to different objects:
'a': ce450c7fd6766cb1f2df873857da7b928ff743a8
'HEAD~2': 060c4193c2500f886c89b8fa8d63916f8aa4d912
ok 75 - rebase -m -f --root on linear history causes re-write
expecting success:
reset_rebase &&
git rebase -i -f --root c &&
! test_cmp_rev a HEAD~2 &&
test_linear_range 'a b c' HEAD
fatal: No rebase in progress?
HEAD is now at 8b0b08f c
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
error: two revisions point to different objects:
'a': ce450c7fd6766cb1f2df873857da7b928ff743a8
'HEAD~2': 060c4193c2500f886c89b8fa8d63916f8aa4d912
ok 76 - rebase -i -f --root on linear history causes re-write
expecting success:
reset_rebase &&
git rebase -p -f --root c &&
! test_cmp_rev a HEAD~2 &&
test_linear_range 'a b c' HEAD
fatal: No rebase in progress?
HEAD is now at 8b0b08f c
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/3)
Rebasing (2/3)
Rebasing (3/3)
Successfully rebased and updated detached HEAD.
error: two revisions point to different objects:
'a': ce450c7fd6766cb1f2df873857da7b928ff743a8
'HEAD~2': 060c4193c2500f886c89b8fa8d63916f8aa4d912
ok 77 - rebase -p -f --root on linear history causes re-write
# still have 7 known breakage(s)
# passed all remaining 70 test(s)
1..77
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3505-cherry-pick-empty.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3505-cherry-pick-empty/.git/
expecting success:
echo first > file1 &&
git add file1 &&
test_tick &&
git commit -m "first" &&
git checkout -b empty-message-branch &&
echo third >> file1 &&
git add file1 &&
test_tick &&
git commit --allow-empty-message -m "" &&
git checkout master &&
git checkout -b empty-change-branch &&
test_tick &&
git commit --allow-empty -m "empty"
[master (root-commit) 0c72e4f] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1
Switched to a new branch 'empty-message-branch'
[empty-message-branch d6aa1e8]
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'master'
Switched to a new branch 'empty-change-branch'
[empty-change-branch 0f51a27] empty
Author: A U Thor <author@example.com>
ok 1 - setup
expecting success:
git checkout master &&
test_expect_code 1 git cherry-pick empty-change-branch
Switched to branch 'master'
Already up to date!
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:
git commit --allow-empty
Otherwise, please use 'git cherry-pick --skip'
On branch master
You are currently cherry-picking commit 0f51a27.
nothing to commit, working tree clean
ok 2 - cherry-pick an empty commit
expecting success:
test ! -f .git/index.lock
ok 3 - index lockfile was removed
expecting success:
test_when_finished "git reset --hard empty-message-branch~1" &&
git checkout master &&
git cherry-pick empty-message-branch
Already on 'master'
warning: cancelling a cherry picking in progress
[master d800ed2]
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+)
HEAD is now at 0c72e4f first
ok 4 - cherry-pick a commit with an empty message
expecting success:
test ! -f .git/index.lock
ok 5 - index lockfile was removed
expecting success:
git checkout -f master &&
git cherry-pick --allow-empty-message empty-message-branch
Already on 'master'
[master d800ed2]
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+)
ok 6 - cherry-pick a commit with an empty message with --allow-empty-message
expecting success:
git checkout master &&
echo fourth >>file2 &&
git add file2 &&
git commit -m "fourth" &&
test_must_fail git cherry-pick empty-change-branch
Already on 'master'
[master 36c19c0] fourth
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
Already up to date!
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:
git commit --allow-empty
Otherwise, please use 'git cherry-pick --skip'
On branch master
You are currently cherry-picking commit 0f51a27.
nothing to commit, working tree clean
ok 7 - cherry pick an empty non-ff commit without --allow-empty
expecting success:
git checkout master &&
git cherry-pick --allow-empty empty-change-branch
Already on 'master'
warning: cancelling a cherry picking in progress
Already up to date!
[master 72a973f] empty
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
ok 8 - cherry pick an empty non-ff commit with --allow-empty
expecting success:
git checkout master &&
git cherry-pick --keep-redundant-commits HEAD^
Already on 'master'
[master 938d13f] fourth
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
ok 9 - cherry pick with --keep-redundant-commits
expecting success:
git checkout master &&
git branch fork &&
echo foo >file2 &&
git add file2 &&
test_tick &&
git commit -m "add file2 on master" &&
git checkout fork &&
echo foo >file2 &&
git add file2 &&
test_tick &&
git commit -m "add file2 on the side"
Already on 'master'
[master 756e982] add file2 on master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'fork'
[fork 521fc70] add file2 on the side
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 10 - cherry-pick a commit that becomes no-op (prep)
expecting success:
git reset --hard &&
git checkout fork^0 &&
test_must_fail git cherry-pick master
HEAD is now at 521fc70 add file2 on the side
Note: switching to 'fork^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 521fc70 add file2 on the side
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:
git commit --allow-empty
Otherwise, please use 'git cherry-pick --skip'
HEAD detached at 521fc70
You are currently cherry-picking commit 756e982.
nothing to commit, working tree clean
ok 11 - cherry-pick a no-op without --keep-redundant
expecting success:
git reset --hard &&
git checkout fork^0 &&
git cherry-pick --keep-redundant-commits master &&
git show -s --format=%s >actual &&
echo "add file2 on master" >expect &&
test_cmp expect actual
HEAD is now at 521fc70 add file2 on the side
HEAD is now at 521fc70 add file2 on the side
[detached HEAD 2ac6e2a] add file2 on master
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
ok 12 - cherry-pick a no-op with --keep-redundant
# passed all 12 test(s)
1..12
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3506-cherry-pick-ff.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3506-cherry-pick-ff/.git/
expecting success:
echo first > file1 &&
git add file1 &&
test_tick &&
git commit -m "first" &&
git tag first &&
git checkout -b other &&
echo second >> file1 &&
git add file1 &&
test_tick &&
git commit -m "second" &&
git tag second
[master (root-commit) 0c72e4f] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1
Switched to a new branch 'other'
[other 453a047] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
git checkout master &&
git reset --hard first &&
test_tick &&
git cherry-pick --ff second &&
test "$(git rev-parse --verify HEAD)" = "$(git rev-parse --verify second)"
Switched to branch 'master'
HEAD is now at 0c72e4f first
ok 2 - cherry-pick using --ff fast forwards
expecting success:
git checkout master &&
git reset --hard first &&
test_tick &&
git cherry-pick second &&
test "$(git rev-parse --verify HEAD)" != "$(git rev-parse --verify second)"
Already on 'master'
HEAD is now at 0c72e4f first
[master 43e4ff7] second
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+)
ok 3 - cherry-pick not using --ff does not fast forwards
expecting success:
git checkout master &&
git reset --hard first &&
echo new line >A &&
git add A &&
test_tick &&
git commit -m "add line to A" A &&
git tag A &&
git checkout -b side first &&
echo new line >B &&
git add B &&
test_tick &&
git commit -m "add line to B" B &&
git tag B &&
git checkout master &&
git merge side &&
git tag C &&
git checkout -b new A
Already on 'master'
HEAD is now at 0c72e4f first
[master e3ca70e] add line to A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A
Switched to a new branch 'side'
[side 5faaf2e] add line to B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B
Switched to branch 'master'
Merging:
e3ca70e add line to A
virtual side
found 1 common ancestor:
0c72e4f first
Merge made by the 'recursive' strategy.
B | 1 +
1 file changed, 1 insertion(+)
create mode 100644 B
Switched to a new branch 'new'
ok 4 - merge setup
expecting success:
git reset --hard A -- &&
git cherry-pick --ff -m 1 B &&
git diff --exit-code C --
HEAD is now at e3ca70e add line to A
[new d859d20] add line to B
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:18:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 B
ok 5 - cherry-pick explicit first parent of a non-merge with --ff
expecting success:
git reset --hard A -- &&
test_must_fail git cherry-pick --ff C &&
git diff --exit-code A --
HEAD is now at e3ca70e add line to A
error: commit 17345dd7218a0fc4dc087d5aacc6be7192e4fa2a is a merge but no -m option was given.
fatal: cherry-pick failed
ok 6 - cherry pick a merge with --ff but without -m should fail
expecting success:
git reset --hard A -- &&
git cherry-pick --ff -m 1 C &&
git diff --exit-code C &&
test "$(git rev-parse --verify HEAD)" = "$(git rev-parse --verify C)"
HEAD is now at e3ca70e add line to A
ok 7 - cherry pick with --ff a merge (1)
expecting success:
git reset --hard B -- &&
git cherry-pick --ff -m 2 C &&
git diff --exit-code C &&
test "$(git rev-parse --verify HEAD)" = "$(git rev-parse --verify C)"
HEAD is now at 5faaf2e add line to B
ok 8 - cherry pick with --ff a merge (2)
expecting success:
git reset --hard B -- &&
test_must_fail git cherry-pick --ff -m 3 C
HEAD is now at 5faaf2e add line to B
error: commit 17345dd7218a0fc4dc087d5aacc6be7192e4fa2a does not have parent 3
fatal: cherry-pick failed
ok 9 - cherry pick a merge relative to nonexistent parent with --ff should fail
expecting success:
git reset --hard first -- &&
git rm file1 &&
echo first >file2 &&
git add file2 &&
git commit --amend -m "file2" &&
git cherry-pick --ff first &&
test "$(git rev-parse --verify HEAD)" = "1df192cd8bc58a2b275d842cede4d221ad9000d1"
HEAD is now at 0c72e4f first
rm 'file1'
[new 1654ff9] file2
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 file2
[new 1df192c] first
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 file1
ok 10 - cherry pick a root commit with --ff
expecting success:
git checkout --orphan unborn &&
git rm --cached -r . &&
rm -rf * &&
git cherry-pick --ff first &&
test_cmp_rev first HEAD
Switched to a new branch 'unborn'
rm 'file1'
rm 'file2'
ok 11 - cherry-pick --ff on unborn branch
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3426-rebase-submodule.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/.git/
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
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1/.git/
[master (root-commit) 95703d5] Base inside first submodule
Author: A U Thor <author@example.com>
3 files changed, 4 insertions(+)
create mode 100644 .gitignore
create mode 100644 file1
create mode 100644 file2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub2/.git/
[master (root-commit) ad110c0] nested submodule 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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_repo/.git/
[master (root-commit) 379e0f2] 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
Switched to a new branch 'add_sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_repo/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_repo/uninitialized_sub'...
done.
[add_sub1 41f75ec] Add sub1
Author: A U Thor <author@example.com>
2 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 uninitialized_sub
Switched to a new branch 'remove_sub1'
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
[remove_sub1 34db488] Revert "Add sub1"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:25 2019 +0000
3 files changed, 9 deletions(-)
delete mode 100644 .gitmodules
delete mode 160000 sub1
delete mode 160000 uninitialized_sub
Switched to a new branch 'modify_sub1'
Switched to a new branch 'modifications'
[modifications c07651c] modified file2 and added file3
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 file3
To /<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1
* [new branch] modifications -> modifications
[modify_sub1 6c9e6d4] Modify sub1
Author: A U Thor <author@example.com>
Switched to a new branch 'add_nested_sub'
Switched to a new branch 'add_nested_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_repo/sub1/sub2'...
done.
[add_nested_sub c22e159] add a nested submodule
Author: A U Thor <author@example.com>
2 files changed, 5 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub2
[add_nested_sub fa77c20] update submodule, that updates a nested submodule
Author: A U Thor <author@example.com>
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
[modify_sub1_recursively d4963a2] make a change in nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
[modify_sub1_recursively 984a22b] update nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[modify_sub1_recursively d5202de] update sub1, that updates nested sub
Author: A U Thor <author@example.com>
To /<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
To /<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub2
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
Cleared directory 'sub2'
Submodule 'sub2' (../submodule_update_sub2) unregistered for path 'sub2'
Switched to a new branch 'replace_sub1_with_directory'
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Previous HEAD position was 95703d5 Base inside first submodule
Switched to branch 'modifications'
rm 'sub1'
[replace_sub1_with_directory a57d1b8] 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
Switched to a new branch 'replace_directory_with_sub1'
Removing sub1/file3
Removing sub1/file2
Removing sub1/file1
Adding sub1
[replace_directory_with_sub1 aa7ae2f] Revert "Replace sub1 with directory"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:27 2019 +0000
4 files changed, 4 insertions(+), 3 deletions(-)
delete mode 100644 sub1/file1
delete mode 100644 sub1/file2
delete mode 100644 sub1/file3
Switched to a new branch 'replace_sub1_with_file'
rm 'sub1'
[replace_sub1_with_file d9693c6] 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'
[replace_file_with_sub1 1911031] Revert "Replace sub1 with file"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:27 2019 +0000
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
Switched to a new branch 'invalid_sub1'
[invalid_sub1 2cdf5db] Invalid sub1 commit
Author: A U Thor <author@example.com>
Switched to a new branch 'valid_sub1'
[valid_sub1 6bef567] Revert "Invalid sub1 commit"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:27 2019 +0000
warning: unable to rmdir 'uninitialized_sub': Directory not empty
Switched to branch 'master'
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours 3c992d6] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 71dd0fb] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:28 2019 +0000
1 file changed, 1 deletion(-)
First, rewinding head to replay your work on top of it...
Applying: add_x
Applying: Revert "add_x"
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Submodule path 'uninitialized_sub': checked out '95703d50670ad6e0e696f68a121651009833f871'
ok 1 - git_rebase: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours 52ea7b2] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours aae7837] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:29 2019 +0000
1 file changed, 1 deletion(-)
First, rewinding head to replay your work on top of it...
Applying: add_x
Applying: Revert "add_x"
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Submodule path 'uninitialized_sub': checked out '95703d50670ad6e0e696f68a121651009833f871'
ok 2 - git_rebase: added submodule leaves existing empty directory alone
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
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours d488de8] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 017daed] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:30 2019 +0000
1 file changed, 1 deletion(-)
First, rewinding head to replay your work on top of it...
Applying: add_x
Applying: Revert "add_x"
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Submodule path 'uninitialized_sub': checked out '95703d50670ad6e0e696f68a121651009833f871'
ok 3 - git_rebase: 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
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours cd89cbd] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 53cce32] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:32 2019 +0000
1 file changed, 1 deletion(-)
First, rewinding head to replay your work on top of it...
Applying: add_x
Applying: Revert "add_x"
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Submodule path 'uninitialized_sub': checked out '95703d50670ad6e0e696f68a121651009833f871'
ok 4 - git_rebase: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours ee890cb] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 3b57de0] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:33 2019 +0000
1 file changed, 1 deletion(-)
warning: unable to rmdir 'sub1': Directory not empty
First, rewinding head to replay your work on top of it...
Applying: add_x
Applying: Revert "add_x"
ok 5 - git_rebase: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours 08778c7] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 1642c48] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:35 2019 +0000
1 file changed, 1 deletion(-)
warning: unable to rmdir 'sub1': Directory not empty
First, rewinding head to replay your work on top of it...
Applying: add_x
Applying: Revert "add_x"
ok 6 - git_rebase: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Switched to a new branch 'ours'
[ours 475fe7f] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 832978d] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:36 2019 +0000
1 file changed, 1 deletion(-)
error: The following untracked working tree files would be overwritten by checkout:
sub1/file1
sub1/file2
Please move or remove them before you switch branches.
Aborting
fatal: Could not detach HEAD
First, rewinding head to replay your work on top of it...
ok 7 - git_rebase: replace submodule with a directory must fail
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Switched to a new branch 'ours'
[ours 475fe7f] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 832978d] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:36 2019 +0000
1 file changed, 1 deletion(-)
error: The following untracked working tree files would be overwritten by checkout:
sub1/file1
sub1/file2
Please move or remove them before you switch branches.
Aborting
fatal: Could not detach HEAD
First, rewinding head to replay your work on top of it...
ok 8 - git_rebase: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Switched to a new branch 'ours'
[ours 7055945] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 32a9a38] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:38 2019 +0000
1 file changed, 1 deletion(-)
First, rewinding head to replay your work on top of it...
Applying: add_x
Applying: Revert "add_x"
test_must_fail: command succeeded: git_rebase replace_sub1_with_file
not ok 9 - git_rebase: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Switched to a new branch 'ours'
[ours 738beff] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 1022762] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:39 2019 +0000
1 file changed, 1 deletion(-)
First, rewinding head to replay your work on top of it...
Applying: add_x
Applying: Revert "add_x"
test_must_fail: command succeeded: git_rebase replace_sub1_with_file
not ok 10 - git_rebase: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours 4d2cb15] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 53c209a] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:40 2019 +0000
1 file changed, 1 deletion(-)
First, rewinding head to replay your work on top of it...
Applying: add_x
Applying: Revert "add_x"
Submodule path 'sub1': checked out 'c07651cb67c0dab9b34a93e4cbf4e07471acf6d9'
ok 11 - git_rebase: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours edf97cd] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 5d3355c] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:41 2019 +0000
1 file changed, 1 deletion(-)
First, rewinding head to replay your work on top of it...
Applying: add_x
Applying: Revert "add_x"
error: Server does not allow request for unadvertised object 0123456789012345678901234567890123456789
Fetched in submodule path 'sub1', but it did not contain 0123456789012345678901234567890123456789. Direct fetching of that commit failed.
ok 12 - git_rebase: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours 23e48fd] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours cbf9dda] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:42 2019 +0000
1 file changed, 1 deletion(-)
First, rewinding head to replay your work on top of it...
Applying: add_x
Applying: Revert "add_x"
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Submodule path 'uninitialized_sub': checked out '95703d50670ad6e0e696f68a121651009833f871'
ok 13 - git_rebase: 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 &&
>sub1 &&
test_must_fail $command add_sub1 &&
test_superproject_content origin/no_submodule &&
test_must_be_empty sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours f808d30] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours d50eaae] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:44 2019 +0000
1 file changed, 1 deletion(-)
error: The following untracked working tree files would be overwritten by checkout:
sub1
Please move or remove them before you switch branches.
Aborting
fatal: Could not detach HEAD
First, rewinding head to replay your work on top of it...
ok 14 - git_rebase: added submodule doesn't remove untracked unignored file with same name
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours e026107] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 58a8eb2] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:44 2019 +0000
1 file changed, 1 deletion(-)
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/ours.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Submodule path 'uninitialized_sub': checked out '95703d50670ad6e0e696f68a121651009833f871'
ok 15 - git_rebase_interactive: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours ffc0880] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 5898c2e] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:46 2019 +0000
1 file changed, 1 deletion(-)
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/ours.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Submodule path 'uninitialized_sub': checked out '95703d50670ad6e0e696f68a121651009833f871'
ok 16 - git_rebase_interactive: added submodule leaves existing empty directory alone
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
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours 85341f3] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 1858f2a] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:47 2019 +0000
1 file changed, 1 deletion(-)
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/ours.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Submodule path 'uninitialized_sub': checked out '95703d50670ad6e0e696f68a121651009833f871'
ok 17 - git_rebase_interactive: 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
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours a228889] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 4fbed3a] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:48 2019 +0000
1 file changed, 1 deletion(-)
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/ours.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Submodule path 'uninitialized_sub': checked out '95703d50670ad6e0e696f68a121651009833f871'
ok 18 - git_rebase_interactive: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours afab3f5] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours eac064f] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:50 2019 +0000
1 file changed, 1 deletion(-)
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/ours.
ok 19 - git_rebase_interactive: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours d6b5647] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 71f9271] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:51 2019 +0000
1 file changed, 1 deletion(-)
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/ours.
ok 20 - git_rebase_interactive: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Switched to a new branch 'ours'
[ours 1d5e257] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 4300034] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:52 2019 +0000
1 file changed, 1 deletion(-)
error: The following untracked working tree files would be overwritten by checkout:
sub1/file1
sub1/file2
Please move or remove them before you switch branches.
Aborting
error: could not detach HEAD
ok 21 - git_rebase_interactive: replace submodule with a directory must fail
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Switched to a new branch 'ours'
[ours afd8fa5] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 0bd65e7] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:53 2019 +0000
1 file changed, 1 deletion(-)
error: The following untracked working tree files would be overwritten by checkout:
sub1/file1
sub1/file2
Please move or remove them before you switch branches.
Aborting
error: could not detach HEAD
ok 22 - git_rebase_interactive: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Switched to a new branch 'ours'
[ours 58a83c3] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours bedbfd0] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:54 2019 +0000
1 file changed, 1 deletion(-)
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/ours.
test_must_fail: command succeeded: git_rebase_interactive replace_sub1_with_file
not ok 23 - git_rebase_interactive: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Switched to a new branch 'ours'
[ours 3fe96cf] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 39accd2] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:55 2019 +0000
1 file changed, 1 deletion(-)
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/ours.
test_must_fail: command succeeded: git_rebase_interactive replace_sub1_with_file
not ok 24 - git_rebase_interactive: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours 61a3743] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours f4d6e61] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:56 2019 +0000
1 file changed, 1 deletion(-)
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/ours.
Submodule path 'sub1': checked out 'c07651cb67c0dab9b34a93e4cbf4e07471acf6d9'
ok 25 - git_rebase_interactive: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours e26f59c] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 3d2ee41] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:58 2019 +0000
1 file changed, 1 deletion(-)
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/ours.
error: Server does not allow request for unadvertised object 0123456789012345678901234567890123456789
Fetched in submodule path 'sub1', but it did not contain 0123456789012345678901234567890123456789. Direct fetching of that commit failed.
ok 26 - git_rebase_interactive: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours 121375e] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 446db82] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:27:59 2019 +0000
1 file changed, 1 deletion(-)
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/ours.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '95703d50670ad6e0e696f68a121651009833f871'
Submodule path 'uninitialized_sub': checked out '95703d50670ad6e0e696f68a121651009833f871'
ok 27 - git_rebase_interactive: 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 &&
>sub1 &&
test_must_fail $command add_sub1 &&
test_superproject_content origin/no_submodule &&
test_must_be_empty sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to a new branch 'ours'
[ours ed86999] add_x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ours 0b6b5d3] Revert "add_x"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:00 2019 +0000
1 file changed, 1 deletion(-)
error: The following untracked working tree files would be overwritten by checkout:
sub1
Please move or remove them before you switch branches.
Aborting
error: could not detach HEAD
ok 28 - git_rebase_interactive: added submodule doesn't remove untracked unignored file with same name
expecting success:
test_when_finished "rm -rf super sub" &&
git init sub &&
git -C sub commit --allow-empty -m "Initial commit" &&
git init super &&
git -C super submodule add ../sub &&
git -C super config submodule.sub.ignore dirty &&
>super/foo &&
git -C super add foo &&
git -C super commit -m "Initial commit" &&
test_commit -C super a &&
test_commit -C super b &&
test_commit -C super/sub c &&
set_fake_editor &&
git -C super rebase -i HEAD^^
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/sub/.git/
[master (root-commit) 5000c22] Initial commit
Author: A U Thor <author@example.com>
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/super/.git/
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3426-rebase-submodule/super/sub'...
done.
[master (root-commit) 710a175] Initial commit
Author: A U Thor <author@example.com>
3 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 100644 foo
create mode 160000 sub
[master 090a8db] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a.t
[master feda13b] b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b.t
[master bb81427] c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c.t
Successfully rebased and updated refs/heads/master.
ok 29 - rebase interactive ignores modified submodules
# still have 4 known breakage(s)
# passed all remaining 25 test(s)
1..29
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3509-cherry-pick-merge-df.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3509-cherry-pick-merge-df/.git/
expecting success:
mkdir a &&
>a/f &&
git add a &&
git commit -m a
[master (root-commit) 510216f] a
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a/f
ok 1 - Initialize repository
expecting success:
mkdir b &&
test_ln_s_add ../a b/a &&
git commit -m b &&
git checkout -b branch &&
rm b/a &&
git mv a b/a &&
test_ln_s_add b/a a &&
git commit -m swap &&
>f1 &&
git add f1 &&
git commit -m f1
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
[master 6701c53] b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 120000 b/a
Switched to a new branch 'branch'
[branch e1f8def] swap
Author: A U Thor <author@example.com>
3 files changed, 1 insertion(+), 1 deletion(-)
create mode 120000 a
delete mode 120000 b/a
rename {a => b/a}/f (100%)
[branch 16bd1bc] f1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 f1
ok 2 - Setup rename across paths each below D/F conflicts
expecting success:
git reset --hard &&
git checkout master^0 &&
git cherry-pick branch
HEAD is now at 16bd1bc f1
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 6701c53 b
Adding b/a
Adding a/f
[detached HEAD e94e832] f1
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:00 2019 +0000
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 f1
ok 3 - Cherry-pick succeeds with rename across D/F conflicts
expecting success:
git checkout --orphan nick-testcase &&
git rm -rf . &&
>empty &&
git add empty &&
git commit -m "Empty file" &&
git checkout -b simple &&
mv empty file &&
mkdir empty &&
mv file empty &&
git add empty/file &&
git commit -m "Empty file under empty dir" &&
echo content >newfile &&
git add newfile &&
git commit -m "New file"
Switched to a new branch 'nick-testcase'
rm 'a/f'
rm 'b/a'
rm 'f1'
[nick-testcase (root-commit) fcbd668] Empty file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 empty
Switched to a new branch 'simple'
[simple b15b6f2] Empty file under empty dir
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename empty => empty/file (100%)
[simple 31b2feb] New file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 newfile
ok 4 - Setup rename with file on one side matching directory name on other
expecting success:
git reset --hard &&
git checkout -q nick-testcase^0 &&
git cherry-pick --strategy=resolve simple
HEAD is now at 31b2feb New file
Trying simple merge.
Simple merge failed, trying Automatic merge.
[detached HEAD 9d602a3] New file
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:01 2019 +0000
1 file changed, 1 insertion(+)
create mode 100644 newfile
ok 5 - Cherry-pick succeeds with was_a_dir/file -> was_a_dir (resolve)
expecting success:
git reset --hard &&
git checkout -q nick-testcase^0 &&
git cherry-pick --strategy=recursive simple
HEAD is now at 9d602a3 New file
Adding empty
[detached HEAD 9d602a3] New file
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:01 2019 +0000
1 file changed, 1 insertion(+)
create mode 100644 newfile
ok 6 - Cherry-pick succeeds with was_a_dir/file -> was_a_dir (recursive)
expecting success:
git reset --hard &&
git checkout --orphan mergeme &&
git rm -rf . &&
mkdir sub &&
mkdir othersub &&
echo content > sub/file &&
echo foo > othersub/whatever &&
git add -A &&
git commit -m "Common commit" &&
git rm -rf othersub &&
git mv sub/file othersub &&
git commit -m "Commit to merge" &&
git checkout -b newhead mergeme~1 &&
>independent-change &&
git add independent-change &&
git commit -m "Completely unrelated change"
HEAD is now at 9d602a3 New file
Switched to a new branch 'mergeme'
rm 'empty'
rm 'newfile'
[mergeme (root-commit) c58c0fa] Common commit
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 othersub/whatever
create mode 100644 sub/file
rm 'othersub/whatever'
[mergeme 7c8dca4] Commit to merge
Author: A U Thor <author@example.com>
2 files changed, 1 deletion(-)
rename sub/file => othersub (100%)
delete mode 100644 othersub/whatever
Switched to a new branch 'newhead'
[newhead c2c9b03] Completely unrelated change
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 independent-change
ok 7 - Setup rename with file on one side matching different dirname on other
expecting success:
git reset --hard &&
git checkout -q newhead^0 &&
git cherry-pick --strategy=resolve mergeme
HEAD is now at c2c9b03 Completely unrelated change
Trying simple merge.
Simple merge failed, trying Automatic merge.
Adding othersub
[detached HEAD 9834764] Commit to merge
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:01 2019 +0000
2 files changed, 1 deletion(-)
rename sub/file => othersub (100%)
delete mode 100644 othersub/whatever
ok 8 - Cherry-pick with rename to different D/F conflict succeeds (resolve)
expecting success:
git reset --hard &&
git checkout -q newhead^0 &&
git cherry-pick --strategy=recursive mergeme
HEAD is now at 9834764 Commit to merge
Removing othersub/whatever
[detached HEAD 9834764] Commit to merge
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:01 2019 +0000
2 files changed, 1 deletion(-)
rename sub/file => othersub (100%)
delete mode 100644 othersub/whatever
ok 9 - Cherry-pick with rename to different D/F conflict succeeds (recursive)
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3508-cherry-pick-many-commits.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3508-cherry-pick-many-commits/.git/
expecting success:
echo first > file1 &&
git add file1 &&
test_tick &&
git commit -m "first" &&
git tag first &&
git checkout -b other &&
for val in second third fourth
do
echo $val >> file1 &&
git add file1 &&
test_tick &&
git commit -m "$val" &&
git tag $val
done
[master (root-commit) 0c72e4f] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1
Switched to a new branch 'other'
[other 453a047] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[other e85abe2] third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[other 94d3184] fourth
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
git checkout -f master &&
git reset --hard first &&
test_tick &&
git cherry-pick first..fourth &&
git diff --quiet other &&
git diff --quiet HEAD other &&
check_head_differs_from fourth
Switched to branch 'master'
HEAD is now at 0c72e4f first
[master 9589776] second
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+)
[master 7ef563c] third
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
[master 105ac0a] fourth
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+)
error: two revisions point to different objects:
'HEAD': 105ac0ac93120eb93ecb7cd789e973cec9c3d19a
'fourth': 94d3184b3f0dcfebb393faf5a122dc429d775538
ok 2 - cherry-pick first..fourth works
expecting success:
git checkout -f first &&
test_commit one &&
test_commit two &&
test_commit three &&
git checkout -f master &&
git reset --hard first &&
git cherry-pick three one two &&
git diff --quiet three &&
git diff --quiet HEAD three &&
test "$(git log --reverse --format=%s first..)" = "three
one
two"
Note: switching to 'first'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 0c72e4f first
[detached HEAD 08ada56] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[detached HEAD 556e4fe] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[detached HEAD a4e9322] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
Previous HEAD position was a4e9322 three
Switched to branch 'master'
HEAD is now at 0c72e4f first
[master 124d016] three
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:20:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 three.t
[master 6e6e64d] one
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:18:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 54c7896] two
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:19:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 two.t
ok 3 - cherry-pick three one two works
expecting success:
git checkout -f master &&
git reset --hard first &&
test_must_fail git cherry-pick three one two:
Already on 'master'
HEAD is now at 0c72e4f first
error: two:: can't cherry-pick a tree
fatal: cherry-pick failed
ok 4 - cherry-pick three one two: fails
expecting success:
cat <<-\EOF >expected &&
[master OBJID] second
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+)
[master OBJID] third
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
[master OBJID] fourth
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+)
EOF
git checkout -f master &&
git reset --hard first &&
test_tick &&
git cherry-pick first..fourth >actual &&
sed -e "s/$_x05[0-9a-f][0-9a-f]/OBJID/" <actual >actual.fuzzy &&
test_line_count -ge 3 actual.fuzzy &&
test_i18ncmp expected actual.fuzzy
Already on 'master'
HEAD is now at 0c72e4f first
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 5 - output to keep user entertained during multi-pick
expecting success:
git checkout -f master &&
git reset --hard first &&
test_tick &&
git cherry-pick --strategy resolve first..fourth &&
git diff --quiet other &&
git diff --quiet HEAD other &&
check_head_differs_from fourth
Already on 'master'
HEAD is now at 0c72e4f first
Trying simple merge.
[master 48c207c] second
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+)
Trying simple merge.
[master 9dcf789] third
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
Trying simple merge.
[master 1f7167d] fourth
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+)
error: two revisions point to different objects:
'HEAD': 1f7167d07ce0b08f26e0fc6f5479aa2c2d6d103c
'fourth': 94d3184b3f0dcfebb393faf5a122dc429d775538
ok 6 - cherry-pick --strategy resolve first..fourth works
expecting success:
cat <<-\EOF >expected &&
Trying simple merge.
[master OBJID] second
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+)
Trying simple merge.
[master OBJID] third
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
Trying simple merge.
[master OBJID] fourth
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+)
EOF
git checkout -f master &&
git reset --hard first &&
test_tick &&
git cherry-pick --strategy resolve first..fourth >actual &&
sed -e "s/$_x05[0-9a-f][0-9a-f]/OBJID/" <actual >actual.fuzzy &&
test_i18ncmp expected actual.fuzzy
Already on 'master'
HEAD is now at 0c72e4f first
ok 7 - output during multi-pick indicates merge strategy
expecting success:
git checkout -f master &&
git reset --hard first &&
test_tick &&
git cherry-pick --ff first..fourth &&
git diff --quiet other &&
git diff --quiet HEAD other &&
check_head_equals fourth
Already on 'master'
HEAD is now at 0c72e4f first
ok 8 - cherry-pick --ff first..fourth works
expecting success:
git checkout -f master &&
git reset --hard first &&
test_tick &&
git cherry-pick -n first..fourth &&
git diff --quiet other &&
git diff --cached --quiet other &&
git diff --quiet HEAD first
Already on 'master'
HEAD is now at 0c72e4f first
ok 9 - cherry-pick -n first..fourth works
expecting success:
git checkout -f master &&
git reset --hard fourth &&
test_tick &&
git revert first..fourth &&
git diff --quiet first &&
git diff --cached --quiet first &&
git diff --quiet HEAD first
Already on 'master'
HEAD is now at 94d3184 fourth
[master 9fd86ee] Revert "fourth"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:26:13 2005 -0700
1 file changed, 1 deletion(-)
[master bcb892c] Revert "third"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:26:13 2005 -0700
1 file changed, 1 deletion(-)
[master 6e2dda4] Revert "second"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:26:13 2005 -0700
1 file changed, 1 deletion(-)
ok 10 - revert first..fourth works
expecting success:
git checkout -f master &&
git reset --hard fourth &&
test_tick &&
git revert ^first fourth &&
git diff --quiet first &&
git diff --cached --quiet first &&
git diff --quiet HEAD first
Already on 'master'
HEAD is now at 94d3184 fourth
[master e6761b3] Revert "fourth"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:27:13 2005 -0700
1 file changed, 1 deletion(-)
[master 4940ca7] Revert "third"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:27:13 2005 -0700
1 file changed, 1 deletion(-)
[master e06156e] Revert "second"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:27:13 2005 -0700
1 file changed, 1 deletion(-)
ok 11 - revert ^first fourth works
expecting success:
git checkout -f master &&
git reset --hard fourth &&
test_tick &&
git revert fourth fourth~1 fourth~2 &&
git diff --quiet first &&
git diff --cached --quiet first &&
git diff --quiet HEAD first
Already on 'master'
HEAD is now at 94d3184 fourth
[master 8d9417a] Revert "fourth"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:28:13 2005 -0700
1 file changed, 1 deletion(-)
[master 210e986] Revert "third"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:28:13 2005 -0700
1 file changed, 1 deletion(-)
[master f77c534] Revert "second"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:28:13 2005 -0700
1 file changed, 1 deletion(-)
ok 12 - revert fourth fourth~1 fourth~2 works
expecting success:
git checkout -f master &&
git reset --hard first &&
test_tick &&
git cherry-pick -3 fourth &&
git diff --quiet other &&
git diff --quiet HEAD other &&
check_head_differs_from fourth
Already on 'master'
HEAD is now at 0c72e4f first
[master 0b92961] second
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+)
[master e4ba54b] third
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
[master bb3aa41] fourth
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+)
error: two revisions point to different objects:
'HEAD': bb3aa416a03ed973f577f397bffb6d20153403b2
'fourth': 94d3184b3f0dcfebb393faf5a122dc429d775538
ok 13 - cherry-pick -3 fourth works
expecting success:
git checkout -f master &&
git reset --hard first &&
test_tick &&
git rev-list --reverse first..fourth | git cherry-pick --stdin &&
git diff --quiet other &&
git diff --quiet HEAD other &&
check_head_differs_from fourth
Already on 'master'
HEAD is now at 0c72e4f first
[master 026fdf1] second
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+)
[master 56d3171] third
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
[master 2cef6d1] fourth
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+)
error: two revisions point to different objects:
'HEAD': 2cef6d1fb27ea4336278384a858288280fb8ade8
'fourth': 94d3184b3f0dcfebb393faf5a122dc429d775538
ok 14 - cherry-pick --stdin works
# passed all 14 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3507-cherry-pick-conflict.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3507-cherry-pick-conflict/.git/
expecting success:
echo unrelated >unrelated &&
git add unrelated &&
test_commit initial foo a &&
test_commit base foo b &&
test_commit picked foo c &&
test_commit --signoff picked-signed foo d &&
git checkout -b topic initial &&
test_commit redundant-pick foo c redundant &&
git commit --allow-empty --allow-empty-message &&
git tag empty &&
git checkout master &&
git config advice.detachedhead false
[master (root-commit) df2a63d] initial
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 foo
create mode 100644 unrelated
[master dc0113b] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 7e6d412] picked
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master e4ca149] picked-signed
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'topic'
[topic 2aaca37] redundant-pick
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[topic c0ecbf1]
Author: A U Thor <author@example.com>
Switched to branch 'master'
ok 1 - setup
expecting success:
pristine_detach initial &&
head=$(git rev-parse HEAD) &&
test_must_fail git cherry-pick picked &&
newhead=$(git rev-parse HEAD) &&
test "$head" = "$newhead"
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 2 - failed cherry-pick does not advance HEAD
expecting success:
pristine_detach initial &&
picked=$(git rev-parse --short picked) &&
cat <<-EOF >expected &&
error: could not apply $picked... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
EOF
test_must_fail git cherry-pick picked 2>actual &&
test_i18ncmp expected actual
HEAD is now at df2a63d initial
warning: cancelling a cherry picking in progress
Auto-merging foo
CONFLICT (content): Merge conflict in foo
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 3 - advice from failed cherry-pick
expecting success:
pristine_detach initial &&
picked=$(git rev-parse --short picked) &&
cat <<-EOF >expected &&
error: could not apply $picked... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
EOF
test_must_fail git cherry-pick --no-commit picked 2>actual &&
test_i18ncmp expected actual
HEAD is now at df2a63d initial
warning: cancelling a cherry picking in progress
Auto-merging foo
CONFLICT (content): Merge conflict in foo
ok 4 - advice from failed cherry-pick --no-commit
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick picked &&
test_cmp_rev picked CHERRY_PICK_HEAD
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 5 - failed cherry-pick sets CHERRY_PICK_HEAD
expecting success:
pristine_detach initial &&
git cherry-pick base &&
test_must_fail git rev-parse --verify CHERRY_PICK_HEAD
HEAD is now at df2a63d initial
warning: cancelling a cherry picking in progress
[detached HEAD ccd9cfc] base
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
fatal: Needed a single revision
ok 6 - successful cherry-pick does not set CHERRY_PICK_HEAD
expecting success:
pristine_detach initial &&
git cherry-pick --no-commit base &&
test_must_fail git rev-parse --verify CHERRY_PICK_HEAD
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
ccd9cfc base
HEAD is now at df2a63d initial
fatal: Needed a single revision
ok 7 - cherry-pick --no-commit does not set CHERRY_PICK_HEAD
expecting success:
pristine_detach initial &&
echo foo >foo &&
test_must_fail git cherry-pick base &&
test_must_fail git rev-parse --verify CHERRY_PICK_HEAD
HEAD is now at df2a63d initial
error: Your local changes to the following files would be overwritten by merge:
foo
Please commit your changes or stash them before you merge.
Aborting
error: merging of trees 75f1922935cac91fa5dab32e9ead331c9fd5cdd2 and 22ce0a549a77230f9e811c1935707ad76e2b691b failed
fatal: cherry-pick failed
fatal: Needed a single revision
ok 8 - cherry-pick w/dirty tree does not set CHERRY_PICK_HEAD
expecting success:
pristine_detach initial &&
echo foo >foo &&
test_must_fail git cherry-pick --strategy=resolve base &&
test_must_fail git rev-parse --verify CHERRY_PICK_HEAD
HEAD is now at df2a63d initial
error: Entry 'foo' not uptodate. Cannot merge.
error: could not apply dc0113b... base
fatal: Needed a single revision
ok 9 - cherry-pick --strategy=resolve w/dirty tree does not set CHERRY_PICK_HEAD
expecting success:
pristine_detach initial &&
(
GIT_CHERRY_PICK_HELP="and then do something else" &&
export GIT_CHERRY_PICK_HELP &&
test_must_fail git cherry-pick picked
) &&
test_must_fail git rev-parse --verify CHERRY_PICK_HEAD
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 7e6d412... picked
and then do something else
fatal: Needed a single revision
ok 10 - GIT_CHERRY_PICK_HELP suppresses CHERRY_PICK_HEAD
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick picked &&
git reset &&
test_must_fail git rev-parse --verify CHERRY_PICK_HEAD
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Unstaged changes after reset:
M foo
fatal: Needed a single revision
ok 11 - git reset clears CHERRY_PICK_HEAD
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick picked &&
test_must_fail git commit &&
test_cmp_rev picked CHERRY_PICK_HEAD
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
error: Committing is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.
U foo
ok 12 - failed commit does not clear CHERRY_PICK_HEAD
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick picked &&
echo resolved >foo &&
git add foo &&
git update-index --refresh -q &&
test_must_fail git diff-index --exit-code HEAD &&
(
GIT_EDITOR=false &&
export GIT_EDITOR &&
test_must_fail git commit
) &&
test_cmp_rev picked CHERRY_PICK_HEAD
HEAD is now at df2a63d initial
warning: cancelling a cherry picking in progress
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
:100644 100644 78981922613b2afb6025042ff6bd878ac1994e85 2ab19ae607aabda796309682e0448237aab03047 M foo
error: There was a problem with the editor 'false'.
Please supply the message using either -m or -F option.
ok 13 - cancelled commit does not clear CHERRY_PICK_HEAD
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick picked &&
echo resolved >foo &&
git add foo &&
git commit &&
test_must_fail git rev-parse --verify CHERRY_PICK_HEAD
HEAD is now at df2a63d initial
warning: cancelling a cherry picking in progress
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD a8c44c9] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
fatal: Needed a single revision
ok 14 - successful commit clears CHERRY_PICK_HEAD
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick base picked-signed &&
echo resolved >foo &&
test_path_is_file .git/sequencer/todo &&
git commit -a &&
test_must_fail test_path_exists .git/sequencer
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
a8c44c9 picked
HEAD is now at df2a63d initial
[detached HEAD ccd9cfc] base
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply e4ca149... picked-signed
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 53c8c73] picked-signed
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Path .git/sequencer doesn't exist.
ok 15 - successful final commit clears cherry-pick state
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick base picked-signed &&
echo resolved >foo &&
test_path_is_file .git/sequencer/todo &&
git reset &&
test_must_fail test_path_exists .git/sequencer
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
53c8c73 picked-signed
ccd9cfc base
HEAD is now at df2a63d initial
[detached HEAD ccd9cfc] base
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply e4ca149... picked-signed
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Unstaged changes after reset:
M foo
Path .git/sequencer doesn't exist.
ok 16 - reset after final pick clears cherry-pick state
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick picked &&
test_must_fail git update-index --refresh -q &&
test_must_fail git diff-index --exit-code HEAD
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
ccd9cfc base
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
foo: needs merge
:100644 100644 78981922613b2afb6025042ff6bd878ac1994e85 0000000000000000000000000000000000000000 M foo
ok 17 - failed cherry-pick produces dirty index
expecting success:
pristine_detach initial &&
{
git checkout base -- foo &&
git ls-files --stage foo &&
git checkout initial -- foo &&
git ls-files --stage foo &&
git checkout picked -- foo &&
git ls-files --stage foo
} >stages &&
sed "
1 s/ 0 / 1 /
2 s/ 0 / 2 /
3 s/ 0 / 3 /
" stages >expected &&
git read-tree -u --reset HEAD &&
test_must_fail git cherry-pick picked &&
git ls-files --stage --unmerged >actual &&
test_cmp expected actual
HEAD is now at df2a63d initial
warning: cancelling a cherry picking in progress
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 18 - failed cherry-pick registers participants in index
expecting success:
pristine_detach initial &&
git config commit.cleanup scissors &&
cat <<-EOF >expected &&
picked
# ------------------------ >8 ------------------------
# Do not modify or remove the line above.
# Everything below it will be ignored.
#
# Conflicts:
# foo
EOF
test_must_fail git cherry-pick picked &&
test_i18ncmp expected .git/MERGE_MSG
HEAD is now at df2a63d initial
warning: cancelling a cherry picking in progress
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 19 - cherry-pick conflict, ensure commit.cleanup = scissors places scissors line properly
expecting success:
pristine_detach initial &&
git config --unset commit.cleanup &&
cat <<-EOF >expected &&
picked
# ------------------------ >8 ------------------------
# Do not modify or remove the line above.
# Everything below it will be ignored.
#
# Conflicts:
# foo
EOF
test_must_fail git cherry-pick --cleanup=scissors picked &&
test_i18ncmp expected .git/MERGE_MSG
HEAD is now at df2a63d initial
warning: cancelling a cherry picking in progress
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 20 - cherry-pick conflict, ensure cleanup=scissors places scissors line properly
expecting success:
pristine_detach initial &&
cat <<-EOF >expected &&
<<<<<<< HEAD
a
=======
c
>>>>>>> objid picked
EOF
test_must_fail git cherry-pick picked &&
sed "s/[a-f0-9]*\.\.\./objid/" foo >actual &&
test_cmp expected actual
HEAD is now at df2a63d initial
warning: cancelling a cherry picking in progress
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 21 - failed cherry-pick describes conflict in work tree
expecting success:
pristine_detach initial &&
git config merge.conflictstyle diff3 &&
cat <<-EOF >expected &&
<<<<<<< HEAD
a
||||||| parent of objid picked
b
=======
c
>>>>>>> objid picked
EOF
test_must_fail git cherry-pick picked &&
sed "s/[a-f0-9]*\.\.\./objid/" foo >actual &&
test_cmp expected actual
HEAD is now at df2a63d initial
warning: cancelling a cherry picking in progress
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 22 - diff3 -m style
expecting success:
git config --unset merge.conflictstyle &&
pristine_detach initial &&
cat <<-EOF >expected &&
<<<<<<< HEAD
a
=======
b
>>>>>>> parent of objid picked
EOF
{
git checkout picked -- foo &&
git ls-files --stage foo &&
git checkout initial -- foo &&
git ls-files --stage foo &&
git checkout base -- foo &&
git ls-files --stage foo
} >stages &&
sed "
1 s/ 0 / 1 /
2 s/ 0 / 2 /
3 s/ 0 / 3 /
" stages >expected-stages &&
git read-tree -u --reset HEAD &&
head=$(git rev-parse HEAD) &&
test_must_fail git revert picked &&
newhead=$(git rev-parse HEAD) &&
git ls-files --stage --unmerged >actual-stages &&
test "$head" = "$newhead" &&
test_must_fail git update-index --refresh -q &&
test_must_fail git diff-index --exit-code HEAD &&
test_cmp expected-stages actual-stages &&
sed "s/[a-f0-9]*\.\.\./objid/" foo >actual &&
test_cmp expected actual
HEAD is now at df2a63d initial
warning: cancelling a cherry picking in progress
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not revert 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
foo: needs merge
:100644 100644 78981922613b2afb6025042ff6bd878ac1994e85 0000000000000000000000000000000000000000 M foo
ok 23 - revert also handles conflicts sanely
expecting success:
pristine_detach initial &&
test_must_fail git revert picked &&
test_cmp_rev picked REVERT_HEAD
HEAD is now at df2a63d initial
warning: cancelling a revert in progress
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not revert 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 24 - failed revert sets REVERT_HEAD
expecting success:
pristine_detach base &&
git revert base &&
test_must_fail git rev-parse --verify CHERRY_PICK_HEAD &&
test_must_fail git rev-parse --verify REVERT_HEAD
Previous HEAD position was df2a63d initial
HEAD is now at dc0113b base
warning: cancelling a revert in progress
[detached HEAD feb2983] Revert "base"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
fatal: Needed a single revision
fatal: Needed a single revision
ok 25 - successful revert does not set REVERT_HEAD
expecting success:
pristine_detach base &&
git revert --no-commit base &&
test_must_fail git rev-parse --verify CHERRY_PICK_HEAD &&
test_cmp_rev base REVERT_HEAD
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
feb2983 Revert "base"
HEAD is now at dc0113b base
fatal: Needed a single revision
ok 26 - revert --no-commit sets REVERT_HEAD
expecting success:
pristine_detach base &&
echo foo >foo &&
test_must_fail git revert base &&
test_must_fail git rev-parse --verify CHERRY_PICK_HEAD &&
test_must_fail git rev-parse --verify REVERT_HEAD
HEAD is now at dc0113b base
warning: cancelling a revert in progress
error: Your local changes to the following files would be overwritten by merge:
foo
Please commit your changes or stash them before you merge.
Aborting
error: merging of trees 22ce0a549a77230f9e811c1935707ad76e2b691b and 75f1922935cac91fa5dab32e9ead331c9fd5cdd2 failed
fatal: revert failed
fatal: Needed a single revision
fatal: Needed a single revision
ok 27 - revert w/dirty tree does not set REVERT_HEAD
expecting success:
pristine_detach initial &&
(
GIT_CHERRY_PICK_HELP="and then do something else" &&
GIT_REVERT_HELP="and then do something else, again" &&
export GIT_CHERRY_PICK_HELP GIT_REVERT_HELP &&
test_must_fail git revert picked
) &&
test_must_fail git rev-parse --verify CHERRY_PICK_HEAD &&
test_cmp_rev picked REVERT_HEAD
Previous HEAD position was dc0113b base
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not revert 7e6d412... picked
and then do something else
fatal: Needed a single revision
ok 28 - GIT_CHERRY_PICK_HELP does not suppress REVERT_HEAD
expecting success:
pristine_detach initial &&
test_must_fail git revert picked &&
git reset &&
test_must_fail git rev-parse --verify REVERT_HEAD
HEAD is now at df2a63d initial
warning: cancelling a revert in progress
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not revert 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Unstaged changes after reset:
M foo
fatal: Needed a single revision
ok 29 - git reset clears REVERT_HEAD
expecting success:
pristine_detach initial &&
test_must_fail git revert picked &&
test_must_fail git commit &&
test_cmp_rev picked REVERT_HEAD
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not revert 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
error: Committing is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.
U foo
ok 30 - failed commit does not clear REVERT_HEAD
expecting success:
pristine_detach picked-signed &&
test_must_fail git revert picked-signed base &&
echo resolved >foo &&
test_path_is_file .git/sequencer/todo &&
git commit -a &&
test_must_fail test_path_exists .git/sequencer
Previous HEAD position was df2a63d initial
HEAD is now at e4ca149 picked-signed
warning: cancelling a revert in progress
[detached HEAD b940b09] Revert "picked-signed"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not revert dc0113b... base
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 7342963] Revert "base"
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Path .git/sequencer doesn't exist.
ok 31 - successful final commit clears revert state
expecting success:
pristine_detach picked-signed &&
test_must_fail git revert picked-signed base &&
echo resolved >foo &&
test_path_is_file .git/sequencer/todo &&
git reset &&
test_must_fail test_path_exists .git/sequencer
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
7342963 Revert "base"
b940b09 Revert "picked-signed"
HEAD is now at e4ca149 picked-signed
[detached HEAD b940b09] Revert "picked-signed"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not revert dc0113b... base
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Unstaged changes after reset:
M foo
Path .git/sequencer doesn't exist.
ok 32 - reset after final pick clears revert state
expecting success:
pristine_detach initial &&
git config merge.conflictstyle diff3 &&
cat <<-EOF >expected &&
<<<<<<< HEAD
a
||||||| objid picked
c
=======
b
>>>>>>> parent of objid picked
EOF
test_must_fail git revert picked &&
sed "s/[a-f0-9]*\.\.\./objid/" foo >actual &&
test_cmp expected actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
b940b09 Revert "picked-signed"
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not revert 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 33 - revert conflict, diff3 -m style
expecting success:
pristine_detach initial &&
git config commit.cleanup scissors &&
cat >expected <<-EOF &&
Revert "picked"
This reverts commit OBJID.
# ------------------------ >8 ------------------------
# Do not modify or remove the line above.
# Everything below it will be ignored.
#
# Conflicts:
# foo
EOF
test_must_fail git revert picked &&
sed "s/$OID_REGEX/OBJID/" .git/MERGE_MSG >actual &&
test_i18ncmp expected actual
HEAD is now at df2a63d initial
warning: cancelling a revert in progress
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not revert 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 34 - revert conflict, ensure commit.cleanup = scissors places scissors line properly
expecting success:
pristine_detach initial &&
git config --unset commit.cleanup &&
cat >expected <<-EOF &&
Revert "picked"
This reverts commit OBJID.
# ------------------------ >8 ------------------------
# Do not modify or remove the line above.
# Everything below it will be ignored.
#
# Conflicts:
# foo
EOF
test_must_fail git revert --cleanup=scissors picked &&
sed "s/$OID_REGEX/OBJID/" .git/MERGE_MSG >actual &&
test_i18ncmp expected actual
HEAD is now at df2a63d initial
warning: cancelling a revert in progress
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not revert 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 35 - revert conflict, ensure cleanup=scissors places scissors line properly
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick -s picked &&
test_i18ngrep -e "Signed-off-by" .git/MERGE_MSG
HEAD is now at df2a63d initial
warning: cancelling a revert in progress
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Signed-off-by: C O Mitter <committer@example.com>
ok 36 - failed cherry-pick does not forget -s
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick -s picked-signed &&
git commit -a -s &&
test $(git show -s >tmp && grep -c "Signed-off-by" tmp && rm tmp) = 1
HEAD is now at df2a63d initial
warning: cancelling a cherry picking in progress
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply e4ca149... picked-signed
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD a8dc3cb] picked-signed
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 6 insertions(+)
ok 37 - commit after failed cherry-pick does not add duplicated -s
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick picked &&
git commit -a -s &&
# Do S-o-b and Conflicts appear in the right order?
cat <<-\EOF >expect &&
Signed-off-by: C O Mitter <committer@example.com>
# Conflicts:
EOF
grep -e "^# Conflicts:" -e ^Signed-off-by .git/COMMIT_EDITMSG >actual &&
test_cmp expect actual &&
cat <<-\EOF >expected &&
picked
Signed-off-by: C O Mitter <committer@example.com>
EOF
git show -s --pretty=format:%B >actual &&
test_cmp expected actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
a8dc3cb picked-signed
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 16457b5] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 6 insertions(+)
ok 38 - commit after failed cherry-pick adds -s at the right place
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick picked &&
# emulate old-style conflicts block
mv .git/MERGE_MSG .git/MERGE_MSG+ &&
sed -e "/^# Conflicts:/,\$s/^# *//" .git/MERGE_MSG+ >.git/MERGE_MSG &&
git commit -a &&
git commit --amend -s &&
# Do S-o-b and Conflicts appear in the right order?
cat <<-\EOF >expect &&
Signed-off-by: C O Mitter <committer@example.com>
Conflicts:
EOF
grep -e "^Conflicts:" -e ^Signed-off-by .git/COMMIT_EDITMSG >actual &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
16457b5 picked
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 756b18b] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 6 insertions(+)
[detached HEAD 04c7655] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 6 insertions(+)
ok 39 - commit --amend -s places the sign-off at the right place
expecting success:
pristine_detach initial &&
test_config core.sparseCheckout true &&
test_when_finished "
echo \"/*\" >.git/info/sparse-checkout
git read-tree --reset -u HEAD
rm .git/info/sparse-checkout" &&
echo /unrelated >.git/info/sparse-checkout &&
git read-tree --reset -u HEAD &&
test_must_fail git cherry-pick -Xours picked>actual &&
test_i18ngrep ! "Changes not staged for commit:" actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
04c7655 picked
HEAD is now at df2a63d initial
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:
git commit --allow-empty
Otherwise, please use 'git cherry-pick --skip'
ok 40 - cherry-pick preserves sparse-checkout
expecting success:
test_when_finished "git cherry-pick --abort || :" &&
pristine_detach initial &&
test_must_fail git cherry-pick --keep-redundant-commits picked redundant &&
echo c >foo &&
git add foo &&
git cherry-pick --continue
HEAD is now at df2a63d initial
warning: cancelling a cherry picking in progress
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD d9f497e] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD 22de78d] redundant-pick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
error: no cherry-pick or revert in progress
fatal: cherry-pick failed
ok 41 - cherry-pick --continue remembers --keep-redundant-commits
expecting success:
test_when_finished "git cherry-pick --abort || :" &&
pristine_detach initial &&
test_must_fail git cherry-pick --allow-empty --allow-empty-message \
picked empty &&
echo c >foo &&
git add foo &&
git cherry-pick --continue
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
22de78d redundant-pick
d9f497e picked
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 7e6d412... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD d9f497e] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Already up to date!
[detached HEAD d7f7844]
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
error: no cherry-pick or revert in progress
fatal: cherry-pick failed
ok 42 - cherry-pick --continue remembers --allow-empty and --allow-empty-message
# passed all 42 test(s)
1..42
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3511-cherry-pick-x.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3511-cherry-pick-x/.git/
expecting success:
git config advice.detachedhead false &&
echo unrelated >unrelated &&
git add unrelated &&
test_commit initial foo a &&
test_commit "$mesg_one_line" foo b mesg-one-line &&
git reset --hard initial &&
test_commit "$mesg_no_footer" foo b mesg-no-footer &&
git reset --hard initial &&
test_commit "$mesg_broken_footer" foo b mesg-broken-footer &&
git reset --hard initial &&
test_commit "$mesg_with_footer" foo b mesg-with-footer &&
git reset --hard initial &&
test_commit "$mesg_with_footer_sob" foo b mesg-with-footer-sob &&
git reset --hard initial &&
test_commit "$mesg_with_cherry_footer" foo b mesg-with-cherry-footer &&
git reset --hard initial &&
test_config commit.cleanup verbatim &&
test_commit "$mesg_unclean" foo b mesg-unclean &&
test_unconfig commit.cleanup &&
pristine_detach initial &&
test_commit conflicting unrelated
[master (root-commit) df2a63d] initial
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 foo
create mode 100644 unrelated
[master d18d4f3] base: commit message
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at df2a63d initial
[master e073909] base: commit message
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at df2a63d initial
[master 0353e8f] base: commit message
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at df2a63d initial
[master 3838485] base: commit message
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at df2a63d initial
[master d60edf0] base: commit message
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at df2a63d initial
[master d7a875c] base: commit message
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at df2a63d initial
[master 860e94a] base: commit message
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at df2a63d initial
[detached HEAD 823a98f] conflicting
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
pristine_detach initial &&
sha1=$(git rev-parse mesg-one-line^0) &&
git cherry-pick -x mesg-one-line &&
cat <<-EOF >expect &&
$mesg_one_line
(cherry picked from commit $sha1)
EOF
git log -1 --pretty=format:%B >actual &&
test_cmp expect actual
Previous HEAD position was 823a98f conflicting
HEAD is now at df2a63d initial
[detached HEAD 6970a53] base: commit message
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 2 - cherry-pick -x inserts blank line after one line subject
expecting success:
pristine_detach initial &&
git cherry-pick -s mesg-one-line &&
cat <<-EOF >expect &&
$mesg_one_line
Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
EOF
git log -1 --pretty=format:%B >actual &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
6970a53 base: commit message
HEAD is now at df2a63d initial
[detached HEAD 0fda2e1] base: commit message
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 3 - cherry-pick -s inserts blank line after one line subject
expecting success:
pristine_detach initial &&
git cherry-pick -s mesg-broken-footer &&
cat <<-EOF >expect &&
$mesg_broken_footer
Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
EOF
git log -1 --pretty=format:%B >actual &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
0fda2e1 base: commit message
HEAD is now at df2a63d initial
[detached HEAD 0cf5261] base: commit message
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 4 - cherry-pick -s inserts blank line after non-conforming footer
expecting success:
pristine_detach initial &&
git -c "trailer.Myfooter.ifexists=add" cherry-pick -s mesg-broken-footer &&
cat <<-EOF >expect &&
$mesg_broken_footer
Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
EOF
git log -1 --pretty=format:%B >actual &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
0cf5261 base: commit message
HEAD is now at df2a63d initial
[detached HEAD b95a0f7] base: commit message
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 5 - cherry-pick -s recognizes trailer config
expecting success:
pristine_detach initial &&
sha1=$(git rev-parse mesg-no-footer^0) &&
git cherry-pick -x mesg-no-footer &&
cat <<-EOF >expect &&
$mesg_no_footer
(cherry picked from commit $sha1)
EOF
git log -1 --pretty=format:%B >actual &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
b95a0f7 base: commit message
HEAD is now at df2a63d initial
[detached HEAD 6f42e54] base: commit message
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 6 - cherry-pick -x inserts blank line when conforming footer not found
expecting success:
pristine_detach initial &&
git cherry-pick -s mesg-no-footer &&
cat <<-EOF >expect &&
$mesg_no_footer
Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
EOF
git log -1 --pretty=format:%B >actual &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
6f42e54 base: commit message
HEAD is now at df2a63d initial
[detached HEAD 32d2dda] base: commit message
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 7 - cherry-pick -s inserts blank line when conforming footer not found
expecting success:
pristine_detach initial &&
sha1=$(git rev-parse mesg-no-footer^0) &&
git cherry-pick -x -s mesg-no-footer &&
cat <<-EOF >expect &&
$mesg_no_footer
(cherry picked from commit $sha1)
Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
EOF
git log -1 --pretty=format:%B >actual &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
32d2dda base: commit message
HEAD is now at df2a63d initial
[detached HEAD adaaef8] base: commit message
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 8 - cherry-pick -x -s inserts blank line when conforming footer not found
expecting success:
pristine_detach initial &&
git cherry-pick -s mesg-with-footer &&
cat <<-EOF >expect &&
$mesg_with_footer
Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
EOF
git log -1 --pretty=format:%B >actual &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
adaaef8 base: commit message
HEAD is now at df2a63d initial
[detached HEAD b62bd75] base: commit message
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 9 - cherry-pick -s adds sob when last sob doesnt match committer
expecting success:
pristine_detach initial &&
sha1=$(git rev-parse mesg-with-footer^0) &&
git cherry-pick -x -s mesg-with-footer &&
cat <<-EOF >expect &&
$mesg_with_footer
(cherry picked from commit $sha1)
Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
EOF
git log -1 --pretty=format:%B >actual &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
b62bd75 base: commit message
HEAD is now at df2a63d initial
[detached HEAD 94e740a] base: commit message
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 10 - cherry-pick -x -s adds sob when last sob doesnt match committer
expecting success:
pristine_detach initial &&
git cherry-pick -s mesg-with-footer-sob &&
cat <<-EOF >expect &&
$mesg_with_footer_sob
EOF
git log -1 --pretty=format:%B >actual &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
94e740a base: commit message
HEAD is now at df2a63d initial
[detached HEAD a836c16] base: commit message
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:18:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 11 - cherry-pick -s refrains from adding duplicate trailing sob
expecting success:
pristine_detach initial &&
sha1=$(git rev-parse mesg-with-footer-sob^0) &&
git cherry-pick -x -s mesg-with-footer-sob &&
cat <<-EOF >expect &&
$mesg_with_footer_sob
(cherry picked from commit $sha1)
Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
EOF
git log -1 --pretty=format:%B >actual &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
a836c16 base: commit message
HEAD is now at df2a63d initial
[detached HEAD 2d6e386] base: commit message
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:18:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 12 - cherry-pick -x -s adds sob even when trailing sob exists for committer
expecting success:
pristine_detach initial &&
printf "title\n\nSigned-off-by: A <a@example.com>" >msg &&
sha1=$(git commit-tree -p initial mesg-with-footer^{tree} <msg) &&
git cherry-pick -x $sha1 &&
git log -1 --pretty=format:%B >actual &&
printf "\n(cherry picked from commit %s)\n" $sha1 >>msg &&
test_cmp msg actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
2d6e386 base: commit message
HEAD is now at df2a63d initial
[detached HEAD 96716be] title
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:21:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 13 - cherry-pick -x handles commits with no NL at end of message
expecting success:
pristine_detach initial &&
printf "title\n\nnot a footer" >msg &&
sha1=$(git commit-tree -p initial mesg-with-footer^{tree} <msg) &&
git cherry-pick -x $sha1 &&
git log -1 --pretty=format:%B >actual &&
printf "\n\n(cherry picked from commit %s)\n" $sha1 >>msg &&
test_cmp msg actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
96716be title
HEAD is now at df2a63d initial
[detached HEAD 8c5d63f] title
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:21:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 14 - cherry-pick -x handles commits with no footer and no NL at end of message
expecting success:
pristine_detach initial &&
printf "title\n\nSigned-off-by: A <a@example.com>" >msg &&
sha1=$(git commit-tree -p initial mesg-with-footer^{tree} <msg) &&
git cherry-pick -s $sha1 &&
git log -1 --pretty=format:%B >actual &&
printf "\nSigned-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>\n" >>msg &&
test_cmp msg actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
8c5d63f title
HEAD is now at df2a63d initial
[detached HEAD 6671fda] title
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:21:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 15 - cherry-pick -s handles commits with no NL at end of message
expecting success:
pristine_detach initial &&
printf "title\n\nnot a footer" >msg &&
sha1=$(git commit-tree -p initial mesg-with-footer^{tree} <msg) &&
git cherry-pick -s $sha1 &&
git log -1 --pretty=format:%B >actual &&
printf "\n\nSigned-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>\n" >>msg &&
test_cmp msg actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
6671fda title
HEAD is now at df2a63d initial
[detached HEAD 19f481d] title
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:21:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 16 - cherry-pick -s handles commits with no footer and no NL at end of message
expecting success:
pristine_detach initial &&
sha1=$(git rev-parse mesg-with-cherry-footer^0) &&
git cherry-pick -x mesg-with-cherry-footer &&
cat <<-EOF >expect &&
$mesg_with_cherry_footer
(cherry picked from commit $sha1)
EOF
git log -1 --pretty=format:%B >actual &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
19f481d title
HEAD is now at df2a63d initial
[detached HEAD 7b5eb6d] base: commit message
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:19:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 17 - cherry-pick -x treats "(cherry picked from..." line as part of footer
expecting success:
pristine_detach initial &&
git cherry-pick -s mesg-with-cherry-footer &&
cat <<-EOF >expect &&
$mesg_with_cherry_footer
Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
EOF
git log -1 --pretty=format:%B >actual &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
7b5eb6d base: commit message
HEAD is now at df2a63d initial
[detached HEAD b468a7b] base: commit message
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:19:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 18 - cherry-pick -s treats "(cherry picked from..." line as part of footer
expecting success:
pristine_detach initial &&
sha1=$(git rev-parse mesg-with-cherry-footer^0) &&
git cherry-pick -x -s mesg-with-cherry-footer &&
cat <<-EOF >expect &&
$mesg_with_cherry_footer
(cherry picked from commit $sha1)
Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
EOF
git log -1 --pretty=format:%B >actual &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
b468a7b base: commit message
HEAD is now at df2a63d initial
[detached HEAD c7c741c] base: commit message
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:19:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 19 - cherry-pick -x -s treats "(cherry picked from..." line as part of footer
expecting success:
pristine_detach initial &&
printf "$mesg_unclean" >expect &&
git log -1 --pretty=format:%B mesg-unclean >actual &&
test_cmp expect actual &&
git cherry-pick mesg-unclean &&
git log -1 --pretty=format:%B >actual &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
c7c741c base: commit message
HEAD is now at df2a63d initial
[detached HEAD 7a2ed43] base: commit message
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:20:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 20 - cherry-pick preserves commit message
expecting success:
pristine_detach initial &&
git cherry-pick -x mesg-unclean &&
git log -1 --pretty=format:%B >actual &&
printf "%s\n(cherry picked from commit %s)\n" \
"$mesg_unclean" $(git rev-parse mesg-unclean) |
git stripspace >expect &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
7a2ed43 base: commit message
HEAD is now at df2a63d initial
[detached HEAD ad2d5bc] base: commit message
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:20:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 21 - cherry-pick -x cleans commit message
expecting success:
pristine_detach initial &&
git -c commit.cleanup=strip cherry-pick -x mesg-unclean &&
git log -1 --pretty=format:%B >actual &&
printf "%s\n(cherry picked from commit %s)\n" \
"$mesg_unclean" $(git rev-parse mesg-unclean) |
git stripspace -s >expect &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
ad2d5bc base: commit message
HEAD is now at df2a63d initial
[detached HEAD fd8c8fa] base: commit message
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:20:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 22 - cherry-pick -x respects commit.cleanup
# passed all 22 test(s)
1..22
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3510-cherry-pick-sequence.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3510-cherry-pick-sequence/.git/
expecting success:
git config advice.detachedhead false &&
echo unrelated >unrelated &&
git add unrelated &&
test_commit initial foo a &&
test_commit base foo b &&
test_commit unrelatedpick unrelated reallyunrelated &&
test_commit picked foo c &&
test_commit anotherpick foo d &&
test_commit yetanotherpick foo e &&
pristine_detach initial &&
test_commit conflicting unrelated
[master (root-commit) df2a63d] initial
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 foo
create mode 100644 unrelated
[master dc0113b] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 24c5742] unrelatedpick
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master fdc0b12] picked
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 965fed4] anotherpick
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 55c7d12] yetanotherpick
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at df2a63d initial
[detached HEAD d520364] conflicting
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
pristine_detach initial &&
test_expect_code 1 git cherry-pick -s base..anotherpick &&
test_path_is_dir .git/sequencer &&
test_path_is_file .git/sequencer/head &&
test_path_is_file .git/sequencer/todo &&
test_path_is_file .git/sequencer/opts
Previous HEAD position was d520364 conflicting
HEAD is now at df2a63d initial
[detached HEAD 2fa73e8] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 2 - cherry-pick persists data on failure
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick base..anotherpick &&
test_cmp_rev picked CHERRY_PICK_HEAD &&
# "oops, I forgot that these patches rely on the change from base"
git checkout HEAD foo &&
git cherry-pick base &&
git cherry-pick picked &&
git cherry-pick --continue &&
git diff --exit-code anotherpick
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
2fa73e8 unrelatedpick
HEAD is now at df2a63d initial
[detached HEAD 7fdfeeb] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Updated 1 path from a9867be
[detached HEAD 28eafda] base
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD 4a5cd69] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD 49d5115] anotherpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 3 - cherry-pick mid-cherry-pick-sequence
expecting success:
pristine_detach initial &&
# to make sure that the session to cherry-pick a sequence
# gets interrupted, use a high-enough number that is larger
# than the number of parents of any commit we have created
mainline=4 &&
test_expect_code 128 git cherry-pick -s -m $mainline --strategy=recursive -X patience -X ours initial..anotherpick &&
test_path_is_dir .git/sequencer &&
test_path_is_file .git/sequencer/head &&
test_path_is_file .git/sequencer/todo &&
test_path_is_file .git/sequencer/opts &&
echo "true" >expect &&
git config --file=.git/sequencer/opts --get-all options.signoff >actual &&
test_cmp expect actual &&
echo "$mainline" >expect &&
git config --file=.git/sequencer/opts --get-all options.mainline >actual &&
test_cmp expect actual &&
echo "recursive" >expect &&
git config --file=.git/sequencer/opts --get-all options.strategy >actual &&
test_cmp expect actual &&
cat >expect <<-\EOF &&
patience
ours
EOF
git config --file=.git/sequencer/opts --get-all options.strategy-option >actual &&
test_cmp expect actual
Warning: you are leaving 4 commits behind, not connected to
any of your branches:
49d5115 anotherpick
4a5cd69 picked
28eafda base
7fdfeeb unrelatedpick
HEAD is now at df2a63d initial
error: commit dc0113b541050fbc624688af31e35b1d246f20fc does not have parent 4
fatal: cherry-pick failed
ok 4 - cherry-pick persists opts correctly
expecting success:
pristine_detach initial &&
git cherry-pick initial..picked &&
test_path_is_missing .git/sequencer
HEAD is now at df2a63d initial
[detached HEAD 86ee3fa] base
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD 2b8ae83] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD a222ac0] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 5 - cherry-pick cleans up sequencer state upon success
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick --skip
Warning: you are leaving 3 commits behind, not connected to
any of your branches:
a222ac0 picked
2b8ae83 unrelatedpick
86ee3fa base
HEAD is now at df2a63d initial
error: no cherry-pick in progress
fatal: cherry-pick failed
ok 6 - cherry-pick --skip requires cherry-pick in progress
expecting success:
pristine_detach initial &&
test_must_fail git revert --skip
HEAD is now at df2a63d initial
error: no revert in progress
fatal: revert failed
ok 7 - revert --skip requires revert in progress
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick anotherpick &&
test_must_fail git revert --skip &&
git cherry-pick --skip &&
test_cmp_rev initial HEAD &&
test_path_is_missing .git/CHERRY_PICK_HEAD
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 965fed4... anotherpick
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
error: no revert in progress
fatal: revert failed
ok 8 - cherry-pick --skip to skip commit
expecting success:
pristine_detach anotherpick &&
test_must_fail git revert anotherpick~1 &&
test_must_fail git cherry-pick --skip &&
git revert --skip &&
test_cmp_rev anotherpick HEAD
Previous HEAD position was df2a63d initial
HEAD is now at 965fed4 anotherpick
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not revert fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
error: no cherry-pick in progress
fatal: cherry-pick failed
ok 9 - revert --skip to skip commit
expecting success:
pristine_detach picked &&
test_commit dummy foo d &&
test_must_fail git cherry-pick anotherpick &&
git cherry-pick --skip &&
test_cmp_rev dummy HEAD
Previous HEAD position was 965fed4 anotherpick
HEAD is now at fdc0b12 picked
[detached HEAD 4b36a1c] dummy
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:
git commit --allow-empty
Otherwise, please use 'git cherry-pick --skip'
HEAD detached from fdc0b12
You are currently cherry-picking commit 965fed4.
nothing to commit, working tree clean
ok 10 - skip "empty" commit
expecting success:
pristine_detach initial &&
echo e >expect &&
cat >expect.log <<-EOF &&
OBJID
:100644 100644 OBJID OBJID M foo
OBJID
:100644 100644 OBJID OBJID M foo
OBJID
:100644 100644 OBJID OBJID M unrelated
OBJID
:000000 100644 OBJID OBJID A foo
:000000 100644 OBJID OBJID A unrelated
EOF
test_must_fail git cherry-pick base..yetanotherpick &&
test_must_fail git cherry-pick --skip &&
echo d >foo &&
git add foo &&
git cherry-pick --continue &&
{
git rev-list HEAD |
git diff-tree --root --stdin |
sed "s/$OID_REGEX/OBJID/g"
} >actual.log &&
test_cmp expect foo &&
test_cmp expect.log actual.log
Previous HEAD position was 4b36a1c dummy
HEAD is now at df2a63d initial
[detached HEAD c738c4d] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 965fed4... anotherpick
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 612ff5e] anotherpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD 61f8ec3] yetanotherpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:18:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 11 - skip a commit and check if rest of sequence is correct
expecting success:
pristine_detach initial &&
cat >expect <<-EOF &&
error: there is nothing to skip
hint: have you committed already?
hint: try "git cherry-pick --continue"
fatal: cherry-pick failed
EOF
test_must_fail git cherry-pick base..yetanotherpick &&
echo c >foo &&
git commit -a &&
test_path_is_missing .git/CHERRY_PICK_HEAD &&
test_must_fail git cherry-pick --skip 2>advice &&
test_i18ncmp expect advice
Warning: you are leaving 3 commits behind, not connected to
any of your branches:
61f8ec3 yetanotherpick
612ff5e anotherpick
c738c4d unrelatedpick
HEAD is now at df2a63d initial
[detached HEAD c738c4d] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 43fe10f] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 12 - check advice when we move HEAD by committing
expecting success:
pristine_detach initial &&
cat >expect <<-EOF &&
error: cherry-pick is already in progress
hint: try "git cherry-pick (--continue | --skip | --abort | --quit)"
fatal: cherry-pick failed
EOF
test_must_fail git cherry-pick picked..yetanotherpick &&
test_must_fail git cherry-pick picked..yetanotherpick 2>advice &&
test_i18ncmp expect advice &&
cat >expect <<-EOF &&
error: cherry-pick is already in progress
hint: try "git cherry-pick (--continue | --abort | --quit)"
fatal: cherry-pick failed
EOF
git reset --merge &&
test_must_fail git cherry-pick picked..yetanotherpick 2>advice &&
test_i18ncmp expect advice
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
43fe10f picked
c738c4d unrelatedpick
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 965fed4... anotherpick
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 13 - selectively advise --skip while launching another sequence
expecting success:
pristine_detach initial &&
cat >expect <<-EOF &&
error: cannot abort from a branch yet to be born
fatal: cherry-pick failed
EOF
git checkout --orphan new_disconnected &&
git reset --hard &&
test_must_fail git cherry-pick anotherpick &&
test_must_fail git cherry-pick --abort 2>advice &&
git cherry-pick --skip &&
test_i18ncmp expect advice
HEAD is now at df2a63d initial
Switched to a new branch 'new_disconnected'
CONFLICT (modify/delete): foo deleted in HEAD and modified in 965fed4... anotherpick. Version 965fed4... anotherpick of foo left in tree.
error: could not apply 965fed4... anotherpick
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 14 - allow skipping commit but not abort for a new history
expecting success:
pristine_detach initial &&
git rm --cached unrelated &&
git commit -m "untrack unrelated" &&
test_must_fail git cherry-pick initial base &&
test_path_is_missing .git/CHERRY_PICK_HEAD &&
git cherry-pick --skip
HEAD is now at df2a63d initial
rm 'unrelated'
[detached HEAD 44a5ca1] untrack unrelated
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 unrelated
error: The following untracked working tree files would be overwritten by merge:
unrelated
Please move or remove them before you merge.
Aborting
error: merging of trees 86de5e13286a8449a8a706a58e63be6781770b12 and 75f1922935cac91fa5dab32e9ead331c9fd5cdd2 failed
fatal: cherry-pick failed
[detached HEAD f847cb0] base
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 15 - allow skipping stopped cherry-pick because of untracked file modifications
expecting success:
pristine_detach initial &&
git cherry-pick --quit
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
f847cb0 base
44a5ca1 untrack unrelated
HEAD is now at df2a63d initial
ok 16 - --quit does not complain when no cherry-pick is in progress
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick --abort
HEAD is now at df2a63d initial
error: no cherry-pick or revert in progress
fatal: cherry-pick failed
ok 17 - --abort requires cherry-pick in progress
expecting success:
pristine_detach initial &&
test_expect_code 1 git cherry-pick base..picked &&
git cherry-pick --quit &&
test_path_is_missing .git/sequencer &&
test_path_is_missing .git/CHERRY_PICK_HEAD
HEAD is now at df2a63d initial
[detached HEAD c738c4d] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 18 - --quit cleans up sequencer state
expecting success:
pristine_detach initial &&
cat >expect <<-\EOF &&
OBJID
:100644 100644 OBJID OBJID M unrelated
OBJID
:000000 100644 OBJID OBJID A foo
:000000 100644 OBJID OBJID A unrelated
EOF
test_expect_code 1 git cherry-pick base..picked &&
git cherry-pick --quit &&
test_path_is_missing .git/sequencer &&
test_must_fail git update-index --refresh &&
{
git rev-list HEAD |
git diff-tree --root --stdin |
sed "s/$OID_REGEX/OBJID/g"
} >actual &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
c738c4d unrelatedpick
HEAD is now at df2a63d initial
[detached HEAD c738c4d] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
foo: needs merge
ok 19 - --quit keeps HEAD and conflicted index intact
expecting success:
pristine_detach initial &&
test_expect_code 1 git cherry-pick base..anotherpick &&
git cherry-pick --abort &&
test_path_is_missing .git/sequencer &&
test_path_is_missing .git/CHERRY_PICK_HEAD &&
test_cmp_rev initial HEAD &&
git update-index --refresh &&
git diff-index --exit-code HEAD
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
c738c4d unrelatedpick
HEAD is now at df2a63d initial
[detached HEAD c738c4d] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 20 - --abort to cancel multiple cherry-pick
expecting success:
pristine_detach initial &&
test_expect_code 1 git cherry-pick picked &&
git cherry-pick --abort &&
test_path_is_missing .git/sequencer &&
test_path_is_missing .git/CHERRY_PICK_HEAD &&
test_cmp_rev initial HEAD &&
git update-index --refresh &&
git diff-index --exit-code HEAD
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 21 - --abort to cancel single cherry-pick
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick picked anotherpick &&
git reset --hard base &&
test_must_fail git cherry-pick picked anotherpick &&
git cherry-pick --abort 2>actual &&
test_i18ngrep "You seem to have moved HEAD" actual &&
test_cmp_rev base HEAD
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
HEAD is now at dc0113b base
error: cherry-pick is already in progress
hint: try "git cherry-pick (--continue | --abort | --quit)"
fatal: cherry-pick failed
warning: You seem to have moved HEAD. Not rewinding, check your HEAD!
ok 22 - --abort does not unsafely change HEAD
expecting success:
pristine_detach anotherpick &&
test_expect_code 1 git revert base..picked &&
git cherry-pick --abort &&
test_path_is_missing .git/sequencer &&
test_path_is_missing .git/CHERRY_PICK_HEAD &&
test_cmp_rev anotherpick HEAD &&
git update-index --refresh &&
git diff-index --exit-code HEAD
Previous HEAD position was dc0113b base
HEAD is now at 965fed4 anotherpick
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not revert fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 23 - cherry-pick --abort to cancel multiple revert
expecting success:
pristine_detach anotherpick &&
test_expect_code 1 git revert base..picked &&
git revert --abort &&
test_path_is_missing .git/sequencer &&
test_cmp_rev anotherpick HEAD
HEAD is now at 965fed4 anotherpick
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not revert fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 24 - revert --abort works, too
expecting success:
pristine_detach anotherpick &&
test_expect_code 1 git revert picked &&
git revert --abort &&
test_path_is_missing .git/sequencer &&
test_cmp_rev anotherpick HEAD &&
git update-index --refresh &&
git diff-index --exit-code HEAD
HEAD is now at 965fed4 anotherpick
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not revert fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 25 - --abort to cancel single revert
expecting success:
pristine_detach unrelatedpick &&
echo changed >expect &&
test_expect_code 1 git cherry-pick picked..yetanotherpick &&
echo changed >unrelated &&
git cherry-pick --abort &&
test_cmp expect unrelated
Previous HEAD position was 965fed4 anotherpick
HEAD is now at 24c5742 unrelatedpick
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 965fed4... anotherpick
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 26 - --abort keeps unrelated change, easy case
expecting success:
pristine_detach initial &&
echo changed >expect &&
test_expect_code 1 git cherry-pick base..anotherpick &&
echo changed >unrelated &&
test_must_fail git cherry-pick --abort &&
test_cmp expect unrelated &&
git rev-list HEAD >log &&
test_line_count = 2 log &&
test_must_fail git update-index --refresh &&
git checkout unrelated &&
git cherry-pick --abort &&
test_cmp_rev initial HEAD
Previous HEAD position was 24c5742 unrelatedpick
HEAD is now at df2a63d initial
[detached HEAD c738c4d] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
error: Entry 'unrelated' not uptodate. Cannot merge.
fatal: Could not reset index file to revision 'df2a63d8a410bba7d3f608203e12bb371c76d4a8'.
fatal: cherry-pick failed
foo: needs merge
unrelated: needs update
Updated 1 path from the index
ok 27 - --abort refuses to clobber unrelated change, harder case
expecting success:
pristine_detach initial &&
test_expect_code 1 git cherry-pick base..picked &&
test_path_is_dir .git/sequencer &&
echo "resolved" >foo &&
git add foo &&
git commit &&
{
git rev-list HEAD |
git diff-tree --root --stdin |
sed "s/$OID_REGEX/OBJID/g"
} >actual &&
cat >expect <<-\EOF &&
OBJID
:100644 100644 OBJID OBJID M foo
OBJID
:100644 100644 OBJID OBJID M unrelated
OBJID
:000000 100644 OBJID OBJID A foo
:000000 100644 OBJID OBJID A unrelated
EOF
test_cmp expect actual
HEAD is now at df2a63d initial
[detached HEAD c738c4d] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 9781982] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 28 - cherry-pick still writes sequencer state when one commit is left
expecting success:
pristine_detach initial &&
test_expect_code 1 git cherry-pick base..picked &&
git cherry-pick --abort &&
test_path_is_missing .git/sequencer &&
test_path_is_missing .git/CHERRY_PICK_HEAD &&
test_cmp_rev initial HEAD &&
git update-index --refresh &&
git diff-index --exit-code HEAD
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
9781982 picked
c738c4d unrelatedpick
HEAD is now at df2a63d initial
[detached HEAD c738c4d] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
ok 29 - --abort after last commit in sequence
expecting success:
pristine_detach initial &&
test_expect_code 1 git cherry-pick base..anotherpick &&
test-tool chmtime --get .git/sequencer >expect &&
test_expect_code 128 git cherry-pick unrelatedpick &&
test-tool chmtime --get .git/sequencer >actual &&
test_cmp expect actual
HEAD is now at df2a63d initial
[detached HEAD c738c4d] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
error: Cherry-picking is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: cherry-pick failed
ok 30 - cherry-pick does not implicitly stomp an existing operation
expecting success:
pristine_detach initial &&
test_expect_code 128 git cherry-pick --continue
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
c738c4d unrelatedpick
HEAD is now at df2a63d initial
error: no cherry-pick or revert in progress
fatal: cherry-pick failed
ok 31 - --continue complains when no cherry-pick is in progress
expecting success:
pristine_detach initial &&
test_expect_code 1 git cherry-pick base..anotherpick &&
test_expect_code 128 git cherry-pick --continue
HEAD is now at df2a63d initial
[detached HEAD c738c4d] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
error: Committing is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.
U foo
ok 32 - --continue complains when there are unresolved conflicts
expecting success:
pristine_detach initial &&
echo c >expect &&
test_must_fail git cherry-pick picked &&
echo c >foo &&
git add foo &&
git cherry-pick --continue &&
test_cmp expect foo &&
test_cmp_rev initial HEAD^ &&
git diff --exit-code HEAD &&
test_must_fail git rev-parse --verify CHERRY_PICK_HEAD
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
c738c4d unrelatedpick
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 9aabd79] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
fatal: Needed a single revision
ok 33 - --continue of single cherry-pick
expecting success:
pristine_detach initial &&
echo resolved >expect &&
echo "Revert \"picked\"" >expect.msg &&
test_must_fail git revert picked &&
echo resolved >foo &&
git add foo &&
git cherry-pick --continue &&
git diff --exit-code HEAD &&
test_cmp expect foo &&
test_cmp_rev initial HEAD^ &&
git diff-tree -s --pretty=tformat:%s HEAD >msg &&
test_cmp expect.msg msg &&
test_must_fail git rev-parse --verify CHERRY_PICK_HEAD &&
test_must_fail git rev-parse --verify REVERT_HEAD
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
9aabd79 picked
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not revert fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 267eac8] Revert "picked"
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
fatal: Needed a single revision
fatal: Needed a single revision
ok 34 - --continue of single revert
expecting success:
pristine_detach initial &&
echo d >expect &&
cat >expect.log <<-\EOF &&
OBJID
:100644 100644 OBJID OBJID M foo
OBJID
:100644 100644 OBJID OBJID M foo
OBJID
:100644 100644 OBJID OBJID M unrelated
OBJID
:000000 100644 OBJID OBJID A foo
:000000 100644 OBJID OBJID A unrelated
EOF
test_must_fail git cherry-pick base..anotherpick &&
echo c >foo &&
git add foo &&
git cherry-pick --continue &&
{
git rev-list HEAD |
git diff-tree --root --stdin |
sed "s/$OID_REGEX/OBJID/g"
} >actual.log &&
test_cmp expect foo &&
test_cmp expect.log actual.log
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
267eac8 Revert "picked"
HEAD is now at df2a63d initial
[detached HEAD c738c4d] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 43fe10f] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD 3b1768d] anotherpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 35 - --continue after resolving conflicts
expecting success:
pristine_detach initial &&
test_expect_code 1 git cherry-pick base..anotherpick &&
echo "c" >foo &&
git add foo &&
git commit &&
git cherry-pick --continue &&
test_path_is_missing .git/sequencer &&
{
git rev-list HEAD |
git diff-tree --root --stdin |
sed "s/$OID_REGEX/OBJID/g"
} >actual &&
cat >expect <<-\EOF &&
OBJID
:100644 100644 OBJID OBJID M foo
OBJID
:100644 100644 OBJID OBJID M foo
OBJID
:100644 100644 OBJID OBJID M unrelated
OBJID
:000000 100644 OBJID OBJID A foo
:000000 100644 OBJID OBJID A unrelated
EOF
test_cmp expect actual
Warning: you are leaving 3 commits behind, not connected to
any of your branches:
3b1768d anotherpick
43fe10f picked
c738c4d unrelatedpick
HEAD is now at df2a63d initial
[detached HEAD c738c4d] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 43fe10f] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD 3b1768d] anotherpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 36 - --continue after resolving conflicts and committing
expecting success:
pristine_detach conflicting &&
test_must_fail git cherry-pick initial..picked &&
test_cmp_rev unrelatedpick CHERRY_PICK_HEAD &&
git checkout HEAD -- unrelated &&
test_must_fail git cherry-pick --continue 2>msg &&
test_i18ngrep "The previous cherry-pick is now empty" msg
Warning: you are leaving 3 commits behind, not connected to
any of your branches:
3b1768d anotherpick
43fe10f picked
c738c4d unrelatedpick
HEAD is now at d520364 conflicting
[detached HEAD 838794c] base
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging unrelated
CONFLICT (content): Merge conflict in unrelated
error: could not apply 24c5742... unrelatedpick
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
HEAD detached from d520364
Cherry-pick currently in progress.
Untracked files:
msg
nothing added to commit but untracked files present
The previous cherry-pick is now empty, possibly due to conflict resolution.
ok 37 - --continue asks for help after resolving patch to nil
expecting success:
pristine_detach conflicting &&
test_must_fail git cherry-pick initial..picked &&
git checkout HEAD -- unrelated &&
test_must_fail git cherry-pick --continue &&
git reset &&
git cherry-pick --continue &&
git rev-list initial..HEAD >commits &&
test_line_count = 3 commits
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
838794c base
HEAD is now at d520364 conflicting
[detached HEAD 838794c] base
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging unrelated
CONFLICT (content): Merge conflict in unrelated
error: could not apply 24c5742... unrelatedpick
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:
git commit --allow-empty
and then use:
git cherry-pick --continue
to resume cherry-picking the remaining commits.
If you wish to skip this commit, use:
git cherry-pick --skip
HEAD detached from d520364
Cherry-pick currently in progress.
nothing to commit, working tree clean
[detached HEAD fef14ec] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 38 - follow advice and skip nil patch
expecting success:
pristine_detach initial &&
test_expect_code 1 git cherry-pick -x base..anotherpick &&
echo "c" >foo &&
git add foo &&
git commit &&
git cherry-pick --continue &&
test_path_is_missing .git/sequencer &&
git cat-file commit HEAD >anotherpick_msg &&
git cat-file commit HEAD~1 >picked_msg &&
git cat-file commit HEAD~2 >unrelatedpick_msg &&
git cat-file commit HEAD~3 >initial_msg &&
! grep "cherry picked from" initial_msg &&
grep "cherry picked from" unrelatedpick_msg &&
grep "cherry picked from" picked_msg &&
grep "cherry picked from" anotherpick_msg
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
fef14ec picked
838794c base
HEAD is now at df2a63d initial
[detached HEAD a731ebf] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 4d735ac] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD 3834c90] anotherpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
(cherry picked from commit 24c574226938b210285578b30b436ec6119f7a7d)
(cherry picked from commit fdc0b12b2eb6de44c0df7d41b045ab2b44b6c37c)
(cherry picked from commit 965fed4c41239668ada422bca0c600444cc00e82)
ok 39 - --continue respects opts
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick -x picked &&
echo c >foo &&
git add foo &&
git cherry-pick --continue &&
test_path_is_missing .git/sequencer &&
git cat-file commit HEAD >msg &&
grep "cherry picked from" msg
Warning: you are leaving 3 commits behind, not connected to
any of your branches:
3834c90 anotherpick
4d735ac picked
a731ebf unrelatedpick
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 775318b] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
(cherry picked from commit fdc0b12b2eb6de44c0df7d41b045ab2b44b6c37c)
ok 40 - --continue of single-pick respects -x
expecting success:
pristine_detach initial &&
test_must_fail git cherry-pick -x picked anotherpick &&
echo c >foo &&
git add foo &&
git cherry-pick --continue &&
test_path_is_missing .git/sequencer &&
git cat-file commit HEAD^ >msg &&
picked=$(git rev-parse --verify picked) &&
grep "cherry picked from.*$picked" msg
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
775318b picked
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 775318b] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD d310f74] anotherpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
(cherry picked from commit fdc0b12b2eb6de44c0df7d41b045ab2b44b6c37c)
ok 41 - --continue respects -x in first commit in multi-pick
checking known breakage:
pristine_detach initial &&
test_expect_code 1 git cherry-pick --signoff base..anotherpick &&
echo "c" >foo &&
git add foo &&
git commit &&
git cherry-pick --continue &&
test_path_is_missing .git/sequencer &&
git cat-file commit HEAD >anotherpick_msg &&
git cat-file commit HEAD~1 >picked_msg &&
git cat-file commit HEAD~2 >unrelatedpick_msg &&
git cat-file commit HEAD~3 >initial_msg &&
! grep "Signed-off-by:" initial_msg &&
grep "Signed-off-by:" unrelatedpick_msg &&
! grep "Signed-off-by:" picked_msg &&
grep "Signed-off-by:" anotherpick_msg
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
d310f74 anotherpick
775318b picked
HEAD is now at df2a63d initial
[detached HEAD 9b2cda6] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD f7bab3d] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD cf7cfba] anotherpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: C O Mitter <committer@example.com>
Signed-off-by: C O Mitter <committer@example.com>
not ok 42 - --signoff is automatically propagated to resolved conflict # TODO known breakage
checking known breakage:
pristine_detach initial &&
test_must_fail git cherry-pick -s picked anotherpick &&
echo c >foo &&
git add foo &&
git cherry-pick --continue &&
git diff --exit-code HEAD &&
test_cmp_rev initial HEAD^^ &&
git cat-file commit HEAD^ >msg &&
! grep Signed-off-by: msg
Warning: you are leaving 3 commits behind, not connected to
any of your branches:
cf7cfba anotherpick
f7bab3d picked
9b2cda6 unrelatedpick
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD c80a680] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD d9a8514] anotherpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: C O Mitter <committer@example.com>
not ok 43 - --signoff dropped for implicit commit of resolution, multi-pick case # TODO known breakage
checking known breakage:
pristine_detach initial &&
test_must_fail git cherry-pick -s picked &&
echo c >foo &&
git add foo &&
git cherry-pick --continue &&
git diff --exit-code HEAD &&
test_cmp_rev initial HEAD^ &&
git cat-file commit HEAD >msg &&
! grep Signed-off-by: msg
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
d9a8514 anotherpick
c80a680 picked
HEAD is now at df2a63d initial
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD c80a680] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: C O Mitter <committer@example.com>
not ok 44 - sign-off needs to be reaffirmed after conflict resolution, single-pick case # TODO known breakage
expecting success:
pristine_detach initial &&
test_expect_code 1 git cherry-pick base..anotherpick &&
echo "resolved" >foo &&
git add foo &&
git commit &&
sed "s/pick /pick/" .git/sequencer/todo >new_sheet &&
cp new_sheet .git/sequencer/todo &&
test_expect_code 128 git cherry-pick --continue
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
c80a680 picked
HEAD is now at df2a63d initial
[detached HEAD c738c4d] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 9781982] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
error: missing arguments for pick
error: invalid line 1: pickfdc0b12 picked
error: missing arguments for pick
error: invalid line 2: pick965fed4 anotherpick
error: unusable instruction sheet: '.git/sequencer/todo'
fatal: cherry-pick failed
ok 45 - malformed instruction sheet 1
expecting success:
pristine_detach initial &&
test_expect_code 1 git cherry-pick base..anotherpick &&
echo "resolved" >foo &&
git add foo &&
git commit &&
sed "s/pick/revert/" .git/sequencer/todo >new_sheet &&
cp new_sheet .git/sequencer/todo &&
test_expect_code 128 git cherry-pick --continue
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
9781982 picked
c738c4d unrelatedpick
HEAD is now at df2a63d initial
[detached HEAD c738c4d] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 9781982] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
error: cannot cherry-pick during a revert.
fatal: cherry-pick failed
ok 46 - malformed instruction sheet 2
expecting success:
pristine_detach initial &&
test_expect_code 128 git cherry-pick base..base
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
9781982 picked
c738c4d unrelatedpick
HEAD is now at df2a63d initial
error: empty commit set passed
fatal: cherry-pick failed
ok 47 - empty commit set (no commits to walk)
expecting success:
pristine_detach initial &&
test_expect_code 128 git cherry-pick -2 --author=no.such.author base
HEAD is now at df2a63d initial
error: empty commit set passed
fatal: cherry-pick failed
ok 48 - empty commit set (culled during walk)
expecting success:
pristine_detach initial &&
test_expect_code 1 git cherry-pick base..anotherpick &&
echo "resolved" >foo &&
git add foo &&
git commit &&
sed "s/pick \([0-9a-f]*\)/pick $_r10/" .git/sequencer/todo >new_sheet &&
cp new_sheet .git/sequencer/todo &&
test_expect_code 128 git cherry-pick --continue
HEAD is now at df2a63d initial
[detached HEAD c738c4d] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 9781982] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
error: could not parse 'picked
pick 965fed4965fed4965fed4965fed4965fed4965fed4965fed4965fed4965fed4965fed4 anotherpick
'
error: invalid line 1: pick fdc0b12fdc0b12fdc0b12fdc0b12fdc0b12fdc0b12fdc0b12fdc0b12fdc0b12fdc0b12 picked
error: could not parse 'anotherpick
'
error: invalid line 2: pick 965fed4965fed4965fed4965fed4965fed4965fed4965fed4965fed4965fed4965fed4 anotherpick
error: unusable instruction sheet: '.git/sequencer/todo'
fatal: cherry-pick failed
ok 49 - malformed instruction sheet 3
expecting success:
pristine_detach initial &&
test_expect_code 1 git cherry-pick base..anotherpick &&
echo "c" >foo &&
git add foo &&
git commit &&
sed "s/pick \([0-9a-f]*\)/pick \1 /" .git/sequencer/todo >new_sheet &&
cp new_sheet .git/sequencer/todo &&
git cherry-pick --continue
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
9781982 picked
c738c4d unrelatedpick
HEAD is now at df2a63d initial
[detached HEAD c738c4d] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 43fe10f] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD 3b1768d] anotherpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 50 - instruction sheet, fat-fingers version
expecting success:
pristine_detach initial &&
test_expect_code 1 git cherry-pick base..anotherpick &&
echo "c" >foo &&
git add foo &&
git commit &&
cut -d" " -f1,2 .git/sequencer/todo >new_sheet &&
cp new_sheet .git/sequencer/todo &&
git cherry-pick --continue &&
test_path_is_missing .git/sequencer &&
git rev-list HEAD >commits &&
test_line_count = 4 commits
Warning: you are leaving 3 commits behind, not connected to
any of your branches:
3b1768d anotherpick
43fe10f picked
c738c4d unrelatedpick
HEAD is now at df2a63d initial
[detached HEAD c738c4d] unrelatedpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply fdc0b12... picked
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
[detached HEAD 43fe10f] picked
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD 3b1768d] anotherpick
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 51 - commit descriptions in insn sheet are optional
# still have 3 known breakage(s)
# passed all remaining 48 test(s)
1..51
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3700-add.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3700-add/.git/
expecting success: touch foo && git add foo
ok 1 - Test of git add
expecting success: git ls-files foo | grep foo
foo
ok 2 - Post-check that foo is in the index
expecting success: touch -- -q && git add -- -q
ok 3 - Test that "git add -- -q" works
expecting success: git config core.filemode 0 &&
echo foo >xfoo1 &&
chmod 755 xfoo1 &&
git add xfoo1 &&
test_mode_in_index 100644 xfoo1
pass
ok 4 - git add: Test that executable bit is not used if core.filemode=0
expecting success:
rm -f xfoo1 &&
test_ln_s_add foo xfoo1 &&
test_mode_in_index 120000 xfoo1
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
pass
ok 5 - git add: filemode=0 should not get confused by symlink
expecting success: git config core.filemode 0 &&
echo foo >xfoo2 &&
chmod 755 xfoo2 &&
git update-index --add xfoo2 &&
test_mode_in_index 100644 xfoo2
pass
ok 6 - git update-index --add: Test that executable bit is not used...
expecting success:
rm -f xfoo2 &&
test_ln_s_add foo xfoo2 &&
test_mode_in_index 120000 xfoo2
pass
ok 7 - git add: filemode=0 should not get confused by symlink
expecting success: git config core.filemode 0 &&
test_ln_s_add xfoo2 xfoo3 && # runs git update-index --add
test_mode_in_index 120000 xfoo3
pass
ok 8 - git update-index --add: Test that executable bit is not used...
expecting success:
echo "*.ig" >.gitignore &&
mkdir c.if d.ig &&
>a.ig && >b.if &&
>c.if/c.if && >c.if/c.ig &&
>d.ig/d.if && >d.ig/d.ig
ok 9 - .gitignore test setup
expecting success:
git add . &&
! (git ls-files | grep "\\.ig")
ok 10 - .gitignore is honored
expecting success:
test_must_fail git add a.?? &&
! (git ls-files | grep "\\.ig")
The following paths are ignored by one of your .gitignore files:
a.ig
Use -f if you really want to add them.
ok 11 - error out when attempting to add ignored ones without -f
expecting success:
test_must_fail git add d.?? &&
! (git ls-files | grep "\\.ig")
The following paths are ignored by one of your .gitignore files:
d.ig
Use -f if you really want to add them.
ok 12 - error out when attempting to add ignored ones without -f
expecting success:
touch a.if &&
test_must_fail git add a.?? &&
! (git ls-files | grep "\\.ig") &&
(git ls-files | grep a.if)
The following paths are ignored by one of your .gitignore files:
a.ig
Use -f if you really want to add them.
a.if
ok 13 - error out when attempting to add ignored ones but add others
expecting success:
git add -f a.?? &&
git ls-files --error-unmatch a.ig
a.ig
ok 14 - add ignored ones with -f
expecting success:
git add -f d.??/* &&
git ls-files --error-unmatch d.ig/d.if d.ig/d.ig
d.ig/d.if
d.ig/d.ig
ok 15 - add ignored ones with -f
expecting success:
rm -f .git/index &&
git add -f d.?? &&
git ls-files --error-unmatch d.ig/d.if d.ig/d.ig
d.ig/d.if
d.ig/d.ig
ok 16 - add ignored ones with -f
expecting success:
rm -f .git/index &&
mkdir -p sub/dir &&
echo "!dir/a.*" >sub/.gitignore &&
>sub/a.ig &&
>sub/dir/a.ig &&
git add sub/dir &&
git ls-files --error-unmatch sub/dir/a.ig &&
rm -f .git/index &&
(
cd sub/dir &&
git add .
) &&
git ls-files --error-unmatch sub/dir/a.ig
sub/dir/a.ig
sub/dir/a.ig
ok 17 - .gitignore with subdirectory
expecting success:
rm -f .git/index &&
git add 1/2/a 1/3/b 1/2/c
ok 18 - check correct prefix detection
expecting success:
for s in 1 2 3
do
echo $s > stage$s
echo "100755 $(git hash-object -w stage$s) $s file"
echo "120000 $(printf $s | git hash-object -w -t blob --stdin) $s symlink"
done | git update-index --index-info &&
git config core.filemode 0 &&
git config core.symlinks 0 &&
echo new > file &&
echo new > symlink &&
git add file symlink &&
git ls-files --stage | grep "^100755 .* 0 file$" &&
git ls-files --stage | grep "^120000 .* 0 symlink$"
100755 3e757656cf36eca53338e520d134963a44f793f8 0 file
120000 3e757656cf36eca53338e520d134963a44f793f8 0 symlink
ok 19 - git add with filemode=0, symlinks=0, and unmerged entries
expecting success:
git rm --cached -f file symlink &&
(
echo "100644 $(git hash-object -w stage1) 1 file" &&
echo "100755 $(git hash-object -w stage2) 2 file" &&
echo "100644 $(printf 1 | git hash-object -w -t blob --stdin) 1 symlink" &&
echo "120000 $(printf 2 | git hash-object -w -t blob --stdin) 2 symlink"
) | git update-index --index-info &&
git config core.filemode 0 &&
git config core.symlinks 0 &&
echo new > file &&
echo new > symlink &&
git add file symlink &&
git ls-files --stage | grep "^100755 .* 0 file$" &&
git ls-files --stage | grep "^120000 .* 0 symlink$"
rm 'file'
rm 'symlink'
100755 3e757656cf36eca53338e520d134963a44f793f8 0 file
120000 3e757656cf36eca53338e520d134963a44f793f8 0 symlink
ok 20 - git add with filemode=0, symlinks=0 prefers stage 2 over stage 1
expecting success:
>foo && git add foo && git commit -a -m "commit all" &&
test -z "$(git diff-index HEAD -- foo)" &&
git read-tree HEAD &&
case "$(git diff-index HEAD -- foo)" in
:100644" "*"M foo") echo pass;;
*) echo fail; (exit 1);;
esac &&
git add --refresh -- foo &&
test -z "$(git diff-index HEAD -- foo)"
[master (root-commit) 5a84c59] commit all
Author: A U Thor <author@example.com>
6 files changed, 2 insertions(+)
create mode 100644 1/2/a
create mode 100644 1/2/c
create mode 100644 1/3/b
create mode 100755 file
create mode 100644 foo
create mode 120000 symlink
pass
ok 21 - git add --refresh
expecting success:
git reset --hard &&
echo >foo && echo >bar && echo >baz &&
git add foo bar baz && H=$(git rev-parse :foo) && git rm -f foo &&
echo "100644 $H 3 foo" | git update-index --index-info &&
test-tool chmtime -60 bar baz &&
git add --refresh bar >actual &&
test_must_be_empty actual &&
git diff-files --name-only >actual &&
! grep bar actual&&
grep baz actual
HEAD is now at 5a84c59 commit all
rm 'foo'
baz
ok 22 - git add --refresh with pathspec
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 -r SANETESTD.1/x &&
chmod -rx SANETESTD.2 ||
BUG "cannot prepare SANETESTD"
! test -r SANETESTD.1/x &&
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
BUG "cannot clean SANETESTD"
return $status
)
rm: cannot remove 'SANETESTD.1/x': Permission denied
prerequisite SANITY ok
expecting success:
git reset --hard &&
date >foo1 &&
date >foo2 &&
chmod 0 foo2 &&
test_must_fail git add --verbose . &&
! ( git ls-files foo1 | grep foo1 )
HEAD is now at 5a84c59 commit all
error: open("foo2"): Permission denied
error: unable to index file 'foo2'
fatal: adding files failed
add '-q'
add '.gitignore'
add 'a.if'
add 'actual'
add 'b.if'
add 'c.if/c.if'
add 'foo1'
ok 23 - git add should fail atomically upon an unreadable file
expecting success:
git reset --hard &&
date >foo1 &&
date >foo2 &&
chmod 0 foo2 &&
test_must_fail git add --verbose --ignore-errors . &&
git ls-files foo1 | grep foo1
HEAD is now at 5a84c59 commit all
error: open("foo2"): Permission denied
error: unable to index file 'foo2'
add '-q'
add '.gitignore'
add 'a.if'
add 'actual'
add 'b.if'
add 'c.if/c.if'
add 'foo1'
add 'stage1'
add 'stage2'
add 'stage3'
add 'sub/.gitignore'
add 'sub/dir/a.ig'
add 'xfoo1'
add 'xfoo2'
add 'xfoo3'
foo1
ok 24 - git add --ignore-errors
expecting success:
git config add.ignore-errors 1 &&
git reset --hard &&
date >foo1 &&
date >foo2 &&
chmod 0 foo2 &&
test_must_fail git add --verbose . &&
git ls-files foo1 | grep foo1
HEAD is now at 5a84c59 commit all
error: open("foo2"): Permission denied
error: unable to index file 'foo2'
add 'a.ig'
add 'c.if/c.ig'
add 'd.ig/d.if'
add 'd.ig/d.ig'
add 'foo1'
add 'sub/a.ig'
foo1
ok 25 - git add (add.ignore-errors)
expecting success:
git config add.ignore-errors 0 &&
git reset --hard &&
date >foo1 &&
date >foo2 &&
chmod 0 foo2 &&
test_must_fail git add --verbose . &&
! ( git ls-files foo1 | grep foo1 )
HEAD is now at 5a84c59 commit all
error: open("foo2"): Permission denied
error: unable to index file 'foo2'
fatal: adding files failed
add 'foo1'
ok 26 - git add (add.ignore-errors = false)
expecting success:
git config add.ignore-errors 1 &&
git reset --hard &&
date >foo1 &&
date >foo2 &&
chmod 0 foo2 &&
test_must_fail git add --verbose --no-ignore-errors . &&
! ( git ls-files foo1 | grep foo1 ) &&
git config add.ignore-errors 0
HEAD is now at 5a84c59 commit all
error: open("foo2"): Permission denied
error: unable to index file 'foo2'
fatal: adding files failed
add 'foo1'
ok 27 - --no-ignore-errors overrides config
expecting success:
git reset --hard &&
touch fo\[ou\]bar foobar &&
git add 'fo\[ou\]bar' &&
git ls-files fo\[ou\]bar | fgrep fo\[ou\]bar &&
! ( git ls-files foobar | grep foobar )
HEAD is now at 5a84c59 commit all
fo[ou]bar
ok 28 - git add 'fo\[ou\]bar' ignores foobar
expecting success:
git reset --hard &&
H=$(git rev-parse :1/2/a) &&
(
echo "100644 $H 1 track-this" &&
echo "100644 $H 3 track-this"
) | git update-index --index-info &&
echo track-this >>.gitignore &&
echo resolved >track-this &&
git add track-this
HEAD is now at 5a84c59 commit all
ok 29 - git add to resolve conflicts on otherwise ignored path
expecting success:
test_must_fail git add non-existent &&
! (git ls-files | grep "non-existent")
fatal: pathspec 'non-existent' did not match any files
ok 30 - "add non-existent" should fail
expecting success:
rm -fr empty &&
git init empty &&
(
cd empty &&
git add -A . &&
git add -A
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3700-add/empty/.git/
ok 31 - git add -A on empty repo does not error out
expecting success:
rm -fr empty &&
git init empty &&
(
cd empty &&
git add .
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3700-add/empty/.git/
ok 32 - "git add ." in empty repo
expecting success:
rm -fr empty &&
git init empty &&
test_must_fail git add empty >actual 2>&1 &&
cat >expect <<-EOF &&
error: 'empty/' does not have a commit checked out
fatal: adding files failed
EOF
test_i18ncmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3700-add/empty/.git/
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 33 - error on a repository with no commits
expecting success:
echo new >>track-this &&
git add --dry-run track-this >actual 2>&1 &&
echo "add 'track-this'" | test_cmp - actual
ok 34 - git add --dry-run of existing changed file
expecting success:
echo ignored-file >>.gitignore &&
test_must_fail git add --dry-run track-this ignored-file >actual 2>&1
ok 35 - git add --dry-run of non-existing file
expecting success:
echo "fatal: pathspec 'ignored-file' did not match any files" >expect &&
test_i18ncmp expect actual
ok 36 - git add --dry-run of an existing file output
expecting success:
test_must_fail git add --dry-run --ignore-missing track-this ignored-file >actual.out 2>actual.err
ok 37 - git add --dry-run --ignore-missing of non-existing file
expecting success:
test_i18ncmp expect.out actual.out &&
test_i18ncmp expect.err actual.err
ok 38 - git add --dry-run --ignore-missing of non-existing file output
expecting success:
test_must_fail git add ""
fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
ok 39 - git add empty string should fail
expecting success:
rm -f foo1 &&
echo foo >foo1 &&
git add --chmod=+x foo1 &&
test_mode_in_index 100755 foo1 &&
git add --chmod=-x foo1 &&
test_mode_in_index 100644 foo1
pass
pass
ok 40 - git add --chmod=[+-]x stages correctly
expecting success:
git config core.filemode 1 &&
git config core.symlinks 1 &&
rm -f foo2 &&
echo foo >foo2 &&
git add --chmod=+x foo2 &&
test_mode_in_index 100755 foo2
pass
ok 41 - git add --chmod=+x with symlinks
expecting success:
rm -f foo3 xfoo3 &&
git reset --hard &&
echo foo >foo3 &&
git add foo3 &&
git add --chmod=+x foo3 &&
test_mode_in_index 100755 foo3 &&
echo foo >xfoo3 &&
chmod 755 xfoo3 &&
git add xfoo3 &&
git add --chmod=-x xfoo3 &&
test_mode_in_index 100644 xfoo3
HEAD is now at 5a84c59 commit all
pass
pass
ok 42 - git add --chmod=[+-]x changes index with already added file
expecting success:
echo foo >foo4 &&
git add foo4 &&
git add --chmod=+x foo4 &&
! test -x foo4
ok 43 - git add --chmod=[+-]x does not change the working tree
expecting success:
>foo5 &&
>foo6 &&
git add foo5 foo6 &&
git add --chmod=+x &&
test_mode_in_index 100644 foo5 &&
test_mode_in_index 100644 foo6
Nothing specified, nothing added.
Maybe you wanted to say 'git add .'?
pass
pass
ok 44 - no file status change if no pathspec is given
expecting success:
mkdir -p sub &&
(
cd sub &&
>sub-foo1 &&
>sub-foo2 &&
git add . &&
git add --chmod=+x &&
test_mode_in_index 100644 sub-foo1 &&
test_mode_in_index 100644 sub-foo2
)
Nothing specified, nothing added.
Maybe you wanted to say 'git add .'?
pass
pass
ok 45 - no file status change if no pathspec is given in subdir
expecting success:
rm -fr empty &&
git add --chmod=+x . &&
test $(git ls-files --stage | grep ^100644 | wc -l) -eq 0 &&
git add --chmod=-x . &&
test $(git ls-files --stage | grep ^100755 | wc -l) -eq 0
cannot chmod +x 'symlink'
cannot chmod -x 'symlink'
ok 46 - all statuses changed in folder if . is given
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
)
prerequisite CASE_INSENSITIVE_FS not satisfied
skipping test: path is case-insensitive
path="$(pwd)/BLUB" &&
touch "$path" &&
downcased="$(echo "$path" | tr A-Z a-z)" &&
git add "$downcased"
ok 47 # skip path is case-insensitive (missing CASE_INSENSITIVE_FS)
# passed all 47 test(s)
1..47
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3512-cherry-pick-submodule.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/.git/
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
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1/.git/
[master (root-commit) 60526db] Base inside first submodule
Author: A U Thor <author@example.com>
3 files changed, 4 insertions(+)
create mode 100644 .gitignore
create mode 100644 file1
create mode 100644 file2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub2/.git/
[master (root-commit) 5a8f25f] nested submodule 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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_repo/.git/
[master (root-commit) 5bd1541] 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
Switched to a new branch 'add_sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_repo/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_repo/uninitialized_sub'...
done.
[add_sub1 6ebff1b] Add sub1
Author: A U Thor <author@example.com>
2 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 uninitialized_sub
Switched to a new branch 'remove_sub1'
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
[remove_sub1 91c3b89] Revert "Add sub1"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:03 2019 +0000
3 files changed, 9 deletions(-)
delete mode 100644 .gitmodules
delete mode 160000 sub1
delete mode 160000 uninitialized_sub
Switched to a new branch 'modify_sub1'
Switched to a new branch 'modifications'
[modifications 7205111] modified file2 and added file3
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 file3
To /<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1
* [new branch] modifications -> modifications
[modify_sub1 5a80850] Modify sub1
Author: A U Thor <author@example.com>
Switched to a new branch 'add_nested_sub'
Switched to a new branch 'add_nested_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_repo/sub1/sub2'...
done.
[add_nested_sub b5f08d1] add a nested submodule
Author: A U Thor <author@example.com>
2 files changed, 5 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub2
[add_nested_sub e6d6857] update submodule, that updates a nested submodule
Author: A U Thor <author@example.com>
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
[modify_sub1_recursively eabbc69] make a change in nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
[modify_sub1_recursively 1eb03c5] update nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[modify_sub1_recursively f002577] update sub1, that updates nested sub
Author: A U Thor <author@example.com>
To /<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
To /<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub2
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
Cleared directory 'sub2'
Submodule 'sub2' (../submodule_update_sub2) unregistered for path 'sub2'
Switched to a new branch 'replace_sub1_with_directory'
Submodule path 'sub1': checked out '60526db92e1317b64d4b7011c9c104f8ddaf492f'
Previous HEAD position was 60526db Base inside first submodule
Switched to branch 'modifications'
rm 'sub1'
[replace_sub1_with_directory 7e9cb0e] 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
Switched to a new branch 'replace_directory_with_sub1'
Removing sub1/file3
Removing sub1/file2
Removing sub1/file1
Adding sub1
[replace_directory_with_sub1 ff79afe] Revert "Replace sub1 with directory"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:06 2019 +0000
4 files changed, 4 insertions(+), 3 deletions(-)
delete mode 100644 sub1/file1
delete mode 100644 sub1/file2
delete mode 100644 sub1/file3
Switched to a new branch 'replace_sub1_with_file'
rm 'sub1'
[replace_sub1_with_file 683805d] 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'
[replace_file_with_sub1 9bbd533] Revert "Replace sub1 with file"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:06 2019 +0000
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
Switched to a new branch 'invalid_sub1'
[invalid_sub1 a2f7c78] Invalid sub1 commit
Author: A U Thor <author@example.com>
Switched to a new branch 'valid_sub1'
[valid_sub1 3644fa5] Revert "Invalid sub1 commit"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:06 2019 +0000
warning: unable to rmdir 'uninitialized_sub': Directory not empty
Switched to branch 'master'
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
[no_submodule 9013193] Add sub1
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:03 2019 +0000
2 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 uninitialized_sub
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '60526db92e1317b64d4b7011c9c104f8ddaf492f'
Submodule path 'uninitialized_sub': checked out '60526db92e1317b64d4b7011c9c104f8ddaf492f'
ok 1 - git cherry-pick: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
[no_submodule 2548cf3] Add sub1
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:03 2019 +0000
2 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 uninitialized_sub
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '60526db92e1317b64d4b7011c9c104f8ddaf492f'
Submodule path 'uninitialized_sub': checked out '60526db92e1317b64d4b7011c9c104f8ddaf492f'
ok 2 - git cherry-pick: added submodule leaves existing empty directory alone
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
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
[replace_sub1_with_file 2da7b1f] Revert "Replace sub1 with file"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:06 2019 +0000
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '60526db92e1317b64d4b7011c9c104f8ddaf492f'
Submodule path 'uninitialized_sub': checked out '60526db92e1317b64d4b7011c9c104f8ddaf492f'
ok 3 - git cherry-pick: replace tracked file with submodule creates empty directory
checking known breakage:
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
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Removing sub1/file3
Removing sub1/file2
Removing sub1/file1
Adding sub1
[replace_sub1_with_directory fd72828] Revert "Replace sub1 with directory"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:06 2019 +0000
4 files changed, 4 insertions(+), 3 deletions(-)
delete mode 100644 sub1/file1
delete mode 100644 sub1/file2
delete mode 100644 sub1/file3
Directory sub1 doesn't exist.
not ok 4 - git cherry-pick: replace directory with submodule # TODO known breakage
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '60526db92e1317b64d4b7011c9c104f8ddaf492f'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
[add_sub1 fe05ca2] Revert "Add sub1"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:03 2019 +0000
3 files changed, 9 deletions(-)
delete mode 100644 .gitmodules
delete mode 160000 sub1
delete mode 160000 uninitialized_sub
ok 5 - git cherry-pick: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '60526db92e1317b64d4b7011c9c104f8ddaf492f'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
[add_sub1 aad8c7e] Revert "Add sub1"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:03 2019 +0000
3 files changed, 9 deletions(-)
delete mode 100644 .gitmodules
delete mode 160000 sub1
delete mode 160000 uninitialized_sub
ok 6 - git cherry-pick: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '60526db92e1317b64d4b7011c9c104f8ddaf492f'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: refusing to lose untracked file at 'sub1/file2'
error: refusing to lose untracked file at 'sub1/file1'
Adding sub1/file3
Adding sub1/file2
Adding sub1/file1
Removing sub1
[add_sub1 99a1873] Replace sub1 with directory
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:06 2019 +0000
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
test_must_fail: command succeeded: git cherry-pick replace_sub1_with_directory
not ok 7 - git cherry-pick: replace submodule with a directory must fail # TODO known breakage
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 &&
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '60526db92e1317b64d4b7011c9c104f8ddaf492f'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: refusing to lose untracked file at 'sub1/file2'
error: refusing to lose untracked file at 'sub1/file1'
Adding sub1/file3
Adding sub1/file2
Adding sub1/file1
Removing sub1
[add_sub1 3133ff0] Replace sub1 with directory
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:06 2019 +0000
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
test_must_fail: command succeeded: git cherry-pick replace_sub1_with_directory
not ok 8 - git cherry-pick: replace submodule containing a .git directory with a directory 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 &&
test_must_fail $command replace_sub1_with_file &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '60526db92e1317b64d4b7011c9c104f8ddaf492f'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
[add_sub1 4c5d823] Replace sub1 with file
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:06 2019 +0000
2 files changed, 1 insertion(+), 5 deletions(-)
mode change 160000 => 100644 sub1
test_must_fail: command succeeded: git cherry-pick replace_sub1_with_file
not ok 9 - git cherry-pick: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '60526db92e1317b64d4b7011c9c104f8ddaf492f'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
[add_sub1 aee9753] Replace sub1 with file
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:06 2019 +0000
2 files changed, 1 insertion(+), 5 deletions(-)
mode change 160000 => 100644 sub1
test_must_fail: command succeeded: git cherry-pick replace_sub1_with_file
not ok 10 - git cherry-pick: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '60526db92e1317b64d4b7011c9c104f8ddaf492f'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
[add_sub1 2b8f54b] Modify sub1
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:04 2019 +0000
Submodule path 'sub1': checked out '72051113e4cb5ce1612b4502048c57d8598d59cc'
ok 11 - git cherry-pick: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '60526db92e1317b64d4b7011c9c104f8ddaf492f'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
[add_sub1 772291e] Invalid sub1 commit
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:06 2019 +0000
error: Server does not allow request for unadvertised object 0123456789012345678901234567890123456789
Fetched in submodule path 'sub1', but it did not contain 0123456789012345678901234567890123456789. Direct fetching of that commit failed.
ok 12 - git cherry-pick: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
[invalid_sub1 701d0bb] Revert "Invalid sub1 commit"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:06 2019 +0000
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '60526db92e1317b64d4b7011c9c104f8ddaf492f'
Submodule path 'uninitialized_sub': checked out '60526db92e1317b64d4b7011c9c104f8ddaf492f'
ok 13 - git cherry-pick: 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 &&
>sub1 &&
test_must_fail $command add_sub1 &&
test_superproject_content origin/no_submodule &&
test_must_be_empty sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
error: The following untracked working tree files would be overwritten by merge:
sub1
Please move or remove them before you merge.
Aborting
error: merging of trees ec38489b3f8eda08fda17055ad272abc24bdf929 and 419a4c58d010c94c041df3be59cd15f2b69bbb41 failed
fatal: cherry-pick failed
ok 14 - git cherry-pick: added submodule doesn't remove untracked unignored file with same name
expecting success:
test_create_repo sub &&
touch sub/file &&
git -C sub add file &&
git -C sub commit -m "add a file in a submodule" &&
test_create_repo a_repo &&
(
cd a_repo &&
>a_file &&
git add a_file &&
git commit -m "add a file" &&
git branch test &&
git checkout test &&
mkdir sub &&
>sub/content &&
git add sub/content &&
git commit -m "add a regular folder with name sub" &&
echo "123" >a_file &&
git add a_file &&
git commit -m "modify a file" &&
git checkout master &&
git submodule add ../sub sub &&
git submodule update sub &&
git commit -m "add a submodule info folder with name sub" &&
git cherry-pick test
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/sub/.git/
[master (root-commit) 0a4bce5] add a file in a submodule
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.t3512-cherry-pick-submodule/a_repo/.git/
[master (root-commit) 5686ca4] add a file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a_file
Switched to branch 'test'
[test 69b0063] add a regular folder with name sub
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 sub/content
[test 305cead] modify a file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'master'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3512-cherry-pick-submodule/a_repo/sub'...
done.
[master 4c67f1f] add a submodule info folder with name sub
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub
Adding sub
[master 4dc4925] modify a file
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:19 2019 +0000
1 file changed, 1 insertion(+)
ok 15 - unrelated submodule/file conflict is ignored
# still have 5 known breakage(s)
# passed all remaining 10 test(s)
1..15
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3702-add-edit.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3702-add-edit/.git/
expecting success:
git add file &&
test_tick &&
git commit -m initial file
[master (root-commit) e055285] initial
Author: A U Thor <author@example.com>
1 file changed, 11 insertions(+)
create mode 100644 file
ok 1 - setup
expecting success:
cp second-part file &&
git add -e &&
test_cmp second-part file &&
test_cmp expected-patch orig-patch &&
git diff --cached >actual &&
grep -v index actual >out &&
test_cmp expected out
ok 2 - add -e
expecting success:
git reset --hard &&
echo change >>file &&
test_must_fail env GIT_EDITOR=false git add -e &&
test_expect_code 1 git diff --exit-code
HEAD is now at e055285 initial
error: There was a problem with the editor 'false'.
fatal: editing patch failed
diff --git a/file b/file
index b9834b5..cce9ee2 100644
--- a/file
+++ b/file
@@ -9,3 +9,4 @@ for he waxed under welkin, in wealth he throve,
till before him the folk, both far and near,
who house by the whale-path, heard his mandate,
gave him gifts: a good king he!
+change
ok 3 - add -e notices editor failure
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3703-add-magic-pathspec.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3703-add-magic-pathspec/.git/
expecting success:
mkdir sub anothersub &&
: >sub/foo &&
: >anothersub/foo
ok 1 - setup
expecting success:
cat >expected <<-EOF &&
add 'anothersub/foo'
add 'expected'
add 'sub/actual'
add 'sub/foo'
EOF
(cd sub && git add -n :/ >actual) &&
test_cmp expected sub/actual
ok 2 - add :/
expecting success:
(cd sub && git add -n :/anothersub >actual) &&
test_cmp expected sub/actual
ok 3 - add :/anothersub
expecting success:
(cd sub && test_must_fail git add -n :/non-existent)
fatal: pathspec ':/non-existent' did not match any files
ok 4 - add :/non-existent
expecting success:
: >":(icase)ha" &&
test_must_fail git add -n ":(icase)ha" &&
git add -n "./:(icase)ha"
fatal: pathspec ':(icase)ha' did not match any files
add ':(icase)ha'
ok 5 - a file with the same (long) magic name exists
expecting success:
: >":/bar" &&
test_must_fail git add -n :/bar &&
git add -n "./:/bar"
fatal: pathspec ':/bar' did not match any files
add ':/bar'
ok 6 - a file with the same (short) magic name exists
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3800-mktag.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3800-mktag/.git/
expecting success:
echo Hello >A &&
git update-index --add A &&
git commit -m "Initial commit" &&
head=$(git rev-parse --verify HEAD)
[master (root-commit) 08fcdd8] Initial commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A
ok 1 - setup
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: wanna fool me ? you obviously got the size wrong !
ok 2 - Tag object length check
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char0: does not start with "object "
ok 3 - "object" line label check
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char7: could not get SHA1 hash
ok 4 - "object" line SHA1 check
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char47: could not find "\ntype "
ok 5 - "type" line label check
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char48: could not find next "\n"
ok 6 - "type" line eol check
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char57: no "tag " found
ok 7 - "tag" line label check #1
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char87: no "tag " found
ok 8 - "tag" line label check #2
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char53: type too long
ok 9 - "type" line type-name length check
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char7: could not verify object 779e9b33986b1c2670fff52c5067603117b3e895
ok 10 - verify object (SHA1/type) check
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char67: could not verify tag name
ok 11 - verify tag-name check
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char70: could not find "tagger "
ok 12 - "tagger" line label check #1
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char70: could not find "tagger "
ok 13 - "tagger" line label check #2
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char77: missing tagger name
ok 14 - disallow missing tag author name
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char77: malformed tagger field
ok 15 - disallow malformed tagger
expecting success: git mktag <tag.sig >.git/refs/tags/mytag 2>message
ok 16 - allow empty tag email
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char77: malformed tagger field
ok 17 - disallow spaces in tag email
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char107: missing tag timestamp
ok 18 - disallow missing tag timestamp
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char107: missing tag timestamp
ok 19 - detect invalid tag timestamp1
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char111: malformed tag timestamp
ok 20 - detect invalid tag timestamp2
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char118: malformed tag timezone
ok 21 - detect invalid tag timezone1
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char118: malformed tag timezone
ok 22 - detect invalid tag timezone2
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char118: malformed tag timezone
ok 23 - detect invalid tag timezone3
expecting success:
( test_must_fail git mktag <tag.sig 2>message ) &&
grep "$expect" message
error: char124: trailing garbage in tag header
ok 24 - detect invalid header entry
expecting success: git mktag <tag.sig >.git/refs/tags/mytag 2>message
ok 25 - create valid tag
expecting success: git tag -l | grep mytag
mytag
ok 26 - check mytag
# passed all 26 test(s)
1..26
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3513-revert-submodule.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/.git/
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
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1/.git/
[master (root-commit) 8f21b44] Base inside first submodule
Author: A U Thor <author@example.com>
3 files changed, 4 insertions(+)
create mode 100644 .gitignore
create mode 100644 file1
create mode 100644 file2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub2/.git/
[master (root-commit) a4ff2c3] nested submodule 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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_repo/.git/
[master (root-commit) e845358] 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
Switched to a new branch 'add_sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_repo/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_repo/uninitialized_sub'...
done.
[add_sub1 ec1265e] Add sub1
Author: A U Thor <author@example.com>
2 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 uninitialized_sub
Switched to a new branch 'remove_sub1'
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
[remove_sub1 c0cf43c] Revert "Add sub1"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:07 2019 +0000
3 files changed, 9 deletions(-)
delete mode 100644 .gitmodules
delete mode 160000 sub1
delete mode 160000 uninitialized_sub
Switched to a new branch 'modify_sub1'
Switched to a new branch 'modifications'
[modifications 2c1e1e8] modified file2 and added file3
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 file3
To /<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1
* [new branch] modifications -> modifications
[modify_sub1 36ce7a1] Modify sub1
Author: A U Thor <author@example.com>
Switched to a new branch 'add_nested_sub'
Switched to a new branch 'add_nested_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_repo/sub1/sub2'...
done.
[add_nested_sub ec28d33] add a nested submodule
Author: A U Thor <author@example.com>
2 files changed, 5 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub2
[add_nested_sub a79ef12] update submodule, that updates a nested submodule
Author: A U Thor <author@example.com>
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
[modify_sub1_recursively ba05ce0] make a change in nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
[modify_sub1_recursively 5795343] update nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[modify_sub1_recursively dfa81ed] update sub1, that updates nested sub
Author: A U Thor <author@example.com>
To /<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
To /<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub2
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
Cleared directory 'sub2'
Submodule 'sub2' (../submodule_update_sub2) unregistered for path 'sub2'
Switched to a new branch 'replace_sub1_with_directory'
Submodule path 'sub1': checked out '8f21b44056f7f7d51a64531852d0e47d639fdb49'
Previous HEAD position was 8f21b44 Base inside first submodule
Switched to branch 'modifications'
rm 'sub1'
[replace_sub1_with_directory 5fc077d] 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
Switched to a new branch 'replace_directory_with_sub1'
Removing sub1/file3
Removing sub1/file2
Removing sub1/file1
Adding sub1
[replace_directory_with_sub1 0a19eab] Revert "Replace sub1 with directory"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:09 2019 +0000
4 files changed, 4 insertions(+), 3 deletions(-)
delete mode 100644 sub1/file1
delete mode 100644 sub1/file2
delete mode 100644 sub1/file3
Switched to a new branch 'replace_sub1_with_file'
rm 'sub1'
[replace_sub1_with_file 2bf1240] 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'
[replace_file_with_sub1 2977892] Revert "Replace sub1 with file"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:09 2019 +0000
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
Switched to a new branch 'invalid_sub1'
[invalid_sub1 ef9972c] Invalid sub1 commit
Author: A U Thor <author@example.com>
Switched to a new branch 'valid_sub1'
[valid_sub1 2b5984a] Revert "Invalid sub1 commit"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:09 2019 +0000
warning: unable to rmdir 'uninitialized_sub': Directory not empty
Switched to branch 'master'
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to branch 'add_sub1'
Your branch is up to date with 'origin/add_sub1'.
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
[add_sub1 0c2edaf] Revert "Add sub1"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:09 2019 +0000
3 files changed, 9 deletions(-)
delete mode 100644 .gitmodules
delete mode 160000 sub1
delete mode 160000 uninitialized_sub
[add_sub1 e8e731c] Revert "Revert "Add sub1""
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:09 2019 +0000
2 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 uninitialized_sub
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '8f21b44056f7f7d51a64531852d0e47d639fdb49'
Submodule path 'uninitialized_sub': checked out '8f21b44056f7f7d51a64531852d0e47d639fdb49'
ok 1 - git_revert: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to branch 'add_sub1'
Your branch is up to date with 'origin/add_sub1'.
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
[add_sub1 59937e9] Revert "Add sub1"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:11 2019 +0000
3 files changed, 9 deletions(-)
delete mode 100644 .gitmodules
delete mode 160000 sub1
delete mode 160000 uninitialized_sub
[add_sub1 6f0506a] Revert "Revert "Add sub1""
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:11 2019 +0000
2 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 uninitialized_sub
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '8f21b44056f7f7d51a64531852d0e47d639fdb49'
Submodule path 'uninitialized_sub': checked out '8f21b44056f7f7d51a64531852d0e47d639fdb49'
ok 2 - git_revert: added submodule leaves existing empty directory alone
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
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Switched to branch 'replace_file_with_sub1'
Your branch is up to date with 'origin/replace_file_with_sub1'.
[replace_file_with_sub1 18ede1c] Revert "Revert "Replace sub1 with file""
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:12 2019 +0000
2 files changed, 1 insertion(+), 5 deletions(-)
mode change 160000 => 100644 sub1
[replace_file_with_sub1 47290e2] Revert "Revert "Revert "Replace sub1 with file"""
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:12 2019 +0000
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '8f21b44056f7f7d51a64531852d0e47d639fdb49'
Submodule path 'uninitialized_sub': checked out '8f21b44056f7f7d51a64531852d0e47d639fdb49'
ok 3 - git_revert: replace tracked file with submodule creates empty directory
checking known breakage:
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
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Switched to branch 'replace_directory_with_sub1'
Your branch is up to date with 'origin/replace_directory_with_sub1'.
Adding sub1/file3
Adding sub1/file2
Adding sub1/file1
Removing sub1
[replace_directory_with_sub1 d7a6457] Revert "Revert "Replace sub1 with directory""
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:13 2019 +0000
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
Removing sub1/file3
Removing sub1/file2
Removing sub1/file1
Adding sub1
[replace_directory_with_sub1 0d45f77] Revert "Revert "Revert "Replace sub1 with directory"""
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:14 2019 +0000
4 files changed, 4 insertions(+), 3 deletions(-)
delete mode 100644 sub1/file1
delete mode 100644 sub1/file2
delete mode 100644 sub1/file3
Directory sub1 doesn't exist.
not ok 4 - git_revert: replace directory with submodule # TODO known breakage
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '8f21b44056f7f7d51a64531852d0e47d639fdb49'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Switched to branch 'remove_sub1'
Your branch is up to date with 'origin/remove_sub1'.
[remove_sub1 87a45ca] Revert "Revert "Add sub1""
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:15 2019 +0000
2 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 uninitialized_sub
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
[remove_sub1 a6744b6] Revert "Revert "Revert "Add sub1"""
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:15 2019 +0000
3 files changed, 9 deletions(-)
delete mode 100644 .gitmodules
delete mode 160000 sub1
delete mode 160000 uninitialized_sub
ok 5 - git_revert: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '8f21b44056f7f7d51a64531852d0e47d639fdb49'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Switched to branch 'remove_sub1'
Your branch is up to date with 'origin/remove_sub1'.
[remove_sub1 34fda77] Revert "Revert "Add sub1""
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:16 2019 +0000
2 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 uninitialized_sub
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
[remove_sub1 9a95402] Revert "Revert "Revert "Add sub1"""
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:16 2019 +0000
3 files changed, 9 deletions(-)
delete mode 100644 .gitmodules
delete mode 160000 sub1
delete mode 160000 uninitialized_sub
ok 6 - git_revert: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '8f21b44056f7f7d51a64531852d0e47d639fdb49'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: The following untracked working tree files would be overwritten by checkout:
sub1/file1
sub1/file2
Please move or remove them before you switch branches.
Aborting
ok 7 - git_revert: replace submodule with a directory must fail
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '8f21b44056f7f7d51a64531852d0e47d639fdb49'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: The following untracked working tree files would be overwritten by checkout:
sub1/file1
sub1/file2
Please move or remove them before you switch branches.
Aborting
ok 8 - git_revert: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '8f21b44056f7f7d51a64531852d0e47d639fdb49'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Switched to branch 'replace_sub1_with_file'
Your branch is up to date with 'origin/replace_sub1_with_file'.
[replace_sub1_with_file d2a1595] Revert "Replace sub1 with file"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:19 2019 +0000
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
[replace_sub1_with_file b91ff35] Revert "Revert "Replace sub1 with file""
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:19 2019 +0000
2 files changed, 1 insertion(+), 5 deletions(-)
mode change 160000 => 100644 sub1
test_must_fail: command succeeded: git_revert replace_sub1_with_file
not ok 9 - git_revert: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '8f21b44056f7f7d51a64531852d0e47d639fdb49'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Switched to branch 'replace_sub1_with_file'
Your branch is up to date with 'origin/replace_sub1_with_file'.
[replace_sub1_with_file 0216306] Revert "Replace sub1 with file"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:20 2019 +0000
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
[replace_sub1_with_file f8d4b6c] Revert "Revert "Replace sub1 with file""
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:20 2019 +0000
2 files changed, 1 insertion(+), 5 deletions(-)
mode change 160000 => 100644 sub1
test_must_fail: command succeeded: git_revert replace_sub1_with_file
not ok 10 - git_revert: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '8f21b44056f7f7d51a64531852d0e47d639fdb49'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Switched to branch 'modify_sub1'
Your branch is up to date with 'origin/modify_sub1'.
[modify_sub1 96c2d32] Revert "Modify sub1"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:21 2019 +0000
[modify_sub1 e204bdd] Revert "Revert "Modify sub1""
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:21 2019 +0000
Submodule path 'sub1': checked out '2c1e1e86b762f2b6d425b3ef8c35dfaf32b0676e'
ok 11 - git_revert: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '8f21b44056f7f7d51a64531852d0e47d639fdb49'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
Switched to branch 'invalid_sub1'
Your branch is up to date with 'origin/invalid_sub1'.
[invalid_sub1 0c9b92f] Revert "Invalid sub1 commit"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:22 2019 +0000
[invalid_sub1 33e2a67] Revert "Revert "Invalid sub1 commit""
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:22 2019 +0000
error: Server does not allow request for unadvertised object 0123456789012345678901234567890123456789
Fetched in submodule path 'sub1', but it did not contain 0123456789012345678901234567890123456789. Direct fetching of that commit failed.
ok 12 - git_revert: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Switched to branch 'valid_sub1'
Your branch is up to date with 'origin/valid_sub1'.
[valid_sub1 b4e8d1e] Revert "Revert "Invalid sub1 commit""
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:23 2019 +0000
[valid_sub1 6046ac3] Revert "Revert "Revert "Invalid sub1 commit"""
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:23 2019 +0000
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3513-revert-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '8f21b44056f7f7d51a64531852d0e47d639fdb49'
Submodule path 'uninitialized_sub': checked out '8f21b44056f7f7d51a64531852d0e47d639fdb49'
ok 13 - git_revert: 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 &&
>sub1 &&
test_must_fail $command add_sub1 &&
test_superproject_content origin/no_submodule &&
test_must_be_empty sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
error: The following untracked working tree files would be overwritten by checkout:
sub1
Please move or remove them before you switch branches.
Aborting
ok 14 - git_revert: added submodule doesn't remove untracked unignored file with same name
# still have 3 known breakage(s)
# passed all remaining 11 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3900-i18n-commit.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3900-i18n-commit/.git/
expecting success:
: >F &&
git add F &&
T=$(git write-tree) &&
C=$(git commit-tree $T <"$TEST_DIRECTORY"/t3900/1-UTF-8.txt) &&
git update-ref HEAD $C &&
git tag C0
ok 1 - setup
expecting success:
E=$(git cat-file commit C0 | sed -ne "s/^encoding //p") &&
test z = "z$E"
ok 2 - no encoding header for base case
expecting success:
echo UTF-16 >F &&
test_must_fail git commit -a -F "$TEST_DIRECTORY"/t3900/UTF-16.txt
error: a NUL byte in commit log message not allowed.
fatal: failed to write commit object
ok 3 - UTF-16 refused because of NULs
expecting success:
test_when_finished "rm -f \"\$HOME/stderr\" \"\$HOME/invalid\"" &&
echo "UTF-8 characters" >F &&
printf "Commit message\n\nInvalid surrogate:\355\240\200\n" \
>"$HOME/invalid" &&
git commit -a -F "$HOME/invalid" 2>"$HOME"/stderr &&
test_i18ngrep "did not conform" "$HOME"/stderr
[master 67fbb1f] Commit message
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Warning: commit message did not conform to UTF-8.
ok 4 - UTF-8 invalid characters refused
expecting success:
test_when_finished "rm -f \"\$HOME/stderr\" \"\$HOME/invalid\"" &&
rm -f "$HOME/stderr" "$HOME/invalid" &&
echo "UTF-8 overlong" >F &&
printf "\340\202\251ommit message\n\nThis is not a space:\300\240\n" \
>"$HOME/invalid" &&
git commit -a -F "$HOME/invalid" 2>"$HOME"/stderr &&
test_i18ngrep "did not conform" "$HOME"/stderr
[master cb8de9c] à©ommit message
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Warning: commit message did not conform to UTF-8.
ok 5 - UTF-8 overlong sequences rejected
expecting success:
test_when_finished "rm -f \"\$HOME/stderr\" \"\$HOME/invalid\"" &&
echo "UTF-8 non-character 1" >F &&
printf "Commit message\n\nNon-character:\364\217\277\276\n" \
>"$HOME/invalid" &&
git commit -a -F "$HOME/invalid" 2>"$HOME"/stderr &&
test_i18ngrep "did not conform" "$HOME"/stderr
[master 97efd12] Commit message
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Warning: commit message did not conform to UTF-8.
ok 6 - UTF-8 non-characters refused
expecting success:
test_when_finished "rm -f \"\$HOME/stderr\" \"\$HOME/invalid\"" &&
echo "UTF-8 non-character 2." >F &&
printf "Commit message\n\nNon-character:\357\267\220\n" \
>"$HOME/invalid" &&
git commit -a -F "$HOME/invalid" 2>"$HOME"/stderr &&
test_i18ngrep "did not conform" "$HOME"/stderr
[master 49d3004] Commit message
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Warning: commit message did not conform to UTF-8.
ok 7 - UTF-8 non-characters refused
expecting success:
git config i18n.commitencoding $H &&
git checkout -b $H C0 &&
echo $H >F &&
git commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt
Switched to a new branch 'ISO8859-1'
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 8 - ISO8859-1 setup
expecting success:
git config i18n.commitencoding $H &&
git checkout -b $H C0 &&
echo $H >F &&
git commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt
Switched to a new branch 'eucJP'
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 9 - eucJP setup
expecting success:
git config i18n.commitencoding $H &&
git checkout -b $H C0 &&
echo $H >F &&
git commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt
Switched to a new branch 'ISO-2022-JP'
[ISO-2022-JP 6cf561e] $B$O$l$R$[$U(B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 10 - ISO-2022-JP setup
expecting success:
E=$(git cat-file commit ISO8859-1 | sed -ne "s/^encoding //p") &&
test "z$E" = "zISO8859-1"
ok 11 - check encoding header for ISO8859-1
expecting success:
E=$(git cat-file commit eucJP | sed -ne "s/^encoding //p") &&
test "z$E" = "zeucJP"
ok 12 - check encoding header for eucJP
expecting success:
E=$(git cat-file commit ISO-2022-JP | sed -ne "s/^encoding //p") &&
test "z$E" = "zISO-2022-JP"
ok 13 - check encoding header for ISO-2022-JP
expecting success:
git config --unset-all i18n.commitencoding &&
if Z=$(git config --get-all i18n.commitencoding)
then
echo Oops, should have failed.
false
else
test z = "z$Z"
fi &&
git config i18n.commitencoding UTF-8
ok 14 - config to remove customization
expecting success:
compare_with ISO8859-1 "$TEST_DIRECTORY"/t3900/1-UTF-8.txt
ok 15 - ISO8859-1 should be shown in UTF-8 now
expecting success:
compare_with eucJP "$TEST_DIRECTORY"/t3900/2-UTF-8.txt
ok 16 - eucJP should be shown in UTF-8 now
expecting success:
compare_with ISO-2022-JP "$TEST_DIRECTORY"/t3900/2-UTF-8.txt
ok 17 - ISO-2022-JP should be shown in UTF-8 now
expecting success:
git config --unset-all i18n.commitencoding &&
if Z=$(git config --get-all i18n.commitencoding)
then
echo Oops, should have failed.
false
else
test z = "z$Z"
fi
ok 18 - config to add customization
expecting success:
git config i18n.commitencoding ISO8859-1 &&
compare_with ISO8859-1 "$TEST_DIRECTORY"/t3900/ISO8859-1.txt
ok 19 - ISO8859-1 should be shown in itself now
expecting success:
git config i18n.commitencoding eucJP &&
compare_with eucJP "$TEST_DIRECTORY"/t3900/eucJP.txt
ok 20 - eucJP should be shown in itself now
expecting success:
git config i18n.commitencoding ISO-2022-JP &&
compare_with ISO-2022-JP "$TEST_DIRECTORY"/t3900/ISO-2022-JP.txt
ok 21 - ISO-2022-JP should be shown in itself now
expecting success:
git config i18n.logoutputencoding UTF-8
ok 22 - config to tweak customization
expecting success:
compare_with ISO8859-1 "$TEST_DIRECTORY"/t3900/1-UTF-8.txt
ok 23 - ISO8859-1 should be shown in UTF-8 now
expecting success:
compare_with eucJP "$TEST_DIRECTORY"/t3900/2-UTF-8.txt
ok 24 - eucJP should be shown in UTF-8 now
expecting success:
compare_with ISO-2022-JP "$TEST_DIRECTORY"/t3900/2-UTF-8.txt
ok 25 - ISO-2022-JP should be shown in UTF-8 now
expecting success:
compare_with eucJP "$TEST_DIRECTORY"/t3900/eucJP.txt $ICONV
ok 26 - eucJP should be shown in eucJP now
expecting success:
compare_with ISO-2022-JP "$TEST_DIRECTORY"/t3900/eucJP.txt $ICONV
ok 27 - ISO-2022-JP should be shown in eucJP now
expecting success:
compare_with eucJP "$TEST_DIRECTORY"/t3900/ISO-2022-JP.txt $ICONV
ok 28 - eucJP should be shown in ISO-2022-JP now
expecting success:
compare_with ISO-2022-JP "$TEST_DIRECTORY"/t3900/ISO-2022-JP.txt $ICONV
ok 29 - ISO-2022-JP should be shown in ISO-2022-JP now
expecting success:
compare_with "--encoding=none ISO8859-1" "$TEST_DIRECTORY"/t3900/ISO8859-1.txt
ok 30 - No conversion with ISO8859-1
expecting success:
compare_with "--encoding=none eucJP" "$TEST_DIRECTORY"/t3900/eucJP.txt
ok 31 - No conversion with eucJP
expecting success:
compare_with "--encoding=none ISO-2022-JP" "$TEST_DIRECTORY"/t3900/ISO-2022-JP.txt
ok 32 - No conversion with ISO-2022-JP
expecting success:
git config i18n.commitencoding $H &&
git checkout -b $H-$flag C0 &&
echo $H >>F &&
git commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt &&
test_tick &&
echo intermediate stuff >>G &&
git add G &&
git commit -a -m "intermediate commit" &&
test_tick &&
echo $H $flag >>F &&
git commit -a --$flag HEAD~1 &&
E=$(git cat-file commit eucJP-fixup |
sed -ne "s/^encoding //p") &&
test "z$E" = "z$H" &&
git config --unset-all i18n.commitencoding &&
git rebase --autosquash -i HEAD^^^ &&
git log --oneline >actual &&
test_line_count = 3 actual
Switched to a new branch 'eucJP-fixup'
[eucJP-fixup 1872501] $B$O$l$R$[$U(B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[eucJP-fixup 4e05e40] intermediate commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 G
[eucJP-fixup cd7363b] fixup! $B$O$l$R$[$U(B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Rebasing (2/3)
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.
Rebasing (3/3)
Successfully rebased and updated refs/heads/eucJP-fixup.
ok 33 - commit --fixup with eucJP encoding
expecting success:
git config i18n.commitencoding $H &&
git checkout -b $H-$flag C0 &&
echo $H >>F &&
git commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt &&
test_tick &&
echo intermediate stuff >>G &&
git add G &&
git commit -a -m "intermediate commit" &&
test_tick &&
echo $H $flag >>F &&
git commit -a --$flag HEAD~1 &&
E=$(git cat-file commit ISO-2022-JP-squash |
sed -ne "s/^encoding //p") &&
test "z$E" = "z$H" &&
git config --unset-all i18n.commitencoding &&
git rebase --autosquash -i HEAD^^^ &&
git log --oneline >actual &&
test_line_count = 3 actual
Switched to a new branch 'ISO-2022-JP-squash'
[ISO-2022-JP-squash 2314cae] $B$O$l$R$[$U(B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[ISO-2022-JP-squash 5cc893a] intermediate commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 G
[ISO-2022-JP-squash 13d31e2] squash! $B$O$l$R$[$U(B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Rebasing (2/3)
[detached HEAD 9e53bef] $B$O$l$R$[$U(B
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 2 insertions(+)
Rebasing (3/3)
Successfully rebased and updated refs/heads/ISO-2022-JP-squash.
ok 34 - commit --squash with ISO-2022-JP encoding
# passed all 34 test(s)
1..34
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3902-quoted.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3902-quoted/.git/
expecting success:
mkdir "$FN" &&
for_each_name "echo initial >\"\$name\"" &&
git add . &&
git commit -q -m Initial &&
for_each_name "echo second >\"\$name\"" &&
git commit -a -m Second &&
for_each_name "echo modified >\"\$name\""
[master ecd7cc5] Second
Author: A U Thor <author@example.com>
11 files changed, 11 insertions(+), 11 deletions(-)
ok 1 - setup
expecting success:
cat >expect.quoted <<\EOF &&
Name
"Name and a\nLF"
"Name and an\tHT"
"Name\""
With SP in it
"\346\277\261\351\207\216\t\347\264\224"
"\346\277\261\351\207\216\n\347\264\224"
"\346\277\261\351\207\216 \347\264\224"
"\346\277\261\351\207\216\"\347\264\224"
"\346\277\261\351\207\216/file"
"\346\277\261\351\207\216\347\264\224"
EOF
cat >expect.raw <<\EOF
Name
"Name and a\nLF"
"Name and an\tHT"
"Name\""
With SP in it
"濱野\t純"
"濱野\n純"
濱野 純
"濱野\"純"
濱野/file
濱野純
EOF
ok 2 - setup expected files
expecting success:
git ls-files >current && test_cmp expect.quoted current
ok 3 - check fully quoted output from ls-files
expecting success:
git diff --name-only >current &&
test_cmp expect.quoted current
ok 4 - check fully quoted output from diff-files
expecting success:
git diff --name-only HEAD >current &&
test_cmp expect.quoted current
ok 5 - check fully quoted output from diff-index
expecting success:
git diff --name-only HEAD^ HEAD >current &&
test_cmp expect.quoted current
ok 6 - check fully quoted output from diff-tree
expecting success:
git ls-tree --name-only -r HEAD >current &&
test_cmp expect.quoted current
ok 7 - check fully quoted output from ls-tree
expecting success:
git config --bool core.quotepath false
ok 8 - setting core.quotepath
expecting success:
git ls-files >current && test_cmp expect.raw current
ok 9 - check fully quoted output from ls-files
expecting success:
git diff --name-only >current &&
test_cmp expect.raw current
ok 10 - check fully quoted output from diff-files
expecting success:
git diff --name-only HEAD >current &&
test_cmp expect.raw current
ok 11 - check fully quoted output from diff-index
expecting success:
git diff --name-only HEAD^ HEAD >current &&
test_cmp expect.raw current
ok 12 - check fully quoted output from diff-tree
expecting success:
git ls-tree --name-only -r HEAD >current &&
test_cmp expect.raw current
ok 13 - check fully quoted output from ls-tree
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3600-rm.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3600-rm/.git/
expecting success:
touch -- foo bar baz "space embedded" -q &&
git add -- foo bar baz "space embedded" -q &&
git commit -m "add normal files"
[master (root-commit) a78f7a2] add normal files
Author: A U Thor <author@example.com>
5 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 -q
create mode 100644 bar
create mode 100644 baz
create mode 100644 foo
create mode 100644 space embedded
ok 1 - Initialize test directory
checking prerequisite: FUNNYNAMES
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq !MINGW &&
touch -- \
"FUNNYNAMES tab embedded" \
"FUNNYNAMES \"quote embedded\"" \
"FUNNYNAMES newline
embedded" 2>/dev/null &&
rm -- \
"FUNNYNAMES tab embedded" \
"FUNNYNAMES \"quote embedded\"" \
"FUNNYNAMES newline
embedded" 2>/dev/null
)
prerequisite FUNNYNAMES ok
expecting success:
touch -- "tab embedded" "newline${LF}embedded" &&
git add -- "tab embedded" "newline${LF}embedded" &&
git commit -m "add files with tabs and newlines"
[master e9385d8] add files with tabs and newlines
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 "newline\nembedded"
create mode 100644 "tab\tembedded"
ok 2 - add files with funny names
expecting success:
test_path_is_file foo &&
git ls-files --error-unmatch foo
foo
ok 3 - Pre-check that foo exists and is in index before git rm foo
expecting success:
git rm --cached foo
rm 'foo'
ok 4 - Test that git rm foo succeeds
expecting success:
echo content >foo &&
git add foo &&
git rm --cached foo
rm 'foo'
ok 5 - Test that git rm --cached foo succeeds if the index matches the file
expecting success:
echo content >foo &&
git add foo &&
git commit -m foo &&
echo "other content" >foo &&
git rm --cached foo
[master 82c9dfe] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rm 'foo'
ok 6 - Test that git rm --cached foo succeeds if the index matches the file
expecting success:
echo content >foo &&
git add foo &&
git commit -m foo --allow-empty &&
echo "other content" >foo &&
git add foo &&
echo "yet another content" >foo &&
test_must_fail git rm --cached foo
[master 7e2894e] foo
Author: A U Thor <author@example.com>
error: the following file has staged content different from both the
file and the HEAD:
foo
(use -f to force removal)
ok 7 - Test that git rm --cached foo fails if the index matches neither the file nor HEAD
expecting success:
echo content >foo &&
git add foo &&
git commit -m foo --allow-empty &&
echo "other content" >foo &&
git add foo &&
echo "yet another content" >foo &&
git rm --cached -f foo
[master bd78d77] foo
Author: A U Thor <author@example.com>
rm 'foo'
ok 8 - Test that git rm --cached -f foo works in case where --cached only did not
expecting success:
test_path_is_file foo &&
test_must_fail git ls-files --error-unmatch foo
error: pathspec 'foo' did not match any file(s) known to git
Did you forget to 'git add'?
ok 9 - Post-check that foo exists but is not in index after git rm foo
expecting success:
test_path_is_file bar &&
git ls-files --error-unmatch bar
bar
ok 10 - Pre-check that bar exists and is in index before "git rm bar"
expecting success:
git rm bar
rm 'bar'
ok 11 - Test that "git rm bar" succeeds
expecting success:
test_path_is_missing bar &&
test_must_fail git ls-files --error-unmatch bar
error: pathspec 'bar' did not match any file(s) known to git
Did you forget to 'git add'?
ok 12 - Post-check that bar does not exist and is not in index after "git rm -f bar"
expecting success:
git rm -- -q
rm '-q'
ok 13 - Test that "git rm -- -q" succeeds (remove a file that looks like an option)
expecting success:
git rm -f "space embedded" "tab embedded" "newline${LF}embedded"
rm 'newline
embedded'
rm 'space embedded'
rm 'tab embedded'
ok 14 - Test that "git rm -f" succeeds with embedded space, tab, or newline characters.
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 -r SANETESTD.1/x &&
chmod -rx SANETESTD.2 ||
BUG "cannot prepare SANETESTD"
! test -r SANETESTD.1/x &&
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
BUG "cannot clean SANETESTD"
return $status
)
rm: cannot remove 'SANETESTD.1/x': Permission denied
prerequisite SANITY ok
expecting success:
test_when_finished "chmod 775 ." &&
chmod a-w . &&
test_must_fail git rm -f baz
fatal: git rm: 'baz': Permission denied
rm 'baz'
ok 15 - Test that "git rm -f" fails if its rm fails
expecting success:
git ls-files --error-unmatch baz
baz
ok 16 - When the rm in "git rm -f" fails, it should not remove the file from the index
expecting success:
git rm --ignore-unmatch nonexistent
ok 17 - Remove nonexistent file with --ignore-unmatch
expecting success:
echo frotz >test-file &&
git add test-file &&
git commit -m "add file for rm test" &&
git rm test-file >rm-output &&
test $(grep "^rm " rm-output | wc -l) = 1 &&
rm -f test-file rm-output &&
git commit -m "remove file from rm test"
[master a975982] add file for rm test
Author: A U Thor <author@example.com>
7 files changed, 1 insertion(+), 1 deletion(-)
delete mode 100644 -q
delete mode 100644 bar
delete mode 100644 foo
delete mode 100644 "newline\nembedded"
delete mode 100644 space embedded
delete mode 100644 "tab\tembedded"
create mode 100644 test-file
[master f52e658] remove file from rm test
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 test-file
ok 18 - "rm" command printed
expecting success:
echo frotz >test-file &&
git add test-file &&
git commit -m "add file for rm --quiet test" &&
git rm --quiet test-file >rm-output &&
test_must_be_empty rm-output &&
rm -f test-file rm-output &&
git commit -m "remove file from rm --quiet test"
[master dd386d3] add file for rm --quiet test
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 test-file
[master d3037a1] remove file from rm --quiet test
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 test-file
ok 19 - "rm" command suppressed with --quiet
expecting success:
git add foo baz &&
git ls-files --error-unmatch foo baz
baz
foo
ok 20 - Re-add foo and baz
expecting success:
echo >>foo &&
test_must_fail git rm foo baz &&
test_path_is_file foo &&
test_path_is_file baz &&
git ls-files --error-unmatch foo baz
error: the following file has staged content different from both the
file and the HEAD:
foo
(use -f to force removal)
baz
foo
ok 21 - Modify foo -- rm should refuse
expecting success:
git rm -f foo baz &&
test_path_is_missing foo &&
test_path_is_missing baz &&
test_must_fail git ls-files --error-unmatch foo &&
test_must_fail git ls-files --error-unmatch bar
rm 'baz'
rm 'foo'
error: pathspec 'foo' did not match any file(s) known to git
Did you forget to 'git add'?
error: pathspec 'bar' did not match any file(s) known to git
Did you forget to 'git add'?
ok 22 - Modified foo -- rm -f should work
expecting success:
echo frotz >foo &&
git checkout HEAD -- baz &&
git add foo baz &&
git ls-files --error-unmatch foo baz
baz
foo
ok 23 - Re-add foo and baz for HEAD tests
expecting success:
test_must_fail git rm foo baz &&
test_path_is_file foo &&
test_path_is_file baz &&
git ls-files --error-unmatch foo baz
error: the following file has changes staged in the index:
foo
(use --cached to keep the file, or -f to force removal)
baz
foo
ok 24 - foo is different in index from HEAD -- rm should refuse
expecting success:
git rm -f foo baz &&
test_path_is_missing foo &&
test_path_is_missing baz &&
test_must_fail git ls-files --error-unmatch foo &&
test_must_fail git ls-files --error-unmatch baz
rm 'baz'
rm 'foo'
error: pathspec 'foo' did not match any file(s) known to git
Did you forget to 'git add'?
error: pathspec 'baz' did not match any file(s) known to git
Did you forget to 'git add'?
ok 25 - but with -f it should work.
expecting success:
>empty &&
git add empty &&
echo content >empty &&
test_must_fail git rm --cached empty
error: the following file has staged content different from both the
file and the HEAD:
empty
(use -f to force removal)
ok 26 - refuse to remove cached empty file with modifications
expecting success:
echo content >intent-to-add &&
git add -N intent-to-add &&
git rm --cached intent-to-add
rm 'intent-to-add'
ok 27 - remove intent-to-add file without --force
expecting success:
mkdir -p frotz &&
echo qfwfq >frotz/nitfol &&
git add frotz &&
git commit -m "subdir test"
[master 6319bb2] subdir test
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
rename baz => empty (100%)
create mode 100644 frotz/nitfol
ok 28 - Recursive test setup
expecting success:
test_must_fail git rm frotz &&
test_path_is_dir frotz &&
test_path_is_file frotz/nitfol
fatal: not removing 'frotz' recursively without -r
ok 29 - Recursive without -r fails
expecting success:
echo qfwfq >>frotz/nitfol &&
test_must_fail git rm -r frotz &&
test_path_is_dir frotz &&
test_path_is_file frotz/nitfol
error: the following file has local modifications:
frotz/nitfol
(use --cached to keep the file, or -f to force removal)
ok 30 - Recursive with -r but dirty
expecting success:
git rm -f -r frotz &&
test_path_is_missing frotz/nitfol &&
test_path_is_missing frotz
rm 'frotz/nitfol'
ok 31 - Recursive with -r -f
expecting success:
test_must_fail git rm nonexistent
fatal: pathspec 'nonexistent' did not match any files
ok 32 - Remove nonexistent file returns nonzero exit status
expecting success:
mkdir repo &&
(
cd repo &&
git init &&
echo something >somefile &&
git add somefile &&
git commit -m "add a file" &&
(
cd .. &&
git --git-dir=repo/.git --work-tree=repo rm somefile
) &&
test_must_fail git ls-files --error-unmatch somefile
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3600-rm/repo/.git/
[master (root-commit) 425b1ff] add a file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 somefile
rm 'somefile'
error: pathspec 'somefile' did not match any file(s) known to git
Did you forget to 'git add'?
ok 33 - Call "rm" from outside the work tree
expecting success:
git reset --hard &&
test-tool chmtime -86400 frotz/nitfol &&
git rm frotz/nitfol &&
test_path_is_missing frotz/nitfol
HEAD is now at 6319bb2 subdir test
rm 'frotz/nitfol'
ok 34 - refresh index before checking if it is up-to-date
expecting success:
git reset -q --hard &&
test_when_finished "rm -f .git/index.lock && git reset -q --hard" &&
i=0 &&
while test $i -lt 12000
do
echo "100644 1234567890123456789012345678901234567890 0 some-file-$i"
i=$(( $i + 1 ))
done | git update-index --index-info &&
git rm -n "some-file-*" | : &&
test_path_is_missing .git/index.lock
ok 35 - choking "git rm" should not let it die with cruft
expecting success:
git reset -q --hard &&
test_when_finished "rm -f .git/index.lock msg && git reset -q --hard" &&
blob=$(echo blob | git hash-object -w --stdin) &&
for stage in 1 2 3
do
echo "100644 $blob $stage blob"
done | git update-index --index-info &&
git rm blob >msg 2>&1 &&
test_i18ngrep ! "needs merge" msg &&
test_must_fail git ls-files -s --error-unmatch blob
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: pathspec 'blob' did not match any file(s) known to git
Did you forget to 'git add'?
ok 36 - Resolving by removal is not a warning-worthy event
expecting success:
mkdir -p dir/subdir/subsubdir &&
echo content >dir/subdir/subsubdir/file &&
git add dir/subdir/subsubdir/file &&
git rm -f dir/subdir/subsubdir/file &&
test_path_is_missing dir
rm 'dir/subdir/subsubdir/file'
ok 37 - rm removes subdirectories recursively
expecting success:
mkdir submod &&
git update-index --add --cacheinfo 160000 $(git rev-parse HEAD) submod &&
git config -f .gitmodules submodule.sub.url ./. &&
git config -f .gitmodules submodule.sub.path submod &&
git submodule init &&
git add .gitmodules &&
git commit -m "add submodule" &&
git rm submod &&
test_path_is_missing submod &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect actual &&
test_must_fail git config -f .gitmodules submodule.sub.url &&
test_must_fail git config -f .gitmodules submodule.sub.path
warning: could not look up configuration 'remote.origin.url'. Assuming this repository is its own authoritative upstream.
Submodule 'sub' (/<<PKGBUILDDIR>>/t/trash directory.t3600-rm/.) registered for path 'submod'
[master e91c5a0] add submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 submod
rm 'submod'
ok 38 - rm removes empty submodules from work tree
expecting success:
git reset --hard &&
git submodule update &&
rm -rf submod &&
git rm submod &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect actual &&
test_must_fail git config -f .gitmodules submodule.sub.url &&
test_must_fail git config -f .gitmodules submodule.sub.path
HEAD is now at e91c5a0 add submodule
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3600-rm/submod'...
done.
Submodule path 'submod': checked out '6319bb20a49b5c3f00d5089f79528401ccdf5bd0'
rm 'submod'
ok 39 - rm removes removed submodule from index and .gitmodules
expecting success:
git reset --hard &&
git submodule update &&
git rm submod &&
test_path_is_missing submod &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect actual &&
test_must_fail git config -f .gitmodules submodule.sub.url &&
test_must_fail git config -f .gitmodules submodule.sub.path
HEAD is now at e91c5a0 add submodule
Submodule path 'submod': checked out '6319bb20a49b5c3f00d5089f79528401ccdf5bd0'
rm 'submod'
ok 40 - rm removes work tree of unmodified submodules
expecting success:
git reset --hard &&
git submodule update &&
git rm submod/ &&
test_path_is_missing submod &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect actual
HEAD is now at e91c5a0 add submodule
Submodule path 'submod': checked out '6319bb20a49b5c3f00d5089f79528401ccdf5bd0'
rm 'submod'
ok 41 - rm removes a submodule with a trailing /
expecting success:
test_must_fail git rm empty/
fatal: pathspec 'empty/' did not match any files
ok 42 - rm fails when given a file with a trailing /
expecting success:
git rm -r frotz/
rm 'frotz/nitfol'
ok 43 - rm succeeds when given a directory with a trailing /
expecting success:
git reset --hard &&
git submodule update &&
git -C submod checkout HEAD^ &&
test_must_fail git rm submod &&
test_path_is_dir submod &&
test_path_is_file submod/.git &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect.modified actual &&
git rm -f submod &&
test_path_is_missing submod &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect actual &&
test_must_fail git config -f .gitmodules submodule.sub.url &&
test_must_fail git config -f .gitmodules submodule.sub.path
HEAD is now at e91c5a0 add submodule
Submodule path 'submod': checked out '6319bb20a49b5c3f00d5089f79528401ccdf5bd0'
Previous HEAD position was 6319bb2 subdir test
HEAD is now at d3037a1 remove file from rm --quiet test
error: the following file has local modifications:
submod
(use --cached to keep the file, or -f to force removal)
rm 'submod'
ok 44 - rm of a populated submodule with different HEAD fails unless forced
expecting success:
git reset --hard &&
git submodule update &&
git rm --cached submod &&
test_path_is_dir submod &&
test_path_is_file submod/.git &&
git status -s -uno >actual &&
test_cmp expect.cached actual &&
git config -f .gitmodules submodule.sub.url &&
git config -f .gitmodules submodule.sub.path
HEAD is now at e91c5a0 add submodule
Submodule path 'submod': checked out '6319bb20a49b5c3f00d5089f79528401ccdf5bd0'
rm 'submod'
./.
submod
ok 45 - rm --cached leaves work tree of populated submodules and .gitmodules alone
expecting success:
git reset --hard &&
git submodule update &&
git rm -n submod &&
test_path_is_file submod/.git &&
git diff-index --exit-code HEAD
HEAD is now at e91c5a0 add submodule
rm 'submod'
ok 46 - rm --dry-run does not touch the submodule or .gitmodules
expecting success:
git reset --hard &&
git submodule update &&
git rm .gitmodules &&
git rm submod >actual 2>actual.err &&
test_must_be_empty actual.err &&
test_path_is_missing submod &&
test_path_is_missing submod/.git &&
git status -s -uno >actual &&
test_cmp expect.both_deleted actual
HEAD is now at e91c5a0 add submodule
rm '.gitmodules'
ok 47 - rm does not complain when no .gitmodules file is found
expecting success:
git reset --hard &&
git submodule update &&
git config -f .gitmodules foo.bar true &&
test_must_fail git rm submod >actual 2>actual.err &&
test_file_not_empty actual.err &&
test_path_is_dir submod &&
test_path_is_file submod/.git &&
git diff-files --quiet -- submod &&
git add .gitmodules &&
git rm submod >actual 2>actual.err &&
test_must_be_empty actual.err &&
test_path_is_missing submod &&
test_path_is_missing submod/.git &&
git status -s -uno >actual &&
test_cmp expect actual
HEAD is now at e91c5a0 add submodule
Submodule path 'submod': checked out '6319bb20a49b5c3f00d5089f79528401ccdf5bd0'
ok 48 - rm will error out on a modified .gitmodules file unless staged
expecting success:
git reset --hard &&
git submodule update &&
git config -f .gitmodules --remove-section submodule.sub &&
git add .gitmodules &&
echo "warning: Could not find section in .gitmodules where path=submod" >expect.err &&
git rm submod >actual 2>actual.err &&
test_i18ncmp expect.err actual.err &&
test_path_is_missing submod &&
test_path_is_missing submod/.git &&
git status -s -uno >actual &&
test_cmp expect actual
HEAD is now at e91c5a0 add submodule
Submodule path 'submod': checked out '6319bb20a49b5c3f00d5089f79528401ccdf5bd0'
ok 49 - rm issues a warning when section is not found in .gitmodules
expecting success:
git reset --hard &&
git submodule update &&
echo X >submod/empty &&
test_must_fail git rm submod &&
test_path_is_dir submod &&
test_path_is_file submod/.git &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect.modified_inside actual &&
git rm -f submod &&
test_path_is_missing submod &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect actual
HEAD is now at e91c5a0 add submodule
Submodule path 'submod': checked out '6319bb20a49b5c3f00d5089f79528401ccdf5bd0'
error: the following file has local modifications:
submod
(use --cached to keep the file, or -f to force removal)
rm 'submod'
ok 50 - rm of a populated submodule with modifications fails unless forced
expecting success:
git reset --hard &&
git submodule update &&
echo X >submod/untracked &&
test_must_fail git rm submod &&
test_path_is_dir submod &&
test_path_is_file submod/.git &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect.modified_untracked actual &&
git rm -f submod &&
test_path_is_missing submod &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect actual
HEAD is now at e91c5a0 add submodule
Submodule path 'submod': checked out '6319bb20a49b5c3f00d5089f79528401ccdf5bd0'
error: the following file has local modifications:
submod
(use --cached to keep the file, or -f to force removal)
rm 'submod'
ok 51 - rm of a populated submodule with untracked files fails unless forced
expecting success:
git reset --hard &&
git submodule update &&
git checkout -b branch1 &&
echo 1 >nitfol &&
git add nitfol &&
git commit -m "added nitfol 1" &&
git checkout -b branch2 master &&
echo 2 >nitfol &&
git add nitfol &&
git commit -m "added nitfol 2" &&
git checkout -b conflict1 master &&
git -C submod fetch &&
git -C submod checkout branch1 &&
git add submod &&
git commit -m "submod 1" &&
git checkout -b conflict2 master &&
git -C submod checkout branch2 &&
git add submod &&
git commit -m "submod 2"
HEAD is now at e91c5a0 add submodule
Submodule path 'submod': checked out '6319bb20a49b5c3f00d5089f79528401ccdf5bd0'
Switched to a new branch 'branch1'
[branch1 ef31746] added nitfol 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 nitfol
Switched to a new branch 'branch2'
[branch2 efb4510] added nitfol 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 nitfol
Switched to a new branch 'conflict1'
From /<<PKGBUILDDIR>>/t/trash directory.t3600-rm/.
* [new branch] branch1 -> origin/branch1
* [new branch] branch2 -> origin/branch2
* [new branch] conflict1 -> origin/conflict1
Previous HEAD position was 6319bb2 subdir test
Switched to a new branch 'branch1'
Branch 'branch1' set up to track remote branch 'branch1' from 'origin'.
[conflict1 c1ea38a] submod 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'conflict2'
M submod
Switched to a new branch 'branch2'
Branch 'branch2' set up to track remote branch 'branch2' from 'origin'.
[conflict2 ec1e744] submod 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 52 - setup submodule conflict
expecting success:
git checkout conflict1 &&
git reset --hard &&
git submodule update &&
test_must_fail git merge conflict2 &&
git rm submod &&
test_path_is_missing submod &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect actual
Switched to branch 'conflict1'
M submod
HEAD is now at c1ea38a submod 1
Submodule path 'submod': checked out 'ef31746964b48e2ce0718c761fafa99c79692fe6'
Merging:
c1ea38a submod 1
virtual conflict2
found 1 common ancestor:
e91c5a0 add submodule
Failed to merge submodule submod (merge following commits not found)
Auto-merging submod
CONFLICT (submodule): Merge conflict in submod
Automatic merge failed; fix conflicts and then commit the result.
rm 'submod'
ok 53 - rm removes work tree of unmodified conflicted submodule
expecting success:
git checkout conflict1 &&
git reset --hard &&
git submodule update &&
git -C submod checkout HEAD^ &&
test_must_fail git merge conflict2 &&
test_must_fail git rm submod &&
test_path_is_dir submod &&
test_path_is_file submod/.git &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect.conflict actual &&
git rm -f submod &&
test_path_is_missing submod &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect actual &&
test_must_fail git config -f .gitmodules submodule.sub.url &&
test_must_fail git config -f .gitmodules submodule.sub.path
Already on 'conflict1'
M .gitmodules
D submod
HEAD is now at c1ea38a submod 1
Submodule path 'submod': checked out 'ef31746964b48e2ce0718c761fafa99c79692fe6'
Previous HEAD position was ef31746 added nitfol 1
HEAD is now at e91c5a0 add submodule
Merging:
c1ea38a submod 1
virtual conflict2
found 1 common ancestor:
e91c5a0 add submodule
Failed to merge submodule submod (merge following commits not found)
Auto-merging submod
CONFLICT (submodule): Merge conflict in submod
Automatic merge failed; fix conflicts and then commit the result.
error: the following file has local modifications:
submod
(use --cached to keep the file, or -f to force removal)
rm 'submod'
ok 54 - rm of a conflicted populated submodule with different HEAD fails unless forced
expecting success:
git checkout conflict1 &&
git reset --hard &&
git submodule update &&
echo X >submod/empty &&
test_must_fail git merge conflict2 &&
test_must_fail git rm submod &&
test_path_is_dir submod &&
test_path_is_file submod/.git &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect.conflict actual &&
git rm -f submod &&
test_path_is_missing submod &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect actual &&
test_must_fail git config -f .gitmodules submodule.sub.url &&
test_must_fail git config -f .gitmodules submodule.sub.path
Already on 'conflict1'
M .gitmodules
D submod
HEAD is now at c1ea38a submod 1
Submodule path 'submod': checked out 'ef31746964b48e2ce0718c761fafa99c79692fe6'
Merging:
c1ea38a submod 1
virtual conflict2
found 1 common ancestor:
e91c5a0 add submodule
Failed to merge submodule submod (merge following commits not found)
Auto-merging submod
CONFLICT (submodule): Merge conflict in submod
Automatic merge failed; fix conflicts and then commit the result.
error: the following file has local modifications:
submod
(use --cached to keep the file, or -f to force removal)
rm 'submod'
ok 55 - rm of a conflicted populated submodule with modifications fails unless forced
expecting success:
git checkout conflict1 &&
git reset --hard &&
git submodule update &&
echo X >submod/untracked &&
test_must_fail git merge conflict2 &&
test_must_fail git rm submod &&
test_path_is_dir submod &&
test_path_is_file submod/.git &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect.conflict actual &&
git rm -f submod &&
test_path_is_missing submod &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect actual
Already on 'conflict1'
M .gitmodules
D submod
HEAD is now at c1ea38a submod 1
Submodule path 'submod': checked out 'ef31746964b48e2ce0718c761fafa99c79692fe6'
Merging:
c1ea38a submod 1
virtual conflict2
found 1 common ancestor:
e91c5a0 add submodule
Failed to merge submodule submod (merge following commits not found)
Auto-merging submod
CONFLICT (submodule): Merge conflict in submod
Automatic merge failed; fix conflicts and then commit the result.
error: the following file has local modifications:
submod
(use --cached to keep the file, or -f to force removal)
rm 'submod'
ok 56 - rm of a conflicted populated submodule with untracked files fails unless forced
expecting success:
git checkout conflict1 &&
git reset --hard &&
git submodule update &&
(
cd submod &&
rm .git &&
cp -R ../.git/modules/sub .git &&
GIT_WORK_TREE=. git config --unset core.worktree
) &&
test_must_fail git merge conflict2 &&
test_must_fail git rm submod &&
test_path_is_dir submod &&
test_path_is_dir submod/.git &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect.conflict actual &&
test_must_fail git rm -f submod &&
test_path_is_dir submod &&
test_path_is_dir submod/.git &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect.conflict actual &&
git merge --abort &&
rm -rf submod
Already on 'conflict1'
M .gitmodules
D submod
HEAD is now at c1ea38a submod 1
Submodule path 'submod': checked out 'ef31746964b48e2ce0718c761fafa99c79692fe6'
Merging:
c1ea38a submod 1
virtual conflict2
found 1 common ancestor:
e91c5a0 add submodule
Failed to merge submodule submod (merge following commits not found)
Auto-merging submod
CONFLICT (submodule): Merge conflict in submod
Automatic merge failed; fix conflicts and then commit the result.
Migrating git directory of 'submod' from
'/<<PKGBUILDDIR>>/t/trash directory.t3600-rm/submod/.git' to
'/<<PKGBUILDDIR>>/t/trash directory.t3600-rm/.git/modules/sub'
fatal: could not migrate git directory from '/<<PKGBUILDDIR>>/t/trash directory.t3600-rm/submod/.git' to '/<<PKGBUILDDIR>>/t/trash directory.t3600-rm/.git/modules/sub': Directory not empty
Migrating git directory of 'submod' from
'/<<PKGBUILDDIR>>/t/trash directory.t3600-rm/submod/.git' to
'/<<PKGBUILDDIR>>/t/trash directory.t3600-rm/.git/modules/sub'
fatal: could not migrate git directory from '/<<PKGBUILDDIR>>/t/trash directory.t3600-rm/submod/.git' to '/<<PKGBUILDDIR>>/t/trash directory.t3600-rm/.git/modules/sub': Directory not empty
ok 57 - rm of a conflicted populated submodule with a .git directory fails even when forced
expecting success:
git checkout conflict1 &&
git reset --hard &&
test_must_fail git merge conflict2 &&
git rm submod &&
test_path_is_missing submod &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect actual
Already on 'conflict1'
D submod
HEAD is now at c1ea38a submod 1
Merging:
c1ea38a submod 1
virtual conflict2
found 1 common ancestor:
e91c5a0 add submodule
Failed to merge submodule submod (merge following commits not found)
Auto-merging submod
CONFLICT (submodule): Merge conflict in submod
Automatic merge failed; fix conflicts and then commit the result.
rm 'submod'
ok 58 - rm of a conflicted unpopulated submodule succeeds
expecting success:
git checkout -f master &&
git reset --hard &&
git submodule update &&
(
cd submod &&
rm .git &&
cp -R ../.git/modules/sub .git &&
GIT_WORK_TREE=. git config --unset core.worktree &&
rm -r ../.git/modules/sub
) &&
git rm submod 2>output.err &&
test_path_is_missing submod &&
test_path_is_missing submod/.git &&
git status -s -uno --ignore-submodules=none >actual &&
test_file_not_empty actual &&
test_i18ngrep Migrating output.err
Switched to branch 'master'
HEAD is now at e91c5a0 add submodule
Submodule path 'submod': checked out '6319bb20a49b5c3f00d5089f79528401ccdf5bd0'
rm 'submod'
Migrating git directory of 'submod' from
ok 59 - rm of a populated submodule with a .git directory migrates git dir
expecting success:
git reset --hard &&
git submodule update &&
(
cd submod &&
git update-index --add --cacheinfo 160000 $(git rev-parse HEAD) subsubmod &&
git config -f .gitmodules submodule.sub.url ../. &&
git config -f .gitmodules submodule.sub.path subsubmod &&
git submodule init &&
git add .gitmodules &&
git commit -m "add subsubmodule" &&
git submodule update subsubmod
) &&
git commit -a -m "added deep submodule"
HEAD is now at e91c5a0 add submodule
Submodule path 'submod': checked out '6319bb20a49b5c3f00d5089f79528401ccdf5bd0'
Submodule 'sub' (/<<PKGBUILDDIR>>/t/trash directory.t3600-rm/.) registered for path 'subsubmod'
[detached HEAD ea9b74f] add subsubmodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 subsubmod
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3600-rm/submod/subsubmod'...
done.
Submodule path 'subsubmod': checked out '6319bb20a49b5c3f00d5089f79528401ccdf5bd0'
[master d3e5d70] added deep submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 60 - setup subsubmodule
expecting success:
git rm submod &&
test_path_is_missing submod &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect actual
rm 'submod'
ok 61 - rm recursively removes work tree of unmodified submodules
expecting success:
git reset --hard &&
git submodule update --recursive &&
git -C submod/subsubmod checkout HEAD^ &&
test_must_fail git rm submod &&
test_path_is_dir submod &&
test_path_is_file submod/.git &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect.modified_inside actual &&
git rm -f submod &&
test_path_is_missing submod &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect actual
HEAD is now at d3e5d70 added deep submodule
Submodule path 'submod': checked out 'ea9b74f4387f3bff79476bdae4394d8394f2c31d'
Submodule path 'submod/subsubmod': checked out '6319bb20a49b5c3f00d5089f79528401ccdf5bd0'
Previous HEAD position was 6319bb2 subdir test
HEAD is now at d3037a1 remove file from rm --quiet test
error: the following file has local modifications:
submod
(use --cached to keep the file, or -f to force removal)
rm 'submod'
ok 62 - rm of a populated nested submodule with different nested HEAD fails unless forced
expecting success:
git reset --hard &&
git submodule update --recursive &&
echo X >submod/subsubmod/empty &&
test_must_fail git rm submod &&
test_path_is_dir submod &&
test_path_is_file submod/.git &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect.modified_inside actual &&
git rm -f submod &&
test_path_is_missing submod &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect actual
HEAD is now at d3e5d70 added deep submodule
Submodule path 'submod': checked out 'ea9b74f4387f3bff79476bdae4394d8394f2c31d'
Submodule path 'submod/subsubmod': checked out '6319bb20a49b5c3f00d5089f79528401ccdf5bd0'
error: the following file has local modifications:
submod
(use --cached to keep the file, or -f to force removal)
rm 'submod'
ok 63 - rm of a populated nested submodule with nested modifications fails unless forced
expecting success:
git reset --hard &&
git submodule update --recursive &&
echo X >submod/subsubmod/untracked &&
test_must_fail git rm submod &&
test_path_is_dir submod &&
test_path_is_file submod/.git &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect.modified_untracked actual &&
git rm -f submod &&
test_path_is_missing submod &&
git status -s -uno --ignore-submodules=none >actual &&
test_cmp expect actual
HEAD is now at d3e5d70 added deep submodule
Submodule path 'submod': checked out 'ea9b74f4387f3bff79476bdae4394d8394f2c31d'
Submodule path 'submod/subsubmod': checked out '6319bb20a49b5c3f00d5089f79528401ccdf5bd0'
error: the following file has local modifications:
submod
(use --cached to keep the file, or -f to force removal)
rm 'submod'
ok 64 - rm of a populated nested submodule with nested untracked files fails unless forced
expecting success:
git reset --hard &&
git submodule update --recursive &&
(
cd submod/subsubmod &&
rm .git &&
mv ../../.git/modules/sub/modules/sub .git &&
GIT_WORK_TREE=. git config --unset core.worktree
) &&
git rm submod 2>output.err &&
test_path_is_missing submod &&
test_path_is_missing submod/subsubmod/.git &&
git status -s -uno --ignore-submodules=none >actual &&
test_file_not_empty actual &&
test_i18ngrep Migrating output.err
HEAD is now at d3e5d70 added deep submodule
Submodule path 'submod': checked out 'ea9b74f4387f3bff79476bdae4394d8394f2c31d'
Submodule path 'submod/subsubmod': checked out '6319bb20a49b5c3f00d5089f79528401ccdf5bd0'
rm 'submod'
Migrating git directory of 'submod/subsubmod' from
ok 65 - rm absorbs submodule's nested .git directory
expecting success:
git commit -m "submodule removal" submod .gitmodules &&
git checkout HEAD^ &&
git submodule update &&
git checkout -q HEAD^ &&
git checkout -q master 2>actual &&
test_i18ngrep "^warning: unable to rmdir 'submod':" actual &&
git status -s submod >actual &&
echo "?? submod/" >expected &&
test_cmp expected actual &&
rm -rf submod &&
git status -s -uno --ignore-submodules=none >actual &&
test_must_be_empty actual
[master a5a1e37] submodule removal
Author: A U Thor <author@example.com>
2 files changed, 4 deletions(-)
delete mode 160000 submod
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d3e5d70 added deep submodule
Submodule path 'submod': checked out 'ea9b74f4387f3bff79476bdae4394d8394f2c31d'
warning: unable to rmdir 'submod': Directory not empty
ok 66 - checking out a commit after submodule removal needs manual updates
expecting success:
rm -rf d &&
mkdir d &&
>d/f &&
git add d &&
rm -rf d &&
>d &&
git rm d/f &&
test_must_fail git rev-parse --verify :d/f &&
test_path_is_file d
rm 'd/f'
fatal: Needed a single revision
ok 67 - rm of d/f when d has become a non-directory
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:
rm -rf d &&
mkdir d &&
>d/f &&
git add d &&
rm -rf d &&
ln -s nonexistent d &&
git rm d/f &&
test_must_fail git rev-parse --verify :d/f &&
test -h d &&
test_path_is_missing d
rm 'd/f'
fatal: Needed a single revision
ok 68 - rm of d/f when d has become a dangling symlink
expecting success:
rm -rf d &&
>d &&
git add d &&
rm -f d &&
mkdir d &&
>d/f &&
test_must_fail git rm d &&
git rev-parse --verify :d &&
test_path_is_file d/f
fatal: git rm: 'd': Is a directory
rm 'd'
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
ok 69 - rm of file when it has become a directory
expecting success:
rm -rf d e &&
mkdir e &&
echo content >e/f &&
ln -s e d &&
git add -A e d &&
git commit -m "symlink d to e, e/f exists" &&
test_must_fail git rm d/f &&
git rev-parse --verify :d &&
git rev-parse --verify :e/f &&
test -h d &&
test_path_is_file e/f
[master 8bea65c] symlink d to e, e/f exists
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 120000 d
create mode 100644 e/f
fatal: pathspec 'd/f' did not match any files
9cbe6ea56f225388ae614c419249bfc6d734cc30
d95f3ad14dee633a758d2e331151e950dd13e4ed
ok 70 - rm across a symlinked leading path (no index)
checking known breakage:
rm -rf d e &&
mkdir d &&
echo content >d/f &&
git add -A e d &&
git commit -m "d/f exists" &&
mv d e &&
ln -s e d &&
test_must_fail git rm d/f &&
git rev-parse --verify :d/f &&
test -h d &&
test_path_is_file e/f
[master 7c23125] d/f exists
Author: A U Thor <author@example.com>
2 files changed, 1 deletion(-)
delete mode 120000 d
rename {e => d}/f (100%)
rm 'd/f'
test_must_fail: command succeeded: git rm d/f
not ok 71 - rm across a symlinked leading path (w/ index) # TODO known breakage
expecting success:
>bar.txt &&
>foo.txt &&
git add bar.txt foo.txt
ok 72 - setup for testing rm messages
expecting success:
cat >expect <<-\EOF &&
error: the following files have staged content different from both the
file and the HEAD:
bar.txt
foo.txt
(use -f to force removal)
EOF
echo content1 >foo.txt &&
echo content1 >bar.txt &&
test_must_fail git rm foo.txt bar.txt 2>actual &&
test_i18ncmp expect actual
ok 73 - rm files with different staged content
expecting success:
cat >expect <<-\EOF &&
error: the following files have staged content different from both the
file and the HEAD:
bar.txt
foo.txt
EOF
echo content2 >foo.txt &&
echo content2 >bar.txt &&
test_must_fail git -c advice.rmhints=false rm foo.txt bar.txt 2>actual &&
test_i18ncmp expect actual
ok 74 - rm files with different staged content without hints
expecting success:
cat >expect <<-\EOF &&
error: the following file has local modifications:
foo.txt
(use --cached to keep the file, or -f to force removal)
EOF
git commit -m "testing rm 3" &&
echo content3 >foo.txt &&
test_must_fail git rm foo.txt 2>actual &&
test_i18ncmp expect actual
[master 53ba5fa] testing rm 3
Author: A U Thor <author@example.com>
3 files changed, 1 deletion(-)
create mode 100644 bar.txt
delete mode 100644 d/f
create mode 100644 foo.txt
ok 75 - rm file with local modification
expecting success:
cat >expect <<-\EOF &&
error: the following file has local modifications:
bar.txt
EOF
echo content4 >bar.txt &&
test_must_fail git -c advice.rmhints=false rm bar.txt 2>actual &&
test_i18ncmp expect actual
ok 76 - rm file with local modification without hints
expecting success:
cat >expect <<-\EOF &&
error: the following file has changes staged in the index:
foo.txt
(use --cached to keep the file, or -f to force removal)
EOF
git reset --hard &&
echo content5 >foo.txt &&
git add foo.txt &&
test_must_fail git rm foo.txt 2>actual &&
test_i18ncmp expect actual
HEAD is now at 53ba5fa testing rm 3
ok 77 - rm file with changes in the index
expecting success:
cat >expect <<-\EOF &&
error: the following file has changes staged in the index:
foo.txt
EOF
test_must_fail git -c advice.rmhints=false rm foo.txt 2>actual &&
test_i18ncmp expect actual
ok 78 - rm file with changes in the index without hints
expecting success:
cat >expect <<-\EOF &&
error: the following file has staged content different from both the
file and the HEAD:
foo1.txt
(use -f to force removal)
error: the following file has changes staged in the index:
bar1.txt
(use --cached to keep the file, or -f to force removal)
EOF
echo content >foo1.txt &&
git add foo1.txt &&
echo content6 >foo1.txt &&
echo content6 >bar1.txt &&
git add bar1.txt &&
test_must_fail git rm bar1.txt foo1.txt 2>actual &&
test_i18ncmp expect actual
ok 79 - rm files with two different errors
expecting success:
test_must_fail git rm -rf ""
fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
ok 80 - rm empty string should fail
# still have 1 known breakage(s)
# passed all remaining 79 test(s)
1..80
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3901-i18n-patch.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3901-i18n-patch/.git/
expecting success:
git config i18n.commitencoding UTF-8 &&
# use UTF-8 in author and committer name to match the
# i18n.commitencoding settings
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
test_tick &&
echo "$GIT_AUTHOR_NAME" >mine &&
git add mine &&
git commit -s -m "Initial commit" &&
test_tick &&
echo Hello world >mine &&
git add mine &&
git commit -s -m "Second on main" &&
# the first commit on the side branch is UTF-8
test_tick &&
git checkout -b side master^ &&
echo Another file >yours &&
git add yours &&
git commit -s -m "Second on side" &&
if test_have_prereq !MINGW
then
# the second one on the side branch is ISO-8859-1
git config i18n.commitencoding ISO8859-1 &&
# use author and committer name in ISO-8859-1 to match it.
. "$TEST_DIRECTORY"/t3901/8859-1.txt
fi &&
test_tick &&
echo Yet another >theirs &&
git add theirs &&
git commit -s -m "Third on side" &&
# Back to default
git config i18n.commitencoding UTF-8
[master (root-commit) a751cb4] Initial commit
Author: Áéí óú <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 mine
[master 1abbfe5] Second on main
Author: Áéí óú <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'side'
[side 907dc52] Second on side
Author: Áéí óú <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 yours
[side 717f610] Third on side
1 file changed, 1 insertion(+)
create mode 100644 theirs
ok 1 - setup
expecting success:
git config i18n.logoutputencoding ISO8859-1 &&
git format-patch --stdout master..HEAD^ >out-l1 &&
git format-patch --stdout HEAD^ >out-l2 &&
grep "^Content-Type: text/plain; charset=ISO8859-1" out-l1 &&
grep "^From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l1 &&
grep "^Content-Type: text/plain; charset=ISO8859-1" out-l2 &&
grep "^From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l2
Content-Type: text/plain; charset=ISO8859-1
From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?= <author@example.com>
Content-Type: text/plain; charset=ISO8859-1
From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?= <author@example.com>
ok 2 - format-patch output (ISO-8859-1)
expecting success:
git config i18n.logoutputencoding UTF-8 &&
git format-patch --stdout master..HEAD^ >out-u1 &&
git format-patch --stdout HEAD^ >out-u2 &&
grep "^Content-Type: text/plain; charset=UTF-8" out-u1 &&
grep "^From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?=" out-u1 &&
grep "^Content-Type: text/plain; charset=UTF-8" out-u2 &&
grep "^From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?=" out-u2
Content-Type: text/plain; charset=UTF-8
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
Content-Type: text/plain; charset=UTF-8
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
ok 3 - format-patch output (UTF-8)
expecting success:
# We want the result of rebase in UTF-8
git config i18n.commitencoding UTF-8 &&
# The test is about logoutputencoding not affecting the
# final outcome -- it is used internally to generate the
# patch and the log.
git config i18n.logoutputencoding UTF-8 &&
# The result will be committed by GIT_COMMITTER_NAME --
# we want UTF-8 encoded name.
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git checkout -b test &&
git rebase master &&
check_encoding 2
Switched to a new branch 'test'
First, rewinding head to replay your work on top of it...
Applying: Second on side
Applying: Third on side
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
ok 4 - rebase (U/U)
expecting success:
git config i18n.commitencoding UTF-8 &&
git config i18n.logoutputencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git reset --hard side &&
git rebase master &&
check_encoding 2
HEAD is now at 717f610 Third on side
First, rewinding head to replay your work on top of it...
Applying: Second on side
Applying: Third on side
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
ok 5 - rebase (U/L)
expecting success:
# In this test we want ISO-8859-1 encoded commits as the result
git config i18n.commitencoding ISO8859-1 &&
git config i18n.logoutputencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard side &&
git rebase master &&
check_encoding 2 8859
HEAD is now at 717f610 Third on side
First, rewinding head to replay your work on top of it...
Applying: Second on side
Applying: Third on side
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
encoding ISO8859-1
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
encoding ISO8859-1
ok 6 - rebase (L/L)
expecting success:
# This is pathological -- use UTF-8 as intermediate form
# to get ISO-8859-1 results.
git config i18n.commitencoding ISO8859-1 &&
git config i18n.logoutputencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard side &&
git rebase master &&
check_encoding 2 8859
HEAD is now at 717f610 Third on side
First, rewinding head to replay your work on top of it...
Applying: Second on side
Applying: Third on side
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
encoding ISO8859-1
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
encoding ISO8859-1
ok 7 - rebase (L/U)
expecting success:
# Both the commitencoding and logoutputencoding is set to UTF-8.
git config i18n.commitencoding UTF-8 &&
git config i18n.logoutputencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git reset --hard master &&
git cherry-pick side^ &&
git cherry-pick side &&
git revert HEAD &&
check_encoding 3
HEAD is now at 1abbfe5 Second on main
[test 226e420] Second on side
Author: Áéí óú <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 yours
[test 0c82aa3] Third on side
Author: Áéí óú <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 theirs
Removing theirs
[test 267f566] Revert "Third on side"
Author: Áéí óú <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 deletion(-)
delete mode 100644 theirs
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
ok 8 - cherry-pick(U/U)
expecting success:
# Both the commitencoding and logoutputencoding is set to ISO-8859-1
git config i18n.commitencoding ISO8859-1 &&
git config i18n.logoutputencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard master &&
git cherry-pick side^ &&
git cherry-pick side &&
git revert HEAD &&
check_encoding 3 8859
HEAD is now at 1abbfe5 Second on main
[test e1b2855] Second on side
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 yours
[test 37f31da] Third on side
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 theirs
Removing theirs
[test 2f88e21] Revert "Third on side"
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 deletion(-)
delete mode 100644 theirs
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
encoding ISO8859-1
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
encoding ISO8859-1
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
encoding ISO8859-1
ok 9 - cherry-pick(L/L)
expecting success:
# Commitencoding is set to UTF-8 but logoutputencoding is ISO-8859-1
git config i18n.commitencoding UTF-8 &&
git config i18n.logoutputencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git reset --hard master &&
git cherry-pick side^ &&
git cherry-pick side &&
git revert HEAD &&
check_encoding 3
HEAD is now at 1abbfe5 Second on main
[test 226e420] Second on side
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 yours
[test 0c82aa3] Third on side
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 theirs
Removing theirs
[test 267f566] Revert "Third on side"
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 deletion(-)
delete mode 100644 theirs
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
ok 10 - cherry-pick(U/L)
expecting success:
# Again, the commitencoding is set to ISO-8859-1 but
# logoutputencoding is set to UTF-8.
git config i18n.commitencoding ISO8859-1 &&
git config i18n.logoutputencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard master &&
git cherry-pick side^ &&
git cherry-pick side &&
git revert HEAD &&
check_encoding 3 8859
HEAD is now at 1abbfe5 Second on main
[test e1b2855] Second on side
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 yours
[test 37f31da] Third on side
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 theirs
Removing theirs
[test 2f88e21] Revert "Third on side"
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 deletion(-)
delete mode 100644 theirs
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
encoding ISO8859-1
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
encoding ISO8859-1
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
encoding ISO8859-1
ok 11 - cherry-pick(L/U)
expecting success:
git config i18n.commitencoding UTF-8 &&
git config i18n.logoutputencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git reset --hard side &&
git rebase --merge master &&
check_encoding 2
HEAD is now at 717f610 Third on side
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/test.
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
ok 12 - rebase --merge (U/U)
expecting success:
git config i18n.commitencoding UTF-8 &&
git config i18n.logoutputencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git reset --hard side &&
git rebase --merge master &&
check_encoding 2
HEAD is now at 717f610 Third on side
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/test.
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
ok 13 - rebase --merge (U/L)
expecting success:
# In this test we want ISO-8859-1 encoded commits as the result
git config i18n.commitencoding ISO8859-1 &&
git config i18n.logoutputencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard side &&
git rebase --merge master &&
check_encoding 2 8859
HEAD is now at 717f610 Third on side
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/test.
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
encoding ISO8859-1
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
encoding ISO8859-1
ok 14 - rebase --merge (L/L)
expecting success:
# This is pathological -- use UTF-8 as intermediate form
# to get ISO-8859-1 results.
git config i18n.commitencoding ISO8859-1 &&
git config i18n.logoutputencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard side &&
git rebase --merge master &&
check_encoding 2 8859
HEAD is now at 717f610 Third on side
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/test.
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
encoding ISO8859-1
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
encoding ISO8859-1
ok 15 - rebase --merge (L/U)
expecting success:
# Apply UTF-8 patches with UTF-8 commitencoding
git config i18n.commitencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git reset --hard master &&
git am out-u1 out-u2 &&
check_encoding 2
HEAD is now at 1abbfe5 Second on main
Applying: Second on side
Applying: Third on side
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
ok 16 - am (U/U)
expecting success:
# Apply ISO-8859-1 patches with ISO-8859-1 commitencoding
git config i18n.commitencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard master &&
git am out-l1 out-l2 &&
check_encoding 2 8859
HEAD is now at 1abbfe5 Second on main
Applying: Second on side
Applying: Third on side
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
encoding ISO8859-1
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
encoding ISO8859-1
ok 17 - am (L/L)
expecting success:
# Apply ISO-8859-1 patches with UTF-8 commitencoding
git config i18n.commitencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git reset --hard master &&
# am specifies --utf8 by default.
git am out-l1 out-l2 &&
check_encoding 2
HEAD is now at 1abbfe5 Second on main
Applying: Second on side
Applying: Third on side
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
ok 18 - am (U/L)
expecting success:
# Apply ISO-8859-1 patches with UTF-8 commitencoding
git config i18n.commitencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901/utf8.txt &&
git reset --hard master &&
git am --no-utf8 out-l1 out-l2 2>err &&
# commit-tree will warn that the commit message does not contain valid UTF-8
# as mailinfo did not convert it
test_i18ngrep "did not conform" err &&
check_encoding 2
HEAD is now at 1abbfe5 Second on main
Applying: Second on side
Applying: Third on side
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Warning: commit message did not conform to UTF-8.
Warning: commit message did not conform to UTF-8.
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
ok 19 - am --no-utf8 (U/L)
expecting success:
# Apply UTF-8 patches with ISO-8859-1 commitencoding
git config i18n.commitencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
git reset --hard master &&
# mailinfo will re-code the commit message to the charset specified by
# i18n.commitencoding
git am out-u1 out-u2 &&
check_encoding 2 8859
HEAD is now at 1abbfe5 Second on main
Applying: Second on side
Applying: Third on side
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
encoding ISO8859-1
From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?= <author@example.com>
encoding ISO8859-1
ok 20 - am (L/U)
# passed all 20 test(s)
1..20
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3905-stash-include-untracked.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3905-stash-include-untracked/.git/
expecting success:
echo 1 > file &&
git add file &&
test_tick &&
git commit -m initial &&
echo 2 > file &&
git add file &&
echo 3 > file &&
test_tick &&
echo 1 > file2 &&
echo 1 > HEAD &&
mkdir untracked &&
echo untracked >untracked/untracked &&
git stash --include-untracked &&
git diff-files --quiet &&
git diff-index --cached --quiet HEAD
[master (root-commit) 777c62c] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Saved working directory and index state WIP on master: 777c62c initial
ok 1 - stash save --include-untracked some dirty working directory
expecting success:
git status --porcelain >actual &&
test_cmp expect actual
ok 2 - stash save --include-untracked cleaned the untracked files
expecting success:
test_path_is_missing file2 &&
test_path_is_missing untracked &&
test_path_is_missing HEAD &&
git diff HEAD stash^3 -- HEAD file2 untracked >actual &&
test_cmp expect.diff actual &&
git ls-tree --name-only stash^3: >actual &&
test_cmp expect.lstree actual
ok 3 - stash save --include-untracked stashed the untracked files
expecting success:
test_must_fail git stash --patch --include-untracked
Can't use --patch and --include-untracked or --all at the same time
ok 4 - stash save --patch --include-untracked fails
expecting success:
test_must_fail git stash --patch --all
Can't use --patch and --include-untracked or --all at the same time
ok 5 - stash save --patch --all fails
expecting success:
git stash pop &&
git status --porcelain >actual &&
test_cmp expect actual &&
test "1" = "$(cat file2)" &&
test untracked = "$(cat untracked/untracked)"
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual f27c6ae26adb8396d3861976ba268f87ad8afa0b
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
HEAD
expect
file2
untracked/
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (b870f65afe7416482148902ff5b21a724244d053)
ok 6 - stash pop after save --include-untracked leaves files untracked again
expecting success:
echo 4 > file3 &&
git add file3 &&
test_tick &&
git stash -u
Saved working directory and index state WIP on master: 777c62c initial
ok 7 - stash save -u dirty index
expecting success:
git stash pop --index &&
git diff --cached >actual &&
test_cmp expect actual
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual f27c6ae26adb8396d3861976ba268f87ad8afa0b
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: file3
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
expect
Dropped refs/stash@{0} (6fe995aa91ff10c4e2af89ab165bd888828517d0)
ok 8 - stash save --include-untracked dirty index got stashed
expecting success:
echo 1 > file5 &&
git stash save --include-untracked --quiet > .git/stash-output.out 2>&1 &&
test_line_count = 0 .git/stash-output.out &&
rm -f .git/stash-output.out
ok 9 - stash save --include-untracked -q is quiet
expecting success:
rm -f file &&
git stash save --include-untracked &&
echo 1 > expect &&
test_cmp expect file
Saved working directory and index state WIP on master: 777c62c initial
ok 10 - stash save --include-untracked removed files
expecting success:
git stash pop &&
test_path_is_missing file
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual f27c6ae26adb8396d3861976ba268f87ad8afa0b
Removing file
On branch master
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: file
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (909f7032bbeb8f8ef8a3aa293429dac49a9d18ff)
ok 11 - stash save --include-untracked removed files got stashed
expecting success:
echo ignored > ignored &&
mkdir ignored.d &&
echo ignored >ignored.d/untracked &&
git stash -u &&
test -s ignored &&
test -s ignored.d/untracked &&
test -s .gitignore
Saved working directory and index state WIP on master: 777c62c initial
ok 12 - stash save --include-untracked respects .gitignore
expecting success:
echo 4 > file4 &&
git stash -u &&
test_path_is_missing file4
Saved working directory and index state WIP on master: 777c62c initial
ok 13 - stash save -u can stash with only untracked files different
expecting success:
git stash -a &&
test_path_is_missing ignored &&
test_path_is_missing ignored.d &&
test_path_is_missing .gitignore
Saved working directory and index state WIP on master: 777c62c initial
ok 14 - stash save --all does not respect .gitignore
expecting success:
git stash pop &&
test -s ignored &&
test -s ignored.d/untracked &&
test -s .gitignore
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual f27c6ae26adb8396d3861976ba268f87ad8afa0b
Already up to date!
On branch master
nothing to commit, working tree clean
Dropped refs/stash@{0} (7e729995c69630f26ee14cf7ce02b080da67ecd1)
ok 15 - stash save --all is stash poppable
expecting success:
>foo &&
>bar &&
git stash push --include-untracked -- foo &&
test_path_is_file bar &&
test_path_is_missing foo &&
git stash pop &&
test_path_is_file bar &&
test_path_is_file foo
Saved working directory and index state WIP on master: 777c62c initial
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual f27c6ae26adb8396d3861976ba268f87ad8afa0b
Already up to date!
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
bar
foo
nothing added to commit but untracked files present (use "git add" to track)
Dropped refs/stash@{0} (8c4436f5c5cee126e0672d6347a425d7e9dcfcdd)
ok 16 - stash push --include-untracked with pathspec
expecting success:
>"foo bar" &&
>foo &&
>bar &&
git add foo* &&
git stash push --include-untracked -- "foo b*" &&
test_path_is_missing "foo bar" &&
test_path_is_file foo &&
test_path_is_file bar &&
git stash pop &&
test_path_is_file "foo bar" &&
test_path_is_file foo &&
test_path_is_file bar
Saved working directory and index state WIP on master: 777c62c initial
Merging Updated upstream with Stashed changes
Merging:
virtual Updated upstream
virtual Stashed changes
found 1 common ancestor:
virtual f27c6ae26adb8396d3861976ba268f87ad8afa0b
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: foo
new file: foo bar
Untracked files:
(use "git add <file>..." to include in what will be committed)
bar
Dropped refs/stash@{0} (35eb97973117e33f4570df8b356a559959935987)
ok 17 - stash push with $IFS character
expecting success:
git reset HEAD &&
git add .gitignore &&
git commit -m "Add .gitignore" &&
>ignored.d/foo &&
echo "!ignored.d/foo" >> .gitignore &&
git stash save --include-untracked &&
test_path_is_missing ignored.d/foo &&
git stash pop &&
test_path_is_file ignored.d/foo
[master 14579a4] Add .gitignore
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
create mode 100644 .gitignore
Saved working directory and index state WIP on master: 14579a4 Add .gitignore
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual f810f552a0f89486ec70c4734dc5a9c52c8342dd
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .gitignore
Untracked files:
(use "git add <file>..." to include in what will be committed)
bar
foo
foo bar
ignored.d/
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (cd3bab6f4eef73edff723219ece7e89ceec0e923)
ok 18 - stash previously ignored file
expecting success:
>untracked &&
git stash push -u -- untracked 2>actual &&
test_path_is_missing untracked &&
test_line_count = 0 actual
Saved working directory and index state WIP on master: 14579a4 Add .gitignore
ok 19 - stash -u -- <untracked> doesnt print error
expecting success:
>tracked &&
git add tracked &&
>untracked &&
git stash push -u -- untracked &&
test_path_is_missing untracked &&
test_path_is_file tracked
Saved working directory and index state WIP on master: 14579a4 Add .gitignore
ok 20 - stash -u -- <untracked> leaves rest of working tree in place
expecting success:
>tracked &&
git add tracked &&
>untracked &&
git stash push -u -- tracked untracked &&
test_path_is_missing tracked &&
test_path_is_missing untracked
Saved working directory and index state WIP on master: 14579a4 Add .gitignore
ok 21 - stash -u -- <tracked> <untracked> clears changes in both
expecting success:
>ignored.d/bar &&
git stash push --all -- ignored.d/bar &&
test_path_is_missing ignored.d/bar
Saved working directory and index state WIP on master: 14579a4 Add .gitignore
ok 22 - stash --all -- <ignored> stashes ignored file
expecting success:
>tracked &&
git add tracked &&
>ignored.d/bar &&
git stash push --all -- tracked ignored.d/bar &&
test_path_is_missing tracked &&
test_path_is_missing ignored.d/bar
Saved working directory and index state WIP on master: 14579a4 Add .gitignore
ok 23 - stash --all -- <tracked> <ignored> clears changes in both
expecting success:
>ignored.d/bar &&
git stash push -u -- ignored.d/bar &&
test_path_is_file ignored.d/bar
No local changes to save
ok 24 - stash -u -- <ignored> leaves ignored file alone
expecting success:
git stash push -u -- non-existant >actual &&
echo "No local changes to save" >expect &&
test_i18ncmp expect actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 25 - stash -u -- <non-existant> shows no changes when there are none
expecting success:
>untracked.txt &&
git stash -u -- ":(glob)**/*.txt" &&
test_path_is_missing untracked.txt
Saved working directory and index state WIP on master: 14579a4 Add .gitignore
ok 26 - stash -u with globs
# passed all 26 test(s)
1..26
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3904-stash-patch.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3904-stash-patch/.git/
expecting success:
mkdir dir &&
echo parent > dir/foo &&
echo dummy > bar &&
echo committed > HEAD &&
git add bar dir/foo HEAD &&
git commit -m initial &&
test_tick &&
test_commit second dir/foo head &&
echo index > dir/foo &&
git add dir/foo &&
set_and_save_state bar bar_work bar_index &&
save_head
[master (root-commit) 0594421] initial
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 HEAD
create mode 100644 bar
create mode 100644 dir/foo
[master 015b275] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
set_state HEAD HEADfile_work HEADfile_index &&
set_state dir/foo work index &&
test_write_lines n n n | test_must_fail git stash save -p &&
verify_state HEAD HEADfile_work HEADfile_index &&
verify_saved_state bar &&
verify_state dir/foo work index
diff --git a/HEAD b/HEAD
index d0fe822..e74fca5 100644
--- a/HEAD
+++ b/HEAD
@@ -1 +1 @@
-committed
+HEADfile_work
Stash this hunk [y,n,q,a,d,e,?]?
diff --git a/bar b/bar
index 421376d..8c999e6 100644
--- a/bar
+++ b/bar
@@ -1 +1 @@
-dummy
+bar_work
Stash this hunk [y,n,q,a,d,e,?]?
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Stash this hunk [y,n,q,a,d,e,?]?
No changes selected
ok 2 - saying "n" does nothing
expecting success:
test_write_lines y n y | git stash save -p &&
verify_state HEAD committed HEADfile_index &&
verify_saved_state bar &&
verify_state dir/foo head index &&
git reset --hard &&
git stash apply &&
verify_state HEAD HEADfile_work committed &&
verify_state bar dummy dummy &&
verify_state dir/foo work head
diff --git a/HEAD b/HEAD
index d0fe822..e74fca5 100644
--- a/HEAD
+++ b/HEAD
@@ -1 +1 @@
-committed
+HEADfile_work
Stash this hunk [y,n,q,a,d,e,?]?
diff --git a/bar b/bar
index 421376d..8c999e6 100644
--- a/bar
+++ b/bar
@@ -1 +1 @@
-dummy
+bar_work
Stash this hunk [y,n,q,a,d,e,?]?
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Stash this hunk [y,n,q,a,d,e,?]?
Saved working directory and index state WIP on master: 015b275 second
HEAD is now at 015b275 second
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 933b7810e0d844b5ea1fdca8c598255ba6838976
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: HEAD
modified: dir/foo
Untracked files:
(use "git add <file>..." to include in what will be committed)
_head
_index_bar
_worktree_bar
no changes added to commit (use "git add" and/or "git commit -a")
ok 3 - git stash -p
expecting success:
set_state HEAD HEADfile_work HEADfile_index &&
set_state bar bar_work bar_index &&
set_state dir/foo work index &&
test_write_lines y n y | git stash save -p --no-keep-index &&
verify_state HEAD committed committed &&
verify_state bar bar_work dummy &&
verify_state dir/foo head head &&
git reset --hard &&
git stash apply --index &&
verify_state HEAD HEADfile_work HEADfile_index &&
verify_state bar dummy bar_index &&
verify_state dir/foo work index
diff --git a/HEAD b/HEAD
index d0fe822..e74fca5 100644
--- a/HEAD
+++ b/HEAD
@@ -1 +1 @@
-committed
+HEADfile_work
Stash this hunk [y,n,q,a,d,e,?]?
diff --git a/bar b/bar
index 421376d..8c999e6 100644
--- a/bar
+++ b/bar
@@ -1 +1 @@
-dummy
+bar_work
Stash this hunk [y,n,q,a,d,e,?]?
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Stash this hunk [y,n,q,a,d,e,?]?
Saved working directory and index state WIP on master: 015b275 second
HEAD is now at 015b275 second
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 933b7810e0d844b5ea1fdca8c598255ba6838976
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: HEAD
modified: bar
modified: dir/foo
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: HEAD
modified: bar
modified: dir/foo
Untracked files:
(use "git add <file>..." to include in what will be committed)
_head
_index_bar
_worktree_bar
ok 4 - git stash -p --no-keep-index
expecting success:
set_state HEAD HEADfile_work HEADfile_index &&
set_state bar bar_work bar_index &&
set_state dir/foo work index &&
test_write_lines y n y | git stash save --no-keep-index -p &&
verify_state HEAD committed committed &&
verify_state dir/foo head head &&
verify_state bar bar_work dummy &&
git reset --hard &&
git stash apply --index &&
verify_state HEAD HEADfile_work HEADfile_index &&
verify_state bar dummy bar_index &&
verify_state dir/foo work index
diff --git a/HEAD b/HEAD
index d0fe822..e74fca5 100644
--- a/HEAD
+++ b/HEAD
@@ -1 +1 @@
-committed
+HEADfile_work
Stash this hunk [y,n,q,a,d,e,?]?
diff --git a/bar b/bar
index 421376d..8c999e6 100644
--- a/bar
+++ b/bar
@@ -1 +1 @@
-dummy
+bar_work
Stash this hunk [y,n,q,a,d,e,?]?
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Stash this hunk [y,n,q,a,d,e,?]?
Saved working directory and index state WIP on master: 015b275 second
HEAD is now at 015b275 second
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 933b7810e0d844b5ea1fdca8c598255ba6838976
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: HEAD
modified: bar
modified: dir/foo
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: HEAD
modified: bar
modified: dir/foo
Untracked files:
(use "git add <file>..." to include in what will be committed)
_head
_index_bar
_worktree_bar
ok 5 - git stash --no-keep-index -p
expecting success:
set_state HEAD HEADfile_work HEADfile_index &&
set_state dir/foo work index &&
echo y | git stash push -p --no-keep-index -- HEAD &&
verify_state HEAD committed committed &&
verify_state dir/foo work index
diff --git a/HEAD b/HEAD
index d0fe822..e74fca5 100644
--- a/HEAD
+++ b/HEAD
@@ -1 +1 @@
-committed
+HEADfile_work
Stash this hunk [y,n,q,a,d,e,?]?
Saved working directory and index state WIP on master: 015b275 second
ok 6 - stash -p --no-keep-index -- <pathspec> does not unstage other files
expecting success:
verify_saved_head
ok 7 - none of this moved HEAD
checking known breakage:
git reset --hard &&
cat >test <<-\EOF &&
aaa
bbb
ccc
EOF
git add test &&
git commit -m "initial" &&
cat >test <<-\EOF &&
aaa
added line 1
bbb
added line 2
ccc
EOF
printf "%s\n" s n y q |
test_might_fail git stash -p 2>error &&
! test_must_be_empty error &&
grep "added line 1" test &&
! grep "added line 2" test
HEAD is now at 015b275 second
[master 09e2d1a] initial
Author: A U Thor <author@example.com>
1 file changed, 3 insertions(+)
create mode 100644 test
diff --git a/test b/test
index 1802a74..515ff88 100644
--- a/test
+++ b/test
@@ -1,3 +1,5 @@
aaa
+added line 1
bbb
+added line 2
ccc
Stash this hunk [y,n,q,a,d,s,e,?]? Split into 2 hunks.
@@ -1,2 +1,3 @@
aaa
+added line 1
bbb
Stash this hunk [y,n,q,a,d,j,J,g,/,e,?]? @@ -2,2 +3,3 @@
bbb
+added line 2
ccc
Stash this hunk [y,n,q,a,d,K,g,/,e,?]?
Saved working directory and index state WIP on master: 09e2d1a initial
'error' is not empty, it contains:
error: patch failed: test:1
error: test: patch does not apply
Cannot remove worktree changes
added line 1
added line 2
not ok 8 - stash -p with split hunk # TODO known breakage
# still have 1 known breakage(s)
# passed all remaining 7 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3907-stash-show-config.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3907-stash-show-config/.git/
expecting success:
test_commit file
[master (root-commit) 4c1911f] file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.t
ok 1 - setup
expecting success:
test_stat_and_patch "<unset>" "<unset>" --stat
Saved working directory and index state WIP on master: 4c1911f file
ok 2 - showStat unset showPatch unset
expecting success:
test_stat_and_patch "<unset>" false --stat
Saved working directory and index state WIP on master: 4c1911f file
ok 3 - showStat unset showPatch false
expecting success:
test_stat_and_patch "<unset>" true --stat -p
Saved working directory and index state WIP on master: 4c1911f file
ok 4 - showStat unset showPatch true
expecting success:
test_stat_and_patch false "<unset>"
Saved working directory and index state WIP on master: 4c1911f file
ok 5 - showStat false showPatch unset
expecting success:
test_stat_and_patch false false
Saved working directory and index state WIP on master: 4c1911f file
ok 6 - showStat false showPatch false
expecting success:
test_stat_and_patch false true -p
Saved working directory and index state WIP on master: 4c1911f file
ok 7 - showStat false showPatch true
expecting success:
test_stat_and_patch true "<unset>" --stat
Saved working directory and index state WIP on master: 4c1911f file
ok 8 - showStat true showPatch unset
expecting success:
test_stat_and_patch true false --stat
Saved working directory and index state WIP on master: 4c1911f file
ok 9 - showStat true showPatch false
expecting success:
test_stat_and_patch true true --stat -p
Saved working directory and index state WIP on master: 4c1911f file
ok 10 - showStat true showPatch true
# passed all 10 test(s)
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3910-mac-os-precompose.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3910-mac-os-precompose/.git/
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" &&
test -f "$aumlcdiar"
)
prerequisite UTF8_NFD_TO_NFC not satisfied
1..0 # SKIP filesystem does not corrupt utf-8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4000-diff-format.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4000-diff-format/.git/
expecting success:
git update-index --add path0 path1
ok 1 - update-index --add two files with and without +x.
expecting success:
git diff-files -p >actual
ok 2 - git diff-files -p after editing work tree.
expecting success:
compare_diff_patch expected actual
ok 3 - validate git diff-files -p output.
expecting success:
git diff-files -s >actual 2>err &&
test_must_be_empty actual &&
test_must_be_empty err
ok 4 - git diff-files -s after editing work tree
expecting success:
git diff-files --no-patch >actual 2>err &&
test_must_be_empty actual &&
test_must_be_empty err
ok 5 - git diff-files --no-patch as synonym for -s
expecting success:
git diff-files --no-patch --patch >actual &&
compare_diff_patch expected actual
ok 6 - git diff-files --no-patch --patch shows the patch
expecting success:
git diff-files --no-patch --patch-with-raw >actual &&
grep -q "^:100644 100755 .* 0000000000000000000000000000000000000000 M path0\$" actual &&
tail -n +4 actual >actual-patch &&
compare_diff_patch expected actual-patch
ok 7 - git diff-files --no-patch --patch-with-raw shows the patch and raw data
expecting success:
git diff-files --patch --no-patch >actual 2>err &&
test_must_be_empty actual &&
test_must_be_empty err
ok 8 - git diff-files --patch --no-patch does not show the patch
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4001-diff-rename.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4001-diff-rename/.git/
expecting success:
cat >path0 <<-\EOF &&
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
line 11
Line 12
Line 13
Line 14
Line 15
EOF
cat >expected <<-\EOF &&
diff --git a/path0 b/path1
rename from path0
rename to path1
--- a/path0
+++ b/path1
@@ -8,7 +8,7 @@ Line 7
Line 8
Line 9
Line 10
-line 11
+Line 11
Line 12
Line 13
Line 14
EOF
cat >no-rename <<-\EOF
diff --git a/path0 b/path0
deleted file mode 100644
index fdbec44..0000000
--- a/path0
+++ /dev/null
@@ -1,15 +0,0 @@
-Line 1
-Line 2
-Line 3
-Line 4
-Line 5
-Line 6
-Line 7
-Line 8
-Line 9
-Line 10
-line 11
-Line 12
-Line 13
-Line 14
-Line 15
diff --git a/path1 b/path1
new file mode 100644
index 0000000..752c50e
--- /dev/null
+++ b/path1
@@ -0,0 +1,15 @@
+Line 1
+Line 2
+Line 3
+Line 4
+Line 5
+Line 6
+Line 7
+Line 8
+Line 9
+Line 10
+Line 11
+Line 12
+Line 13
+Line 14
+Line 15
EOF
ok 1 - setup
expecting success: git update-index --add path0
ok 2 - update-index --add a file.
expecting success: tree=$(git write-tree) && echo $tree
ad8378482f032562f72403dd7c5bd607578a3f0e
ok 3 - write that tree.
expecting success: git update-index --add --remove path0 path1
ok 4 - renamed and edited the file.
expecting success: git diff-index -p -M $tree >current
ok 5 - git diff-index -p -M after rename and editing.
expecting success: compare_diff_patch current expected
ok 6 - validate the output.
expecting success:
git -c diff.renames=true diff --cached $tree >current &&
compare_diff_patch current expected
ok 7 - test diff.renames=true
expecting success:
git -c diff.renames=false diff --cached $tree >current &&
compare_diff_patch current no-rename
ok 8 - test diff.renames=false
expecting success:
git diff --cached $tree >current &&
compare_diff_patch current expected
ok 9 - test diff.renames unset
expecting success:
cp path1 another-path &&
git add another-path &&
git commit -m 1 &&
git rm path1 &&
mkdir subdir &&
git mv another-path subdir/path1 &&
git status >out &&
test_i18ngrep "renamed: .*path1 -> subdir/path1" out
[master (root-commit) 706233d] 1
Author: A U Thor <author@example.com>
2 files changed, 30 insertions(+)
create mode 100644 another-path
create mode 100644 path1
rm 'path1'
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
renamed: path1 -> subdir/path1
ok 10 - favour same basenames over different ones
expecting success:
git -c diff.renames=true status >out &&
test_i18ngrep "renamed: .*path1 -> subdir/path1" out
renamed: path1 -> subdir/path1
ok 11 - test diff.renames=true for git status
expecting success:
git -c diff.renames=false status >out &&
test_i18ngrep ! "renamed: .*path1 -> subdir/path1" out &&
test_i18ngrep "new file: .*subdir/path1" out &&
test_i18ngrep "deleted: .*[^/]path1" out
new file: subdir/path1
deleted: path1
ok 12 - test diff.renames=false for git status
expecting success:
git show HEAD:path1 | sed "s/15/16/" > subdir/path1 &&
git status >out &&
test_i18ngrep "renamed: .*path1 -> subdir/path1" out
renamed: path1 -> subdir/path1
ok 13 - favour same basenames even with minor differences
expecting success:
git reset --hard &&
mkdir -p dir/A dir/B &&
cp path1 dir/A/file &&
cp path1 dir/B/file &&
git add dir &&
git commit -m 2 &&
git mv dir other-dir &&
git status >out &&
test_i18ngrep "renamed: .*dir/A/file -> other-dir/A/file" out
HEAD is now at 706233d 1
[master 2b91b67] 2
Author: A U Thor <author@example.com>
2 files changed, 30 insertions(+)
create mode 100644 dir/A/file
create mode 100644 dir/B/file
renamed: dir/A/file -> other-dir/A/file
ok 14 - two files with same basename and same content
expecting success:
git reset --hard &&
for i in 0 1 2 3 4 5 6 7 8 9;
do
for j in 0 1 2 3 4 5 6 7 8 9;
do
echo "$i$j" >"path$i$j"
done
done &&
git add "path??" &&
test_tick &&
git commit -m "hundred" &&
(cat path1 && echo new) >new-path &&
echo old >>path1 &&
git add new-path path1 &&
git diff -l 4 -C -C --cached --name-status >actual 2>actual.err &&
sed -e "s/^\([CM]\)[0-9]* /\1 /" actual >actual.munged &&
cat >expect <<-EOF &&
C path1 new-path
M path1
EOF
test_cmp expect actual.munged &&
grep warning actual.err
HEAD is now at 2b91b67 2
[master cc7cf93] hundred
Author: A U Thor <author@example.com>
100 files changed, 100 insertions(+)
create mode 100644 path00
create mode 100644 path01
create mode 100644 path02
create mode 100644 path03
create mode 100644 path04
create mode 100644 path05
create mode 100644 path06
create mode 100644 path07
create mode 100644 path08
create mode 100644 path09
create mode 100644 path10
create mode 100644 path11
create mode 100644 path12
create mode 100644 path13
create mode 100644 path14
create mode 100644 path15
create mode 100644 path16
create mode 100644 path17
create mode 100644 path18
create mode 100644 path19
create mode 100644 path20
create mode 100644 path21
create mode 100644 path22
create mode 100644 path23
create mode 100644 path24
create mode 100644 path25
create mode 100644 path26
create mode 100644 path27
create mode 100644 path28
create mode 100644 path29
create mode 100644 path30
create mode 100644 path31
create mode 100644 path32
create mode 100644 path33
create mode 100644 path34
create mode 100644 path35
create mode 100644 path36
create mode 100644 path37
create mode 100644 path38
create mode 100644 path39
create mode 100644 path40
create mode 100644 path41
create mode 100644 path42
create mode 100644 path43
create mode 100644 path44
create mode 100644 path45
create mode 100644 path46
create mode 100644 path47
create mode 100644 path48
create mode 100644 path49
create mode 100644 path50
create mode 100644 path51
create mode 100644 path52
create mode 100644 path53
create mode 100644 path54
create mode 100644 path55
create mode 100644 path56
create mode 100644 path57
create mode 100644 path58
create mode 100644 path59
create mode 100644 path60
create mode 100644 path61
create mode 100644 path62
create mode 100644 path63
create mode 100644 path64
create mode 100644 path65
create mode 100644 path66
create mode 100644 path67
create mode 100644 path68
create mode 100644 path69
create mode 100644 path70
create mode 100644 path71
create mode 100644 path72
create mode 100644 path73
create mode 100644 path74
create mode 100644 path75
create mode 100644 path76
create mode 100644 path77
create mode 100644 path78
create mode 100644 path79
create mode 100644 path80
create mode 100644 path81
create mode 100644 path82
create mode 100644 path83
create mode 100644 path84
create mode 100644 path85
create mode 100644 path86
create mode 100644 path87
create mode 100644 path88
create mode 100644 path89
create mode 100644 path90
create mode 100644 path91
create mode 100644 path92
create mode 100644 path93
create mode 100644 path94
create mode 100644 path95
create mode 100644 path96
create mode 100644 path97
create mode 100644 path98
create mode 100644 path99
warning: only found copies from modified paths due to too many files.
warning: you may want to set your diff.renameLimit variable to at least 104 and retry the command.
ok 15 - setup for many rename source candidates
expecting success:
mkdir -p a/b/ &&
: >a/b/c &&
git add a/b/c &&
git commit -m "create a/b/c" &&
mkdir -p c/b/ &&
git mv a/b/c c/b/a &&
git commit -m "a/b/c -> c/b/a" &&
git diff -M --summary HEAD^ HEAD >output &&
test_i18ngrep " a/b/c => c/b/a " output &&
git diff -M --stat HEAD^ HEAD >output &&
test_i18ngrep " a/b/c => c/b/a " output
[master cf9679a] create a/b/c
Author: A U Thor <author@example.com>
3 files changed, 17 insertions(+)
create mode 100644 a/b/c
create mode 100644 new-path
[master 991bf51] a/b/c -> c/b/a
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename a/b/c => c/b/a (100%)
rename a/b/c => c/b/a (100%)
a/b/c => c/b/a | 0
ok 16 - rename pretty print with nothing in common
expecting success:
mkdir -p c/d &&
git mv c/b/a c/d/e &&
git commit -m "c/b/a -> c/d/e" &&
git diff -M --summary HEAD^ HEAD >output &&
test_i18ngrep " c/{b/a => d/e} " output &&
git diff -M --stat HEAD^ HEAD >output &&
test_i18ngrep " c/{b/a => d/e} " output
[master f0a0aa9] c/b/a -> c/d/e
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename c/{b/a => d/e} (100%)
rename c/{b/a => d/e} (100%)
c/{b/a => d/e} | 0
ok 17 - rename pretty print with common prefix
expecting success:
mkdir d &&
git mv c/d/e d/e &&
git commit -m "c/d/e -> d/e" &&
git diff -M --summary HEAD^ HEAD >output &&
test_i18ngrep " {c/d => d}/e " output &&
git diff -M --stat HEAD^ HEAD >output &&
test_i18ngrep " {c/d => d}/e " output
[master 70111fa] c/d/e -> d/e
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename {c/d => d}/e (100%)
rename {c/d => d}/e (100%)
{c/d => d}/e | 0
ok 18 - rename pretty print with common suffix
expecting success:
mkdir d/f &&
git mv d/e d/f/e &&
git commit -m "d/e -> d/f/e" &&
git diff -M --summary HEAD^ HEAD >output &&
test_i18ngrep " d/{ => f}/e " output &&
git diff -M --stat HEAD^ HEAD >output &&
test_i18ngrep " d/{ => f}/e " output
[master f1532a6] d/e -> d/f/e
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename d/{ => f}/e (100%)
rename d/{ => f}/e (100%)
d/{ => f}/e | 0
ok 19 - rename pretty print with common prefix and suffix
expecting success:
mkdir d/f/f &&
git mv d/f/e d/f/f/e &&
git commit -m "d/f/e d/f/f/e" &&
git diff -M --summary HEAD^ HEAD >output &&
test_i18ngrep " d/f/{ => f}/e " output &&
git diff -M --stat HEAD^ HEAD >output &&
test_i18ngrep " d/f/{ => f}/e " output
[master 1e19590] d/f/e d/f/f/e
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename d/f/{ => f}/e (100%)
rename d/f/{ => f}/e (100%)
d/f/{ => f}/e | 0
ok 20 - rename pretty print common prefix and suffix overlap
expecting success:
test_write_lines line1 line2 line3 >myfile &&
git add myfile &&
git commit -m x &&
test_write_lines line1 line2 line4 >myotherfile &&
git rm myfile &&
git add myotherfile &&
git commit -m x &&
git diff-tree -M -l0 HEAD HEAD^ >actual &&
# Verify that a rename from myotherfile to myfile was detected
grep "myotherfile.*myfile" actual
[master a793dae] x
Author: A U Thor <author@example.com>
1 file changed, 3 insertions(+)
create mode 100644 myfile
rm 'myfile'
[master 9219624] x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
rename myfile => myotherfile (66%)
:100644 100644 cc8654bf0610eedacc646edaf4c1cbda59454836 83db48f84ec878fbfb30b46d16630e944e34f205 R066 myotherfile myfile
ok 21 - diff-tree -l0 defaults to a big rename limit, not zero
# passed all 21 test(s)
1..21
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4002-diff-basic.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4002-diff-basic/.git/
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 1 - adding test file NN and Z/NN
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 2 - adding test file ND and Z/ND
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 3 - adding test file NM and Z/NM
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 4 - adding test file DN and Z/DN
expecting success: git update-index --add $p &&
git update-index --add Z/$p
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 7 - adding test file MN and Z/MN
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 8 - adding test file MD and Z/MD
expecting success: git update-index --add $p &&
git update-index --add Z/$p
ok 9 - adding test file MM and Z/MM
expecting success: git update-index --add SS
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)
ok 12 - prepare initial tree
expecting success: git update-index --remove $to_remove
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
ok 15 - change in branch A (modification)
expecting success: git update-index MN
ok 16 - change in branch A (modification)
expecting success: git update-index Z/MD
ok 17 - change in branch A (modification)
expecting success: git update-index Z/MM
ok 18 - change in branch A (modification)
expecting success: git update-index Z/MN
ok 19 - change in branch A (modification)
expecting success: git update-index --add AN
ok 20 - change in branch A (addition)
expecting success: git update-index --add AA
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)
expecting success: git update-index TT
ok 25 - change in branch A (edit)
expecting success: git update-index --add DF/DF
ok 26 - change in branch A (change file to directory)
expecting success: tree_A=$(git write-tree)
ok 27 - recording branch A tree
expecting success: git read-tree $tree_O &&
git checkout-index -a
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
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
ok 35 - change in branch B (modification)
expecting success: git update-index --add NA
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 38 - change in branch B (addition)
expecting success: git update-index --add Z/AA
ok 39 - change in branch B (addition)
expecting success: git update-index --add LL &&
git update-index SS
ok 40 - change in branch B (addition and modification)
expecting success: git update-index TT
ok 41 - change in branch B (modification)
expecting success: git update-index --add DF
ok 42 - change in branch B (addition of a file to conflict with directory)
expecting success: tree_B=$(git write-tree)
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
ok 44 - keep contents of 3 trees for easy access
expecting success: git diff-tree $tree_O $tree_A >.test-a &&
cmp -s .test-a .test-plain-OA
ok 45 - diff-tree of known trees.
expecting success: git diff-tree -r $tree_O $tree_A >.test-a &&
cmp -s .test-a .test-recursive-OA
ok 46 - diff-tree of known trees.
expecting success: git diff-tree $tree_O $tree_B >.test-a &&
cmp -s .test-a .test-plain-OB
ok 47 - diff-tree of known trees.
expecting success: git diff-tree -r $tree_O $tree_B >.test-a &&
cmp -s .test-a .test-recursive-OB
ok 48 - diff-tree of known trees.
expecting success: git diff-tree $tree_A $tree_B >.test-a &&
cmp -s .test-a .test-plain-AB
ok 49 - diff-tree of known trees.
expecting success: git diff-tree -r $tree_A $tree_B >.test-a &&
cmp -s .test-a .test-recursive-AB
ok 50 - diff-tree of known trees.
expecting success: echo $tree_A $tree_B | git diff-tree --stdin > .test-a &&
echo $tree_A $tree_B > .test-plain-ABx &&
cat .test-plain-AB >> .test-plain-ABx &&
cmp -s .test-a .test-plain-ABx
ok 51 - diff-tree --stdin of known trees.
expecting success: echo $tree_A $tree_B | git diff-tree -r --stdin > .test-a &&
echo $tree_A $tree_B > .test-recursive-ABx &&
cat .test-recursive-AB >> .test-recursive-ABx &&
cmp -s .test-a .test-recursive-ABx
ok 52 - diff-tree --stdin of known trees.
expecting success: git read-tree $tree_A &&
git diff-index --cached $tree_O >.test-a &&
cmp -s .test-a .test-recursive-OA
ok 53 - diff-cache O with A in cache
expecting success: git read-tree $tree_B &&
git diff-index --cached $tree_O >.test-a &&
cmp -s .test-a .test-recursive-OB
ok 54 - diff-cache O with B in cache
expecting success: git read-tree $tree_B &&
git diff-index --cached $tree_A >.test-a &&
cmp -s .test-a .test-recursive-AB
ok 55 - diff-cache A with B in cache
expecting success: rm -fr Z [A-Z][A-Z] &&
git read-tree $tree_A &&
git checkout-index -f -a &&
git read-tree --reset $tree_O &&
test_must_fail git update-index --refresh -q &&
git diff-files >.test-a &&
cmp_diff_files_output .test-a .test-recursive-OA
DD: needs update
DM: needs update
DN: needs update
MD: needs update
MM: needs update
MN: needs update
SS: needs update
TT: needs update
Z/DD: needs update
Z/DM: needs update
Z/DN: needs update
Z/MD: needs update
Z/MM: needs update
Z/MN: needs update
ok 56 - diff-files with O in cache and A checked out
expecting success: rm -fr Z [A-Z][A-Z] &&
git read-tree $tree_B &&
git checkout-index -f -a &&
git read-tree --reset $tree_O &&
test_must_fail git update-index --refresh -q &&
git diff-files >.test-a &&
cmp_diff_files_output .test-a .test-recursive-OB
DD: needs update
DM: needs update
MD: needs update
MM: needs update
ND: needs update
NM: needs update
SS: needs update
TT: needs update
Z/DD: needs update
Z/DM: needs update
Z/MD: needs update
Z/MM: needs update
Z/ND: needs update
Z/NM: needs update
ok 57 - diff-files with O in cache and B checked out
expecting success: rm -fr Z [A-Z][A-Z] &&
git read-tree $tree_B &&
git checkout-index -f -a &&
git read-tree --reset $tree_A &&
test_must_fail git update-index --refresh -q &&
git diff-files >.test-a &&
cmp_diff_files_output .test-a .test-recursive-AB
AA: needs update
AN: needs update
DF/DF: needs update
MD: needs update
MM: needs update
MN: needs update
ND: needs update
NM: needs update
TT: needs update
Z/AA: needs update
Z/AN: needs update
Z/MD: needs update
Z/MM: needs update
Z/MN: needs update
Z/ND: needs update
Z/NM: needs update
ok 58 - diff-files with A in cache and B checked out
expecting success: git diff-tree $tree_O $tree_A >.test-a &&
git diff-tree -R $tree_A $tree_O >.test-b &&
cmp -s .test-a .test-b
ok 59 - diff-tree O A == diff-tree -R A O
expecting success: git diff-tree -r $tree_O $tree_A >.test-a &&
git diff-tree -r -R $tree_A $tree_O >.test-b &&
cmp -s .test-a .test-b
ok 60 - diff-tree -r O A == diff-tree -r -R A O
expecting success: git diff-tree $tree_B $tree_A >.test-a &&
git diff-tree -R $tree_A $tree_B >.test-b &&
cmp -s .test-a .test-b
ok 61 - diff-tree B A == diff-tree -R A B
expecting success: git diff-tree -r $tree_B $tree_A >.test-a &&
git diff-tree -r -R $tree_A $tree_B >.test-b &&
cmp -s .test-a .test-b
ok 62 - diff-tree -r B A == diff-tree -r -R A B
expecting success: test_must_fail git diff --no-index -- MN - < NN |
grep -v "^index" | sed "s#/-#/NN#" >.test-a &&
test_must_fail git diff --no-index -- MN NN |
grep -v "^index" >.test-b &&
test_cmp .test-a .test-b
ok 63 - diff can read from stdin
# passed all 63 test(s)
1..63
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4003-diff-rename-1.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4003-diff-rename-1/.git/
expecting success: cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&
echo frotz >rezrov &&
git update-index --add COPYING rezrov &&
tree=$(git write-tree) &&
echo $tree
6fb637967044b5d0edaa623ea9befe44d6843c70
ok 1 - prepare reference tree
expecting success: sed -e s/HOWEVER/However/ <COPYING >COPYING.1 &&
sed -e s/GPL/G.P.L/g <COPYING >COPYING.2 &&
rm -f COPYING &&
git update-index --add --remove COPYING COPYING.?
ok 2 - prepare work tree
expecting success: compare_diff_patch current expected
ok 3 - validate output from rename/copy detection (#1)
expecting success: mv COPYING.2 COPYING &&
git update-index --add --remove COPYING COPYING.1 COPYING.2
ok 4 - prepare work tree again
expecting success: compare_diff_patch current expected
ok 5 - validate output from rename/copy detection (#2)
expecting success: cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&
git update-index --add --remove COPYING COPYING.1
ok 6 - prepare work tree once again
expecting success: compare_diff_patch current expected
ok 7 - validate output from rename/copy detection (#3)
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4004-diff-rename-symlink.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4004-diff-rename-symlink/.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
)
prerequisite SYMLINKS ok
expecting success: echo xyzzy | tr -d \\012 >yomin &&
ln -s xyzzy frotz &&
git update-index --add frotz yomin &&
tree=$(git write-tree) &&
echo $tree
e8a7292168115b2c189b56bd500aa179ca8d69ba
ok 1 - prepare reference tree
expecting success: mv frotz rezrov &&
rm -f yomin &&
ln -s xyzzy nitfol &&
ln -s xzzzy bozbar &&
git update-index --add --remove frotz rezrov nitfol bozbar yomin
ok 2 - prepare work tree
expecting success:
GIT_DIFF_OPTS=--unified=0 git diff-index -C -p e8a7292168115b2c189b56bd500aa179ca8d69ba >current &&
cat >expected <<\EOF
diff --git a/bozbar b/bozbar
new file mode 120000
--- /dev/null
+++ b/bozbar
@@ -0,0 +1 @@
+xzzzy
\ No newline at end of file
diff --git a/frotz b/nitfol
similarity index 100%
copy from frotz
copy to nitfol
diff --git a/frotz b/rezrov
similarity index 100%
rename from frotz
rename to rezrov
diff --git a/yomin b/yomin
deleted file mode 100644
--- a/yomin
+++ /dev/null
@@ -1 +0,0 @@
-xyzzy
\ No newline at end of file
EOF
ok 3 - setup diff output
expecting success: compare_diff_patch current expected
ok 4 - validate diff output
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4005-diff-rename-2.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4005-diff-rename-2/.git/
expecting success:
cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&
echo frotz >rezrov &&
git update-index --add COPYING rezrov &&
tree=$(git write-tree) &&
echo $tree &&
sed -e s/HOWEVER/However/ <COPYING >COPYING.1 &&
sed -e s/GPL/G.P.L/g <COPYING >COPYING.2 &&
origoid=$(git hash-object COPYING) &&
oid1=$(git hash-object COPYING.1) &&
oid2=$(git hash-object COPYING.2)
6fb637967044b5d0edaa623ea9befe44d6843c70
ok 1 - setup reference tree
expecting success:
rm -f COPYING &&
git update-index --add --remove COPYING COPYING.? &&
cat <<-EOF >expected &&
:100644 100644 $origoid $oid1 C1234 COPYING COPYING.1
:100644 100644 $origoid $oid2 R1234 COPYING COPYING.2
EOF
git diff-index -C $tree >current &&
compare_diff_raw expected current
ok 2 - validate output from rename/copy detection (#1)
expecting success:
mv COPYING.2 COPYING &&
git update-index --add --remove COPYING COPYING.1 COPYING.2 &&
cat <<-EOF >expected &&
:100644 100644 $origoid $oid2 M COPYING
:100644 100644 $origoid $oid1 C1234 COPYING COPYING.1
EOF
git diff-index -C $tree >current &&
compare_diff_raw current expected
ok 3 - validate output from rename/copy detection (#2)
expecting success:
cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&
git update-index --add --remove COPYING COPYING.1 &&
cat <<-EOF >expected &&
:100644 100644 $origoid $oid1 C1234 COPYING COPYING.1
EOF
git diff-index -C --find-copies-harder $tree >current &&
compare_diff_raw current expected
ok 4 - validate output from rename/copy detection (#3)
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3903-stash.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3903-stash/.git/
expecting success:
echo 1 >file &&
git add file &&
echo unrelated >other-file &&
git add other-file &&
test_tick &&
git commit -m initial &&
echo 2 >file &&
git add file &&
echo 3 >file &&
test_tick &&
git stash &&
git diff-files --quiet &&
git diff-index --cached --quiet HEAD
[master (root-commit) fe7e97b] initial
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 file
create mode 100644 other-file
Saved working directory and index state WIP on master: fe7e97b initial
ok 1 - stash some dirty working directory
expecting success:
test $(git rev-parse stash^) = $(git rev-parse HEAD) &&
git diff stash^2..stash >output &&
test_cmp expect output
ok 2 - parents of stash
expecting success:
test_must_fail git stash apply stash@{1} &&
echo 1 >expect &&
test_cmp expect file
fatal: Log for 'stash' only has 1 entries.
ok 3 - applying bogus stash does nothing
expecting success:
echo 4 >other-file &&
git stash apply &&
echo 3 >expect &&
test_cmp expect file
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual d74e5012f311ddb74ee390126e4df2c1391cc04b
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
modified: other-file
Untracked files:
(use "git add <file>..." to include in what will be committed)
expect
output
no changes added to commit (use "git add" and/or "git commit -a")
ok 4 - apply does not need clean working directory
expecting success:
git reset --hard &&
echo 4 >file &&
test_must_fail git stash apply &&
echo 4 >expect &&
test_cmp expect file
HEAD is now at fe7e97b initial
error: Your local changes to the following files would be overwritten by merge:
file
Please commit your changes or stash them before you merge.
Aborting
error: merging of trees d74e5012f311ddb74ee390126e4df2c1391cc04b and f6c9c9b59dd8c043d13843653b20f8896e77561b failed
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual d74e5012f311ddb74ee390126e4df2c1391cc04b
ok 5 - apply does not clobber working directory changes
expecting success:
git reset --hard &&
echo 5 >other-file &&
git add other-file &&
test_tick &&
git commit -m other-file &&
git stash apply &&
test 3 = $(cat file) &&
test 1 = $(git show :file) &&
test 1 = $(git show HEAD:file)
HEAD is now at fe7e97b initial
[master 4db481e] other-file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Merging Updated upstream with Stashed changes
Merging:
virtual Updated upstream
virtual Stashed changes
found 1 common ancestor:
virtual d74e5012f311ddb74ee390126e4df2c1391cc04b
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
expect
output
no changes added to commit (use "git add" and/or "git commit -a")
ok 6 - apply stashed changes
expecting success:
git reset --hard HEAD^ &&
echo 6 >other-file &&
git add other-file &&
test_tick &&
git commit -m other-file &&
git stash apply --index &&
test 3 = $(cat file) &&
test 2 = $(git show :file) &&
test 1 = $(git show HEAD:file)
HEAD is now at fe7e97b initial
[master da68008] other-file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Merging Updated upstream with Stashed changes
Merging:
virtual Updated upstream
virtual Stashed changes
found 1 common ancestor:
virtual d74e5012f311ddb74ee390126e4df2c1391cc04b
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: file
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
expect
output
ok 7 - apply stashed changes (including index)
expecting success:
git reset --hard HEAD &&
mkdir subdir &&
(
cd subdir &&
git stash apply
)
HEAD is now at da68008 other-file
Merging Updated upstream with Stashed changes
Merging:
virtual Updated upstream
virtual Stashed changes
found 1 common ancestor:
virtual d74e5012f311ddb74ee390126e4df2c1391cc04b
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: ../file
Untracked files:
(use "git add <file>..." to include in what will be committed)
../expect
../output
no changes added to commit (use "git add" and/or "git commit -a")
ok 8 - unstashing in a subdirectory
expecting success:
test_must_fail git stash drop --foo
error: unknown option `foo'
usage: git stash drop [-q|--quiet] [<stash>]
-q, --quiet be quiet, only report errors
ok 9 - stash drop complains of extra options
expecting success:
git reset --hard &&
git stash list >expected &&
echo 7 >file &&
git stash &&
git stash drop &&
git stash list >actual &&
test_cmp expected actual &&
git stash apply &&
test 3 = $(cat file) &&
test 1 = $(git show :file) &&
test 1 = $(git show HEAD:file)
HEAD is now at da68008 other-file
Saved working directory and index state WIP on master: da68008 other-file
Dropped refs/stash@{0} (023d8812842ba015bd3255ad1edb155ee651ae09)
Merging Updated upstream with Stashed changes
Merging:
virtual Updated upstream
virtual Stashed changes
found 1 common ancestor:
virtual d74e5012f311ddb74ee390126e4df2c1391cc04b
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
expect
expected
output
no changes added to commit (use "git add" and/or "git commit -a")
ok 10 - drop top stash
expecting success:
git reset --hard &&
echo 8 >file &&
git stash &&
echo 9 >file &&
git stash &&
git stash drop stash@{1} &&
test 2 = $(git stash list | wc -l) &&
git stash apply &&
test 9 = $(cat file) &&
test 1 = $(git show :file) &&
test 1 = $(git show HEAD:file) &&
git reset --hard &&
git stash drop &&
git stash apply &&
test 3 = $(cat file) &&
test 1 = $(git show :file) &&
test 1 = $(git show HEAD:file)
HEAD is now at da68008 other-file
Saved working directory and index state WIP on master: da68008 other-file
Saved working directory and index state WIP on master: da68008 other-file
Dropped stash@{1} (1a14769f74ebb8f38f2b789d6a8ff8384ef27c8a)
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 770d5dd741b05b1e8b8a782bea5b55d3cf4c1603
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
expect
expected
output
no changes added to commit (use "git add" and/or "git commit -a")
HEAD is now at da68008 other-file
Dropped refs/stash@{0} (c33d67c2675d7e169c58e8733a3e9d2aad320c43)
Merging Updated upstream with Stashed changes
Merging:
virtual Updated upstream
virtual Stashed changes
found 1 common ancestor:
virtual d74e5012f311ddb74ee390126e4df2c1391cc04b
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
expect
expected
output
no changes added to commit (use "git add" and/or "git commit -a")
ok 11 - drop middle stash
expecting success:
git reset --hard &&
echo 8 >file &&
git stash &&
echo 9 >file &&
git stash &&
git stash drop 1 &&
test 2 = $(git stash list | wc -l) &&
git stash apply &&
test 9 = $(cat file) &&
test 1 = $(git show :file) &&
test 1 = $(git show HEAD:file) &&
git reset --hard &&
git stash drop &&
git stash apply &&
test 3 = $(cat file) &&
test 1 = $(git show :file) &&
test 1 = $(git show HEAD:file)
HEAD is now at da68008 other-file
Saved working directory and index state WIP on master: da68008 other-file
Saved working directory and index state WIP on master: da68008 other-file
Dropped refs/stash@{1} (1a14769f74ebb8f38f2b789d6a8ff8384ef27c8a)
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 770d5dd741b05b1e8b8a782bea5b55d3cf4c1603
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
expect
expected
output
no changes added to commit (use "git add" and/or "git commit -a")
HEAD is now at da68008 other-file
Dropped refs/stash@{0} (c33d67c2675d7e169c58e8733a3e9d2aad320c43)
Merging Updated upstream with Stashed changes
Merging:
virtual Updated upstream
virtual Stashed changes
found 1 common ancestor:
virtual d74e5012f311ddb74ee390126e4df2c1391cc04b
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
expect
expected
output
no changes added to commit (use "git add" and/or "git commit -a")
ok 12 - drop middle stash by index
expecting success:
git reset --hard &&
git stash pop &&
test 3 = $(cat file) &&
test 1 = $(git show :file) &&
test 1 = $(git show HEAD:file) &&
test 0 = $(git stash list | wc -l)
HEAD is now at da68008 other-file
Merging Updated upstream with Stashed changes
Merging:
virtual Updated upstream
virtual Stashed changes
found 1 common ancestor:
virtual d74e5012f311ddb74ee390126e4df2c1391cc04b
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
expect
expected
output
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (b2d80795b89ca0da8dc66275129d6386c41cfb05)
ok 13 - stash pop
expecting success:
echo foo >file &&
git commit file -m first &&
echo bar >file &&
echo bar2 >file2 &&
git add file2 &&
git stash &&
echo baz >file &&
git commit file -m second &&
git stash branch stashbranch &&
test refs/heads/stashbranch = $(git symbolic-ref HEAD) &&
test $(git rev-parse HEAD) = $(git rev-parse master^) &&
git diff --cached >output &&
test_cmp expect output &&
git diff >output &&
test_cmp expect1 output &&
git add file &&
git commit -m alternate\ second &&
git diff master..stashbranch >output &&
test_cmp output expect2 &&
test 0 = $(git stash list | wc -l)
[master ce675cf] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Saved working directory and index state WIP on master: ce675cf first
[master 662e8e5] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'stashbranch'
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 4ef46cf585089766e6044653b0d8f66d6f10af57
On branch stashbranch
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: file2
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
expect
expect1
expect2
expected
output
Dropped refs/stash@{0} (1aac143d927bd0de66313f460e9629476356b6c5)
[stashbranch d3a23d9] alternate second
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 file2
ok 14 - stash branch
expecting success:
echo foo >file &&
git stash &&
git stash apply -q >output.out 2>&1 &&
test_must_be_empty output.out
Saved working directory and index state WIP on stashbranch: d3a23d9 alternate second
ok 15 - apply -q is quiet
expecting success:
git stash save --quiet >output.out 2>&1 &&
test_must_be_empty output.out
ok 16 - save -q is quiet
expecting success:
git stash pop -q >output.out 2>&1 &&
test_must_be_empty output.out
ok 17 - pop -q is quiet
expecting success:
echo foo >file &&
git add file &&
git stash save --quiet &&
git stash pop -q --index >output.out 2>&1 &&
test foo = "$(git show :file)" &&
test_must_be_empty output.out
ok 18 - pop -q --index works and is quiet
expecting success:
git stash &&
git stash drop -q >output.out 2>&1 &&
test_must_be_empty output.out
Saved working directory and index state WIP on stashbranch: d3a23d9 alternate second
ok 19 - drop -q is quiet
expecting success:
echo bar3 >file &&
echo bar4 >file2 &&
git add file2 &&
git stash -k &&
test bar,bar4 = $(cat file),$(cat file2)
Saved working directory and index state WIP on stashbranch: d3a23d9 alternate second
ok 20 - stash -k
expecting success:
echo bar33 >file &&
echo bar44 >file2 &&
git add file2 &&
git stash --no-keep-index &&
test bar,bar2 = $(cat file),$(cat file2)
Saved working directory and index state WIP on stashbranch: d3a23d9 alternate second
ok 21 - stash --no-keep-index
expecting success:
echo bar5 >file &&
echo bar6 >file2 &&
git add file2 &&
test_must_fail git stash --invalid-option &&
test_must_fail git stash save --invalid-option &&
test bar5,bar6 = $(cat file),$(cat file2)
usage: git stash list [<options>]
or: git stash show [<options>] [<stash>]
or: git stash drop [-q|--quiet] [<stash>]
or: git stash ( pop | apply ) [--index] [-q|--quiet] [<stash>]
or: git stash branch <branchname> [<stash>]
or: git stash clear
or: git stash [push [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]
[-u|--include-untracked] [-a|--all] [-m|--message <message>]
[--] [<pathspec>...]]
or: git stash save [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]
[-u|--include-untracked] [-a|--all] [<message>]
error: unknown option `invalid-option'
usage: git stash save [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]
[-u|--include-untracked] [-a|--all] [<message>]
-k, --keep-index keep index
-p, --patch stash in patch mode
-q, --quiet quiet mode
-u, --include-untracked
include untracked files in stash
-a, --all include ignore files
-m, --message <message>
stash message
ok 22 - stash --invalid-option
expecting success:
git reset --hard &&
echo new >file3 &&
git add file3 &&
git stash save "added file" &&
! test -r file3 &&
git stash apply &&
test new = "$(cat file3)"
HEAD is now at d3a23d9 alternate second
Saved working directory and index state On stashbranch: added file
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 900fec698da3cabc83135ee0b8e2bd7f99a28ab4
On branch stashbranch
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: file3
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
expect
expect1
expect2
expected
output
output.out
ok 23 - stash an added file
expecting success:
git reset --hard &&
echo new >file4 &&
git add --intent-to-add file4 &&
test_when_finished "git rm -f file4" &&
test_must_fail git stash
HEAD is now at d3a23d9 alternate second
error: Entry 'file4' not uptodate. Cannot merge.
Cannot save the current worktree state
rm 'file4'
ok 24 - stash --intent-to-add file
expecting success:
git reset --hard &&
git rm file &&
echo bar7 >file &&
git stash save "rm then recreate" &&
test bar = "$(cat file)" &&
git stash apply &&
test bar7 = "$(cat file)"
HEAD is now at d3a23d9 alternate second
rm 'file'
Saved working directory and index state On stashbranch: rm then recreate
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 900fec698da3cabc83135ee0b8e2bd7f99a28ab4
On branch stashbranch
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
expect
expect1
expect2
expected
output
output.out
no changes added to commit (use "git add" and/or "git commit -a")
ok 25 - stash rm then recreate
expecting success:
git reset --hard &&
git rm file &&
echo file >.gitignore &&
git stash save "rm and ignore" &&
test bar = "$(cat file)" &&
test file = "$(cat .gitignore)" &&
git stash apply &&
! test -r file &&
test file = "$(cat .gitignore)"
HEAD is now at d3a23d9 alternate second
rm 'file'
Saved working directory and index state On stashbranch: rm and ignore
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 900fec698da3cabc83135ee0b8e2bd7f99a28ab4
Removing file
On branch stashbranch
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
actual
expect
expect1
expect2
expected
output
output.out
no changes added to commit (use "git add" and/or "git commit -a")
ok 26 - stash rm and ignore
expecting success:
git reset --hard &&
git rm file &&
echo file >.gitignore &&
git add .gitignore &&
git stash save "rm and ignore (stage .gitignore)" &&
test bar = "$(cat file)" &&
! test -r .gitignore &&
git stash apply &&
! test -r file &&
test file = "$(cat .gitignore)"
HEAD is now at d3a23d9 alternate second
rm 'file'
Saved working directory and index state On stashbranch: rm and ignore (stage .gitignore)
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 900fec698da3cabc83135ee0b8e2bd7f99a28ab4
Removing file
On branch stashbranch
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: .gitignore
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
expect
expect1
expect2
expected
output
output.out
ok 27 - stash rm and ignore (stage .gitignore)
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 reset --hard &&
rm file &&
ln -s file2 file &&
git stash save "file to symlink" &&
test -f file &&
test bar = "$(cat file)" &&
git stash apply &&
case "$(ls -l file)" in *" file -> file2") :;; *) false;; esac
HEAD is now at d3a23d9 alternate second
Saved working directory and index state On stashbranch: file to symlink
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 900fec698da3cabc83135ee0b8e2bd7f99a28ab4
On branch stashbranch
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
typechange: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
expect
expect1
expect2
expected
output
output.out
no changes added to commit (use "git add" and/or "git commit -a")
ok 28 - stash file to symlink
expecting success:
git reset --hard &&
git rm file &&
ln -s file2 file &&
git stash save "file to symlink (stage rm)" &&
test -f file &&
test bar = "$(cat file)" &&
git stash apply &&
case "$(ls -l file)" in *" file -> file2") :;; *) false;; esac
HEAD is now at d3a23d9 alternate second
rm 'file'
Saved working directory and index state On stashbranch: file to symlink (stage rm)
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 900fec698da3cabc83135ee0b8e2bd7f99a28ab4
On branch stashbranch
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
typechange: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
expect
expect1
expect2
expected
output
output.out
no changes added to commit (use "git add" and/or "git commit -a")
ok 29 - stash file to symlink (stage rm)
expecting success:
git reset --hard &&
rm file &&
ln -s file2 file &&
git add file &&
git stash save "file to symlink (full stage)" &&
test -f file &&
test bar = "$(cat file)" &&
git stash apply &&
case "$(ls -l file)" in *" file -> file2") :;; *) false;; esac
HEAD is now at d3a23d9 alternate second
Saved working directory and index state On stashbranch: file to symlink (full stage)
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 900fec698da3cabc83135ee0b8e2bd7f99a28ab4
On branch stashbranch
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
typechange: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
expect
expect1
expect2
expected
output
output.out
no changes added to commit (use "git add" and/or "git commit -a")
ok 30 - stash file to symlink (full stage)
expecting success:
git reset --hard &&
test_ln_s_add file filelink &&
git commit -m "Add symlink" &&
rm filelink &&
cp file filelink &&
git stash save "symlink to file"
HEAD is now at d3a23d9 alternate second
[stashbranch f202a25] Add symlink
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 120000 filelink
Saved working directory and index state On stashbranch: symlink to file
ok 31 - stash symlink to file
expecting success:
test -h filelink &&
case "$(ls -l filelink)" in *" filelink -> file") :;; *) false;; esac
ok 32 - this must have re-created the symlink
expecting success:
git stash apply &&
! test -h filelink &&
test bar = "$(cat file)"
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual bf49a42d6fce288540f83c8f1df1958f7bea8e81
On branch stashbranch
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
typechange: filelink
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
expect
expect1
expect2
expected
output
output.out
no changes added to commit (use "git add" and/or "git commit -a")
ok 33 - unstash must re-create the file
expecting success:
git reset --hard &&
git rm filelink &&
cp file filelink &&
git stash save "symlink to file (stage rm)"
HEAD is now at f202a25 Add symlink
rm 'filelink'
Saved working directory and index state On stashbranch: symlink to file (stage rm)
ok 34 - stash symlink to file (stage rm)
expecting success:
test -h filelink &&
case "$(ls -l filelink)" in *" filelink -> file") :;; *) false;; esac
ok 35 - this must have re-created the symlink
expecting success:
git stash apply &&
! test -h filelink &&
test bar = "$(cat file)"
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual bf49a42d6fce288540f83c8f1df1958f7bea8e81
On branch stashbranch
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
typechange: filelink
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
expect
expect1
expect2
expected
output
output.out
no changes added to commit (use "git add" and/or "git commit -a")
ok 36 - unstash must re-create the file
expecting success:
git reset --hard &&
rm filelink &&
cp file filelink &&
git add filelink &&
git stash save "symlink to file (full stage)"
HEAD is now at f202a25 Add symlink
Saved working directory and index state On stashbranch: symlink to file (full stage)
ok 37 - stash symlink to file (full stage)
expecting success:
test -h filelink &&
case "$(ls -l filelink)" in *" filelink -> file") :;; *) false;; esac
ok 38 - this must have re-created the symlink
expecting success:
git stash apply &&
! test -h filelink &&
test bar = "$(cat file)"
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual bf49a42d6fce288540f83c8f1df1958f7bea8e81
On branch stashbranch
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
typechange: filelink
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
expect
expect1
expect2
expected
output
output.out
no changes added to commit (use "git add" and/or "git commit -a")
ok 39 - unstash must re-create the file
checking known breakage:
git reset --hard &&
mkdir dir &&
echo foo >dir/file &&
git add dir/file &&
git commit -m "Add file in dir" &&
rm -fr dir &&
echo bar >dir &&
git stash save "directory to file" &&
test -d dir &&
test foo = "$(cat dir/file)" &&
test_must_fail git stash apply &&
test bar = "$(cat dir)" &&
git reset --soft HEAD^
HEAD is now at f202a25 Add symlink
[stashbranch 36c53af] Add file in dir
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dir/file
Saved working directory and index state On stashbranch: directory to file
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 4f1019d02d9c10f9b5c1ece0778b2d50a0fcc259
Removing dir/file
On branch stashbranch
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: dir/file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
expect
expect1
expect2
expected
output
output.out
no changes added to commit (use "git add" and/or "git commit -a")
test_must_fail: command succeeded: git stash apply
not ok 40 - stash directory to file # TODO known breakage
checking known breakage:
git reset --hard &&
rm file &&
mkdir file &&
echo foo >file/file &&
git stash save "file to directory" &&
test -f file &&
test bar = "$(cat file)" &&
git stash apply &&
test -f file/file &&
test foo = "$(cat file/file)"
HEAD is now at 36c53af Add file in dir
Saved working directory and index state On stashbranch: file to directory
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 4f1019d02d9c10f9b5c1ece0778b2d50a0fcc259
Removing file
On branch stashbranch
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
expect
expect1
expect2
expected
output
output.out
no changes added to commit (use "git add" and/or "git commit -a")
not ok 41 - stash file to directory # TODO known breakage
expecting success:
git stash clear &&
test_when_finished "git reset --hard HEAD" &&
echo foo >file2 &&
git stash &&
echo bar >file2 &&
git stash &&
test-tool chmtime =123456789 file2 &&
for type in apply pop "branch stash-branch"
do
test_must_fail git stash $type stash@{0} stash@{1} 2>err &&
test_i18ngrep "Too many revisions" err &&
test 123456789 = $(test-tool chmtime -g file2) || return 1
done
Saved working directory and index state WIP on stashbranch: 36c53af Add file in dir
Saved working directory and index state WIP on stashbranch: 36c53af Add file in dir
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Too many revisions specified: 'stash@{0}' 'stash@{1}'
Too many revisions specified: 'stash@{0}' 'stash@{1}'
Too many revisions specified: 'stash@{0}' 'stash@{1}'
HEAD is now at 36c53af Add file in dir
ok 42 - giving too many ref arguments does not modify files
expecting success:
git stash list >expect &&
test_must_fail git stash drop stash@{0} stash@{1} 2>err &&
test_i18ngrep "Too many revisions" err &&
git stash list >actual &&
test_cmp expect actual
Too many revisions specified: 'stash@{0}' 'stash@{1}'
ok 43 - drop: too many arguments errors out (does nothing)
expecting success:
test_must_fail git stash show stash@{0} stash@{1} 2>err 1>out &&
test_i18ngrep "Too many revisions" err &&
test_must_be_empty out
Too many revisions specified: 'stash@{0}' 'stash@{1}'
ok 44 - show: too many arguments errors out (does nothing)
expecting success:
git stash clear &&
test_when_finished "git reset --hard HEAD" &&
git reset --hard &&
git stash create >actual &&
test_must_be_empty actual
HEAD is now at 36c53af Add file in dir
HEAD is now at 36c53af Add file in dir
ok 45 - stash create - no changes
expecting success:
git stash clear &&
test_when_finished "git reset --hard HEAD" &&
git reset --hard &&
echo foo >>file &&
STASH_ID=$(git stash create) &&
git reset --hard &&
git stash branch stash-branch ${STASH_ID} &&
test_when_finished "git reset --hard HEAD && git checkout master &&
git branch -D stash-branch" &&
test $(git ls-files --modified | wc -l) -eq 1
HEAD is now at 36c53af Add file in dir
HEAD is now at 36c53af Add file in dir
Switched to a new branch 'stash-branch'
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 4f1019d02d9c10f9b5c1ece0778b2d50a0fcc259
On branch stash-branch
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
err
expect
expect1
expect2
expected
out
output
output.out
no changes added to commit (use "git add" and/or "git commit -a")
HEAD is now at 36c53af Add file in dir
Switched to branch 'master'
Deleted branch stash-branch (was 36c53af).
HEAD is now at 662e8e5 second
ok 46 - stash branch - no stashes on stack, stash-like argument
expecting success:
git stash clear &&
test_when_finished "git reset --hard HEAD" &&
git reset --hard &&
echo foo >>file &&
git stash &&
test_when_finished "git stash drop" &&
echo bar >>file &&
STASH_ID=$(git stash create) &&
git reset --hard &&
git stash branch stash-branch ${STASH_ID} &&
test_when_finished "git reset --hard HEAD && git checkout master &&
git branch -D stash-branch" &&
test $(git ls-files --modified | wc -l) -eq 1
HEAD is now at 662e8e5 second
Saved working directory and index state WIP on master: 662e8e5 second
HEAD is now at 662e8e5 second
Switched to a new branch 'stash-branch'
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 3a18f644551a5809421ac2e8f6cc40181a075c5d
On branch stash-branch
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
err
expect
expect1
expect2
expected
out
output
output.out
no changes added to commit (use "git add" and/or "git commit -a")
HEAD is now at 662e8e5 second
Switched to branch 'master'
Deleted branch stash-branch (was 662e8e5).
Dropped refs/stash@{0} (e2cb8303392e01faf2375219c1a7477f1f6b535e)
HEAD is now at 662e8e5 second
ok 47 - stash branch - stashes on stack, stash-like argument
expecting success:
test_must_fail git stash branch 2>err &&
test_i18ngrep "No branch name specified" err
No branch name specified
ok 48 - stash branch complains with no arguments
expecting success:
git stash clear &&
test_when_finished "git reset --hard HEAD" &&
git reset --hard &&
echo foo >>file &&
git stash &&
test_when_finished "git stash drop" &&
echo bar >>file &&
STASH_ID=$(git stash create) &&
git reset --hard &&
cat >expected <<-EOF &&
file | 1 +
1 file changed, 1 insertion(+)
EOF
git stash show ${STASH_ID} >actual &&
test_i18ncmp expected actual
HEAD is now at 662e8e5 second
Saved working directory and index state WIP on master: 662e8e5 second
HEAD is now at 662e8e5 second
Dropped refs/stash@{0} (e2cb8303392e01faf2375219c1a7477f1f6b535e)
HEAD is now at 662e8e5 second
ok 49 - stash show format defaults to --stat
expecting success:
git stash clear &&
test_when_finished "git reset --hard HEAD" &&
git reset --hard &&
echo foo >>file &&
git stash &&
test_when_finished "git stash drop" &&
echo bar >>file &&
STASH_ID=$(git stash create) &&
git reset --hard &&
echo "1 0 file" >expected &&
git stash show --numstat ${STASH_ID} >actual &&
test_cmp expected actual
HEAD is now at 662e8e5 second
Saved working directory and index state WIP on master: 662e8e5 second
HEAD is now at 662e8e5 second
Dropped refs/stash@{0} (e2cb8303392e01faf2375219c1a7477f1f6b535e)
HEAD is now at 662e8e5 second
ok 50 - stash show - stashes on stack, stash-like argument
expecting success:
git stash clear &&
test_when_finished "git reset --hard HEAD" &&
git reset --hard &&
echo foo >>file &&
git stash &&
test_when_finished "git stash drop" &&
echo bar >>file &&
STASH_ID=$(git stash create) &&
git reset --hard &&
cat >expected <<-EOF &&
diff --git a/file b/file
index 7601807..935fbd3 100644
--- a/file
+++ b/file
@@ -1 +1,2 @@
baz
+bar
EOF
git stash show -p ${STASH_ID} >actual &&
test_cmp expected actual
HEAD is now at 662e8e5 second
Saved working directory and index state WIP on master: 662e8e5 second
HEAD is now at 662e8e5 second
Dropped refs/stash@{0} (e2cb8303392e01faf2375219c1a7477f1f6b535e)
HEAD is now at 662e8e5 second
ok 51 - stash show -p - stashes on stack, stash-like argument
expecting success:
git stash clear &&
test_when_finished "git reset --hard HEAD" &&
git reset --hard &&
echo foo >>file &&
STASH_ID=$(git stash create) &&
git reset --hard &&
echo "1 0 file" >expected &&
git stash show --numstat ${STASH_ID} >actual &&
test_cmp expected actual
HEAD is now at 662e8e5 second
HEAD is now at 662e8e5 second
HEAD is now at 662e8e5 second
ok 52 - stash show - no stashes on stack, stash-like argument
expecting success:
git stash clear &&
test_when_finished "git reset --hard HEAD" &&
git reset --hard &&
echo foo >>file &&
STASH_ID=$(git stash create) &&
git reset --hard &&
cat >expected <<-EOF &&
diff --git a/file b/file
index 7601807..71b52c4 100644
--- a/file
+++ b/file
@@ -1 +1,2 @@
baz
+foo
EOF
git stash show -p ${STASH_ID} >actual &&
test_cmp expected actual
HEAD is now at 662e8e5 second
HEAD is now at 662e8e5 second
HEAD is now at 662e8e5 second
ok 53 - stash show -p - no stashes on stack, stash-like argument
expecting success:
git reset --hard &&
echo foo >>file &&
STASH_ID=$(git stash create) &&
git reset --hard &&
cat >expected <<-EOF &&
diff --git a/file b/file
index 7601807..71b52c4 100644
--- a/file
+++ b/file
@@ -1 +1,2 @@
baz
+foo
EOF
git stash show --patience ${STASH_ID} >actual &&
test_cmp expected actual
HEAD is now at 662e8e5 second
HEAD is now at 662e8e5 second
ok 54 - stash show --patience shows diff
expecting success:
git stash clear &&
test_when_finished "git reset --hard HEAD && git stash clear" &&
git reset --hard &&
echo foo >file &&
git stash &&
echo bar >file &&
git stash &&
test_must_fail git stash drop $(git rev-parse stash@{0}) &&
git stash pop &&
test bar = "$(cat file)" &&
git reset --hard HEAD
HEAD is now at 662e8e5 second
Saved working directory and index state WIP on master: 662e8e5 second
Saved working directory and index state WIP on master: 662e8e5 second
error: 'c641a417168959729642959ca87e3b3300514ca2' is not a stash reference
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 3a18f644551a5809421ac2e8f6cc40181a075c5d
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
err
expect
expect1
expect2
expected
out
output
output.out
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (c641a417168959729642959ca87e3b3300514ca2)
HEAD is now at 662e8e5 second
HEAD is now at 662e8e5 second
ok 55 - drop: fail early if specified stash is not a stash ref
expecting success:
git stash clear &&
test_when_finished "git reset --hard HEAD && git stash clear" &&
git reset --hard &&
echo foo >file &&
git stash &&
echo bar >file &&
git stash &&
test_must_fail git stash pop $(git rev-parse stash@{0}) &&
git stash pop &&
test bar = "$(cat file)" &&
git reset --hard HEAD
HEAD is now at 662e8e5 second
Saved working directory and index state WIP on master: 662e8e5 second
Saved working directory and index state WIP on master: 662e8e5 second
error: 'c641a417168959729642959ca87e3b3300514ca2' is not a stash reference
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 3a18f644551a5809421ac2e8f6cc40181a075c5d
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
err
expect
expect1
expect2
expected
out
output
output.out
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (c641a417168959729642959ca87e3b3300514ca2)
HEAD is now at 662e8e5 second
HEAD is now at 662e8e5 second
ok 56 - pop: fail early if specified stash is not a stash ref
expecting success:
git stash clear &&
echo bar5 >file &&
echo bar6 >file2 &&
git add file2 &&
git stash &&
test_must_fail git rev-parse --quiet --verify does-not-exist &&
test_must_fail git stash drop does-not-exist &&
test_must_fail git stash drop does-not-exist@{0} &&
test_must_fail git stash pop does-not-exist &&
test_must_fail git stash pop does-not-exist@{0} &&
test_must_fail git stash apply does-not-exist &&
test_must_fail git stash apply does-not-exist@{0} &&
test_must_fail git stash show does-not-exist &&
test_must_fail git stash show does-not-exist@{0} &&
test_must_fail git stash branch tmp does-not-exist &&
test_must_fail git stash branch tmp does-not-exist@{0} &&
git stash drop
Saved working directory and index state WIP on master: 662e8e5 second
error: does-not-exist is not a valid reference
error: does-not-exist@{0} is not a valid reference
error: does-not-exist is not a valid reference
error: does-not-exist@{0} is not a valid reference
error: does-not-exist is not a valid reference
error: does-not-exist@{0} is not a valid reference
error: does-not-exist is not a valid reference
error: does-not-exist@{0} is not a valid reference
error: does-not-exist is not a valid reference
error: does-not-exist@{0} is not a valid reference
Dropped refs/stash@{0} (456377e9a854a1b5d3b2465cfa776bc70ab17889)
ok 57 - ref with non-existent reflog
expecting success:
git stash clear &&
test_must_fail git stash drop stash@{0} &&
echo bar5 >file &&
echo bar6 >file2 &&
git add file2 &&
git stash &&
test_must_fail git stash drop stash@{1} &&
test_must_fail git stash pop stash@{1} &&
test_must_fail git stash apply stash@{1} &&
test_must_fail git stash show stash@{1} &&
test_must_fail git stash branch tmp stash@{1} &&
git stash drop
error: stash@{0} is not a valid reference
Saved working directory and index state WIP on master: 662e8e5 second
fatal: Log for 'stash' only has 1 entries.
fatal: Log for 'stash' only has 1 entries.
fatal: Log for 'stash' only has 1 entries.
fatal: Log for 'stash' only has 1 entries.
fatal: Log for 'stash' only has 1 entries.
Dropped refs/stash@{0} (456377e9a854a1b5d3b2465cfa776bc70ab17889)
ok 58 - invalid ref of the form stash@{n}, n >= N
expecting success:
git stash clear &&
test_must_fail git stash drop 0 &&
echo bar5 >file &&
echo bar6 >file2 &&
git add file2 &&
git stash &&
test_must_fail git stash drop 1 &&
test_must_fail git stash pop 1 &&
test_must_fail git stash apply 1 &&
test_must_fail git stash show 1 &&
test_must_fail git stash branch tmp 1 &&
git stash drop
error: refs/stash@{0} is not a valid reference
Saved working directory and index state WIP on master: 662e8e5 second
fatal: Log for 'refs/stash' only has 1 entries.
fatal: Log for 'refs/stash' only has 1 entries.
fatal: Log for 'refs/stash' only has 1 entries.
fatal: Log for 'refs/stash' only has 1 entries.
fatal: Log for 'refs/stash' only has 1 entries.
Dropped refs/stash@{0} (456377e9a854a1b5d3b2465cfa776bc70ab17889)
ok 59 - invalid ref of the form "n", n >= N
expecting success:
git stash clear &&
echo bar5 >file &&
echo bar6 >file2 &&
git add file2 &&
git stash &&
git stash show 0 &&
git stash branch tmp 0 &&
git checkout master &&
git stash &&
git stash apply 0 &&
git reset --hard &&
git stash pop 0 &&
git stash &&
git stash drop 0 &&
test_must_fail git stash drop
Saved working directory and index state WIP on master: 662e8e5 second
file | 2 +-
file2 | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
Switched to a new branch 'tmp'
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 3a18f644551a5809421ac2e8f6cc40181a075c5d
On branch tmp
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: file2
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
err
expect
expect1
expect2
expected
out
output
output.out
Dropped refs/stash@{0} (456377e9a854a1b5d3b2465cfa776bc70ab17889)
Switched to branch 'master'
M file
A file2
Saved working directory and index state WIP on master: 662e8e5 second
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 3a18f644551a5809421ac2e8f6cc40181a075c5d
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: file2
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
err
expect
expect1
expect2
expected
out
output
output.out
HEAD is now at 662e8e5 second
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 3a18f644551a5809421ac2e8f6cc40181a075c5d
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: file2
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
err
expect
expect1
expect2
expected
out
output
output.out
Dropped refs/stash@{0} (456377e9a854a1b5d3b2465cfa776bc70ab17889)
Saved working directory and index state WIP on master: 662e8e5 second
Dropped refs/stash@{0} (456377e9a854a1b5d3b2465cfa776bc70ab17889)
No stash entries found.
ok 60 - valid ref of the form "n", n < N
expecting success:
git stash clear &&
echo foo >file &&
git add file &&
git commit -m initial &&
echo bar >file &&
git stash &&
test_must_fail git stash branch master stash@{0} &&
git rev-parse stash@{0} --
[master 47d5e0e] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Saved working directory and index state WIP on master: 47d5e0e initial
fatal: A branch named 'master' already exists.
3550089f9d7063747abfdf6af5822ae1c7b399f1
--
ok 61 - branch: do not drop the stash if the branch exists
expecting success:
git stash clear &&
git reset HEAD~1 --hard &&
echo foo >file &&
git add file &&
git commit -m initial &&
echo bar >file &&
git stash &&
echo baz >file &&
test_when_finished "git checkout master" &&
test_must_fail git stash branch new_branch stash@{0} &&
git rev-parse stash@{0} --
HEAD is now at 662e8e5 second
[master 47d5e0e] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Saved working directory and index state WIP on master: 47d5e0e initial
Switched to a new branch 'new_branch'
M file
error: Your local changes to the following files would be overwritten by merge:
file
Please commit your changes or stash them before you merge.
Aborting
error: merging of trees 4ef46cf585089766e6044653b0d8f66d6f10af57 and 449ac48972da8f28a27cc7dc0f001ca2e472d0bd failed
Index was not unstashed.
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 4ef46cf585089766e6044653b0d8f66d6f10af57
3550089f9d7063747abfdf6af5822ae1c7b399f1
--
Switched to branch 'master'
M file
ok 62 - branch: should not drop the stash if the apply fails
expecting success:
git stash clear &&
echo 1 >subdir/subfile1 &&
echo 2 >subdir/subfile2 &&
git add subdir/subfile1 &&
git commit -m subdir &&
(
cd subdir &&
echo x >subfile1 &&
echo x >../file &&
git status >../expect &&
git stash &&
sane_unset GIT_MERGE_VERBOSITY &&
git stash apply
) |
sed -e 1d >actual && # drop "Saved..."
test_i18ncmp expect actual
[master 307367e] subdir
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subdir/subfile1
ok 63 - apply: show same status as git status (relative to ./)
expecting success:
git stash clear &&
git reset --hard &&
echo file-not-a-ref >HEAD &&
git add HEAD &&
test_tick &&
git stash &&
git diff-files --quiet &&
git diff-index --cached --quiet HEAD &&
test "$(git rev-parse stash^)" = "$(git rev-parse HEAD)" &&
git diff stash^..stash >output &&
test_cmp expect output
HEAD is now at 307367e subdir
Saved working directory and index state WIP on master: 307367e subdir
ok 64 - stash where working directory contains "HEAD" file
expecting success:
test_must_fail git stash store foo
Cannot update refs/stash with foo
ok 65 - store called with invalid commit
expecting success:
git stash clear &&
git reset --hard &&
echo quux >bazzy &&
git add bazzy &&
STASH_ID=$(git stash create) &&
git reset --hard &&
test_path_is_missing bazzy &&
git stash store -m quuxery $STASH_ID &&
test $(git rev-parse stash) = $STASH_ID &&
git reflog --format=%H stash| grep $STASH_ID &&
git stash pop &&
grep quux bazzy
HEAD is now at 307367e subdir
HEAD is now at 307367e subdir
ddcfa646a41a999e074b5c784ff7af7d8405aef9
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 13419d0b4f5b097f61dde4c911de99a154f8286f
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: bazzy
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
err
expect
expect1
expect2
expected
out
output
output.out
subdir/subfile2
Dropped refs/stash@{0} (ddcfa646a41a999e074b5c784ff7af7d8405aef9)
quux
ok 66 - store updates stash ref and reflog
expecting success:
git stash clear &&
echo pig >file &&
git stash &&
stamp=$(git log -g --format="%cd" -1 refs/stash) &&
test_tick &&
echo cow >file &&
git stash &&
git stash apply "stash@{$stamp}" &&
grep pig file
Saved working directory and index state WIP on master: 307367e subdir
Saved working directory and index state WIP on master: 307367e subdir
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 13419d0b4f5b097f61dde4c911de99a154f8286f
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: bazzy
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
err
expect
expect1
expect2
expected
out
output
output.out
subdir/subfile2
pig
ok 67 - handle stash specification with spaces
expecting success:
git stash clear &&
git reset --hard &&
echo index >file &&
git add file &&
echo working >file &&
git stash
HEAD is now at 307367e subdir
Saved working directory and index state WIP on master: 307367e subdir
ok 68 - setup stash with index and worktree changes
expecting success:
cat >expect <<-EOF &&
stash@{0}
diff --git a/file b/file
index 257cc56..d26b33d 100644
--- a/file
+++ b/file
@@ -1 +1 @@
-foo
+working
EOF
git stash list --format=%gd -p >actual &&
test_cmp expect actual
ok 69 - stash list implies --first-parent -m
expecting success:
cat >expect <<-\EOF &&
stash@{0}
diff --cc file
index 257cc56,9015a7a..d26b33d
--- a/file
+++ b/file
@@@ -1,1 -1,1 +1,1 @@@
- foo
-index
++working
EOF
git stash list --format=%gd -p --cc >actual &&
test_cmp expect actual
ok 70 - stash list --cc shows combined diff
expecting success:
mv file renamed &&
git add renamed &&
git stash &&
git stash apply &&
test_path_is_file renamed &&
test_path_is_missing file
Saved working directory and index state WIP on master: 307367e subdir
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 13419d0b4f5b097f61dde4c911de99a154f8286f
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: renamed
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
err
expect
expect1
expect2
expected
out
output
output.out
subdir/subfile2
ok 71 - stash is not confused by partial renames
expecting success:
>foo &&
git add foo &&
git stash push -m "test message" &&
echo "stash@{0}: On master: test message" >expect &&
git stash list -1 >actual &&
test_cmp expect actual
Saved working directory and index state On master: test message
ok 72 - push -m shows right message
expecting success:
>foo &&
git add foo &&
git stash push -m"unspaced test message" &&
echo "stash@{0}: On master: unspaced test message" >expect &&
git stash list -1 >actual &&
test_cmp expect actual
Saved working directory and index state On master: unspaced test message
ok 73 - push -m also works without space
expecting success:
git stash clear &&
git reset --hard &&
echo quux >bazzy &&
git add bazzy &&
STASH_ID=$(git stash create) &&
git stash store -m "store m" $STASH_ID &&
echo "stash@{0}: store m" >expect &&
git stash list -1 >actual &&
test_cmp expect actual
HEAD is now at 307367e subdir
ok 74 - store -m foo shows right message
expecting success:
git stash clear &&
git reset --hard &&
echo quux >bazzy &&
git add bazzy &&
STASH_ID=$(git stash create) &&
git stash store -m"store mfoo" $STASH_ID &&
echo "stash@{0}: store mfoo" >expect &&
git stash list -1 >actual &&
test_cmp expect actual
HEAD is now at 307367e subdir
ok 75 - store -mfoo shows right message
expecting success:
git stash clear &&
git reset --hard &&
echo quux >bazzy &&
git add bazzy &&
STASH_ID=$(git stash create) &&
git stash store --message="store message=foo" $STASH_ID &&
echo "stash@{0}: store message=foo" >expect &&
git stash list -1 >actual &&
test_cmp expect actual
HEAD is now at 307367e subdir
ok 76 - store --message=foo shows right message
expecting success:
git stash clear &&
git reset --hard &&
echo quux >bazzy &&
git add bazzy &&
STASH_ID=$(git stash create) &&
git stash store --message "store message foo" $STASH_ID &&
echo "stash@{0}: store message foo" >expect &&
git stash list -1 >actual &&
test_cmp expect actual
HEAD is now at 307367e subdir
ok 77 - store --message foo shows right message
expecting success:
>foo &&
git add foo &&
git stash push -m"test mfoo" &&
echo "stash@{0}: On master: test mfoo" >expect &&
git stash list -1 >actual &&
test_cmp expect actual
Saved working directory and index state On master: test mfoo
ok 78 - push -mfoo uses right message
expecting success:
>foo &&
git add foo &&
git stash push --message "test message foo" &&
echo "stash@{0}: On master: test message foo" >expect &&
git stash list -1 >actual &&
test_cmp expect actual
Saved working directory and index state On master: test message foo
ok 79 - push --message foo is synonym for -mfoo
expecting success:
>foo &&
git add foo &&
git stash push --message="test message=foo" &&
echo "stash@{0}: On master: test message=foo" >expect &&
git stash list -1 >actual &&
test_cmp expect actual
Saved working directory and index state On master: test message=foo
ok 80 - push --message=foo is synonym for -mfoo
expecting success:
>foo &&
git add foo &&
git stash push -m "test m foo" &&
echo "stash@{0}: On master: test m foo" >expect &&
git stash list -1 >actual &&
test_cmp expect actual
Saved working directory and index state On master: test m foo
ok 81 - push -m shows right message
expecting success:
>foo &&
git add foo &&
STASH_ID=$(git stash create "create test message") &&
echo "On master: create test message" >expect &&
git show --pretty=%s -s ${STASH_ID} >actual &&
test_cmp expect actual
ok 82 - create stores correct message
expecting success:
>foo &&
git add foo &&
STASH_ID=$(git stash create test untracked) &&
echo "On master: test untracked" >expect &&
git show --pretty=%s -s ${STASH_ID} >actual &&
test_cmp expect actual
ok 83 - create with multiple arguments for the message
expecting success:
test_when_finished "git checkout master" &&
git checkout HEAD~1 &&
>foo &&
git add foo &&
STASH_ID=$(git stash create) &&
HEAD_ID=$(git rev-parse --short HEAD) &&
echo "WIP on (no branch): ${HEAD_ID} initial" >expect &&
git show --pretty=%s -s ${STASH_ID} >actual &&
test_cmp expect actual
Note: switching to 'HEAD~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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 47d5e0e initial
A foo
Previous HEAD position was 47d5e0e initial
Switched to branch 'master'
A foo
ok 84 - create in a detached state
expecting success:
>foo &&
>bar &&
git add foo bar &&
git stash push -- foo &&
test_path_is_file bar &&
test_path_is_missing foo &&
git stash pop &&
test_path_is_file foo &&
test_path_is_file bar
Saved working directory and index state WIP on master: 307367e subdir
Merging Updated upstream with Stashed changes
Merging:
virtual Updated upstream
virtual Stashed changes
found 1 common ancestor:
virtual 13419d0b4f5b097f61dde4c911de99a154f8286f
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: bar
new file: foo
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
err
expect
expect1
expect2
expected
out
output
output.out
subdir/subfile2
Dropped refs/stash@{0} (9f990e421b60e665ce2cdd87af5bdf6a4a593c73)
ok 85 - stash -- <pathspec> stashes and restores the file
expecting success:
mkdir sub &&
>foo &&
>bar &&
git add foo bar &&
(
cd sub &&
git stash push -- ../foo
) &&
test_path_is_file bar &&
test_path_is_missing foo &&
git stash pop &&
test_path_is_file foo &&
test_path_is_file bar
Saved working directory and index state WIP on master: 307367e subdir
Merging Updated upstream with Stashed changes
Merging:
virtual Updated upstream
virtual Stashed changes
found 1 common ancestor:
virtual 13419d0b4f5b097f61dde4c911de99a154f8286f
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: bar
new file: foo
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
err
expect
expect1
expect2
expected
out
output
output.out
subdir/subfile2
Dropped refs/stash@{0} (9f990e421b60e665ce2cdd87af5bdf6a4a593c73)
ok 86 - stash -- <pathspec> stashes in subdirectory
expecting success:
>foo &&
>bar &&
>extra &&
git add foo bar extra &&
git stash push -- foo bar &&
test_path_is_missing bar &&
test_path_is_missing foo &&
test_path_is_file extra &&
git stash pop &&
test_path_is_file foo &&
test_path_is_file bar &&
test_path_is_file extra
Saved working directory and index state WIP on master: 307367e subdir
Merging Updated upstream with Stashed changes
Merging:
virtual Updated upstream
virtual Stashed changes
found 1 common ancestor:
virtual 13419d0b4f5b097f61dde4c911de99a154f8286f
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: bar
new file: extra
new file: foo
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
err
expect
expect1
expect2
expected
out
output
output.out
subdir/subfile2
Dropped refs/stash@{0} (ab594abc62786a612dbd01c4f5202b83c2f2c8e1)
ok 87 - stash with multiple pathspec arguments
expecting success:
>"foo bar" &&
>foo &&
>bar &&
git add foo* &&
git stash push -- "foo b*" &&
test_path_is_missing "foo bar" &&
test_path_is_file foo &&
test_path_is_file bar &&
git stash pop &&
test_path_is_file "foo bar" &&
test_path_is_file foo &&
test_path_is_file bar
Saved working directory and index state WIP on master: 307367e subdir
Merging Updated upstream with Stashed changes
Merging:
virtual Updated upstream
virtual Stashed changes
found 1 common ancestor:
virtual 13419d0b4f5b097f61dde4c911de99a154f8286f
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: bar
new file: extra
new file: foo
new file: foo bar
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
err
expect
expect1
expect2
expected
out
output
output.out
subdir/subfile2
Dropped refs/stash@{0} (dbb06e17a7374dcb3a544ab362262ccb87c6c705)
ok 88 - stash with file including $IFS character
expecting success:
echo original >file &&
echo original >other-file &&
git commit -m "two" file other-file &&
echo modified >file &&
echo modified >other-file &&
git stash push -- "*file" &&
echo original >expect &&
test_cmp expect file &&
test_cmp expect other-file &&
git stash pop &&
echo modified >expect &&
test_cmp expect file &&
test_cmp expect other-file
[master 7a1ff97] two
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
Saved working directory and index state WIP on master: 7a1ff97 two
Merging Updated upstream with Stashed changes
Merging:
virtual Updated upstream
virtual Stashed changes
found 1 common ancestor:
virtual a63023d64e2070f44c0e6d9473a114aac83b1f03
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: bar
new file: extra
new file: foo
new file: foo bar
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
modified: other-file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
err
expect
expect1
expect2
expected
out
output
output.out
subdir/subfile2
Dropped refs/stash@{0} (1b17e8ee0a9c719e57a01ee395b86c793a7ca91b)
ok 89 - stash with pathspec matching multiple paths
expecting success:
>foo &&
git add foo &&
git commit -m "tmp" &&
git stash push -p foo >actual &&
echo "No local changes to save" >expect &&
git reset --hard HEAD~ &&
test_i18ncmp expect actual
[master 9c8fc7b] tmp
Author: A U Thor <author@example.com>
4 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 bar
create mode 100644 extra
create mode 100644 foo
create mode 100644 foo bar
HEAD is now at 7a1ff97 two
ok 90 - stash push -p with pathspec shows no changes only once
expecting success:
>foo &&
git add foo &&
git commit -m "tmp" &&
git stash push foo >actual &&
echo "No local changes to save" >expect &&
git reset --hard HEAD~ &&
test_i18ncmp expect actual
[master a73bcf2] tmp
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 foo
HEAD is now at 7a1ff97 two
ok 91 - push <pathspec>: show no changes when there are none
expecting success:
>untracked &&
test_must_fail git stash push untracked &&
test_path_is_file untracked
error: pathspec ':(,prefix:0)untracked' did not match any file(s) known to git
Did you forget to 'git add'?
ok 92 - push: <pathspec> not in the repository errors out
expecting success:
>foo &&
git add foo &&
git stash push -q >output 2>&1 &&
test_must_be_empty output
ok 93 - push: -q is quiet with changes
expecting success:
git stash push -q >output 2>&1 &&
test_must_be_empty output
ok 94 - push: -q is quiet with no changes
expecting success:
git init foo_dir &&
test_when_finished rm -rf foo_dir &&
(
cd foo_dir &&
>bar &&
test_must_fail git stash push -q >output 2>&1 &&
test_must_be_empty output
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3903-stash/foo_dir/.git/
ok 95 - push: -q is quiet even if there is no initial commit
expecting success:
>file &&
git add file &&
>untracked &&
git stash push file &&
test_path_is_file untracked
Saved working directory and index state WIP on master: 7a1ff97 two
ok 96 - untracked files are left in place when -u is not given
expecting success:
>"foo bar" &&
>foo &&
>bar &&
git add foo* &&
git stash -- "foo b*" &&
test_path_is_missing "foo bar" &&
test_path_is_file foo &&
test_path_is_file bar &&
git stash pop &&
test_path_is_file "foo bar" &&
test_path_is_file foo &&
test_path_is_file bar
Saved working directory and index state WIP on master: 7a1ff97 two
Merging Updated upstream with Stashed changes
Merging:
virtual Updated upstream
virtual Stashed changes
found 1 common ancestor:
virtual a63023d64e2070f44c0e6d9473a114aac83b1f03
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: foo
new file: foo bar
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
bar
err
expect
expect1
expect2
expected
out
output
output.out
subdir/subfile2
untracked
Dropped refs/stash@{0} (d2d5d9ecbf9dbd338a8f0449be1f475e04c81db9)
ok 97 - stash without verb with pathspec
expecting success:
git reset &&
>foo &&
>bar &&
git add foo bar &&
git commit -m "test" &&
echo "foo" >foo &&
echo "bar" >bar &&
git stash -k -- foo &&
test "",bar = $(cat foo),$(cat bar) &&
git stash pop &&
test foo,bar = $(cat foo),$(cat bar)
[master f03eb4e] test
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 bar
create mode 100644 foo
Saved working directory and index state WIP on master: f03eb4e test
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 5a657e265dfd66fccf2db01b7bacef14c5e59f15
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: bar
modified: foo
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
err
expect
expect1
expect2
expected
foo bar
out
output
output.out
subdir/subfile2
untracked
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (0d7f903492821d399d5c1e5223829567f4cf423d)
ok 98 - stash -k -- <pathspec> leaves unstaged files intact
expecting success:
git reset &&
>subdir/untracked &&
>subdir/tracked1 &&
>subdir/tracked2 &&
git add subdir/tracked* &&
git stash -- subdir/ &&
test_path_is_missing subdir/tracked1 &&
test_path_is_missing subdir/tracked2 &&
test_path_is_file subdir/untracked &&
git stash pop &&
test_path_is_file subdir/tracked1 &&
test_path_is_file subdir/tracked2 &&
test_path_is_file subdir/untracked
Unstaged changes after reset:
M bar
M foo
Saved working directory and index state WIP on master: f03eb4e test
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 5a657e265dfd66fccf2db01b7bacef14c5e59f15
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: subdir/tracked1
new file: subdir/tracked2
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: bar
modified: foo
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
err
expect
expect1
expect2
expected
foo bar
out
output
output.out
subdir/subfile2
subdir/untracked
untracked
Dropped refs/stash@{0} (4ebacd8f0073c05071f3c82c4ec891157b2fcd65)
ok 99 - stash -- <subdir> leaves untracked files in subdir intact
expecting success:
git reset &&
>subdir/untracked &&
>subdir/tracked &&
cp "$TEST_DIRECTORY"/test-binary-1.png subdir/tracked-binary &&
git add subdir/tracked* &&
git stash -- subdir/ &&
test_path_is_missing subdir/tracked &&
test_path_is_missing subdir/tracked-binary &&
test_path_is_file subdir/untracked &&
git stash pop &&
test_path_is_file subdir/tracked &&
test_path_is_file subdir/tracked-binary &&
test_path_is_file subdir/untracked
Unstaged changes after reset:
M bar
M foo
Saved working directory and index state WIP on master: f03eb4e test
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 5a657e265dfd66fccf2db01b7bacef14c5e59f15
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: subdir/tracked
new file: subdir/tracked-binary
new file: subdir/tracked1
new file: subdir/tracked2
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: bar
modified: foo
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
err
expect
expect1
expect2
expected
foo bar
out
output
output.out
subdir/subfile2
subdir/untracked
untracked
Dropped refs/stash@{0} (60d1a5af4bfadc011ffedce8d98b7e3f2bd82763)
ok 100 - stash -- <subdir> works with binary files
expecting success:
test_config user.name "A U Thor" &&
test_config user.email "a.u@thor" &&
git stash
Saved working directory and index state WIP on master: f03eb4e test
ok 101 - stash with user.name and user.email set works
expecting success:
git reset &&
>1 &&
git add 1 &&
echo "$GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>" >expect &&
git stash &&
git show -s --format="%an <%ae>" refs/stash >actual &&
test_cmp expect actual &&
>2 &&
git add 2 &&
test_config user.useconfigonly true &&
test_config stash.usebuiltin true &&
(
sane_unset GIT_AUTHOR_NAME &&
sane_unset GIT_AUTHOR_EMAIL &&
sane_unset GIT_COMMITTER_NAME &&
sane_unset GIT_COMMITTER_EMAIL &&
test_unconfig user.email &&
test_unconfig user.name &&
test_must_fail git commit -m "should fail" &&
echo "git stash <git@stash>" >expect &&
>2 &&
git stash &&
git show -s --format="%an <%ae>" refs/stash >actual &&
test_cmp expect actual
)
Saved working directory and index state WIP on master: f03eb4e test
*** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: no email was given and auto-detection is disabled
Saved working directory and index state WIP on master: f03eb4e test
ok 102 - stash works when user.name and user.email are not set
expecting success:
test_commit to-remove to-remove &&
git rm to-remove &&
git stash --keep-index &&
test_path_is_missing to-remove
[master ebe821f] to-remove
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 to-remove
rm 'to-remove'
Saved working directory and index state WIP on master: ebe821f to-remove
ok 103 - stash --keep-index with file deleted in index does not resurrect it on disk
# still have 2 known breakage(s)
# passed all remaining 101 test(s)
1..103
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4006-diff-mode.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4006-diff-mode/.git/
expecting success:
echo frotz >rezrov &&
git update-index --add rezrov &&
tree=$(git write-tree) &&
echo $tree
5189e2f1ba2c164fa2006e4f8f4e4ec56f15291e
ok 1 - setup
expecting success:
test_chmod +x rezrov &&
git diff-index $tree >current &&
sed -e "$sed_script" <current >check &&
echo ":100644 100755 X X M rezrov" >expected &&
test_cmp expected check
ok 2 - chmod
expecting success:
git commit -m rezrov &&
printf "\00\01\02\03\04\05\06" >binbin &&
git add binbin &&
git commit -m binbin
[master (root-commit) 4a8ee5f] rezrov
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100755 rezrov
[master ef5eea4] binbin
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 binbin
ok 3 - prepare binary file
expecting success:
test_chmod -x rezrov &&
cat >expect <<-\EOF &&
rezrov | 0
1 file changed, 0 insertions(+), 0 deletions(-)
EOF
git diff HEAD --stat >actual &&
test_i18ncmp expect actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 4 - --stat output after text chmod
expecting success:
tail -n 1 <expect >expect.short &&
git diff HEAD --shortstat >actual &&
test_i18ncmp expect.short actual
ok 5 - --shortstat output after text chmod
expecting success:
test_chmod +x binbin &&
cat >expect <<-EOF &&
binbin | Bin
rezrov | 0
2 files changed, 0 insertions(+), 0 deletions(-)
EOF
git diff HEAD --stat >actual &&
test_i18ncmp expect actual
ok 6 - --stat output after binary chmod
expecting success:
tail -n 1 <expect >expect.short &&
git diff HEAD --shortstat >actual &&
test_i18ncmp expect.short actual
ok 7 - --shortstat output after binary chmod
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4007-rename-3.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4007-rename-3/.git/
expecting success:
mkdir path0 path1 &&
cp "$TEST_DIRECTORY"/diff-lib/COPYING path0/COPYING &&
git update-index --add path0/COPYING &&
tree=$(git write-tree) &&
echo $tree
4be42c354151eb32b60e6ab9d4cf0e5e1eda3bc3
ok 1 - prepare reference tree
expecting success:
cp path0/COPYING path1/COPYING &&
git update-index --add --remove path0/COPYING path1/COPYING
ok 2 - prepare work tree
expecting success:
git diff-index -C --find-copies-harder $tree >current &&
compare_diff_raw current expected
ok 3 - copy detection
expecting success:
git diff-index -C --find-copies-harder --cached $tree >current &&
compare_diff_raw current expected
ok 4 - copy detection, cached
expecting success:
git diff-index -C --find-copies-harder $tree path1 >current &&
compare_diff_raw current expected
ok 5 - copy, limited to a subtree
expecting success:
rm -f path0/COPYING &&
git update-index --remove path0/COPYING
ok 6 - tweak work tree
expecting success:
git diff-index -C --find-copies-harder $tree >current &&
compare_diff_raw current expected
ok 7 - rename detection
expecting success:
git diff-index -C --find-copies-harder $tree path1 >current &&
compare_diff_raw current expected
ok 8 - rename, limited to a subtree
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4009-diff-rename-4.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4009-diff-rename-4/.git/
expecting success: cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&
echo frotz >rezrov &&
git update-index --add COPYING rezrov &&
tree=$(git write-tree) &&
echo $tree
6fb637967044b5d0edaa623ea9befe44d6843c70
ok 1 - prepare reference tree
expecting success: sed -e s/HOWEVER/However/ <COPYING >COPYING.1 &&
sed -e s/GPL/G.P.L/g <COPYING >COPYING.2 &&
rm -f COPYING &&
git update-index --add --remove COPYING COPYING.?
ok 2 - prepare work tree
expecting success: compare_diff_raw_z current expected
ok 3 - validate output from rename/copy detection (#1)
expecting success: mv COPYING.2 COPYING &&
git update-index --add --remove COPYING COPYING.1 COPYING.2
ok 4 - prepare work tree again
expecting success: compare_diff_raw_z current expected
ok 5 - validate output from rename/copy detection (#2)
expecting success: cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&
git update-index --add --remove COPYING COPYING.1
ok 6 - prepare work tree once again
expecting success: compare_diff_raw_z current expected
ok 7 - validate output from rename/copy detection (#3)
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4008-diff-break-rewrite.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4008-diff-break-rewrite/.git/
expecting success:
cat "$TEST_DIRECTORY"/diff-lib/README >file0 &&
cat "$TEST_DIRECTORY"/diff-lib/COPYING >file1 &&
blob0_id=$(git hash-object file0) &&
blob1_id=$(git hash-object file1) &&
git update-index --add file0 file1 &&
git tag reference $(git write-tree)
ok 1 - setup
expecting success:
sed -e "s/git/GIT/" file0 >file1 &&
blob2_id=$(git hash-object file1) &&
rm -f file0 &&
git update-index --remove file0 file1
ok 2 - change file1 with copy-edit of file0 and remove file0
expecting success:
git diff-index -B --cached reference >current &&
cat >expect <<-EOF &&
:100644 000000 $blob0_id $ZERO_OID D file0
:100644 100644 $blob1_id $blob2_id M100 file1
EOF
compare_diff_raw expect current
ok 3 - run diff with -B (#1)
expecting success:
git diff-index -B -M reference >current &&
cat >expect <<-EOF &&
:100644 100644 $blob0_id $blob2_id R100 file0 file1
EOF
compare_diff_raw expect current
ok 4 - run diff with -B and -M (#2)
expecting success:
rm -f file0 file1 &&
git read-tree -m reference &&
git checkout-index -f -u -a &&
mv file0 tmp &&
mv file1 file0 &&
mv tmp file1 &&
git update-index file0 file1
ok 5 - swap file0 and file1
expecting success:
git diff-index -B reference >current &&
cat >expect <<-EOF &&
:100644 100644 $blob0_id $blob1_id M100 file0
:100644 100644 $blob1_id $blob0_id M100 file1
EOF
compare_diff_raw expect current
ok 6 - run diff with -B (#3)
expecting success:
git diff-index -B -M reference >current &&
cat >expect <<-EOF &&
:100644 100644 $blob1_id $blob1_id R100 file1 file0
:100644 100644 $blob0_id $blob0_id R100 file0 file1
EOF
compare_diff_raw expect current
ok 7 - run diff with -B and -M (#4)
expecting success:
rm -f file0 &&
test_ln_s_add frotz file0 &&
slink_id=$(printf frotz | git hash-object --stdin) &&
git update-index file1
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 8 - make file0 into something completely different
expecting success:
git diff-index -B reference >current &&
cat >expect <<-EOF &&
:100644 120000 $blob0_id $slink_id T file0
:100644 100644 $blob1_id $blob0_id M100 file1
EOF
compare_diff_raw expect current
ok 9 - run diff with -B (#5)
expecting success:
git diff-index -B -M reference >current &&
# file0 changed from regular to symlink. file1 is the same as the preimage
# of file0. Because the change does not make file0 disappear, file1 is
# denoted as a copy of file0
cat >expect <<-EOF &&
:100644 120000 $blob0_id $slink_id T file0
:100644 100644 $blob0_id $blob0_id C file0 file1
EOF
compare_diff_raw expect current
ok 10 - run diff with -B -M (#6)
expecting success:
git diff-index -M reference >current &&
# This should not mistake file0 as the copy source of new file1
# due to type differences.
cat >expect <<-EOF &&
:100644 120000 $blob0_id $slink_id T file0
:100644 100644 $blob1_id $blob0_id M file1
EOF
compare_diff_raw expect current
ok 11 - run diff with -M (#7)
expecting success:
rm -f file0 file1 &&
git read-tree -m reference &&
git checkout-index -f -u -a &&
sed -e "s/git/GIT/" file0 >file1 &&
sed -e "s/git/GET/" file0 >file2 &&
blob3_id=$(git hash-object file2) &&
rm -f file0 &&
git update-index --add --remove file0 file1 file2
ok 12 - file1 edited to look like file0 and file0 rename-edited to file2
expecting success:
git diff-index -B reference >current &&
cat >expect <<-EOF &&
:100644 000000 $blob0_id $ZERO_OID D file0
:100644 100644 $blob1_id $blob2_id M100 file1
:000000 100644 $ZERO_OID $blob3_id A file2
EOF
compare_diff_raw expect current
ok 13 - run diff with -B (#8)
expecting success:
git diff-index -B -C reference >current &&
cat >expect <<-EOF &&
:100644 100644 $blob0_id $blob2_id C095 file0 file1
:100644 100644 $blob0_id $blob3_id R095 file0 file2
EOF
compare_diff_raw expect current
ok 14 - run diff with -B -C (#9)
# passed all 14 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4011-diff-symlink.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4011-diff-symlink/.git/
expecting success:
cat >expected <<-\EOF &&
diff --git a/frotz b/frotz
new file mode 120000
index 0000000..7c465af
--- /dev/null
+++ b/frotz
@@ -0,0 +1 @@
+xyzzy
\ No newline at end of file
diff --git a/nitfol b/nitfol
new file mode 100644
index 0000000..7c465af
--- /dev/null
+++ b/nitfol
@@ -0,0 +1 @@
+xyzzy
EOF
# the empty tree
git update-index &&
tree=$(git write-tree) &&
test_ln_s_add xyzzy frotz &&
echo xyzzy >nitfol &&
git update-index --add nitfol &&
GIT_DIFF_OPTS=--unified=0 git diff-index -M -p $tree >current &&
compare_diff_patch expected current
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 1 - diff new symlink and file
expecting success:
tree=$(git write-tree) &&
git update-index frotz nitfol &&
test -z "$(git diff-index --name-only $tree)"
ok 2 - diff unchanged symlink and file
expecting success:
cat >expected <<-\EOF &&
diff --git a/frotz b/frotz
deleted file mode 120000
index 7c465af..0000000
--- a/frotz
+++ /dev/null
@@ -1 +0,0 @@
-xyzzy
\ No newline at end of file
diff --git a/nitfol b/nitfol
deleted file mode 100644
index 7c465af..0000000
--- a/nitfol
+++ /dev/null
@@ -1 +0,0 @@
-xyzzy
EOF
mv frotz frotz2 &&
mv nitfol nitfol2 &&
git diff-index -M -p $tree >current &&
compare_diff_patch expected current
ok 3 - diff removed symlink and file
expecting success:
>expected &&
rm -f frotz nitfol &&
echo xyzzy >nitfol &&
test-tool chmtime +10 nitfol &&
if test_have_prereq SYMLINKS
then
ln -s xyzzy frotz
else
printf xyzzy >frotz
# the symlink property propagates from the index
fi &&
git diff-index -M -p $tree >current &&
compare_diff_patch expected current &&
>expected &&
git diff-index -M -p -w $tree >current &&
compare_diff_patch expected current
ok 4 - diff identical, but newly created symlink and file
expecting success:
cat >expected <<-\EOF &&
diff --git a/frotz b/frotz
index 7c465af..df1db54 120000
--- a/frotz
+++ b/frotz
@@ -1 +1 @@
-xyzzy
\ No newline at end of file
+yxyyz
\ No newline at end of file
diff --git a/nitfol b/nitfol
index 7c465af..df1db54 100644
--- a/nitfol
+++ b/nitfol
@@ -1 +1 @@
-xyzzy
+yxyyz
EOF
rm -f frotz &&
if test_have_prereq SYMLINKS
then
ln -s yxyyz frotz
else
printf yxyyz >frotz
# the symlink property propagates from the index
fi &&
echo yxyyz >nitfol &&
git diff-index -M -p $tree >current &&
compare_diff_patch expected current
ok 5 - diff different symlink and file
expecting success:
ln -s narf pinky &&
ln -s take\ over brain &&
test_must_fail git diff --no-index pinky brain >output 2>output.err &&
grep narf output &&
test_must_be_empty output.err
-narf
ok 6 - diff symlinks with non-existing targets
expecting success:
echo "*.bin diff=bin" >>.gitattributes &&
echo content >file.bin &&
ln -s file.bin link.bin &&
git add -N file.bin link.bin
ok 7 - setup symlinks with attributes
expecting success:
cat >expect <<-\EOF &&
diff --git a/file.bin b/file.bin
new file mode 100644
index 0000000..d95f3ad
Binary files /dev/null and b/file.bin differ
diff --git a/link.bin b/link.bin
new file mode 120000
index 0000000..dce41ec
--- /dev/null
+++ b/link.bin
@@ -0,0 +1 @@
+file.bin
\ No newline at end of file
EOF
git config diff.bin.binary true &&
git diff file.bin link.bin >actual &&
test_cmp expect actual
ok 8 - symlinks do not respect userdiff config by path
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4010-diff-pathspec.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4010-diff-pathspec/.git/
expecting success: echo frotz >file0 &&
mkdir path1 &&
echo rezrov >path1/file1 &&
git update-index --add file0 path1/file1 &&
tree=$(git write-tree) &&
echo "$tree" &&
echo nitfol >file0 &&
echo yomin >path1/file1 &&
git update-index file0 path1/file1
6b4658eda9b6c5385f027bc54abf3276b6effd05
ok 1 - setup
expecting success: git diff-index --cached $tree -- path >current &&
compare_diff_raw current expected
ok 2 - limit to path should show nothing
expecting success: git diff-index --cached $tree -- path1 >current &&
compare_diff_raw current expected
ok 3 - limit to path1 should show path1/file1
expecting success: git diff-index --cached $tree -- path1/ >current &&
compare_diff_raw current expected
ok 4 - limit to path1/ should show path1/file1
expecting success: git diff-index --cached $tree -- "*file1" >current &&
compare_diff_raw current expected
ok 5 - "*file1" should show path1/file1
expecting success: git diff-index --cached $tree -- file0 >current &&
compare_diff_raw current expected
ok 6 - limit to file0 should show file0
expecting success: git diff-index --cached $tree -- file0/ >current &&
compare_diff_raw current expected
ok 7 - limit to file0/ should emit nothing.
expecting success:
tree2=$(git write-tree) &&
echo "$tree2" &&
git diff-tree -r --name-only $tree $tree2 -- pa path1/a >current &&
test_must_be_empty current
54d8765b122f32157e847ce3924180cb2ec778fc
ok 8 - diff-tree pathspec
expecting success:
git diff-tree --name-only $EMPTY_TREE $tree -- "f*" >result &&
echo file0 >expected &&
test_cmp expected result
ok 9 - diff-tree with wildcard shows dir also matches
expecting success:
git diff-tree -r --name-only $EMPTY_TREE $tree -- "*file1" >result &&
echo path1/file1 >expected &&
test_cmp expected result
ok 10 - diff-tree -r with wildcard
expecting success:
git diff-tree --name-only $tree $tree2 -- "path1/f*" >result &&
echo path1 >expected &&
test_cmp expected result
ok 11 - diff-tree with wildcard shows dir also matches
expecting success:
git diff-tree -r --name-only $tree $tree2 -- "path1/*file1" >result &&
echo path1/file1 >expected &&
test_cmp expected result
ok 12 - diff-tree -r with wildcard from beginning
expecting success:
git diff-tree -r --name-only $tree $tree2 -- "path1/f*" >result &&
echo path1/file1 >expected &&
test_cmp expected result
ok 13 - diff-tree -r with wildcard
expecting success:
test_tick &&
git init submod &&
( cd submod && test_commit first ) &&
git add submod &&
git commit -m first &&
( cd submod && test_commit second ) &&
git add submod &&
git commit -m second
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4010-diff-pathspec/submod/.git/
[master (root-commit) 1e96f59] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 first.t
warning: adding embedded git repository: submod
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> submod
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached submod
hint:
hint: See "git help submodule" for more information.
[master (root-commit) f9d7654] first
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 file0
create mode 100644 path1/file1
create mode 160000 submod
[master 1bf6dc5] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 second.t
[master f1afec5] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 14 - setup submodules
expecting success:
git diff --name-only HEAD^ HEAD submod >expect &&
git diff --name-only HEAD^ HEAD submod/ >actual &&
test_cmp expect actual
ok 15 - diff-tree ignores trailing slash on submodule path
expecting success:
mkdir path2 &&
echo rezrov >path2/file1 &&
git update-index --add path2/file1 &&
tree3=$(git write-tree) &&
git diff --name-only $tree $tree3 -- "path2*1" "path1*1" >actual &&
cat <<-\EOF >expect &&
path1/file1
path2/file1
EOF
test_cmp expect actual
ok 16 - diff multiple wildcard pathspecs
expecting success:
git diff --name-only HEAD^ submod >expect &&
git diff --name-only HEAD^ submod/ >actual &&
test_cmp expect actual
ok 17 - diff-cache ignores trailing slash on submodule path
# passed all 17 test(s)
1..17
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4012-diff-binary.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4012-diff-binary/.git/
expecting success:
echo AIT >a && echo BIT >b && echo CIT >c && echo DIT >d &&
git update-index --add a b c d &&
echo git >a &&
cat "$TEST_DIRECTORY"/test-binary-1.png >b &&
echo git >c &&
cat b b >d
ok 1 - prepare repository
expecting success:
git diff >diff &&
git apply --stat --summary <diff >current &&
test_i18ncmp expected current
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 2 - apply --stat output for binary file change
expecting success:
tail -n 1 expected >expect &&
git diff --shortstat >current &&
test_i18ncmp expect current
ok 3 - diff --shortstat output for binary file change
expecting success:
echo " 1 file changed, 0 insertions(+), 0 deletions(-)" >expected &&
git diff --shortstat -- b >current &&
test_i18ncmp expected current
ok 4 - diff --shortstat output for binary file change only
expecting success:
git diff >diff &&
git apply --numstat <diff >current &&
test_cmp expect.binary-numstat current
ok 5 - apply --numstat notices binary file change
expecting success:
git diff --binary >diff &&
git apply --numstat <diff >current &&
test_cmp expect.binary-numstat current
ok 6 - apply --numstat understands diff --binary format
expecting success:
git diff >output &&
sed -e "s/-CIT/xCIT/" <output >broken &&
test_must_fail git apply --stat --summary broken 2>detected &&
detected=$(cat detected) &&
detected=$(expr "$detected" : "error.*at line \\([0-9]*\\)\$") &&
detected=$(sed -ne "${detected}p" broken) &&
test "$detected" = xCIT
ok 7 - apply detecting corrupt patch correctly
expecting success:
git diff --binary | sed -e "s/-CIT/xCIT/" >broken &&
test_must_fail git apply --stat --summary broken 2>detected &&
detected=$(cat detected) &&
detected=$(expr "$detected" : "error.*at line \\([0-9]*\\)\$") &&
detected=$(sed -ne "${detected}p" broken) &&
test "$detected" = xCIT
ok 8 - apply detecting corrupt patch correctly
expecting success: git commit -a -m initial
[master (root-commit) 5966e99] initial
Author: A U Thor <author@example.com>
4 files changed, 2 insertions(+)
create mode 100644 a
create mode 100644 b
create mode 100644 c
create mode 100644 d
ok 9 - initial commit
expecting success:
echo AIT >a && mv b e && echo CIT >c && cat e >d &&
git update-index --add --remove a b c d e &&
tree0=$(git write-tree) &&
git diff --cached --binary >current &&
git apply --stat --summary current
a | 2 +-
c | 2 +-
d | Bin
e | 0
4 files changed, 2 insertions(+), 2 deletions(-)
rename b => e (100%)
ok 10 - diff-index with --binary
expecting success:
git reset --hard &&
git apply --binary --index <current &&
tree1=$(git write-tree) &&
test "$tree1" = "$tree0"
HEAD is now at 5966e99 initial
ok 11 - apply binary patch
expecting success:
echo Q | q_to_nul >binary &&
# hide error code from diff, which just indicates differences
test_might_fail git diff --binary --no-index /dev/null binary >current &&
rm binary &&
git apply --binary <current &&
echo Q >expected &&
nul_to_q <binary >actual &&
test_cmp expected actual
ok 12 - diff --no-index with binary creation
expecting success:
printf "\01\00%1024d" 1 >binfile &&
git add binfile &&
i=0 &&
while test $i -lt 10000; do
echo $i &&
i=$(($i + 1))
done >textfile &&
git add textfile &&
git diff --cached --stat binfile textfile >output &&
grep " | " output >actual &&
test_cmp expect actual
ok 13 - diff --stat with binary files and big change count
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3906-stash-submodule.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/.git/
checking known breakage:
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
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update_sub1/.git/
[master (root-commit) 5dfffec] Base inside first submodule
Author: A U Thor <author@example.com>
3 files changed, 4 insertions(+)
create mode 100644 .gitignore
create mode 100644 file1
create mode 100644 file2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update_sub2/.git/
[master (root-commit) 1fd6086] nested submodule 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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update_repo/.git/
[master (root-commit) f8776b7] 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
Switched to a new branch 'add_sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update_repo/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update_repo/uninitialized_sub'...
done.
[add_sub1 4315a13] Add sub1
Author: A U Thor <author@example.com>
2 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 uninitialized_sub
Switched to a new branch 'remove_sub1'
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
[remove_sub1 9e04196] Revert "Add sub1"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:34 2019 +0000
3 files changed, 9 deletions(-)
delete mode 100644 .gitmodules
delete mode 160000 sub1
delete mode 160000 uninitialized_sub
Switched to a new branch 'modify_sub1'
Switched to a new branch 'modifications'
[modifications 2294726] modified file2 and added file3
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 file3
To /<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update_sub1
* [new branch] modifications -> modifications
[modify_sub1 c644b36] Modify sub1
Author: A U Thor <author@example.com>
Switched to a new branch 'add_nested_sub'
Switched to a new branch 'add_nested_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update_repo/sub1/sub2'...
done.
[add_nested_sub 996170f] add a nested submodule
Author: A U Thor <author@example.com>
2 files changed, 5 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub2
[add_nested_sub 331bc3e] update submodule, that updates a nested submodule
Author: A U Thor <author@example.com>
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
[modify_sub1_recursively c5baa98] make a change in nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
[modify_sub1_recursively f2a3132] update nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[modify_sub1_recursively 7260564] update sub1, that updates nested sub
Author: A U Thor <author@example.com>
To /<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update_sub1
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
To /<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update_sub2
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
Cleared directory 'sub2'
Submodule 'sub2' (../submodule_update_sub2) unregistered for path 'sub2'
Switched to a new branch 'replace_sub1_with_directory'
Submodule path 'sub1': checked out '5dfffec21f90853c276ccb8e09409f098d38427e'
Previous HEAD position was 5dfffec Base inside first submodule
Switched to branch 'modifications'
rm 'sub1'
[replace_sub1_with_directory 42d9f21] 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
Switched to a new branch 'replace_directory_with_sub1'
Removing sub1/file3
Removing sub1/file2
Removing sub1/file1
Adding sub1
[replace_directory_with_sub1 84100da] Revert "Replace sub1 with directory"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:36 2019 +0000
4 files changed, 4 insertions(+), 3 deletions(-)
delete mode 100644 sub1/file1
delete mode 100644 sub1/file2
delete mode 100644 sub1/file3
Switched to a new branch 'replace_sub1_with_file'
rm 'sub1'
[replace_sub1_with_file cb3b3b2] 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'
[replace_file_with_sub1 b28e09b] Revert "Replace sub1 with file"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:36 2019 +0000
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
Switched to a new branch 'invalid_sub1'
[invalid_sub1 ab9fd6d] Invalid sub1 commit
Author: A U Thor <author@example.com>
Switched to a new branch 'valid_sub1'
[valid_sub1 25c3ce7] Revert "Invalid sub1 commit"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:28:36 2019 +0000
warning: unable to rmdir 'uninitialized_sub': Directory not empty
Switched to branch 'master'
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Saved working directory and index state WIP on no_submodule: f8776b7 Base
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual ec38489b3f8eda08fda17055ad272abc24bdf929
error: uninitialized_sub: is a directory - add files inside instead
fatal: Unable to process path uninitialized_sub
not ok 1 - git_stash: added submodule creates empty directory # TODO known breakage
checking known breakage:
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Saved working directory and index state WIP on no_submodule: f8776b7 Base
--- expect 2019-08-14 07:28:37.916069136 +0000
+++ actual 2019-08-14 07:28:38.032070576 +0000
@@ -2,5 +2,3 @@
expect
file1
file2
-
-sub1:
not ok 2 - git_stash: added submodule leaves existing empty directory alone # TODO known breakage
checking known breakage:
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
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Saved working directory and index state WIP on replace_sub1_with_file: cb3b3b2 Replace sub1 with file
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual ff87f15dc637527e3f12b675b614afbbf15566cb
On branch replace_sub1_with_file
Your branch is up to date with 'origin/replace_sub1_with_file'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .gitmodules
deleted: sub1
no changes added to commit (use "git add" and/or "git commit -a")
'actual' is not empty, it contains:
:100644 100644 af3a0c56edfba1a28f50ada5ec2832a7f2f9b907 cf8d5939a67bef46c85d0f50732c37b6fac1d92a M .gitmodules
:160000 100644 5dfffec21f90853c276ccb8e09409f098d38427e d95f3ad14dee633a758d2e331151e950dd13e4ed T sub1
not ok 3 - git_stash: replace tracked file with submodule creates empty directory # TODO known breakage
checking known breakage:
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
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Saved working directory and index state WIP on replace_sub1_with_directory: 42d9f21 Replace sub1 with directory
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 7aebe0d23096d6a610b467e4e7f9a68d51e64c9a
Removing sub1/file3
Removing sub1/file2
Removing sub1/file1
Adding sub1
On branch replace_sub1_with_directory
Your branch is up to date with 'origin/replace_sub1_with_directory'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .gitmodules
deleted: sub1/file1
deleted: sub1/file2
deleted: sub1/file3
no changes added to commit (use "git add" and/or "git commit -a")
'actual' is not empty, it contains:
:100644 100644 af3a0c56edfba1a28f50ada5ec2832a7f2f9b907 cf8d5939a67bef46c85d0f50732c37b6fac1d92a M .gitmodules
:000000 100644 0000000000000000000000000000000000000000 587be6b4c3f93f93c489c0111bba5596147a26cb A sub1/file1
:000000 100644 0000000000000000000000000000000000000000 b68025345d5301abad4d9ec9166f455243a0d746 A sub1/file2
:000000 100644 0000000000000000000000000000000000000000 587be6b4c3f93f93c489c0111bba5596147a26cb A sub1/file3
not ok 4 - git_stash: replace directory with submodule # TODO known breakage
checking known breakage:
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '5dfffec21f90853c276ccb8e09409f098d38427e'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Saved working directory and index state WIP on add_sub1: 4315a13 Add sub1
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 68d1aa43aa764aac83f5ef4db1d815296241a44d
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
On branch add_sub1
Your branch is up to date with 'origin/add_sub1'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: .gitmodules
no changes added to commit (use "git add" and/or "git commit -a")
'actual' is not empty, it contains:
:000000 100644 0000000000000000000000000000000000000000 af3a0c56edfba1a28f50ada5ec2832a7f2f9b907 A .gitmodules
:000000 160000 0000000000000000000000000000000000000000 5dfffec21f90853c276ccb8e09409f098d38427e A uninitialized_sub
not ok 5 - git_stash: removed submodule leaves submodule directory and its contents in place # TODO known breakage
checking known breakage:
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '5dfffec21f90853c276ccb8e09409f098d38427e'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Saved working directory and index state WIP on add_sub1: 4315a13 Add sub1
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 68d1aa43aa764aac83f5ef4db1d815296241a44d
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
On branch add_sub1
Your branch is up to date with 'origin/add_sub1'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: .gitmodules
no changes added to commit (use "git add" and/or "git commit -a")
'actual' is not empty, it contains:
:000000 100644 0000000000000000000000000000000000000000 af3a0c56edfba1a28f50ada5ec2832a7f2f9b907 A .gitmodules
:000000 160000 0000000000000000000000000000000000000000 5dfffec21f90853c276ccb8e09409f098d38427e A uninitialized_sub
not ok 6 - git_stash: removed submodule leaves submodule containing a .git directory alone # TODO known breakage
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '5dfffec21f90853c276ccb8e09409f098d38427e'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: Untracked working tree file 'sub1/file1' would be overwritten by merge.
ok 7 - git_stash: replace submodule with a directory must fail
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '5dfffec21f90853c276ccb8e09409f098d38427e'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: Untracked working tree file 'sub1/file1' would be overwritten by merge.
ok 8 - git_stash: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '5dfffec21f90853c276ccb8e09409f098d38427e'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Saved working directory and index state WIP on add_sub1: 4315a13 Add sub1
--- expect 2019-08-14 07:28:43.696140379 +0000
+++ actual 2019-08-14 07:28:43.820141899 +0000
@@ -4,7 +4,5 @@
file2
sub1:
-file1
-file2
uninitialized_sub:
Submodule sub1 is not populated
not ok 9 - git_stash: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '5dfffec21f90853c276ccb8e09409f098d38427e'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Saved working directory and index state WIP on add_sub1: 4315a13 Add sub1
--- expect 2019-08-14 07:28:44.648152033 +0000
+++ actual 2019-08-14 07:28:44.776153599 +0000
@@ -4,7 +4,5 @@
file2
sub1:
-file1
-file2
uninitialized_sub:
diff: sub1/.git: No such file or directory
not ok 10 - git_stash: replace submodule containing a .git directory with a file must fail # TODO known breakage
checking known breakage:
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '5dfffec21f90853c276ccb8e09409f098d38427e'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
No local changes to save
--- expect 2019-08-14 07:28:45.488162300 +0000
+++ actual 2019-08-14 07:28:45.568163277 +0000
@@ -1,3 +1,4 @@
+M sub1
actual
expect
file1
not ok 11 - git_stash: modified submodule does not update submodule work tree # TODO known breakage
checking known breakage:
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t3906-stash-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '5dfffec21f90853c276ccb8e09409f098d38427e'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
No local changes to save
--- expect 2019-08-14 07:28:46.480174407 +0000
+++ actual 2019-08-14 07:28:46.528174993 +0000
@@ -1,3 +1,4 @@
+M sub1
actual
expect
file1
not ok 12 - git_stash: modified submodule does not update submodule work tree to invalid commit # TODO known breakage
checking known breakage:
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
No local changes to save
--- expect 2019-08-14 07:28:46.884179334 +0000
+++ actual 2019-08-14 07:28:46.920179773 +0000
@@ -1,3 +1,4 @@
+M sub1
actual
expect
file1
not ok 13 - git_stash: modified submodule does not update submodule work tree from invalid commit # TODO known breakage
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
error: Untracked working tree file 'sub1' would be overwritten by merge.
ok 14 - git_stash: added submodule doesn't remove untracked unignored file with same name
# still have 11 known breakage(s)
# passed all remaining 3 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t3701-add-interactive.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3701-add-interactive/.git/
expecting success:
echo content >file &&
git add file &&
echo more >>file &&
echo lines >>file
ok 1 - setup (initial)
expecting success:
git add -i </dev/null >output &&
grep "+1/-0 *+2/-0 file" output
1: +1/-0 +2/-0 file
ok 2 - status works (initial)
expecting success:
cat >expected <<-\EOF
new file mode 100644
index 0000000..d95f3ad
--- /dev/null
+++ b/file
@@ -0,0 +1 @@
+content
EOF
ok 3 - setup expected
expecting success:
test_write_lines d 1 | git add -i >output &&
sed -ne "/new file/,/content/p" <output >diff &&
diff_cmp expected diff
ok 4 - diff works (initial)
expecting success:
git add file &&
test_write_lines r 1 | git add -i &&
git ls-files >output &&
! grep . output
staged unstaged path
1: +3/-0 nothing file
*** 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> staged unstaged path
1: +3/-0 nothing [f]ile
Revert>> staged unstaged path
* 1: +3/-0 nothing [f]ile
Revert>>
rm 'file'
reverted 1 path
*** 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 5 - revert works (initial)
expecting success:
echo baseline >file &&
git add file &&
git commit -m commit &&
echo content >>file &&
git add file &&
echo more >>file &&
echo lines >>file
[master (root-commit) 4d7c16d] commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 6 - setup (commit)
expecting success:
git add -i </dev/null >output &&
grep "+1/-0 *+2/-0 file" output
1: +1/-0 +2/-0 file
ok 7 - status works (commit)
expecting success:
cat >expected <<-\EOF
index 180b47c..b6f2c08 100644
--- a/file
+++ b/file
@@ -1 +1,2 @@
baseline
+content
EOF
ok 8 - setup expected
expecting success:
test_write_lines d 1 | git add -i >output &&
sed -ne "/^index/,/content/p" <output >diff &&
diff_cmp expected diff
ok 9 - diff works (commit)
expecting success:
git add file &&
test_write_lines r 1 | git add -i &&
git add -i </dev/null >output &&
grep "unchanged *+3/-0 file" output
staged unstaged path
1: +3/-0 nothing file
*** 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> staged unstaged path
1: +3/-0 nothing [f]ile
Revert>> staged unstaged path
* 1: +3/-0 nothing [f]ile
Revert>>
reverted 1 path
*** 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.
1: unchanged +3/-0 file
ok 10 - revert works (commit)
expecting success:
cat >expected <<-\EOF
EOF
ok 11 - setup expected
expecting success:
test_set_editor : &&
test_write_lines e a | git add -p &&
git diff > diff &&
diff_cmp expected diff
diff --git a/file b/file
index 180b47c..f910ae9 100644
--- a/file
+++ b/file
@@ -1 +1,4 @@
baseline
+content
+more
+lines
Stage this hunk [y,n,q,a,d,e,?]?
ok 12 - dummy edit works
expecting success:
cat >patch <<-\EOF
@@ -1,1 +1,4 @@
this
+patch
-does not
apply
EOF
ok 13 - setup patch
expecting success:
write_script "fake_editor.sh" <<-\EOF &&
mv -f "$1" oldpatch &&
mv -f patch "$1"
EOF
test_set_editor "$(pwd)/fake_editor.sh"
ok 14 - setup fake editor
expecting success:
git reset &&
test_write_lines e n d | git add -p >output &&
grep "hunk does not apply" output
Unstaged changes after reset:
M file
error: patch failed: file:1
error: file: patch does not apply
Stage this hunk [y,n,q,a,d,e,?]? Your edited hunk does not apply. Edit again (saying "no" discards!) [y/n]? @@ -1 +1,4 @@
ok 15 - bad edit rejected
expecting success:
cat >patch <<-\EOF
this patch
is garbage
EOF
ok 16 - setup patch
expecting success:
git reset &&
test_write_lines e n d | git add -p >output &&
grep "hunk does not apply" output
Unstaged changes after reset:
M file
error: corrupt patch at line 6
Stage this hunk [y,n,q,a,d,e,?]? Your edited hunk does not apply. Edit again (saying "no" discards!) [y/n]? @@ -1 +1,4 @@
ok 17 - garbage edit rejected
expecting success:
cat >patch <<-\EOF
@@ -1,0 +1,0 @@
baseline
+content
+newcontent
+lines
EOF
ok 18 - setup patch
expecting success:
cat >expected <<-\EOF
diff --git a/file b/file
index b5dd6c9..f910ae9 100644
--- a/file
+++ b/file
@@ -1,4 +1,4 @@
baseline
content
-newcontent
+more
lines
EOF
ok 19 - setup expected
expecting success:
test_write_lines e n d | git add -p &&
git diff >output &&
diff_cmp expected output
diff --git a/file b/file
index 180b47c..f910ae9 100644
--- a/file
+++ b/file
@@ -1 +1,4 @@
baseline
+content
+more
+lines
Stage this hunk [y,n,q,a,d,e,?]?
ok 20 - real edit works
expecting success:
test_write_lines a "" b "" c >file &&
git add file &&
test_write_lines a "" d "" c >file
ok 21 - setup file
expecting success:
SP=" " &&
NULL="" &&
cat >patch <<-EOF
@@ -1,4 +1,4 @@
a
$NULL
-b
+f
$SP
c
EOF
ok 22 - setup patch
expecting success:
cat >expected <<-EOF
diff --git a/file b/file
index b5dd6c9..f910ae9 100644
--- a/file
+++ b/file
@@ -1,5 +1,5 @@
a
$SP
-f
+d
$SP
c
EOF
ok 23 - setup expected
expecting success:
test_write_lines e n q | git add -p 2>error &&
test_must_be_empty error &&
git diff >output &&
diff_cmp expected output
diff --git a/file b/file
index bda3f38..90b7c9d 100644
--- a/file
+++ b/file
@@ -1,5 +1,5 @@
a
-b
+d
c
Stage this hunk [y,n,q,a,d,e,?]?
ok 24 - edit can strip spaces from empty context lines
expecting success:
git reset &&
echo file >.gitignore &&
echo changed >file &&
echo y | git add -p file &&
git diff >output &&
git reset &&
git commit -am commit &&
git diff >expected &&
diff_cmp expected output &&
git reset --hard HEAD^
Unstaged changes after reset:
M file
diff --git a/file b/file
index 180b47c..5ea2ed4 100644
--- a/file
+++ b/file
@@ -1 +1 @@
-baseline
+changed
Stage this hunk [y,n,q,a,d,e,?]?
Unstaged changes after reset:
M file
[master 8035436] commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at 4d7c16d commit
ok 25 - skip files similarly as commit -a
checking prerequisite: FILEMODE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test "$(git config --bool core.filemode)" = true
)
prerequisite FILEMODE ok
expecting success:
git reset --hard &&
echo content >>file &&
chmod +x file &&
printf "n\\ny\\n" | git add -p &&
git show :file | grep content &&
git diff file | grep "new mode"
HEAD is now at 4d7c16d commit
diff --git a/file b/file
index 180b47c..b6f2c08
--- a/file
+++ b/file
old mode 100644
new mode 100755
Stage mode change [y,n,q,a,d,j,J,g,/,?]? @@ -1 +1,2 @@
baseline
+content
Stage this hunk [y,n,q,a,d,K,g,/,e,?]?
content
new mode 100755
ok 26 - patch does not affect mode
expecting success:
git reset --hard &&
echo content >>file &&
chmod +x file &&
printf "y\\nn\\n" | git add -p &&
git diff --cached file | grep "new mode" &&
git diff file | grep "+content"
HEAD is now at 4d7c16d commit
diff --git a/file b/file
index 180b47c..b6f2c08
--- a/file
+++ b/file
old mode 100644
new mode 100755
Stage mode change [y,n,q,a,d,j,J,g,/,?]? @@ -1 +1,2 @@
baseline
+content
Stage this hunk [y,n,q,a,d,K,g,/,e,?]?
new mode 100755
+content
ok 27 - stage mode but not hunk
expecting success:
git reset --hard &&
echo content >>file &&
chmod +x file &&
printf "y\\ny\\n" | git add -p &&
git diff --cached file | grep "new mode" &&
git diff --cached file | grep "+content" &&
test -z "$(git diff file)"
HEAD is now at 4d7c16d commit
diff --git a/file b/file
index 180b47c..b6f2c08
--- a/file
+++ b/file
old mode 100644
new mode 100755
Stage mode change [y,n,q,a,d,j,J,g,/,?]? @@ -1 +1,2 @@
baseline
+content
Stage this hunk [y,n,q,a,d,K,g,/,e,?]?
new mode 100755
+content
ok 28 - stage mode and hunk
expecting success:
git reset --hard &&
test_chmod +x file &&
echo content >>file
HEAD is now at 4d7c16d commit
ok 29 - setup again
expecting success:
cat >patch <<-\EOF
index 180b47c..b6f2c08 100644
--- a/file
+++ b/file
@@ -1,2 +1,4 @@
+firstline
baseline
content
+lastline
\ No newline at end of file
EOF
ok 30 - setup patch
expecting success:
echo diff --git a/file b/file >expected &&
cat patch |sed "/^index/s/ 100644/ 100755/" >>expected &&
cat >expected-output <<-\EOF
--- a/file
+++ b/file
@@ -1,2 +1,4 @@
+firstline
baseline
content
+lastline
\ No newline at end of file
@@ -1,2 +1,3 @@
+firstline
baseline
content
@@ -1,2 +2,3 @@
baseline
content
+lastline
\ No newline at end of file
EOF
ok 31 - setup expected
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
expecting success:
git commit -am "clear local changes" &&
git apply patch &&
printf "%s\n" s y y | git add -p file 2>error |
sed -n -e "s/^Stage this hunk[^@]*\(@@ .*\)/\1/" \
-e "/^[-+@ \\\\]"/p >output &&
test_must_be_empty error &&
git diff --cached >diff &&
diff_cmp expected diff &&
test_cmp expected-output output
[master 7379ca2] clear local changes
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
mode change 100644 => 100755 file
ok 32 - add first line works
expecting success:
cat >expected <<-\EOF
diff --git a/non-empty b/non-empty
deleted file mode 100644
index d95f3ad..0000000
--- a/non-empty
+++ /dev/null
@@ -1 +0,0 @@
-content
EOF
ok 33 - setup expected
expecting success:
git reset --hard &&
echo content >non-empty &&
git add non-empty &&
git commit -m non-empty &&
rm non-empty &&
echo y | git add -p non-empty &&
git diff --cached >diff &&
diff_cmp expected diff
HEAD is now at 7379ca2 clear local changes
[master 8cb7566] non-empty
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 non-empty
diff --git a/non-empty b/non-empty
index d95f3ad..0000000
--- a/non-empty
+++ /dev/null
deleted file mode 100644
@@ -1 +0,0 @@
-content
Stage deletion [y,n,q,a,d,?]?
ok 34 - deleting a non-empty file
expecting success:
cat >expected <<-\EOF
diff --git a/empty b/empty
deleted file mode 100644
index e69de29..0000000
EOF
ok 35 - setup expected
expecting success:
git reset --hard &&
> empty &&
git add empty &&
git commit -m empty &&
rm empty &&
echo y | git add -p empty &&
git diff --cached >diff &&
diff_cmp expected diff
HEAD is now at 8cb7566 non-empty
[master 95f0f89] empty
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 empty
diff --git a/empty b/empty
index e69de29..0000000
deleted file mode 100644
Stage deletion [y,n,q,a,d,?]?
ok 36 - deleting an empty file
expecting success:
git reset --hard &&
test_write_lines 10 20 30 40 50 60 >test &&
git add test &&
test_tick &&
git commit -m test &&
test_write_lines 10 15 20 21 22 23 24 30 40 50 60 >test
HEAD is now at 95f0f89 empty
[master 74ec7e5] test
Author: A U Thor <author@example.com>
1 file changed, 6 insertions(+)
create mode 100644 test
ok 37 - split hunk setup
expecting success:
# Split, say Edit and do nothing. Then:
#
# 1. Broken version results in a patch that does not apply and
# only takes [y/n] (edit again) so the first q is discarded
# and then n attempts to discard the edit. Repeat q enough
# times to get out.
#
# 2. Correct version applies the (not)edited version, and asks
# about the next hunk, against which we say q and program
# exits.
printf "%s\n" s e q n q q |
EDITOR=: git add -p &&
git diff >actual &&
! grep "^+15" actual
diff --git a/test b/test
index 0889435..26b5645 100644
--- a/test
+++ b/test
@@ -1,5 +1,10 @@
10
+15
20
+21
+22
+23
+24
30
40
50
Stage this hunk [y,n,q,a,d,s,e,?]? Split into 2 hunks.
@@ -1,2 +1,3 @@
10
+15
20
Stage this hunk [y,n,q,a,d,j,J,g,/,e,?]? @@ -2,4 +3,8 @@
20
+21
+22
+23
+24
30
40
50
Stage this hunk [y,n,q,a,d,K,g,/,e,?]?
ok 38 - split hunk "add -p (edit)"
checking known breakage:
test_write_lines 5 10 20 21 30 31 40 50 60 >test &&
git reset &&
# test sequence is s(plit), n(o), y(es), e(dit)
# q n q q is there to make sure we exit at the end.
printf "%s\n" s n y e q n q q |
EDITOR=: git add -p 2>error &&
test_must_be_empty error &&
git diff >actual &&
! grep "^+31" actual
Unstaged changes after reset:
M test
diff --git a/test b/test
index 0889435..47ab15d 100644
--- a/test
+++ b/test
@@ -1,6 +1,9 @@
+5
10
20
+21
30
+31
40
50
60
Stage this hunk [y,n,q,a,d,s,e,?]? Split into 3 hunks.
@@ -1,2 +1,3 @@
+5
10
20
Stage this hunk [y,n,q,a,d,j,J,g,/,e,?]? @@ -1,3 +2,4 @@
10
20
+21
30
Stage this hunk [y,n,q,a,d,K,j,J,g,/,e,?]? @@ -3,4 +5,5 @@
30
+31
40
50
60
Stage this hunk [y,n,q,a,d,K,g,/,e,?]? Your edited hunk does not apply. Edit again (saying "no" discards!) [y/n]? Your edited hunk does not apply. Edit again (saying "no" discards!) [y/n]? @@ -1,2 +1,3 @@
+5
10
20
Stage this hunk [y,n,q,a,d,j,J,g,/,e,?]?
'error' is not empty, it contains:
error: patch failed: test:1
error: test: patch does not apply
not ok 39 - split hunk "add -p (no, yes, edit)" # TODO known breakage
expecting success:
git reset --hard &&
test_commit conflict &&
test_commit non-conflict &&
git checkout -b side &&
test_commit side conflict.t &&
git checkout master &&
test_commit master conflict.t &&
test_must_fail git merge side &&
echo changed >non-conflict.t &&
echo y | git add -p >output &&
! grep a/conflict.t output &&
cat >expected <<-\EOF &&
* Unmerged path conflict.t
diff --git a/non-conflict.t b/non-conflict.t
index f766221..5ea2ed4 100644
--- a/non-conflict.t
+++ b/non-conflict.t
@@ -1 +1 @@
-non-conflict
+changed
EOF
git diff --cached >diff &&
diff_cmp expected diff
HEAD is now at 74ec7e5 test
[master e6f2aa9] conflict
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 conflict.t
[master f99c501] non-conflict
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 non-conflict.t
Switched to a new branch 'side'
[side 965d504] side
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'master'
[master f028032] master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
warning: refname 'side' is ambiguous.
warning: refname 'side' is ambiguous.
Merging:
f028032 master
virtual side
found 1 common ancestor:
f99c501 non-conflict
Auto-merging conflict.t
CONFLICT (content): Merge conflict in conflict.t
Automatic merge failed; fix conflicts and then commit the result.
ignoring unmerged: conflict.t
ok 40 - patch mode ignores unmerged entries
checking prerequisite: TTY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq PERL &&
# Reading from the pty master seems to get stuck _sometimes_
# on Mac OS X 10.5.0, using Perl 5.10.0 or 5.8.9.
#
# Reproduction recipe: run
#
# i=0
# while ./test-terminal.perl echo hi $i
# do
# : $((i = $i + 1))
# done
#
# After 2000 iterations or so it hangs.
# https://rt.cpan.org/Ticket/Display.html?id=65692
#
test "$(uname -s)" != Darwin &&
perl "$TEST_DIRECTORY"/test-terminal.perl \
sh -c "test -t 1 && test -t 2"
)
prerequisite TTY ok
expecting success:
git reset --hard &&
echo content >test &&
printf y | test_terminal git add -p >output 2>&1 &&
# We do not want to depend on the exact coloring scheme
# git uses for diffs, so just check that we saw some kind of color.
grep "$(printf "\\033")" output
HEAD is now at f028032 master
[1mdiff --git a/test b/test[m
[1mindex 0889435..d95f3ad 100644[m
[1m--- a/test[m
[1m+++ b/test[m
[36m@@ -1,6 +1 @@[m
[31m-10[m
[31m-20[m
[31m-30[m
[31m-40[m
[31m-50[m
[31m-60[m
[32m+[m[32mcontent[m
[1;34mStage this hunk [y,n,q,a,d,e,?]? [m
ok 41 - diffs can be colorized
expecting success:
git reset --hard &&
echo content >test &&
test_config interactive.diffFilter "sed s/^/foo:/" &&
printf y | test_terminal git add -p >output 2>&1 &&
# avoid depending on the exact coloring or content of the prompts,
# and just make sure we saw our diff prefixed
grep foo:.*content output
HEAD is now at f028032 master
foo:[32m+[m[32mcontent[m
ok 42 - diffFilter filters diff
expecting success:
git reset --hard &&
echo content >test &&
test_config interactive.diffFilter "echo too-short" &&
printf y | test_must_fail test_terminal git add -p
HEAD is now at f028032 master
fatal: mismatched output from interactive.diffFilter
hint: Your filter must maintain a one-to-one correspondence
hint: between its input and output lines.
ok 43 - detect bogus diffFilter output
expecting success:
git reset --hard &&
echo one >file &&
echo two >test &&
git add -i <<-\EOF &&
patch
test
y
quit
EOF
echo test >expect &&
git diff --cached --name-only >actual &&
diff_cmp expect actual
HEAD is now at f028032 master
staged unstaged path
1: unchanged +1/-2 file
2: unchanged +1/-6 test
*** 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> staged unstaged path
1: unchanged +1/-2 [f]ile
2: unchanged +1/-6 [t]est
Patch update>> staged unstaged path
1: unchanged +1/-2 [f]ile
* 2: unchanged +1/-6 [t]est
Patch update>> diff --git a/test b/test
index 0889435..f719efd 100644
--- a/test
+++ b/test
@@ -1,6 +1 @@
-10
-20
-30
-40
-50
-60
+two
Stage this hunk [y,n,q,a,d,e,?]?
*** 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 44 - patch-mode via -i prompts for files
expecting success:
git reset --hard &&
mkdir -p subdir &&
echo base >one.c &&
echo base >subdir/two.c &&
git add "*.c" &&
git commit -m base &&
echo change >one.c &&
echo change >subdir/two.c &&
git add -p "*.c" <<-\EOF &&
y
y
EOF
cat >expect <<-\EOF &&
one.c
subdir/two.c
EOF
git diff --cached --name-only >actual &&
test_cmp expect actual
HEAD is now at f028032 master
[master 0796da4] base
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 one.c
create mode 100644 subdir/two.c
diff --git a/one.c b/one.c
index df967b9..0835e4f 100644
--- a/one.c
+++ b/one.c
@@ -1 +1 @@
-base
+change
Stage this hunk [y,n,q,a,d,e,?]?
diff --git a/subdir/two.c b/subdir/two.c
index df967b9..0835e4f 100644
--- a/subdir/two.c
+++ b/subdir/two.c
@@ -1 +1 @@
-base
+change
Stage this hunk [y,n,q,a,d,e,?]?
ok 45 - add -p handles globs
expecting success:
git reset --hard &&
echo base >relpath.c &&
git add "*.c" &&
git commit -m relpath &&
echo change >relpath.c &&
mkdir -p subdir &&
git -C subdir add -p .. 2>error <<-\EOF &&
y
EOF
test_must_be_empty error &&
cat >expect <<-\EOF &&
relpath.c
EOF
git diff --cached --name-only >actual &&
test_cmp expect actual
HEAD is now at 0796da4 base
[master 05f4352] relpath
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 relpath.c
diff --git a/relpath.c b/relpath.c
index df967b9..0835e4f 100644
--- a/relpath.c
+++ b/relpath.c
@@ -1 +1 @@
-base
+change
Stage this hunk [y,n,q,a,d,e,?]?
ok 46 - add -p handles relative paths
expecting success:
git reset --hard &&
echo content >not-changed &&
git add not-changed &&
git commit -m "add not-changed file" &&
echo change >file &&
GIT_TRACE=$(pwd)/trace.out git add -p . <<-\EOF &&
y
EOF
# we know that "file" must be mentioned since we actually
# update it, but we want to be sure that our "." pathspec
# was not expanded into the argument list of any command.
# So look only for "not-changed".
! grep -E "^trace: (built-in|exec|run_command): .*not-changed" trace.out
HEAD is now at 05f4352 relpath
[master b296aad] add not-changed file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 not-changed
diff --git a/file b/file
index b6f2c08..0835e4f 100755
--- a/file
+++ b/file
@@ -1,2 +1 @@
-baseline
-content
+change
Stage this hunk [y,n,q,a,d,e,?]?
ok 47 - add -p does not expand argument lists
expecting success:
git reset --hard &&
echo change >>file &&
test_config core.commentChar "\$" &&
echo e | GIT_EDITOR=true git add -p &&
git diff --exit-code
HEAD is now at b296aad add not-changed file
diff --git a/file b/file
index b6f2c08..59630e0 100755
--- a/file
+++ b/file
@@ -1,2 +1,3 @@
baseline
content
+change
Stage this hunk [y,n,q,a,d,e,?]?
ok 48 - hunk-editing handles custom comment char
expecting success:
git reset --hard &&
echo change >>file &&
test_config color.ui always &&
echo y | git add -p &&
echo file >expect &&
git diff --cached --name-only >actual &&
test_cmp expect actual
HEAD is now at b296aad add not-changed file
[1mdiff --git a/file b/file[m
[1mindex b6f2c08..59630e0 100755[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -1,2 +1,3 @@[m
baseline[m
content[m
[32m+[m[32mchange[m
[1;34mStage this hunk [y,n,q,a,d,e,?]? [m
ok 49 - add -p works even with color.ui=always
expecting success:
test_create_repo for-submodules &&
(
cd for-submodules &&
test_commit initial &&
test_create_repo dirty-head &&
(
cd dirty-head &&
test_commit initial
) &&
cp -R dirty-head dirty-otherwise &&
cp -R dirty-head dirty-both-ways &&
git add dirty-head &&
git add dirty-otherwise dirty-both-ways &&
git commit -m initial &&
cd dirty-head &&
test_commit updated &&
cd ../dirty-both-ways &&
test_commit updated &&
echo dirty >>initial &&
: >untracked &&
cd ../dirty-otherwise &&
echo dirty >>initial &&
: >untracked
) &&
git -C for-submodules diff-files --name-only >actual &&
cat >expected <<-\EOF &&
dirty-both-ways
dirty-head
dirty-otherwise
EOF
test_cmp expected actual &&
git -C for-submodules diff-files --name-only --ignore-submodules=dirty >actual &&
cat >expected <<-\EOF &&
dirty-both-ways
dirty-head
EOF
test_cmp expected actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3701-add-interactive/for-submodules/.git/
[master (root-commit) 31243c6] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t3701-add-interactive/for-submodules/dirty-head/.git/
[master (root-commit) 167ffd6] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
warning: adding embedded git repository: dirty-head
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> dirty-head
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached dirty-head
hint:
hint: See "git help submodule" for more information.
warning: adding embedded git repository: dirty-both-ways
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> dirty-both-ways
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached dirty-both-ways
hint:
hint: See "git help submodule" for more information.
warning: adding embedded git repository: dirty-otherwise
[master 6489f21] initial
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 160000 dirty-both-ways
create mode 160000 dirty-head
create mode 160000 dirty-otherwise
[master f10ac08] updated
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 updated.t
[master f86bdf4] updated
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 updated.t
ok 50 - setup different kinds of dirty submodules
expecting success:
git -C for-submodules add -i </dev/null >output &&
grep dirty-head output &&
grep dirty-both-ways output &&
! grep dirty-otherwise output
2: unchanged +1/-1 dirty-head
1: unchanged +1/-1 dirty-both-ways
ok 51 - status ignores dirty submodules (except HEAD)
expecting success:
git reset --hard &&
test_write_lines a a a a a a a a a a a >a &&
git add a &&
git commit -m a &&
test_write_lines c b a a a a a a a b a a a a >a &&
test_write_lines a a a a a a a b a a a a >expected-1 &&
test_write_lines b a a a a a a a b a a a a >expected-2 &&
# check editing can cope with missing header and deleted context lines
# as well as changes to other lines
test_write_lines +b " a" >patch
HEAD is now at b296aad add not-changed file
[master 5b2f0e9] a
Author: A U Thor <author@example.com>
1 file changed, 11 insertions(+)
create mode 100644 a
ok 52 - set up pathological context
expecting success:
git reset &&
printf "%s\n" n y |
git add -p &&
git cat-file blob :a >actual &&
test_cmp expected-1 actual
Unstaged changes after reset:
M a
diff --git a/a b/a
index f04e1e1..f39a0f0 100644
--- a/a
+++ b/a
@@ -1,3 +1,5 @@
+c
+b
a
a
a
Stage this hunk [y,n,q,a,d,j,J,g,/,e,?]? @@ -5,6 +7,7 @@ a
a
a
a
+b
a
a
a
Stage this hunk [y,n,q,a,d,K,g,/,e,?]?
ok 53 - add -p works with pathological context lines
expecting success:
git reset &&
# n q q below is in case edit fails
printf "%s\n" e y n q q |
git add -p &&
git cat-file blob :a >actual &&
test_cmp expected-2 actual
Unstaged changes after reset:
M a
diff --git a/a b/a
index f04e1e1..f39a0f0 100644
--- a/a
+++ b/a
@@ -1,3 +1,5 @@
+c
+b
a
a
a
Stage this hunk [y,n,q,a,d,j,J,g,/,e,?]? @@ -5,6 +7,7 @@ a
a
a
a
+b
a
a
a
Stage this hunk [y,n,q,a,d,K,g,/,e,?]?
ok 54 - add -p patch editing works with pathological context lines
expecting success:
test_write_lines a a a a a a >a &&
git add a &&
test_write_lines a b a b a b a b a b a > a&&
test_write_lines s n n y q | git checkout -p &&
test_write_lines a b a b a a b a b a >expect &&
test_cmp expect a
diff --git a/a b/a
index 786e4a7..477d4da 100644
--- a/a
+++ b/a
@@ -1,6 +1,11 @@
a
+b
a
+b
a
+b
a
+b
a
+b
a
Discard this hunk from worktree [y,n,q,a,d,s,e,?]? Split into 5 hunks.
@@ -1,2 +1,3 @@
a
+b
a
Discard this hunk from worktree [y,n,q,a,d,j,J,g,/,e,?]? @@ -2,2 +3,3 @@
a
+b
a
Discard this hunk from worktree [y,n,q,a,d,K,j,J,g,/,e,?]? @@ -3,2 +5,3 @@
a
+b
a
Discard this hunk from worktree [y,n,q,a,d,K,j,J,g,/,e,?]? @@ -4,2 +7,3 @@
a
+b
a
Discard this hunk from worktree [y,n,q,a,d,K,j,J,g,/,e,?]?
ok 55 - checkout -p works with pathological context lines
# still have 1 known breakage(s)
# passed all remaining 54 test(s)
1..55
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4016-diff-quote.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4016-diff-quote/.git/
expecting success:
echo P0.0 >"$P0.0" &&
echo P0.1 >"$P0.1" &&
echo P0.2 >"$P0.2" &&
echo P0.3 >"$P0.3" &&
echo P1.0 >"$P1.0" &&
echo P1.2 >"$P1.2" &&
echo P1.3 >"$P1.3" &&
git add . &&
git commit -m initial &&
git mv "$P0.0" "R$P0.0" &&
git mv "$P0.1" "R$P1.0" &&
git mv "$P0.2" "R$P2.0" &&
git mv "$P0.3" "R$P3.0" &&
git mv "$P1.0" "R$P0.1" &&
git mv "$P1.2" "R$P2.1" &&
git mv "$P1.3" "R$P3.1" &&
:
[master (root-commit) 5df01b9] initial
Author: A U Thor <author@example.com>
7 files changed, 7 insertions(+)
create mode 100644 "pathname\twith HT.0"
create mode 100644 "pathname\twith HT.2"
create mode 100644 "pathname\twith HT.3"
create mode 100644 pathname.0
create mode 100644 pathname.1
create mode 100644 pathname.2
create mode 100644 pathname.3
ok 1 - setup
expecting success:
cat >expect <<\EOF
rename pathname.1 => "Rpathname\twith HT.0" (100%)
rename pathname.3 => "Rpathname\nwith LF.0" (100%)
rename "pathname\twith HT.3" => "Rpathname\nwith LF.1" (100%)
rename pathname.2 => Rpathname with SP.0 (100%)
rename "pathname\twith HT.2" => Rpathname with SP.1 (100%)
rename pathname.0 => Rpathname.0 (100%)
rename "pathname\twith HT.0" => Rpathname.1 (100%)
EOF
ok 2 - setup expected files
expecting success:
git diff --summary -M HEAD >actual &&
test_cmp expect actual
ok 3 - git diff --summary -M HEAD
expecting success:
cat >expect <<-\EOF &&
0 0 pathname.1 => "Rpathname\twith HT.0"
0 0 pathname.3 => "Rpathname\nwith LF.0"
0 0 "pathname\twith HT.3" => "Rpathname\nwith LF.1"
0 0 pathname.2 => Rpathname with SP.0
0 0 "pathname\twith HT.2" => Rpathname with SP.1
0 0 pathname.0 => Rpathname.0
0 0 "pathname\twith HT.0" => Rpathname.1
EOF
git diff --numstat -M HEAD >actual &&
test_cmp expect actual
ok 4 - git diff --numstat -M HEAD
expecting success:
cat >expect <<-\EOF &&
pathname.1 => "Rpathname\twith HT.0" | 0
pathname.3 => "Rpathname\nwith LF.0" | 0
"pathname\twith HT.3" => "Rpathname\nwith LF.1" | 0
pathname.2 => Rpathname with SP.0 | 0
"pathname\twith HT.2" => Rpathname with SP.1 | 0
pathname.0 => Rpathname.0 | 0
"pathname\twith HT.0" => Rpathname.1 | 0
7 files changed, 0 insertions(+), 0 deletions(-)
EOF
git diff --stat -M HEAD >actual &&
test_i18ncmp expect actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 5 - git diff --stat -M HEAD
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4017-diff-retval.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4017-diff-retval/.git/
expecting success:
echo "1 " >a &&
git add . &&
git commit -m zeroth &&
echo 1 >a &&
git add . &&
git commit -m first &&
echo 2 >b &&
git add . &&
git commit -a -m second
[master (root-commit) 637b27b] zeroth
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
[master 6b5f61b] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 7f3bdda] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b
ok 1 - setup
expecting success:
git diff --quiet -w HEAD^^ HEAD^
ok 2 - git diff --quiet -w HEAD^^ HEAD^
expecting success:
test_must_fail git diff --quiet HEAD^^ HEAD^
ok 3 - git diff --quiet HEAD^^ HEAD^
expecting success:
test_must_fail git diff --quiet -w HEAD^ HEAD
ok 4 - git diff --quiet -w HEAD^ HEAD
expecting success:
test_expect_code 1 git diff-tree --exit-code HEAD^ HEAD
:000000 100644 0000000000000000000000000000000000000000 0cfbf08886fca9a91cb753ec8734c84fcbe52c9f A b
ok 5 - git diff-tree HEAD^ HEAD
expecting success:
git diff-tree --exit-code HEAD^ HEAD -- a
ok 6 - git diff-tree HEAD^ HEAD -- a
expecting success:
test_expect_code 1 git diff-tree --exit-code HEAD^ HEAD -- b
:000000 100644 0000000000000000000000000000000000000000 0cfbf08886fca9a91cb753ec8734c84fcbe52c9f A b
ok 7 - git diff-tree HEAD^ HEAD -- b
expecting success:
echo $(git rev-parse HEAD) | test_expect_code 1 git diff-tree --exit-code --stdin
7f3bddabe4ed7c8f66cec9dceeadcf156b157252
:000000 100644 0000000000000000000000000000000000000000 0cfbf08886fca9a91cb753ec8734c84fcbe52c9f A b
ok 8 - echo HEAD | git diff-tree --stdin
expecting success:
git diff-tree --exit-code HEAD HEAD
ok 9 - git diff-tree HEAD HEAD
expecting success:
git diff-files --exit-code
ok 10 - git diff-files
expecting success:
git diff-index --exit-code --cached HEAD
ok 11 - git diff-index --cached HEAD
expecting success:
test_expect_code 1 git diff-index --exit-code --cached HEAD^
:000000 100644 0000000000000000000000000000000000000000 0cfbf08886fca9a91cb753ec8734c84fcbe52c9f A b
ok 12 - git diff-index --cached HEAD^
expecting success:
echo text >>b &&
echo 3 >c &&
git add . &&
test_expect_code 1 git diff-index --exit-code --cached HEAD^
:000000 100644 0000000000000000000000000000000000000000 6ba94de6433d6530a0fb55e5e6da01023a4bc9e3 A b
:000000 100644 0000000000000000000000000000000000000000 00750edc07d6415dcc07ae0351e9397b0222b7ba A c
ok 13 - git diff-index --cached HEAD^
expecting success:
git commit -m "text in b" &&
test_expect_code 1 git diff-tree -p --exit-code -Stext HEAD^ HEAD -- b
[master 2eb6710] text in b
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 c
diff --git a/b b/b
index 0cfbf08..6ba94de 100644
--- a/b
+++ b/b
@@ -1 +1,2 @@
2
+text
ok 14 - git diff-tree -Stext HEAD^ HEAD -- b
expecting success:
git diff-tree -p --exit-code -Snot-found HEAD^ HEAD -- b
ok 15 - git diff-tree -Snot-found HEAD^ HEAD -- b
expecting success:
echo 3 >>c &&
test_expect_code 1 git diff-files --exit-code
:100644 100644 00750edc07d6415dcc07ae0351e9397b0222b7ba 0000000000000000000000000000000000000000 M c
ok 16 - git diff-files
expecting success:
git update-index c &&
test_expect_code 1 git diff-index --exit-code --cached HEAD
:100644 100644 00750edc07d6415dcc07ae0351e9397b0222b7ba a5c8806279fa7d6b7d04418a47e21b7e89ab18f8 M c
ok 17 - git diff-index --cached HEAD
expecting success:
git diff --check --exit-code
ok 18 - --check --exit-code returns 0 for no difference
expecting success:
echo "good" > a &&
test_expect_code 1 git diff --check --exit-code
ok 19 - --check --exit-code returns 1 for a clean difference
expecting success:
echo "bad " >> a &&
test_expect_code 3 git diff --check --exit-code
a:2: trailing whitespace.
+bad
ok 20 - --check --exit-code returns 3 for a dirty difference
expecting success:
test_expect_code 2 git --no-pager diff --check
a:2: trailing whitespace.
+bad
ok 21 - --check with --no-pager returns 2 for dirty difference
expecting success:
echo "" >>a &&
test_expect_code 2 git --no-pager diff --check
a:2: trailing whitespace.
+bad
a:3: new blank line at EOF.
ok 22 - check should test not just the last line
expecting success:
git reset --hard &&
git checkout HEAD^ &&
echo binary >>b &&
git commit -m "side" b &&
test_must_fail git merge master &&
git add b &&
test_expect_code 2 git --no-pager diff --cached --check >test.out &&
test 3 = $(grep "conflict marker" test.out | wc -l) &&
git reset --hard
HEAD is now at 2eb6710 text in b
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 7f3bdda second
[detached HEAD 8e7fb45] side
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Merging:
8e7fb45 side
virtual master
found 1 common ancestor:
7f3bdda second
Auto-merging b
CONFLICT (content): Merge conflict in b
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at 8e7fb45 side
ok 23 - check detects leftover conflict markers
expecting success:
git reset --hard &&
echo ">>>>>>> boo" >>b &&
echo "======" >>a &&
git diff --check a &&
test_expect_code 2 git diff --check b &&
git reset --hard &&
echo ">>>>>>>> boo" >>b &&
echo "========" >>a &&
git diff --check &&
echo "b conflict-marker-size=8" >.gitattributes &&
test_expect_code 2 git diff --check b &&
git diff --check a &&
git reset --hard
HEAD is now at 8e7fb45 side
b:3: leftover conflict marker
HEAD is now at 8e7fb45 side
b:3: leftover conflict marker
HEAD is now at 8e7fb45 side
ok 24 - check honors conflict marker length
# passed all 24 test(s)
1..24
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4015-diff-whitespace.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4015-diff-whitespace/.git/
expecting success:
cat <<-\EOF >x &&
do {
nothing;
} while (0);
EOF
git update-index --add x &&
cat <<-\EOF >x &&
do
{
nothing;
}
while (0);
EOF
cat <<-\EOF >expect &&
diff --git a/x b/x
index adf3937..6edc172 100644
--- a/x
+++ b/x
@@ -1,3 +1,5 @@
-do {
+do
+{
nothing;
-} while (0);
+}
+while (0);
EOF
git diff >out &&
test_cmp expect out &&
git diff -w >out &&
test_cmp expect out &&
git diff -b >out &&
test_cmp expect out
ok 1 - Ray Lehtiniemi's example
expecting success:
tr Q "\015" <<-\EOF >x &&
whitespace at beginning
whitespace change
whitespace in the middle
whitespace at end
unchanged line
CR at endQ
EOF
git update-index x &&
tr "_" " " <<-\EOF >x &&
_ whitespace at beginning
whitespace change
white space in the middle
whitespace at end__
unchanged line
CR at end
EOF
tr "Q_" "\015 " <<-\EOF >expect &&
diff --git a/x b/x
index d99af23..22d9f73 100644
--- a/x
+++ b/x
@@ -1,6 +1,6 @@
-whitespace at beginning
-whitespace change
-whitespace in the middle
-whitespace at end
+ whitespace at beginning
+whitespace change
+white space in the middle
+whitespace at end__
unchanged line
-CR at endQ
+CR at end
EOF
git diff >out &&
test_cmp expect out &&
git diff -w >out &&
test_must_be_empty out &&
git diff -w -b >out &&
test_must_be_empty out &&
git diff -w --ignore-space-at-eol >out &&
test_must_be_empty out &&
git diff -w -b --ignore-space-at-eol >out &&
test_must_be_empty out &&
git diff -w --ignore-cr-at-eol >out &&
test_must_be_empty out &&
tr "Q_" "\015 " <<-\EOF >expect &&
diff --git a/x b/x
index d99af23..22d9f73 100644
--- a/x
+++ b/x
@@ -1,6 +1,6 @@
-whitespace at beginning
+_ whitespace at beginning
whitespace change
-whitespace in the middle
+white space in the middle
whitespace at end__
unchanged line
CR at end
EOF
git diff -b >out &&
test_cmp expect out &&
git diff -b --ignore-space-at-eol >out &&
test_cmp expect out &&
git diff -b --ignore-cr-at-eol >out &&
test_cmp expect out &&
tr "Q_" "\015 " <<-\EOF >expect &&
diff --git a/x b/x
index d99af23..22d9f73 100644
--- a/x
+++ b/x
@@ -1,6 +1,6 @@
-whitespace at beginning
-whitespace change
-whitespace in the middle
+_ whitespace at beginning
+whitespace change
+white space in the middle
whitespace at end__
unchanged line
CR at end
EOF
git diff --ignore-space-at-eol >out &&
test_cmp expect out &&
git diff --ignore-space-at-eol --ignore-cr-at-eol >out &&
test_cmp expect out &&
tr "Q_" "\015 " <<-\EOF >expect &&
diff --git a/x b/x
index_d99af23..22d9f73 100644
--- a/x
+++ b/x
@@ -1,6 +1,6 @@
-whitespace at beginning
-whitespace change
-whitespace in the middle
-whitespace at end
+_ whitespace at beginning
+whitespace_ _change
+white space in the middle
+whitespace at end__
unchanged line
CR at end
EOF
git diff --ignore-cr-at-eol >out &&
test_cmp expect out
ok 2 - another test, without options
expecting success:
test_seq 5 >x &&
git update-index x &&
test_seq 5 | sed "/3/i\\
" >x &&
git diff --ignore-blank-lines >out &&
test_must_be_empty out
ok 3 - ignore-blank-lines: only new lines
expecting success:
test_seq 5 >x &&
git update-index x &&
test_seq 5 | sed "/3/i\\
" >x &&
git diff -w --ignore-blank-lines >out &&
test_must_be_empty out
ok 4 - ignore-blank-lines: only new lines with space
expecting success:
cat <<-\EOF >x &&
1
2
3
4
5
6
7
EOF
git update-index x &&
cat <<-\EOF >x &&
change
1
2
3
4
5
6
7
EOF
git diff --inter-hunk-context=100 --ignore-blank-lines >out.tmp &&
cat <<-\EOF >expected &&
diff --git a/x b/x
--- a/x
+++ b/x
@@ -1,6 +1,7 @@
+change
+
1
2
-
3
4
5
EOF
compare_diff_patch expected out.tmp
ok 5 - ignore-blank-lines: after change
expecting success:
cat <<-\EOF >x &&
1
2
3
4
5
6
7
EOF
git update-index x &&
cat <<-\EOF >x &&
1
2
3
4
5
6
7
change
EOF
git diff --inter-hunk-context=100 --ignore-blank-lines >out.tmp &&
cat <<-\EOF >expected &&
diff --git a/x b/x
--- a/x
+++ b/x
@@ -4,5 +4,7 @@
3
4
5
+
6
7
+change
EOF
compare_diff_patch expected out.tmp
ok 6 - ignore-blank-lines: before change
expecting success:
cat <<-\EOF >x &&
1
2
3
4
5
6
7
8
9
10
EOF
git update-index x &&
cat <<-\EOF >x &&
change
1
2
3
4
5
6
7
8
9
10
change
EOF
git diff --ignore-blank-lines >out.tmp &&
cat <<-\EOF >expected &&
diff --git a/x b/x
--- a/x
+++ b/x
@@ -1,5 +1,7 @@
+change
1
2
+
3
4
5
@@ -8,5 +8,7 @@
6
7
8
+
9
10
+change
EOF
compare_diff_patch expected out.tmp
ok 7 - ignore-blank-lines: between changes
expecting success:
test_seq 10 >x &&
git update-index x &&
cat <<-\EOF >x &&
change
1
2
3
4
5
6
7
8
9
10
change
EOF
git diff --inter-hunk-context=2 --ignore-blank-lines >out.tmp &&
cat <<-\EOF >expected &&
diff --git a/x b/x
--- a/x
+++ b/x
@@ -1,10 +1,15 @@
+change
1
2
+
3
4
5
+
6
7
8
9
+
10
+change
EOF
compare_diff_patch expected out.tmp
ok 8 - ignore-blank-lines: between changes (with interhunkctx)
expecting success:
test_seq 10 >x &&
git update-index x &&
cat <<-\EOF >x &&
change
1
2
3
4
5
6
7
8
9
10
change
EOF
git diff --inter-hunk-context=4 --ignore-blank-lines >out.tmp &&
cat <<-\EOF >expected &&
diff --git a/x b/x
--- a/x
+++ b/x
@@ -1,3 +1,4 @@
+change
1
2
3
@@ -8,3 +15,4 @@
8
9
10
+change
EOF
compare_diff_patch expected out.tmp
ok 9 - ignore-blank-lines: scattered spaces
expecting success:
test_seq 6 >x &&
git update-index x &&
cat <<-\EOF >x &&
change
1
2
3
4
5
6
change
EOF
git diff --inter-hunk-context=4 --ignore-blank-lines >out.tmp &&
cat <<-\EOF >expected &&
diff --git a/x b/x
--- a/x
+++ b/x
@@ -1,6 +1,11 @@
+change
1
2
3
+
4
+
5
+
6
+change
EOF
compare_diff_patch expected out.tmp
ok 10 - ignore-blank-lines: spaces coalesce
expecting success:
test_seq 16 >x &&
git update-index x &&
cat <<-\EOF >x &&
change
1
2
3
4
5
change
6
7
8
9
10
11
change
12
13
14
15
16
change
EOF
git diff --ignore-blank-lines >out.tmp &&
cat <<-\EOF >expected &&
diff --git a/x b/x
--- a/x
+++ b/x
@@ -1,8 +1,11 @@
+change
1
2
+
3
4
5
+change
6
7
8
@@ -9,8 +13,11 @@
9
10
11
+change
12
13
14
+
15
16
+change
EOF
compare_diff_patch expected out.tmp
ok 11 - ignore-blank-lines: mix changes and blank lines
expecting success:
# This is indented with SP HT SP.
echo " foo();" >x &&
git diff --check | grep "space before tab in indent"
x:1: space before tab in indent.
ok 12 - check mixed spaces and tabs in indent
expecting success:
# This is indented with HT SP HT.
echo " foo();" >x &&
git diff --check | grep "space before tab in indent"
x:1: space before tab in indent.
ok 13 - check mixed tabs and spaces in indent
expecting success:
git commit -m "snapshot" &&
echo "foo();" >x &&
git diff --check
[master (root-commit) 4a78c39] snapshot
Author: A U Thor <author@example.com>
1 file changed, 16 insertions(+)
create mode 100644 x
ok 14 - check with no whitespace errors
expecting success:
echo "foo(); " >x &&
test_must_fail git diff --check
x:1: trailing whitespace.
+foo();
ok 15 - check with trailing whitespace
expecting success:
# indent has space followed by hard tab
echo " foo();" >x &&
test_must_fail git diff --check
x:1: space before tab in indent.
+ foo();
ok 16 - check with space before tab in indent
expecting success:
git checkout x &&
git diff --check --exit-code
Updated 1 path from the index
ok 17 - --check and --exit-code are not exclusive
expecting success:
git diff --check --quiet
ok 18 - --check and --quiet are not exclusive
expecting success:
echo "foo();" >x &&
git add x &&
git diff --cached --check
ok 19 - check staged with no whitespace errors
expecting success:
echo "foo(); " >x &&
git add x &&
test_must_fail git diff --cached --check
x:1: trailing whitespace.
+foo();
ok 20 - check staged with trailing whitespace
expecting success:
# indent has space followed by hard tab
echo " foo();" >x &&
git add x &&
test_must_fail git diff --cached --check
x:1: space before tab in indent.
+ foo();
ok 21 - check staged with space before tab in indent
expecting success:
echo "foo();" >x &&
git add x &&
git diff-index --check HEAD
ok 22 - check with no whitespace errors (diff-index)
expecting success:
echo "foo(); " >x &&
git add x &&
test_must_fail git diff-index --check HEAD
x:1: trailing whitespace.
+foo();
ok 23 - check with trailing whitespace (diff-index)
expecting success:
# indent has space followed by hard tab
echo " foo();" >x &&
git add x &&
test_must_fail git diff-index --check HEAD
x:1: space before tab in indent.
+ foo();
ok 24 - check with space before tab in indent (diff-index)
expecting success:
echo "foo();" >x &&
git add x &&
git diff-index --cached --check HEAD
ok 25 - check staged with no whitespace errors (diff-index)
expecting success:
echo "foo(); " >x &&
git add x &&
test_must_fail git diff-index --cached --check HEAD
x:1: trailing whitespace.
+foo();
ok 26 - check staged with trailing whitespace (diff-index)
expecting success:
# indent has space followed by hard tab
echo " foo();" >x &&
git add x &&
test_must_fail git diff-index --cached --check HEAD
x:1: space before tab in indent.
+ foo();
ok 27 - check staged with space before tab in indent (diff-index)
expecting success:
echo "foo();" >x &&
git commit -m "new commit" x &&
git diff-tree --check HEAD^ HEAD
[master 206d37f] new commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 16 deletions(-)
ok 28 - check with no whitespace errors (diff-tree)
expecting success:
echo "foo(); " >x &&
git commit -m "another commit" x &&
test_must_fail git diff-tree --check HEAD^ HEAD
[master 648d909] another commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
x:1: trailing whitespace.
+foo();
ok 29 - check with trailing whitespace (diff-tree)
expecting success:
# indent has space followed by hard tab
echo " foo();" >x &&
git commit -m "yet another" x &&
test_must_fail git diff-tree --check HEAD^ HEAD
[master be63fe5] yet another
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
x:1: space before tab in indent.
+ foo();
ok 30 - check with space before tab in indent (diff-tree)
expecting success:
test_when_finished "git reset --hard HEAD^" &&
# create a whitespace error that should be ignored
echo "* -whitespace" >.gitattributes &&
git add .gitattributes &&
echo "foo(); " >x &&
git add x &&
git commit -m "add trailing space" &&
# with a worktree diff-tree ignores the whitespace error
git diff-tree --root --check HEAD &&
# without a worktree diff-tree still ignores the whitespace error
git -C .git diff-tree --root --check HEAD
[master a600200] add trailing space
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 .gitattributes
a600200f5197f7c9650c954cc2a5c62d3273ba68
a600200f5197f7c9650c954cc2a5c62d3273ba68
HEAD is now at be63fe5 yet another
ok 31 - check with ignored trailing whitespace attr (diff-tree)
expecting success:
git config core.whitespace "-trailing-space" &&
echo "foo (); " >x &&
git diff --check
ok 32 - check trailing whitespace (trailing-space: off)
expecting success:
git config core.whitespace "trailing-space" &&
echo "foo (); " >x &&
test_must_fail git diff --check
x:1: trailing whitespace.
+foo ();
ok 33 - check trailing whitespace (trailing-space: on)
expecting success:
# indent contains space followed by HT
git config core.whitespace "-space-before-tab" &&
echo " foo ();" >x &&
git diff --check
ok 34 - check space before tab in indent (space-before-tab: off)
expecting success:
# indent contains space followed by HT
git config core.whitespace "space-before-tab" &&
echo " foo (); " >x &&
test_must_fail git diff --check
x:1: trailing whitespace, space before tab in indent.
+ foo ();
ok 35 - check space before tab in indent (space-before-tab: on)
expecting success:
git config core.whitespace "-indent-with-non-tab" &&
echo " foo ();" >x &&
git diff --check
ok 36 - check spaces as indentation (indent-with-non-tab: off)
expecting success:
git config core.whitespace "indent-with-non-tab" &&
echo " foo ();" >x &&
test_must_fail git diff --check
x:1: indent with spaces.
+ foo ();
ok 37 - check spaces as indentation (indent-with-non-tab: on)
expecting success:
git config core.whitespace "indent-with-non-tab,tabwidth=9" &&
git diff --check
ok 38 - ditto, but tabwidth=9
expecting success:
git config core.whitespace "indent-with-non-tab" &&
echo " foo ();" >x &&
test_must_fail git diff --check
x:1: indent with spaces.
+ foo ();
ok 39 - check tabs and spaces as indentation (indent-with-non-tab: on)
expecting success:
git config core.whitespace "indent-with-non-tab,tabwidth=10" &&
test_must_fail git diff --check
x:1: indent with spaces.
+ foo ();
ok 40 - ditto, but tabwidth=10
expecting success:
git config core.whitespace "indent-with-non-tab,tabwidth=20" &&
git diff --check
ok 41 - ditto, but tabwidth=20
expecting success:
git config core.whitespace "-tab-in-indent" &&
echo " foo ();" >x &&
git diff --check
ok 42 - check tabs as indentation (tab-in-indent: off)
expecting success:
git config core.whitespace "tab-in-indent" &&
echo " foo ();" >x &&
test_must_fail git diff --check
x:1: tab in indent.
+ foo ();
ok 43 - check tabs as indentation (tab-in-indent: on)
expecting success:
git config core.whitespace "tab-in-indent" &&
echo " foo ();" >x &&
test_must_fail git diff --check
x:1: tab in indent.
+ foo ();
ok 44 - check tabs and spaces as indentation (tab-in-indent: on)
expecting success:
git config core.whitespace "tab-in-indent,tabwidth=1" &&
test_must_fail git diff --check
x:1: tab in indent.
+ foo ();
ok 45 - ditto, but tabwidth=1 (must be irrelevant)
expecting success:
git config core.whitespace "tab-in-indent,indent-with-non-tab" &&
echo "foo ();" >x &&
test_must_fail git diff --check
fatal: cannot enforce both tab-in-indent and indent-with-non-tab
ok 46 - check tab-in-indent and indent-with-non-tab conflict
expecting success:
git config --unset core.whitespace &&
echo "x whitespace" >.gitattributes &&
echo " foo ();" >x &&
git diff --check &&
rm -f .gitattributes
ok 47 - check tab-in-indent excluded from wildcard whitespace attribute
expecting success:
echo "" >x &&
echo "foo(); " >>x &&
git diff --check | grep "x:2:"
x:2: trailing whitespace.
ok 48 - line numbers in --check output are correct
expecting success:
echo "foo();" >x &&
echo "" >>x &&
git diff --check | grep "new blank line"
x:2: new blank line at EOF.
ok 49 - checkdiff detects new trailing blank lines (1)
expecting success:
{ echo a; echo b; echo; echo; } >x &&
git add x &&
{ echo a; echo; echo; echo; echo; } >x &&
git diff --check | grep "new blank line"
x:2: new blank line at EOF.
ok 50 - checkdiff detects new trailing blank lines (2)
expecting success:
git checkout x &&
mv x y &&
(
echo "/* This is new */" &&
echo "" &&
cat y
) >x &&
git diff --check
Updated 1 path from the index
ok 51 - checkdiff allows new blank lines
expecting success:
git reset --hard &&
echo >x "hello world" &&
git add x &&
git commit -m "hello 1" &&
echo >x "hello world" &&
git diff -b >actual &&
test_must_be_empty actual
HEAD is now at be63fe5 yet another
[master d2f4f8d] hello 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 52 - whitespace-only changes not reported
expecting success:
git reset --hard &&
for i in 1 2 3 4 5 6 7 8 9; do echo "$i$i$i$i$i$i"; done >x &&
git add x &&
git commit -m "base" &&
sed -e "5s/^/ /" x >z &&
git rm x &&
git add z &&
git diff -w -M --cached |
sed -e "/^similarity index /s/[0-9][0-9]*/NUM/" >actual &&
test_cmp expect actual
HEAD is now at d2f4f8d hello 1
[master ea82159] base
Author: A U Thor <author@example.com>
1 file changed, 9 insertions(+), 1 deletion(-)
rm 'x'
ok 53 - whitespace-only changes reported across renames
expecting success:
git reset --hard &&
>empty &&
git add empty &&
git commit -m empty &&
git mv empty void &&
git diff -w --cached -M >current &&
test_cmp expected current
HEAD is now at ea82159 base
[master 3b75e69] empty
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 empty
ok 54 - rename empty
expecting success:
git reset --hard &&
echo >x hello &&
git commit -m "one side" x &&
git checkout HEAD^ &&
echo >x goodbye &&
git commit -m "the other side" x &&
git config core.autocrlf true &&
test_must_fail git merge master &&
git diff | sed -e "1,/^@@@/d" >actual &&
! grep "^-" actual
HEAD is now at 3b75e69 empty
[master ed5053c] one side
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 9 deletions(-)
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 3b75e69 empty
[detached HEAD a368d92] the other side
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 9 deletions(-)
Merging:
a368d92 the other side
virtual master
found 1 common ancestor:
3b75e69 empty
Auto-merging x
CONFLICT (content): Merge conflict in x
Automatic merge failed; fix conflicts and then commit the result.
ok 55 - combined diff with autocrlf conversion
expecting success:
git config color.diff.plain normal &&
git config color.diff.meta bold &&
git config color.diff.frag cyan &&
git config color.diff.func normal &&
git config color.diff.old red &&
git config color.diff.new green &&
git config color.diff.commit yellow &&
git config color.diff.whitespace blue &&
git config core.autocrlf false
ok 56 - setup diff colors
expecting success:
git config core.whitespace blank-at-eol &&
git reset --hard &&
echo "test" >x &&
git commit -m "initial" x &&
echo "{NTN}" | tr "NT" "\n\t" >>x &&
git diff --color | test_decode_color >current &&
cat >expected <<-\EOF &&
<BOLD>diff --git a/x b/x<RESET>
<BOLD>index 9daeafb..2874b91 100644<RESET>
<BOLD>--- a/x<RESET>
<BOLD>+++ b/x<RESET>
<CYAN>@@ -1 +1,4 @@<RESET>
test<RESET>
<GREEN>+<RESET><GREEN>{<RESET>
<GREEN>+<RESET><BLUE> <RESET>
<GREEN>+<RESET><GREEN>}<RESET>
EOF
test_cmp expected current
HEAD is now at a368d92 the other side
[detached HEAD aa1a2d9] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 57 - diff that introduces a line with only tabs
expecting success:
git reset --hard &&
{
echo "0. blank-at-eol " &&
echo "1. blank-at-eol "
} >x &&
git commit -a --allow-empty -m preimage &&
{
echo "0. blank-at-eol " &&
echo "1. still-blank-at-eol " &&
echo "2. and a new line "
} >x &&
git diff --color |
test_decode_color >current &&
cat >expected <<-\EOF &&
<BOLD>diff --git a/x b/x<RESET>
<BOLD>index d0233a2..700886e 100644<RESET>
<BOLD>--- a/x<RESET>
<BOLD>+++ b/x<RESET>
<CYAN>@@ -1,2 +1,3 @@<RESET>
0. blank-at-eol <RESET>
<RED>-1. blank-at-eol <RESET>
<GREEN>+<RESET><GREEN>1. still-blank-at-eol<RESET><BLUE> <RESET>
<GREEN>+<RESET><GREEN>2. and a new line<RESET><BLUE> <RESET>
EOF
test_cmp expected current
HEAD is now at aa1a2d9 initial
[detached HEAD da1ba77] preimage
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+), 1 deletion(-)
ok 58 - diff that introduces and removes ws breakages
expecting success:
git reset --hard &&
{
echo "0. blank-at-eol " &&
echo "1. blank-at-eol "
} >x &&
git commit -a --allow-empty -m preimage &&
{
echo "0. blank-at-eol " &&
echo "1. still-blank-at-eol " &&
echo "2. and a new line "
} >x &&
cat >expect.default-old <<-\EOF &&
<BOLD>diff --git a/x b/x<RESET>
<BOLD>index d0233a2..700886e 100644<RESET>
<BOLD>--- a/x<RESET>
<BOLD>+++ b/x<RESET>
<CYAN>@@ -1,2 +1,3 @@<RESET>
0. blank-at-eol <RESET>
<RED>-<RESET><RED>1. blank-at-eol<RESET><BLUE> <RESET>
<GREEN>+<RESET><GREEN>1. still-blank-at-eol<RESET><BLUE> <RESET>
<GREEN>+<RESET><GREEN>2. and a new line<RESET><BLUE> <RESET>
EOF
cat >expect.all <<-\EOF &&
<BOLD>diff --git a/x b/x<RESET>
<BOLD>index d0233a2..700886e 100644<RESET>
<BOLD>--- a/x<RESET>
<BOLD>+++ b/x<RESET>
<CYAN>@@ -1,2 +1,3 @@<RESET>
<RESET>0. blank-at-eol<RESET><BLUE> <RESET>
<RED>-<RESET><RED>1. blank-at-eol<RESET><BLUE> <RESET>
<GREEN>+<RESET><GREEN>1. still-blank-at-eol<RESET><BLUE> <RESET>
<GREEN>+<RESET><GREEN>2. and a new line<RESET><BLUE> <RESET>
EOF
cat >expect.none <<-\EOF
<BOLD>diff --git a/x b/x<RESET>
<BOLD>index d0233a2..700886e 100644<RESET>
<BOLD>--- a/x<RESET>
<BOLD>+++ b/x<RESET>
<CYAN>@@ -1,2 +1,3 @@<RESET>
0. blank-at-eol <RESET>
<RED>-1. blank-at-eol <RESET>
<GREEN>+1. still-blank-at-eol <RESET>
<GREEN>+2. and a new line <RESET>
EOF
HEAD is now at da1ba77 preimage
[detached HEAD 0336e0b] preimage
Author: A U Thor <author@example.com>
ok 59 - ws-error-highlight test setup
expecting success:
git diff --color --ws-error-highlight=default,old |
test_decode_color >current &&
test_cmp expect.default-old current &&
git diff --color --ws-error-highlight=all |
test_decode_color >current &&
test_cmp expect.all current &&
git diff --color --ws-error-highlight=none |
test_decode_color >current &&
test_cmp expect.none current
ok 60 - test --ws-error-highlight option
expecting success:
git -c diff.wsErrorHighlight=default,old diff --color |
test_decode_color >current &&
test_cmp expect.default-old current &&
git -c diff.wsErrorHighlight=all diff --color |
test_decode_color >current &&
test_cmp expect.all current &&
git -c diff.wsErrorHighlight=none diff --color |
test_decode_color >current &&
test_cmp expect.none current
ok 61 - test diff.wsErrorHighlight config
expecting success:
git -c diff.wsErrorHighlight=none \
diff --color --ws-error-highlight=default,old |
test_decode_color >current &&
test_cmp expect.default-old current &&
git -c diff.wsErrorHighlight=default \
diff --color --ws-error-highlight=all |
test_decode_color >current &&
test_cmp expect.all current &&
git -c diff.wsErrorHighlight=all \
diff --color --ws-error-highlight=none |
test_decode_color >current &&
test_cmp expect.none current
ok 62 - option overrides diff.wsErrorHighlight
expecting success:
git reset --hard &&
cat <<-\EOF >test.c &&
#include<stdio.h>
main()
{
printf("Hello World");
}
EOF
git add test.c &&
git commit -m "add main function" &&
git mv test.c main.c &&
test_config color.diff.oldMoved "normal red" &&
test_config color.diff.newMoved "normal green" &&
git diff HEAD --color-moved=zebra --color --no-renames | test_decode_color >actual &&
cat >expected <<-\EOF &&
<BOLD>diff --git a/main.c b/main.c<RESET>
<BOLD>new file mode 100644<RESET>
<BOLD>index 0000000..a986c57<RESET>
<BOLD>--- /dev/null<RESET>
<BOLD>+++ b/main.c<RESET>
<CYAN>@@ -0,0 +1,5 @@<RESET>
<BGREEN>+<RESET><BGREEN>#include<stdio.h><RESET>
<BGREEN>+<RESET><BGREEN>main()<RESET>
<BGREEN>+<RESET><BGREEN>{<RESET>
<BGREEN>+<RESET><BGREEN>printf("Hello World");<RESET>
<BGREEN>+<RESET><BGREEN>}<RESET>
<BOLD>diff --git a/test.c b/test.c<RESET>
<BOLD>deleted file mode 100644<RESET>
<BOLD>index a986c57..0000000<RESET>
<BOLD>--- a/test.c<RESET>
<BOLD>+++ /dev/null<RESET>
<CYAN>@@ -1,5 +0,0 @@<RESET>
<BRED>-#include<stdio.h><RESET>
<BRED>-main()<RESET>
<BRED>-{<RESET>
<BRED>-printf("Hello World");<RESET>
<BRED>-}<RESET>
EOF
test_cmp expected actual
HEAD is now at 0336e0b preimage
[detached HEAD cfb970f] add main function
Author: A U Thor <author@example.com>
1 file changed, 5 insertions(+)
create mode 100644 test.c
ok 63 - detect moved code, complete file
expecting success:
test_config color.diff.oldMoved "normal red" &&
test_config color.diff.newMoved "normal green" &&
test_config color.diff.oldMovedAlternative "blue" &&
test_config color.diff.newMovedAlternative "yellow" &&
git reset --hard &&
cat <<-\EOF >main.c &&
#include<stdio.h>
int stuff()
{
printf("Hello ");
printf("World\n");
}
int secure_foo(struct user *u)
{
if (!u->is_allowed_foo)
return;
foo(u);
}
int main()
{
foo();
}
EOF
cat <<-\EOF >test.c &&
#include<stdio.h>
int bar()
{
printf("Hello World, but different\n");
}
int another_function()
{
bar();
}
EOF
git add main.c test.c &&
git commit -m "add main and test file" &&
cat <<-\EOF >main.c &&
#include<stdio.h>
int stuff()
{
printf("Hello ");
printf("World\n");
}
int main()
{
foo();
}
EOF
cat <<-\EOF >test.c &&
#include<stdio.h>
int bar()
{
printf("Hello World, but different\n");
}
int secure_foo(struct user *u)
{
foo(u);
if (!u->is_allowed_foo)
return;
}
int another_function()
{
bar();
}
EOF
git diff HEAD --no-renames --color-moved=zebra --color | test_decode_color >actual &&
cat <<-\EOF >expected &&
<BOLD>diff --git a/main.c b/main.c<RESET>
<BOLD>index 27a619c..7cf9336 100644<RESET>
<BOLD>--- a/main.c<RESET>
<BOLD>+++ b/main.c<RESET>
<CYAN>@@ -5,13 +5,6 @@<RESET> <RESET>printf("Hello ");<RESET>
printf("World\n");<RESET>
}<RESET>
<RESET>
<BRED>-int secure_foo(struct user *u)<RESET>
<BRED>-{<RESET>
<BLUE>-if (!u->is_allowed_foo)<RESET>
<BLUE>-return;<RESET>
<RED>-foo(u);<RESET>
<RED>-}<RESET>
<RED>-<RESET>
int main()<RESET>
{<RESET>
foo();<RESET>
<BOLD>diff --git a/test.c b/test.c<RESET>
<BOLD>index 1dc1d85..2bedec9 100644<RESET>
<BOLD>--- a/test.c<RESET>
<BOLD>+++ b/test.c<RESET>
<CYAN>@@ -4,6 +4,13 @@<RESET> <RESET>int bar()<RESET>
printf("Hello World, but different\n");<RESET>
}<RESET>
<RESET>
<BGREEN>+<RESET><BGREEN>int secure_foo(struct user *u)<RESET>
<BGREEN>+<RESET><BGREEN>{<RESET>
<GREEN>+<RESET><GREEN>foo(u);<RESET>
<BGREEN>+<RESET><BGREEN>if (!u->is_allowed_foo)<RESET>
<BGREEN>+<RESET><BGREEN>return;<RESET>
<GREEN>+<RESET><GREEN>}<RESET>
<GREEN>+<RESET>
int another_function()<RESET>
{<RESET>
bar();<RESET>
EOF
test_cmp expected actual
HEAD is now at cfb970f add main function
[detached HEAD e4bcde6] add main and test file
Author: A U Thor <author@example.com>
2 files changed, 25 insertions(+), 2 deletions(-)
create mode 100644 main.c
ok 64 - detect malicious moved code, inside file
expecting success:
test_config color.diff.oldMoved "normal red" &&
test_config color.diff.newMoved "normal green" &&
test_config color.diff.oldMovedAlternative "blue" &&
test_config color.diff.newMovedAlternative "yellow" &&
# needs previous test as setup
git diff HEAD --no-renames --color-moved=plain --color | test_decode_color >actual &&
cat <<-\EOF >expected &&
<BOLD>diff --git a/main.c b/main.c<RESET>
<BOLD>index 27a619c..7cf9336 100644<RESET>
<BOLD>--- a/main.c<RESET>
<BOLD>+++ b/main.c<RESET>
<CYAN>@@ -5,13 +5,6 @@<RESET> <RESET>printf("Hello ");<RESET>
printf("World\n");<RESET>
}<RESET>
<RESET>
<BRED>-int secure_foo(struct user *u)<RESET>
<BRED>-{<RESET>
<BRED>-if (!u->is_allowed_foo)<RESET>
<BRED>-return;<RESET>
<BRED>-foo(u);<RESET>
<BRED>-}<RESET>
<BRED>-<RESET>
int main()<RESET>
{<RESET>
foo();<RESET>
<BOLD>diff --git a/test.c b/test.c<RESET>
<BOLD>index 1dc1d85..2bedec9 100644<RESET>
<BOLD>--- a/test.c<RESET>
<BOLD>+++ b/test.c<RESET>
<CYAN>@@ -4,6 +4,13 @@<RESET> <RESET>int bar()<RESET>
printf("Hello World, but different\n");<RESET>
}<RESET>
<RESET>
<BGREEN>+<RESET><BGREEN>int secure_foo(struct user *u)<RESET>
<BGREEN>+<RESET><BGREEN>{<RESET>
<BGREEN>+<RESET><BGREEN>foo(u);<RESET>
<BGREEN>+<RESET><BGREEN>if (!u->is_allowed_foo)<RESET>
<BGREEN>+<RESET><BGREEN>return;<RESET>
<BGREEN>+<RESET><BGREEN>}<RESET>
<BGREEN>+<RESET>
int another_function()<RESET>
{<RESET>
bar();<RESET>
EOF
test_cmp expected actual
ok 65 - plain moved code, inside file
expecting success:
git reset --hard &&
cat <<-\EOF >lines.txt &&
long line 1
long line 2
long line 3
line 4
line 5
line 6
line 7
line 8
line 9
line 10
line 11
line 12
line 13
long line 14
long line 15
long line 16
EOF
git add lines.txt &&
git commit -m "add poetry" &&
cat <<-\EOF >lines.txt &&
line 4
line 5
line 6
line 7
line 8
line 9
long line 1
long line 2
long line 3
long line 14
long line 15
long line 16
line 10
line 11
line 12
line 13
EOF
test_config color.diff.oldMoved "magenta" &&
test_config color.diff.newMoved "cyan" &&
test_config color.diff.oldMovedAlternative "blue" &&
test_config color.diff.newMovedAlternative "yellow" &&
test_config color.diff.oldMovedDimmed "normal magenta" &&
test_config color.diff.newMovedDimmed "normal cyan" &&
test_config color.diff.oldMovedAlternativeDimmed "normal blue" &&
test_config color.diff.newMovedAlternativeDimmed "normal yellow" &&
git diff HEAD --no-renames --color-moved=blocks --color >actual.raw &&
grep -v "index" actual.raw | test_decode_color >actual &&
cat <<-\EOF >expected &&
<BOLD>diff --git a/lines.txt b/lines.txt<RESET>
<BOLD>--- a/lines.txt<RESET>
<BOLD>+++ b/lines.txt<RESET>
<CYAN>@@ -1,16 +1,16 @@<RESET>
<MAGENTA>-long line 1<RESET>
<MAGENTA>-long line 2<RESET>
<MAGENTA>-long line 3<RESET>
line 4<RESET>
line 5<RESET>
line 6<RESET>
line 7<RESET>
line 8<RESET>
line 9<RESET>
<CYAN>+<RESET><CYAN>long line 1<RESET>
<CYAN>+<RESET><CYAN>long line 2<RESET>
<CYAN>+<RESET><CYAN>long line 3<RESET>
<CYAN>+<RESET><CYAN>long line 14<RESET>
<CYAN>+<RESET><CYAN>long line 15<RESET>
<CYAN>+<RESET><CYAN>long line 16<RESET>
line 10<RESET>
line 11<RESET>
line 12<RESET>
line 13<RESET>
<MAGENTA>-long line 14<RESET>
<MAGENTA>-long line 15<RESET>
<MAGENTA>-long line 16<RESET>
EOF
test_cmp expected actual
HEAD is now at e4bcde6 add main and test file
[detached HEAD 452c32a] add poetry
Author: A U Thor <author@example.com>
1 file changed, 16 insertions(+)
create mode 100644 lines.txt
ok 66 - detect blocks of moved code
expecting success:
# reuse setup from test before!
test_config color.diff.oldMoved "magenta" &&
test_config color.diff.newMoved "cyan" &&
test_config color.diff.oldMovedAlternative "blue" &&
test_config color.diff.newMovedAlternative "yellow" &&
test_config color.diff.oldMovedDimmed "normal magenta" &&
test_config color.diff.newMovedDimmed "normal cyan" &&
test_config color.diff.oldMovedAlternativeDimmed "normal blue" &&
test_config color.diff.newMovedAlternativeDimmed "normal yellow" &&
git diff HEAD --no-renames --color-moved=dimmed-zebra --color >actual.raw &&
grep -v "index" actual.raw | test_decode_color >actual &&
cat <<-\EOF >expected &&
<BOLD>diff --git a/lines.txt b/lines.txt<RESET>
<BOLD>--- a/lines.txt<RESET>
<BOLD>+++ b/lines.txt<RESET>
<CYAN>@@ -1,16 +1,16 @@<RESET>
<BMAGENTA>-long line 1<RESET>
<BMAGENTA>-long line 2<RESET>
<BMAGENTA>-long line 3<RESET>
line 4<RESET>
line 5<RESET>
line 6<RESET>
line 7<RESET>
line 8<RESET>
line 9<RESET>
<BCYAN>+<RESET><BCYAN>long line 1<RESET>
<BCYAN>+<RESET><BCYAN>long line 2<RESET>
<CYAN>+<RESET><CYAN>long line 3<RESET>
<YELLOW>+<RESET><YELLOW>long line 14<RESET>
<BYELLOW>+<RESET><BYELLOW>long line 15<RESET>
<BYELLOW>+<RESET><BYELLOW>long line 16<RESET>
line 10<RESET>
line 11<RESET>
line 12<RESET>
line 13<RESET>
<BMAGENTA>-long line 14<RESET>
<BMAGENTA>-long line 15<RESET>
<BMAGENTA>-long line 16<RESET>
EOF
test_cmp expected actual
ok 67 - detect permutations inside moved code -- dimmed-zebra
expecting success:
test_config color.diff.oldMoved "magenta" &&
test_config color.diff.newMoved "cyan" &&
test_config color.diff.oldMovedAlternative "blue" &&
test_config color.diff.newMovedAlternative "yellow" &&
test_config color.diff.oldMovedDimmed "normal magenta" &&
test_config color.diff.newMovedDimmed "normal cyan" &&
test_config color.diff.oldMovedAlternativeDimmed "normal blue" &&
test_config color.diff.newMovedAlternativeDimmed "normal yellow" &&
test_config diff.colorMoved zebra &&
git diff HEAD --no-renames --color-moved --color >actual.raw &&
grep -v "index" actual.raw | test_decode_color >actual &&
cat <<-\EOF >expected &&
<BOLD>diff --git a/lines.txt b/lines.txt<RESET>
<BOLD>--- a/lines.txt<RESET>
<BOLD>+++ b/lines.txt<RESET>
<CYAN>@@ -1,16 +1,16 @@<RESET>
<MAGENTA>-long line 1<RESET>
<MAGENTA>-long line 2<RESET>
<MAGENTA>-long line 3<RESET>
line 4<RESET>
line 5<RESET>
line 6<RESET>
line 7<RESET>
line 8<RESET>
line 9<RESET>
<CYAN>+<RESET><CYAN>long line 1<RESET>
<CYAN>+<RESET><CYAN>long line 2<RESET>
<CYAN>+<RESET><CYAN>long line 3<RESET>
<YELLOW>+<RESET><YELLOW>long line 14<RESET>
<YELLOW>+<RESET><YELLOW>long line 15<RESET>
<YELLOW>+<RESET><YELLOW>long line 16<RESET>
line 10<RESET>
line 11<RESET>
line 12<RESET>
line 13<RESET>
<MAGENTA>-long line 14<RESET>
<MAGENTA>-long line 15<RESET>
<MAGENTA>-long line 16<RESET>
EOF
test_cmp expected actual
ok 68 - cmd option assumes configured colored-moved
expecting success:
cat <<-\EOF >text.txt &&
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
EOF
git add text.txt &&
git commit -a -m "clean state" &&
cat <<-\EOF >text.txt &&
simply Lorem Ipsum dummy is text of the typesetting and printing industry.
EOF
git diff --color-moved --word-diff >actual &&
git diff --word-diff >expect &&
test_cmp expect actual
[detached HEAD 0f3e772] clean state
Author: A U Thor <author@example.com>
2 files changed, 7 insertions(+), 6 deletions(-)
create mode 100644 text.txt
ok 69 - no effect from --color-moved with --word-diff
expecting success:
git reset --hard &&
# Note that these lines have no leading or trailing whitespace.
cat <<-\EOF >lines.txt &&
line 1
line 2
line 3
line 4
line 5
long line 6
long line 7
long line 8
long line 9
EOF
git add lines.txt &&
git commit -m "add poetry" &&
git config color.diff.oldMoved "magenta" &&
git config color.diff.newMoved "cyan"
HEAD is now at 0f3e772 clean state
[detached HEAD aea45e4] add poetry
Author: A U Thor <author@example.com>
1 file changed, 7 insertions(+), 14 deletions(-)
ok 70 - set up whitespace tests
expecting success:
q_to_tab <<-\EOF >lines.txt &&
Qlong line 6
Qlong line 7
Qlong line 8
Qchanged long line 9
line 1
line 2
line 3
line 4
line 5
EOF
git diff HEAD --no-renames --color-moved --color >actual.raw &&
grep -v "index" actual.raw | test_decode_color >actual &&
cat <<-\EOF >expected &&
<BOLD>diff --git a/lines.txt b/lines.txt<RESET>
<BOLD>--- a/lines.txt<RESET>
<BOLD>+++ b/lines.txt<RESET>
<CYAN>@@ -1,9 +1,9 @@<RESET>
<GREEN>+<RESET> <GREEN>long line 6<RESET>
<GREEN>+<RESET> <GREEN>long line 7<RESET>
<GREEN>+<RESET> <GREEN>long line 8<RESET>
<GREEN>+<RESET> <GREEN>changed long line 9<RESET>
line 1<RESET>
line 2<RESET>
line 3<RESET>
line 4<RESET>
line 5<RESET>
<RED>-long line 6<RESET>
<RED>-long line 7<RESET>
<RED>-long line 8<RESET>
<RED>-long line 9<RESET>
EOF
test_cmp expected actual &&
git diff HEAD --no-renames --color-moved --color \
--color-moved-ws=ignore-all-space >actual.raw &&
grep -v "index" actual.raw | test_decode_color >actual &&
cat <<-\EOF >expected &&
<BOLD>diff --git a/lines.txt b/lines.txt<RESET>
<BOLD>--- a/lines.txt<RESET>
<BOLD>+++ b/lines.txt<RESET>
<CYAN>@@ -1,9 +1,9 @@<RESET>
<CYAN>+<RESET> <CYAN>long line 6<RESET>
<CYAN>+<RESET> <CYAN>long line 7<RESET>
<CYAN>+<RESET> <CYAN>long line 8<RESET>
<GREEN>+<RESET> <GREEN>changed long line 9<RESET>
line 1<RESET>
line 2<RESET>
line 3<RESET>
line 4<RESET>
line 5<RESET>
<MAGENTA>-long line 6<RESET>
<MAGENTA>-long line 7<RESET>
<MAGENTA>-long line 8<RESET>
<RED>-long line 9<RESET>
EOF
test_cmp expected actual
ok 71 - move detection ignoring whitespace
expecting success:
git reset --hard &&
# Lines 6-8 have a space change, but 9 is new whitespace
q_to_tab <<-\EOF >lines.txt &&
longQline 6
longQline 7
longQline 8
long liQne 9
line 1
line 2
line 3
line 4
line 5
EOF
git diff HEAD --no-renames --color-moved --color >actual.raw &&
grep -v "index" actual.raw | test_decode_color >actual &&
cat <<-\EOF >expected &&
<BOLD>diff --git a/lines.txt b/lines.txt<RESET>
<BOLD>--- a/lines.txt<RESET>
<BOLD>+++ b/lines.txt<RESET>
<CYAN>@@ -1,9 +1,9 @@<RESET>
<GREEN>+<RESET><GREEN>long line 6<RESET>
<GREEN>+<RESET><GREEN>long line 7<RESET>
<GREEN>+<RESET><GREEN>long line 8<RESET>
<GREEN>+<RESET><GREEN>long li ne 9<RESET>
line 1<RESET>
line 2<RESET>
line 3<RESET>
line 4<RESET>
line 5<RESET>
<RED>-long line 6<RESET>
<RED>-long line 7<RESET>
<RED>-long line 8<RESET>
<RED>-long line 9<RESET>
EOF
test_cmp expected actual &&
git diff HEAD --no-renames --color-moved --color \
--color-moved-ws=ignore-space-change >actual.raw &&
grep -v "index" actual.raw | test_decode_color >actual &&
cat <<-\EOF >expected &&
<BOLD>diff --git a/lines.txt b/lines.txt<RESET>
<BOLD>--- a/lines.txt<RESET>
<BOLD>+++ b/lines.txt<RESET>
<CYAN>@@ -1,9 +1,9 @@<RESET>
<CYAN>+<RESET><CYAN>long line 6<RESET>
<CYAN>+<RESET><CYAN>long line 7<RESET>
<CYAN>+<RESET><CYAN>long line 8<RESET>
<GREEN>+<RESET><GREEN>long li ne 9<RESET>
line 1<RESET>
line 2<RESET>
line 3<RESET>
line 4<RESET>
line 5<RESET>
<MAGENTA>-long line 6<RESET>
<MAGENTA>-long line 7<RESET>
<MAGENTA>-long line 8<RESET>
<RED>-long line 9<RESET>
EOF
test_cmp expected actual
HEAD is now at aea45e4 add poetry
ok 72 - move detection ignoring whitespace changes
expecting success:
git reset --hard &&
# Lines 6-9 have new eol whitespace, but 9 also has it in the middle
q_to_tab <<-\EOF >lines.txt &&
long line 6Q
long line 7Q
long line 8Q
longQline 9Q
line 1
line 2
line 3
line 4
line 5
EOF
# avoid cluttering the output with complaints about our eol whitespace
test_config core.whitespace -blank-at-eol &&
git diff HEAD --no-renames --color-moved --color >actual.raw &&
grep -v "index" actual.raw | test_decode_color >actual &&
cat <<-\EOF >expected &&
<BOLD>diff --git a/lines.txt b/lines.txt<RESET>
<BOLD>--- a/lines.txt<RESET>
<BOLD>+++ b/lines.txt<RESET>
<CYAN>@@ -1,9 +1,9 @@<RESET>
<GREEN>+<RESET><GREEN>long line 6 <RESET>
<GREEN>+<RESET><GREEN>long line 7 <RESET>
<GREEN>+<RESET><GREEN>long line 8 <RESET>
<GREEN>+<RESET><GREEN>long line 9 <RESET>
line 1<RESET>
line 2<RESET>
line 3<RESET>
line 4<RESET>
line 5<RESET>
<RED>-long line 6<RESET>
<RED>-long line 7<RESET>
<RED>-long line 8<RESET>
<RED>-long line 9<RESET>
EOF
test_cmp expected actual &&
git diff HEAD --no-renames --color-moved --color \
--color-moved-ws=ignore-space-at-eol >actual.raw &&
grep -v "index" actual.raw | test_decode_color >actual &&
cat <<-\EOF >expected &&
<BOLD>diff --git a/lines.txt b/lines.txt<RESET>
<BOLD>--- a/lines.txt<RESET>
<BOLD>+++ b/lines.txt<RESET>
<CYAN>@@ -1,9 +1,9 @@<RESET>
<CYAN>+<RESET><CYAN>long line 6 <RESET>
<CYAN>+<RESET><CYAN>long line 7 <RESET>
<CYAN>+<RESET><CYAN>long line 8 <RESET>
<GREEN>+<RESET><GREEN>long line 9 <RESET>
line 1<RESET>
line 2<RESET>
line 3<RESET>
line 4<RESET>
line 5<RESET>
<MAGENTA>-long line 6<RESET>
<MAGENTA>-long line 7<RESET>
<MAGENTA>-long line 8<RESET>
<RED>-long line 9<RESET>
EOF
test_cmp expected actual
HEAD is now at aea45e4 add poetry
ok 73 - move detection ignoring whitespace at eol
expecting success:
git config --unset color.diff.oldMoved &&
git config --unset color.diff.newMoved
ok 74 - clean up whitespace-test colors
expecting success:
git reset --hard &&
>bar &&
cat <<-\EOF >foo &&
irrelevant_line
line1
EOF
git add foo bar &&
git commit -m x &&
cat <<-\EOF >bar &&
line1
EOF
cat <<-\EOF >foo &&
irrelevant_line
EOF
git diff HEAD --color-moved=zebra --color --no-renames >actual.raw &&
grep -v "index" actual.raw | test_decode_color >actual &&
cat >expected <<-\EOF &&
<BOLD>diff --git a/bar b/bar<RESET>
<BOLD>--- a/bar<RESET>
<BOLD>+++ b/bar<RESET>
<CYAN>@@ -0,0 +1 @@<RESET>
<GREEN>+<RESET><GREEN>line1<RESET>
<BOLD>diff --git a/foo b/foo<RESET>
<BOLD>--- a/foo<RESET>
<BOLD>+++ b/foo<RESET>
<CYAN>@@ -1,2 +1 @@<RESET>
irrelevant_line<RESET>
<RED>-line1<RESET>
EOF
test_cmp expected actual
HEAD is now at aea45e4 add poetry
[detached HEAD 071c596] x
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 bar
create mode 100644 foo
ok 75 - --color-moved block at end of diff output respects MIN_ALNUM_COUNT
expecting success:
git reset --hard &&
cat <<-\EOF >foo &&
nineteen chars 456789
irrelevant_line
twenty chars 234567890
EOF
>bar &&
git add foo bar &&
git commit -m x &&
cat <<-\EOF >foo &&
irrelevant_line
EOF
cat <<-\EOF >bar &&
twenty chars 234567890
nineteen chars 456789
EOF
git diff HEAD --color-moved=zebra --color --no-renames >actual.raw &&
grep -v "index" actual.raw | test_decode_color >actual &&
cat >expected <<-\EOF &&
<BOLD>diff --git a/bar b/bar<RESET>
<BOLD>--- a/bar<RESET>
<BOLD>+++ b/bar<RESET>
<CYAN>@@ -0,0 +1,2 @@<RESET>
<BOLD;CYAN>+<RESET><BOLD;CYAN>twenty chars 234567890<RESET>
<GREEN>+<RESET><GREEN>nineteen chars 456789<RESET>
<BOLD>diff --git a/foo b/foo<RESET>
<BOLD>--- a/foo<RESET>
<BOLD>+++ b/foo<RESET>
<CYAN>@@ -1,3 +1 @@<RESET>
<RED>-nineteen chars 456789<RESET>
irrelevant_line<RESET>
<BOLD;MAGENTA>-twenty chars 234567890<RESET>
EOF
test_cmp expected actual
HEAD is now at 071c596 x
[detached HEAD e4b8e7f] x
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+), 1 deletion(-)
ok 76 - --color-moved respects MIN_ALNUM_COUNT
expecting success:
git reset --hard &&
cat <<-\EOF >foo &&
7charsA
irrelevant_line
7charsB
7charsC
EOF
>bar &&
git add foo bar &&
git commit -m x &&
cat <<-\EOF >foo &&
irrelevant_line
EOF
cat <<-\EOF >bar &&
7charsB
7charsC
7charsA
EOF
git diff HEAD --color-moved=zebra --color --no-renames >actual.raw &&
grep -v "index" actual.raw | test_decode_color >actual &&
cat >expected <<-\EOF &&
<BOLD>diff --git a/bar b/bar<RESET>
<BOLD>--- a/bar<RESET>
<BOLD>+++ b/bar<RESET>
<CYAN>@@ -0,0 +1,3 @@<RESET>
<GREEN>+<RESET><GREEN>7charsB<RESET>
<GREEN>+<RESET><GREEN>7charsC<RESET>
<GREEN>+<RESET><GREEN>7charsA<RESET>
<BOLD>diff --git a/foo b/foo<RESET>
<BOLD>--- a/foo<RESET>
<BOLD>+++ b/foo<RESET>
<CYAN>@@ -1,4 +1 @@<RESET>
<RED>-7charsA<RESET>
irrelevant_line<RESET>
<RED>-7charsB<RESET>
<RED>-7charsC<RESET>
EOF
test_cmp expected actual
HEAD is now at e4b8e7f x
[detached HEAD 4e48833] x
Author: A U Thor <author@example.com>
1 file changed, 3 insertions(+), 2 deletions(-)
ok 77 - --color-moved treats adjacent blocks as separate for MIN_ALNUM_COUNT
expecting success:
test_create_repo bananas &&
echo ripe >bananas/recipe &&
git -C bananas add recipe &&
test_commit fruit &&
test_commit -C bananas recipe &&
git submodule add ./bananas &&
git add bananas &&
git commit -a -m "bananas are like a heavy library?" &&
echo foul >bananas/recipe &&
echo ripe >fruit.t &&
git diff --submodule=diff --color-moved --color >actual &&
# no move detection as the moved line is across repository boundaries.
test_decode_color <actual >decoded_actual &&
! grep BGREEN decoded_actual &&
! grep BRED decoded_actual &&
# nor did we mess with it another way
git diff --submodule=diff --color | test_decode_color >expect &&
test_cmp expect decoded_actual &&
rm -rf bananas &&
git submodule deinit bananas
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4015-diff-whitespace/bananas/.git/
[detached HEAD 1e1b212] fruit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fruit.t
[master (root-commit) 45e634e] recipe
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 recipe
create mode 100644 recipe.t
Adding existing repo at 'bananas' to the index
[detached HEAD b6b36e8] bananas are like a heavy library?
Author: A U Thor <author@example.com>
4 files changed, 7 insertions(+), 3 deletions(-)
create mode 100644 .gitmodules
create mode 160000 bananas
Submodule 'bananas' (./bananas) unregistered for path 'bananas'
ok 78 - move detection with submodules
expecting success:
git reset --hard &&
q_to_tab <<-\EOF >text.txt &&
a long line to exceed per-line minimum
another long line to exceed per-line minimum
original file
EOF
git add text.txt &&
git commit -m "add text" &&
q_to_tab <<-\EOF >text.txt &&
Qa long line to exceed per-line minimum
Qanother long line to exceed per-line minimum
new file
EOF
# Make sure we get a different diff using -w
git diff --color --color-moved -w >actual.raw &&
grep -v "index" actual.raw | test_decode_color >actual &&
q_to_tab <<-\EOF >expected &&
<BOLD>diff --git a/text.txt b/text.txt<RESET>
<BOLD>--- a/text.txt<RESET>
<BOLD>+++ b/text.txt<RESET>
<CYAN>@@ -1,3 +1,3 @@<RESET>
Qa long line to exceed per-line minimum<RESET>
Qanother long line to exceed per-line minimum<RESET>
<RED>-original file<RESET>
<GREEN>+<RESET><GREEN>new file<RESET>
EOF
test_cmp expected actual &&
# And now ignoring white space only in the move detection
git diff --color --color-moved \
--color-moved-ws=ignore-all-space,ignore-space-change,ignore-space-at-eol >actual.raw &&
grep -v "index" actual.raw | test_decode_color >actual &&
q_to_tab <<-\EOF >expected &&
<BOLD>diff --git a/text.txt b/text.txt<RESET>
<BOLD>--- a/text.txt<RESET>
<BOLD>+++ b/text.txt<RESET>
<CYAN>@@ -1,3 +1,3 @@<RESET>
<BOLD;MAGENTA>-a long line to exceed per-line minimum<RESET>
<BOLD;MAGENTA>-another long line to exceed per-line minimum<RESET>
<RED>-original file<RESET>
<BOLD;CYAN>+<RESET>Q<BOLD;CYAN>a long line to exceed per-line minimum<RESET>
<BOLD;CYAN>+<RESET>Q<BOLD;CYAN>another long line to exceed per-line minimum<RESET>
<GREEN>+<RESET><GREEN>new file<RESET>
EOF
test_cmp expected actual
HEAD is now at b6b36e8 bananas are like a heavy library?
[detached HEAD 830061c] add text
Author: A U Thor <author@example.com>
1 file changed, 3 insertions(+), 1 deletion(-)
ok 79 - only move detection ignores white spaces
expecting success:
git reset --hard &&
q_to_tab <<-\EOF >text.txt &&
QIndented
QText across
Qsome lines
QBut! <- this stands out
QAdjusting with
QQdifferent starting
Qwhite spaces
QAnother outlier
QQQIndented
QQQText across
QQQfive lines
QQQthat has similar lines
QQQto previous blocks, but with different indent
QQQYetQAnotherQoutlierQ
QLine with internal w h i t e s p a c e change
EOF
git add text.txt &&
git commit -m "add text.txt" &&
q_to_tab <<-\EOF >text.txt &&
QQIndented
QQText across
QQsome lines
QQQBut! <- this stands out
Adjusting with
Qdifferent starting
white spaces
AnotherQoutlier
QQIndented
QQText across
QQfive lines
QQthat has similar lines
QQto previous blocks, but with different indent
QQYetQAnotherQoutlier
QLine with internal whitespace change
EOF
git diff --color --color-moved --color-moved-ws=allow-indentation-change >actual.raw &&
grep -v "index" actual.raw | test_decode_color >actual &&
q_to_tab <<-\EOF >expected &&
<BOLD>diff --git a/text.txt b/text.txt<RESET>
<BOLD>--- a/text.txt<RESET>
<BOLD>+++ b/text.txt<RESET>
<CYAN>@@ -1,15 +1,15 @@<RESET>
<BOLD;MAGENTA>-QIndented<RESET>
<BOLD;MAGENTA>-QText across<RESET>
<BOLD;MAGENTA>-Qsome lines<RESET>
<RED>-QBut! <- this stands out<RESET>
<BOLD;MAGENTA>-QAdjusting with<RESET>
<BOLD;MAGENTA>-QQdifferent starting<RESET>
<BOLD;MAGENTA>-Qwhite spaces<RESET>
<RED>-QAnother outlier<RESET>
<BOLD;MAGENTA>-QQQIndented<RESET>
<BOLD;MAGENTA>-QQQText across<RESET>
<BOLD;MAGENTA>-QQQfive lines<RESET>
<BOLD;MAGENTA>-QQQthat has similar lines<RESET>
<BOLD;MAGENTA>-QQQto previous blocks, but with different indent<RESET>
<RED>-QQQYetQAnotherQoutlierQ<RESET>
<RED>-QLine with internal w h i t e s p a c e change<RESET>
<BOLD;CYAN>+<RESET>QQ<BOLD;CYAN>Indented<RESET>
<BOLD;CYAN>+<RESET>QQ<BOLD;CYAN>Text across<RESET>
<BOLD;CYAN>+<RESET>QQ<BOLD;CYAN>some lines<RESET>
<GREEN>+<RESET>QQQ<GREEN>But! <- this stands out<RESET>
<BOLD;CYAN>+<RESET><BOLD;CYAN>Adjusting with<RESET>
<BOLD;CYAN>+<RESET>Q<BOLD;CYAN>different starting<RESET>
<BOLD;CYAN>+<RESET><BOLD;CYAN>white spaces<RESET>
<GREEN>+<RESET><GREEN>AnotherQoutlier<RESET>
<BOLD;CYAN>+<RESET>QQ<BOLD;CYAN>Indented<RESET>
<BOLD;CYAN>+<RESET>QQ<BOLD;CYAN>Text across<RESET>
<BOLD;CYAN>+<RESET>QQ<BOLD;CYAN>five lines<RESET>
<BOLD;CYAN>+<RESET>QQ<BOLD;CYAN>that has similar lines<RESET>
<BOLD;CYAN>+<RESET>QQ<BOLD;CYAN>to previous blocks, but with different indent<RESET>
<GREEN>+<RESET>QQ<GREEN>YetQAnotherQoutlier<RESET>
<GREEN>+<RESET>Q<GREEN>Line with internal whitespace change<RESET>
EOF
test_cmp expected actual
HEAD is now at 830061c add text
[detached HEAD 261aa2c] add text.txt
Author: A U Thor <author@example.com>
1 file changed, 15 insertions(+), 3 deletions(-)
ok 80 - compare whitespace delta across moved blocks
expecting success:
test_must_fail git diff --color-moved=bogus 2>err &&
test_i18ngrep "must be one of" err &&
test_i18ngrep bogus err &&
test_must_fail git -c diff.colormoved=bogus diff 2>err &&
test_i18ngrep "must be one of" err &&
test_i18ngrep "from command-line config" err &&
test_must_fail git diff --color-moved-ws=bogus 2>err &&
test_i18ngrep "possible values" err &&
test_i18ngrep bogus err &&
test_must_fail git -c diff.colormovedws=bogus diff 2>err &&
test_i18ngrep "possible values" err &&
test_i18ngrep "from command-line config" err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: color moved setting must be one of 'no', 'default', 'blocks', 'zebra', 'dimmed-zebra', 'plain'
error: bad --color-moved argument: bogus
error: color moved setting must be one of 'no', 'default', 'blocks', 'zebra', 'dimmed-zebra', 'plain'
fatal: unable to parse 'diff.colormoved' from command-line config
error: unknown color-moved-ws mode 'bogus', possible values are 'ignore-space-change', 'ignore-space-at-eol', 'ignore-all-space', 'allow-indentation-change'
error: unknown color-moved-ws mode 'bogus', possible values are 'ignore-space-change', 'ignore-space-at-eol', 'ignore-all-space', 'allow-indentation-change'
error: invalid mode 'bogus' in --color-moved-ws
error: unknown color-moved-ws mode 'bogus', possible values are 'ignore-space-change', 'ignore-space-at-eol', 'ignore-all-space', 'allow-indentation-change'
fatal: unable to parse 'diff.colormovedws' from command-line config
ok 81 - bogus settings in move detection erroring out
expecting success:
test_must_fail git diff \
--color-moved-ws=allow-indentation-change,ignore-all-space \
2>err &&
test_i18ngrep allow-indentation-change err
error: color-moved-ws: allow-indentation-change cannot be combined with other whitespace modes
error: invalid mode 'allow-indentation-change,ignore-all-space' in --color-moved-ws
ok 82 - compare whitespace delta incompatible with other space options
expecting success:
git reset --hard &&
tr Q_ "\t " <<-EOF >text.txt &&
${EMPTY}
____too short without
${EMPTY}
___being grouped across blank line
${EMPTY}
context
lines
to
anchor
____Indented text to
_Q____be further indented by four spaces across
____Qseveral lines
QQ____These two lines have had their
____indentation reduced by four spaces
Qdifferent indentation change
____too short
EOF
git add text.txt &&
git commit -m "add text.txt" &&
tr Q_ "\t " <<-EOF >text.txt &&
context
lines
to
anchor
QIndented text to
QQbe further indented by four spaces across
Q____several lines
${EMPTY}
QQtoo short without
${EMPTY}
Q_______being grouped across blank line
${EMPTY}
Q_QThese two lines have had their
indentation reduced by four spaces
QQdifferent indentation change
__Qtoo short
EOF
git -c color.diff.whitespace="normal red" \
-c core.whitespace=space-before-tab \
diff --color --color-moved --ws-error-highlight=all \
--color-moved-ws=allow-indentation-change >actual.raw &&
grep -v "index" actual.raw | test_decode_color >actual &&
cat <<-\EOF >expected &&
<BOLD>diff --git a/text.txt b/text.txt<RESET>
<BOLD>--- a/text.txt<RESET>
<BOLD>+++ b/text.txt<RESET>
<CYAN>@@ -1,16 +1,16 @@<RESET>
<BOLD;MAGENTA>-<RESET>
<BOLD;MAGENTA>-<RESET><BOLD;MAGENTA> too short without<RESET>
<BOLD;MAGENTA>-<RESET>
<BOLD;MAGENTA>-<RESET><BOLD;MAGENTA> being grouped across blank line<RESET>
<BOLD;MAGENTA>-<RESET>
<RESET>context<RESET>
<RESET>lines<RESET>
<RESET>to<RESET>
<RESET>anchor<RESET>
<BOLD;MAGENTA>-<RESET><BOLD;MAGENTA> Indented text to<RESET>
<BOLD;MAGENTA>-<RESET><BRED> <RESET> <BOLD;MAGENTA> be further indented by four spaces across<RESET>
<BOLD;MAGENTA>-<RESET><BRED> <RESET> <BOLD;MAGENTA>several lines<RESET>
<BOLD;BLUE>-<RESET> <BOLD;BLUE> These two lines have had their<RESET>
<BOLD;BLUE>-<RESET><BOLD;BLUE> indentation reduced by four spaces<RESET>
<BOLD;MAGENTA>-<RESET> <BOLD;MAGENTA>different indentation change<RESET>
<RED>-<RESET><RED> too short<RESET>
<BOLD;CYAN>+<RESET> <BOLD;CYAN>Indented text to<RESET>
<BOLD;CYAN>+<RESET> <BOLD;CYAN>be further indented by four spaces across<RESET>
<BOLD;CYAN>+<RESET> <BOLD;CYAN> several lines<RESET>
<BOLD;YELLOW>+<RESET>
<BOLD;YELLOW>+<RESET> <BOLD;YELLOW>too short without<RESET>
<BOLD;YELLOW>+<RESET>
<BOLD;YELLOW>+<RESET> <BOLD;YELLOW> being grouped across blank line<RESET>
<BOLD;YELLOW>+<RESET>
<BOLD;CYAN>+<RESET> <BRED> <RESET> <BOLD;CYAN>These two lines have had their<RESET>
<BOLD;CYAN>+<RESET><BOLD;CYAN>indentation reduced by four spaces<RESET>
<BOLD;YELLOW>+<RESET> <BOLD;YELLOW>different indentation change<RESET>
<GREEN>+<RESET><BRED> <RESET> <GREEN>too short<RESET>
EOF
test_cmp expected actual
HEAD is now at 261aa2c add text.txt
[detached HEAD 025235f] add text.txt
Author: A U Thor <author@example.com>
1 file changed, 16 insertions(+), 15 deletions(-)
ok 83 - compare mixed whitespace delta across moved blocks
expecting success:
test_write_lines 1 "" 2 3 4 5 >a &&
test_write_lines 1 2 3 4 >b &&
test_must_fail git diff --no-index \
--ignore-blank-lines --function-context a b >actual.raw &&
sed -n "/@@/,\$p" <actual.raw >actual &&
cat <<-\EOF >expect &&
@@ -1,6 +1,4 @@
1
2
3
4
-5
EOF
test_cmp expect actual
ok 84 - combine --ignore-blank-lines with --function-context
# passed all 84 test(s)
1..84
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4018-diff-funcname.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4018-diff-funcname/.git/
expecting success:
# a non-trivial custom pattern
git config diff.custom1.funcname "!static
!String
[^ ].*s.*" &&
# a custom pattern which matches to end of line
git config diff.custom2.funcname "......Beer\$" &&
# alternation in pattern
git config diff.custom3.funcname "Beer$" &&
git config diff.custom3.xfuncname "^[ ]*((public|static).*)$" &&
# for regexp compilation tests
echo A >A.java &&
echo B >B.java
ok 1 - setup
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 2 - builtin ada pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 3 - builtin ada wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 4 - builtin bibtex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 5 - builtin bibtex wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 6 - builtin cpp pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 7 - builtin cpp wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 8 - builtin csharp pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 9 - builtin csharp wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 10 - builtin css pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 11 - builtin css wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 12 - builtin fortran pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 13 - builtin fortran wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 14 - builtin fountain pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 15 - builtin fountain wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 16 - builtin golang pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 17 - builtin golang wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 18 - builtin html pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 19 - builtin html wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 20 - builtin java pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 21 - builtin java wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 22 - builtin matlab pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 23 - builtin matlab wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 24 - builtin objc pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 25 - builtin objc wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 26 - builtin pascal pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 27 - builtin pascal wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 28 - builtin perl pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 29 - builtin perl wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 30 - builtin php pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 31 - builtin php wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 32 - builtin python pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 33 - builtin python wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 34 - builtin ruby pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 35 - builtin ruby wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 36 - builtin rust pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 37 - builtin rust wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 38 - builtin tex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 39 - builtin tex wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 40 - builtin custom1 pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 41 - builtin custom1 wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 42 - builtin custom2 pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 43 - builtin custom2 wordRegex pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
-A
+B
ok 44 - builtin custom3 pattern compiles
expecting success:
echo "*.java diff=$p" >.gitattributes &&
test_expect_code 1 git diff --no-index --word-diff \
A.java B.java 2>msg &&
test_i18ngrep ! fatal msg &&
test_i18ngrep ! error msg
diff --git a/A.java b/B.java
index f70f10e..223b783 100644
--- a/A.java
+++ b/B.java
@@ -1 +1 @@
[-A-]{+B+}
ok 45 - builtin custom3 wordRegex pattern compiles
expecting success:
echo "*.java diff=java" >.gitattributes &&
test_config diff.java.funcname "!static" &&
test_expect_code 128 git diff --no-index A.java B.java 2>msg &&
test_i18ngrep ": Last expression must not be negated:" msg
fatal: Last expression must not be negated: !static
ok 46 - last regexp must not be negated
expecting success:
for i in $diffpatterns
do
echo "$i-* diff=$i"
done > .gitattributes &&
# add all test files to the index
(
cd "$TEST_DIRECTORY"/t4018 &&
git --git-dir="$TRASH_DIRECTORY/.git" add .
) &&
# place modified files in the worktree
for i in $(git ls-files)
do
sed -e "s/ChangeMe/IWasChanged/" <"$TEST_DIRECTORY/t4018/$i" >"$i" || return 1
done
ok 47 - setup hunk header tests
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 README >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -3,3 +3,3 @@ How to write RIGHT test cases
diff --git a/README b/README
index 283e01c..a55b544 100644
--- a/README
+++ b/README
@@ -3,3 +3,3 @@ How to write RIGHT test cases
-Insert the word "ChangeMe" (exactly this form) at a distance of
+Insert the word "IWasChanged" (exactly this form) at a distance of
at least two lines from the line that must appear in the hunk header.
ok 48 - hunk header: README
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-c++-function >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ Item RIGHT::DoSomething( Args with_spaces )
diff --git a/cpp-c++-function b/cpp-c++-function
index 9ee6bbe..7bb7443 100644
--- a/cpp-c++-function
+++ b/cpp-c++-function
@@ -2,3 +2,3 @@ Item RIGHT::DoSomething( Args with_spaces )
{
- ChangeMe;
+ IWasChanged;
}
ok 49 - hunk header: cpp-c++-function
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-class-constructor >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ Item::Item(int RIGHT)
diff --git a/cpp-class-constructor b/cpp-class-constructor
index ec4f115..1c9fd01 100644
--- a/cpp-class-constructor
+++ b/cpp-class-constructor
@@ -2,3 +2,3 @@ Item::Item(int RIGHT)
{
- ChangeMe;
+ IWasChanged;
}
ok 50 - hunk header: cpp-class-constructor
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-class-constructor-mem-init >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -3,3 +3,3 @@ Item::Item(int RIGHT) :
diff --git a/cpp-class-constructor-mem-init b/cpp-class-constructor-mem-init
index 49a69f3..ffaf335 100644
--- a/cpp-class-constructor-mem-init
+++ b/cpp-class-constructor-mem-init
@@ -3,3 +3,3 @@ Item::Item(int RIGHT) :
{
- ChangeMe;
+ IWasChanged;
}
ok 51 - hunk header: cpp-class-constructor-mem-init
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-class-definition >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ class RIGHT
diff --git a/cpp-class-definition b/cpp-class-definition
index 11b61da..d624df1 100644
--- a/cpp-class-definition
+++ b/cpp-class-definition
@@ -2,3 +2,3 @@ class RIGHT
{
- int ChangeMe;
+ int IWasChanged;
};
ok 52 - hunk header: cpp-class-definition
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-class-definition-derived >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -3,3 +3,3 @@ class RIGHT :
diff --git a/cpp-class-definition-derived b/cpp-class-definition-derived
index 3b98cd0..b4d6116 100644
--- a/cpp-class-definition-derived
+++ b/cpp-class-definition-derived
@@ -3,3 +3,3 @@ class RIGHT :
{
- int ChangeMe;
+ int IWasChanged;
};
ok 53 - hunk header: cpp-class-definition-derived
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-class-destructor >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ RIGHT::~RIGHT()
diff --git a/cpp-class-destructor b/cpp-class-destructor
index 5487665..54af7a9 100644
--- a/cpp-class-destructor
+++ b/cpp-class-destructor
@@ -2,3 +2,3 @@ RIGHT::~RIGHT()
{
- ChangeMe;
+ IWasChanged;
}
ok 54 - hunk header: cpp-class-destructor
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-function-returning-global-type >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ ::Item get::it::RIGHT()
diff --git a/cpp-function-returning-global-type b/cpp-function-returning-global-type
index 1084d59..1b57ca1 100644
--- a/cpp-function-returning-global-type
+++ b/cpp-function-returning-global-type
@@ -2,3 +2,3 @@ ::Item get::it::RIGHT()
{
- ChangeMe;
+ IWasChanged;
}
ok 55 - hunk header: cpp-function-returning-global-type
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-function-returning-nested >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ get::Item get::it::RIGHT()
diff --git a/cpp-function-returning-nested b/cpp-function-returning-nested
index d9750aa..83df216 100644
--- a/cpp-function-returning-nested
+++ b/cpp-function-returning-nested
@@ -2,3 +2,3 @@ get::Item get::it::RIGHT()
{
- ChangeMe;
+ IWasChanged;
}
ok 56 - hunk header: cpp-function-returning-nested
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-function-returning-pointer >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ const char *get_it_RIGHT(char *ptr)
diff --git a/cpp-function-returning-pointer b/cpp-function-returning-pointer
index ef15657..1339209 100644
--- a/cpp-function-returning-pointer
+++ b/cpp-function-returning-pointer
@@ -2,3 +2,3 @@ const char *get_it_RIGHT(char *ptr)
{
- ChangeMe;
+ IWasChanged;
}
ok 57 - hunk header: cpp-function-returning-pointer
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-function-returning-reference >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ string& get::it::RIGHT(char *ptr)
diff --git a/cpp-function-returning-reference b/cpp-function-returning-reference
index 01b051d..735bf10 100644
--- a/cpp-function-returning-reference
+++ b/cpp-function-returning-reference
@@ -2,3 +2,3 @@ string& get::it::RIGHT(char *ptr)
{
- ChangeMe;
+ IWasChanged;
}
ok 58 - hunk header: cpp-function-returning-reference
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-gnu-style-function >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -3,3 +3,3 @@ RIGHT(int arg)
diff --git a/cpp-gnu-style-function b/cpp-gnu-style-function
index 08c7c75..8aa213e 100644
--- a/cpp-gnu-style-function
+++ b/cpp-gnu-style-function
@@ -3,3 +3,3 @@ RIGHT(int arg)
{
- ChangeMe;
+ IWasChanged;
}
ok 59 - hunk header: cpp-gnu-style-function
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-namespace-definition >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ namespace RIGHT
diff --git a/cpp-namespace-definition b/cpp-namespace-definition
index 6749980..151ab14 100644
--- a/cpp-namespace-definition
+++ b/cpp-namespace-definition
@@ -2,3 +2,3 @@ namespace RIGHT
{
- ChangeMe;
+ IWasChanged;
}
ok 60 - hunk header: cpp-namespace-definition
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-operator-definition >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ Value operator+(Value LEFT, Value RIGHT)
diff --git a/cpp-operator-definition b/cpp-operator-definition
index 1acd827..fc88630 100644
--- a/cpp-operator-definition
+++ b/cpp-operator-definition
@@ -2,3 +2,3 @@ Value operator+(Value LEFT, Value RIGHT)
{
- ChangeMe;
+ IWasChanged;
}
ok 61 - hunk header: cpp-operator-definition
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-skip-access-specifiers >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -6,3 +6,3 @@ class RIGHT : public Baseclass
diff --git a/cpp-skip-access-specifiers b/cpp-skip-access-specifiers
index 4d4a9db..ebd6f42 100644
--- a/cpp-skip-access-specifiers
+++ b/cpp-skip-access-specifiers
@@ -6,3 +6,3 @@ class RIGHT : public Baseclass
void DoSomething();
- int ChangeMe;
+ int IWasChanged;
};
ok 62 - hunk header: cpp-skip-access-specifiers
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-skip-comment-block >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -7,3 +7,3 @@ struct item RIGHT(int i)
diff --git a/cpp-skip-comment-block b/cpp-skip-comment-block
index 3800b99..94419d1 100644
--- a/cpp-skip-comment-block
+++ b/cpp-skip-comment-block
@@ -7,3 +7,3 @@ struct item RIGHT(int i)
{
- ChangeMe;
+ IWasChanged;
}
ok 63 - hunk header: cpp-skip-comment-block
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-skip-labels >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -6,3 +6,3 @@ void RIGHT (void)
diff --git a/cpp-skip-labels b/cpp-skip-labels
index b9c10ab..3a5ccc4 100644
--- a/cpp-skip-labels
+++ b/cpp-skip-labels
@@ -6,3 +6,3 @@ void RIGHT (void)
- ChangeMe;
+ IWasChanged;
}
ok 64 - hunk header: cpp-skip-labels
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-struct-definition >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -7,3 +7,3 @@ struct RIGHT {
diff --git a/cpp-struct-definition b/cpp-struct-definition
index 521c59f..636b51b 100644
--- a/cpp-struct-definition
+++ b/cpp-struct-definition
@@ -7,3 +7,3 @@ struct RIGHT {
- int ChangeMe;
+ int IWasChanged;
};
ok 65 - hunk header: cpp-struct-definition
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-struct-single-line >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -6,2 +6,2 @@ struct RIGHT_iterator_tag {};
diff --git a/cpp-struct-single-line b/cpp-struct-single-line
index a0de5fb..ef36f0e 100644
--- a/cpp-struct-single-line
+++ b/cpp-struct-single-line
@@ -6,2 +6,2 @@ struct RIGHT_iterator_tag {};
-int ChangeMe;
+int IWasChanged;
ok 66 - hunk header: cpp-struct-single-line
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-template-function-definition >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ template<class T> int RIGHT(T arg)
diff --git a/cpp-template-function-definition b/cpp-template-function-definition
index 0cdf5ba..18f812d 100644
--- a/cpp-template-function-definition
+++ b/cpp-template-function-definition
@@ -2,3 +2,3 @@ template<class T> int RIGHT(T arg)
{
- ChangeMe;
+ IWasChanged;
}
ok 67 - hunk header: cpp-template-function-definition
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-union-definition >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ union RIGHT {
diff --git a/cpp-union-definition b/cpp-union-definition
index 7ec94df..f67e5e0 100644
--- a/cpp-union-definition
+++ b/cpp-union-definition
@@ -2,3 +2,3 @@ union RIGHT {
double v;
- int ChangeMe;
+ int IWasChanged;
};
ok 68 - hunk header: cpp-union-definition
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 cpp-void-c-function >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ void RIGHT (void)
diff --git a/cpp-void-c-function b/cpp-void-c-function
index 153081e..7ce1087 100644
--- a/cpp-void-c-function
+++ b/cpp-void-c-function
@@ -2,3 +2,3 @@ void RIGHT (void)
{
- ChangeMe;
+ IWasChanged;
}
ok 69 - hunk header: cpp-void-c-function
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 css-brace-in-col-1 >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -3,3 +3,3 @@ RIGHT label.control-label
diff --git a/css-brace-in-col-1 b/css-brace-in-col-1
index 7831577..a70b71f 100644
--- a/css-brace-in-col-1
+++ b/css-brace-in-col-1
@@ -3,3 +3,3 @@ RIGHT label.control-label
margin-top: 10px!important;
- border : 10px ChangeMe #C6C6C6;
+ border : 10px IWasChanged #C6C6C6;
}
ok 70 - hunk header: css-brace-in-col-1
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 css-colon-eol >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ RIGHT h1 {
diff --git a/css-colon-eol b/css-colon-eol
index 5a30553..2ed827e 100644
--- a/css-colon-eol
+++ b/css-colon-eol
@@ -2,3 +2,3 @@ RIGHT h1 {
color:
-ChangeMe;
+IWasChanged;
}
ok 71 - hunk header: css-colon-eol
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 css-colon-selector >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -3,3 +3,3 @@ RIGHT a:hover {
diff --git a/css-colon-selector b/css-colon-selector
index c6d71fb..eac5d97 100644
--- a/css-colon-selector
+++ b/css-colon-selector
@@ -3,3 +3,3 @@ RIGHT a:hover {
10px!important;
- border : 10px ChangeMe #C6C6C6;
+ border : 10px IWasChanged #C6C6C6;
}
ok 72 - hunk header: css-colon-selector
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 css-common >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ RIGHT label.control-label {
diff --git a/css-common b/css-common
index 84ed754..1226bd2 100644
--- a/css-common
+++ b/css-common
@@ -2,3 +2,3 @@ RIGHT label.control-label {
margin-top: 10px!important;
- border : 10px ChangeMe #C6C6C6;
+ border : 10px IWasChanged #C6C6C6;
}
ok 73 - hunk header: css-common
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 css-long-selector-list >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -4,3 +4,3 @@ div ul#RIGHT {
diff --git a/css-long-selector-list b/css-long-selector-list
index 7ccd25d..f31d086 100644
--- a/css-long-selector-list
+++ b/css-long-selector-list
@@ -4,3 +4,3 @@ div ul#RIGHT {
margin-top: 10px!important;
- border : 10px ChangeMe #C6C6C6;
+ border : 10px IWasChanged #C6C6C6;
}
ok 74 - hunk header: css-long-selector-list
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 css-prop-sans-indent >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -3,3 +3,3 @@ RIGHT, label.control-label {
diff --git a/css-prop-sans-indent b/css-prop-sans-indent
index a9e3c86..bd27e0b 100644
--- a/css-prop-sans-indent
+++ b/css-prop-sans-indent
@@ -3,3 +3,3 @@ RIGHT, label.control-label {
padding: 0;
-border : 10px ChangeMe #C6C6C6;
+border : 10px IWasChanged #C6C6C6;
}
ok 75 - hunk header: css-prop-sans-indent
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 css-short-selector-list >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ label.control, div ul#RIGHT {
diff --git a/css-short-selector-list b/css-short-selector-list
index 6a0bdee..b753956 100644
--- a/css-short-selector-list
+++ b/css-short-selector-list
@@ -2,3 +2,3 @@ label.control, div ul#RIGHT {
margin-top: 10px!important;
- border : 10px ChangeMe #C6C6C6;
+ border : 10px IWasChanged #C6C6C6;
}
ok 76 - hunk header: css-short-selector-list
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 css-trailing-space >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -3,3 +3,3 @@ RIGHT label.control-label {
diff --git a/css-trailing-space b/css-trailing-space
index 32b5606..84156d0 100644
--- a/css-trailing-space
+++ b/css-trailing-space
@@ -3,3 +3,3 @@ RIGHT label.control-label {
padding:10px;
- border : 10px ChangeMe #C6C6C6;
+ border : 10px IWasChanged #C6C6C6;
}
ok 77 - hunk header: css-trailing-space
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 custom1-pattern >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -9,3 +9,3 @@ int special, RIGHT;
diff --git a/custom1-pattern b/custom1-pattern
index e8fd59f..9d9e960 100644
--- a/custom1-pattern
+++ b/custom1-pattern
@@ -9,3 +9,3 @@ int special, RIGHT;
System.out.print(x + " bottles of beer on the wall "
- + x + " bottles of beer\n" // ChangeMe
+ + x + " bottles of beer\n" // IWasChanged
+ "Take one down, pass it around, " + (x - 1)
ok 78 - hunk header: custom1-pattern
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 custom2-match-to-end-of-line >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -5,3 +5,3 @@ RIGHT_Beer
diff --git a/custom2-match-to-end-of-line b/custom2-match-to-end-of-line
index f88ac31..7cf2919 100644
--- a/custom2-match-to-end-of-line
+++ b/custom2-match-to-end-of-line
@@ -5,3 +5,3 @@ RIGHT_Beer
{
- System.out.print("ChangeMe");
+ System.out.print("IWasChanged");
}
ok 79 - hunk header: custom2-match-to-end-of-line
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 custom3-alternation-in-pattern >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -9,3 +9,3 @@ public static void main(String RIGHT[])
diff --git a/custom3-alternation-in-pattern b/custom3-alternation-in-pattern
index 5f3769c..818aa3d 100644
--- a/custom3-alternation-in-pattern
+++ b/custom3-alternation-in-pattern
@@ -9,3 +9,3 @@ public static void main(String RIGHT[])
System.out.print(x + " bottles of beer on the wall "
- + x + " bottles of beer\n" // ChangeMe
+ + x + " bottles of beer\n" // IWasChanged
+ "Take one down, pass it around, " + (x - 1)
ok 80 - hunk header: custom3-alternation-in-pattern
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 fountain-scene >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -3,2 +3,2 @@ EXT. STREET RIGHT OUTSIDE - DAY
diff --git a/fountain-scene b/fountain-scene
index 6b3257d..3514c47 100644
--- a/fountain-scene
+++ b/fountain-scene
@@ -3,2 +3,2 @@ EXT. STREET RIGHT OUTSIDE - DAY
CHARACTER
-You didn't say the magic phrase, "ChangeMe".
+You didn't say the magic phrase, "IWasChanged".
ok 81 - hunk header: fountain-scene
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 golang-complex-function >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -6,3 +6,3 @@ func (t *Test) RIGHT(a Type) (Type, error) {
diff --git a/golang-complex-function b/golang-complex-function
index e057dce..2efe722 100644
--- a/golang-complex-function
+++ b/golang-complex-function
@@ -6,3 +6,3 @@ func (t *Test) RIGHT(a Type) (Type, error) {
t.a = a
- return ChangeMe, nil
+ return IWasChanged, nil
}
ok 82 - hunk header: golang-complex-function
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 golang-func >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ func RIGHT() {
diff --git a/golang-func b/golang-func
index 8e9c9ac..c1f8925 100644
--- a/golang-func
+++ b/golang-func
@@ -2,3 +2,3 @@ func RIGHT() {
a := 5
- b := ChangeMe
+ b := IWasChanged
}
ok 83 - hunk header: golang-func
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 golang-interface >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ type RIGHT interface {
diff --git a/golang-interface b/golang-interface
index 553bede..98c983f 100644
--- a/golang-interface
+++ b/golang-interface
@@ -2,3 +2,3 @@ type RIGHT interface {
a() Type
- b() ChangeMe
+ b() IWasChanged
}
ok 84 - hunk header: golang-interface
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 golang-long-func >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -3,3 +3,3 @@ func RIGHT(aVeryVeryVeryLongVariableName AVeryVeryVeryLongType,
diff --git a/golang-long-func b/golang-long-func
index ac3a77b..96a9478 100644
--- a/golang-long-func
+++ b/golang-long-func
@@ -3,3 +3,3 @@ func RIGHT(aVeryVeryVeryLongVariableName AVeryVeryVeryLongType,
a := 5
- b := ChangeMe
+ b := IWasChanged
}
ok 85 - hunk header: golang-long-func
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 golang-struct >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ type RIGHT struct {
diff --git a/golang-struct b/golang-struct
index 5deda77..3dd155e 100644
--- a/golang-struct
+++ b/golang-struct
@@ -2,3 +2,3 @@ type RIGHT struct {
a Type
- b ChangeMe
+ b IWasChanged
}
ok 86 - hunk header: golang-struct
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 java-class-member-function >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -5,3 +5,3 @@ public static void main(String RIGHT[])
diff --git a/java-class-member-function b/java-class-member-function
index 298bc7a..d50e1e9 100644
--- a/java-class-member-function
+++ b/java-class-member-function
@@ -5,3 +5,3 @@ public static void main(String RIGHT[])
{
- System.out.print("ChangeMe");
+ System.out.print("IWasChanged");
}
ok 87 - hunk header: java-class-member-function
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 matlab-class-definition >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ classdef RIGHT
diff --git a/matlab-class-definition b/matlab-class-definition
index 84daedf..e5abedf 100644
--- a/matlab-class-definition
+++ b/matlab-class-definition
@@ -2,3 +2,3 @@ classdef RIGHT
properties
- ChangeMe
+ IWasChanged
end
ok 88 - hunk header: matlab-class-definition
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 matlab-function >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ function y = RIGHT()
diff --git a/matlab-function b/matlab-function
index 897a9b1..b92e3ec 100644
--- a/matlab-function
+++ b/matlab-function
@@ -2,3 +2,3 @@ function y = RIGHT()
x = 5;
-y = ChangeMe + x;
+y = IWasChanged + x;
end
ok 89 - hunk header: matlab-function
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 matlab-octave-section-1 >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,2 +2,2 @@ %%% RIGHT section
diff --git a/matlab-octave-section-1 b/matlab-octave-section-1
index 3bb6c46..3fa5730 100644
--- a/matlab-octave-section-1
+++ b/matlab-octave-section-1
@@ -2,2 +2,2 @@ %%% RIGHT section
# this is octave script
-ChangeMe = 1;
+IWasChanged = 1;
ok 90 - hunk header: matlab-octave-section-1
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 matlab-octave-section-2 >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,2 +2,2 @@ ## RIGHT section
diff --git a/matlab-octave-section-2 b/matlab-octave-section-2
index ab2980f..d55cd6d 100644
--- a/matlab-octave-section-2
+++ b/matlab-octave-section-2
@@ -2,2 +2,2 @@ ## RIGHT section
# this is octave script
-ChangeMe = 1;
+IWasChanged = 1;
ok 91 - hunk header: matlab-octave-section-2
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 matlab-section >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,2 +2,2 @@ %% RIGHT section
diff --git a/matlab-section b/matlab-section
index 5ea59a5..aaaf4fc 100644
--- a/matlab-section
+++ b/matlab-section
@@ -2,2 +2,2 @@ %% RIGHT section
% this is understood by both matlab and octave
-ChangeMe = 1;
+IWasChanged = 1;
ok 92 - hunk header: matlab-section
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 perl-skip-end-of-heredoc >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -6,3 +6,3 @@ sub RIGHTwithheredocument {
diff --git a/perl-skip-end-of-heredoc b/perl-skip-end-of-heredoc
index c22d39b..b5d7cbd 100644
--- a/perl-skip-end-of-heredoc
+++ b/perl-skip-end-of-heredoc
@@ -6,3 +6,3 @@ sub RIGHTwithheredocument {
# to pad it out
- print "ChangeMe\n";
+ print "IWasChanged\n";
}
ok 93 - hunk header: perl-skip-end-of-heredoc
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 perl-skip-forward-decl >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -9,2 +9,2 @@ package RIGHT;
diff --git a/perl-skip-forward-decl b/perl-skip-forward-decl
index a98cb8b..a0a297b 100644
--- a/perl-skip-forward-decl
+++ b/perl-skip-forward-decl
@@ -9,2 +9,2 @@ package RIGHT;
-# ChangeMe
+# IWasChanged
ok 94 - hunk header: perl-skip-forward-decl
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 perl-skip-sub-in-pod >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -15,3 +15,3 @@ =head1 SYNOPSIS_RIGHT
diff --git a/perl-skip-sub-in-pod b/perl-skip-sub-in-pod
index e39f024..63b38e7 100644
--- a/perl-skip-sub-in-pod
+++ b/perl-skip-sub-in-pod
@@ -15,3 +15,3 @@ =head1 SYNOPSIS_RIGHT
- ChangeMe;
+ IWasChanged;
ok 95 - hunk header: perl-skip-sub-in-pod
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 perl-sub-definition >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ sub RIGHT {
diff --git a/perl-sub-definition b/perl-sub-definition
index a507d1f..63603be 100644
--- a/perl-sub-definition
+++ b/perl-sub-definition
@@ -2,3 +2,3 @@ sub RIGHT {
my ($n) = @_;
- print "ChangeMe";
+ print "IWasChanged";
}
ok 96 - hunk header: perl-sub-definition
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 perl-sub-definition-kr-brace >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ sub RIGHT
diff --git a/perl-sub-definition-kr-brace b/perl-sub-definition-kr-brace
index 330b3df..99672aa 100644
--- a/perl-sub-definition-kr-brace
+++ b/perl-sub-definition-kr-brace
@@ -2,3 +2,3 @@ sub RIGHT
{
- print "ChangeMe\n";
+ print "IWasChanged\n";
}
ok 97 - hunk header: perl-sub-definition-kr-brace
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 php-abstract-class >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ abstract class RIGHT
diff --git a/php-abstract-class b/php-abstract-class
index 5213e12..5046fa1 100644
--- a/php-abstract-class
+++ b/php-abstract-class
@@ -2,3 +2,3 @@ abstract class RIGHT
{
- const FOO = 'ChangeMe';
+ const FOO = 'IWasChanged';
}
ok 98 - hunk header: php-abstract-class
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 php-class >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ class RIGHT
diff --git a/php-class b/php-class
index 7785b63..1b24f95 100644
--- a/php-class
+++ b/php-class
@@ -2,3 +2,3 @@ class RIGHT
{
- const FOO = 'ChangeMe';
+ const FOO = 'IWasChanged';
}
ok 99 - hunk header: php-class
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 php-final-class >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ final class RIGHT
diff --git a/php-final-class b/php-final-class
index 69f5710..4938ab4 100644
--- a/php-final-class
+++ b/php-final-class
@@ -2,3 +2,3 @@ final class RIGHT
{
- const FOO = 'ChangeMe';
+ const FOO = 'IWasChanged';
}
ok 100 - hunk header: php-final-class
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 php-function >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ function RIGHT()
diff --git a/php-function b/php-function
index 35717c5..50a1553 100644
--- a/php-function
+++ b/php-function
@@ -2,3 +2,3 @@ function RIGHT()
{
- return 'ChangeMe';
+ return 'IWasChanged';
}
ok 101 - hunk header: php-function
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 php-interface >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ interface RIGHT
diff --git a/php-interface b/php-interface
index 86b49ad..bf02e64 100644
--- a/php-interface
+++ b/php-interface
@@ -2,3 +2,3 @@ interface RIGHT
{
- public function foo($ChangeMe);
+ public function foo($IWasChanged);
}
ok 102 - hunk header: php-interface
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 php-method >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -4,3 +4,3 @@ public static function RIGHT()
diff --git a/php-method b/php-method
index 03af1a6..a0f9459 100644
--- a/php-method
+++ b/php-method
@@ -4,3 +4,3 @@ public static function RIGHT()
{
- return 'ChangeMe';
+ return 'IWasChanged';
}
ok 103 - hunk header: php-method
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 php-trait >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ trait RIGHT
diff --git a/php-trait b/php-trait
index 65b8c82..e4d80b0 100644
--- a/php-trait
+++ b/php-trait
@@ -2,3 +2,3 @@ trait RIGHT
{
- public function foo($ChangeMe)
+ public function foo($IWasChanged)
{
ok 104 - hunk header: php-trait
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 rust-fn >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -3,3 +3,3 @@ pub(self) fn RIGHT<T>(x: &[T]) where T: Debug {
diff --git a/rust-fn b/rust-fn
index cbe0215..4c440f8 100644
--- a/rust-fn
+++ b/rust-fn
@@ -3,3 +3,3 @@ pub(self) fn RIGHT<T>(x: &[T]) where T: Debug {
// a comment
- let a = ChangeMe;
+ let a = IWasChanged;
}
ok 105 - hunk header: rust-fn
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 rust-impl >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ impl<'a, T: AsRef<[u8]>> std::RIGHT for Git<'a> {
diff --git a/rust-impl b/rust-impl
index 09df3cd..dada857 100644
--- a/rust-impl
+++ b/rust-impl
@@ -2,3 +2,3 @@ impl<'a, T: AsRef<[u8]>> std::RIGHT for Git<'a> {
- pub fn ChangeMe(&self) -> () {
+ pub fn IWasChanged(&self) -> () {
}
ok 106 - hunk header: rust-impl
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 rust-struct >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -3,3 +3,3 @@ pub(super) struct RIGHT<'a> {
diff --git a/rust-struct b/rust-struct
index 76aff1c..a403fc4 100644
--- a/rust-struct
+++ b/rust-struct
@@ -3,3 +3,3 @@ pub(super) struct RIGHT<'a> {
name: &'a str,
- age: ChangeMe,
+ age: IWasChanged,
}
ok 107 - hunk header: rust-struct
expecting success:
test_when_finished 'cat actual' && # for debugging only
git diff -U1 rust-trait >actual &&
grep '@@ .* @@.*RIGHT' actual
@@ -2,3 +2,3 @@ unsafe trait RIGHT<T> {
diff --git a/rust-trait b/rust-trait
index ea397f0..5933399 100644
--- a/rust-trait
+++ b/rust-trait
@@ -2,3 +2,3 @@ unsafe trait RIGHT<T> {
fn len(&self) -> u32;
- fn ChangeMe(&self, n: u32) -> T;
+ fn IWasChanged(&self, n: u32) -> T;
fn iter<F>(&self, f: F) where F: Fn(T);
ok 108 - hunk header: rust-trait
# passed all 108 test(s)
1..108
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4019-diff-wserror.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4019-diff-wserror/.git/
expecting success:
git config diff.color.whitespace "blue reverse" &&
>F &&
git add F &&
echo " Eight SP indent" >>F &&
echo " HT and SP indent" >>F &&
echo "With trailing SP " >>F &&
echo "Carriage ReturnQ" | tr Q "\015" >>F &&
echo "No problem" >>F &&
echo >>F
ok 1 - setup
expecting success:
prepare_output &&
grep Eight normal >/dev/null &&
grep HT error >/dev/null &&
grep With error >/dev/null &&
grep Return error >/dev/null &&
grep No normal >/dev/null
ok 2 - default
expecting success:
test_might_fail git config --unset core.whitespace &&
echo "F whitespace" >.gitattributes &&
prepare_output &&
grep Eight error >/dev/null &&
grep HT error >/dev/null &&
grep With error >/dev/null &&
grep Return error >/dev/null &&
grep No normal >/dev/null
ok 3 - default (attribute)
expecting success:
git config core.whitespace "tabwidth=10" &&
echo "F whitespace" >.gitattributes &&
prepare_output &&
grep Eight normal >/dev/null &&
grep HT error >/dev/null &&
grep With error >/dev/null &&
grep Return error >/dev/null &&
grep No normal >/dev/null
ok 4 - default, tabwidth=10 (attribute)
expecting success:
test_might_fail git config --unset core.whitespace &&
echo "F -whitespace" >.gitattributes &&
prepare_output &&
grep Eight normal >/dev/null &&
grep HT normal >/dev/null &&
grep With normal >/dev/null &&
grep Return normal >/dev/null &&
grep No normal >/dev/null
ok 5 - no check (attribute)
expecting success:
git config core.whitespace "tabwidth=10" &&
echo "F -whitespace" >.gitattributes &&
prepare_output &&
grep Eight normal >/dev/null &&
grep HT normal >/dev/null &&
grep With normal >/dev/null &&
grep Return normal >/dev/null &&
grep No normal >/dev/null
ok 6 - no check, tabwidth=10 (attribute), must be irrelevant
expecting success:
rm -f .gitattributes &&
git config core.whitespace -trail &&
prepare_output &&
grep Eight normal >/dev/null &&
grep HT error >/dev/null &&
grep With normal >/dev/null &&
grep Return normal >/dev/null &&
grep No normal >/dev/null
ok 7 - without -trail
expecting success:
test_might_fail git config --unset core.whitespace &&
echo "F whitespace=-trail" >.gitattributes &&
prepare_output &&
grep Eight normal >/dev/null &&
grep HT error >/dev/null &&
grep With normal >/dev/null &&
grep Return normal >/dev/null &&
grep No normal >/dev/null
ok 8 - without -trail (attribute)
expecting success:
rm -f .gitattributes &&
git config core.whitespace -space &&
prepare_output &&
grep Eight normal >/dev/null &&
grep HT normal >/dev/null &&
grep With error >/dev/null &&
grep Return error >/dev/null &&
grep No normal >/dev/null
ok 9 - without -space
expecting success:
test_might_fail git config --unset core.whitespace &&
echo "F whitespace=-space" >.gitattributes &&
prepare_output &&
grep Eight normal >/dev/null &&
grep HT normal >/dev/null &&
grep With error >/dev/null &&
grep Return error >/dev/null &&
grep No normal >/dev/null
ok 10 - without -space (attribute)
expecting success:
rm -f .gitattributes &&
git config core.whitespace indent,-trailing,-space &&
prepare_output &&
grep Eight error >/dev/null &&
grep HT normal >/dev/null &&
grep With normal >/dev/null &&
grep Return normal >/dev/null &&
grep No normal >/dev/null
ok 11 - with indent-non-tab only
expecting success:
test_might_fail git config --unset core.whitespace &&
echo "F whitespace=indent,-trailing,-space" >.gitattributes &&
prepare_output &&
grep Eight error >/dev/null &&
grep HT normal >/dev/null &&
grep With normal >/dev/null &&
grep Return normal >/dev/null &&
grep No normal >/dev/null
ok 12 - with indent-non-tab only (attribute)
expecting success:
rm -f .gitattributes &&
git config core.whitespace indent,tabwidth=10,-trailing,-space &&
prepare_output &&
grep Eight normal >/dev/null &&
grep HT normal >/dev/null &&
grep With normal >/dev/null &&
grep Return normal >/dev/null &&
grep No normal >/dev/null
ok 13 - with indent-non-tab only, tabwidth=10
expecting success:
test_might_fail git config --unset core.whitespace &&
echo "F whitespace=indent,-trailing,-space,tabwidth=10" >.gitattributes &&
prepare_output &&
grep Eight normal >/dev/null &&
grep HT normal >/dev/null &&
grep With normal >/dev/null &&
grep Return normal >/dev/null &&
grep No normal >/dev/null
ok 14 - with indent-non-tab only, tabwidth=10 (attribute)
expecting success:
rm -f .gitattributes &&
git config core.whitespace cr-at-eol &&
prepare_output &&
grep Eight normal >/dev/null &&
grep HT error >/dev/null &&
grep With error >/dev/null &&
grep Return normal >/dev/null &&
grep No normal >/dev/null
ok 15 - with cr-at-eol
expecting success:
test_might_fail git config --unset core.whitespace &&
echo "F whitespace=trailing,cr-at-eol" >.gitattributes &&
prepare_output &&
grep Eight normal >/dev/null &&
grep HT error >/dev/null &&
grep With error >/dev/null &&
grep Return normal >/dev/null &&
grep No normal >/dev/null
ok 16 - with cr-at-eol (attribute)
expecting success:
rm -f .gitattributes &&
test_must_fail git diff --check >output &&
grep "new blank line at" output &&
grep "trailing whitespace" output
F:6: new blank line at EOF.
F:3: trailing whitespace.
F:4: trailing whitespace.
ok 17 - trailing empty lines (1)
expecting success:
echo "F -whitespace" >.gitattributes &&
git diff --check >output &&
test_must_be_empty output
ok 18 - trailing empty lines (2)
expecting success:
printf "a\nb\n" > G &&
git add G &&
printf "x\nx\nx\na\nb\nc\n\n" > G &&
[ "$(git diff --check -- G)" = "G:7: new blank line at EOF." ]
ok 19 - checkdiff shows correct line number for trailing blank lines
expecting success:
test_might_fail git config --unset core.whitespace &&
rm -f .gitattributes &&
echo AAAQ | tr Q "\015" >G &&
git add G &&
echo BBBQ | tr Q "\015" >>G &&
git diff --color G | tr "\015" Q >output &&
grep "BBB.*${blue_grep}Q" output &&
grep "AAA.*\[mQ" output
[32m+[m[32mBBB[m[7;34mQ[m
AAA[mQ
ok 20 - do not color trailing cr in context
expecting success:
{ echo a; echo b; echo; echo; } >x &&
git add x &&
{ echo a; echo; echo; echo; echo c; echo; echo; echo; echo; } >x &&
git diff --color x >output &&
cnt=$($grep_a "${blue_grep}" output | wc -l) &&
test $cnt = 2
ok 21 - color new trailing blank lines
# passed all 21 test(s)
1..21
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4013-diff-various.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4013-diff-various/.git/
expecting success:
GIT_AUTHOR_DATE="2006-06-26 00:00:00 +0000" &&
GIT_COMMITTER_DATE="2006-06-26 00:00:00 +0000" &&
export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
mkdir dir &&
mkdir dir2 &&
for i in 1 2 3; do echo $i; done >file0 &&
for i in A B; do echo $i; done >dir/sub &&
cat file0 >file2 &&
git add file0 file2 dir/sub &&
git commit -m Initial &&
git branch initial &&
git branch side &&
GIT_AUTHOR_DATE="2006-06-26 00:01:00 +0000" &&
GIT_COMMITTER_DATE="2006-06-26 00:01:00 +0000" &&
export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
for i in 4 5 6; do echo $i; done >>file0 &&
for i in C D; do echo $i; done >>dir/sub &&
rm -f file2 &&
git update-index --remove file0 file2 dir/sub &&
git commit -m "Second${LF}${LF}This is the second commit." &&
GIT_AUTHOR_DATE="2006-06-26 00:02:00 +0000" &&
GIT_COMMITTER_DATE="2006-06-26 00:02:00 +0000" &&
export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
for i in A B C; do echo $i; done >file1 &&
git add file1 &&
for i in E F; do echo $i; done >>dir/sub &&
git update-index dir/sub &&
git commit -m Third &&
GIT_AUTHOR_DATE="2006-06-26 00:03:00 +0000" &&
GIT_COMMITTER_DATE="2006-06-26 00:03:00 +0000" &&
export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
git checkout side &&
for i in A B C; do echo $i; done >>file0 &&
for i in 1 2; do echo $i; done >>dir/sub &&
cat dir/sub >file3 &&
git add file3 &&
git update-index file0 dir/sub &&
git commit -m Side &&
GIT_AUTHOR_DATE="2006-06-26 00:04:00 +0000" &&
GIT_COMMITTER_DATE="2006-06-26 00:04:00 +0000" &&
export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
git checkout master &&
git pull -s ours . side &&
GIT_AUTHOR_DATE="2006-06-26 00:05:00 +0000" &&
GIT_COMMITTER_DATE="2006-06-26 00:05:00 +0000" &&
export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
for i in A B C; do echo $i; done >>file0 &&
for i in 1 2; do echo $i; done >>dir/sub &&
git update-index file0 dir/sub &&
mkdir dir3 &&
cp dir/sub dir3/sub &&
test-tool chmtime +1 dir3/sub &&
git config log.showroot false &&
git commit --amend &&
GIT_AUTHOR_DATE="2006-06-26 00:06:00 +0000" &&
GIT_COMMITTER_DATE="2006-06-26 00:06:00 +0000" &&
export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
git checkout -b rearrange initial &&
for i in B A; do echo $i; done >dir/sub &&
git add dir/sub &&
git commit -m "Rearranged lines in dir/sub" &&
git checkout master &&
GIT_AUTHOR_DATE="2006-06-26 00:06:00 +0000" &&
GIT_COMMITTER_DATE="2006-06-26 00:06:00 +0000" &&
export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
git checkout -b mode initial &&
git update-index --chmod=+x file0 &&
git commit -m "update mode" &&
git checkout -f master &&
# Same merge as master, but with parents reversed. Hide it in a
# pseudo-ref to avoid impacting tests with --all.
commit=$(echo reverse |
git commit-tree -p master^2 -p master^1 master^{tree}) &&
git update-ref REVERSE $commit &&
git config diff.renames false &&
git show-branch
[master (root-commit) 444ac55] Initial
Author: A U Thor <author@example.com>
3 files changed, 8 insertions(+)
create mode 100644 dir/sub
create mode 100644 file0
create mode 100644 file2
[master 1bde4ae] Second
Author: A U Thor <author@example.com>
3 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 file2
[master 9a6d494] Third
Author: A U Thor <author@example.com>
2 files changed, 5 insertions(+)
create mode 100644 file1
Switched to branch 'side'
[side c7a2ab9] Side
Author: A U Thor <author@example.com>
3 files changed, 9 insertions(+)
create mode 100644 file3
Switched to branch 'master'
From .
* branch side -> FETCH_HEAD
Merge made by the 'ours' strategy.
[master 59d314a] Merge branch 'side'
Author: A U Thor <author@example.com>
Date: Mon Jun 26 00:04:00 2006 +0000
Switched to a new branch 'rearrange'
[rearrange cd4e72f] Rearranged lines in dir/sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'master'
Switched to a new branch 'mode'
[mode b7e0bc6] update mode
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 file0
Switched to branch 'master'
! [initial] Initial
* [master] Merge branch 'side'
! [mode] update mode
! [rearrange] Rearranged lines in dir/sub
! [side] Side
-----
+ [rearrange] Rearranged lines in dir/sub
+ [mode] update mode
- [master] Merge branch 'side'
* + [side] Side
* [master^] Third
* [master~2] Second
+*+++ [initial] Initial
ok 1 - setup
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 2 - git diff-tree initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 3 - git diff-tree -r initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 4 - git diff-tree -r --abbrev initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 5 - git diff-tree -r --abbrev=4 initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 6 - git diff-tree --root initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 7 - git diff-tree --root --abbrev initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 8 - git diff-tree --root --abbrev initial # magic is noellipses
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 9 - git diff-tree --root -r initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 10 - git diff-tree --root -r --abbrev initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 11 - git diff-tree --root -r --abbrev initial # magic is noellipses
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 12 - git diff-tree --root -r --abbrev=4 initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 13 - git diff-tree --root -r --abbrev=4 initial # magic is noellipses
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 14 - git diff-tree -p initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 15 - git diff-tree --root -p initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 16 - git diff-tree --patch-with-stat initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 17 - git diff-tree --root --patch-with-stat initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 18 - git diff-tree --patch-with-raw initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 19 - git diff-tree --root --patch-with-raw initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 20 - git diff-tree --pretty initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 21 - git diff-tree --pretty --root initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 22 - git diff-tree --pretty -p initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 23 - git diff-tree --pretty --stat initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 24 - git diff-tree --pretty --summary initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 25 - git diff-tree --pretty --stat --summary initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 26 - git diff-tree --pretty --root -p initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 27 - git diff-tree --pretty --root --stat initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 28 - git diff-tree --pretty --root --summary initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 29 - git diff-tree --pretty --root --summary -r initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 30 - git diff-tree --pretty --root --stat --summary initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 31 - git diff-tree --pretty --patch-with-stat initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 32 - git diff-tree --pretty --root --patch-with-stat initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 33 - git diff-tree --pretty --patch-with-raw initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 34 - git diff-tree --pretty --root --patch-with-raw initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 35 - git diff-tree --pretty=oneline initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 36 - git diff-tree --pretty=oneline --root initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 37 - git diff-tree --pretty=oneline -p initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 38 - git diff-tree --pretty=oneline --root -p initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 39 - git diff-tree --pretty=oneline --patch-with-stat initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 40 - git diff-tree --pretty=oneline --root --patch-with-stat initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 41 - git diff-tree --pretty=oneline --patch-with-raw initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 42 - git diff-tree --pretty=oneline --root --patch-with-raw initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 43 - git diff-tree --pretty side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 44 - git diff-tree --pretty -p side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 45 - git diff-tree --pretty --patch-with-stat side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 46 - git diff-tree initial mode # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 47 - git diff-tree --stat initial mode # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 48 - git diff-tree --summary initial mode # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 49 - git diff-tree master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 50 - git diff-tree -p master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 51 - git diff-tree -p -m master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 52 - git diff-tree -c master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 53 - git diff-tree -c --abbrev master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 54 - git diff-tree -c --abbrev master # magic is noellipses
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 55 - git diff-tree --cc master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 56 - git diff-tree -c --stat master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 57 - git diff-tree --cc --stat master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 58 - git diff-tree -c --stat --summary master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 59 - git diff-tree --cc --stat --summary master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 60 - git diff-tree -c --stat --summary side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 61 - git diff-tree --cc --stat --summary side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 62 - git diff-tree --cc --shortstat master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 63 - git diff-tree --cc --summary REVERSE # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 64 - git diff-tree --cc --patch-with-stat master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 65 - git diff-tree --cc --patch-with-stat --summary master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 66 - git diff-tree --cc --patch-with-stat --summary side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 67 - git log master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 68 - git log -p master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 69 - git log --root master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 70 - git log --root -p master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 71 - git log --patch-with-stat master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 72 - git log --root --patch-with-stat master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 73 - git log --root --patch-with-stat --summary master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 74 - git log --root -c --patch-with-stat --summary master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 75 - git log --root --cc --patch-with-stat --summary master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 76 - git log -p --first-parent master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 77 - git log -m -p --first-parent master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 78 - git log -m -p master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 79 - git log -SF master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 80 - git log -S F master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 81 - git log -SF -p master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 82 - git log -SF master --max-count=0 # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 83 - git log -SF master --max-count=1 # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 84 - git log -SF master --max-count=2 # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 85 - git log -GF master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 86 - git log -GF -p master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 87 - git log -GF -p --pickaxe-all master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 88 - git log --decorate --all # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 89 - git log --decorate=full --all # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 90 - git rev-list --parents HEAD # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 91 - git rev-list --children HEAD # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 92 - git whatchanged master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 93 - git whatchanged master # magic is noellipses
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 94 - git whatchanged -p master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 95 - git whatchanged --root master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 96 - git whatchanged --root master # magic is noellipses
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 97 - git whatchanged --root -p master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 98 - git whatchanged --patch-with-stat master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 99 - git whatchanged --root --patch-with-stat master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 100 - git whatchanged --root --patch-with-stat --summary master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 101 - git whatchanged --root -c --patch-with-stat --summary master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 102 - git whatchanged --root --cc --patch-with-stat --summary master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 103 - git whatchanged -SF master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 104 - git whatchanged -SF master # magic is noellipses
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 105 - git whatchanged -SF -p master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 106 - git log --patch-with-stat master -- dir/ # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 107 - git whatchanged --patch-with-stat master -- dir/ # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 108 - git log --patch-with-stat --summary master -- dir/ # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 109 - git whatchanged --patch-with-stat --summary master -- dir/ # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 110 - git show initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 111 - git show --root initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 112 - git show side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 113 - git show master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 114 - git show -c master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 115 - git show -m master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 116 - git show --first-parent master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 117 - git show --stat side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 118 - git show --stat --summary side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 119 - git show --patch-with-stat side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 120 - git show --patch-with-raw side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 121 - git show --patch-with-raw side # magic is noellipses
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 122 - git show --patch-with-stat --summary side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 123 - git format-patch --stdout initial..side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 124 - git format-patch --stdout initial..master^ # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 125 - git format-patch --stdout initial..master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 126 - git format-patch --stdout --no-numbered initial..master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 127 - git format-patch --stdout --numbered initial..master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 128 - git format-patch --attach --stdout initial..side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 129 - git format-patch --attach --stdout --suffix=.diff initial..side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 130 - git format-patch --attach --stdout initial..master^ # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 131 - git format-patch --attach --stdout initial..master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 132 - git format-patch --inline --stdout initial..side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 133 - git format-patch --inline --stdout initial..master^ # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 134 - git format-patch --inline --stdout --numbered-files initial..master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 135 - git format-patch --inline --stdout initial..master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 136 - git format-patch --inline --stdout --subject-prefix=TESTCASE initial..master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 137 - git config format.subjectprefix DIFFERENT_PREFIX # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 138 - git format-patch --inline --stdout initial..master^^ # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 139 - git format-patch --stdout --cover-letter -n initial..master^ # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 140 - git diff --abbrev initial..side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 141 - git diff -U initial..side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 142 - git diff -U1 initial..side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 143 - git diff -r initial..side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 144 - git diff --stat initial..side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 145 - git diff -r --stat initial..side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 146 - git diff initial..side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 147 - git diff --patch-with-stat initial..side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 148 - git diff --patch-with-raw initial..side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 149 - git diff --patch-with-raw initial..side # magic is noellipses
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 150 - git diff --patch-with-stat -r initial..side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 151 - git diff --patch-with-raw -r initial..side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 152 - git diff --patch-with-raw -r initial..side # magic is noellipses
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 153 - git diff --name-status dir2 dir # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 154 - git diff --no-index --name-status dir2 dir # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 155 - git diff --no-index --name-status -- dir2 dir # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 156 - git diff --no-index dir dir3 # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 157 - git diff master master^ side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 158 - git diff --line-prefix=abc master master^ side # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 159 - git diff --dirstat master~1 master~2 # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 160 - git diff --dirstat initial rearrange # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 161 - git diff --dirstat-by-file initial rearrange # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 162 - git diff --dirstat --cc master~1 master # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 163 - git diff --raw initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 164 - git diff --raw initial # magic is noellipses
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 165 - git diff --raw --abbrev=4 initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 166 - git diff --raw --abbrev=4 initial # magic is noellipses
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 167 - git diff --raw --no-abbrev initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 168 - git diff --no-index --raw dir2 dir # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 169 - git diff --no-index --raw dir2 dir # magic is noellipses
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 170 - git diff --no-index --raw --abbrev=4 dir2 dir # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 171 - git diff --no-index --raw --abbrev=4 dir2 dir # magic is noellipses
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 172 - git diff --no-index --raw --no-abbrev dir2 dir # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 173 - git diff-tree --pretty --root --stat --compact-summary initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 174 - git diff-tree --pretty -R --root --stat --compact-summary initial # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 175 - git diff-tree --stat --compact-summary initial mode # magic is (not used)
expecting success:
{
echo "$ git $cmd"
case "$magic" in
"")
GIT_PRINT_SHA1_ELLIPSIS=yes git $cmd ;;
noellipses)
git $cmd ;;
esac |
sed -e "s/^\\(-*\\)$V\\(-*\\)\$/\\1g-i-t--v-e-r-s-i-o-n\2/" \
-e "s/^\\(.*mixed; boundary=\"-*\\)$V\\(-*\\)\"\$/\\1g-i-t--v-e-r-s-i-o-n\2\"/"
echo "\$"
} >"$actual" &&
if test -f "$expect"
then
case $cmd in
*format-patch* | *-stat*)
test_i18ncmp "$expect" "$actual";;
*)
test_cmp "$expect" "$actual";;
esac &&
rm -f "$actual"
else
# this is to help developing new tests.
cp "$actual" "$expect"
false
fi
ok 176 - git diff-tree -R --stat --compact-summary initial mode # magic is (not used)
expecting success:
test_must_fail git log -S
error: switch `S' requires a value
ok 177 - log -S requires an argument
expecting success:
echo ref: refs/heads/unborn >.git/HEAD &&
git diff --cached >result &&
test_cmp "$TEST_DIRECTORY/t4013/diff.diff_--cached" result
ok 178 - diff --cached on unborn branch
expecting success:
git diff --cached -- file0 >result &&
test_cmp "$TEST_DIRECTORY/t4013/diff.diff_--cached_--_file0" result
ok 179 - diff --cached -- file on unborn branch
expecting success:
git diff --line-prefix="| | | " --cached -- file0 >result &&
test_cmp "$TEST_DIRECTORY/t4013/diff.diff_--line-prefix_--cached_--_file0" result
ok 180 - diff --line-prefix with spaces
expecting success:
cat >expect <<-\EOF &&
Side
Third
Second
EOF
git rev-list master | git diff-tree --stdin --format=%s -s >actual &&
test_cmp expect actual
ok 181 - diff-tree --stdin with log formatting
# passed all 181 test(s)
1..181
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4021-format-patch-numbered.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4021-format-patch-numbered/.git/
expecting success:
echo A > file &&
git add file &&
git commit -m First &&
echo B >> file &&
git commit -a -m Second &&
echo C >> file &&
git commit -a -m Third
[master (root-commit) 9518409] First
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 4188450] Second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 0fa9a5c] Third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
git format-patch --stdout HEAD~1 >patch0.single &&
test_single_no_numbered patch0.single
ok 2 - single patch defaults to no numbers
expecting success:
git format-patch --stdout HEAD~2 >patch0.multiple &&
test_numbered patch0.multiple
Subject: [PATCH 1/2] Second
Subject: [PATCH 2/2] Third
ok 3 - multiple patch defaults to numbered
expecting success:
git format-patch --numbered --stdout HEAD~1 >patch1 &&
test_single_numbered patch1
Subject: [PATCH 1/1] Third
ok 4 - Use --numbered
expecting success:
git config format.numbered true &&
git format-patch --stdout HEAD~2 >patch2 &&
test_numbered patch2
Subject: [PATCH 1/2] Second
Subject: [PATCH 2/2] Third
ok 5 - format.numbered = true
expecting success:
git format-patch --stdout HEAD^ > patch3 &&
test_single_numbered patch3
Subject: [PATCH 1/1] Third
ok 6 - format.numbered && single patch
expecting success:
git format-patch --no-numbered --stdout HEAD~2 >patch4 &&
test_no_numbered patch4
ok 7 - format.numbered && --no-numbered
expecting success:
git format-patch --keep-subject --stdout HEAD^ >patch4a &&
grep "^Subject: Third" patch4a
Subject: Third
ok 8 - format.numbered && --keep-subject
expecting success:
git config format.numbered auto &&
git format-patch --stdout HEAD~2 > patch5 &&
test_numbered patch5
Subject: [PATCH 1/2] Second
Subject: [PATCH 2/2] Third
ok 9 - format.numbered = auto
expecting success:
git format-patch --stdout HEAD^ > patch6 &&
test_single_no_numbered patch6
ok 10 - format.numbered = auto && single patch
expecting success:
git format-patch --no-numbered --stdout HEAD~2 > patch7 &&
test_no_numbered patch7
ok 11 - format.numbered = auto && --no-numbered
expecting success:
git format-patch --start-number 3 --numbered --stdout HEAD~1 > patch8 &&
grep "^Subject: \[PATCH 3/3\]" patch8
Subject: [PATCH 3/3] Third
ok 12 - --start-number && --numbered
expecting success:
git format-patch --cover-letter --stdout HEAD~1 >patch9.single &&
test_single_cover_letter_numbered patch9.single
Subject: [PATCH 0/1] *** SUBJECT HERE ***
Subject: [PATCH 1/1] Third
ok 13 - single patch with cover-letter defaults to numbers
expecting success:
git format-patch --no-numbered --stdout --cover-letter HEAD~1 >patch10 &&
test_no_numbered patch10
ok 14 - Use --no-numbered and --cover-letter single patch
# passed all 14 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4022-diff-rewrite.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4022-diff-rewrite/.git/
expecting success:
cat "$TEST_DIRECTORY"/../COPYING >test &&
git add test &&
tr \
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" \
"nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM" \
<"$TEST_DIRECTORY"/../COPYING >test &&
echo "to be deleted" >test2 &&
blob=$(git hash-object test2) &&
blob=$(git rev-parse --short $blob) &&
git add test2
ok 1 - setup
expecting success:
actual=$(git diff-files -B --summary test) &&
verbose expr "$actual" : " rewrite test ([0-9]*%)$"
19
ok 2 - detect rewrite
expecting success:
rm test2 &&
git diff -- test2 >actual &&
test_cmp expect actual
ok 3 - show deletion diff without -D
expecting success:
git diff -D -- test2 >actual &&
test_cmp expect actual
ok 4 - suppress deletion diff with -D
expecting success:
git diff -B -- test >actual &&
grep "Linus Torvalds" actual
- Linus Torvalds
ok 5 - show deletion diff with -B
expecting success:
git diff -B -D -- test >actual &&
grep -v "Linus Torvalds" actual
diff --git a/test b/test
dissimilarity index 98%
index 536e555..189438f 100644
--- a/test
+++ b/test
@@ -?,? +1,360 @@
+
+ Abgr gung gur bayl inyvq irefvba bs gur TCY nf sne nf guvf cebwrpg
+ vf pbaprearq vf _guvf_ cnegvphyne irefvba bs gur yvprafr (vr i2, abg
+ i2.2 be i3.k be jungrire), hayrff rkcyvpvgyl bgurejvfr fgngrq.
+
+ UBJRIRE, va beqre gb nyybj n zvtengvba gb TCYi3 vs gung frrzf yvxr
+ n tbbq vqrn, V nyfb nfx gung crbcyr vaibyirq jvgu gur cebwrpg znxr
+ gurve cersreraprf xabja. Va cnegvphyne, vs lbh gehfg zr gb znxr gung
+ qrpvfvba, lbh zvtug abgr fb va lbhe pbclevtug zrffntr, vr fbzrguvat
+ yvxr
+
+ Guvf svyr vf yvprafrq haqre gur TCY i2, be n yngre irefvba
+ ng gur qvfpergvba bs Yvahf.
+
+ zvtug nibvq vffhrf. Ohg jr pna nyfb whfg qrpvqr gb flapuebavmr naq
+ pbagnpg nyy pbclevtug ubyqref ba erpbeq vs/jura gur bppnfvba nevfrf.
+
+ Yvahf Gbeinyqf
+
+----------------------------------------
+
+ TAH TRARENY CHOYVP YVPRAFR
+ Irefvba 2, Whar 1991
+
+ Pbclevtug (P) 1989, 1991 Serr Fbsgjner Sbhaqngvba, Vap.,
+ 51 Senaxyva Fgerrg, Svsgu Sybbe, Obfgba, ZN 02110-1301 HFN
+ Rirelbar vf crezvggrq gb pbcl naq qvfgevohgr ireongvz pbcvrf
+ bs guvf yvprafr qbphzrag, ohg punatvat vg vf abg nyybjrq.
+
+ Cernzoyr
+
+ Gur yvprafrf sbe zbfg fbsgjner ner qrfvtarq gb gnxr njnl lbhe
+serrqbz gb funer naq punatr vg. Ol pbagenfg, gur TAH Trareny Choyvp
+Yvprafr vf vagraqrq gb thnenagrr lbhe serrqbz gb funer naq punatr serr
+fbsgjner--gb znxr fher gur fbsgjner vf serr sbe nyy vgf hfref. Guvf
+Trareny Choyvp Yvprafr nccyvrf gb zbfg bs gur Serr Fbsgjner
+Sbhaqngvba'f fbsgjner naq gb nal bgure cebtenz jubfr nhgubef pbzzvg gb
+hfvat vg. (Fbzr bgure Serr Fbsgjner Sbhaqngvba fbsgjner vf pbirerq ol
+gur TAH Yrffre Trareny Choyvp Yvprafr vafgrnq.) Lbh pna nccyl vg gb
+lbhe cebtenzf, gbb.
+
+ Jura jr fcrnx bs serr fbsgjner, jr ner ersreevat gb serrqbz, abg
+cevpr. Bhe Trareny Choyvp Yvprafrf ner qrfvtarq gb znxr fher gung lbh
+unir gur serrqbz gb qvfgevohgr pbcvrf bs serr fbsgjner (naq punetr sbe
+guvf freivpr vs lbh jvfu), gung lbh erprvir fbhepr pbqr be pna trg vg
+vs lbh jnag vg, gung lbh pna punatr gur fbsgjner be hfr cvrprf bs vg
+va arj serr cebtenzf; naq gung lbh xabj lbh pna qb gurfr guvatf.
+
+ Gb cebgrpg lbhe evtugf, jr arrq gb znxr erfgevpgvbaf gung sbeovq
+nalbar gb qral lbh gurfr evtugf be gb nfx lbh gb fheeraqre gur evtugf.
+Gurfr erfgevpgvbaf genafyngr gb pregnva erfcbafvovyvgvrf sbe lbh vs lbh
+qvfgevohgr pbcvrf bs gur fbsgjner, be vs lbh zbqvsl vg.
+
+ Sbe rknzcyr, vs lbh qvfgevohgr pbcvrf bs fhpu n cebtenz, jurgure
+tengvf be sbe n srr, lbh zhfg tvir gur erpvcvragf nyy gur evtugf gung
+lbh unir. Lbh zhfg znxr fher gung gurl, gbb, erprvir be pna trg gur
+fbhepr pbqr. Naq lbh zhfg fubj gurz gurfr grezf fb gurl xabj gurve
+evtugf.
+
+ Jr cebgrpg lbhe evtugf jvgu gjb fgrcf: (1) pbclevtug gur fbsgjner, naq
+(2) bssre lbh guvf yvprafr juvpu tvirf lbh yrtny crezvffvba gb pbcl,
+qvfgevohgr naq/be zbqvsl gur fbsgjner.
+
+ Nyfb, sbe rnpu nhgube'f cebgrpgvba naq bhef, jr jnag gb znxr pregnva
+gung rirelbar haqrefgnaqf gung gurer vf ab jneenagl sbe guvf serr
+fbsgjner. Vs gur fbsgjner vf zbqvsvrq ol fbzrbar ryfr naq cnffrq ba, jr
+jnag vgf erpvcvragf gb xabj gung jung gurl unir vf abg gur bevtvany, fb
+gung nal ceboyrzf vagebqhprq ol bguref jvyy abg ersyrpg ba gur bevtvany
+nhgubef' erchgngvbaf.
+
+ Svanyyl, nal serr cebtenz vf guerngrarq pbafgnagyl ol fbsgjner
+cngragf. Jr jvfu gb nibvq gur qnatre gung erqvfgevohgbef bs n serr
+cebtenz jvyy vaqvivqhnyyl bognva cngrag yvprafrf, va rssrpg znxvat gur
+cebtenz cebcevrgnel. Gb cerirag guvf, jr unir znqr vg pyrne gung nal
+cngrag zhfg or yvprafrq sbe rirelbar'f serr hfr be abg yvprafrq ng nyy.
+
+ Gur cerpvfr grezf naq pbaqvgvbaf sbe pbclvat, qvfgevohgvba naq
+zbqvsvpngvba sbyybj.
+
+ TAH TRARENY CHOYVP YVPRAFR
+ GREZF NAQ PBAQVGVBAF SBE PBCLVAT, QVFGEVOHGVBA NAQ ZBQVSVPNGVBA
+
+ 0. Guvf Yvprafr nccyvrf gb nal cebtenz be bgure jbex juvpu pbagnvaf
+n abgvpr cynprq ol gur pbclevtug ubyqre fnlvat vg znl or qvfgevohgrq
+haqre gur grezf bs guvf Trareny Choyvp Yvprafr. Gur "Cebtenz", orybj,
+ersref gb nal fhpu cebtenz be jbex, naq n "jbex onfrq ba gur Cebtenz"
+zrnaf rvgure gur Cebtenz be nal qrevingvir jbex haqre pbclevtug ynj:
+gung vf gb fnl, n jbex pbagnvavat gur Cebtenz be n cbegvba bs vg,
+rvgure ireongvz be jvgu zbqvsvpngvbaf naq/be genafyngrq vagb nabgure
+ynathntr. (Urervansgre, genafyngvba vf vapyhqrq jvgubhg yvzvgngvba va
+gur grez "zbqvsvpngvba".) Rnpu yvprafrr vf nqqerffrq nf "lbh".
+
+Npgvivgvrf bgure guna pbclvat, qvfgevohgvba naq zbqvsvpngvba ner abg
+pbirerq ol guvf Yvprafr; gurl ner bhgfvqr vgf fpbcr. Gur npg bs
+ehaavat gur Cebtenz vf abg erfgevpgrq, naq gur bhgchg sebz gur Cebtenz
+vf pbirerq bayl vs vgf pbagragf pbafgvghgr n jbex onfrq ba gur
+Cebtenz (vaqrcraqrag bs univat orra znqr ol ehaavat gur Cebtenz).
+Jurgure gung vf gehr qrcraqf ba jung gur Cebtenz qbrf.
+
+ 1. Lbh znl pbcl naq qvfgevohgr ireongvz pbcvrf bs gur Cebtenz'f
+fbhepr pbqr nf lbh erprvir vg, va nal zrqvhz, cebivqrq gung lbh
+pbafcvphbhfyl naq nccebcevngryl choyvfu ba rnpu pbcl na nccebcevngr
+pbclevtug abgvpr naq qvfpynvzre bs jneenagl; xrrc vagnpg nyy gur
+abgvprf gung ersre gb guvf Yvprafr naq gb gur nofrapr bs nal jneenagl;
+naq tvir nal bgure erpvcvragf bs gur Cebtenz n pbcl bs guvf Yvprafr
+nybat jvgu gur Cebtenz.
+
+Lbh znl punetr n srr sbe gur culfvpny npg bs genafsreevat n pbcl, naq
+lbh znl ng lbhe bcgvba bssre jneenagl cebgrpgvba va rkpunatr sbe n srr.
+
+ 2. Lbh znl zbqvsl lbhe pbcl be pbcvrf bs gur Cebtenz be nal cbegvba
+bs vg, guhf sbezvat n jbex onfrq ba gur Cebtenz, naq pbcl naq
+qvfgevohgr fhpu zbqvsvpngvbaf be jbex haqre gur grezf bs Frpgvba 1
+nobir, cebivqrq gung lbh nyfb zrrg nyy bs gurfr pbaqvgvbaf:
+
+ n) Lbh zhfg pnhfr gur zbqvsvrq svyrf gb pneel cebzvarag abgvprf
+ fgngvat gung lbh punatrq gur svyrf naq gur qngr bs nal punatr.
+
+ o) Lbh zhfg pnhfr nal jbex gung lbh qvfgevohgr be choyvfu, gung va
+ jubyr be va cneg pbagnvaf be vf qrevirq sebz gur Cebtenz be nal
+ cneg gurerbs, gb or yvprafrq nf n jubyr ng ab punetr gb nyy guveq
+ cnegvrf haqre gur grezf bs guvf Yvprafr.
+
+ p) Vs gur zbqvsvrq cebtenz abeznyyl ernqf pbzznaqf vagrenpgviryl
+ jura eha, lbh zhfg pnhfr vg, jura fgnegrq ehaavat sbe fhpu
+ vagrenpgvir hfr va gur zbfg beqvanel jnl, gb cevag be qvfcynl na
+ naabhaprzrag vapyhqvat na nccebcevngr pbclevtug abgvpr naq n
+ abgvpr gung gurer vf ab jneenagl (be ryfr, fnlvat gung lbh cebivqr
+ n jneenagl) naq gung hfref znl erqvfgevohgr gur cebtenz haqre
+ gurfr pbaqvgvbaf, naq gryyvat gur hfre ubj gb ivrj n pbcl bs guvf
+ Yvprafr. (Rkprcgvba: vs gur Cebtenz vgfrys vf vagrenpgvir ohg
+ qbrf abg abeznyyl cevag fhpu na naabhaprzrag, lbhe jbex onfrq ba
+ gur Cebtenz vf abg erdhverq gb cevag na naabhaprzrag.)
+
+Gurfr erdhverzragf nccyl gb gur zbqvsvrq jbex nf n jubyr. Vs
+vqragvsvnoyr frpgvbaf bs gung jbex ner abg qrevirq sebz gur Cebtenz,
+naq pna or ernfbanoyl pbafvqrerq vaqrcraqrag naq frcnengr jbexf va
+gurzfryirf, gura guvf Yvprafr, naq vgf grezf, qb abg nccyl gb gubfr
+frpgvbaf jura lbh qvfgevohgr gurz nf frcnengr jbexf. Ohg jura lbh
+qvfgevohgr gur fnzr frpgvbaf nf cneg bs n jubyr juvpu vf n jbex onfrq
+ba gur Cebtenz, gur qvfgevohgvba bs gur jubyr zhfg or ba gur grezf bs
+guvf Yvprafr, jubfr crezvffvbaf sbe bgure yvprafrrf rkgraq gb gur
+ragver jubyr, naq guhf gb rnpu naq rirel cneg ertneqyrff bs jub jebgr vg.
+
+Guhf, vg vf abg gur vagrag bs guvf frpgvba gb pynvz evtugf be pbagrfg
+lbhe evtugf gb jbex jevggra ragveryl ol lbh; engure, gur vagrag vf gb
+rkrepvfr gur evtug gb pbageby gur qvfgevohgvba bs qrevingvir be
+pbyyrpgvir jbexf onfrq ba gur Cebtenz.
+
+Va nqqvgvba, zrer nttertngvba bs nabgure jbex abg onfrq ba gur Cebtenz
+jvgu gur Cebtenz (be jvgu n jbex onfrq ba gur Cebtenz) ba n ibyhzr bs
+n fgbentr be qvfgevohgvba zrqvhz qbrf abg oevat gur bgure jbex haqre
+gur fpbcr bs guvf Yvprafr.
+
+ 3. Lbh znl pbcl naq qvfgevohgr gur Cebtenz (be n jbex onfrq ba vg,
+haqre Frpgvba 2) va bowrpg pbqr be rkrphgnoyr sbez haqre gur grezf bs
+Frpgvbaf 1 naq 2 nobir cebivqrq gung lbh nyfb qb bar bs gur sbyybjvat:
+
+ n) Nppbzcnal vg jvgu gur pbzcyrgr pbeerfcbaqvat znpuvar-ernqnoyr
+ fbhepr pbqr, juvpu zhfg or qvfgevohgrq haqre gur grezf bs Frpgvbaf
+ 1 naq 2 nobir ba n zrqvhz phfgbznevyl hfrq sbe fbsgjner vagrepunatr; be,
+
+ o) Nppbzcnal vg jvgu n jevggra bssre, inyvq sbe ng yrnfg guerr
+ lrnef, gb tvir nal guveq cnegl, sbe n punetr ab zber guna lbhe
+ pbfg bs culfvpnyyl cresbezvat fbhepr qvfgevohgvba, n pbzcyrgr
+ znpuvar-ernqnoyr pbcl bs gur pbeerfcbaqvat fbhepr pbqr, gb or
+ qvfgevohgrq haqre gur grezf bs Frpgvbaf 1 naq 2 nobir ba n zrqvhz
+ phfgbznevyl hfrq sbe fbsgjner vagrepunatr; be,
+
+ p) Nppbzcnal vg jvgu gur vasbezngvba lbh erprvirq nf gb gur bssre
+ gb qvfgevohgr pbeerfcbaqvat fbhepr pbqr. (Guvf nygreangvir vf
+ nyybjrq bayl sbe abapbzzrepvny qvfgevohgvba naq bayl vs lbh
+ erprvirq gur cebtenz va bowrpg pbqr be rkrphgnoyr sbez jvgu fhpu
+ na bssre, va nppbeq jvgu Fhofrpgvba o nobir.)
+
+Gur fbhepr pbqr sbe n jbex zrnaf gur cersreerq sbez bs gur jbex sbe
+znxvat zbqvsvpngvbaf gb vg. Sbe na rkrphgnoyr jbex, pbzcyrgr fbhepr
+pbqr zrnaf nyy gur fbhepr pbqr sbe nyy zbqhyrf vg pbagnvaf, cyhf nal
+nffbpvngrq vagresnpr qrsvavgvba svyrf, cyhf gur fpevcgf hfrq gb
+pbageby pbzcvyngvba naq vafgnyyngvba bs gur rkrphgnoyr. Ubjrire, nf n
+fcrpvny rkprcgvba, gur fbhepr pbqr qvfgevohgrq arrq abg vapyhqr
+nalguvat gung vf abeznyyl qvfgevohgrq (va rvgure fbhepr be ovanel
+sbez) jvgu gur znwbe pbzcbaragf (pbzcvyre, xreary, naq fb ba) bs gur
+bcrengvat flfgrz ba juvpu gur rkrphgnoyr ehaf, hayrff gung pbzcbarag
+vgfrys nppbzcnavrf gur rkrphgnoyr.
+
+Vs qvfgevohgvba bs rkrphgnoyr be bowrpg pbqr vf znqr ol bssrevat
+npprff gb pbcl sebz n qrfvtangrq cynpr, gura bssrevat rdhvinyrag
+npprff gb pbcl gur fbhepr pbqr sebz gur fnzr cynpr pbhagf nf
+qvfgevohgvba bs gur fbhepr pbqr, rira gubhtu guveq cnegvrf ner abg
+pbzcryyrq gb pbcl gur fbhepr nybat jvgu gur bowrpg pbqr.
+
+ 4. Lbh znl abg pbcl, zbqvsl, fhoyvprafr, be qvfgevohgr gur Cebtenz
+rkprcg nf rkcerffyl cebivqrq haqre guvf Yvprafr. Nal nggrzcg
+bgurejvfr gb pbcl, zbqvsl, fhoyvprafr be qvfgevohgr gur Cebtenz vf
+ibvq, naq jvyy nhgbzngvpnyyl grezvangr lbhe evtugf haqre guvf Yvprafr.
+Ubjrire, cnegvrf jub unir erprvirq pbcvrf, be evtugf, sebz lbh haqre
+guvf Yvprafr jvyy abg unir gurve yvprafrf grezvangrq fb ybat nf fhpu
+cnegvrf erznva va shyy pbzcyvnapr.
+
+ 5. Lbh ner abg erdhverq gb npprcg guvf Yvprafr, fvapr lbh unir abg
+fvtarq vg. Ubjrire, abguvat ryfr tenagf lbh crezvffvba gb zbqvsl be
+qvfgevohgr gur Cebtenz be vgf qrevingvir jbexf. Gurfr npgvbaf ner
+cebuvovgrq ol ynj vs lbh qb abg npprcg guvf Yvprafr. Gurersber, ol
+zbqvslvat be qvfgevohgvat gur Cebtenz (be nal jbex onfrq ba gur
+Cebtenz), lbh vaqvpngr lbhe npprcgnapr bs guvf Yvprafr gb qb fb, naq
+nyy vgf grezf naq pbaqvgvbaf sbe pbclvat, qvfgevohgvat be zbqvslvat
+gur Cebtenz be jbexf onfrq ba vg.
+
+ 6. Rnpu gvzr lbh erqvfgevohgr gur Cebtenz (be nal jbex onfrq ba gur
+Cebtenz), gur erpvcvrag nhgbzngvpnyyl erprvirf n yvprafr sebz gur
+bevtvany yvprafbe gb pbcl, qvfgevohgr be zbqvsl gur Cebtenz fhowrpg gb
+gurfr grezf naq pbaqvgvbaf. Lbh znl abg vzcbfr nal shegure
+erfgevpgvbaf ba gur erpvcvragf' rkrepvfr bs gur evtugf tenagrq urerva.
+Lbh ner abg erfcbafvoyr sbe rasbepvat pbzcyvnapr ol guveq cnegvrf gb
+guvf Yvprafr.
+
+ 7. Vs, nf n pbafrdhrapr bs n pbheg whqtzrag be nyyrtngvba bs cngrag
+vasevatrzrag be sbe nal bgure ernfba (abg yvzvgrq gb cngrag vffhrf),
+pbaqvgvbaf ner vzcbfrq ba lbh (jurgure ol pbheg beqre, nterrzrag be
+bgurejvfr) gung pbagenqvpg gur pbaqvgvbaf bs guvf Yvprafr, gurl qb abg
+rkphfr lbh sebz gur pbaqvgvbaf bs guvf Yvprafr. Vs lbh pnaabg
+qvfgevohgr fb nf gb fngvfsl fvzhygnarbhfyl lbhe boyvtngvbaf haqre guvf
+Yvprafr naq nal bgure cregvarag boyvtngvbaf, gura nf n pbafrdhrapr lbh
+znl abg qvfgevohgr gur Cebtenz ng nyy. Sbe rknzcyr, vs n cngrag
+yvprafr jbhyq abg crezvg eblnygl-serr erqvfgevohgvba bs gur Cebtenz ol
+nyy gubfr jub erprvir pbcvrf qverpgyl be vaqverpgyl guebhtu lbh, gura
+gur bayl jnl lbh pbhyq fngvfsl obgu vg naq guvf Yvprafr jbhyq or gb
+ersenva ragveryl sebz qvfgevohgvba bs gur Cebtenz.
+
+Vs nal cbegvba bs guvf frpgvba vf uryq vainyvq be harasbeprnoyr haqre
+nal cnegvphyne pvephzfgnapr, gur onynapr bs gur frpgvba vf vagraqrq gb
+nccyl naq gur frpgvba nf n jubyr vf vagraqrq gb nccyl va bgure
+pvephzfgnaprf.
+
+Vg vf abg gur checbfr bs guvf frpgvba gb vaqhpr lbh gb vasevatr nal
+cngragf be bgure cebcregl evtug pynvzf be gb pbagrfg inyvqvgl bs nal
+fhpu pynvzf; guvf frpgvba unf gur fbyr checbfr bs cebgrpgvat gur
+vagrtevgl bs gur serr fbsgjner qvfgevohgvba flfgrz, juvpu vf
+vzcyrzragrq ol choyvp yvprafr cenpgvprf. Znal crbcyr unir znqr
+trarebhf pbagevohgvbaf gb gur jvqr enatr bs fbsgjner qvfgevohgrq
+guebhtu gung flfgrz va eryvnapr ba pbafvfgrag nccyvpngvba bs gung
+flfgrz; vg vf hc gb gur nhgube/qbabe gb qrpvqr vs ur be fur vf jvyyvat
+gb qvfgevohgr fbsgjner guebhtu nal bgure flfgrz naq n yvprafrr pnaabg
+vzcbfr gung pubvpr.
+
+Guvf frpgvba vf vagraqrq gb znxr gubebhtuyl pyrne jung vf oryvrirq gb
+or n pbafrdhrapr bs gur erfg bs guvf Yvprafr.
+
+ 8. Vs gur qvfgevohgvba naq/be hfr bs gur Cebtenz vf erfgevpgrq va
+pregnva pbhagevrf rvgure ol cngragf be ol pbclevtugrq vagresnprf, gur
+bevtvany pbclevtug ubyqre jub cynprf gur Cebtenz haqre guvf Yvprafr
+znl nqq na rkcyvpvg trbtencuvpny qvfgevohgvba yvzvgngvba rkpyhqvat
+gubfr pbhagevrf, fb gung qvfgevohgvba vf crezvggrq bayl va be nzbat
+pbhagevrf abg guhf rkpyhqrq. Va fhpu pnfr, guvf Yvprafr vapbecbengrf
+gur yvzvgngvba nf vs jevggra va gur obql bs guvf Yvprafr.
+
+ 9. Gur Serr Fbsgjner Sbhaqngvba znl choyvfu erivfrq naq/be arj irefvbaf
+bs gur Trareny Choyvp Yvprafr sebz gvzr gb gvzr. Fhpu arj irefvbaf jvyy
+or fvzvyne va fcvevg gb gur cerfrag irefvba, ohg znl qvssre va qrgnvy gb
+nqqerff arj ceboyrzf be pbapreaf.
+
+Rnpu irefvba vf tvira n qvfgvathvfuvat irefvba ahzore. Vs gur Cebtenz
+fcrpvsvrf n irefvba ahzore bs guvf Yvprafr juvpu nccyvrf gb vg naq "nal
+yngre irefvba", lbh unir gur bcgvba bs sbyybjvat gur grezf naq pbaqvgvbaf
+rvgure bs gung irefvba be bs nal yngre irefvba choyvfurq ol gur Serr
+Fbsgjner Sbhaqngvba. Vs gur Cebtenz qbrf abg fcrpvsl n irefvba ahzore bs
+guvf Yvprafr, lbh znl pubbfr nal irefvba rire choyvfurq ol gur Serr Fbsgjner
+Sbhaqngvba.
+
+ 10. Vs lbh jvfu gb vapbecbengr cnegf bs gur Cebtenz vagb bgure serr
+cebtenzf jubfr qvfgevohgvba pbaqvgvbaf ner qvssrerag, jevgr gb gur nhgube
+gb nfx sbe crezvffvba. Sbe fbsgjner juvpu vf pbclevtugrq ol gur Serr
+Fbsgjner Sbhaqngvba, jevgr gb gur Serr Fbsgjner Sbhaqngvba; jr fbzrgvzrf
+znxr rkprcgvbaf sbe guvf. Bhe qrpvfvba jvyy or thvqrq ol gur gjb tbnyf
+bs cerfreivat gur serr fgnghf bs nyy qrevingvirf bs bhe serr fbsgjner naq
+bs cebzbgvat gur funevat naq erhfr bs fbsgjner trarenyyl.
+
+ AB JNEENAGL
+
+ 11. ORPNHFR GUR CEBTENZ VF YVPRAFRQ SERR BS PUNETR, GURER VF AB JNEENAGL
+SBE GUR CEBTENZ, GB GUR RKGRAG CREZVGGRQ OL NCCYVPNOYR YNJ. RKPRCG JURA
+BGUREJVFR FGNGRQ VA JEVGVAT GUR PBCLEVTUG UBYQREF NAQ/BE BGURE CNEGVRF
+CEBIVQR GUR CEBTENZ "NF VF" JVGUBHG JNEENAGL BS NAL XVAQ, RVGURE RKCERFFRQ
+BE VZCYVRQ, VAPYHQVAT, OHG ABG YVZVGRQ GB, GUR VZCYVRQ JNEENAGVRF BS
+ZREPUNAGNOVYVGL NAQ SVGARFF SBE N CNEGVPHYNE CHECBFR. GUR RAGVER EVFX NF
+GB GUR DHNYVGL NAQ CRESBEZNAPR BS GUR CEBTENZ VF JVGU LBH. FUBHYQ GUR
+CEBTENZ CEBIR QRSRPGVIR, LBH NFFHZR GUR PBFG BS NYY ARPRFFNEL FREIVPVAT,
+ERCNVE BE PBEERPGVBA.
+
+ 12. VA AB RIRAG HAYRFF ERDHVERQ OL NCCYVPNOYR YNJ BE NTERRQ GB VA JEVGVAT
+JVYY NAL PBCLEVTUG UBYQRE, BE NAL BGURE CNEGL JUB ZNL ZBQVSL NAQ/BE
+ERQVFGEVOHGR GUR CEBTENZ NF CREZVGGRQ NOBIR, OR YVNOYR GB LBH SBE QNZNTRF,
+VAPYHQVAT NAL TRARENY, FCRPVNY, VAPVQRAGNY BE PBAFRDHRAGVNY QNZNTRF NEVFVAT
+BHG BS GUR HFR BE VANOVYVGL GB HFR GUR CEBTENZ (VAPYHQVAT OHG ABG YVZVGRQ
+GB YBFF BS QNGN BE QNGN ORVAT ERAQRERQ VANPPHENGR BE YBFFRF FHFGNVARQ OL
+LBH BE GUVEQ CNEGVRF BE N SNVYHER BS GUR CEBTENZ GB BCRENGR JVGU NAL BGURE
+CEBTENZF), RIRA VS FHPU UBYQRE BE BGURE CNEGL UNF ORRA NQIVFRQ BS GUR
+CBFFVOVYVGL BS FHPU QNZNTRF.
+
+ RAQ BS GREZF NAQ PBAQVGVBAF
+
+ Ubj gb Nccyl Gurfr Grezf gb Lbhe Arj Cebtenzf
+
+ Vs lbh qrirybc n arj cebtenz, naq lbh jnag vg gb or bs gur terngrfg
+cbffvoyr hfr gb gur choyvp, gur orfg jnl gb npuvrir guvf vf gb znxr vg
+serr fbsgjner juvpu rirelbar pna erqvfgevohgr naq punatr haqre gurfr grezf.
+
+ Gb qb fb, nggnpu gur sbyybjvat abgvprf gb gur cebtenz. Vg vf fnsrfg
+gb nggnpu gurz gb gur fgneg bs rnpu fbhepr svyr gb zbfg rssrpgviryl
+pbairl gur rkpyhfvba bs jneenagl; naq rnpu svyr fubhyq unir ng yrnfg
+gur "pbclevtug" yvar naq n cbvagre gb jurer gur shyy abgvpr vf sbhaq.
+
+ <bar yvar gb tvir gur cebtenz'f anzr naq n oevrs vqrn bs jung vg qbrf.>
+ Pbclevtug (P) <lrne> <anzr bs nhgube>
+
+ Guvf cebtenz vf serr fbsgjner; lbh pna erqvfgevohgr vg naq/be zbqvsl
+ vg haqre gur grezf bs gur TAH Trareny Choyvp Yvprafr nf choyvfurq ol
+ gur Serr Fbsgjner Sbhaqngvba; rvgure irefvba 2 bs gur Yvprafr, be
+ (ng lbhe bcgvba) nal yngre irefvba.
+
+ Guvf cebtenz vf qvfgevohgrq va gur ubcr gung vg jvyy or hfrshy,
+ ohg JVGUBHG NAL JNEENAGL; jvgubhg rira gur vzcyvrq jneenagl bs
+ ZREPUNAGNOVYVGL be SVGARFF SBE N CNEGVPHYNE CHECBFR. Frr gur
+ TAH Trareny Choyvp Yvprafr sbe zber qrgnvyf.
+
+ Lbh fubhyq unir erprvirq n pbcl bs gur TAH Trareny Choyvp Yvprafr nybat
+ jvgu guvf cebtenz; vs abg, jevgr gb gur Serr Fbsgjner Sbhaqngvba, Vap.,
+ 51 Senaxyva Fgerrg, Svsgu Sybbe, Obfgba, ZN 02110-1301 HFN.
+
+Nyfb nqq vasbezngvba ba ubj gb pbagnpg lbh ol ryrpgebavp naq cncre znvy.
+
+Vs gur cebtenz vf vagrenpgvir, znxr vg bhgchg n fubeg abgvpr yvxr guvf
+jura vg fgnegf va na vagrenpgvir zbqr:
+
+ Tabzbivfvba irefvba 69, Pbclevtug (P) lrne anzr bs nhgube
+ Tabzbivfvba pbzrf jvgu NOFBYHGRYL AB JNEENAGL; sbe qrgnvyf glcr `fubj j'.
+ Guvf vf serr fbsgjner, naq lbh ner jrypbzr gb erqvfgevohgr vg
+ haqre pregnva pbaqvgvbaf; glcr `fubj p' sbe qrgnvyf.
+
+Gur ulcbgurgvpny pbzznaqf `fubj j' naq `fubj p' fubhyq fubj gur nccebcevngr
+cnegf bs gur Trareny Choyvp Yvprafr. Bs pbhefr, gur pbzznaqf lbh hfr znl
+or pnyyrq fbzrguvat bgure guna `fubj j' naq `fubj p'; gurl pbhyq rira or
+zbhfr-pyvpxf be zrah vgrzf--jungrire fhvgf lbhe cebtenz.
+
+Lbh fubhyq nyfb trg lbhe rzcyblre (vs lbh jbex nf n cebtenzzre) be lbhe
+fpubby, vs nal, gb fvta n "pbclevtug qvfpynvzre" sbe gur cebtenz, vs
+arprffnel. Urer vf n fnzcyr; nygre gur anzrf:
+
+ Lblbqlar, Vap., urerol qvfpynvzf nyy pbclevtug vagrerfg va gur cebtenz
+ `Tabzbivfvba' (juvpu znxrf cnffrf ng pbzcvyref) jevggra ol Wnzrf Unpxre.
+
+ <fvtangher bs Gl Pbba>, 1 Ncevy 1989
+ Gl Pbba, Cerfvqrag bs Ivpr
+
+Guvf Trareny Choyvp Yvprafr qbrf abg crezvg vapbecbengvat lbhe cebtenz vagb
+cebcevrgnel cebtenzf. Vs lbhe cebtenz vf n fhoebhgvar yvoenel, lbh znl
+pbafvqre vg zber hfrshy gb crezvg yvaxvat cebcevrgnel nccyvpngvbaf jvgu gur
+yvoenel. Vs guvf vf jung lbh jnag gb qb, hfr gur TAH Yrffre Trareny
+Choyvp Yvprafr vafgrnq bs guvf Yvprafr.
ok 6 - suppress deletion diff with -B -D
expecting success:
test_seq 1 99 >seq &&
printf 100 >>seq &&
git add seq &&
git commit seq -m seq
[master (root-commit) 6977785] seq
Author: A U Thor <author@example.com>
1 file changed, 100 insertions(+)
create mode 100644 seq
ok 7 - prepare a file that ends with an incomplete line
expecting success:
test_seq 1 5 >seq &&
test_seq 9331 9420 >>seq &&
test_seq 96 100 >>seq
ok 8 - rewrite the middle 90% of sequence file and terminate with newline
expecting success:
git diff -B seq >res &&
grep "dissimilarity index" res
dissimilarity index 92%
ok 9 - confirm that sequence file is considered a rewrite
expecting success:
git diff seq >res &&
grep "^\\\\ " res &&
! grep "^..*\\\\ " res
\ No newline at end of file
ok 10 - no newline at eof is on its own line without -B
expecting success:
git diff -B seq >res &&
grep "^\\\\ " res &&
! grep "^..*\\\\ " res
\ No newline at end of file
ok 11 - no newline at eof is on its own line with -B
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4020-diff-external.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4020-diff-external/.git/
expecting success:
test_tick &&
echo initial >file &&
git add file &&
git commit -m initial &&
test_tick &&
echo second >file &&
before=$(git hash-object file) &&
before=$(git rev-parse --short $before) &&
git add file &&
git commit -m second &&
test_tick &&
echo third >file
[master (root-commit) b6d2089] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master f3562cd] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
GIT_EXTERNAL_DIFF=echo git diff | {
read path oldfile oldhex oldmode newfile newhex newmode &&
test "z$path" = zfile &&
test "z$oldmode" = z100644 &&
test "z$newhex" = "z$ZERO_OID" &&
test "z$newmode" = z100644 &&
oh=$(git rev-parse --verify HEAD:file) &&
test "z$oh" = "z$oldhex"
}
ok 2 - GIT_EXTERNAL_DIFF environment
expecting success:
GIT_EXTERNAL_DIFF=echo git log -p -1 HEAD |
grep "^diff --git a/file b/file"
diff --git a/file b/file
ok 3 - GIT_EXTERNAL_DIFF environment should apply only to diff
expecting success:
GIT_EXTERNAL_DIFF=echo git diff --no-ext-diff |
grep "^diff --git a/file b/file"
diff --git a/file b/file
ok 4 - GIT_EXTERNAL_DIFF environment and --no-ext-diff
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:
rm -f file &&
ln -s elif file &&
GIT_EXTERNAL_DIFF=echo git diff | {
read path oldfile oldhex oldmode newfile newhex newmode &&
test "z$path" = zfile &&
test "z$oldmode" = z100644 &&
test "z$newhex" = "z$ZERO_OID" &&
test "z$newmode" = z120000 &&
oh=$(git rev-parse --verify HEAD:file) &&
test "z$oh" = "z$oldhex"
} &&
GIT_EXTERNAL_DIFF=echo git diff --no-ext-diff >actual &&
git diff >expect &&
test_cmp expect actual
ok 5 - typechange diff
expecting success:
git reset --hard &&
echo third >file &&
test_config diff.external echo &&
git diff | {
read path oldfile oldhex oldmode newfile newhex newmode &&
test "z$path" = zfile &&
test "z$oldmode" = z100644 &&
test "z$newhex" = "z$ZERO_OID" &&
test "z$newmode" = z100644 &&
oh=$(git rev-parse --verify HEAD:file) &&
test "z$oh" = "z$oldhex"
}
HEAD is now at f3562cd second
ok 6 - diff.external
expecting success:
test_config diff.external echo &&
git log -p -1 HEAD |
grep "^diff --git a/file b/file"
diff --git a/file b/file
ok 7 - diff.external should apply only to diff
expecting success:
test_config diff.external echo &&
git diff --no-ext-diff |
grep "^diff --git a/file b/file"
diff --git a/file b/file
ok 8 - diff.external and --no-ext-diff
expecting success:
git reset --hard &&
echo third >file &&
git config diff.parrot.command echo &&
echo >.gitattributes "file diff=parrot" &&
git diff | {
read path oldfile oldhex oldmode newfile newhex newmode &&
test "z$path" = zfile &&
test "z$oldmode" = z100644 &&
test "z$newhex" = "z$ZERO_OID" &&
test "z$newmode" = z100644 &&
oh=$(git rev-parse --verify HEAD:file) &&
test "z$oh" = "z$oldhex"
}
HEAD is now at f3562cd second
ok 9 - diff attribute
expecting success:
git log -p -1 HEAD |
grep "^diff --git a/file b/file"
diff --git a/file b/file
ok 10 - diff attribute should apply only to diff
expecting success:
git diff --no-ext-diff |
grep "^diff --git a/file b/file"
diff --git a/file b/file
ok 11 - diff attribute and --no-ext-diff
expecting success:
git config --unset diff.parrot.command &&
git config diff.color.command echo &&
echo >.gitattributes "file diff=color" &&
git diff | {
read path oldfile oldhex oldmode newfile newhex newmode &&
test "z$path" = zfile &&
test "z$oldmode" = z100644 &&
test "z$newhex" = "z$ZERO_OID" &&
test "z$newmode" = z100644 &&
oh=$(git rev-parse --verify HEAD:file) &&
test "z$oh" = "z$oldhex"
}
ok 12 - diff attribute
expecting success:
git log -p -1 HEAD |
grep "^diff --git a/file b/file"
diff --git a/file b/file
ok 13 - diff attribute should apply only to diff
expecting success:
git diff --no-ext-diff |
grep "^diff --git a/file b/file"
diff --git a/file b/file
ok 14 - diff attribute and --no-ext-diff
expecting success:
>.gitattributes &&
test_config diff.external "echo ext-global" &&
GIT_EXTERNAL_DIFF="echo ext-env" git diff | grep ext-env
ext-env file /tmp/ZGGoTY_file e019be006cf33489e2d0177a3837a2384eddebc5 100644 file 0000000000000000000000000000000000000000 100644
ok 15 - GIT_EXTERNAL_DIFF trumps diff.external
expecting success:
test_config diff.foo.command "echo ext-attribute" &&
test_config diff.external "echo ext-global" &&
echo "file diff=foo" >.gitattributes &&
GIT_EXTERNAL_DIFF="echo ext-env" git diff | grep ext-attribute
ext-attribute file /tmp/rZFfo2_file e019be006cf33489e2d0177a3837a2384eddebc5 100644 file 0000000000000000000000000000000000000000 100644
ok 16 - attributes trump GIT_EXTERNAL_DIFF and diff.external
expecting success:
echo >.gitattributes "file -diff" &&
git diff | grep Binary
Binary files a/file and b/file differ
ok 17 - no diff with -diff
expecting success:
after=$(git hash-object file) &&
after=$(git rev-parse --short $after) &&
echo >.gitattributes "file diff" &&
git diff >actual &&
sed -e "s/^index .*/index $before..$after 100644/" \
"$TEST_DIRECTORY"/t4020/diff.NUL >expected-diff &&
test_cmp expected-diff actual
ok 18 - force diff with "diff"
expecting success:
echo anotherfile > file2 &&
git add file2 &&
git commit -m "added 2nd file" &&
echo modified >file2 &&
GIT_EXTERNAL_DIFF=echo git diff
[master 314ec38] added 2nd file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
file /tmp/mvSIoa_file e019be006cf33489e2d0177a3837a2384eddebc5 100644 file 0000000000000000000000000000000000000000 100644
file2 /tmp/qRK58d_file2 abc9fa522731419e7eaa3d472e3cb3d99e475c49 100644 file2 0000000000000000000000000000000000000000 100644
ok 19 - GIT_EXTERNAL_DIFF with more than one changed files
expecting success:
write_script external-diff.sh <<-\EOF &&
echo $GIT_DIFF_PATH_COUNTER of $GIT_DIFF_PATH_TOTAL >>counter.txt
EOF
>counter.txt &&
cat >expect <<-\EOF &&
1 of 2
2 of 2
EOF
GIT_EXTERNAL_DIFF=./external-diff.sh git diff &&
test_cmp expect counter.txt
ok 20 - GIT_EXTERNAL_DIFF path counter/total
expecting success:
touch file.ext &&
git add file.ext &&
echo with extension > file.ext &&
GIT_EXTERNAL_DIFF=echo git diff file.ext | grep ......_file\.ext &&
git update-index --force-remove file.ext &&
rm file.ext
file.ext /tmp/1mh6kk_file.ext e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 file.ext 0000000000000000000000000000000000000000 100644
ok 21 - GIT_EXTERNAL_DIFF generates pretty paths
expecting success:
test_config core.autocrlf true &&
GIT_EXTERNAL_DIFF=./fake-diff.sh git diff &&
test $(wc -l < crlfed.txt) = $(cat crlfed.txt | keep_only_cr | wc -c)
warning: LF will be replaced by CRLF in file2.
The file will have its original line endings in your working directory
ok 22 - external diff with autocrlf = true
expecting success:
test_config core.autocrlf true &&
git add file &&
git update-index --assume-unchanged file &&
echo second >file &&
git diff --cached >actual &&
test_cmp expected-diff actual
ok 23 - diff --cached
expecting success:
git update-index --no-assume-unchanged file &&
rm -f file* &&
git reset --hard
HEAD is now at 314ec38 added 2nd file
ok 24 - clean up crlf leftovers
expecting success:
git init sub &&
( cd sub && test_commit sub1 ) &&
git add sub &&
test_tick &&
git commit -m "add submodule" &&
( cd sub && test_commit sub2 ) &&
write_script gather_pre_post.sh <<-\EOF &&
echo "$1 $4" # path, mode
cat "$2" # old file
cat "$5" # new file
EOF
GIT_EXTERNAL_DIFF=./gather_pre_post.sh git diff >actual &&
cat >expected <<-EOF &&
sub 160000
Subproject commit $(git rev-parse HEAD:sub)
Subproject commit $(cd sub && git rev-parse HEAD)
EOF
test_cmp expected actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4020-diff-external/sub/.git/
[master (root-commit) e2fb92c] sub1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 sub1.t
warning: adding embedded git repository: sub
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sub
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sub
hint:
hint: See "git help submodule" for more information.
[master bcd8781] add submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 160000 sub
[master 6a9164c] sub2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 sub2.t
ok 25 - submodule diff
# passed all 25 test(s)
1..25
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4025-hunk-header.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4025-hunk-header/.git/
expecting success:
(
echo "A $NS" &&
for c in B C D E F G H I J K
do
echo " $c"
done &&
echo "L $NS" &&
for c in M N O P Q R S T U V
do
echo " $c"
done
) >file &&
git add file &&
sed -e "/^ [EP]/s/$/ modified/" <file >file+ &&
mv file+ file
ok 1 - setup
expecting success:
git diff | sed -n -e "s/^.*@@//p" >actual &&
(
echo " A $N$N$N$N$N$N$N$N$N2" &&
echo " L $N$N$N$N$N$N$N$N$N1"
) >expected &&
test_cmp expected actual
ok 2 - hunk header truncation with an overly long line
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4023-diff-rename-typechange.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4023-diff-rename-typechange/.git/
expecting success:
rm -f foo bar &&
cat "$TEST_DIRECTORY"/../COPYING >foo &&
test_ln_s_add linklink bar &&
git add foo &&
git commit -a -m Initial &&
git tag one &&
git rm -f foo bar &&
cat "$TEST_DIRECTORY"/../COPYING >bar &&
test_ln_s_add linklink foo &&
git add bar &&
git commit -a -m Second &&
git tag two &&
git rm -f foo bar &&
cat "$TEST_DIRECTORY"/../COPYING >foo &&
git add foo &&
git commit -a -m Third &&
git tag three &&
mv foo bar &&
test_ln_s_add linklink foo &&
git add bar &&
git commit -a -m Fourth &&
git tag four &&
# This is purely for sanity check
git rm -f foo bar &&
cat "$TEST_DIRECTORY"/../COPYING >foo &&
cat "$TEST_DIRECTORY"/../Makefile >bar &&
git add foo bar &&
git commit -a -m Fifth &&
git tag five &&
git rm -f foo bar &&
cat "$TEST_DIRECTORY"/../Makefile >foo &&
cat "$TEST_DIRECTORY"/../COPYING >bar &&
git add foo bar &&
git commit -a -m Sixth &&
git tag six
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
[master (root-commit) 1026853] Initial
Author: A U Thor <author@example.com>
2 files changed, 361 insertions(+)
create mode 120000 bar
create mode 100644 foo
rm 'bar'
rm 'foo'
[master b16bbb0] Second
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename foo => bar (100%)
rename bar => foo (100%)
rm 'bar'
rm 'foo'
[master ce8d066] Third
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename bar => foo (100%)
[master 933e816] Fourth
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 360 deletions(-)
copy foo => bar (100%)
rewrite foo (100%)
mode change 100644 => 120000
rm 'bar'
rm 'foo'
[master 92c0a67] Fifth
Author: A U Thor <author@example.com>
2 files changed, 3250 insertions(+), 360 deletions(-)
rewrite bar (98%)
copy bar => foo (100%)
rm 'bar'
rm 'foo'
[master 3af33c7] Sixth
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename foo => bar (100%)
rename bar => foo (100%)
ok 1 - setup
expecting success:
git diff-tree five six -r --name-status -B -M | sort >actual &&
{
echo "R100 foo bar"
echo "R100 bar foo"
} | sort >expect &&
test_cmp expect actual
ok 2 - cross renames to be detected for regular files
expecting success:
git diff-tree one two -r --name-status -B -M | sort >actual &&
{
echo "R100 foo bar"
echo "R100 bar foo"
} | sort >expect &&
test_cmp expect actual
ok 3 - cross renames to be detected for typechange
expecting success:
git diff-tree three four -r --name-status -B -M | sort >actual &&
{
# see -B -M (#6) in t4008
echo "C100 foo bar"
echo "T100 foo"
} | sort >expect &&
test_cmp expect actual
ok 4 - moves and renames
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4024-diff-optimize-common.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4024-diff-optimize-common/.git/
expecting success:
for n in $sample
do
( zs $n && echo a ) >file-a$n &&
( echo b && zs $n && echo ) >file-b$n &&
( printf c && zs $n ) >file-c$n &&
( echo d && zs $n ) >file-d$n &&
git add file-a$n file-b$n file-c$n file-d$n &&
( zs $n && echo A ) >file-a$n &&
( echo B && zs $n && echo ) >file-b$n &&
( printf C && zs $n ) >file-c$n &&
( echo D && zs $n ) >file-d$n &&
expect_pattern $n || return 1
done >expect
ok 1 - setup
expecting success:
for n in $sample
do
git diff -U0 file-?$n
done | zc >actual &&
test_cmp expect actual
ok 2 - diff -U0
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4028-format-patch-mime-headers.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4028-format-patch-mime-headers/.git/
expecting success:
echo content >file &&
git add file &&
git commit -m one &&
echo more >>file &&
git commit -a -m "two
utf-8 body: ñ"
[master (root-commit) a6b767f] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 4756dcd] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - create commit with utf-8 body
expecting success:
rm -f 0001-two.patch &&
git format-patch HEAD^ &&
grep -i "content-type: text/plain; charset=utf-8" 0001-two.patch
0001-two.patch
Content-Type: text/plain; charset=UTF-8
ok 2 - patch has mime headers
expecting success:
rm -f 0001-two.patch &&
git config format.headers "x-foo: bar" &&
git format-patch HEAD^ &&
grep -i "x-foo: bar" 0001-two.patch &&
grep -i "content-type: text/plain; charset=utf-8" 0001-two.patch
0001-two.patch
x-foo: bar
Content-Type: text/plain; charset=UTF-8
ok 3 - patch has mime and extra headers
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4026-color.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4026-color/.git/
expecting success:
color "reset" "[m"
ok 1 - reset
expecting success:
color "" ""
ok 2 - empty color is empty
expecting success:
color "bold red" "[1;31m"
ok 3 - attribute before color name
expecting success:
color "red bold" "[1;31m"
ok 4 - color name before attribute
expecting success:
color "ul blue red" "[4;34;41m"
ok 5 - attr fg bg
expecting success:
color "blue ul red" "[4;34;41m"
ok 6 - fg attr bg
expecting success:
color "blue red ul" "[4;34;41m"
ok 7 - fg bg attr
expecting success:
color "blue bold dim ul blink reverse" "[1;2;4;5;7;34m"
ok 8 - fg bg attr...
expecting success:
color "nobold nodim noul noblink noreverse" "[22;24;25;27m"
ok 9 - attr negation
expecting success:
color "no-bold no-blink" "[22;25m"
ok 10 - "no-" variant of negation
expecting success:
color "254 255 bold dim ul blink reverse" "[1;2;4;5;7;38;5;254;48;5;255m"
ok 11 - long color specification
expecting success:
color \
"#ffffff #ffffff bold nobold dim nodim italic noitalic
ul noul blink noblink reverse noreverse strike nostrike" \
"[1;2;3;4;5;7;9;22;23;24;25;27;29;38;2;255;255;255;48;2;255;255;255m"
ok 12 - absurdly long color specification
expecting success:
color "0 7" "[30;47m"
ok 13 - 0-7 are aliases for basic ANSI color names
expecting success:
color "254 bold 255" "[1;38;5;254;48;5;255m"
ok 14 - 256 colors
expecting success:
color "#ff00ff black" "[38;2;255;0;255;40m"
ok 15 - 24-bit colors
expecting success:
color "normal black" "[40m"
ok 16 - "normal" yields no color at all"
expecting success:
color "-1 black" "[40m"
ok 17 - -1 is a synonym for "normal"
expecting success:
invalid_color "-2"
error: invalid color value: -2
fatal: unable to parse default color value
ok 18 - color too small
expecting success:
invalid_color "256"
error: invalid color value: 256
fatal: unable to parse default color value
ok 19 - color too big
expecting success:
invalid_color "3X"
error: invalid color value: 3X
fatal: unable to parse default color value
ok 20 - extra character after color number
expecting success:
invalid_color "redX"
error: invalid color value: redX
fatal: unable to parse default color value
ok 21 - extra character after color name
expecting success:
invalid_color "dimX"
error: invalid color value: dimX
fatal: unable to parse default color value
ok 22 - extra character after attribute
expecting success:
git config color.diff.nosuchslotwilleverbedefined white &&
git diff --color
ok 23 - unknown color slots are ignored (diff)
expecting success:
git config color.branch.nosuchslotwilleverbedefined white &&
git branch -a
ok 24 - unknown color slots are ignored (branch)
expecting success:
git config color.status.nosuchslotwilleverbedefined white &&
{ git status; ret=$?; } &&
case $ret in 0|1) : ok ;; *) false ;; esac
On branch master
No commits yet
nothing to commit (create/copy files and use "git add" to track)
ok 25 - unknown color slots are ignored (status)
# passed all 25 test(s)
1..25
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4029-diff-trailing-space.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4029-diff-trailing-space/.git/
expecting success:
printf "\nx\n" > f &&
before=$(git hash-object f) &&
before=$(git rev-parse --short $before) &&
git add f &&
git commit -q -m. f &&
printf "\ny\n" > f &&
after=$(git hash-object f) &&
after=$(git rev-parse --short $after) &&
sed -e "s/^index .*/index $before..$after 100644/" expected >exp &&
git config --bool diff.suppressBlankEmpty true &&
git diff f > actual &&
test_cmp exp actual &&
perl -i.bak -p -e "s/^\$/ /" exp &&
git config --bool diff.suppressBlankEmpty false &&
git diff f > actual &&
test_cmp exp actual &&
git config --bool --unset diff.suppressBlankEmpty &&
git diff f > actual &&
test_cmp exp actual
ok 1 - diff honors config option, diff.suppressBlankEmpty
# passed all 1 test(s)
1..1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4031-diff-rewrite-binary.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4031-diff-rewrite-binary/.git/
expecting success:
make_file "\\0" &&
git add file &&
make_file "\\01"
ok 1 - create binary file with changes
expecting success:
git diff >diff &&
grep "Binary files a/file and b/file differ" diff
Binary files a/file and b/file differ
ok 2 - vanilla diff is binary
expecting success:
git diff -B >diff &&
grep "dissimilarity index" diff &&
grep "Binary files a/file and b/file differ" diff
dissimilarity index 99%
Binary files a/file and b/file differ
ok 3 - rewrite diff is binary
expecting success:
git diff -B --binary >diff &&
grep "dissimilarity index" diff &&
grep "GIT binary patch" diff
dissimilarity index 99%
GIT binary patch
ok 4 - rewrite diff can show binary patch
expecting success:
git diff -B --numstat --summary >diff &&
grep -e "- - " diff &&
grep " rewrite file" diff
- - file
rewrite file (99%)
ok 5 - rewrite diff --numstat shows binary changes
expecting success:
git diff -B --stat --summary >diff &&
grep "Bin" diff &&
test_i18ngrep "0 insertions.*0 deletions" diff &&
grep " rewrite file" diff
file | Bin 902 -> 902 bytes
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
1 file changed, 0 insertions(+), 0 deletions(-)
rewrite file (99%)
ok 6 - diff --stat counts binary rewrite as 0 lines
expecting success:
echo file diff=foo >.gitattributes &&
git config diff.foo.textconv "\"$(pwd)\""/dump
ok 7 - setup textconv
expecting success:
git diff -B >diff &&
grep "dissimilarity index" diff &&
grep "^-61" diff &&
grep "^-0" diff
dissimilarity index 99%
-61
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
-0
ok 8 - rewrite diff respects textconv
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4027-diff-submodule.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4027-diff-submodule/.git/
expecting success:
test_tick &&
test_create_repo sub &&
(
cd sub &&
echo hello >world &&
git add world &&
git commit -m submodule
) &&
test_tick &&
echo frotz >nitfol &&
git add nitfol sub &&
git commit -m superproject &&
(
cd sub &&
echo goodbye >world &&
git add world &&
git commit -m "submodule #2"
) &&
set x $(
cd sub &&
git rev-list HEAD
) &&
echo ":160000 160000 $3 $ZERO_OID M sub" >expect &&
subtip=$3 subprev=$2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4027-diff-submodule/sub/.git/
[master (root-commit) 4431e0b] submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 world
warning: adding embedded git repository: sub
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sub
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sub
hint:
hint: See "git help submodule" for more information.
[master (root-commit) 5b035b6] superproject
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 nitfol
create mode 160000 sub
[master 2dd69d6] submodule #2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
git diff --raw --abbrev=40 HEAD >actual &&
test_cmp expect actual
ok 2 - git diff --raw HEAD
expecting success:
git diff-index --raw HEAD >actual.index &&
test_cmp expect actual.index
ok 3 - git diff-index --raw HEAD
expecting success:
git diff-files --raw >actual.files &&
test_cmp expect actual.files
ok 4 - git diff-files --raw
expecting success:
git diff HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subtip $subprev &&
test_cmp expect.body actual.body
ok 5 - git diff HEAD
expecting success:
echo >>sub/world &&
git diff HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subtip $subprev-dirty &&
test_cmp expect.body actual.body
ok 6 - git diff HEAD with dirty submodule (work tree)
expecting success:
(
cd sub &&
git reset --hard &&
echo >>world &&
git add world
) &&
git diff HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subtip $subprev-dirty &&
test_cmp expect.body actual.body
HEAD is now at 2dd69d6 submodule #2
ok 7 - git diff HEAD with dirty submodule (index)
expecting success:
(
cd sub &&
git reset --hard &&
git clean -qfdx &&
>cruft
) &&
git diff HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subtip $subprev-dirty &&
test_cmp expect.body actual.body
HEAD is now at 2dd69d6 submodule #2
ok 8 - git diff HEAD with dirty submodule (untracked)
expecting success:
git commit -m "x" sub &&
echo >>sub/world &&
git diff HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subprev $subprev-dirty &&
test_cmp expect.body actual.body &&
git diff --ignore-submodules HEAD >actual2 &&
test_must_be_empty actual2 &&
git diff --ignore-submodules=untracked HEAD >actual3 &&
sed -e "1,/^@@/d" actual3 >actual3.body &&
expect_from_to >expect.body $subprev $subprev-dirty &&
test_cmp expect.body actual3.body &&
git diff --ignore-submodules=dirty HEAD >actual4 &&
test_must_be_empty actual4
[master e6ee575] x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 9 - git diff HEAD with dirty submodule (work tree, refs match)
expecting success:
git config diff.ignoreSubmodules dirty &&
git diff HEAD >actual &&
test_must_be_empty actual &&
git config --add -f .gitmodules submodule.subname.ignore none &&
git config --add -f .gitmodules submodule.subname.path sub &&
git diff HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subprev $subprev-dirty &&
test_cmp expect.body actual.body &&
git config -f .gitmodules submodule.subname.ignore all &&
git config -f .gitmodules submodule.subname.path sub &&
git diff HEAD >actual2 &&
test_must_be_empty actual2 &&
git config -f .gitmodules submodule.subname.ignore untracked &&
git diff HEAD >actual3 &&
sed -e "1,/^@@/d" actual3 >actual3.body &&
expect_from_to >expect.body $subprev $subprev-dirty &&
test_cmp expect.body actual3.body &&
git config -f .gitmodules submodule.subname.ignore dirty &&
git diff HEAD >actual4 &&
test_must_be_empty actual4 &&
git config submodule.subname.ignore none &&
git config submodule.subname.path sub &&
git diff HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subprev $subprev-dirty &&
test_cmp expect.body actual.body &&
git config --remove-section submodule.subname &&
git config --remove-section -f .gitmodules submodule.subname &&
git config --unset diff.ignoreSubmodules &&
rm .gitmodules
ok 10 - git diff HEAD with dirty submodule (work tree, refs match) [.gitmodules]
expecting success:
(
cd sub &&
git reset --hard &&
echo >>world &&
git add world
) &&
git diff HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subprev $subprev-dirty &&
test_cmp expect.body actual.body
HEAD is now at 2dd69d6 submodule #2
ok 11 - git diff HEAD with dirty submodule (index, refs match)
expecting success:
(
cd sub &&
git reset --hard &&
git clean -qfdx &&
>cruft
) &&
git diff HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subprev $subprev-dirty &&
test_cmp expect.body actual.body &&
git diff --ignore-submodules=all HEAD >actual2 &&
test_must_be_empty actual2 &&
git diff --ignore-submodules=untracked HEAD >actual3 &&
test_must_be_empty actual3 &&
git diff --ignore-submodules=dirty HEAD >actual4 &&
test_must_be_empty actual4
HEAD is now at 2dd69d6 submodule #2
ok 12 - git diff HEAD with dirty submodule (untracked, refs match)
expecting success:
git config --add -f .gitmodules submodule.subname.ignore all &&
git config --add -f .gitmodules submodule.subname.path sub &&
git diff HEAD >actual2 &&
test_must_be_empty actual2 &&
git config -f .gitmodules submodule.subname.ignore untracked &&
git diff HEAD >actual3 &&
test_must_be_empty actual3 &&
git config -f .gitmodules submodule.subname.ignore dirty &&
git diff HEAD >actual4 &&
test_must_be_empty actual4 &&
git config submodule.subname.ignore none &&
git config submodule.subname.path sub &&
git diff HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subprev $subprev-dirty &&
test_cmp expect.body actual.body &&
git config --remove-section submodule.subname &&
git config --remove-section -f .gitmodules submodule.subname &&
rm .gitmodules
ok 13 - git diff HEAD with dirty submodule (untracked, refs match) [.gitmodules]
expecting success:
git diff HEAD^..HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subtip $subprev &&
test_cmp expect.body actual.body &&
git diff --ignore-submodules=dirty HEAD^..HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subtip $subprev &&
test_cmp expect.body actual.body &&
git diff --ignore-submodules HEAD^..HEAD >actual &&
test_must_be_empty actual
ok 14 - git diff between submodule commits
expecting success:
git diff HEAD^..HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subtip $subprev &&
test_cmp expect.body actual.body &&
git config --add -f .gitmodules submodule.subname.ignore dirty &&
git config --add -f .gitmodules submodule.subname.path sub &&
git diff HEAD^..HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subtip $subprev &&
test_cmp expect.body actual.body &&
git config -f .gitmodules submodule.subname.ignore all &&
git diff HEAD^..HEAD >actual &&
test_must_be_empty actual &&
git config submodule.subname.ignore dirty &&
git config submodule.subname.path sub &&
git diff HEAD^..HEAD >actual &&
sed -e "1,/^@@/d" actual >actual.body &&
expect_from_to >expect.body $subtip $subprev &&
git config --remove-section submodule.subname &&
git config --remove-section -f .gitmodules submodule.subname &&
rm .gitmodules
ok 15 - git diff between submodule commits [.gitmodules]
expecting success:
rm -rf sub/* sub/.git &&
git diff > actual.empty &&
test_must_be_empty actual.empty
ok 16 - git diff (empty submodule dir)
expecting success:
# 39 efs
c=fffffffffffffffffffffffffffffffffffffff &&
(
echo "000000 $ZERO_OID 0 sub" &&
echo "160000 1$c 1 sub" &&
echo "160000 2$c 2 sub" &&
echo "160000 3$c 3 sub"
) | git update-index --index-info &&
echo >expect.nosub 'diff --cc sub
index 2ffffff,3ffffff..0000000
--- a/sub
+++ b/sub
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit 2fffffffffffffffffffffffffffffffffffffff
-Subproject commit 3fffffffffffffffffffffffffffffffffffffff
++Subproject commit 0000000000000000000000000000000000000000' &&
hh=$(git rev-parse HEAD) &&
sed -e "s/$ZERO_OID/$hh/" expect.nosub >expect.withsub
ok 17 - conflicted submodule setup
expecting success:
rm -fr sub && mkdir sub &&
git diff >actual &&
test_cmp expect.nosub actual
ok 18 - combined (empty submodule)
expecting success:
rm -fr sub &&
git clone --no-checkout . sub &&
git diff >actual &&
test_cmp expect.withsub actual
Cloning into 'sub'...
done.
ok 19 - combined (with submodule)
# passed all 19 test(s)
1..19
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4033-diff-patience.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4033-diff-patience/.git/
expecting success:
printf "a\nb\nc\n" >pre &&
printf "a\nbX\nc\n" >post &&
test_must_fail git diff --no-index \
--patience --ignore-space-at-eol pre post >diff &&
grep "^+.*X" diff
+bX
ok 1 - --ignore-space-at-eol with a single appended character
expecting success:
test_must_fail git diff --no-index "--$STRATEGY" file1 file2 > output &&
test_cmp expect output
ok 2 - patience diff
expecting success:
mv file2 expect &&
git apply < output &&
test_cmp expect file2
ok 3 - patience diff output is valid
expecting success:
test_must_fail git diff --no-index "--$STRATEGY" uniq1 uniq2 > output &&
test_cmp expect output
ok 4 - completely different files
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4030-diff-textconv.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4030-diff-textconv/.git/
expecting success:
printf "\\0\\n" >file &&
git add file &&
git commit -m one &&
printf "\\01\\n" >>file &&
git add file &&
git commit -m two
[master (root-commit) a6f2cf6] one
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
[master 029e019] two
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
ok 1 - setup binary file with history
expecting success:
git diff HEAD^ HEAD >diff &&
find_diff <diff >actual &&
test_cmp expect.binary actual
ok 2 - file is considered binary by porcelain
expecting success:
git diff-tree -p HEAD^ HEAD >diff &&
find_diff <diff >actual &&
test_cmp expect.binary actual
ok 3 - file is considered binary by plumbing
expecting success:
echo file diff=foo >.gitattributes &&
git config diff.foo.textconv "\"$(pwd)\""/hexdump &&
git config diff.fail.textconv false
ok 4 - setup textconv filters
expecting success:
git diff HEAD^ HEAD >diff &&
find_diff <diff >actual &&
test_cmp expect.text actual
ok 5 - diff produces text
expecting success:
git show HEAD >diff &&
find_diff <diff >actual &&
test_cmp expect.text actual
ok 6 - show commit produces text
expecting success:
git diff-tree -p HEAD^ HEAD >diff &&
find_diff <diff >actual &&
test_cmp expect.binary actual
ok 7 - diff-tree produces binary
expecting success:
git log -1 -p >log &&
find_diff <log >actual &&
test_cmp expect.text actual
ok 8 - log produces text
expecting success:
git format-patch --no-binary --stdout HEAD^ >patch &&
find_diff <patch >actual &&
test_cmp expect.binary actual
ok 9 - format-patch produces binary
expecting success:
git reset --soft HEAD^ &&
git status -v >diff &&
find_diff <diff >actual &&
test_cmp expect.text actual &&
git reset --soft HEAD@{1}
ok 10 - status -v produces text
expecting success:
git show HEAD:file >actual &&
printf "\\0\\n\\01\\n" >expect &&
test_cmp expect actual
ok 11 - show blob produces binary
expecting success:
git show --textconv HEAD:file >actual &&
printf "0\\n1\\n" >expect &&
test_cmp expect actual
ok 12 - show --textconv blob produces text
expecting success:
git show --no-textconv HEAD:file >actual &&
printf "\\0\\n\\01\\n" >expect &&
test_cmp expect actual
ok 13 - show --no-textconv blob produces binary
expecting success:
echo one >expect &&
git log --root --format=%s -G0 >actual &&
test_cmp expect actual
ok 14 - grep-diff (-G) operates on textconv data (add)
expecting success:
echo two >expect &&
git log --root --format=%s -G1 >actual &&
test_cmp expect actual
ok 15 - grep-diff (-G) operates on textconv data (modification)
expecting success:
echo one >expect &&
git log --root --format=%s -S0 >actual &&
test_cmp expect actual
ok 16 - pickaxe (-S) operates on textconv data (add)
expecting success:
echo two >expect &&
git log --root --format=%s -S1 >actual &&
test_cmp expect actual
ok 17 - pickaxe (-S) operates on textconv data (modification)
expecting success:
echo file diff=fail >.gitattributes &&
git diff --stat HEAD^ HEAD >actual &&
test_i18ncmp expect.stat actual &&
head -n1 <expect.stat >expect.line1 &&
head -n1 <actual >actual.line1 &&
test_cmp expect.line1 actual.line1
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 18 - diffstat does not run textconv
expecting success:
rm -f file &&
test_ln_s_add frotz file &&
git commit -m typechange &&
git show >diff &&
find_diff <diff >actual &&
test_cmp expect.typechange actual
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
[master 4f50cd5] typechange
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rewrite file (100%)
mode change 100644 => 120000
ok 19 - textconv does not act on symlinks
# passed all 19 test(s)
1..19
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4032-diff-inter-hunk-context.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4032-diff-inter-hunk-context/.git/
expecting success:
test 2 = 2
ok 1 - diff -U0, 1 common line: count hunks (2)
expecting success:
git diff -U0 f1 | grep -v '^index ' >actual &&
test_cmp expected.f1.0.2 actual
ok 2 - diff -U0, 1 common line: check output
expecting success:
test 2 = 2
ok 3 - diff -U0 --inter-hunk-context=0, 1 common line: count hunks (2)
expecting success:
git diff -U0 --inter-hunk-context=0 f1 | grep -v '^index ' >actual &&
test_cmp expected.f1.0.2 actual
ok 4 - diff -U0 --inter-hunk-context=0, 1 common line: check output
expecting success:
test 1 = 1
ok 5 - diff -U0 --inter-hunk-context=1, 1 common line: count hunks (1)
expecting success:
git diff -U0 --inter-hunk-context=1 f1 | grep -v '^index ' >actual &&
test_cmp expected.f1.0.1 actual
ok 6 - diff -U0 --inter-hunk-context=1, 1 common line: check output
expecting success:
test 1 = 1
ok 7 - diff -U0 --inter-hunk-context=2, 1 common line: count hunks (1)
expecting success:
git diff -U0 --inter-hunk-context=2 f1 | grep -v '^index ' >actual &&
test_cmp expected.f1.0.1 actual
ok 8 - diff -U0 --inter-hunk-context=2, 1 common line: check output
expecting success:
test 1 = 1
ok 9 - diff -U1, 1 common line: count hunks (1)
expecting success:
test 2 = 2
ok 10 - diff -U0, 2 common lines: count hunks (2)
expecting success:
test 2 = 2
ok 11 - diff -U0 --inter-hunk-context=0, 2 common lines: count hunks (2)
expecting success:
test 2 = 2
ok 12 - diff -U0 --inter-hunk-context=1, 2 common lines: count hunks (2)
expecting success:
test 1 = 1
ok 13 - diff -U0 --inter-hunk-context=2, 2 common lines: count hunks (1)
expecting success:
test 1 = 1
ok 14 - diff -U1, 2 common lines: count hunks (1)
expecting success:
test 2 = 2
ok 15 - diff -U1, 3 common lines: count hunks (2)
expecting success:
test 2 = 2
ok 16 - diff -U1 --inter-hunk-context=0, 3 common lines: count hunks (2)
expecting success:
test 1 = 1
ok 17 - diff -U1 --inter-hunk-context=1, 3 common lines: count hunks (1)
expecting success:
test 1 = 1
ok 18 - diff -U1 --inter-hunk-context=2, 3 common lines: count hunks (1)
expecting success:
test 2 = 2
ok 19 - diff -U3, 9 common lines: count hunks (2)
expecting success:
test 2 = 2
ok 20 - diff -U3 --inter-hunk-context=2, 9 common lines: count hunks (2)
expecting success:
test 1 = 1
ok 21 - diff -U3 --inter-hunk-context=3, 9 common lines: count hunks (1)
expecting success:
test 2 = 2
ok 22 - (diff.interHunkContext=0) diff -U0, 1 common line: count hunks (2)
expecting success:
git diff -U0 f1 | grep -v '^index ' >actual &&
test_cmp expected.f1.0.2 actual
ok 23 - (diff.interHunkContext=0) diff -U0, 1 common line: check output
expecting success:
test 1 = 1
ok 24 - (diff.interHunkContext=1) diff -U0, 1 common line: count hunks (1)
expecting success:
git diff -U0 f1 | grep -v '^index ' >actual &&
test_cmp expected.f1.0.1 actual
ok 25 - (diff.interHunkContext=1) diff -U0, 1 common line: check output
expecting success:
test 1 = 1
ok 26 - (diff.interHunkContext=2) diff -U0, 1 common line: count hunks (1)
expecting success:
git diff -U0 f1 | grep -v '^index ' >actual &&
test_cmp expected.f1.0.1 actual
ok 27 - (diff.interHunkContext=2) diff -U0, 1 common line: check output
expecting success:
test 1 = 1
ok 28 - (diff.interHunkContext=3) diff -U3, 9 common lines: count hunks (1)
expecting success:
test 2 = 2
ok 29 - (diff.interHunkContext=0) diff -U0, 2 common lines: count hunks (2)
expecting success:
test 2 = 2
ok 30 - (diff.interHunkContext=1) diff -U0, 2 common lines: count hunks (2)
expecting success:
test 1 = 1
ok 31 - (diff.interHunkContext=2) diff -U0, 2 common lines: count hunks (1)
expecting success:
test 2 = 2
ok 32 - (diff.interHunkContext=0) diff -U1, 3 common lines: count hunks (2)
expecting success:
test 1 = 1
ok 33 - (diff.interHunkContext=1) diff -U1, 3 common lines: count hunks (1)
expecting success:
test 1 = 1
ok 34 - (diff.interHunkContext=2) diff -U1, 3 common lines: count hunks (1)
expecting success:
test 2 = 2
ok 35 - (diff.interHunkContext=2) diff -U3, 9 common lines: count hunks (2)
expecting success:
test 1 = 1
ok 36 - (diff.interHunkContext=3) diff -U3, 9 common lines: count hunks (1)
expecting success:
git config diff.interHunkContext asdf &&
test_must_fail git diff &&
git config diff.interHunkContext -1 &&
test_must_fail git diff
fatal: bad numeric config value 'asdf' for 'diff.interhunkcontext': invalid unit
fatal: bad config variable 'diff.interhunkcontext' in file '.git/config' at line 7
ok 37 - diff.interHunkContext invalid
# passed all 37 test(s)
1..37
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4035-diff-quiet.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4035-diff-quiet/.git/
expecting success:
echo 1 >a &&
git add . &&
git commit -m first &&
echo 2 >b &&
git add . &&
git commit -a -m second &&
mkdir -p test-outside/repo && (
cd test-outside/repo &&
git init &&
echo "1 1" >a &&
git add . &&
git commit -m 1
) &&
mkdir -p test-outside/non/git && (
cd test-outside/non/git &&
echo "1 1" >a &&
echo "1 1" >matching-file &&
echo "1 1 " >trailing-space &&
echo "1 1" >extra-space &&
echo "2" >never-match
)
[master (root-commit) 227d155] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
[master ecda773] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4035-diff-quiet/test-outside/repo/.git/
[master (root-commit) 70d2bf6] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
ok 1 - setup
expecting success:
test_expect_code 1 git diff-tree --quiet HEAD^ HEAD >cnt &&
test_line_count = 0 cnt
ok 2 - git diff-tree HEAD^ HEAD
expecting success:
test_expect_code 0 git diff-tree --quiet HEAD^ HEAD -- a >cnt &&
test_line_count = 0 cnt
ok 3 - git diff-tree HEAD^ HEAD -- a
expecting success:
test_expect_code 1 git diff-tree --quiet HEAD^ HEAD -- b >cnt &&
test_line_count = 0 cnt
ok 4 - git diff-tree HEAD^ HEAD -- b
expecting success:
echo $(git rev-parse HEAD) |
test_expect_code 1 git diff-tree --quiet --stdin >cnt &&
test_line_count = 1 cnt
ok 5 - echo HEAD | git diff-tree --stdin
expecting success:
test_expect_code 0 git diff-tree --quiet HEAD HEAD >cnt &&
test_line_count = 0 cnt
ok 6 - git diff-tree HEAD HEAD
expecting success:
test_expect_code 0 git diff-files --quiet >cnt &&
test_line_count = 0 cnt
ok 7 - git diff-files
expecting success:
test_expect_code 0 git diff-index --quiet --cached HEAD >cnt &&
test_line_count = 0 cnt
ok 8 - git diff-index --cached HEAD
expecting success:
test_expect_code 1 git diff-index --quiet --cached HEAD^ >cnt &&
test_line_count = 0 cnt
ok 9 - git diff-index --cached HEAD^
expecting success:
echo text >>b &&
echo 3 >c &&
git add . &&
test_expect_code 1 git diff-index --quiet --cached HEAD^ >cnt &&
test_line_count = 0 cnt
warning: adding embedded git repository: test-outside/repo
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> test-outside/repo
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached test-outside/repo
hint:
hint: See "git help submodule" for more information.
ok 10 - git diff-index --cached HEAD^
expecting success:
git commit -m "text in b" &&
test_expect_code 1 git diff-tree --quiet -Stext HEAD^ HEAD -- b >cnt &&
test_line_count = 0 cnt
[master 680682f] text in b
Author: A U Thor <author@example.com>
9 files changed, 8 insertions(+)
create mode 100644 c
create mode 100644 cnt
create mode 100644 test-outside/non/git/a
create mode 100644 test-outside/non/git/extra-space
create mode 100644 test-outside/non/git/matching-file
create mode 100644 test-outside/non/git/never-match
create mode 100644 test-outside/non/git/trailing-space
create mode 160000 test-outside/repo
ok 11 - git diff-tree -Stext HEAD^ HEAD -- b
expecting success:
test_expect_code 0 git diff-tree --quiet -Snot-found HEAD^ HEAD -- b >cnt &&
test_line_count = 0 cnt
ok 12 - git diff-tree -Snot-found HEAD^ HEAD -- b
expecting success:
echo 3 >>c &&
test_expect_code 1 git diff-files --quiet >cnt &&
test_line_count = 0 cnt
ok 13 - git diff-files
expecting success:
git update-index c &&
test_expect_code 1 git diff-index --quiet --cached HEAD >cnt &&
test_line_count = 0 cnt
ok 14 - git diff-index --cached HEAD
expecting success:
(
cd test-outside/repo &&
test_expect_code 0 git diff --quiet a ../non/git/matching-file &&
test_expect_code 1 git diff --quiet a ../non/git/extra-space
)
ok 15 - git diff, one file outside repo
expecting success:
(
GIT_CEILING_DIRECTORIES="$TRASH_DIRECTORY/test-outside" &&
export GIT_CEILING_DIRECTORIES &&
cd test-outside/non/git &&
test_expect_code 0 git diff --quiet a matching-file &&
test_expect_code 1 git diff --quiet a extra-space
)
ok 16 - git diff, both files outside repo
expecting success:
(
cd test-outside/repo &&
test_expect_code 0 git diff --quiet --ignore-space-at-eol a ../non/git/trailing-space &&
test_expect_code 1 git diff --quiet --ignore-space-at-eol a ../non/git/extra-space
)
ok 17 - git diff --ignore-space-at-eol, one file outside repo
expecting success:
(
GIT_CEILING_DIRECTORIES="$TRASH_DIRECTORY/test-outside" &&
export GIT_CEILING_DIRECTORIES &&
cd test-outside/non/git &&
test_expect_code 0 git diff --quiet --ignore-space-at-eol a trailing-space &&
test_expect_code 1 git diff --quiet --ignore-space-at-eol a extra-space
)
ok 18 - git diff --ignore-space-at-eol, both files outside repo
expecting success:
(
cd test-outside/repo &&
test_expect_code 0 git diff --quiet --ignore-all-space a ../non/git/trailing-space &&
test_expect_code 0 git diff --quiet --ignore-all-space a ../non/git/extra-space &&
test_expect_code 1 git diff --quiet --ignore-all-space a ../non/git/never-match
)
ok 19 - git diff --ignore-all-space, one file outside repo
expecting success:
(
GIT_CEILING_DIRECTORIES="$TRASH_DIRECTORY/test-outside" &&
export GIT_CEILING_DIRECTORIES &&
cd test-outside/non/git &&
test_expect_code 0 git diff --quiet --ignore-all-space a trailing-space &&
test_expect_code 0 git diff --quiet --ignore-all-space a extra-space &&
test_expect_code 1 git diff --quiet --ignore-all-space a never-match
)
ok 20 - git diff --ignore-all-space, both files outside repo
expecting success:
test-tool chmtime +10 a &&
echo modified >>b &&
test_expect_code 1 git diff --quiet
ok 21 - git diff --quiet ignores stat-change only entries
expecting success:
echo "crlf.txt text=auto" >.gitattributes &&
printf "Hello\r\nWorld\r\n" >crlf.txt &&
git add .gitattributes crlf.txt &&
printf "Hello\r\nWorld\n" >crlf.txt &&
git diff --quiet crlf.txt
warning: CRLF will be replaced by LF in crlf.txt.
The file will have its original line endings in your working directory
warning: CRLF will be replaced by LF in crlf.txt.
The file will have its original line endings in your working directory
ok 22 - git diff --quiet on a path that need conversion
# passed all 22 test(s)
1..22
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4037-diff-r-t-dirs.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4037-diff-r-t-dirs/.git/
expecting success:
mkdir dc dr dt &&
>dc/1 &&
>dr/2 &&
>dt/3 &&
>fc &&
>fr &&
>ft &&
git add . &&
test_tick &&
git commit -m initial &&
rm -fr dt dr ft fr &&
mkdir da ft &&
for p in dc/1 da/4 dt ft/5 fc
do
echo hello >$p || exit
done &&
git add -u &&
git add . &&
test_tick &&
git commit -m second
[master (root-commit) 26fc746] initial
Author: A U Thor <author@example.com>
6 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 dc/1
create mode 100644 dr/2
create mode 100644 dt/3
create mode 100644 fc
create mode 100644 fr
create mode 100644 ft
[master 25e238e] second
Author: A U Thor <author@example.com>
9 files changed, 5 insertions(+)
create mode 100644 da/4
delete mode 100644 dr/2
create mode 100644 dt
delete mode 100644 dt/3
delete mode 100644 fr
delete mode 100644 ft
create mode 100644 ft/5
ok 1 - setup
expecting success:
git diff-tree -r -t --name-status HEAD^ HEAD >actual &&
test_cmp expect actual
ok 2 - verify
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4014-format-patch.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4014-format-patch/.git/
expecting success:
for i in 1 2 3 4 5 6 7 8 9 10; do echo "$i"; done >file &&
cat file >elif &&
git add file elif &&
test_tick &&
git commit -m Initial &&
git checkout -b side &&
for i in 1 2 5 6 A B C 7 8 9 10; do echo "$i"; done >file &&
test_chmod +x elif &&
test_tick &&
git commit -m "Side changes #1" &&
for i in D E F; do echo "$i"; done >>file &&
git update-index file &&
test_tick &&
git commit -m "Side changes #2" &&
git tag C2 &&
for i in 5 6 1 2 3 A 4 B C 7 8 9 10 D E F; do echo "$i"; done >file &&
git update-index file &&
test_tick &&
git commit -m "Side changes #3 with \\n backslash-n in it." &&
git checkout master &&
git diff-tree -p C2 | git apply --index &&
test_tick &&
git commit -m "Master accepts moral equivalent of #2" &&
git checkout side &&
git checkout -b patchid &&
for i in 5 6 1 2 3 A 4 B C 7 8 9 10 D E F; do echo "$i"; done >file2 &&
for i in 1 2 3 A 4 B C 7 8 9 10 D E F 5 6; do echo "$i"; done >file3 &&
for i in 8 9 10; do echo "$i"; done >file &&
git add file file2 file3 &&
test_tick &&
git commit -m "patchid 1" &&
for i in 4 A B 7 8 9 10; do echo "$i"; done >file2 &&
for i in 8 9 10 5 6; do echo "$i"; done >file3 &&
git add file2 file3 &&
test_tick &&
git commit -m "patchid 2" &&
for i in 10 5 6; do echo "$i"; done >file &&
git add file &&
test_tick &&
git commit -m "patchid 3" &&
git checkout master
[master (root-commit) e27066e] Initial
Author: A U Thor <author@example.com>
2 files changed, 20 insertions(+)
create mode 100644 elif
create mode 100644 file
Switched to a new branch 'side'
[side 1135adf] Side changes #1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 elif
[side fd00575] Side changes #2
Author: A U Thor <author@example.com>
1 file changed, 6 insertions(+), 2 deletions(-)
[side 18ed22a] Side changes #3 with \n backslash-n in it.
Author: A U Thor <author@example.com>
1 file changed, 4 insertions(+), 2 deletions(-)
Switched to branch 'master'
[master 2e66419] Master accepts moral equivalent of #2
Author: A U Thor <author@example.com>
1 file changed, 6 insertions(+), 2 deletions(-)
Switched to branch 'side'
Switched to a new branch 'patchid'
[patchid 866b619] patchid 1
Author: A U Thor <author@example.com>
3 files changed, 32 insertions(+), 13 deletions(-)
create mode 100644 file2
create mode 100644 file3
[patchid b0e76a3] patchid 2
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 21 deletions(-)
[patchid e905b62] patchid 3
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+), 2 deletions(-)
Switched to branch 'master'
ok 1 - setup
expecting success:
git format-patch --stdout master..side >patch0 &&
cnt=$(grep "^From " patch0 | wc -l) &&
test $cnt = 3
ok 2 - format-patch --ignore-if-in-upstream
expecting success:
git format-patch --stdout \
--ignore-if-in-upstream master..side >patch1 &&
cnt=$(grep "^From " patch1 | wc -l) &&
test $cnt = 2
ok 3 - format-patch --ignore-if-in-upstream
expecting success:
git tag -a v1 -m tag side &&
git tag -a v2 -m tag master &&
git format-patch --stdout --ignore-if-in-upstream v2..v1 >patch1 &&
cnt=$(grep "^From " patch1 | wc -l) &&
test $cnt = 2
ok 4 - format-patch --ignore-if-in-upstream handles tags
expecting success:
git checkout -b slave master &&
echo "Another line" >>file &&
test_tick &&
git commit -am "Slave change #1" &&
echo "Yet another line" >>file &&
test_tick &&
git commit -am "Slave change #2" &&
git checkout -b merger master &&
test_tick &&
git merge --no-ff slave &&
cnt=$(git format-patch -3 --stdout | grep "^From " | wc -l) &&
test $cnt = 3
Switched to a new branch 'slave'
[slave 0ee97bc] Slave change #1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[slave 35f7779] Slave change #2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to a new branch 'merger'
Merging:
2e66419 Master accepts moral equivalent of #2
virtual slave
found 1 common ancestor:
2e66419 Master accepts moral equivalent of #2
Merge made by the 'recursive' strategy.
file | 2 ++
1 file changed, 2 insertions(+)
ok 5 - format-patch doesn't consider merge commits
expecting success:
git checkout -b rebuild-0 master &&
git am -3 patch0 &&
cnt=$(git rev-list master.. | wc -l) &&
test $cnt = 2
Switched to a new branch 'rebuild-0'
Applying: Side changes #1
Applying: Side changes #2
Using index info to reconstruct a base tree...
M file
Falling back to patching base and 3-way merge...
Merging:
5b37a14 Side changes #1
virtual Side changes #2
found 1 common ancestor:
virtual 8359489d93991065cdaa748bd96dcb831b3d60ca
No changes -- Patch already applied.
Applying: Side changes #3 with \n backslash-n in it.
ok 6 - format-patch result applies
expecting success:
git checkout -b rebuild-1 master &&
git am -3 patch1 &&
cnt=$(git rev-list master.. | wc -l) &&
test $cnt = 2
Switched to a new branch 'rebuild-1'
Applying: Side changes #1
Applying: Side changes #3 with \n backslash-n in it.
ok 7 - format-patch --ignore-if-in-upstream result applies
expecting success:
git cat-file commit side | grep "^Side .* with .* backslash-n"
Side changes #3 with \n backslash-n in it.
ok 8 - commit did not screw up the log message
expecting success:
grep "^Subject: .*Side changes #3 with .* backslash-n" patch0 &&
grep "^Subject: .*Side changes #3 with .* backslash-n" patch1
Subject: [PATCH 3/3] Side changes #3 with \n backslash-n in it.
Subject: [PATCH 2/2] Side changes #3 with \n backslash-n in it.
ok 9 - format-patch did not screw up the log message
expecting success:
git cat-file commit rebuild-1 | grep "^Side .* with .* backslash-n"
Side changes #3 with \n backslash-n in it.
ok 10 - replay did not screw up the log message
expecting success:
git config format.headers "To: R E Cipient <rcipient@example.com>
" &&
git config --add format.headers "Cc: S E Cipient <scipient@example.com>
" &&
git format-patch --stdout master..side > patch2 &&
sed -e "/^\$/q" patch2 > hdrs2 &&
grep "^To: R E Cipient <rcipient@example.com>\$" hdrs2 &&
grep "^Cc: S E Cipient <scipient@example.com>\$" hdrs2
To: R E Cipient <rcipient@example.com>
Cc: S E Cipient <scipient@example.com>
ok 11 - extra headers
expecting success:
git config --replace-all format.headers "To: R E Cipient <rcipient@example.com>" &&
git config --add format.headers "Cc: S E Cipient <scipient@example.com>" &&
git format-patch --stdout master..side >patch3 &&
sed -e "/^\$/q" patch3 > hdrs3 &&
grep "^To: R E Cipient <rcipient@example.com>\$" hdrs3 &&
grep "^Cc: S E Cipient <scipient@example.com>\$" hdrs3
To: R E Cipient <rcipient@example.com>
Cc: S E Cipient <scipient@example.com>
ok 12 - extra headers without newlines
expecting success:
git config --replace-all format.headers "To: R E Cipient <rcipient@example.com>" &&
git config --add format.headers "To: S E Cipient <scipient@example.com>" &&
git format-patch --stdout master..side > patch4 &&
sed -e "/^\$/q" patch4 > hdrs4 &&
grep "^To: R E Cipient <rcipient@example.com>,\$" hdrs4 &&
grep "^ *S E Cipient <scipient@example.com>\$" hdrs4
To: R E Cipient <rcipient@example.com>,
S E Cipient <scipient@example.com>
ok 13 - extra headers with multiple To:s
expecting success:
git config --replace-all format.headers "Cc: R E Cipient <rcipient@example.com>" &&
git format-patch --cc="S E Cipient <scipient@example.com>" --stdout master..side | sed -e "/^\$/q" >patch5 &&
grep "^Cc: R E Cipient <rcipient@example.com>,\$" patch5 &&
grep "^ *S E Cipient <scipient@example.com>\$" patch5
Cc: R E Cipient <rcipient@example.com>,
S E Cipient <scipient@example.com>
ok 14 - additional command line cc (ascii)
checking known breakage:
git config --replace-all format.headers "Cc: R E Cipient <rcipient@example.com>" &&
git format-patch --cc="S. E. Cipient <scipient@example.com>" --stdout master..side | sed -e "/^\$/q" >patch5 &&
grep "^Cc: R E Cipient <rcipient@example.com>,\$" patch5 &&
grep "^ *\"S. E. Cipient\" <scipient@example.com>\$" patch5
Cc: R E Cipient <rcipient@example.com>,
not ok 15 - additional command line cc (rfc822) # TODO known breakage
expecting success:
git config --unset-all format.headers &&
git format-patch --add-header="Cc: R E Cipient <rcipient@example.com>" --stdout master..side | sed -e "/^\$/q" >patch6 &&
grep "^Cc: R E Cipient <rcipient@example.com>\$" patch6
Cc: R E Cipient <rcipient@example.com>
ok 16 - command line headers
expecting success:
git config --replace-all format.headers "Cc: R E Cipient <rcipient@example.com>" &&
git format-patch --add-header="Cc: S E Cipient <scipient@example.com>" --stdout master..side | sed -e "/^\$/q" >patch7 &&
grep "^Cc: R E Cipient <rcipient@example.com>,\$" patch7 &&
grep "^ *S E Cipient <scipient@example.com>\$" patch7
Cc: R E Cipient <rcipient@example.com>,
S E Cipient <scipient@example.com>
ok 17 - configuration headers and command line headers
expecting success:
git config --unset-all format.headers &&
git format-patch --to="R E Cipient <rcipient@example.com>" --stdout master..side | sed -e "/^\$/q" >patch8 &&
grep "^To: R E Cipient <rcipient@example.com>\$" patch8
To: R E Cipient <rcipient@example.com>
ok 18 - command line To: header (ascii)
checking known breakage:
git format-patch --to="R. E. Cipient <rcipient@example.com>" --stdout master..side | sed -e "/^\$/q" >patch8 &&
grep "^To: \"R. E. Cipient\" <rcipient@example.com>\$" patch8
not ok 19 - command line To: header (rfc822) # TODO known breakage
checking known breakage:
git format-patch --to="R Ä Cipient <rcipient@example.com>" --stdout master..side | sed -e "/^\$/q" >patch8 &&
grep "^To: =?UTF-8?q?R=20=C3=84=20Cipient?= <rcipient@example.com>\$" patch8
not ok 20 - command line To: header (rfc2047) # TODO known breakage
expecting success:
git config format.to "R E Cipient <rcipient@example.com>" &&
git format-patch --stdout master..side | sed -e "/^\$/q" >patch9 &&
grep "^To: R E Cipient <rcipient@example.com>\$" patch9
To: R E Cipient <rcipient@example.com>
ok 21 - configuration To: header (ascii)
checking known breakage:
git config format.to "R. E. Cipient <rcipient@example.com>" &&
git format-patch --stdout master..side | sed -e "/^\$/q" >patch9 &&
grep "^To: \"R. E. Cipient\" <rcipient@example.com>\$" patch9
not ok 22 - configuration To: header (rfc822) # TODO known breakage
checking known breakage:
git config format.to "R Ä Cipient <rcipient@example.com>" &&
git format-patch --stdout master..side | sed -e "/^\$/q" >patch9 &&
grep "^To: =?UTF-8?q?R=20=C3=84=20Cipient?= <rcipient@example.com>\$" patch9
not ok 23 - configuration To: header (rfc2047) # TODO known breakage
expecting success:
git -c format.from=false format-patch --stdout master..side |
sed -e "/^\$/q" >patch &&
check_patch patch &&
! grep "^From: C O Mitter <committer@example.com>\$" patch
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:14:13 -0700
Subject: [PATCH 1/3] Side changes #1
ok 24 - format.from=false
expecting success:
git -c format.from=true format-patch --stdout master..side |
sed -e "/^\$/q" >patch &&
check_patch patch &&
grep "^From: C O Mitter <committer@example.com>\$" patch
From: C O Mitter <committer@example.com>
Date: Thu, 7 Apr 2005 15:14:13 -0700
Subject: [PATCH 1/3] Side changes #1
From: C O Mitter <committer@example.com>
ok 25 - format.from=true
expecting success:
git -c format.from="F R Om <from@example.com>" format-patch --stdout master..side |
sed -e "/^\$/q" >patch &&
check_patch patch &&
grep "^From: F R Om <from@example.com>\$" patch
From: F R Om <from@example.com>
Date: Thu, 7 Apr 2005 15:14:13 -0700
Subject: [PATCH 1/3] Side changes #1
From: F R Om <from@example.com>
ok 26 - format.from with address
expecting success:
git -c format.from="F R Om <from@example.com>" format-patch --no-from --stdout master..side |
sed -e "/^\$/q" >patch &&
check_patch patch &&
! grep "^From: F R Om <from@example.com>\$" patch
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:14:13 -0700
Subject: [PATCH 1/3] Side changes #1
ok 27 - --no-from overrides format.from
expecting success:
git -c format.from="F R Om <from@example.com>" format-patch --from --stdout master..side |
sed -e "/^\$/q" >patch &&
check_patch patch &&
! grep "^From: F R Om <from@example.com>\$" patch
From: C O Mitter <committer@example.com>
Date: Thu, 7 Apr 2005 15:14:13 -0700
Subject: [PATCH 1/3] Side changes #1
ok 28 - --from overrides format.from
expecting success:
git config --replace-all format.to \
"R E Cipient <rcipient@example.com>" &&
git format-patch --no-to --stdout master..side |
sed -e "/^\$/q" >patch10 &&
check_patch patch10 &&
! grep "^To: R E Cipient <rcipient@example.com>\$" patch10
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:14:13 -0700
Subject: [PATCH 1/3] Side changes #1
ok 29 - --no-to overrides config.to
expecting success:
git config --replace-all format.to \
"Someone <someone@out.there>" &&
git format-patch --no-to --to="Someone Else <else@out.there>" \
--stdout master..side |
sed -e "/^\$/q" >patch11 &&
check_patch patch11 &&
! grep "^To: Someone <someone@out.there>\$" patch11 &&
grep "^To: Someone Else <else@out.there>\$" patch11
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:14:13 -0700
Subject: [PATCH 1/3] Side changes #1
To: Someone Else <else@out.there>
ok 30 - --no-to and --to replaces config.to
expecting success:
git config --replace-all format.cc \
"C E Cipient <rcipient@example.com>" &&
git format-patch --no-cc --stdout master..side |
sed -e "/^\$/q" >patch12 &&
check_patch patch12 &&
! grep "^Cc: C E Cipient <rcipient@example.com>\$" patch12
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:14:13 -0700
Subject: [PATCH 1/3] Side changes #1
ok 31 - --no-cc overrides config.cc
expecting success:
git config --replace-all format.headers \
"Header1: B E Cipient <rcipient@example.com>" &&
git format-patch --no-add-header --stdout master..side |
sed -e "/^\$/q" >patch13 &&
check_patch patch13 &&
! grep "^Header1: B E Cipient <rcipient@example.com>\$" patch13
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:14:13 -0700
Subject: [PATCH 1/3] Side changes #1
ok 32 - --no-add-header overrides config.headers
expecting success:
rm -rf patches/ &&
git checkout side &&
git format-patch -o patches/ master &&
ls patches/0001-Side-changes-1.patch patches/0002-Side-changes-2.patch patches/0003-Side-changes-3-with-n-backslash-n-in-it.patch
Switched to branch 'side'
patches/0001-Side-changes-1.patch
patches/0002-Side-changes-2.patch
patches/0003-Side-changes-3-with-n-backslash-n-in-it.patch
patches/0001-Side-changes-1.patch
patches/0002-Side-changes-2.patch
patches/0003-Side-changes-3-with-n-backslash-n-in-it.patch
ok 33 - multiple files
expecting success:
rm -fr patches &&
git format-patch -o patches --cover-letter --reroll-count 4 master..side >list &&
! grep -v "^patches/v4-000[0-3]-" list &&
sed -n -e "/^Subject: /p" $(cat list) >subjects &&
! grep -v "^Subject: \[PATCH v4 [0-3]/3\] " subjects
ok 34 - reroll count
expecting success:
rm -fr patches &&
git format-patch -o patches --cover-letter -v4 master..side >list &&
! grep -v "^patches/v4-000[0-3]-" list &&
sed -n -e "/^Subject: /p" $(cat list) >subjects &&
! grep -v "^Subject: \[PATCH v4 [0-3]/3\] " subjects
ok 35 - reroll count (-v)
expecting success:
git checkout side &&
check_threading expect.no-threading master
Already on 'side'
ok 36 - no threading
expecting success:
check_threading expect.thread --thread master
ok 37 - thread
expecting success:
check_threading expect.in-reply-to --in-reply-to="<test.message>" \
--thread master
ok 38 - thread in-reply-to
expecting success:
check_threading expect.cover-letter --cover-letter --thread master
ok 39 - thread cover-letter
expecting success:
check_threading expect.cl-irt --cover-letter \
--in-reply-to="<test.message>" --thread master
ok 40 - thread cover-letter in-reply-to
expecting success:
check_threading expect.cl-irt --cover-letter \
--in-reply-to="<test.message>" --thread=shallow master
ok 41 - thread explicit shallow
expecting success:
check_threading expect.deep --thread=deep master
ok 42 - thread deep
expecting success:
check_threading expect.deep-irt --thread=deep \
--in-reply-to="<test.message>" master
ok 43 - thread deep in-reply-to
expecting success:
check_threading expect.deep-cl --cover-letter --thread=deep master
ok 44 - thread deep cover-letter
expecting success:
check_threading expect.deep-cl-irt --cover-letter \
--in-reply-to="<test.message>" --thread=deep master
ok 45 - thread deep cover-letter in-reply-to
expecting success:
test_config format.thread true &&
check_threading expect.thread master
ok 46 - thread via config
expecting success:
test_config format.thread deep &&
check_threading expect.deep master
ok 47 - thread deep via config
expecting success:
test_config format.thread deep &&
check_threading expect.thread --thread master
ok 48 - thread config + override
expecting success:
test_config format.thread deep &&
check_threading expect.no-threading --no-thread master
ok 49 - thread config + --no-thread
expecting success:
rm -rf patches/ &&
git checkout side &&
before=$(git hash-object file) &&
before=$(git rev-parse --short $before) &&
for i in 5 6 1 2 3 A 4 B C 7 8 9 10 D E F; do echo "$i"; done >>file &&
after=$(git hash-object file) &&
after=$(git rev-parse --short $after) &&
git update-index file &&
git commit -m "This is an excessively long subject line for a message due to the habit some projects have of not having a short, one-line subject at the start of the commit message, but rather sticking a whole paragraph right at the start as the only thing in the commit message. It had better not become the filename for the patch." &&
git format-patch -o patches/ master..side &&
ls patches/0004-This-is-an-excessively-long-subject-line-for-a-messa.patch
Already on 'side'
[side 24e36c3] This is an excessively long subject line for a message due to the habit some projects have of not having a short, one-line subject at the start of the commit message, but rather sticking a whole paragraph right at the start as the only thing in the commit message. It had better not become the filename for the patch.
Author: A U Thor <author@example.com>
1 file changed, 16 insertions(+)
patches/0001-Side-changes-1.patch
patches/0002-Side-changes-2.patch
patches/0003-Side-changes-3-with-n-backslash-n-in-it.patch
patches/0004-This-is-an-excessively-long-subject-line-for-a-messa.patch
patches/0004-This-is-an-excessively-long-subject-line-for-a-messa.patch
ok 50 - excessive subject
expecting success:
test_when_finished "rmdir 0000-cover-letter.patch" &&
mkdir 0000-cover-letter.patch &&
test_must_fail git format-patch --no-renames --cover-letter -1
error: cannot open patch file ./0000-cover-letter.patch: Is a directory
fatal: failed to create cover-letter file
0000-cover-letter.patch
ok 51 - failure to write cover-letter aborts gracefully
expecting success:
git mv file foo &&
git commit -m foo &&
git format-patch --no-renames --cover-letter -1 &&
check_patch 0000-cover-letter.patch &&
! grep "file => foo .* 0 *\$" 0000-cover-letter.patch &&
git format-patch --cover-letter -1 -M &&
grep "file => foo .* 0 *\$" 0000-cover-letter.patch
[side fdb9fcf] foo
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename file => foo (100%)
0000-cover-letter.patch
0001-foo.patch
From: C O Mitter <committer@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 0/1] *** SUBJECT HERE ***
0000-cover-letter.patch
0001-foo.patch
file => foo | 0
ok 52 - cover-letter inherits diff options
expecting success:
git format-patch --cover-letter -2 &&
sed -e "1,/A U Thor/d" -e "/^\$/q" < 0000-cover-letter.patch > output &&
test_cmp expect output
0000-cover-letter.patch
0001-This-is-an-excessively-long-subject-line-for-a-messa.patch
0002-foo.patch
ok 53 - shortlog of cover-letter wraps overly-long onelines
expecting success:
git format-patch -U4 -2 &&
sed -e "1,/^diff/d" -e "/^+5/q" \
<0001-This-is-an-excessively-long-subject-line-for-a-messa.patch \
>output &&
test_cmp expect output
0001-This-is-an-excessively-long-subject-line-for-a-messa.patch
0002-foo.patch
ok 54 - format-patch respects -U
expecting success:
git format-patch -p -2 &&
sed -e "1,/^\$/d" -e "/^+5/q" < 0001-This-is-an-excessively-long-subject-line-for-a-messa.patch > output &&
test_cmp expect output
0001-This-is-an-excessively-long-subject-line-for-a-messa.patch
0002-foo.patch
ok 55 - format-patch -p suppresses stat
expecting success:
filename=$(
rm -rf sub &&
mkdir -p sub/dir &&
cd sub/dir &&
git format-patch -1
) &&
case "$filename" in
0*)
;; # ok
*)
echo "Oops? $filename"
false
;;
esac &&
test -f "$filename"
ok 56 - format-patch from a subdirectory (1)
expecting success:
filename=$(
rm -rf sub &&
mkdir -p sub/dir &&
cd sub/dir &&
git format-patch -1 -o ..
) &&
case "$filename" in
../0*)
;; # ok
*)
echo "Oops? $filename"
false
;;
esac &&
basename=$(expr "$filename" : ".*/\(.*\)") &&
test -f "sub/$basename"
ok 57 - format-patch from a subdirectory (2)
expecting success:
rm -f 0* &&
filename=$(
rm -rf sub &&
mkdir -p sub/dir &&
cd sub/dir &&
git format-patch -1 -o "$TRASH_DIRECTORY"
) &&
basename=$(expr "$filename" : ".*/\(.*\)") &&
test -f "$basename"
ok 58 - format-patch from a subdirectory (3)
expecting success:
git format-patch -1 --stdout --in-reply-to "baz@foo.bar" > patch8 &&
grep "^In-Reply-To: <baz@foo.bar>" patch8 &&
grep "^References: <baz@foo.bar>" patch8
In-Reply-To: <baz@foo.bar>
References: <baz@foo.bar>
ok 59 - format-patch --in-reply-to
expecting success:
git format-patch -1 --signoff --stdout >out &&
grep "^Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" out
Signed-off-by: C O Mitter <committer@example.com>
ok 60 - format-patch --signoff
expecting success:
git notes --ref test add -m "test message" HEAD &&
git format-patch -1 --signoff --stdout --notes=test >out &&
# Three dashes must come after S-o-b
! sed "/^Signed-off-by: /q" out | grep "test message" &&
sed "1,/^Signed-off-by: /d" out | grep "test message" &&
# Notes message must come after three dashes
! sed "/^---$/q" out | grep "test message" &&
sed "1,/^---$/d" out | grep "test message"
test message
test message
ok 61 - format-patch --notes --signoff
expecting success:
git notes add -m "notes config message" HEAD &&
test_when_finished git notes remove HEAD &&
git format-patch -1 --stdout >out &&
! grep "notes config message" out &&
git format-patch -1 --stdout --notes >out &&
grep "notes config message" out &&
git format-patch -1 --stdout --no-notes >out &&
! grep "notes config message" out &&
git format-patch -1 --stdout --notes --no-notes >out &&
! grep "notes config message" out &&
git format-patch -1 --stdout --no-notes --notes >out &&
grep "notes config message" out &&
test_config format.notes true &&
git format-patch -1 --stdout >out &&
grep "notes config message" out &&
git format-patch -1 --stdout --notes >out &&
grep "notes config message" out &&
git format-patch -1 --stdout --no-notes >out &&
! grep "notes config message" out &&
git format-patch -1 --stdout --notes --no-notes >out &&
! grep "notes config message" out &&
git format-patch -1 --stdout --no-notes --notes >out &&
grep "notes config message" out
notes config message
notes config message
notes config message
notes config message
notes config message
Removing note for object HEAD
ok 62 - format-patch notes output control
expecting success:
git notes --ref note1 add -m "this is note 1" HEAD &&
test_when_finished git notes --ref note1 remove HEAD &&
git notes --ref note2 add -m "this is note 2" HEAD &&
test_when_finished git notes --ref note2 remove HEAD &&
git format-patch -1 --stdout >out &&
! grep "this is note 1" out &&
! grep "this is note 2" out &&
git format-patch -1 --stdout --notes=note1 >out &&
grep "this is note 1" out &&
! grep "this is note 2" out &&
git format-patch -1 --stdout --notes=note2 >out &&
! grep "this is note 1" out &&
grep "this is note 2" out &&
git format-patch -1 --stdout --notes=note1 --notes=note2 >out &&
grep "this is note 1" out &&
grep "this is note 2" out &&
test_config format.notes note1 &&
git format-patch -1 --stdout >out &&
grep "this is note 1" out &&
! grep "this is note 2" out &&
git format-patch -1 --stdout --no-notes >out &&
! grep "this is note 1" out &&
! grep "this is note 2" out &&
git format-patch -1 --stdout --notes=note2 >out &&
grep "this is note 1" out &&
grep "this is note 2" out &&
git format-patch -1 --stdout --no-notes --notes=note2 >out &&
! grep "this is note 1" out &&
grep "this is note 2" out &&
git config --add format.notes note2 &&
git format-patch -1 --stdout >out &&
grep "this is note 1" out &&
grep "this is note 2" out &&
git format-patch -1 --stdout --no-notes >out &&
! grep "this is note 1" out &&
! grep "this is note 2" out
this is note 1
this is note 2
this is note 1
this is note 2
this is note 1
this is note 1
this is note 2
this is note 2
this is note 1
this is note 2
Removing note for object HEAD
Removing note for object HEAD
ok 63 - format-patch with multiple notes refs
expecting success:
test_must_fail git format-patch --name-only 2> output &&
test_i18ncmp expect.name-only output &&
test_must_fail git format-patch --name-status 2> output &&
test_i18ncmp expect.name-status output &&
test_must_fail git format-patch --check 2> output &&
test_i18ncmp expect.check output
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 64 - options no longer allowed for format-patch
expecting success:
git format-patch --numstat --stdout master..side > output &&
test 5 = $(grep "^diff --git a/" output | wc -l)
ok 65 - format-patch --numstat should produce a patch
expecting success:
git format-patch master..side -- file 2>error &&
! grep "Use .--" error
0001-Side-changes-2.patch
0002-Side-changes-3-with-n-backslash-n-in-it.patch
0003-This-is-an-excessively-long-subject-line-for-a-messa.patch
0004-foo.patch
ok 66 - format-patch -- <path>
expecting success:
git format-patch --ignore-if-in-upstream HEAD
ok 67 - format-patch --ignore-if-in-upstream HEAD
expecting success:
git format-patch --stdout -1 | tail -n 3 >output &&
signature >expect &&
test_cmp expect output
ok 68 - format-patch default signature
expecting success:
git format-patch --stdout --signature="my sig" -1 | tail -n 3 >output &&
signature "my sig" >expect &&
test_cmp expect output
ok 69 - format-patch --signature
expecting success:
git config format.signature "config sig" &&
git format-patch --stdout -1 >output &&
grep "config sig" output
config sig
ok 70 - format-patch with format.signature config
expecting success:
git config format.signature "config sig" &&
git format-patch --stdout --signature="overrides" -1 >output &&
! grep "config sig" output &&
grep "overrides" output
overrides
ok 71 - format-patch --signature overrides format.signature
expecting success:
git config format.signature "config sig" &&
git format-patch --stdout --signature="my sig" --no-signature \
-1 >output &&
check_patch output &&
! grep "config sig" output &&
! grep "my sig" output &&
! grep "^-- \$" output
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH] foo
ok 72 - format-patch --no-signature ignores format.signature
expecting success:
git config --unset-all format.signature &&
git format-patch --stdout --signature="my sig" --cover-letter \
-1 >output &&
grep "my sig" output &&
test 2 = $(grep "my sig" output | wc -l)
my sig
my sig
ok 73 - format-patch --signature --cover-letter
expecting success:
git config format.signature "" &&
git format-patch --stdout -1 >output &&
check_patch output &&
! grep "^-- \$" output
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH] foo
ok 74 - format.signature="" suppresses signatures
expecting success:
git config --unset-all format.signature &&
git format-patch --stdout --no-signature -1 >output &&
check_patch output &&
! grep "^-- \$" output
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH] foo
ok 75 - format-patch --no-signature suppresses signatures
expecting success:
git format-patch --stdout --signature="" -1 >output &&
check_patch output &&
! grep "^-- \$" output
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH] foo
ok 76 - format-patch --signature="" suppresses signatures
expecting success:
cat >mail-signature <<-\EOF
Test User <test.email@kernel.org>
http://git.kernel.org/cgit/git/git.git
git.kernel.org/?p=git/git.git;a=summary
EOF
ok 77 - prepare mail-signature input
expecting success:
git format-patch --stdout --signature-file=mail-signature -1 >output &&
check_patch output &&
sed -e "1,/^-- \$/d" <output >actual &&
{
cat mail-signature && echo
} >expect &&
test_cmp expect actual
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH] foo
ok 78 - --signature-file=file works
expecting success:
test_config format.signaturefile mail-signature &&
git format-patch --stdout -1 >output &&
check_patch output &&
sed -e "1,/^-- \$/d" <output >actual &&
{
cat mail-signature && echo
} >expect &&
test_cmp expect actual
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH] foo
ok 79 - format.signaturefile works
expecting success:
test_config format.signaturefile mail-signature &&
git format-patch --stdout --no-signature -1 >output &&
check_patch output &&
! grep "^-- \$" output
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH] foo
ok 80 - --no-signature suppresses format.signaturefile
expecting success:
cat >other-mail-signature <<-\EOF &&
Use this other signature instead of mail-signature.
EOF
test_config format.signaturefile mail-signature &&
git format-patch --stdout \
--signature-file=other-mail-signature -1 >output &&
check_patch output &&
sed -e "1,/^-- \$/d" <output >actual &&
{
cat other-mail-signature && echo
} >expect &&
test_cmp expect actual
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH] foo
ok 81 - --signature-file overrides format.signaturefile
expecting success:
test_config format.signaturefile mail-signature &&
git format-patch --stdout --signature="my sig" -1 >output &&
check_patch output &&
grep "my sig" output
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH] foo
my sig
ok 82 - --signature overrides format.signaturefile
checking prerequisite: TTY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq PERL &&
# Reading from the pty master seems to get stuck _sometimes_
# on Mac OS X 10.5.0, using Perl 5.10.0 or 5.8.9.
#
# Reproduction recipe: run
#
# i=0
# while ./test-terminal.perl echo hi $i
# do
# : $((i = $i + 1))
# done
#
# After 2000 iterations or so it hangs.
# https://rt.cpan.org/Ticket/Display.html?id=65692
#
test "$(uname -s)" != Darwin &&
perl "$TEST_DIRECTORY"/test-terminal.perl \
sh -c "test -t 1 && test -t 2"
)
prerequisite TTY ok
expecting success:
rm -f pager_used &&
test_terminal env GIT_PAGER="wc >pager_used" git format-patch --stdout --all &&
test_path_is_file pager_used
ok 83 - format-patch --stdout paginates
expecting success:
rm -f pager_used &&
test_terminal env GIT_PAGER="wc >pager_used" git --no-pager format-patch --stdout --all &&
test_terminal env GIT_PAGER="wc >pager_used" git -c "pager.format-patch=false" format-patch --stdout --all &&
test_path_is_missing pager_used &&
test_path_is_missing .git/pager_used
From e27066e74e2522a272f220d17767ef6cab999734 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:13:13 -0700
Subject: [PATCH 01/21] Initial
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
elif | 10 [32m++++++++++[m
file | 10 [32m++++++++++[m
2 files changed, 20 insertions(+)
create mode 100644 elif
create mode 100644 file
[1mdiff --git a/elif b/elif[m
[1mnew file mode 100644[m
[1mindex 0000000..f00c965[m
[1m--- /dev/null[m
[1m+++ b/elif[m
[36m@@ -0,0 +1,10 @@[m
[32m+[m[32m1[m
[32m+[m[32m2[m
[32m+[m[32m3[m
[32m+[m[32m4[m
[32m+[m[32m5[m
[32m+[m[32m6[m
[32m+[m[32m7[m
[32m+[m[32m8[m
[32m+[m[32m9[m
[32m+[m[32m10[m
[1mdiff --git a/file b/file[m
[1mnew file mode 100644[m
[1mindex 0000000..f00c965[m
[1m--- /dev/null[m
[1m+++ b/file[m
[36m@@ -0,0 +1,10 @@[m
[32m+[m[32m1[m
[32m+[m[32m2[m
[32m+[m[32m3[m
[32m+[m[32m4[m
[32m+[m[32m5[m
[32m+[m[32m6[m
[32m+[m[32m7[m
[32m+[m[32m8[m
[32m+[m[32m9[m
[32m+[m[32m10[m
--
2.23.0.rc1
From 1135adfeed86678c55e1aad7c568046ee8215660 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:14:13 -0700
Subject: [PATCH 02/21] Side changes #1
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
elif | 0
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 elif
[1mdiff --git a/elif b/elif[m
[1mold mode 100644[m
[1mnew mode 100755[m
--
2.23.0.rc1
From fd00575a8382ce27c62b83730a40bcff1dc2f25f Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:15:13 -0700
Subject: [PATCH 03/21] Side changes #2
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file | 8 [32m++++++[m[31m--[m
1 file changed, 6 insertions(+), 2 deletions(-)
[1mdiff --git a/file b/file[m
[1mindex f00c965..e5895ff 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -1,10 +1,14 @@[m
1[m
2[m
[31m-3[m
[31m-4[m
5[m
6[m
[32m+[m[32mA[m
[32m+[m[32mB[m
[32m+[m[32mC[m
7[m
8[m
9[m
10[m
[32m+[m[32mD[m
[32m+[m[32mE[m
[32m+[m[32mF[m
--
2.23.0.rc1
From 18ed22aae56367787c36a882bd61281e07994f11 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:16:13 -0700
Subject: [PATCH 04/21] Side changes #3 with \n backslash-n in it.
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file | 6 [32m++++[m[31m--[m
1 file changed, 4 insertions(+), 2 deletions(-)
[1mdiff --git a/file b/file[m
[1mindex e5895ff..40f36c6 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -1,8 +1,10 @@[m
[31m-1[m
[31m-2[m
5[m
6[m
[32m+[m[32m1[m
[32m+[m[32m2[m
[32m+[m[32m3[m
A[m
[32m+[m[32m4[m
B[m
C[m
7[m
--
2.23.0.rc1
From 2e66419311bb9e77e5d67b8ea7019aaddfb581f1 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:17:13 -0700
Subject: [PATCH 05/21] Master accepts moral equivalent of #2
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file | 8 [32m++++++[m[31m--[m
1 file changed, 6 insertions(+), 2 deletions(-)
[1mdiff --git a/file b/file[m
[1mindex f00c965..e5895ff 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -1,10 +1,14 @@[m
1[m
2[m
[31m-3[m
[31m-4[m
5[m
6[m
[32m+[m[32mA[m
[32m+[m[32mB[m
[32m+[m[32mC[m
7[m
8[m
9[m
10[m
[32m+[m[32mD[m
[32m+[m[32mE[m
[32m+[m[32mF[m
--
2.23.0.rc1
From 866b6195304ada3156f0f8c97696b6f862ce5312 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:18:13 -0700
Subject: [PATCH 06/21] patchid 1
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file | 13 [31m-------------[m
file2 | 16 [32m++++++++++++++++[m
file3 | 16 [32m++++++++++++++++[m
3 files changed, 32 insertions(+), 13 deletions(-)
create mode 100644 file2
create mode 100644 file3
[1mdiff --git a/file b/file[m
[1mindex 40f36c6..236483f 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -1,16 +1,3 @@[m
[31m-5[m
[31m-6[m
[31m-1[m
[31m-2[m
[31m-3[m
[31m-A[m
[31m-4[m
[31m-B[m
[31m-C[m
[31m-7[m
8[m
9[m
10[m
[31m-D[m
[31m-E[m
[31m-F[m
[1mdiff --git a/file2 b/file2[m
[1mnew file mode 100644[m
[1mindex 0000000..40f36c6[m
[1m--- /dev/null[m
[1m+++ b/file2[m
[36m@@ -0,0 +1,16 @@[m
[32m+[m[32m5[m
[32m+[m[32m6[m
[32m+[m[32m1[m
[32m+[m[32m2[m
[32m+[m[32m3[m
[32m+[m[32mA[m
[32m+[m[32m4[m
[32m+[m[32mB[m
[32m+[m[32mC[m
[32m+[m[32m7[m
[32m+[m[32m8[m
[32m+[m[32m9[m
[32m+[m[32m10[m
[32m+[m[32mD[m
[32m+[m[32mE[m
[32m+[m[32mF[m
[1mdiff --git a/file3 b/file3[m
[1mnew file mode 100644[m
[1mindex 0000000..281fa8c[m
[1m--- /dev/null[m
[1m+++ b/file3[m
[36m@@ -0,0 +1,16 @@[m
[32m+[m[32m1[m
[32m+[m[32m2[m
[32m+[m[32m3[m
[32m+[m[32mA[m
[32m+[m[32m4[m
[32m+[m[32mB[m
[32m+[m[32mC[m
[32m+[m[32m7[m
[32m+[m[32m8[m
[32m+[m[32m9[m
[32m+[m[32m10[m
[32m+[m[32mD[m
[32m+[m[32mE[m
[32m+[m[32mF[m
[32m+[m[32m5[m
[32m+[m[32m6[m
--
2.23.0.rc1
From b0e76a38f7c5ec2ee722c28a446dbba613e87da4 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:19:13 -0700
Subject: [PATCH 07/21] patchid 2
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file2 | 11 [32m+[m[31m----------[m
file3 | 11 [31m-----------[m
2 files changed, 1 insertion(+), 21 deletions(-)
[1mdiff --git a/file2 b/file2[m
[1mindex 40f36c6..d082389 100644[m
[1m--- a/file2[m
[1m+++ b/file2[m
[36m@@ -1,16 +1,7 @@[m
[31m-5[m
[31m-6[m
[31m-1[m
[31m-2[m
[31m-3[m
[31m-A[m
4[m
[32m+[m[32mA[m
B[m
[31m-C[m
7[m
8[m
9[m
10[m
[31m-D[m
[31m-E[m
[31m-F[m
[1mdiff --git a/file3 b/file3[m
[1mindex 281fa8c..eb411a6 100644[m
[1m--- a/file3[m
[1m+++ b/file3[m
[36m@@ -1,16 +1,5 @@[m
[31m-1[m
[31m-2[m
[31m-3[m
[31m-A[m
[31m-4[m
[31m-B[m
[31m-C[m
[31m-7[m
8[m
9[m
10[m
[31m-D[m
[31m-E[m
[31m-F[m
5[m
6[m
--
2.23.0.rc1
From e905b623a7eaecf172d0a5e51615566d7c1343c2 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:20:13 -0700
Subject: [PATCH 08/21] patchid 3
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file | 4 [32m++[m[31m--[m
1 file changed, 2 insertions(+), 2 deletions(-)
[1mdiff --git a/file b/file[m
[1mindex 236483f..478d49a 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -1,3 +1,3 @@[m
[31m-8[m
[31m-9[m
10[m
[32m+[m[32m5[m
[32m+[m[32m6[m
--
2.23.0.rc1
From 0ee97bc50cb527c832593f19dbf5cac34dc2b0ec Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:21:13 -0700
Subject: [PATCH 09/21] Slave change #1
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file | 1 [32m+[m
1 file changed, 1 insertion(+)
[1mdiff --git a/file b/file[m
[1mindex e5895ff..3cb93e8 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -12,3 +12,4 @@[m [mC[m
D[m
E[m
F[m
[32m+[m[32mAnother line[m
--
2.23.0.rc1
From 35f7779b14411fc2ca3a900545582122ede56bba Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:22:13 -0700
Subject: [PATCH 10/21] Slave change #2
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file | 1 [32m+[m
1 file changed, 1 insertion(+)
[1mdiff --git a/file b/file[m
[1mindex 3cb93e8..b43af10 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -13,3 +13,4 @@[m [mD[m
E[m
F[m
Another line[m
[32m+[m[32mYet another line[m
--
2.23.0.rc1
From 3bb6dea027a6d06fe694cd3a4bddd4bef126cb2a Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 11/21] Notes added by 'git notes add'
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
fdb9fcf18a45eb38837e959111188a57ea80c4a8 | 1 [32m+[m
1 file changed, 1 insertion(+)
create mode 100644 fdb9fcf18a45eb38837e959111188a57ea80c4a8
[1mdiff --git a/fdb9fcf18a45eb38837e959111188a57ea80c4a8 b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1mnew file mode 100644[m
[1mindex 0000000..a117704[m
[1m--- /dev/null[m
[1m+++ b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[36m@@ -0,0 +1 @@[m
[32m+[m[32mthis is note 2[m
--
2.23.0.rc1
From cd80a4db726f25cd65cf846143cace77b2dd1b65 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 12/21] Notes added by 'git notes add'
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
fdb9fcf18a45eb38837e959111188a57ea80c4a8 | 1 [32m+[m
1 file changed, 1 insertion(+)
create mode 100644 fdb9fcf18a45eb38837e959111188a57ea80c4a8
[1mdiff --git a/fdb9fcf18a45eb38837e959111188a57ea80c4a8 b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1mnew file mode 100644[m
[1mindex 0000000..e9404d1[m
[1m--- /dev/null[m
[1m+++ b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[36m@@ -0,0 +1 @@[m
[32m+[m[32mthis is note 1[m
--
2.23.0.rc1
From 42b3ce0dccff6ba1f83bd6615570c23eed8de918 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 13/21] Notes added by 'git notes add'
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
fdb9fcf18a45eb38837e959111188a57ea80c4a8 | 1 [32m+[m
1 file changed, 1 insertion(+)
create mode 100644 fdb9fcf18a45eb38837e959111188a57ea80c4a8
[1mdiff --git a/fdb9fcf18a45eb38837e959111188a57ea80c4a8 b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1mnew file mode 100644[m
[1mindex 0000000..b1bf3b6[m
[1m--- /dev/null[m
[1m+++ b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[36m@@ -0,0 +1 @@[m
[32m+[m[32mnotes config message[m
--
2.23.0.rc1
From 24e36c3941a70f7b4b029567b4cbee5557f1c59d Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 14/21] This is an excessively long subject line for a message
due to the habit some projects have of not having a short, one-line subject
at the start of the commit message, but rather sticking a whole paragraph
right at the start as the only thing in the commit message. It had better not
become the filename for the patch.
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file | 16 [32m++++++++++++++++[m
1 file changed, 16 insertions(+)
[1mdiff --git a/file b/file[m
[1mindex 40f36c6..2dc5c23 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -14,3 +14,19 @@[m [mC[m
D[m
E[m
F[m
[32m+[m[32m5[m
[32m+[m[32m6[m
[32m+[m[32m1[m
[32m+[m[32m2[m
[32m+[m[32m3[m
[32m+[m[32mA[m
[32m+[m[32m4[m
[32m+[m[32mB[m
[32m+[m[32mC[m
[32m+[m[32m7[m
[32m+[m[32m8[m
[32m+[m[32m9[m
[32m+[m[32m10[m
[32m+[m[32mD[m
[32m+[m[32mE[m
[32m+[m[32mF[m
--
2.23.0.rc1
From 5b37a147b79ed2832e982022b5fc6f0643b05d9b Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:14:13 -0700
Subject: [PATCH 15/21] Side changes #1
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
elif | 0
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 elif
[1mdiff --git a/elif b/elif[m
[1mold mode 100644[m
[1mnew mode 100755[m
--
2.23.0.rc1
From 4c7f806c98eaa2c7f9a830226fa3b106d8c7df6d Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 16/21] Notes added by 'git notes add'
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
fdb9fcf18a45eb38837e959111188a57ea80c4a8 | 1 [32m+[m
1 file changed, 1 insertion(+)
create mode 100644 fdb9fcf18a45eb38837e959111188a57ea80c4a8
[1mdiff --git a/fdb9fcf18a45eb38837e959111188a57ea80c4a8 b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1mnew file mode 100644[m
[1mindex 0000000..da5a1d5[m
[1m--- /dev/null[m
[1m+++ b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[36m@@ -0,0 +1 @@[m
[32m+[m[32mtest message[m
--
2.23.0.rc1
From 4038a9ac88247a9d9d2582f1a8f5b89c7f33c6bf Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 17/21] Notes removed by 'git notes remove'
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
fdb9fcf18a45eb38837e959111188a57ea80c4a8 | 1 [31m-[m
1 file changed, 1 deletion(-)
delete mode 100644 fdb9fcf18a45eb38837e959111188a57ea80c4a8
[1mdiff --git a/fdb9fcf18a45eb38837e959111188a57ea80c4a8 b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1mdeleted file mode 100644[m
[1mindex a117704..0000000[m
[1m--- a/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1m+++ /dev/null[m
[36m@@ -1 +0,0 @@[m
[31m-this is note 2[m
--
2.23.0.rc1
From da4f41819a0a73ab79f6809d13275ebd7fe7abf3 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 18/21] Notes removed by 'git notes remove'
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
fdb9fcf18a45eb38837e959111188a57ea80c4a8 | 1 [31m-[m
1 file changed, 1 deletion(-)
delete mode 100644 fdb9fcf18a45eb38837e959111188a57ea80c4a8
[1mdiff --git a/fdb9fcf18a45eb38837e959111188a57ea80c4a8 b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1mdeleted file mode 100644[m
[1mindex e9404d1..0000000[m
[1m--- a/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1m+++ /dev/null[m
[36m@@ -1 +0,0 @@[m
[31m-this is note 1[m
--
2.23.0.rc1
From c6e6852ae6ec4bd7d75bab2a5681f49fc6486ad9 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 19/21] Notes removed by 'git notes remove'
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
fdb9fcf18a45eb38837e959111188a57ea80c4a8 | 1 [31m-[m
1 file changed, 1 deletion(-)
delete mode 100644 fdb9fcf18a45eb38837e959111188a57ea80c4a8
[1mdiff --git a/fdb9fcf18a45eb38837e959111188a57ea80c4a8 b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1mdeleted file mode 100644[m
[1mindex b1bf3b6..0000000[m
[1m--- a/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1m+++ /dev/null[m
[36m@@ -1 +0,0 @@[m
[31m-notes config message[m
--
2.23.0.rc1
From fdb9fcf18a45eb38837e959111188a57ea80c4a8 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 20/21] foo
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file => foo | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename file => foo (100%)
[1mdiff --git a/file b/foo[m
[1msimilarity index 100%[m
[1mrename from file[m
[1mrename to foo[m
--
2.23.0.rc1
From f97110da46ea42c7ff37f9402f52d98127f05e1d Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:16:13 -0700
Subject: [PATCH 21/21] Side changes #3 with \n backslash-n in it.
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file | 6 [32m++++[m[31m--[m
1 file changed, 4 insertions(+), 2 deletions(-)
[1mdiff --git a/file b/file[m
[1mindex e5895ff..40f36c6 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -1,8 +1,10 @@[m
[31m-1[m
[31m-2[m
5[m
6[m
[32m+[m[32m1[m
[32m+[m[32m2[m
[32m+[m[32m3[m
A[m
[32m+[m[32m4[m
B[m
C[m
7[m
--
2.23.0.rc1
From e27066e74e2522a272f220d17767ef6cab999734 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:13:13 -0700
Subject: [PATCH 01/21] Initial
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
elif | 10 [32m++++++++++[m
file | 10 [32m++++++++++[m
2 files changed, 20 insertions(+)
create mode 100644 elif
create mode 100644 file
[1mdiff --git a/elif b/elif[m
[1mnew file mode 100644[m
[1mindex 0000000..f00c965[m
[1m--- /dev/null[m
[1m+++ b/elif[m
[36m@@ -0,0 +1,10 @@[m
[32m+[m[32m1[m
[32m+[m[32m2[m
[32m+[m[32m3[m
[32m+[m[32m4[m
[32m+[m[32m5[m
[32m+[m[32m6[m
[32m+[m[32m7[m
[32m+[m[32m8[m
[32m+[m[32m9[m
[32m+[m[32m10[m
[1mdiff --git a/file b/file[m
[1mnew file mode 100644[m
[1mindex 0000000..f00c965[m
[1m--- /dev/null[m
[1m+++ b/file[m
[36m@@ -0,0 +1,10 @@[m
[32m+[m[32m1[m
[32m+[m[32m2[m
[32m+[m[32m3[m
[32m+[m[32m4[m
[32m+[m[32m5[m
[32m+[m[32m6[m
[32m+[m[32m7[m
[32m+[m[32m8[m
[32m+[m[32m9[m
[32m+[m[32m10[m
--
2.23.0.rc1
From 1135adfeed86678c55e1aad7c568046ee8215660 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:14:13 -0700
Subject: [PATCH 02/21] Side changes #1
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
elif | 0
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 elif
[1mdiff --git a/elif b/elif[m
[1mold mode 100644[m
[1mnew mode 100755[m
--
2.23.0.rc1
From fd00575a8382ce27c62b83730a40bcff1dc2f25f Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:15:13 -0700
Subject: [PATCH 03/21] Side changes #2
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file | 8 [32m++++++[m[31m--[m
1 file changed, 6 insertions(+), 2 deletions(-)
[1mdiff --git a/file b/file[m
[1mindex f00c965..e5895ff 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -1,10 +1,14 @@[m
1[m
2[m
[31m-3[m
[31m-4[m
5[m
6[m
[32m+[m[32mA[m
[32m+[m[32mB[m
[32m+[m[32mC[m
7[m
8[m
9[m
10[m
[32m+[m[32mD[m
[32m+[m[32mE[m
[32m+[m[32mF[m
--
2.23.0.rc1
From 18ed22aae56367787c36a882bd61281e07994f11 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:16:13 -0700
Subject: [PATCH 04/21] Side changes #3 with \n backslash-n in it.
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file | 6 [32m++++[m[31m--[m
1 file changed, 4 insertions(+), 2 deletions(-)
[1mdiff --git a/file b/file[m
[1mindex e5895ff..40f36c6 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -1,8 +1,10 @@[m
[31m-1[m
[31m-2[m
5[m
6[m
[32m+[m[32m1[m
[32m+[m[32m2[m
[32m+[m[32m3[m
A[m
[32m+[m[32m4[m
B[m
C[m
7[m
--
2.23.0.rc1
From 2e66419311bb9e77e5d67b8ea7019aaddfb581f1 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:17:13 -0700
Subject: [PATCH 05/21] Master accepts moral equivalent of #2
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file | 8 [32m++++++[m[31m--[m
1 file changed, 6 insertions(+), 2 deletions(-)
[1mdiff --git a/file b/file[m
[1mindex f00c965..e5895ff 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -1,10 +1,14 @@[m
1[m
2[m
[31m-3[m
[31m-4[m
5[m
6[m
[32m+[m[32mA[m
[32m+[m[32mB[m
[32m+[m[32mC[m
7[m
8[m
9[m
10[m
[32m+[m[32mD[m
[32m+[m[32mE[m
[32m+[m[32mF[m
--
2.23.0.rc1
From 866b6195304ada3156f0f8c97696b6f862ce5312 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:18:13 -0700
Subject: [PATCH 06/21] patchid 1
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file | 13 [31m-------------[m
file2 | 16 [32m++++++++++++++++[m
file3 | 16 [32m++++++++++++++++[m
3 files changed, 32 insertions(+), 13 deletions(-)
create mode 100644 file2
create mode 100644 file3
[1mdiff --git a/file b/file[m
[1mindex 40f36c6..236483f 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -1,16 +1,3 @@[m
[31m-5[m
[31m-6[m
[31m-1[m
[31m-2[m
[31m-3[m
[31m-A[m
[31m-4[m
[31m-B[m
[31m-C[m
[31m-7[m
8[m
9[m
10[m
[31m-D[m
[31m-E[m
[31m-F[m
[1mdiff --git a/file2 b/file2[m
[1mnew file mode 100644[m
[1mindex 0000000..40f36c6[m
[1m--- /dev/null[m
[1m+++ b/file2[m
[36m@@ -0,0 +1,16 @@[m
[32m+[m[32m5[m
[32m+[m[32m6[m
[32m+[m[32m1[m
[32m+[m[32m2[m
[32m+[m[32m3[m
[32m+[m[32mA[m
[32m+[m[32m4[m
[32m+[m[32mB[m
[32m+[m[32mC[m
[32m+[m[32m7[m
[32m+[m[32m8[m
[32m+[m[32m9[m
[32m+[m[32m10[m
[32m+[m[32mD[m
[32m+[m[32mE[m
[32m+[m[32mF[m
[1mdiff --git a/file3 b/file3[m
[1mnew file mode 100644[m
[1mindex 0000000..281fa8c[m
[1m--- /dev/null[m
[1m+++ b/file3[m
[36m@@ -0,0 +1,16 @@[m
[32m+[m[32m1[m
[32m+[m[32m2[m
[32m+[m[32m3[m
[32m+[m[32mA[m
[32m+[m[32m4[m
[32m+[m[32mB[m
[32m+[m[32mC[m
[32m+[m[32m7[m
[32m+[m[32m8[m
[32m+[m[32m9[m
[32m+[m[32m10[m
[32m+[m[32mD[m
[32m+[m[32mE[m
[32m+[m[32mF[m
[32m+[m[32m5[m
[32m+[m[32m6[m
--
2.23.0.rc1
From b0e76a38f7c5ec2ee722c28a446dbba613e87da4 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:19:13 -0700
Subject: [PATCH 07/21] patchid 2
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file2 | 11 [32m+[m[31m----------[m
file3 | 11 [31m-----------[m
2 files changed, 1 insertion(+), 21 deletions(-)
[1mdiff --git a/file2 b/file2[m
[1mindex 40f36c6..d082389 100644[m
[1m--- a/file2[m
[1m+++ b/file2[m
[36m@@ -1,16 +1,7 @@[m
[31m-5[m
[31m-6[m
[31m-1[m
[31m-2[m
[31m-3[m
[31m-A[m
4[m
[32m+[m[32mA[m
B[m
[31m-C[m
7[m
8[m
9[m
10[m
[31m-D[m
[31m-E[m
[31m-F[m
[1mdiff --git a/file3 b/file3[m
[1mindex 281fa8c..eb411a6 100644[m
[1m--- a/file3[m
[1m+++ b/file3[m
[36m@@ -1,16 +1,5 @@[m
[31m-1[m
[31m-2[m
[31m-3[m
[31m-A[m
[31m-4[m
[31m-B[m
[31m-C[m
[31m-7[m
8[m
9[m
10[m
[31m-D[m
[31m-E[m
[31m-F[m
5[m
6[m
--
2.23.0.rc1
From e905b623a7eaecf172d0a5e51615566d7c1343c2 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:20:13 -0700
Subject: [PATCH 08/21] patchid 3
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file | 4 [32m++[m[31m--[m
1 file changed, 2 insertions(+), 2 deletions(-)
[1mdiff --git a/file b/file[m
[1mindex 236483f..478d49a 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -1,3 +1,3 @@[m
[31m-8[m
[31m-9[m
10[m
[32m+[m[32m5[m
[32m+[m[32m6[m
--
2.23.0.rc1
From 0ee97bc50cb527c832593f19dbf5cac34dc2b0ec Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:21:13 -0700
Subject: [PATCH 09/21] Slave change #1
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file | 1 [32m+[m
1 file changed, 1 insertion(+)
[1mdiff --git a/file b/file[m
[1mindex e5895ff..3cb93e8 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -12,3 +12,4 @@[m [mC[m
D[m
E[m
F[m
[32m+[m[32mAnother line[m
--
2.23.0.rc1
From 35f7779b14411fc2ca3a900545582122ede56bba Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:22:13 -0700
Subject: [PATCH 10/21] Slave change #2
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file | 1 [32m+[m
1 file changed, 1 insertion(+)
[1mdiff --git a/file b/file[m
[1mindex 3cb93e8..b43af10 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -13,3 +13,4 @@[m [mD[m
E[m
F[m
Another line[m
[32m+[m[32mYet another line[m
--
2.23.0.rc1
From 3bb6dea027a6d06fe694cd3a4bddd4bef126cb2a Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 11/21] Notes added by 'git notes add'
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
fdb9fcf18a45eb38837e959111188a57ea80c4a8 | 1 [32m+[m
1 file changed, 1 insertion(+)
create mode 100644 fdb9fcf18a45eb38837e959111188a57ea80c4a8
[1mdiff --git a/fdb9fcf18a45eb38837e959111188a57ea80c4a8 b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1mnew file mode 100644[m
[1mindex 0000000..a117704[m
[1m--- /dev/null[m
[1m+++ b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[36m@@ -0,0 +1 @@[m
[32m+[m[32mthis is note 2[m
--
2.23.0.rc1
From cd80a4db726f25cd65cf846143cace77b2dd1b65 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 12/21] Notes added by 'git notes add'
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
fdb9fcf18a45eb38837e959111188a57ea80c4a8 | 1 [32m+[m
1 file changed, 1 insertion(+)
create mode 100644 fdb9fcf18a45eb38837e959111188a57ea80c4a8
[1mdiff --git a/fdb9fcf18a45eb38837e959111188a57ea80c4a8 b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1mnew file mode 100644[m
[1mindex 0000000..e9404d1[m
[1m--- /dev/null[m
[1m+++ b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[36m@@ -0,0 +1 @@[m
[32m+[m[32mthis is note 1[m
--
2.23.0.rc1
From 42b3ce0dccff6ba1f83bd6615570c23eed8de918 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 13/21] Notes added by 'git notes add'
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
fdb9fcf18a45eb38837e959111188a57ea80c4a8 | 1 [32m+[m
1 file changed, 1 insertion(+)
create mode 100644 fdb9fcf18a45eb38837e959111188a57ea80c4a8
[1mdiff --git a/fdb9fcf18a45eb38837e959111188a57ea80c4a8 b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1mnew file mode 100644[m
[1mindex 0000000..b1bf3b6[m
[1m--- /dev/null[m
[1m+++ b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[36m@@ -0,0 +1 @@[m
[32m+[m[32mnotes config message[m
--
2.23.0.rc1
From 24e36c3941a70f7b4b029567b4cbee5557f1c59d Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 14/21] This is an excessively long subject line for a message
due to the habit some projects have of not having a short, one-line subject
at the start of the commit message, but rather sticking a whole paragraph
right at the start as the only thing in the commit message. It had better not
become the filename for the patch.
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file | 16 [32m++++++++++++++++[m
1 file changed, 16 insertions(+)
[1mdiff --git a/file b/file[m
[1mindex 40f36c6..2dc5c23 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -14,3 +14,19 @@[m [mC[m
D[m
E[m
F[m
[32m+[m[32m5[m
[32m+[m[32m6[m
[32m+[m[32m1[m
[32m+[m[32m2[m
[32m+[m[32m3[m
[32m+[m[32mA[m
[32m+[m[32m4[m
[32m+[m[32mB[m
[32m+[m[32mC[m
[32m+[m[32m7[m
[32m+[m[32m8[m
[32m+[m[32m9[m
[32m+[m[32m10[m
[32m+[m[32mD[m
[32m+[m[32mE[m
[32m+[m[32mF[m
--
2.23.0.rc1
From 5b37a147b79ed2832e982022b5fc6f0643b05d9b Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:14:13 -0700
Subject: [PATCH 15/21] Side changes #1
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
elif | 0
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 elif
[1mdiff --git a/elif b/elif[m
[1mold mode 100644[m
[1mnew mode 100755[m
--
2.23.0.rc1
From 4c7f806c98eaa2c7f9a830226fa3b106d8c7df6d Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 16/21] Notes added by 'git notes add'
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
fdb9fcf18a45eb38837e959111188a57ea80c4a8 | 1 [32m+[m
1 file changed, 1 insertion(+)
create mode 100644 fdb9fcf18a45eb38837e959111188a57ea80c4a8
[1mdiff --git a/fdb9fcf18a45eb38837e959111188a57ea80c4a8 b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1mnew file mode 100644[m
[1mindex 0000000..da5a1d5[m
[1m--- /dev/null[m
[1m+++ b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[36m@@ -0,0 +1 @@[m
[32m+[m[32mtest message[m
--
2.23.0.rc1
From 4038a9ac88247a9d9d2582f1a8f5b89c7f33c6bf Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 17/21] Notes removed by 'git notes remove'
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
fdb9fcf18a45eb38837e959111188a57ea80c4a8 | 1 [31m-[m
1 file changed, 1 deletion(-)
delete mode 100644 fdb9fcf18a45eb38837e959111188a57ea80c4a8
[1mdiff --git a/fdb9fcf18a45eb38837e959111188a57ea80c4a8 b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1mdeleted file mode 100644[m
[1mindex a117704..0000000[m
[1m--- a/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1m+++ /dev/null[m
[36m@@ -1 +0,0 @@[m
[31m-this is note 2[m
--
2.23.0.rc1
From da4f41819a0a73ab79f6809d13275ebd7fe7abf3 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 18/21] Notes removed by 'git notes remove'
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
fdb9fcf18a45eb38837e959111188a57ea80c4a8 | 1 [31m-[m
1 file changed, 1 deletion(-)
delete mode 100644 fdb9fcf18a45eb38837e959111188a57ea80c4a8
[1mdiff --git a/fdb9fcf18a45eb38837e959111188a57ea80c4a8 b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1mdeleted file mode 100644[m
[1mindex e9404d1..0000000[m
[1m--- a/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1m+++ /dev/null[m
[36m@@ -1 +0,0 @@[m
[31m-this is note 1[m
--
2.23.0.rc1
From c6e6852ae6ec4bd7d75bab2a5681f49fc6486ad9 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 19/21] Notes removed by 'git notes remove'
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
fdb9fcf18a45eb38837e959111188a57ea80c4a8 | 1 [31m-[m
1 file changed, 1 deletion(-)
delete mode 100644 fdb9fcf18a45eb38837e959111188a57ea80c4a8
[1mdiff --git a/fdb9fcf18a45eb38837e959111188a57ea80c4a8 b/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1mdeleted file mode 100644[m
[1mindex b1bf3b6..0000000[m
[1m--- a/fdb9fcf18a45eb38837e959111188a57ea80c4a8[m
[1m+++ /dev/null[m
[36m@@ -1 +0,0 @@[m
[31m-notes config message[m
--
2.23.0.rc1
From fdb9fcf18a45eb38837e959111188a57ea80c4a8 Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:23:13 -0700
Subject: [PATCH 20/21] foo
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file => foo | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename file => foo (100%)
[1mdiff --git a/file b/foo[m
[1msimilarity index 100%[m
[1mrename from file[m
[1mrename to foo[m
--
2.23.0.rc1
From f97110da46ea42c7ff37f9402f52d98127f05e1d Mon Sep 17 00:00:00 2001
From: A U Thor <author@example.com>
Date: Thu, 7 Apr 2005 15:16:13 -0700
Subject: [PATCH 21/21] Side changes #3 with \n backslash-n in it.
Header1: B E Cipient <rcipient@example.com>
To: Someone <someone@out.there>
Cc: C E Cipient <rcipient@example.com>
---
file | 6 [32m++++[m[31m--[m
1 file changed, 4 insertions(+), 2 deletions(-)
[1mdiff --git a/file b/file[m
[1mindex e5895ff..40f36c6 100644[m
[1m--- a/file[m
[1m+++ b/file[m
[36m@@ -1,8 +1,10 @@[m
[31m-1[m
[31m-2[m
5[m
6[m
[32m+[m[32m1[m
[32m+[m[32m2[m
[32m+[m[32m3[m
A[m
[32m+[m[32m4[m
B[m
C[m
7[m
--
2.23.0.rc1
ok 84 - format-patch --stdout pagination can be disabled
expecting success:
rm -rf patches/ &&
echo content >>file &&
for i in one two three; do echo $i; done >msg &&
git add file &&
git commit -F msg &&
git format-patch -o patches -1 &&
grep ^Subject: patches/0001-one.patch >actual &&
echo "Subject: [PATCH] one two three" >expect &&
test_cmp expect actual
[side 03e88ab] one two three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
patches/0001-one.patch
ok 85 - format-patch handles multi-line subjects
expecting success:
rm -rf patches/ &&
echo content >>file &&
for i in en två tre; do echo $i; done >msg &&
git add file &&
git commit -F msg &&
git format-patch -o patches -1 &&
grep ^Subject: patches/0001-en.patch >actual &&
echo "Subject: [PATCH] =?UTF-8?q?en=20tv=C3=A5=20tre?=" >expect &&
test_cmp expect actual
[side 14a7b37] en två tre
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
patches/0001-en.patch
ok 86 - format-patch handles multi-line encoded subjects
expecting success:
echo content >>file &&
git add file &&
git commit -m "$M512" &&
git format-patch --stdout -1 >patch &&
sed -n "/^Subject/p; /^ /p; /^$/q" <patch >subject &&
test_cmp expect subject
[side 317404f] foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 87 - format-patch wraps extremely long subject (ascii)
expecting success:
rm -rf patches/ &&
echo content >>file &&
git add file &&
git commit -m "$M512" &&
git format-patch --stdout -1 >patch &&
sed -n "/^Subject/p; /^ /p; /^$/q" <patch >subject &&
test_cmp expect subject
[side e8f8f51] föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar föö bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 88 - format-patch wraps extremely long subject (rfc2047)
expecting success:
check_author "Foo B. Bar"
[side 2c79a5e] author-check
Author: Foo B. Bar <author@example.com>
1 file changed, 1 insertion(+)
ok 89 - format-patch quotes dot in from-headers
expecting success:
check_author "Foo \"The Baz\" Bar"
[side 895c191] author-check
Author: Foo "The Baz" Bar <author@example.com>
1 file changed, 1 insertion(+)
ok 90 - format-patch quotes double-quote in from-headers
expecting success:
check_author "Föo Bar"
[side 474c296] author-check
Author: Föo Bar <author@example.com>
1 file changed, 1 insertion(+)
ok 91 - format-patch uses rfc2047-encoded from-headers when necessary
expecting success:
check_author "Föo B. Bar"
[side 65e2d1e] author-check
Author: Föo B. Bar <author@example.com>
1 file changed, 1 insertion(+)
ok 92 - rfc2047-encoded from-headers leave no rfc822 specials
expecting success:
check_author "foo_bar_foo_bar_foo_bar_foo_bar_foo_bar_foo_bar_foo_bar_foo_bar_"
[side 2122e1f] author-check
Author: foo_bar_foo_bar_foo_bar_foo_bar_foo_bar_foo_bar_foo_bar_foo_bar_ <author@example.com>
1 file changed, 1 insertion(+)
ok 93 - format-patch wraps moderately long from-header (ascii)
expecting success:
check_author "Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar"
[side e10eeb6] author-check
Author: Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar <author@example.com>
1 file changed, 1 insertion(+)
ok 94 - format-patch wraps extremely long from-header (ascii)
expecting success:
check_author "Foo.Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar"
[side e4e411c] author-check
Author: Foo.Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar <author@example.com>
1 file changed, 1 insertion(+)
ok 95 - format-patch wraps extremely long from-header (rfc822)
expecting success:
check_author "Foö Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar"
[side 683a678] author-check
Author: Foö Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar <author@example.com>
1 file changed, 1 insertion(+)
ok 96 - format-patch wraps extremely long from-header (rfc2047)
expecting success:
echo content >>file &&
git add file &&
git commit -m "header with . in it" &&
git format-patch -k -1 --stdout >patch &&
grep ^Subject: patch >actual &&
test_cmp expect actual
[side 4e22b7a] header with . in it
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 97 - subject lines do not have 822 atom-quoting
expecting success:
git format-patch -n -1 --stdout --subject-prefix=PREFIX >patch &&
grep ^Subject: patch >actual &&
test_cmp expect actual
ok 98 - subject prefixes have space prepended
expecting success:
git format-patch -n -1 --stdout --subject-prefix= >patch &&
grep ^Subject: patch >actual &&
test_cmp expect actual
ok 99 - empty subject prefix does not have extra space
expecting success:
cat >expect <<-\EOF &&
Subject: [RFC PATCH 1/1] header with . in it
EOF
git format-patch -n -1 --stdout --rfc >patch &&
grep ^Subject: patch >actual &&
test_cmp expect actual
ok 100 - --rfc
expecting success:
test_must_fail git format-patch -1 --stdout --from=foo >patch
fatal: invalid ident line: foo
ok 101 - --from=ident notices bogus ident
expecting success:
git format-patch -1 --stdout --from="Me <me@example.com>" >patch &&
cat >expect <<-\EOF &&
From: Me <me@example.com>
From: A U Thor <author@example.com>
EOF
sed -ne "/^From:/p; /^$/p; /^---$/q" <patch >patch.head &&
test_cmp expect patch.head
ok 102 - --from=ident replaces author
expecting success:
git format-patch -1 --stdout --from >patch &&
cat >expect <<-\EOF &&
From: C O Mitter <committer@example.com>
From: A U Thor <author@example.com>
EOF
sed -ne "/^From:/p; /^$/p; /^---$/q" <patch >patch.head &&
test_cmp expect patch.head
ok 103 - --from uses committer ident
expecting success:
git format-patch -1 --stdout --from="A U Thor <author@example.com>" >patch &&
cat >expect <<-\EOF &&
From: A U Thor <author@example.com>
EOF
sed -ne "/^From:/p; /^$/p; /^---$/q" <patch >patch.head &&
test_cmp expect patch.head
ok 104 - --from omits redundant in-body header
expecting success:
test_env GIT_AUTHOR_NAME="éxötìc" test_commit exotic &&
test_when_finished "git reset --hard HEAD^" &&
git format-patch -1 --stdout --from >patch &&
cat >expect <<-\EOF &&
From: C O Mitter <committer@example.com>
Content-Type: text/plain; charset=UTF-8
From: éxötìc <author@example.com>
EOF
sed -ne "/^From:/p; /^$/p; /^Content-Type/p; /^---$/q" <patch >patch.head &&
test_cmp expect patch.head
[side 9482031] exotic
Author: éxötìc <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 exotic.t
HEAD is now at 4e22b7a header with . in it
ok 105 - in-body headers trigger content encoding
expecting success:
append_signoff </dev/null >actual &&
cat <<\EOF | sed "s/EOL$//" >expected &&
4:Subject: [PATCH] EOL
8:
9:Signed-off-by: C O Mitter <committer@example.com>
EOF
test_cmp expected actual
ok 106 - signoff: commit with no body
expecting success:
echo subject | append_signoff >actual &&
cat >expected <<\EOF &&
4:Subject: [PATCH] subject
8:
9:Signed-off-by: C O Mitter <committer@example.com>
EOF
test_cmp expected actual
ok 107 - signoff: commit with only subject
expecting success:
printf subject | append_signoff >actual &&
cat >expected <<\EOF &&
4:Subject: [PATCH] subject
8:
9:Signed-off-by: C O Mitter <committer@example.com>
EOF
test_cmp expected actual
ok 108 - signoff: commit with only subject that does not end with NL
expecting success:
append_signoff <<\EOF >actual &&
subject
body
EOF
cat >expected <<\EOF &&
4:Subject: [PATCH] subject
8:
10:
11:Signed-off-by: C O Mitter <committer@example.com>
EOF
test_cmp expected actual
ok 109 - signoff: no existing signoffs
expecting success:
printf "subject\n\nbody" | append_signoff >actual &&
cat >expected <<\EOF &&
4:Subject: [PATCH] subject
8:
10:
11:Signed-off-by: C O Mitter <committer@example.com>
EOF
test_cmp expected actual
ok 110 - signoff: no existing signoffs and no trailing NL
expecting success:
append_signoff <<\EOF >actual &&
subject
body
Signed-off-by: my@house
EOF
cat >expected <<\EOF &&
4:Subject: [PATCH] subject
8:
10:
11:Signed-off-by: my@house
12:Signed-off-by: C O Mitter <committer@example.com>
EOF
test_cmp expected actual
ok 111 - signoff: some random signoff
expecting success:
append_signoff <<\EOF >actual &&
subject
body
Signed-off-by: my@house
(cherry picked from commit da39a3ee5e6b4b0d3255bfef95601890afd80709)
Tested-by: Some One <someone@example.com>
Bug: 1234
EOF
cat >expected <<\EOF &&
4:Subject: [PATCH] subject
8:
10:
11:Signed-off-by: my@house
15:Signed-off-by: C O Mitter <committer@example.com>
EOF
test_cmp expected actual
ok 112 - signoff: misc conforming footer elements
expecting success:
append_signoff <<\EOF >actual &&
subject
body
Fooled-by-me: my@house
EOF
cat >expected <<\EOF &&
4:Subject: [PATCH] subject
8:
11:
12:Signed-off-by: C O Mitter <committer@example.com>
EOF
test_cmp expected actual
ok 113 - signoff: some random signoff-alike
expecting success:
append_signoff <<\EOF >actual &&
subject
I want to mention about Signed-off-by: here.
EOF
cat >expected <<\EOF &&
4:Subject: [PATCH] subject
8:
9:I want to mention about Signed-off-by: here.
10:
11:Signed-off-by: C O Mitter <committer@example.com>
EOF
test_cmp expected actual
ok 114 - signoff: not really a signoff
expecting success:
append_signoff <<\EOF >actual &&
subject
My unfortunate
Signed-off-by: example happens to be wrapped here.
EOF
cat >expected <<\EOF &&
4:Subject: [PATCH] subject
8:
10:Signed-off-by: example happens to be wrapped here.
11:Signed-off-by: C O Mitter <committer@example.com>
EOF
test_cmp expected actual
ok 115 - signoff: not really a signoff (2)
expecting success:
append_signoff <<\EOF >actual &&
subject
Signed-off-by: my@house
Signed-off-by: your@house
A lot of houses.
EOF
cat >expected <<\EOF &&
4:Subject: [PATCH] subject
8:
9:Signed-off-by: my@house
10:Signed-off-by: your@house
11:
13:
14:Signed-off-by: C O Mitter <committer@example.com>
EOF
test_cmp expected actual
ok 116 - signoff: valid S-o-b paragraph in the middle
expecting success:
append_signoff <<\EOF >actual &&
subject
body
Signed-off-by: C O Mitter <committer@example.com>
EOF
cat >expected <<\EOF &&
4:Subject: [PATCH] subject
8:
10:
11:Signed-off-by: C O Mitter <committer@example.com>
EOF
test_cmp expected actual
ok 117 - signoff: the same signoff at the end
expecting success:
printf "subject\n\nSigned-off-by: C O Mitter <committer@example.com>" |
append_signoff >actual &&
cat >expected <<\EOF &&
4:Subject: [PATCH] subject
8:
9:Signed-off-by: C O Mitter <committer@example.com>
EOF
test_cmp expected actual
ok 118 - signoff: the same signoff at the end, no trailing NL
expecting success:
append_signoff <<\EOF >actual &&
subject
body
Signed-off-by: C O Mitter <committer@example.com>
Signed-off-by: my@house
EOF
cat >expected <<\EOF &&
4:Subject: [PATCH] subject
8:
10:
11:Signed-off-by: C O Mitter <committer@example.com>
12:Signed-off-by: my@house
EOF
test_cmp expected actual
ok 119 - signoff: the same signoff NOT at the end
expecting success:
append_signoff <<\EOF >actual &&
subject
body
Tested-by: my@house
Some Trash
Signed-off-by: C O Mitter <committer@example.com>
EOF
cat >expected <<\EOF &&
4:Subject: [PATCH] subject
8:
10:
13:Signed-off-by: C O Mitter <committer@example.com>
EOF
test_cmp expected actual
ok 120 - signoff: tolerate garbage in conforming footer
expecting success:
append_signoff <<\EOF >actual &&
subject
Myfooter: x
Some Trash
EOF
cat >expected <<\EOF &&
4:Subject: [PATCH] subject
8:
11:
12:Signed-off-by: C O Mitter <committer@example.com>
EOF
test_cmp expected actual &&
test_config trailer.Myfooter.ifexists add &&
append_signoff <<\EOF >actual &&
subject
Myfooter: x
Some Trash
EOF
cat >expected <<\EOF &&
4:Subject: [PATCH] subject
8:
11:Signed-off-by: C O Mitter <committer@example.com>
EOF
test_cmp expected actual
ok 121 - signoff: respect trailer config
expecting success:
append_signoff <<\EOF >actual &&
subject
body
Reviewed-id: Noone
Tested-by: my@house
Change-id: Ideadbeef
Signed-off-by: C O Mitter <committer@example.com>
Bug: 1234
EOF
cat >expected <<\EOF &&
4:Subject: [PATCH] subject
8:
10:
14:Signed-off-by: C O Mitter <committer@example.com>
EOF
test_cmp expected actual
ok 122 - signoff: footer begins with non-signoff without @ sign
expecting success:
test_unconfig color.ui &&
git format-patch --stdout -1 >expect &&
test_config color.ui always &&
git format-patch --stdout -1 >actual &&
test_cmp expect actual
ok 123 - format patch ignores color.ui
expecting success:
git checkout rebuild-1 &&
test_config branch.rebuild-1.description hello &&
git format-patch --stdout --cover-letter master >actual &&
grep hello actual >/dev/null
Switched to branch 'rebuild-1'
ok 124 - cover letter using branch description (1)
expecting success:
git checkout rebuild-1 &&
test_config branch.rebuild-1.description hello &&
git format-patch --stdout --cover-letter rebuild-1~2..rebuild-1 >actual &&
grep hello actual >/dev/null
Already on 'rebuild-1'
ok 125 - cover letter using branch description (2)
expecting success:
git checkout rebuild-1 &&
test_config branch.rebuild-1.description hello &&
git format-patch --stdout --cover-letter ^master rebuild-1 >actual &&
grep hello actual >/dev/null
Already on 'rebuild-1'
ok 126 - cover letter using branch description (3)
expecting success:
git checkout rebuild-1 &&
test_config branch.rebuild-1.description hello &&
git format-patch --stdout --cover-letter master.. >actual &&
grep hello actual >/dev/null
Already on 'rebuild-1'
ok 127 - cover letter using branch description (4)
expecting success:
git checkout rebuild-1 &&
test_config branch.rebuild-1.description hello &&
git format-patch --stdout --cover-letter -2 HEAD >actual &&
grep hello actual >/dev/null
Already on 'rebuild-1'
ok 128 - cover letter using branch description (5)
expecting success:
git checkout rebuild-1 &&
test_config branch.rebuild-1.description hello &&
git format-patch --stdout --cover-letter -2 >actual &&
grep hello actual >/dev/null
Already on 'rebuild-1'
ok 129 - cover letter using branch description (6)
expecting success:
git format-patch --stdout --cover-letter >actual &&
test_line_count = 0 actual
ok 130 - cover letter with nothing
expecting success:
mkdir -p tmp &&
test_when_finished "rm -rf tmp;
git config --unset format.coverletter" &&
git config format.coverletter auto &&
git format-patch -o tmp -1 >list &&
test_line_count = 1 list &&
git format-patch -o tmp -2 >list &&
test_line_count = 3 list
ok 131 - cover letter auto
expecting success:
mkdir -p tmp &&
test_when_finished "rm -rf tmp;
git config --unset format.coverletter" &&
git config format.coverletter auto &&
git format-patch -o tmp --cover-letter -1 >list &&
test_line_count = 2 list &&
git format-patch -o tmp --cover-letter -2 >list &&
test_line_count = 3 list &&
git format-patch -o tmp --no-cover-letter -1 >list &&
test_line_count = 1 list &&
git format-patch -o tmp --no-cover-letter -2 >list &&
test_line_count = 2 list
ok 132 - cover letter auto user override
expecting success:
git format-patch --zero-commit --stdout v2..v1 >patch2 &&
grep "^From " patch2 | sort | uniq >actual &&
echo "From $ZERO_OID Mon Sep 17 00:00:00 2001" >expect &&
test_cmp expect actual
ok 133 - format-patch --zero-commit
expecting success:
git format-patch --stdout v2..v1 >patch2 &&
grep "^From " patch2 >from &&
grep "^From $OID_REGEX Mon Sep 17 00:00:00 2001$" patch2 >filtered &&
test_cmp from filtered
ok 134 - From line has expected format
expecting success:
test_config format.outputDirectory patches &&
rm -fr patches &&
git format-patch master..side &&
test $(git rev-list master..side | wc -l) -eq $(ls patches | wc -l)
patches/0001-Side-changes-1.patch
patches/0002-Side-changes-2.patch
patches/0003-Side-changes-3-with-n-backslash-n-in-it.patch
patches/0004-This-is-an-excessively-long-subject-line-for-a-messa.patch
patches/0005-foo.patch
patches/0006-one.patch
patches/0007-en.patch
patches/0008-foo-bar-foo-bar-foo-bar-foo-bar-foo-bar-foo-bar-foo-.patch
patches/0009-f-bar-f-bar-f-bar-f-bar-f-bar-f-bar-f-bar-f-bar-f-ba.patch
patches/0010-author-check.patch
patches/0011-author-check.patch
patches/0012-author-check.patch
patches/0013-author-check.patch
patches/0014-author-check.patch
patches/0015-author-check.patch
patches/0016-author-check.patch
patches/0017-author-check.patch
patches/0018-header-with-.-in-it.patch
ok 135 - format-patch format.outputDirectory option
expecting success:
test_config format.outputDirectory patches &&
rm -fr patches patchset &&
git format-patch master..side -o patchset &&
test_path_is_missing patches &&
test_path_is_dir patchset
patchset/0001-Side-changes-1.patch
patchset/0002-Side-changes-2.patch
patchset/0003-Side-changes-3-with-n-backslash-n-in-it.patch
patchset/0004-This-is-an-excessively-long-subject-line-for-a-messa.patch
patchset/0005-foo.patch
patchset/0006-one.patch
patchset/0007-en.patch
patchset/0008-foo-bar-foo-bar-foo-bar-foo-bar-foo-bar-foo-bar-foo-.patch
patchset/0009-f-bar-f-bar-f-bar-f-bar-f-bar-f-bar-f-bar-f-bar-f-ba.patch
patchset/0010-author-check.patch
patchset/0011-author-check.patch
patchset/0012-author-check.patch
patchset/0013-author-check.patch
patchset/0014-author-check.patch
patchset/0015-author-check.patch
patchset/0016-author-check.patch
patchset/0017-author-check.patch
patchset/0018-header-with-.-in-it.patch
ok 136 - format-patch -o overrides format.outputDirectory
expecting success:
git checkout patchid &&
git format-patch --stdout --base=HEAD~3 -1 | tail -n 7 >actual1 &&
git format-patch --stdout --base=HEAD~3 HEAD~.. | tail -n 7 >actual2 &&
echo >expected &&
echo "base-commit: $(git rev-parse HEAD~3)" >>expected &&
echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --stable | awk "{print \$1}")" >>expected &&
echo "prerequisite-patch-id: $(git show --patch HEAD~1 | git patch-id --stable | awk "{print \$1}")" >>expected &&
signature >> expected &&
test_cmp expected actual1 &&
test_cmp expected actual2 &&
echo >fail &&
echo "base-commit: $(git rev-parse HEAD~3)" >>fail &&
echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --unstable | awk "{print \$1}")" >>fail &&
echo "prerequisite-patch-id: $(git show --patch HEAD~1 | git patch-id --unstable | awk "{print \$1}")" >>fail &&
signature >> fail &&
! test_cmp fail actual1 &&
! test_cmp fail actual2
Switched to branch 'patchid'
--- fail 2019-08-14 07:29:00.948349368 +0000
+++ actual1 2019-08-14 07:29:00.768347204 +0000
@@ -1,7 +1,7 @@
base-commit: 18ed22aae56367787c36a882bd61281e07994f11
-prerequisite-patch-id: 28427b5266de797837da09880f31c6774f1acddd
-prerequisite-patch-id: e6bf335459a53de8c1f2e3f7fcfa7f52b48e8a34
+prerequisite-patch-id: f7afebea9c46bbd99ee80c7d77c4ea784d8c29e4
+prerequisite-patch-id: 2617b88e9c5376b5aa36597467a68844063a7501
--
2.23.0.rc1
--- fail 2019-08-14 07:29:00.948349368 +0000
+++ actual2 2019-08-14 07:29:00.800347589 +0000
@@ -1,7 +1,7 @@
base-commit: 18ed22aae56367787c36a882bd61281e07994f11
-prerequisite-patch-id: 28427b5266de797837da09880f31c6774f1acddd
-prerequisite-patch-id: e6bf335459a53de8c1f2e3f7fcfa7f52b48e8a34
+prerequisite-patch-id: f7afebea9c46bbd99ee80c7d77c4ea784d8c29e4
+prerequisite-patch-id: 2617b88e9c5376b5aa36597467a68844063a7501
--
2.23.0.rc1
ok 137 - format-patch --base
expecting success:
test_must_fail git format-patch --base=HEAD -2 &&
test_must_fail git format-patch --base=HEAD~1 -2 &&
git format-patch --stdout --base=HEAD~2 -2 >patch &&
grep "^base-commit:" patch >actual &&
echo "base-commit: $(git rev-parse HEAD~2)" >expected &&
test_cmp expected actual
fatal: base commit should be the ancestor of revision list
fatal: base commit shouldn't be in revision list
ok 138 - format-patch --base errors out when base commit is in revision list
expecting success:
# For history as below:
#
# ---Q---P---Z---Y---*---X
# \ /
# ------------W
#
# If "format-patch Z..X" is given, P and Z can not be specified as the base commit
git checkout -b topic1 master &&
git rev-parse HEAD >commit-id-base &&
test_commit P &&
git rev-parse HEAD >commit-id-P &&
test_commit Z &&
git rev-parse HEAD >commit-id-Z &&
test_commit Y &&
git checkout -b topic2 master &&
test_commit W &&
git merge topic1 &&
test_commit X &&
test_must_fail git format-patch --base=$(cat commit-id-P) -3 &&
test_must_fail git format-patch --base=$(cat commit-id-Z) -3 &&
git format-patch --stdout --base=$(cat commit-id-base) -3 >patch &&
grep "^base-commit:" patch >actual &&
echo "base-commit: $(cat commit-id-base)" >expected &&
test_cmp expected actual
Switched to a new branch 'topic1'
[topic1 cfaba0a] P
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 P.t
[topic1 7501635] Z
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 Z.t
[topic1 7bd7585] Y
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 Y.t
Switched to a new branch 'topic2'
[topic2 54af1a4] W
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 W.t
Merging:
54af1a4 W
virtual topic1
found 1 common ancestor:
2e66419 Master accepts moral equivalent of #2
Merge made by the 'recursive' strategy.
P.t | 1 +
Y.t | 1 +
Z.t | 1 +
3 files changed, 3 insertions(+)
create mode 100644 P.t
create mode 100644 Y.t
create mode 100644 Z.t
[topic2 2f00461] X
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 X.t
fatal: base commit should be the ancestor of revision list
fatal: base commit should be the ancestor of revision list
ok 139 - format-patch --base errors out when base commit is not ancestor of revision list
expecting success:
git checkout -b upstream master &&
git checkout -b local upstream &&
git branch --set-upstream-to=upstream &&
test_commit N1 &&
test_commit N2 &&
git format-patch --stdout --base=auto -2 >patch &&
grep "^base-commit:" patch >actual &&
echo "base-commit: $(git rev-parse upstream)" >expected &&
test_cmp expected actual
Switched to a new branch 'upstream'
Switched to a new branch 'local'
Branch 'local' set up to track local branch 'upstream'.
[local db2df76] N1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 N1.t
[local bbb0441] N2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 N2.t
ok 140 - format-patch --base=auto
expecting success:
# setup criss-cross history
#
# B---M1---D
# / \ /
# A X
# \ / \
# C---M2---E
#
git checkout master &&
test_commit A &&
git checkout -b xb master &&
test_commit B &&
git checkout -b xc master &&
test_commit C &&
git checkout -b xbc xb -- &&
git merge xc &&
git checkout -b xcb xc -- &&
git branch --set-upstream-to=xbc &&
git merge xb &&
git checkout xbc &&
test_commit D &&
git checkout xcb &&
test_commit E &&
test_must_fail git format-patch --base=auto -1
Switched to branch 'master'
[master cd9c627] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
Switched to a new branch 'xb'
[xb 9645906] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B.t
Switched to a new branch 'xc'
[xc 3dd2cbc] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C.t
Switched to a new branch 'xbc'
Merging:
9645906 B
virtual xc
found 1 common ancestor:
cd9c627 A
Merge made by the 'recursive' strategy.
C.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 C.t
Switched to a new branch 'xcb'
Branch 'xcb' set up to track local branch 'xbc'.
Merging:
3dd2cbc C
virtual xb
found 1 common ancestor:
cd9c627 A
Merge made by the 'recursive' strategy.
B.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 B.t
Switched to branch 'xbc'
[xbc 9e095a8] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D.t
Switched to branch 'xcb'
Your branch and 'xbc' have diverged,
and have 1 and 2 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
[xcb 3dfd99d] E
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 E.t
fatal: could not find exact merge base
ok 141 - format-patch errors out when history involves criss-cross
expecting success:
test_when_finished "git config --unset format.useAutoBase" &&
git checkout local &&
git config format.useAutoBase true &&
git format-patch --stdout -1 >patch &&
grep "^base-commit:" patch >actual &&
echo "base-commit: $(git rev-parse upstream)" >expected &&
test_cmp expected actual
Switched to branch 'local'
Your branch is ahead of 'upstream' by 2 commits.
(use "git push" to publish your local commits)
ok 142 - format-patch format.useAutoBaseoption
expecting success:
test_when_finished "git config --unset format.useAutoBase" &&
git config format.useAutoBase true &&
git format-patch --stdout --base=HEAD~1 -1 >patch &&
grep "^base-commit:" patch >actual &&
echo "base-commit: $(git rev-parse HEAD~1)" >expected &&
test_cmp expected actual
ok 143 - format-patch --base overrides format.useAutoBase
expecting success:
git format-patch --attach=mimemime --stdout --base=HEAD~ -1 >patch &&
sed -n -e "/^base-commit:/s/.*/1/p" -e "/^---*mimemime--$/s/.*/2/p" \
patch >actual &&
test_write_lines 1 2 >expect &&
test_cmp expect actual
ok 144 - format-patch --base with --attach
expecting success:
test_when_finished "rm -fr patches" &&
git format-patch -o patches --cover-letter --attach=mimemime --base=HEAD~ -1 &&
! egrep "^--+mimemime" patches/0000*.patch &&
egrep "^--+mimemime$" patches/0001*.patch >output &&
test_line_count = 2 output &&
egrep "^--+mimemime--$" patches/0001*.patch >output &&
test_line_count = 1 output
patches/0000-cover-letter.patch
patches/0001-N2.patch
ok 145 - format-patch --attach cover-letter only is non-multipart
expecting success:
sp=" " &&
cat >msg <<-INPUT_END &&
mboxrd should escape the body
From could trip up a loose mbox parser
>From extra escape for reversibility
>>From extra escape for reversibility 2
from lower case not escaped
Fromm bad speling not escaped
From with leading space not escaped
F
From
From$sp
From $sp
From $sp
INPUT_END
cat >expect <<-INPUT_END &&
>From could trip up a loose mbox parser
>>From extra escape for reversibility
>>>From extra escape for reversibility 2
from lower case not escaped
Fromm bad speling not escaped
From with leading space not escaped
F
From
From
From
From
INPUT_END
C=$(git commit-tree HEAD^^{tree} -p HEAD <msg) &&
git format-patch --pretty=mboxrd --stdout -1 $C~1..$C >patch &&
git grep -h --no-index -A11 \
"^>From could trip up a loose mbox parser" patch >actual &&
test_cmp expect actual
ok 146 - format-patch --pretty=mboxrd
expecting success:
git checkout -b boop master &&
test_commit fnorp blorp &&
test_commit fleep blorp
Switched to a new branch 'boop'
[boop 83f0281] fnorp
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 blorp
[boop 65e3b4b] fleep
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 147 - interdiff: setup
expecting success:
sed "y/q/ /" >expect <<-\EOF &&
+fleep
--q
EOF
git format-patch --cover-letter --interdiff=boop~2 -1 boop &&
test_i18ngrep "^Interdiff:$" 0000-cover-letter.patch &&
test_i18ngrep ! "^Interdiff:$" 0001-fleep.patch &&
sed "1,/^@@ /d; /^-- $/q" <0000-cover-letter.patch >actual &&
test_cmp expect actual
0000-cover-letter.patch
0001-fleep.patch
Interdiff:
ok 148 - interdiff: cover-letter
expecting success:
git format-patch --cover-letter --interdiff=boop~2 -v2 -1 boop &&
test_i18ngrep "^Interdiff ..* v1:$" v2-0000-cover-letter.patch
v2-0000-cover-letter.patch
v2-0001-fleep.patch
Interdiff against v1:
ok 149 - interdiff: reroll-count
expecting success:
cat >expect <<-\EOF &&
+fleep
EOF
git format-patch --interdiff=boop~2 -1 boop &&
test_i18ngrep "^Interdiff:$" 0001-fleep.patch &&
sed "1,/^ @@ /d; /^$/q" <0001-fleep.patch >actual &&
test_cmp expect actual
0001-fleep.patch
Interdiff:
ok 150 - interdiff: solo-patch
# still have 5 known breakage(s)
# passed all remaining 145 test(s)
1..150
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4036-format-patch-signer-mime.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4036-format-patch-signer-mime/.git/
expecting success:
>F &&
git add F &&
git commit -m initial &&
echo new line >F &&
test_tick &&
git commit -m "This adds some lines to F" F
[master (root-commit) 390cd8c] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 F
[master df778fc] This adds some lines to F
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
git format-patch --stdout -1 >output &&
! grep Content-Type output
ok 2 - format normally
expecting success:
git format-patch -s --stdout -1 >output &&
! grep Content-Type output
ok 3 - format with signoff without funny signer name
expecting success:
GIT_COMMITTER_NAME="はまの ふにおう" \
git format-patch -s --stdout -1 >output &&
grep Content-Type output
Content-Type: text/plain; charset=UTF-8
ok 4 - format with non ASCII signer name
expecting success:
GIT_COMMITTER_NAME="はまの ふにおう" \
git format-patch -s --stdout -1 --attach >output &&
test $(grep -ci ^MIME-Version: output) = 1
ok 5 - attach and signoff do not duplicate mime headers
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4039-diff-assume-unchanged.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4039-diff-assume-unchanged/.git/
expecting success:
echo zero > zero &&
git add zero &&
git commit -m zero &&
echo one > one &&
echo two > two &&
git add one two &&
git commit -m onetwo &&
git update-index --assume-unchanged one &&
echo borked >> one &&
test "$(git ls-files -v one)" = "h one"
[master (root-commit) 496c455] zero
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 zero
[master a587359] onetwo
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 one
create mode 100644 two
ok 1 - setup
expecting success:
git diff-index HEAD^ -- one | grep -q 5626abf0f72e58d7a153368ba57db4c673c0e171
ok 2 - diff-index does not examine assume-unchanged entries
expecting success:
rm one &&
test -z "$(git diff-files -- one)"
ok 3 - diff-files does not examine assume-unchanged entries
expecting success:
echo content >exec &&
chmod +x exec &&
git add exec &&
git commit -m exec &&
git update-index --assume-unchanged exec &&
git diff-files --find-copies-harder -- exec >actual &&
test_must_be_empty actual
[master 1f97db0] exec
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100755 exec
ok 4 - find-copies-harder is not confused by mode bits
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4040-whitespace-status.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4040-whitespace-status/.git/
expecting success:
mkdir a b &&
echo >c &&
echo >a/d &&
echo >b/e &&
git add . &&
test_tick &&
git commit -m initial &&
echo " " >a/d &&
test_tick &&
git commit -a -m second &&
echo " " >a/d &&
echo " " >b/e &&
git add a/d
[master (root-commit) b80f2e3] initial
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 a/d
create mode 100644 b/e
create mode 100644 c
[master 13a0478] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
test_must_fail git diff --exit-code HEAD^ HEAD &&
test_must_fail git diff-tree --exit-code HEAD^ HEAD
diff --git a/a/d b/a/d
index 8b13789..8d1c8b6 100644
--- a/a/d
+++ b/a/d
@@ -1 +1 @@
-
+
:040000 040000 13061aad4970f02b314943ec46981e9ef332cae2 ac592974c686387705f2617b895d6585cc0a0d46 M a
ok 2 - diff-tree --exit-code
expecting success:
git diff -b --exit-code HEAD^ HEAD &&
git diff-tree -b -p --exit-code HEAD^ HEAD &&
git diff-tree -b --exit-code HEAD^ HEAD
:040000 040000 13061aad4970f02b314943ec46981e9ef332cae2 ac592974c686387705f2617b895d6585cc0a0d46 M a
ok 3 - diff-tree -b --exit-code
expecting success:
test_must_fail git diff --cached --exit-code HEAD &&
test_must_fail git diff-index --cached --exit-code HEAD
diff --git a/a/d b/a/d
index 8d1c8b6..1a4baf5 100644
--- a/a/d
+++ b/a/d
@@ -1 +1 @@
-
+
:100644 100644 8d1c8b69c3fce7bea45c73efd06983e3c419a92f 1a4baf536d705b9c814847cb7a708a0e63d5b976 M a/d
ok 4 - diff-index --cached --exit-code
expecting success:
git diff -b --cached --exit-code HEAD &&
git diff-index -b -p --cached --exit-code HEAD
ok 5 - diff-index -b -p --cached --exit-code
expecting success:
test_must_fail git diff --exit-code HEAD &&
test_must_fail git diff-index --exit-code HEAD
diff --git a/a/d b/a/d
index 8d1c8b6..1a4baf5 100644
--- a/a/d
+++ b/a/d
@@ -1 +1 @@
-
+
diff --git a/b/e b/b/e
index 8b13789..8d1c8b6 100644
--- a/b/e
+++ b/b/e
@@ -1 +1 @@
-
+
:100644 100644 8d1c8b69c3fce7bea45c73efd06983e3c419a92f 1a4baf536d705b9c814847cb7a708a0e63d5b976 M a/d
:100644 100644 8b137891791fe96927ad78e64b0aad7bded08bdc 0000000000000000000000000000000000000000 M b/e
ok 6 - diff-index --exit-code
expecting success:
git diff -b --exit-code HEAD &&
git diff-index -b -p --exit-code HEAD
ok 7 - diff-index -b -p --exit-code
expecting success:
test_must_fail git diff --exit-code &&
test_must_fail git diff-files --exit-code
diff --git a/b/e b/b/e
index 8b13789..8d1c8b6 100644
--- a/b/e
+++ b/b/e
@@ -1 +1 @@
-
+
:100644 100644 8b137891791fe96927ad78e64b0aad7bded08bdc 0000000000000000000000000000000000000000 M b/e
ok 8 - diff-files --exit-code
expecting success:
git diff -b --exit-code &&
git diff-files -b -p --exit-code
ok 9 - diff-files -b -p --exit-code
expecting success:
git reset --hard &&
rm a/d &&
echo x >>b/e &&
test_must_fail git diff-files --diff-filter=M --quiet
HEAD is now at 13a0478 second
ok 10 - diff-files --diff-filter --quiet
expecting success:
git commit -a -m "worktree state" &&
test_must_fail git diff-tree --diff-filter=M --quiet HEAD^ HEAD
[master c0a31dc] worktree state
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
delete mode 100644 a/d
ok 11 - diff-tree --diff-filter --quiet
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4034-diff-words.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4034-diff-words/.git/
expecting success:
git config diff.color.old red &&
git config diff.color.new green &&
git config diff.color.func magenta
ok 1 - setup
expecting success:
cp pre.simple pre &&
cp post.simple post
ok 2 - set up pre and post with runs of whitespace
expecting success:
cat >expect <<-\EOF &&
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index 330b04f..5ed8eff 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1,3 +1,7 @@<RESET>
<RED>h(4)<RESET><GREEN>h(4),hh[44]<RESET>
a = b + c<RESET>
<GREEN>aa = a<RESET>
<GREEN>aeff = aeff * ( aaa )<RESET>
EOF
word_diff --color-words &&
word_diff --word-diff=color &&
word_diff --color --word-diff=color
ok 3 - word diff with runs of whitespace
expecting success:
sed s/#.*$// >expect <<-\EOF &&
diff --git a/pre b/post
index 330b04f..5ed8eff 100644
--- a/pre
+++ b/post
@@ -1,3 +1,7 @@
-h(4)
+h(4),hh[44]
~
# significant space
~
a = b + c
~
~
+aa = a
~
~
+aeff = aeff * ( aaa )
~
EOF
word_diff --word-diff=porcelain
ok 4 - --word-diff=porcelain
expecting success:
cat >expect <<-\EOF &&
diff --git a/pre b/post
index 330b04f..5ed8eff 100644
--- a/pre
+++ b/post
@@ -1,3 +1,7 @@
[-h(4)-]{+h(4),hh[44]+}
a = b + c
{+aa = a+}
{+aeff = aeff * ( aaa )+}
EOF
word_diff --word-diff=plain &&
word_diff --word-diff=plain --no-color
ok 5 - --word-diff=plain
expecting success:
cat >expect <<-\EOF &&
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index 330b04f..5ed8eff 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1,3 +1,7 @@<RESET>
<RED>[-h(4)-]<RESET><GREEN>{+h(4),hh[44]+}<RESET>
a = b + c<RESET>
<GREEN>{+aa = a+}<RESET>
<GREEN>{+aeff = aeff * ( aaa )+}<RESET>
EOF
word_diff --word-diff=plain --color
ok 6 - --word-diff=plain --color
expecting success:
cat >expect <<-\EOF &&
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index 330b04f..5ed8eff 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1 +1 @@<RESET>
<RED>h(4)<RESET><GREEN>h(4),hh[44]<RESET>
<CYAN>@@ -3,0 +4,4 @@<RESET> <RESET><MAGENTA>a = b + c<RESET>
<GREEN>aa = a<RESET>
<GREEN>aeff = aeff * ( aaa )<RESET>
EOF
word_diff --color-words --unified=0
ok 7 - word diff without context
expecting success:
cp expect.letter-runs-are-words expect &&
word_diff --color-words="[a-z]+"
ok 8 - word diff with a regular expression
expecting success:
git config diff.testdriver.wordRegex "[^[:space:]]" &&
cat <<-\EOF >.gitattributes
pre diff=testdriver
post diff=testdriver
EOF
ok 9 - set up a diff driver
expecting success:
cp expect.letter-runs-are-words expect &&
word_diff --color-words="[a-z]+"
ok 10 - option overrides .gitattributes
expecting success:
cp expect.non-whitespace-is-word expect &&
word_diff --color-words
ok 11 - use regex supplied by driver
expecting success:
git config diff.wordRegex "[[:alnum:]]+"
ok 12 - set up diff.wordRegex option
expecting success:
cp expect.letter-runs-are-words expect &&
word_diff --color-words="[a-z]+"
ok 13 - command-line overrides config
expecting success:
cat >expect <<-\EOF &&
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index 330b04f..5ed8eff 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1,3 +1,7 @@<RESET>
h(4),<GREEN>{+hh+}<RESET>[44]
a = b + c<RESET>
<GREEN>{+aa = a+}<RESET>
<GREEN>{+aeff = aeff * ( aaa+}<RESET> )
EOF
word_diff --color --word-diff-regex="[a-z]+"
ok 14 - command-line overrides config: --word-diff-regex
expecting success:
cp expect.non-whitespace-is-word expect &&
word_diff --color-words
ok 15 - .gitattributes override config
expecting success:
test_unconfig diff.testdriver.wordRegex
ok 16 - setup: remove diff driver regex
expecting success:
cat >expect <<-\EOF &&
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index 330b04f..5ed8eff 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1,3 +1,7 @@<RESET>
h(4),<GREEN>hh[44<RESET>]
a = b + c<RESET>
<GREEN>aa = a<RESET>
<GREEN>aeff = aeff * ( aaa<RESET> )
EOF
word_diff --color-words
ok 17 - use configured regex
expecting success:
echo "aaa (aaa)" >pre &&
echo "aaa (aaa) aaa" >post &&
cat >expect <<-\EOF &&
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index c29453b..be22f37 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1 +1 @@<RESET>
aaa (aaa) <GREEN>aaa<RESET>
EOF
word_diff --color-words="a+"
ok 18 - test parsing words for newline
expecting success:
echo "(:" >pre &&
echo "(" >post &&
cat >expect <<-\EOF &&
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index 289cb9d..2d06f37 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1 +1 @@<RESET>
(<RED>:<RESET>
EOF
word_diff --color-words=.
ok 19 - test when words are only removed at the end
expecting success:
echo "(:" >pre &&
echo "(" >post &&
cat >expect <<-\EOF &&
diff --git a/pre b/post
index 289cb9d..2d06f37 100644
--- a/pre
+++ b/post
@@ -1 +1 @@
-(:
+(
EOF
word_diff --word-diff=plain --word-diff=none
ok 20 - --word-diff=none
expecting success:
test_unconfig diff.wordregex
ok 21 - unset default driver
expecting success:
cp "$TEST_DIRECTORY/t4034/ada/pre" \
"$TEST_DIRECTORY/t4034/ada/post" \
"$TEST_DIRECTORY/t4034/ada/expect" . &&
echo "* diff=ada" >.gitattributes &&
word_diff --color-words
ok 22 - diff driver 'ada'
expecting success:
cp "$TEST_DIRECTORY/t4034/bibtex/pre" \
"$TEST_DIRECTORY/t4034/bibtex/post" \
"$TEST_DIRECTORY/t4034/bibtex/expect" . &&
echo "* diff=bibtex" >.gitattributes &&
word_diff --color-words
ok 23 - diff driver 'bibtex'
expecting success:
cp "$TEST_DIRECTORY/t4034/cpp/pre" \
"$TEST_DIRECTORY/t4034/cpp/post" \
"$TEST_DIRECTORY/t4034/cpp/expect" . &&
echo "* diff=cpp" >.gitattributes &&
word_diff --color-words
ok 24 - diff driver 'cpp'
expecting success:
cp "$TEST_DIRECTORY/t4034/csharp/pre" \
"$TEST_DIRECTORY/t4034/csharp/post" \
"$TEST_DIRECTORY/t4034/csharp/expect" . &&
echo "* diff=csharp" >.gitattributes &&
word_diff --color-words
ok 25 - diff driver 'csharp'
expecting success:
cp "$TEST_DIRECTORY/t4034/css/pre" \
"$TEST_DIRECTORY/t4034/css/post" \
"$TEST_DIRECTORY/t4034/css/expect" . &&
echo "* diff=css" >.gitattributes &&
word_diff --color-words
ok 26 - diff driver 'css'
expecting success:
cp "$TEST_DIRECTORY/t4034/fortran/pre" \
"$TEST_DIRECTORY/t4034/fortran/post" \
"$TEST_DIRECTORY/t4034/fortran/expect" . &&
echo "* diff=fortran" >.gitattributes &&
word_diff --color-words
ok 27 - diff driver 'fortran'
expecting success:
cp "$TEST_DIRECTORY/t4034/html/pre" \
"$TEST_DIRECTORY/t4034/html/post" \
"$TEST_DIRECTORY/t4034/html/expect" . &&
echo "* diff=html" >.gitattributes &&
word_diff --color-words
ok 28 - diff driver 'html'
expecting success:
cp "$TEST_DIRECTORY/t4034/java/pre" \
"$TEST_DIRECTORY/t4034/java/post" \
"$TEST_DIRECTORY/t4034/java/expect" . &&
echo "* diff=java" >.gitattributes &&
word_diff --color-words
ok 29 - diff driver 'java'
expecting success:
cp "$TEST_DIRECTORY/t4034/matlab/pre" \
"$TEST_DIRECTORY/t4034/matlab/post" \
"$TEST_DIRECTORY/t4034/matlab/expect" . &&
echo "* diff=matlab" >.gitattributes &&
word_diff --color-words
ok 30 - diff driver 'matlab'
expecting success:
cp "$TEST_DIRECTORY/t4034/objc/pre" \
"$TEST_DIRECTORY/t4034/objc/post" \
"$TEST_DIRECTORY/t4034/objc/expect" . &&
echo "* diff=objc" >.gitattributes &&
word_diff --color-words
ok 31 - diff driver 'objc'
expecting success:
cp "$TEST_DIRECTORY/t4034/pascal/pre" \
"$TEST_DIRECTORY/t4034/pascal/post" \
"$TEST_DIRECTORY/t4034/pascal/expect" . &&
echo "* diff=pascal" >.gitattributes &&
word_diff --color-words
ok 32 - diff driver 'pascal'
expecting success:
cp "$TEST_DIRECTORY/t4034/perl/pre" \
"$TEST_DIRECTORY/t4034/perl/post" \
"$TEST_DIRECTORY/t4034/perl/expect" . &&
echo "* diff=perl" >.gitattributes &&
word_diff --color-words
ok 33 - diff driver 'perl'
expecting success:
cp "$TEST_DIRECTORY/t4034/php/pre" \
"$TEST_DIRECTORY/t4034/php/post" \
"$TEST_DIRECTORY/t4034/php/expect" . &&
echo "* diff=php" >.gitattributes &&
word_diff --color-words
ok 34 - diff driver 'php'
expecting success:
cp "$TEST_DIRECTORY/t4034/python/pre" \
"$TEST_DIRECTORY/t4034/python/post" \
"$TEST_DIRECTORY/t4034/python/expect" . &&
echo "* diff=python" >.gitattributes &&
word_diff --color-words
ok 35 - diff driver 'python'
expecting success:
cp "$TEST_DIRECTORY/t4034/ruby/pre" \
"$TEST_DIRECTORY/t4034/ruby/post" \
"$TEST_DIRECTORY/t4034/ruby/expect" . &&
echo "* diff=ruby" >.gitattributes &&
word_diff --color-words
ok 36 - diff driver 'ruby'
expecting success:
cp "$TEST_DIRECTORY/t4034/tex/pre" \
"$TEST_DIRECTORY/t4034/tex/post" \
"$TEST_DIRECTORY/t4034/tex/expect" . &&
echo "* diff=tex" >.gitattributes &&
word_diff --color-words
ok 37 - diff driver 'tex'
expecting success:
cat >expect <<-\EOF &&
diff --git a/pre b/post
index a1a53b5..bc8fe6d 100644
--- a/pre
+++ b/post
@@ -1,3 +1,3 @@
a
[-b-]{+c+}
EOF
cat >pre <<-\EOF &&
a
b
EOF
cat >post <<-\EOF &&
a
c
EOF
test_config diff.suppress-blank-empty true &&
word_diff --word-diff=plain
ok 38 - word-diff with diff.sbe
expecting success:
cat >expect <<-\EOF &&
diff --git a/pre b/post
index 7bf316e..3dd0303 100644
--- a/pre
+++ b/post
@@ -1 +1 @@
a a [-a-]{+ab+} a a
EOF
printf "%s" "a a a a a" >pre &&
printf "%s" "a a ab a a" >post &&
word_diff --word-diff=plain
ok 39 - word-diff with no newline at EOF
expecting success:
echo "a b; c" >a.tex &&
echo "a b; c" >z.txt &&
git add a.tex z.txt &&
git commit -minitial &&
# modify both
echo "a bx; c" >a.tex &&
echo "a bx; c" >z.txt &&
git commit -mmodified -a
[master (root-commit) e7d7362] initial
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 a.tex
create mode 100644 z.txt
[master 7185f5d] modified
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
ok 40 - setup history with two files
expecting success:
echo "*.tex diff=tex" >.gitattributes &&
test_config diff.tex.wordRegex "[a-z]+|." &&
cat >expect <<-\EOF &&
diff --git a/a.tex b/a.tex
--- a/a.tex
+++ b/a.tex
@@ -1 +1 @@
a [-b-]{+bx+}; c
diff --git a/z.txt b/z.txt
--- a/z.txt
+++ b/z.txt
@@ -1 +1 @@
a [-b;-]{+bx;+} c
EOF
git diff --word-diff HEAD~ >actual &&
compare_diff_patch expect actual
ok 41 - wordRegex for the first file does not apply to the second
# passed all 41 test(s)
1..41
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4043-diff-rename-binary.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4043-diff-rename-binary/.git/
expecting success:
git init &&
echo foo > foo &&
echo "barQ" | q_to_nul > bar &&
git add . &&
git commit -m "Initial commit"
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4043-diff-rename-binary/.git/
[master (root-commit) 3ebd3b6] Initial commit
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 100644 bar
create mode 100644 foo
ok 1 - prepare repository
expecting success:
mkdir sub &&
git mv bar foo sub/ &&
git commit -m "Moved to sub/"
[master 892265a] Moved to sub/
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename bar => sub/bar (100%)
rename foo => sub/foo (100%)
ok 2 - move the files into a "sub" directory
expecting success:
git show -C -C --raw --binary --numstat >patch-with-stat &&
tail -n 11 patch-with-stat >current &&
test_cmp expected current
ok 3 - git show -C -C report renames
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4044-diff-index-unique-abbrev.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4044-diff-index-unique-abbrev/.git/
checking prerequisite: SHA1
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test $(git hash-object /dev/null) = e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
)
prerequisite SHA1 ok
expecting success:
echo 4827 > foo &&
git add foo &&
git commit -m "initial" &&
git cat-file -p HEAD: > actual &&
test_cmp expect_initial actual &&
echo 11742 > foo &&
git commit -a -m "update" &&
git cat-file -p HEAD: > actual &&
test_cmp expect_update actual
[master (root-commit) 628a4ba] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
[master fad540b] update
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
git diff HEAD^..HEAD | grep index > actual &&
test_cmp expect actual
ok 2 - diff does not produce ambiguous index line
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4042-diff-textconv-caching.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4042-diff-textconv-caching/.git/
expecting success:
echo foo content 1 >foo.bin &&
echo bar content 1 >bar.bin &&
git add . &&
git commit -m one &&
foo1=$(git rev-parse --short HEAD:foo.bin) &&
bar1=$(git rev-parse --short HEAD:bar.bin) &&
echo foo content 2 >foo.bin &&
echo bar content 2 >bar.bin &&
git commit -a -m two &&
foo2=$(git rev-parse --short HEAD:foo.bin) &&
bar2=$(git rev-parse --short HEAD:bar.bin) &&
echo "*.bin diff=magic" >.gitattributes &&
git config diff.magic.textconv ./helper &&
git config diff.magic.cachetextconv true
[master (root-commit) 30eec52] one
Author: A U Thor <author@example.com>
3 files changed, 5 insertions(+)
create mode 100644 bar.bin
create mode 100644 foo.bin
create mode 100755 helper
[master 886851c] two
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
ok 1 - setup
expecting success:
git diff HEAD^ HEAD >actual &&
test_cmp expect actual
ok 2 - first textconv works
expecting success:
git diff HEAD^ HEAD >actual &&
test_cmp expect actual
ok 3 - cached textconv produces same output
expecting success:
rm -f helper.out &&
git diff HEAD^ HEAD >actual &&
test_cmp expect actual &&
! test -r helper.out
ok 4 - cached textconv does not run helper
expecting success:
echo other >other &&
git config diff.magic.textconv "./helper other" &&
git diff HEAD^ HEAD >actual &&
test_cmp expect actual
ok 5 - changing textconv invalidates cache
expecting success:
git config diff.moremagic.textconv ./helper &&
echo foo.bin diff=moremagic >>.gitattributes &&
git diff HEAD^ HEAD >actual &&
test_cmp expect actual
ok 6 - switching diff driver produces correct results
expecting success:
git log --no-walk -p refs/notes/textconv/magic HEAD
commit 0a0329e3f459145623713d0c1cb385c36caebb5e
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:29:04 2019 +0000
./helper other
diff --git a/1345db2c9189a61ef9932f66b656afc986bee58f b/1345db2c9189a61ef9932f66b656afc986bee58f
new file mode 100644
index 0000000..01b25c5
--- /dev/null
+++ b/1345db2c9189a61ef9932f66b656afc986bee58f
@@ -0,0 +1,2 @@
+converted: other
+converted: foo content 2
diff --git a/28283d51eeb71548ff81d02404b90103b494b983 b/28283d51eeb71548ff81d02404b90103b494b983
new file mode 100644
index 0000000..dcd63a4
--- /dev/null
+++ b/28283d51eeb71548ff81d02404b90103b494b983
@@ -0,0 +1,2 @@
+converted: other
+converted: bar content 2
diff --git a/d5b9fe314e6004caf906e730045d20689167b3fb b/d5b9fe314e6004caf906e730045d20689167b3fb
new file mode 100644
index 0000000..7ef0353
--- /dev/null
+++ b/d5b9fe314e6004caf906e730045d20689167b3fb
@@ -0,0 +1,2 @@
+converted: other
+converted: foo content 1
diff --git a/fcf91668044fda4a569b9374589b26dada7adc49 b/fcf91668044fda4a569b9374589b26dada7adc49
new file mode 100644
index 0000000..5ead606
--- /dev/null
+++ b/fcf91668044fda4a569b9374589b26dada7adc49
@@ -0,0 +1,2 @@
+converted: other
+converted: bar content 1
commit 886851c5320cf10587cbc601cdf29de319090a9b
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:29:04 2019 +0000
two
diff --git a/bar.bin b/bar.bin
index fcf9166..28283d5 100644
--- a/bar.bin
+++ b/bar.bin
@@ -1,2 +1,2 @@
converted: other
-converted: bar content 1
+converted: bar content 2
diff --git a/foo.bin b/foo.bin
index d5b9fe3..1345db2 100644
--- a/foo.bin
+++ b/foo.bin
@@ -1 +1 @@
-converted: foo content 1
+converted: foo content 2
ok 7 - log notes cache and still use cache for -p
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4046-diff-unmerged.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4046-diff-unmerged/.git/
expecting success:
for i in 0 1 2 3
do
blob=$(echo $i | git hash-object --stdin) &&
eval "blob$i=$blob" &&
eval "m$i=\"100644 \$blob$i $i\"" || return 1
done &&
paths= &&
for b in o x
do
for o in o x
do
for t in o x
do
path="$b$o$t" &&
case "$path" in ooo) continue ;; esac
paths="$paths$path " &&
p=" $path" &&
case "$b" in x) echo "$m1$p" ;; esac &&
case "$o" in x) echo "$m2$p" ;; esac &&
case "$t" in x) echo "$m3$p" ;; esac ||
return 1
done
done
done >ls-files-s.expect &&
git update-index --index-info <ls-files-s.expect &&
git ls-files -s >ls-files-s.actual &&
test_cmp ls-files-s.expect ls-files-s.actual
ok 1 - setup
expecting success:
for path in $paths
do
>"$path" &&
echo ":000000 100644 $ZERO_OID $ZERO_OID U $path"
done >diff-files-0.expect &&
git diff-files -0 >diff-files-0.actual &&
test_cmp diff-files-0.expect diff-files-0.actual
ok 2 - diff-files -0
expecting success:
for path in $paths
do
>"$path" &&
echo ":000000 100644 $ZERO_OID $ZERO_OID U $path" &&
case "$path" in
x??) echo ":100644 100644 $blob1 $ZERO_OID M $path"
esac
done >diff-files-1.expect &&
git diff-files -1 >diff-files-1.actual &&
test_cmp diff-files-1.expect diff-files-1.actual
ok 3 - diff-files -1
expecting success:
for path in $paths
do
>"$path" &&
echo ":000000 100644 $ZERO_OID $ZERO_OID U $path" &&
case "$path" in
?x?) echo ":100644 100644 $blob2 $ZERO_OID M $path"
esac
done >diff-files-2.expect &&
git diff-files -2 >diff-files-2.actual &&
test_cmp diff-files-2.expect diff-files-2.actual &&
git diff-files >diff-files-default-2.actual &&
test_cmp diff-files-2.expect diff-files-default-2.actual
ok 4 - diff-files -2
expecting success:
for path in $paths
do
>"$path" &&
echo ":000000 100644 $ZERO_OID $ZERO_OID U $path" &&
case "$path" in
??x) echo ":100644 100644 $blob3 $ZERO_OID M $path"
esac
done >diff-files-3.expect &&
git diff-files -3 >diff-files-3.actual &&
test_cmp diff-files-3.expect diff-files-3.actual
ok 5 - diff-files -3
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4045-diff-relative.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4045-diff-relative/.git/
expecting success:
git commit --allow-empty -m empty &&
echo content >file1 &&
mkdir subdir &&
echo other content >subdir/file2 &&
blob=$(git hash-object subdir/file2) &&
git add . &&
git commit -m one
[master (root-commit) 260e39b] empty
Author: A U Thor <author@example.com>
[master 3a34f42] one
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 file1
create mode 100644 subdir/file2
ok 1 - setup
expecting success:
git -C '.' diff -p --relative=subdir/ HEAD^ >actual &&
test_cmp expected actual
ok 2 - -p --relative=subdir/
expecting success:
git -C '.' diff -p --relative=subdir HEAD^ >actual &&
test_cmp expected actual
ok 3 - -p --relative=subdir
expecting success:
git -C 'subdir' diff -p --relative HEAD^ >actual &&
test_cmp expected actual
ok 4 - -p --relative
expecting success:
git -C '.' diff -p --relative=sub HEAD^ >actual &&
test_cmp expected actual
ok 5 - -p --relative=sub
expecting success:
echo '1 0 file2' >expected &&
git -C '.' diff --numstat --relative=subdir/ HEAD^ >actual &&
test_cmp expected actual
ok 6 - --numstat --relative=subdir/
expecting success:
echo '1 0 file2' >expected &&
git -C '.' diff --numstat --relative=subdir HEAD^ >actual &&
test_cmp expected actual
ok 7 - --numstat --relative=subdir
expecting success:
echo '1 0 file2' >expected &&
git -C 'subdir' diff --numstat --relative HEAD^ >actual &&
test_cmp expected actual
ok 8 - --numstat --relative
expecting success:
echo '1 0 dir/file2' >expected &&
git -C '.' diff --numstat --relative=sub HEAD^ >actual &&
test_cmp expected actual
ok 9 - --numstat --relative=sub
expecting success:
git -C '.' diff --stat --relative=subdir/ HEAD^ >actual &&
test_i18ncmp expected actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 10 - --stat --relative=subdir/
expecting success:
git -C '.' diff --stat --relative=subdir HEAD^ >actual &&
test_i18ncmp expected actual
ok 11 - --stat --relative=subdir
expecting success:
git -C 'subdir' diff --stat --relative HEAD^ >actual &&
test_i18ncmp expected actual
ok 12 - --stat --relative
expecting success:
git -C '.' diff --stat --relative=sub HEAD^ >actual &&
test_i18ncmp expected actual
ok 13 - --stat --relative=sub
expecting success:
git -C '.' diff --no-abbrev --raw --relative=subdir/ HEAD^ >actual &&
test_cmp expected actual
ok 14 - --raw --relative=subdir/
expecting success:
git -C '.' diff --no-abbrev --raw --relative=subdir HEAD^ >actual &&
test_cmp expected actual
ok 15 - --raw --relative=subdir
expecting success:
git -C 'subdir' diff --no-abbrev --raw --relative HEAD^ >actual &&
test_cmp expected actual
ok 16 - --raw --relative
expecting success:
git -C '.' diff --no-abbrev --raw --relative=sub HEAD^ >actual &&
test_cmp expected actual
ok 17 - --raw --relative=sub
# passed all 17 test(s)
1..17
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4041-diff-submodule-option.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4041-diff-submodule-option/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4041-diff-submodule-option/sm1/.git/
expecting success:
git add sm1 &&
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 0000000...$head1 (new submodule)
EOF
test_cmp expected actual
warning: adding embedded git repository: sm1
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sm1
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sm1
hint:
hint: See "git help submodule" for more information.
ok 1 - added submodule
expecting success:
git config diff.submodule log &&
git add sm1 &&
git diff --cached >actual &&
cat >expected <<-EOF &&
Submodule sm1 0000000...$head1 (new submodule)
EOF
git config --unset diff.submodule &&
test_cmp expected actual
ok 2 - added submodule, set diff.submodule
expecting success:
test_config diff.submodule log &&
git add sm1 &&
git diff --submodule=short --cached >actual &&
cat >expected <<-EOF &&
diff --git a/sm1 b/sm1
new file mode 160000
index 0000000..$head1
--- /dev/null
+++ b/sm1
@@ -0,0 +1 @@
+Subproject commit $fullhead1
EOF
test_cmp expected actual
ok 3 - --submodule=short overrides diff.submodule
expecting success:
test_config diff.submodule log &&
git diff-index -p HEAD >actual &&
cat >expected <<-EOF &&
diff --git a/sm1 b/sm1
new file mode 160000
index 0000000..$head1
--- /dev/null
+++ b/sm1
@@ -0,0 +1 @@
+Subproject commit $fullhead1
EOF
test_cmp expected actual
ok 4 - diff.submodule does not affect plumbing
expecting success:
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head1..$head2:
> Add foo3 ($added foo3)
EOF
test_cmp expected actual
ok 5 - modified submodule(forward)
expecting success:
git diff --submodule=log >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head1..$head2:
> Add foo3 ($added foo3)
EOF
test_cmp expected actual
ok 6 - modified submodule(forward)
expecting success:
git diff --submodule >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head1..$head2:
> Add foo3 ($added foo3)
EOF
test_cmp expected actual
ok 7 - modified submodule(forward) --submodule
expecting success:
git diff --submodule=short >actual &&
cat >expected <<-EOF &&
diff --git a/sm1 b/sm1
index $head1..$head2 160000
--- a/sm1
+++ b/sm1
@@ -1 +1 @@
-Subproject commit $fullhead1
+Subproject commit $fullhead2
EOF
test_cmp expected actual
ok 8 - modified submodule(forward) --submodule=short
expecting success:
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head2..$head3 (rewind):
< Add foo3 ($added foo3)
< Add foo2 ($added foo2)
EOF
test_cmp expected actual
ok 9 - modified submodule(backward)
expecting success:
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head2...$head4:
> Add foo5 ($added foo5)
> Add foo4 ($added foo4)
< Add foo3 ($added foo3)
< Add foo2 ($added foo2)
EOF
test_cmp expected actual
ok 10 - modified submodule(backward and forward)
expecting success:
git diff --submodule=log --cached >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head4...0000000 (submodule deleted)
diff --git a/sm1 b/sm1
new file mode 100644
index 0000000..$head5
--- /dev/null
+++ b/sm1
@@ -0,0 +1 @@
+sm1
EOF
test_cmp expected actual
ok 11 - typechanged submodule(submodule->blob), --cached
expecting success:
git diff --submodule=log >actual &&
cat >expected <<-EOF &&
diff --git a/sm1 b/sm1
deleted file mode 100644
index $head5..0000000
--- a/sm1
+++ /dev/null
@@ -1 +0,0 @@
-sm1
Submodule sm1 0000000...$head4 (new submodule)
EOF
test_cmp expected actual
ok 12 - typechanged submodule(submodule->blob)
expecting success:
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head4...0000000 (submodule deleted)
diff --git a/sm1 b/sm1
new file mode 100644
index 0000000..$head5
--- /dev/null
+++ b/sm1
@@ -0,0 +1 @@
+sm1
EOF
test_cmp expected actual
ok 13 - typechanged submodule(submodule->blob)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4041-diff-submodule-option/sm1/.git/
expecting success:
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head4...$head6 (commits not present)
EOF
test_cmp expected actual
ok 14 - nonexistent commit
expecting success:
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
diff --git a/sm1 b/sm1
deleted file mode 100644
index $head5..0000000
--- a/sm1
+++ /dev/null
@@ -1 +0,0 @@
-sm1
Submodule sm1 0000000...$head6 (new submodule)
EOF
test_cmp expected actual
ok 15 - typechanged submodule(blob->submodule)
expecting success:
git diff-index -p --submodule=log HEAD >actual &&
test_must_be_empty actual
ok 16 - submodule is up to date
expecting success:
echo new > sm1/new-file &&
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 contains untracked content
EOF
test_cmp expected actual
ok 17 - submodule contains untracked content
expecting success:
git diff-index -p --ignore-submodules=untracked --submodule=log HEAD >actual &&
test_must_be_empty actual
ok 18 - submodule contains untracked content (untracked ignored)
expecting success:
git diff-index -p --ignore-submodules=dirty --submodule=log HEAD >actual &&
test_must_be_empty actual
ok 19 - submodule contains untracked content (dirty ignored)
expecting success:
git diff-index -p --ignore-submodules=all --submodule=log HEAD >actual &&
test_must_be_empty actual
ok 20 - submodule contains untracked content (all ignored)
expecting success:
echo new > sm1/foo6 &&
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 contains untracked content
Submodule sm1 contains modified content
EOF
test_cmp expected actual
ok 21 - submodule contains untracked and modifed content
expecting success:
echo new > sm1/foo6 &&
git diff-index -p --ignore-submodules=untracked --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 contains modified content
EOF
test_cmp expected actual
ok 22 - submodule contains untracked and modifed content (untracked ignored)
expecting success:
echo new > sm1/foo6 &&
git diff-index -p --ignore-submodules=dirty --submodule=log HEAD >actual &&
test_must_be_empty actual
ok 23 - submodule contains untracked and modifed content (dirty ignored)
expecting success:
echo new > sm1/foo6 &&
git diff-index -p --ignore-submodules --submodule=log HEAD >actual &&
test_must_be_empty actual
ok 24 - submodule contains untracked and modifed content (all ignored)
expecting success:
rm -f sm1/new-file &&
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 contains modified content
EOF
test_cmp expected actual
ok 25 - submodule contains modifed content
expecting success:
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head6..$head8:
> change
EOF
test_cmp expected actual
ok 26 - submodule is modified
expecting success:
echo new > sm1/new-file &&
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 contains untracked content
Submodule sm1 $head6..$head8:
> change
EOF
test_cmp expected actual
ok 27 - modified submodule contains untracked content
expecting success:
git diff-index -p --ignore-submodules=untracked --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head6..$head8:
> change
EOF
test_cmp expected actual
ok 28 - modified submodule contains untracked content (untracked ignored)
expecting success:
git diff-index -p --ignore-submodules=dirty --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head6..$head8:
> change
EOF
test_cmp expected actual
ok 29 - modified submodule contains untracked content (dirty ignored)
expecting success:
git diff-index -p --ignore-submodules=all --submodule=log HEAD >actual &&
test_must_be_empty actual
ok 30 - modified submodule contains untracked content (all ignored)
expecting success:
echo modification >> sm1/foo6 &&
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 contains untracked content
Submodule sm1 contains modified content
Submodule sm1 $head6..$head8:
> change
EOF
test_cmp expected actual
ok 31 - modified submodule contains untracked and modifed content
expecting success:
echo modification >> sm1/foo6 &&
git diff-index -p --ignore-submodules=untracked --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 contains modified content
Submodule sm1 $head6..$head8:
> change
EOF
test_cmp expected actual
ok 32 - modified submodule contains untracked and modifed content (untracked ignored)
expecting success:
echo modification >> sm1/foo6 &&
git diff-index -p --ignore-submodules=dirty --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head6..$head8:
> change
EOF
test_cmp expected actual
ok 33 - modified submodule contains untracked and modifed content (dirty ignored)
expecting success:
echo modification >> sm1/foo6 &&
git diff-index -p --ignore-submodules --submodule=log HEAD >actual &&
test_must_be_empty actual
ok 34 - modified submodule contains untracked and modifed content (all ignored)
expecting success:
rm -f sm1/new-file &&
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 contains modified content
Submodule sm1 $head6..$head8:
> change
EOF
test_cmp expected actual
ok 35 - modified submodule contains modifed content
expecting success:
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head6...0000000 (submodule deleted)
EOF
test_cmp expected actual
ok 36 - deleted submodule
expecting success:
test_create_repo sm2 &&
head7=$(add_file sm2 foo8 foo9) &&
git add sm2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4041-diff-submodule-option/sm2/.git/
warning: adding embedded git repository: sm2
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sm2
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sm2
hint:
hint: See "git help submodule" for more information.
ok 37 - create second submodule
expecting success:
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head6...0000000 (submodule deleted)
Submodule sm2 0000000...$head7 (new submodule)
EOF
test_cmp expected actual
ok 38 - multiple submodules
expecting success:
git diff-index -p --submodule=log HEAD sm2 >actual &&
cat >expected <<-EOF &&
Submodule sm2 0000000...$head7 (new submodule)
EOF
test_cmp expected actual
ok 39 - path filter
expecting success:
git diff-index -p --submodule=log HEAD^ >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head6...0000000 (submodule deleted)
Submodule sm2 0000000...$head7 (new submodule)
EOF
test_cmp expected actual
ok 40 - given commit
expecting success:
git diff-index -p --submodule HEAD^ >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head6...0000000 (submodule deleted)
Submodule sm2 0000000...$head7 (new submodule)
EOF
test_cmp expected actual
ok 41 - given commit --submodule
expecting success:
git diff-index -p --submodule=short HEAD^ >actual &&
cat >expected <<-EOF &&
diff --git a/sm1 b/sm1
deleted file mode 160000
index $head6..0000000
--- a/sm1
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit $fullhead6
diff --git a/sm2 b/sm2
new file mode 160000
index 0000000..$head7
--- /dev/null
+++ b/sm2
@@ -0,0 +1 @@
+Subproject commit $fullhead7
EOF
test_cmp expected actual
ok 42 - given commit --submodule=short
expecting success:
(cd sm2 &&
REAL="$(pwd)/../.real" &&
mv .git "$REAL" &&
echo "gitdir: $REAL" >.git)
ok 43 - setup .git file for sm2
expecting success:
git diff --submodule HEAD^ >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head6...0000000 (submodule deleted)
Submodule sm2 0000000...$head7 (new submodule)
EOF
test_cmp expected actual
ok 44 - diff --submodule with .git file
expecting success:
mkdir sub_alt &&
(cd sub_alt &&
git init &&
echo a >a &&
git add a &&
git commit -m a
) &&
mkdir super &&
(cd super &&
git clone -s ../sub_alt sub &&
git init &&
git add sub &&
git commit -m "sub a"
) &&
(cd sub_alt &&
sha1_before=$(git rev-parse --short HEAD) &&
echo b >b &&
git add b &&
git commit -m b &&
sha1_after=$(git rev-parse --short HEAD) &&
{
echo "Submodule sub $sha1_before..$sha1_after:" &&
echo " > b"
} >../expected
) &&
(cd super &&
(cd sub &&
git fetch &&
git checkout origin/master
) &&
git diff --submodule > ../actual
) &&
test_cmp expected actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4041-diff-submodule-option/sub_alt/.git/
[master (root-commit) b7442a0] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
Cloning into 'sub'...
done.
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4041-diff-submodule-option/super/.git/
warning: adding embedded git repository: sub
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sub
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sub
hint:
hint: See "git help submodule" for more information.
[master (root-commit) d9c5753] sub a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 160000 sub
[master 8e02ef5] b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b
From /<<PKGBUILDDIR>>/t/trash directory.t4041-diff-submodule-option/super/../sub_alt
b7442a0..8e02ef5 master -> origin/master
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8e02ef5 b
ok 45 - diff --submodule with objects referenced by alternates
# passed all 45 test(s)
1..45
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4048-diff-combined-binary.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4048-diff-combined-binary/.git/
expecting success:
echo oneQ1 | q_to_nul >binary &&
git add binary &&
git commit -m one &&
echo twoQ2 | q_to_nul >binary &&
git commit -a -m two &&
git checkout -b branch-binary HEAD^ &&
echo threeQ3 | q_to_nul >binary &&
git commit -a -m three &&
test_must_fail git merge master &&
echo resolvedQhooray | q_to_nul >binary &&
git commit -a -m resolved
[master (root-commit) dbe2bec] one
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 binary
[master b9d2f97] two
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
Switched to a new branch 'branch-binary'
[branch-binary 6f057ed] three
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
warning: Cannot merge binary files: binary (HEAD vs. master)
Merging:
6f057ed three
virtual master
found 1 common ancestor:
dbe2bec one
Auto-merging binary
CONFLICT (content): Merge conflict in binary
Automatic merge failed; fix conflicts and then commit the result.
[branch-binary c0e4b3d] resolved
Author: A U Thor <author@example.com>
ok 1 - setup binary merge conflict
expecting success:
git show --format=%s -m >actual &&
test_cmp expect actual
ok 2 - diff -m indicates binary-ness
expecting success:
git show --format=%s -c >actual &&
test_cmp expect actual
ok 3 - diff -c indicates binary-ness
expecting success:
git show --format=%s --cc >actual &&
test_cmp expect actual
ok 4 - diff --cc indicates binary-ness
expecting success:
git checkout master &&
test_commit one text &&
test_commit two text &&
git checkout -b branch-text HEAD^ &&
test_commit three text &&
test_must_fail git merge master &&
test_commit resolved text &&
echo text -diff >.gitattributes
Switched to branch 'master'
[master d417882] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 text
[master 2040f7f] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'branch-text'
[branch-text 4f03cd2] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Merging:
4f03cd2 three
virtual master
found 1 common ancestor:
d417882 one
Auto-merging text
CONFLICT (content): Merge conflict in text
Automatic merge failed; fix conflicts and then commit the result.
[branch-text 1de7361] resolved
Author: A U Thor <author@example.com>
ok 5 - setup non-binary with binary attribute
expecting success:
git show --format=%s -m >actual &&
test_cmp expect actual
ok 6 - diff -m respects binary attribute
expecting success:
git show --format=%s -c >actual &&
test_cmp expect actual
ok 7 - diff -c respects binary attribute
expecting success:
git show --format=%s --cc >actual &&
test_cmp expect actual
ok 8 - diff --cc respects binary attribute
expecting success:
echo "text diff=upcase" >.gitattributes &&
git config diff.upcase.textconv "tr a-z A-Z <"
ok 9 - setup textconv attribute
expecting success:
git show --format=%s -m >actual &&
test_cmp expect actual
ok 10 - diff -m respects textconv attribute
expecting success:
git show --format=%s -c >actual &&
test_cmp expect actual
ok 11 - diff -c respects textconv attribute
expecting success:
git show --format=%s --cc >actual &&
test_cmp expect actual
ok 12 - diff --cc respects textconv attribute
expecting success:
git diff-tree HEAD -c -p >full &&
tail -n +2 full >actual &&
test_cmp expect actual
ok 13 - diff-tree plumbing does not respect textconv
expecting success:
git reset --hard HEAD^ &&
test_must_fail git merge master &&
git diff >actual &&
test_cmp expect actual
HEAD is now at 4f03cd2 three
Merging:
4f03cd2 three
virtual master
found 1 common ancestor:
d417882 one
Auto-merging text
CONFLICT (content): Merge conflict in text
Automatic merge failed; fix conflicts and then commit the result.
ok 14 - diff --cc respects textconv on worktree file
# passed all 14 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4050-diff-histogram.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4050-diff-histogram/.git/
expecting success:
test_must_fail git diff --no-index "--$STRATEGY" file1 file2 > output &&
test_cmp expect output
ok 1 - histogram diff
expecting success:
mv file2 expect &&
git apply < output &&
test_cmp expect file2
ok 2 - histogram diff output is valid
expecting success:
test_must_fail git diff --no-index "--$STRATEGY" uniq1 uniq2 > output &&
test_cmp expect output
ok 3 - completely different files
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4049-diff-stat-count.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4049-diff-stat-count/.git/
expecting success:
>a &&
>b &&
>c &&
>d &&
git add a b c d &&
git commit -m initial
[master (root-commit) e6b0cba] initial
Author: A U Thor <author@example.com>
4 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a
create mode 100644 b
create mode 100644 c
create mode 100644 d
ok 1 - setup
expecting success:
git reset --hard &&
test_chmod +x b d &&
echo a >a &&
echo c >c &&
cat >expect <<-\EOF &&
a | 1 +
b | 0
...
4 files changed, 2 insertions(+)
EOF
git diff --stat --stat-count=2 HEAD >actual &&
test_i18ncmp expect actual
HEAD is now at e6b0cba initial
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 2 - mode-only change show as a 0-line change
expecting success:
git reset --hard &&
echo a >a &&
echo c >c &&
cat "$TEST_DIRECTORY"/test-binary-1.png >d &&
cat >expect <<-\EOF &&
a | 1 +
c | 1 +
...
3 files changed, 2 insertions(+)
EOF
git diff --stat --stat-count=2 >actual &&
test_i18ncmp expect actual
HEAD is now at e6b0cba initial
ok 3 - binary changes do not count in lines
expecting success:
git reset --hard &&
echo a >a &&
echo b >b &&
git ls-files -s a >x &&
git rm -f d &&
for stage in 1 2 3
do
sed -e "s/ 0 a/ $stage d/" x
done |
git update-index --index-info &&
echo d >d &&
cat >expect <<-\EOF &&
a | 1 +
b | 1 +
...
3 files changed, 3 insertions(+)
EOF
git diff --stat --stat-count=2 >actual &&
test_i18ncmp expect actual
HEAD is now at e6b0cba initial
rm 'd'
ok 4 - exclude unmerged entries from total file count
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4038-diff-combined.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4038-diff-combined/.git/
expecting success:
>file &&
git add file &&
test_tick &&
git commit -m initial &&
git branch withone &&
git branch sansone &&
git checkout withone &&
setup_helper one withone sidewithone &&
git checkout sansone &&
setup_helper "" sansone sidesansone
[master (root-commit) 1bd44cb] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
Switched to branch 'withone'
[withone 61ad3a5] withone
Author: A U Thor <author@example.com>
1 file changed, 4 insertions(+)
Switched to branch 'sidewithone'
[sidewithone 04e7a65] sidewithone
Author: A U Thor <author@example.com>
1 file changed, 4 insertions(+)
Merging:
04e7a65 sidewithone
virtual withone
found 1 common ancestor:
1bd44cb initial
Auto-merging file
CONFLICT (content): Merge conflict in file
Automatic merge failed; fix conflicts and then commit the result.
[sidewithone 70465e9] merge withone into sidewithone
Author: A U Thor <author@example.com>
Switched to branch 'sansone'
[sansone e4cdba2] sansone
Author: A U Thor <author@example.com>
1 file changed, 3 insertions(+)
Switched to branch 'sidesansone'
[sidesansone d31bb1b] sidesansone
Author: A U Thor <author@example.com>
1 file changed, 3 insertions(+)
Merging:
d31bb1b sidesansone
virtual sansone
found 1 common ancestor:
1bd44cb initial
Auto-merging file
CONFLICT (content): Merge conflict in file
Automatic merge failed; fix conflicts and then commit the result.
[sidesansone a02eb57] merge sansone into sidesansone
Author: A U Thor <author@example.com>
ok 1 - setup
expecting success:
git show sidewithone -- >sidewithone &&
verify_helper sidewithone
ok 2 - check combined output (1)
expecting success:
git show sidesansone -- >sidesansone &&
verify_helper sidesansone
ok 3 - check combined output (2)
expecting success:
>file &&
git add file &&
git commit --amend -C HEAD &&
git show >out &&
grep "diff --cc file" out
[sidesansone 3fd518e] merge sansone into sidesansone
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:19:13 2005 -0700
diff --cc file
ok 4 - diagnose truncated file
expecting success:
blob=$(echo file | git hash-object --stdin -w) &&
base_tree=$(echo "100644 blob $blob file" | git mktree) &&
trees= &&
for i in $(test_seq 1 40)
do
blob=$(echo file$i | git hash-object --stdin -w) &&
trees="$trees$(echo "100644 blob $blob file" | git mktree)$LF"
done
ok 5 - setup for --cc --raw
expecting success:
four_trees=$(echo "$trees" | sed -e 4q) &&
git diff --cc --raw $four_trees $base_tree >out &&
# Check for four leading colons in the output:
grep "^::::[^:]" out
::::100644 100644 100644 100644 100644 6c493ff 7c8ac2f bfd6a65 f73f309 e212970 MMMM file
ok 6 - check --cc --raw with four trees
expecting success:
git diff --cc --raw $trees $base_tree >out &&
# Check for forty leading colons in the output:
grep "^::::::::::::::::::::::::::::::::::::::::[^:]" out
::::::::::::::::::::::::::::::::::::::::100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 100644 6c493ff 7c8ac2f bfd6a65 4806cb9 8d80099 c52d680 efe3974 2050b92 07205b5 e1aa36f dd63810 d7a00d8 b5ac9e5 c76bce1 1d22d08 1b22815 10a5e40 e78cb60 1b9d597 e4c0bb4 536442d 9e692b7 02e835e 4bed7f0 ae12143 7202624 4c12e08 33b3d68 a633d0e a1d5983 c1288dc eb6edd8 769381d 9089a6c 83be741 3a76ef8 67335ff 834f228 62e8e47 f73f309 e212970 MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM file
ok 7 - check --cc --raw with forty trees
expecting success:
git checkout master &&
>test &&
git add test &&
git commit -m initial &&
tr -d Q <<-\EOF >test &&
always coalesce
eol space coalesce Q
space change coalesce
all spa ces coalesce
eol spaces Q
space change
all spa ces
EOF
git commit -m "test space change" -a &&
git checkout -b side HEAD^ &&
tr -d Q <<-\EOF >test &&
always coalesce
eol space coalesce
space change coalesce
all spaces coalesce
eol spaces
space change
all spaces
EOF
git commit -m "test other space changes" -a &&
test_must_fail git merge master &&
tr -d Q <<-\EOF >test &&
eol spaces Q
space change
all spa ces
EOF
git commit -m merged -a
Switched to branch 'master'
[master ac9d179] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 test
[master c5936ee] test space change
Author: A U Thor <author@example.com>
1 file changed, 7 insertions(+)
Switched to a new branch 'side'
[side 29c6253] test other space changes
Author: A U Thor <author@example.com>
1 file changed, 7 insertions(+)
Merging:
29c6253 test other space changes
virtual master
found 1 common ancestor:
ac9d179 initial
Auto-merging test
CONFLICT (content): Merge conflict in test
Automatic merge failed; fix conflicts and then commit the result.
[side 373c494] merged
Author: A U Thor <author@example.com>
ok 8 - setup combined ignore spaces
expecting success:
git show >actual.tmp &&
sed -e "1,/^@@@/d" < actual.tmp >actual &&
tr -d Q <<-\EOF >expected &&
--always coalesce
- eol space coalesce
- space change coalesce
- all spaces coalesce
- eol spaces
- space change
- all spaces
-eol space coalesce Q
-space change coalesce
-all spa ces coalesce
+ eol spaces Q
+ space change
+ all spa ces
EOF
compare_diff_patch expected actual
ok 9 - check combined output (no ignore space)
expecting success:
git show --ignore-space-at-eol >actual.tmp &&
sed -e "1,/^@@@/d" < actual.tmp >actual &&
tr -d Q <<-\EOF >expected &&
--always coalesce
--eol space coalesce
- space change coalesce
- all spaces coalesce
-space change coalesce
-all spa ces coalesce
eol spaces Q
- space change
- all spaces
+ space change
+ all spa ces
EOF
compare_diff_patch expected actual
ok 10 - check combined output (ignore space at eol)
expecting success:
git show -b >actual.tmp &&
sed -e "1,/^@@@/d" < actual.tmp >actual &&
tr -d Q <<-\EOF >expected &&
--always coalesce
--eol space coalesce
--space change coalesce
- all spaces coalesce
-all spa ces coalesce
eol spaces Q
space change
- all spaces
+ all spa ces
EOF
compare_diff_patch expected actual
ok 11 - check combined output (ignore space change)
expecting success:
git show -w >actual.tmp &&
sed -e "1,/^@@@/d" < actual.tmp >actual &&
tr -d Q <<-\EOF >expected &&
--always coalesce
--eol space coalesce
--space change coalesce
--all spaces coalesce
eol spaces Q
space change
all spa ces
EOF
compare_diff_patch expected actual
ok 12 - check combined output (ignore all spaces)
expecting success:
>test &&
git add test &&
git commit -m initial &&
test_seq 4 >test &&
git commit -a -m empty1 &&
git branch side1 &&
git checkout HEAD^ &&
test_seq 5 >test &&
git commit -a -m empty2 &&
test_must_fail git merge side1 &&
>test &&
git commit -a -m merge &&
git show >actual.tmp &&
sed -e "1,/^@@@/d" < actual.tmp >actual &&
tr -d Q <<-\EOF >expected &&
--1
--2
--3
--4
- 5
EOF
compare_diff_patch expected actual
[side ca25ef5] initial
Author: A U Thor <author@example.com>
1 file changed, 3 deletions(-)
[side 2f38b7d] empty1
Author: A U Thor <author@example.com>
1 file changed, 4 insertions(+)
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at ca25ef5 initial
[detached HEAD a65ae3c] empty2
Author: A U Thor <author@example.com>
1 file changed, 5 insertions(+)
Merging:
a65ae3c empty2
virtual side1
found 1 common ancestor:
ca25ef5 initial
Auto-merging test
CONFLICT (content): Merge conflict in test
Automatic merge failed; fix conflicts and then commit the result.
[detached HEAD 8ab2551] merge
Author: A U Thor <author@example.com>
ok 13 - combine diff coalesce simple
expecting success:
>test &&
git add test &&
git commit -m initial --allow-empty &&
cat <<-\EOF >test &&
3
1
2
3
4
EOF
git commit -a -m empty1 &&
git branch -f side1 &&
git checkout HEAD^ &&
cat <<-\EOF >test &&
1
3
5
4
EOF
git commit -a -m empty2 &&
git branch -f side2 &&
test_must_fail git merge side1 &&
>test &&
git commit -a -m merge &&
git show >actual.tmp &&
sed -e "1,/^@@@/d" < actual.tmp >actual &&
tr -d Q <<-\EOF >expected &&
-3
--1
-2
--3
- 5
--4
EOF
compare_diff_patch expected actual &&
git checkout -f side1 &&
test_must_fail git merge side2 &&
>test &&
git commit -a -m merge &&
git show >actual.tmp &&
sed -e "1,/^@@@/d" < actual.tmp >actual &&
tr -d Q <<-\EOF >expected &&
- 3
--1
- 2
--3
-5
--4
EOF
compare_diff_patch expected actual
[detached HEAD 567514d] initial
Author: A U Thor <author@example.com>
[detached HEAD edcd94a] empty1
Author: A U Thor <author@example.com>
1 file changed, 5 insertions(+)
Previous HEAD position was edcd94a empty1
HEAD is now at 567514d initial
[detached HEAD 4e10910] empty2
Author: A U Thor <author@example.com>
1 file changed, 4 insertions(+)
Merging:
4e10910 empty2
virtual side1
found 1 common ancestor:
567514d initial
Auto-merging test
CONFLICT (content): Merge conflict in test
Automatic merge failed; fix conflicts and then commit the result.
[detached HEAD 2f37ae9] merge
Author: A U Thor <author@example.com>
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
2f37ae9 merge
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> 2f37ae9
Switched to branch 'side1'
Merging:
edcd94a empty1
virtual side2
found 1 common ancestor:
567514d initial
Auto-merging test
CONFLICT (content): Merge conflict in test
Automatic merge failed; fix conflicts and then commit the result.
[side1 33886e5] merge
Author: A U Thor <author@example.com>
ok 14 - combine diff coalesce tricky
checking known breakage:
>test &&
git add test &&
git commit -m initial --allow-empty &&
cat <<-\EOF >test &&
3
1
2
3
4
EOF
git commit -a -m empty1 &&
git checkout -B side1 &&
git checkout HEAD^ &&
cat <<-\EOF >test &&
1
3
7
5
4
EOF
git commit -a -m empty2 &&
git branch -f side2 &&
git checkout HEAD^ &&
cat <<-\EOF >test &&
3
1
6
5
4
EOF
git commit -a -m empty3 &&
>test &&
git add test &&
TREE=$(git write-tree) &&
COMMIT=$(git commit-tree -p HEAD -p side1 -p side2 -m merge $TREE) &&
git show $COMMIT >actual.tmp &&
sed -e "1,/^@@@/d" < actual.tmp >actual &&
tr -d Q <<-\EOF >expected &&
-- 3
---1
- 6
- 2
--3
-7
- -5
---4
EOF
compare_diff_patch expected actual
[side1 562f35c] initial
Author: A U Thor <author@example.com>
[side1 f31b6a2] empty1
Author: A U Thor <author@example.com>
1 file changed, 5 insertions(+)
Reset branch 'side1'
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 562f35c initial
[detached HEAD 0cc2d14] empty2
Author: A U Thor <author@example.com>
1 file changed, 5 insertions(+)
Previous HEAD position was 0cc2d14 empty2
HEAD is now at 562f35c initial
[detached HEAD 22de592] empty3
Author: A U Thor <author@example.com>
1 file changed, 5 insertions(+)
--- .tmp-1 2019-08-14 07:29:06.824419873 +0000
+++ .tmp-2 2019-08-14 07:29:06.824419873 +0000
@@ -1,8 +1,9 @@
-- 3
---1
- 6
+- 5
- 2
--3
-7
-- -5
+ -5
---4
not ok 15 - combine diff coalesce three parents # TODO known breakage
expecting success:
git commit -m initial --allow-empty &&
cat <<-\EOF >test &&
1
2
3
4
EOF
git add test &&
git commit -a -m side1 &&
git checkout -B side1 &&
git checkout HEAD^ &&
cat <<-\EOF >test &&
0
1
2
3
4modified
EOF
git add test &&
git commit -m side2 &&
git branch -f side2 &&
test_must_fail git merge --no-commit side1 &&
cat <<-\EOF >test &&
1
2
3
4modified
EOF
git add test &&
git commit -a -m merge &&
git diff-tree -c -p HEAD >actual.tmp &&
sed -e "1,/^@@@/d" < actual.tmp >actual &&
tr -d Q <<-\EOF >expected &&
- 0
1
2
3
-4
+4modified
EOF
compare_diff_patch expected actual
[detached HEAD 78a948b] initial
Author: A U Thor <author@example.com>
1 file changed, 5 deletions(-)
[detached HEAD dd67d51] side1
Author: A U Thor <author@example.com>
1 file changed, 4 insertions(+)
Switched to and reset branch 'side1'
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 78a948b initial
[detached HEAD bb8b62e] side2
Author: A U Thor <author@example.com>
1 file changed, 5 insertions(+)
Merging:
bb8b62e side2
virtual side1
found 1 common ancestor:
78a948b initial
Auto-merging test
CONFLICT (content): Merge conflict in test
Automatic merge failed; fix conflicts and then commit the result.
[detached HEAD 9dfd023] merge
Author: A U Thor <author@example.com>
ok 16 - combine diff missing delete bug
expecting success:
# create a directory and a file that sort differently in trees
# versus byte-wise (implied "/" sorts after ".")
git checkout -f master &&
mkdir foo &&
echo base >foo/one &&
echo base >foo/two &&
echo base >foo.ext &&
git add foo foo.ext &&
git commit -m base &&
# one side modifies a file in the directory, along with the root
# file...
echo master >foo/one &&
echo master >foo.ext &&
git commit -a -m master &&
# the other side modifies the other file in the directory
git checkout -b other HEAD^ &&
echo other >foo/two &&
git commit -a -m other &&
# And now we merge. The files in the subdirectory will resolve cleanly,
# meaning that a combined diff will not find them interesting. But it
# will find the tree itself interesting, because it had to be merged.
git checkout master &&
git merge other &&
printf "MM\tfoo\n" >expect &&
git diff-tree -c --name-status -t HEAD >actual.tmp &&
sed 1d <actual.tmp >actual &&
test_cmp expect actual
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
9dfd023 merge
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> 9dfd023
Switched to branch 'master'
[master eeef54b] base
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 foo.ext
create mode 100644 foo/one
create mode 100644 foo/two
[master d5b0bfd] master
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
Switched to a new branch 'other'
[other 387c20f] other
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'master'
Merging:
d5b0bfd master
virtual other
found 1 common ancestor:
eeef54b base
Merge made by the 'recursive' strategy.
foo/two | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ok 17 - combine diff gets tree sorting right
expecting success:
git branch side1c &&
git branch side2c &&
git checkout side1c &&
test_seq 1 10 >filename-side1c &&
git add filename-side1c &&
git commit -m with &&
git checkout side2c &&
test_seq 1 9 >filename-side2c &&
echo ten >>filename-side2c &&
git add filename-side2c &&
git commit -m iam &&
git checkout -b mergery side1c &&
git merge --no-commit side2c &&
git rm filename-side1c &&
echo eleven >>filename-side2c &&
git mv filename-side2c filename-merged &&
git add filename-merged &&
git commit
Switched to branch 'side1c'
[side1c 52024cf] with
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 filename-side1c
Switched to branch 'side2c'
[side2c 6b72e98] iam
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 filename-side2c
Switched to a new branch 'mergery'
Merging:
52024cf with
virtual side2c
found 1 common ancestor:
bf0bad9 Merge branch 'other'
Automatic merge went well; stopped before committing as requested
rm 'filename-side1c'
[mergery 18bdbe2] Merge branch 'side2c' into mergery
Author: A U Thor <author@example.com>
ok 18 - setup for --combined-all-paths
expecting success:
cat <<-\EOF >expect &&
::100644 100644 100644 f00c965d8307308469e537302baa73048488f162 088bd5d92c2a8e0203ca8e7e4c2a5c692f6ae3f7 333b9c62519f285e1854830ade0fe1ef1d40ee1b RR filename-side1c filename-side2c filename-merged
EOF
git diff-tree -c -M --raw --combined-all-paths HEAD >actual.tmp &&
sed 1d <actual.tmp >actual &&
test_cmp expect actual
ok 19 - --combined-all-paths and --raw
expecting success:
cat <<-\EOF >expect &&
--- a/filename-side1c
--- a/filename-side2c
+++ b/filename-merged
EOF
git diff-tree --cc -M --combined-all-paths HEAD >actual.tmp &&
grep ^[-+][-+][-+] <actual.tmp >actual &&
test_cmp expect actual
ok 20 - --combined-all-paths and --cc
checking prerequisite: FUNNYNAMES
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq !MINGW &&
touch -- \
"FUNNYNAMES tab embedded" \
"FUNNYNAMES \"quote embedded\"" \
"FUNNYNAMES newline
embedded" 2>/dev/null &&
rm -- \
"FUNNYNAMES tab embedded" \
"FUNNYNAMES \"quote embedded\"" \
"FUNNYNAMES newline
embedded" 2>/dev/null
)
prerequisite FUNNYNAMES ok
expecting success:
git branch side1d &&
git branch side2d &&
git checkout side1d &&
test_seq 1 10 >"$(printf "file\twith\ttabs")" &&
git add file* &&
git commit -m with &&
git checkout side2d &&
test_seq 1 9 >"$(printf "i\tam\ttabbed")" &&
echo ten >>"$(printf "i\tam\ttabbed")" &&
git add *tabbed &&
git commit -m iam &&
git checkout -b funny-names-mergery side1d &&
git merge --no-commit side2d &&
git rm *tabs &&
echo eleven >>"$(printf "i\tam\ttabbed")" &&
git mv "$(printf "i\tam\ttabbed")" "$(printf "fickle\tnaming")" &&
git add fickle* &&
git commit
Switched to branch 'side1d'
[side1d 4f6dc89] with
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 "file\twith\ttabs"
Switched to branch 'side2d'
[side2d 432731c] iam
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 "i\tam\ttabbed"
Switched to a new branch 'funny-names-mergery'
Merging:
4f6dc89 with
virtual side2d
found 1 common ancestor:
18bdbe2 Merge branch 'side2c' into mergery
Automatic merge went well; stopped before committing as requested
rm 'file with tabs'
[funny-names-mergery aaf8087] Merge branch 'side2d' into funny-names-mergery
Author: A U Thor <author@example.com>
ok 21 - setup for --combined-all-paths with funny names
expecting success:
cat <<-\EOF >expect &&
::100644 100644 100644 f00c965d8307308469e537302baa73048488f162 088bd5d92c2a8e0203ca8e7e4c2a5c692f6ae3f7 333b9c62519f285e1854830ade0fe1ef1d40ee1b RR "file\twith\ttabs" "i\tam\ttabbed" "fickle\tnaming"
EOF
git diff-tree -c -M --raw --combined-all-paths HEAD >actual.tmp &&
sed 1d <actual.tmp >actual &&
test_cmp expect actual
ok 22 - --combined-all-paths and --raw and funny names
expecting success:
printf "aaf8087c3cbd4db8e185a2d074cf27c53cfb75d7\0::100644 100644 100644 f00c965d8307308469e537302baa73048488f162 088bd5d92c2a8e0203ca8e7e4c2a5c692f6ae3f7 333b9c62519f285e1854830ade0fe1ef1d40ee1b RR\0file\twith\ttabs\0i\tam\ttabbed\0fickle\tnaming\0" >expect &&
git diff-tree -c -M --raw --combined-all-paths -z HEAD >actual &&
test_cmp -a expect actual
ok 23 - --combined-all-paths and --raw -and -z and funny names
expecting success:
cat <<-\EOF >expect &&
--- "a/file\twith\ttabs"
--- "a/i\tam\ttabbed"
+++ "b/fickle\tnaming"
EOF
git diff-tree --cc -M --combined-all-paths HEAD >actual.tmp &&
grep ^[-+][-+][-+] <actual.tmp >actual &&
test_cmp expect actual
ok 24 - --combined-all-paths and --cc and funny names
# still have 1 known breakage(s)
# passed all remaining 23 test(s)
1..24
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4053-diff-no-index.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4053-diff-no-index/.git/
expecting success:
mkdir a &&
mkdir b &&
echo 1 >a/1 &&
echo 2 >a/2 &&
git init repo &&
echo 1 >repo/a &&
mkdir -p non/git &&
echo 1 >non/git/a &&
echo 1 >non/git/b
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4053-diff-no-index/repo/.git/
ok 1 - setup
expecting success:
test_expect_code 1 git diff --no-index a b >cnt &&
test_line_count = 14 cnt
ok 2 - git diff --no-index directories
expecting success:
(
cd repo &&
test_expect_code 0 git diff --no-index a ../non/git/a &&
test_expect_code 0 git diff --no-index ../non/git/a ../non/git/b
)
ok 3 - git diff --no-index relative path outside repo
expecting success:
(
cd repo &&
echo broken >.git/index &&
git diff --no-index a ../non/git/a
)
ok 4 - git diff --no-index with broken index
expecting success:
(
cd repo &&
git diff ../non/git/a ../non/git/b
)
ok 5 - git diff outside repo with broken index
expecting success:
(
GIT_CEILING_DIRECTORIES=$TRASH_DIRECTORY/non &&
export GIT_CEILING_DIRECTORIES &&
cd non/git &&
test_must_fail git diff --no-index a 2>actual.err &&
test_i18ngrep "usage: git diff --no-index" actual.err
)
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
usage: git diff --no-index [<options>] <path> <path>
ok 6 - git diff --no-index executed outside repo gives correct error message
expecting success:
(
cd repo &&
echo in-repo >a &&
echo non-repo >../non/git/a &&
mkdir sub &&
echo sub-repo >sub/a &&
test_must_fail git diff --no-index sub/a ../non/git/a >expect &&
test_must_fail git diff --no-index sub/a ../non/git/ >actual &&
test_cmp expect actual &&
test_must_fail git diff --no-index a ../non/git/a >expect &&
test_must_fail git diff --no-index a ../non/git/ >actual &&
test_cmp expect actual &&
test_must_fail git diff --no-index ../non/git/a a >expect &&
test_must_fail git diff --no-index ../non/git a >actual &&
test_cmp expect actual
)
ok 7 - diff D F and diff F D
expecting success:
(
cd non/git &&
mkdir d e e/sub &&
echo 1 >d/sub &&
echo 2 >e/sub/file &&
printf "D\td/sub\nA\te/sub/file\n" >expect &&
test_must_fail git diff --no-index --name-status d e >actual &&
test_cmp expect actual
)
ok 8 - turning a file into a directory
expecting success:
echo "diff --git a/../../non/git/a b/../../non/git/b" >expect &&
test_expect_code 1 \
git -C repo/sub \
diff --no-index ../../non/git/a ../../non/git/b >actual &&
head -n 1 <actual >actual.head &&
test_cmp expect actual.head
ok 9 - diff from repo subdir shows real paths (explicit)
expecting success:
echo "diff --git a/../../non/git/a b/../../non/git/b" >expect &&
test_expect_code 1 \
git -C repo/sub \
diff ../../non/git/a ../../non/git/b >actual &&
head -n 1 <actual >actual.head &&
test_cmp expect actual.head
ok 10 - diff from repo subdir shows real paths (implicit)
expecting success:
echo "diff --git ../../non/git/a ../../non/git/b" >expect &&
test_config -C repo diff.noprefix true &&
test_expect_code 1 \
git -C repo/sub \
diff --no-index ../../non/git/a ../../non/git/b >actual &&
head -n 1 <actual >actual.head &&
test_cmp expect actual.head
ok 11 - diff --no-index from repo subdir respects config (explicit)
expecting success:
echo "diff --git ../../non/git/a ../../non/git/b" >expect &&
test_config -C repo diff.noprefix true &&
test_expect_code 1 \
git -C repo/sub \
diff ../../non/git/a ../../non/git/b >actual &&
head -n 1 <actual >actual.head &&
test_cmp expect actual.head
ok 12 - diff --no-index from repo subdir respects config (implicit)
expecting success:
cat <<-EOF >expect &&
1 1 $(pwd)/non/git/{a => b}
EOF
test_expect_code 1 \
git -C repo/sub diff --numstat \
"$(pwd)/non/git/a" "$(pwd)/non/git/b" >actual &&
test_cmp expect actual
ok 13 - diff --no-index from repo subdir with absolute paths
expecting success:
test_expect_code 1 \
env GIT_EXTERNAL_DIFF="echo external ;:" \
git diff --no-index non/git/a non/git/b >actual &&
echo external >expect &&
test_cmp expect actual
ok 14 - diff --no-index allows external diff
# passed all 14 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4054-diff-bogus-tree.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4054-diff-bogus-tree/.git/
expecting success:
bogus_tree=$(
printf "100644 fooQQQQQQQQQQQQQQQQQQQQQ" |
q_to_nul |
git hash-object -w --stdin -t tree
)
ok 1 - create bogus tree
expecting success:
echo bar >foo &&
git add foo &&
good_tree=$(git write-tree) &&
blob=$(git rev-parse :foo)
ok 2 - create tree with matching file
expecting success:
echo ":000000 100644 $ZERO_OID $ZERO_OID A foo" >expect &&
git diff-tree $EMPTY_TREE $bogus_tree >actual &&
test_cmp expect actual
ok 3 - raw diff shows null sha1 (addition)
expecting success:
echo ":100644 000000 $ZERO_OID $ZERO_OID D foo" >expect &&
git diff-tree $bogus_tree $EMPTY_TREE >actual &&
test_cmp expect actual
ok 4 - raw diff shows null sha1 (removal)
expecting success:
echo ":100644 100644 $blob $ZERO_OID M foo" >expect &&
git diff-tree $good_tree $bogus_tree >actual &&
test_cmp expect actual
ok 5 - raw diff shows null sha1 (modification)
expecting success:
echo ":100644 100644 $ZERO_OID $blob M foo" >expect &&
git diff-tree $bogus_tree $good_tree >actual &&
test_cmp expect actual
ok 6 - raw diff shows null sha1 (other direction)
expecting success:
echo ":100644 100644 $ZERO_OID $blob M foo" >expect &&
git diff-tree -R $good_tree $bogus_tree >actual &&
test_cmp expect actual
ok 7 - raw diff shows null sha1 (reverse)
expecting success:
echo ":100644 100644 $ZERO_OID $blob M foo" >expect &&
git diff-index $bogus_tree >actual &&
test_cmp expect actual
ok 8 - raw diff shows null sha1 (index)
expecting success:
test_must_fail git diff-tree -p $EMPTY_TREE $bogus_tree
fatal: unable to read 0000000000000000000000000000000000000000
ok 9 - patch fails due to bogus sha1 (addition)
expecting success:
test_must_fail git diff-tree -p $bogus_tree $EMPTY_TREE
fatal: unable to read 0000000000000000000000000000000000000000
ok 10 - patch fails due to bogus sha1 (removal)
expecting success:
test_must_fail git diff-tree -p $good_tree $bogus_tree
fatal: unable to read 0000000000000000000000000000000000000000
ok 11 - patch fails due to bogus sha1 (modification)
expecting success:
test_must_fail git diff-tree -p $bogus_tree $good_tree
fatal: unable to read 0000000000000000000000000000000000000000
ok 12 - patch fails due to bogus sha1 (other direction)
expecting success:
test_must_fail git diff-tree -R -p $good_tree $bogus_tree
fatal: unable to read 0000000000000000000000000000000000000000
ok 13 - patch fails due to bogus sha1 (reverse)
expecting success:
test_must_fail git diff-index -p $bogus_tree
fatal: unable to read 0000000000000000000000000000000000000000
ok 14 - patch fails due to bogus sha1 (index)
# passed all 14 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4047-diff-dirstat.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4047-diff-dirstat/.git/
expecting success:
mkdir unchanged &&
mkdir changed &&
mkdir rearranged &&
mkdir src &&
mkdir src/copy &&
mkdir src/copy/unchanged &&
mkdir src/copy/changed &&
mkdir src/copy/rearranged &&
mkdir src/move &&
mkdir src/move/unchanged &&
mkdir src/move/changed &&
mkdir src/move/rearranged &&
cat <<EOF >unchanged/text &&
unchanged line #0
unchanged line #1
unchanged line #2
unchanged line #3
unchanged line #4
unchanged line #5
unchanged line #6
unchanged line #7
unchanged line #8
unchanged line #9
EOF
cat <<EOF >changed/text &&
changed line #0
changed line #1
changed line #2
changed line #3
changed line #4
changed line #5
changed line #6
changed line #7
changed line #8
changed line #9
EOF
cat <<EOF >rearranged/text &&
rearranged line #0
rearranged line #1
rearranged line #2
rearranged line #3
rearranged line #4
rearranged line #5
rearranged line #6
rearranged line #7
rearranged line #8
rearranged line #9
EOF
cat <<EOF >src/copy/unchanged/text &&
copy unchanged line #0
copy unchanged line #1
copy unchanged line #2
copy unchanged line #3
copy unchanged line #4
copy unchanged line #5
copy unchanged line #6
copy unchanged line #7
copy unchanged line #8
copy unchanged line #9
EOF
cat <<EOF >src/copy/changed/text &&
copy changed line #0
copy changed line #1
copy changed line #2
copy changed line #3
copy changed line #4
copy changed line #5
copy changed line #6
copy changed line #7
copy changed line #8
copy changed line #9
EOF
cat <<EOF >src/copy/rearranged/text &&
copy rearranged line #0
copy rearranged line #1
copy rearranged line #2
copy rearranged line #3
copy rearranged line #4
copy rearranged line #5
copy rearranged line #6
copy rearranged line #7
copy rearranged line #8
copy rearranged line #9
EOF
cat <<EOF >src/move/unchanged/text &&
move unchanged line #0
move unchanged line #1
move unchanged line #2
move unchanged line #3
move unchanged line #4
move unchanged line #5
move unchanged line #6
move unchanged line #7
move unchanged line #8
move unchanged line #9
EOF
cat <<EOF >src/move/changed/text &&
move changed line #0
move changed line #1
move changed line #2
move changed line #3
move changed line #4
move changed line #5
move changed line #6
move changed line #7
move changed line #8
move changed line #9
EOF
cat <<EOF >src/move/rearranged/text &&
move rearranged line #0
move rearranged line #1
move rearranged line #2
move rearranged line #3
move rearranged line #4
move rearranged line #5
move rearranged line #6
move rearranged line #7
move rearranged line #8
move rearranged line #9
EOF
git add . &&
git commit -m "initial" &&
mkdir dst &&
mkdir dst/copy &&
mkdir dst/copy/unchanged &&
mkdir dst/copy/changed &&
mkdir dst/copy/rearranged &&
mkdir dst/move &&
mkdir dst/move/unchanged &&
mkdir dst/move/changed &&
mkdir dst/move/rearranged &&
cat <<EOF >changed/text &&
CHANGED XXXXXXX line #0
changed line #1
changed line #2
changed line #3
changed line #4
changed line #5
changed line #6
changed line #7
changed line #8
changed line #9
EOF
cat <<EOF >rearranged/text &&
rearranged line #1
rearranged line #0
rearranged line #2
rearranged line #3
rearranged line #4
rearranged line #5
rearranged line #6
rearranged line #7
rearranged line #8
rearranged line #9
EOF
cat <<EOF >dst/copy/unchanged/text &&
copy unchanged line #0
copy unchanged line #1
copy unchanged line #2
copy unchanged line #3
copy unchanged line #4
copy unchanged line #5
copy unchanged line #6
copy unchanged line #7
copy unchanged line #8
copy unchanged line #9
EOF
cat <<EOF >dst/copy/changed/text &&
copy XXXCHANGED line #0
copy changed line #1
copy changed line #2
copy changed line #3
copy changed line #4
copy changed line #5
copy changed line #6
copy changed line #7
copy changed line #8
copy changed line #9
EOF
cat <<EOF >dst/copy/rearranged/text &&
copy rearranged line #1
copy rearranged line #0
copy rearranged line #2
copy rearranged line #3
copy rearranged line #4
copy rearranged line #5
copy rearranged line #6
copy rearranged line #7
copy rearranged line #8
copy rearranged line #9
EOF
cat <<EOF >dst/move/unchanged/text &&
move unchanged line #0
move unchanged line #1
move unchanged line #2
move unchanged line #3
move unchanged line #4
move unchanged line #5
move unchanged line #6
move unchanged line #7
move unchanged line #8
move unchanged line #9
EOF
cat <<EOF >dst/move/changed/text &&
move XXXCHANGED line #0
move changed line #1
move changed line #2
move changed line #3
move changed line #4
move changed line #5
move changed line #6
move changed line #7
move changed line #8
move changed line #9
EOF
cat <<EOF >dst/move/rearranged/text &&
move rearranged line #1
move rearranged line #0
move rearranged line #2
move rearranged line #3
move rearranged line #4
move rearranged line #5
move rearranged line #6
move rearranged line #7
move rearranged line #8
move rearranged line #9
EOF
git add . &&
git rm -r src/move/unchanged &&
git rm -r src/move/changed &&
git rm -r src/move/rearranged &&
git commit -m "changes" &&
git config diff.renames false
[master (root-commit) 7dc5ecb] initial
Author: A U Thor <author@example.com>
9 files changed, 90 insertions(+)
create mode 100644 changed/text
create mode 100644 rearranged/text
create mode 100644 src/copy/changed/text
create mode 100644 src/copy/rearranged/text
create mode 100644 src/copy/unchanged/text
create mode 100644 src/move/changed/text
create mode 100644 src/move/rearranged/text
create mode 100644 src/move/unchanged/text
create mode 100644 unchanged/text
rm 'src/move/unchanged/text'
rm 'src/move/changed/text'
rm 'src/move/rearranged/text'
[master c1d1158] changes
Author: A U Thor <author@example.com>
8 files changed, 34 insertions(+), 4 deletions(-)
create mode 100644 dst/copy/changed/text
create mode 100644 dst/copy/rearranged/text
create mode 100644 dst/copy/unchanged/text
rename {src => dst}/move/changed/text (90%)
rename {src => dst}/move/rearranged/text (100%)
rename {src => dst}/move/unchanged/text (100%)
ok 1 - setup
expecting success:
git diff --numstat HEAD^..HEAD >actual_diff_stat &&
test_cmp expect_diff_stat actual_diff_stat &&
git diff --numstat -M HEAD^..HEAD >actual_diff_stat_M &&
test_cmp expect_diff_stat_M actual_diff_stat_M &&
git diff --numstat -C -C HEAD^..HEAD >actual_diff_stat_CC &&
test_cmp expect_diff_stat_CC actual_diff_stat_CC
ok 2 - sanity check setup (--numstat)
expecting success:
test_must_fail git show --dirstat10 &&
test_must_fail git show --dirstat10,files &&
test_must_fail git show -X=20 &&
test_must_fail git show -X=20,cumulative
fatal: unrecognized argument: --dirstat10
fatal: unrecognized argument: --dirstat10,files
fatal: Failed to parse --dirstat/-X option parameter:
Unknown dirstat parameter '=20'
fatal: Failed to parse --dirstat/-X option parameter:
Unknown dirstat parameter '=20'
ok 3 - various ways to misspell --dirstat
expecting success:
git diff --dirstat HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 4 - vanilla --dirstat
expecting success:
git diff -X HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff -X -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff -X -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 5 - vanilla -X
expecting success:
git diff --dirstat=changes,noncumulative,3 HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat=changes,noncumulative,3 -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat=changes,noncumulative,3 -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 6 - explicit defaults: --dirstat=changes,noncumulative,3
expecting success:
git diff -Xchanges,noncumulative,3 HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff -Xchanges,noncumulative,3 -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff -Xchanges,noncumulative,3 -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 7 - explicit defaults: -Xchanges,noncumulative,3
expecting success:
git diff --dirstat=files,10,cumulative,changes,noncumulative,3 HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat=files,10,cumulative,changes,noncumulative,3 -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat=files,10,cumulative,changes,noncumulative,3 -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC &&
git diff --dirstat=files --dirstat=10 --dirstat=cumulative --dirstat=changes --dirstat=noncumulative -X3 HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat=files --dirstat=10 --dirstat=cumulative --dirstat=changes --dirstat=noncumulative -X3 -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat=files --dirstat=10 --dirstat=cumulative --dirstat=changes --dirstat=noncumulative -X3 -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 8 - later options override earlier options:
expecting success:
git -c diff.dirstat=files,cumulative,50 diff --dirstat=changes,noncumulative,3 HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git -c diff.dirstat=files,cumulative,50 diff --dirstat=changes,noncumulative,3 -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git -c diff.dirstat=files,cumulative,50 diff --dirstat=changes,noncumulative,3 -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 9 - non-defaults in config overridden by explicit defaults on command line
expecting success:
git diff --dirstat=0 HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat=0 -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat=0 -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 10 - --dirstat=0
expecting success:
git diff -X0 HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff -X0 -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff -X0 -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 11 - -X0
expecting success:
git -c diff.dirstat=0 diff --dirstat HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git -c diff.dirstat=0 diff --dirstat -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git -c diff.dirstat=0 diff --dirstat -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 12 - diff.dirstat=0
expecting success:
git diff --dirstat=0 --cumulative HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat=0 --cumulative -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat=0 --cumulative -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 13 - --dirstat=0 --cumulative
expecting success:
git diff --dirstat=0,cumulative HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat=0,cumulative -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat=0,cumulative -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 14 - --dirstat=0,cumulative
expecting success:
git diff -X0,cumulative HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff -X0,cumulative -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff -X0,cumulative -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 15 - -X0,cumulative
expecting success:
git -c diff.dirstat=0,cumulative diff --dirstat HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git -c diff.dirstat=0,cumulative diff --dirstat -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git -c diff.dirstat=0,cumulative diff --dirstat -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 16 - diff.dirstat=0,cumulative
expecting success:
git -c diff.dirstat=0 diff --dirstat=cumulative HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git -c diff.dirstat=0 diff --dirstat=cumulative -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git -c diff.dirstat=0 diff --dirstat=cumulative -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 17 - diff.dirstat=0 & --dirstat=cumulative
expecting success:
git diff --dirstat-by-file HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat-by-file -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat-by-file -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 18 - --dirstat-by-file
expecting success:
git diff --dirstat=files HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat=files -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat=files -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 19 - --dirstat=files
expecting success:
git -c diff.dirstat=files diff --dirstat HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git -c diff.dirstat=files diff --dirstat -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git -c diff.dirstat=files diff --dirstat -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 20 - diff.dirstat=files
expecting success:
git diff --dirstat-by-file=10 HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat-by-file=10 -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat-by-file=10 -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 21 - --dirstat-by-file=10
expecting success:
git diff --dirstat=files,10 HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat=files,10 -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat=files,10 -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 22 - --dirstat=files,10
expecting success:
git -c diff.dirstat=10,files diff --dirstat HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git -c diff.dirstat=10,files diff --dirstat -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git -c diff.dirstat=10,files diff --dirstat -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 23 - diff.dirstat=10,files
expecting success:
git diff --dirstat-by-file --cumulative HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat-by-file --cumulative -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat-by-file --cumulative -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 24 - --dirstat-by-file --cumulative
expecting success:
git diff --dirstat=files,cumulative HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat=files,cumulative -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat=files,cumulative -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 25 - --dirstat=files,cumulative
expecting success:
git -c diff.dirstat=cumulative,files diff --dirstat HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git -c diff.dirstat=cumulative,files diff --dirstat -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git -c diff.dirstat=cumulative,files diff --dirstat -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 26 - diff.dirstat=cumulative,files
expecting success:
git diff --dirstat=files,cumulative,10 HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat=files,cumulative,10 -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat=files,cumulative,10 -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 27 - --dirstat=files,cumulative,10
expecting success:
git -c diff.dirstat=10,cumulative,files diff --dirstat HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git -c diff.dirstat=10,cumulative,files diff --dirstat -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git -c diff.dirstat=10,cumulative,files diff --dirstat -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 28 - diff.dirstat=10,cumulative,files
expecting success:
git diff --dirstat=files,cumulative,16.7 HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat=files,cumulative,16.7 -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat=files,cumulative,16.7 -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 29 - --dirstat=files,cumulative,16.7
expecting success:
git -c diff.dirstat=16.7,cumulative,files diff --dirstat HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git -c diff.dirstat=16.7,cumulative,files diff --dirstat -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git -c diff.dirstat=16.7,cumulative,files diff --dirstat -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 30 - diff.dirstat=16.7,cumulative,files
expecting success:
git -c diff.dirstat=16.70,cumulative,files diff --dirstat HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git -c diff.dirstat=16.70,cumulative,files diff --dirstat -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git -c diff.dirstat=16.70,cumulative,files diff --dirstat -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 31 - diff.dirstat=16.70,cumulative,files
expecting success:
git diff --dirstat=files,cumulative,27.2 HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat=files,cumulative,27.2 -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat=files,cumulative,27.2 -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 32 - --dirstat=files,cumulative,27.2
expecting success:
git diff --dirstat=files,cumulative,27.09 HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat=files,cumulative,27.09 -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat=files,cumulative,27.09 -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 33 - --dirstat=files,cumulative,27.09
expecting success:
git diff --dirstat=lines HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat=lines -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat=lines -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 34 - --dirstat=lines
expecting success:
git -c diff.dirstat=lines diff --dirstat HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git -c diff.dirstat=lines diff --dirstat -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git -c diff.dirstat=lines diff --dirstat -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 35 - diff.dirstat=lines
expecting success:
git diff --dirstat=lines,0 HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git diff --dirstat=lines,0 -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git diff --dirstat=lines,0 -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 36 - --dirstat=lines,0
expecting success:
git -c diff.dirstat=0,lines diff --dirstat HEAD^..HEAD >actual_diff_dirstat &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
git -c diff.dirstat=0,lines diff --dirstat -M HEAD^..HEAD >actual_diff_dirstat_M &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
git -c diff.dirstat=0,lines diff --dirstat -C -C HEAD^..HEAD >actual_diff_dirstat_CC &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC
ok 37 - diff.dirstat=0,lines
expecting success:
test_must_fail git diff --dirstat=future_param,lines,0 HEAD^..HEAD >actual_diff_dirstat 2>actual_error &&
test_debug "cat actual_error" &&
test_must_be_empty actual_diff_dirstat &&
test_i18ngrep -q "future_param" actual_error &&
test_i18ngrep -q "\--dirstat" actual_error
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 38 - --dirstat=future_param,lines,0 should fail loudly
expecting success:
test_must_fail git diff --dirstat=dummy1,cumulative,2dummy HEAD^..HEAD >actual_diff_dirstat 2>actual_error &&
test_debug "cat actual_error" &&
test_must_be_empty actual_diff_dirstat &&
test_i18ngrep -q "dummy1" actual_error &&
test_i18ngrep -q "2dummy" actual_error &&
test_i18ngrep -q "\--dirstat" actual_error
ok 39 - --dirstat=dummy1,cumulative,2dummy should report both unrecognized parameters
expecting success:
git -c diff.dirstat=future_param,0,lines diff --dirstat HEAD^..HEAD >actual_diff_dirstat 2>actual_error &&
test_debug "cat actual_error" &&
test_cmp expect_diff_dirstat actual_diff_dirstat &&
test_i18ngrep -q "future_param" actual_error &&
test_i18ngrep -q "diff\\.dirstat" actual_error &&
git -c diff.dirstat=future_param,0,lines diff --dirstat -M HEAD^..HEAD >actual_diff_dirstat_M 2>actual_error &&
test_debug "cat actual_error" &&
test_cmp expect_diff_dirstat_M actual_diff_dirstat_M &&
test_i18ngrep -q "future_param" actual_error &&
test_i18ngrep -q "diff\\.dirstat" actual_error &&
git -c diff.dirstat=future_param,0,lines diff --dirstat -C -C HEAD^..HEAD >actual_diff_dirstat_CC 2>actual_error &&
test_debug "cat actual_error" &&
test_cmp expect_diff_dirstat_CC actual_diff_dirstat_CC &&
test_i18ngrep -q "future_param" actual_error &&
test_i18ngrep -q "diff\\.dirstat" actual_error
ok 40 - diff.dirstat=future_param,0,lines should warn, but still work
expecting success:
git diff --shortstat --dirstat=changes HEAD^..HEAD >out &&
grep " dst/copy/changed/$" out >actual_diff_shortstat_dirstat_changes &&
test_line_count = 1 actual_diff_shortstat_dirstat_changes &&
git diff --shortstat --dirstat=lines HEAD^..HEAD >out &&
grep " dst/copy/changed/$" out >actual_diff_shortstat_dirstat_lines &&
test_line_count = 1 actual_diff_shortstat_dirstat_lines &&
git diff --shortstat --dirstat=files HEAD^..HEAD >out &&
grep " dst/copy/changed/$" out >actual_diff_shortstat_dirstat_files &&
test_line_count = 1 actual_diff_shortstat_dirstat_files
ok 41 - --shortstat --dirstat should output only one dirstat
# passed all 41 test(s)
1..41
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4051-diff-function-context.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4051-diff-function-context/.git/
expecting success:
cat "$dir/includes.c" "$dir/dummy.c" "$dir/dummy.c" "$dir/hello.c" \
"$dir/dummy.c" "$dir/dummy.c" >file.c &&
commit_and_tag initial file.c &&
grep -v "delete me from hello" <file.c >file.c.new &&
mv file.c.new file.c &&
commit_and_tag changed_hello file.c &&
grep -v "delete me from includes" <file.c >file.c.new &&
mv file.c.new file.c &&
commit_and_tag changed_includes file.c &&
cat "$dir/appended1.c" >>file.c &&
commit_and_tag appended file.c &&
cat "$dir/appended2.c" >>file.c &&
commit_and_tag extended file.c &&
grep -v "Begin of second part" <file.c >file.c.new &&
mv file.c.new file.c &&
commit_and_tag long_common_tail file.c &&
git checkout initial &&
cat "$dir/hello.c" "$dir/dummy.c" >file.c &&
commit_and_tag hello_dummy file.c &&
# overlap function context of 1st change and -u context of 2nd change
grep -v "delete me from hello" <"$dir/hello.c" >file.c &&
sed "2a\\
extra line" <"$dir/dummy.c" >>file.c &&
commit_and_tag changed_hello_dummy file.c &&
git checkout initial &&
grep -v "delete me from hello" <file.c >file.c.new &&
mv file.c.new file.c &&
cat "$dir/appended1.c" >>file.c &&
commit_and_tag changed_hello_appended file.c
[master (root-commit) 9f6e181] initial
Author: A U Thor <author@example.com>
1 file changed, 72 insertions(+)
create mode 100644 file.c
[master 5e132d0] changed_hello
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
[master 964b054] changed_includes
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
[master d0cff11] appended
Author: A U Thor <author@example.com>
1 file changed, 15 insertions(+)
[master d16114c] extended
Author: A U Thor <author@example.com>
1 file changed, 35 insertions(+)
[master fa474ba] long_common_tail
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
Note: switching to 'initial'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 9f6e181 initial
[detached HEAD cf16009] hello_dummy
Author: A U Thor <author@example.com>
1 file changed, 31 insertions(+), 72 deletions(-)
rewrite file.c (61%)
[detached HEAD d307f65] changed_hello_dummy
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Previous HEAD position was d307f65 changed_hello_dummy
HEAD is now at 9f6e181 initial
[detached HEAD aca4ec7] changed_hello_appended
Author: A U Thor <author@example.com>
1 file changed, 15 insertions(+), 1 deletion(-)
ok 1 - setup
expecting success:
git diff $options "$name^" "$name" >"$name.diff"
ok 2 - changed function
expecting success:
test_when_finished "git reset --hard" &&
git checkout --detach "$name^" &&
git apply --index "$name.diff" &&
git diff --exit-code "$name"
Previous HEAD position was aca4ec7 changed_hello_appended
HEAD is now at 9f6e181 initial
HEAD is now at 9f6e181 initial
ok 3 - diff applies
expecting success:
grep "^ .*Hello comment" changed_hello.diff
* Hello comment.
ok 4 - context includes comment
expecting success:
grep "^ .*Begin of hello" changed_hello.diff
static void hello(void) // Begin of hello
ok 5 - context includes begin
expecting success:
grep "^ .*End of hello" changed_hello.diff
} // End of hello
ok 6 - context includes end
expecting success:
test $(grep -c "^[ +-].*Begin" changed_hello.diff) -le 1
ok 7 - context does not include other functions
expecting success:
test "$(first_context_line <changed_hello.diff)" != " "
ok 8 - context does not include preceding empty lines
expecting success:
test "$(last_context_line <changed_hello.diff)" != " "
ok 9 - context does not include trailing empty lines
expecting success:
git diff $options "$name^" "$name" >"$name.diff"
ok 10 - changed includes
expecting success:
test_when_finished "git reset --hard" &&
git checkout --detach "$name^" &&
git apply --index "$name.diff" &&
git diff --exit-code "$name"
Previous HEAD position was 9f6e181 initial
HEAD is now at 5e132d0 changed_hello
HEAD is now at 5e132d0 changed_hello
ok 11 - diff applies
expecting success:
grep "^ .*Begin.h" changed_includes.diff
#include <Begin.h>
ok 12 - context includes begin
expecting success:
grep "^ .*End.h" changed_includes.diff
#include <End.h>
ok 13 - context includes end
expecting success:
test $(grep -c "^[ +-].*Begin" changed_includes.diff) -le 1
ok 14 - context does not include other functions
expecting success:
test "$(last_context_line <changed_includes.diff)" != " "
ok 15 - context does not include trailing empty lines
expecting success:
git diff $options "$name^" "$name" >"$name.diff"
ok 16 - appended function
expecting success:
test_when_finished "git reset --hard" &&
git checkout --detach "$name^" &&
git apply --index "$name.diff" &&
git diff --exit-code "$name"
Previous HEAD position was 5e132d0 changed_hello
HEAD is now at 964b054 changed_includes
HEAD is now at 964b054 changed_includes
ok 17 - diff applies
expecting success:
grep "^[+].*Begin of first part" appended.diff
+int appended(void) // Begin of first part
ok 18 - context includes begin
expecting success:
grep "^[+].*End of first part" appended.diff
+ printf("End of first part\n");
ok 19 - context includes end
expecting success:
test $(grep -c "^[ +-].*Begin" appended.diff) -le 1
ok 20 - context does not include other functions
expecting success:
git diff $options "$name^" "$name" >"$name.diff"
ok 21 - appended function part
expecting success:
test_when_finished "git reset --hard" &&
git checkout --detach "$name^" &&
git apply --index "$name.diff" &&
git diff --exit-code "$name"
Previous HEAD position was 964b054 changed_includes
HEAD is now at d0cff11 appended
HEAD is now at d0cff11 appended
ok 22 - diff applies
expecting success:
grep "^ .*Begin of first part" extended.diff
int appended(void) // Begin of first part
ok 23 - context includes begin
expecting success:
grep "^[+].*End of second part" extended.diff
+} // End of second part
ok 24 - context includes end
expecting success:
test $(grep -c "^[ +-].*Begin" extended.diff) -le 2
ok 25 - context does not include other functions
expecting success:
test "$(first_context_line <extended.diff)" != " "
ok 26 - context does not include preceding empty lines
expecting success:
git diff $options "$name^" "$name" >"$name.diff"
ok 27 - change with long common tail and no context
expecting success:
test_when_finished "git reset --hard" &&
git checkout --detach "$name^" &&
git apply --index "$name.diff" &&
git diff --exit-code "$name"
Previous HEAD position was d0cff11 appended
HEAD is now at d16114c extended
HEAD is now at d16114c extended
ok 28 - diff applies
expecting success:
grep "^ .*Begin of first part" long_common_tail.diff
int appended(void) // Begin of first part
ok 29 - context includes begin
expecting success:
grep "^ .*End of second part" long_common_tail.diff
} // End of second part
ok 30 - context includes end
expecting success:
test $(grep -c "^[ +-].*Begin" long_common_tail.diff) -le 2
ok 31 - context does not include other functions
expecting success:
test "$(first_context_line <long_common_tail.diff)" != " "
ok 32 - context does not include preceding empty lines
expecting success:
git diff $options "$name^" "$name" >"$name.diff"
ok 33 - changed function plus appended function
expecting success:
test_when_finished "git reset --hard" &&
git checkout --detach "$name^" &&
git apply --index "$name.diff" &&
git diff --exit-code "$name"
Previous HEAD position was d16114c extended
HEAD is now at 9f6e181 initial
HEAD is now at 9f6e181 initial
ok 34 - diff applies
expecting success:
grep "^ .*Begin of hello" changed_hello_appended.diff &&
grep "^[+].*Begin of first part" changed_hello_appended.diff
static void hello(void) // Begin of hello
+int appended(void) // Begin of first part
ok 35 - context includes begin
expecting success:
grep "^ .*End of hello" changed_hello_appended.diff &&
grep "^[+].*End of first part" changed_hello_appended.diff
} // End of hello
+ printf("End of first part\n");
ok 36 - context includes end
expecting success:
test $(grep -c "^[ +-].*Begin" changed_hello_appended.diff) -le 2
ok 37 - context does not include other functions
expecting success:
git diff $options "$name^" "$name" >"$name.diff"
ok 38 - changed two consecutive functions
expecting success:
test_when_finished "git reset --hard" &&
git checkout --detach "$name^" &&
git apply --index "$name.diff" &&
git diff --exit-code "$name"
Previous HEAD position was 9f6e181 initial
HEAD is now at cf16009 hello_dummy
HEAD is now at cf16009 hello_dummy
ok 39 - diff applies
expecting success:
grep "^ .*Begin of hello" changed_hello_dummy.diff &&
grep "^ .*Begin of dummy" changed_hello_dummy.diff
static void hello(void) // Begin of hello
static int dummy(void) // Begin of dummy
ok 40 - context includes begin
expecting success:
grep "^ .*End of hello" changed_hello_dummy.diff &&
grep "^ .*End of dummy" changed_hello_dummy.diff
} // End of hello
} // End of dummy
ok 41 - context includes end
expecting success:
test $(grep -c "^@@" changed_hello_dummy.diff) -eq 1
ok 42 - overlapping hunks are merged
# passed all 42 test(s)
1..42
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4055-diff-context.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4055-diff-context/.git/
expecting success:
cat >template <<-\EOF &&
firstline
b
c
d
e
f
preline
TARGET
postline
i
j
k
l
m
n
EOF
sed "/TARGET/d" >x <template &&
git update-index --add x &&
git commit -m initial &&
sed "s/TARGET/ADDED/" >x <template &&
git update-index --add x &&
git commit -m next &&
sed "s/TARGET/MODIFIED/" >x <template
[master (root-commit) f8e0def] initial
Author: A U Thor <author@example.com>
1 file changed, 14 insertions(+)
create mode 100644 x
[master 75a35f8] next
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
git diff >output &&
! grep "^ d" output &&
grep "^ e" output &&
grep "^ j" output &&
! grep "^ k" output
e
j
ok 2 - the default number of context lines is 3
expecting success:
git log -1 -p >output &&
! grep firstline output &&
git config diff.context 8 &&
git log -1 -p >output &&
grep "^ firstline" output
firstline
ok 3 - diff.context honored by "log"
expecting success:
git config diff.context 8 &&
git log -U4 -1 >output &&
! grep "^ firstline" output
ok 4 - The -U option overrides diff.context
expecting success:
git config diff.context 8 &&
git diff >output &&
grep "^ firstline" output
firstline
ok 5 - diff.context honored by "diff"
expecting success:
git config diff.context 8 &&
git diff-files -p >output &&
! grep "^ firstline" output
ok 6 - plumbing not affected
expecting success:
git config diff.context no &&
test_must_fail git diff 2>output &&
test_i18ngrep "bad numeric config value" output
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: bad numeric config value 'no' for 'diff.context': invalid unit
ok 7 - non-integer config parsing
expecting success:
git config diff.context -1 &&
test_must_fail git diff 2>output &&
test_i18ngrep "bad config variable" output
fatal: bad config variable 'diff.context' in file '.git/config' at line 7
ok 8 - negative integer config parsing
expecting success:
git config diff.context 0 &&
git diff >output &&
grep "^-ADDED" output &&
grep "^+MODIFIED" output
-ADDED
+MODIFIED
ok 9 - -U0 is valid, so is diff.context=0
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4056-diff-order.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4056-diff-order/.git/
expecting success:
mkdir c &&
create_files 1 &&
create_files 2 &&
cat >order_file_1 <<-\EOF &&
*Makefile
*.txt
*.h
EOF
cat >order_file_2 <<-\EOF &&
*Makefile
*.h
*.c
EOF
cat >expect_none <<-\EOF &&
a.h
b.c
c/Makefile
d.txt
EOF
cat >expect_1 <<-\EOF &&
c/Makefile
d.txt
a.h
b.c
EOF
cat >expect_2 <<-\EOF
c/Makefile
a.h
b.c
d.txt
EOF
[master (root-commit) 362bf65] 1
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 a.h
create mode 100644 b.c
create mode 100644 c/Makefile
create mode 100644 d.txt
[master bab7d31] 2
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+), 4 deletions(-)
ok 1 - setup
expecting success:
git diff --name-only HEAD^..HEAD >actual &&
test_cmp expect_none actual
ok 2 - no order (=tree object order)
expecting success:
rm -f bogus_file &&
test_must_fail git diff -Obogus_file --name-only HEAD^..HEAD
fatal: failed to read orderfile 'bogus_file': No such file or directory
ok 3 - missing orderfile
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 -r SANETESTD.1/x &&
chmod -rx SANETESTD.2 ||
BUG "cannot prepare SANETESTD"
! test -r SANETESTD.1/x &&
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
BUG "cannot clean SANETESTD"
return $status
)
rm: cannot remove 'SANETESTD.1/x': Permission denied
prerequisite SANITY ok
expecting success:
>unreadable_file &&
chmod -r unreadable_file &&
test_must_fail git diff -Ounreadable_file --name-only HEAD^..HEAD
fatal: failed to read orderfile 'unreadable_file': Permission denied
ok 4 - unreadable orderfile
expecting success:
mkdir subdir &&
git -C subdir diff -O../order_file_1 --output ../actual --name-only HEAD^..HEAD &&
test_cmp expect_1 actual
ok 5 - orderfile using option from subdir with --output
expecting success:
git diff -Oorder_file_$i --name-only HEAD^..HEAD >actual &&
test_cmp expect_$i actual
ok 6 - orderfile using option (1)
checking prerequisite: PIPE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports FIFOs
test_have_prereq !MINGW,!CYGWIN &&
rm -f testfifo && mkfifo testfifo
)
prerequisite PIPE ok
expecting success:
rm -f order_fifo &&
mkfifo order_fifo &&
{
cat order_file_$i >order_fifo &
} &&
git diff -O order_fifo --name-only HEAD^..HEAD >actual &&
wait &&
test_cmp expect_$i actual
ok 7 - orderfile is fifo (1)
expecting success:
git -c diff.orderfile=order_file_$i diff --name-only HEAD^..HEAD >actual &&
test_cmp expect_$i actual
ok 8 - orderfile using config (1)
expecting success:
git -c diff.orderfile=order_file_$i diff -O/dev/null --name-only HEAD^..HEAD >actual &&
test_cmp expect_none actual
ok 9 - cancelling configured orderfile (1)
expecting success:
git diff -Oorder_file_$i --name-only HEAD^..HEAD >actual &&
test_cmp expect_$i actual
ok 10 - orderfile using option (2)
expecting success:
rm -f order_fifo &&
mkfifo order_fifo &&
{
cat order_file_$i >order_fifo &
} &&
git diff -O order_fifo --name-only HEAD^..HEAD >actual &&
wait &&
test_cmp expect_$i actual
ok 11 - orderfile is fifo (2)
expecting success:
git -c diff.orderfile=order_file_$i diff --name-only HEAD^..HEAD >actual &&
test_cmp expect_$i actual
ok 12 - orderfile using config (2)
expecting success:
git -c diff.orderfile=order_file_$i diff -O/dev/null --name-only HEAD^..HEAD >actual &&
test_cmp expect_none actual
ok 13 - cancelling configured orderfile (2)
expecting success:
git checkout -b tmp HEAD~ &&
create_files 3 &&
git checkout master &&
git merge --no-commit -s ours tmp &&
create_files 5
Switched to a new branch 'tmp'
[tmp f15def3] 3
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+), 4 deletions(-)
Switched to branch 'master'
Automatic merge went well; stopped before committing as requested
[master 123e4ea] 5
Author: A U Thor <author@example.com>
ok 14 - setup for testing combine-diff order
expecting success:
git diff --name-only HEAD HEAD^ HEAD^2 >actual &&
test_cmp expect_none actual
ok 15 - combine-diff: no order (=tree object order)
expecting success:
git diff -Oorder_file_$i --name-only HEAD HEAD^ HEAD^2 >actual &&
test_cmp expect_$i actual
ok 16 - combine-diff: orderfile using option (1)
expecting success:
git diff -Oorder_file_$i --name-only HEAD HEAD^ HEAD^2 >actual &&
test_cmp expect_$i actual
ok 17 - combine-diff: orderfile using option (2)
# passed all 17 test(s)
1..17
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4058-diff-duplicates.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4058-diff-duplicates/.git/
expecting success:
blob_one=$(echo one | git hash-object -w --stdin) &&
blob_two=$(echo two | git hash-object -w --stdin) &&
inner_one_a=$(make_tree \
100644 inner $blob_one
) &&
inner_one_b=$(make_tree \
100644 inner $blob_two \
100644 inner $blob_two \
100644 inner $blob_two
) &&
outer_one=$(make_tree \
040000 outer $inner_one_a \
040000 outer $inner_one_b
) &&
inner_two=$(make_tree \
100644 inner $blob_one \
100644 inner $blob_two \
100644 inner $blob_two \
100644 inner $blob_two
) &&
outer_two=$(make_tree \
040000 outer $inner_two
) &&
git tag one $outer_one &&
git tag two $outer_two
ok 1 - create trees with duplicate entries
expecting success:
{
printf ":000000 100644 $ZERO_OID $blob_two A\touter/inner\n" &&
printf ":000000 100644 $ZERO_OID $blob_two A\touter/inner\n" &&
printf ":000000 100644 $ZERO_OID $blob_two A\touter/inner\n" &&
printf ":100644 000000 $blob_two $ZERO_OID D\touter/inner\n" &&
printf ":100644 000000 $blob_two $ZERO_OID D\touter/inner\n" &&
printf ":100644 000000 $blob_two $ZERO_OID D\touter/inner\n"
} >expect &&
git diff-tree -r --no-abbrev one two >actual &&
test_cmp expect actual
ok 2 - diff-tree between trees
expecting success:
# same expectation as above, since we disable rename detection
git diff-tree -M -r --no-abbrev one two >actual &&
test_cmp expect actual
warning: skipping rename detection, detected duplicate destination 'outer/inner'
ok 3 - diff-tree with renames
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4057-diff-combined-paths.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4057-diff-combined-paths/.git/
expecting success:
for i in $(test_seq 1 9)
do
echo $i >$i.txt &&
git add $i.txt
done &&
git commit -m "init" &&
git checkout -b side &&
for i in $(test_seq 2 9)
do
echo $i/2 >>$i.txt
done &&
git commit -a -m "side 2-9" &&
git checkout master &&
echo 1/2 >1.txt &&
git commit -a -m "master 1" &&
git merge side &&
>diffc.expect &&
diffc_verify
[master (root-commit) 3153342] init
Author: A U Thor <author@example.com>
9 files changed, 9 insertions(+)
create mode 100644 1.txt
create mode 100644 2.txt
create mode 100644 3.txt
create mode 100644 4.txt
create mode 100644 5.txt
create mode 100644 6.txt
create mode 100644 7.txt
create mode 100644 8.txt
create mode 100644 9.txt
Switched to a new branch 'side'
[side cebc8c3] side 2-9
Author: A U Thor <author@example.com>
8 files changed, 8 insertions(+)
Switched to branch 'master'
[master d51f247] master 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Merging:
d51f247 master 1
virtual side
found 1 common ancestor:
3153342 init
Merge made by the 'recursive' strategy.
2.txt | 1 +
3.txt | 1 +
4.txt | 1 +
5.txt | 1 +
6.txt | 1 +
7.txt | 1 +
8.txt | 1 +
9.txt | 1 +
8 files changed, 8 insertions(+)
ok 1 - trivial merge - combine-diff empty
expecting success:
git checkout side &&
for i in $(test_seq 2 9)
do
echo $i/3 >>$i.txt
done &&
echo "4side" >>4.txt &&
git commit -a -m "side 2-9 +4" &&
git checkout master &&
for i in $(test_seq 1 9)
do
echo $i/3 >>$i.txt
done &&
echo "4master" >>4.txt &&
git commit -a -m "master 1-9 +4" &&
test_must_fail git merge side &&
cat <<-\EOF >4.txt &&
4
4/2
4/3
4master
4side
EOF
git add 4.txt &&
git commit -m "merge side (2)" &&
echo 4.txt >diffc.expect &&
diffc_verify
Switched to branch 'side'
[side 20dd858] side 2-9 +4
Author: A U Thor <author@example.com>
8 files changed, 9 insertions(+)
Switched to branch 'master'
[master 96b045f] master 1-9 +4
Author: A U Thor <author@example.com>
9 files changed, 10 insertions(+)
Merging:
96b045f master 1-9 +4
virtual side
found 1 common ancestor:
cebc8c3 side 2-9
Auto-merging 4.txt
CONFLICT (content): Merge conflict in 4.txt
Automatic merge failed; fix conflicts and then commit the result.
[master a27a041] merge side (2)
Author: A U Thor <author@example.com>
ok 2 - only one trully conflicting path
expecting success:
git checkout side &&
for i in $(test_seq 5 9)
do
echo $i/4 >>$i.txt
done &&
git commit -a -m "side 5-9" &&
git checkout master &&
for i in $(test_seq 1 3)
do
echo $i/4 >>$i.txt
done &&
git commit -a -m "master 1-3 +4hello" &&
git merge side &&
echo "Hello World" >4hello.txt &&
git add 4hello.txt &&
git commit --amend &&
echo 4hello.txt >diffc.expect &&
diffc_verify
Switched to branch 'side'
[side 56d8b25] side 5-9
Author: A U Thor <author@example.com>
5 files changed, 5 insertions(+)
Switched to branch 'master'
[master e6be357] master 1-3 +4hello
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
Merging:
e6be357 master 1-3 +4hello
virtual side
found 1 common ancestor:
20dd858 side 2-9 +4
Merge made by the 'recursive' strategy.
5.txt | 1 +
6.txt | 1 +
7.txt | 1 +
8.txt | 1 +
9.txt | 1 +
5 files changed, 5 insertions(+)
[master 6dbd4a7] Merge branch 'side'
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:29:11 2019 +0000
ok 3 - merge introduces new file
expecting success:
git checkout side &&
for i in $(test_seq 5 9)
do
echo $i/5 >>$i.txt
done &&
git commit -a -m "side 5-9" &&
git checkout master &&
for i in $(test_seq 1 3)
do
echo $i/4 >>$i.txt
done &&
git commit -a -m "master 1-3" &&
git merge side &&
git rm 4.txt &&
git commit --amend &&
echo 4.txt >diffc.expect &&
diffc_verify
Switched to branch 'side'
[side 2538673] side 5-9
Author: A U Thor <author@example.com>
5 files changed, 5 insertions(+)
Switched to branch 'master'
[master adac1e5] master 1-3
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
Merging:
adac1e5 master 1-3
virtual side
found 1 common ancestor:
56d8b25 side 5-9
Merge made by the 'recursive' strategy.
5.txt | 1 +
6.txt | 1 +
7.txt | 1 +
8.txt | 1 +
9.txt | 1 +
5 files changed, 5 insertions(+)
rm '4.txt'
[master 94f1dd7] Merge branch 'side'
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:29:11 2019 +0000
ok 4 - merge removed a file
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4052-stat-output.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4052-stat-output/.git/
expecting success:
>"$name" &&
git add "$name" &&
git commit -m message &&
echo a >"$name" &&
git commit -m message "$name"
[master (root-commit) 6648983] message
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
[master 5e1dd87] message
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - preparation
expecting success:
git format-patch -1 --stdout >output &&
grep " | " output >actual &&
test_cmp expect72 actual
ok 2 - format-patch: small change with long name gives more space to the name
expecting success:
git $cmd $args >output &&
grep " | " output >actual &&
test_cmp expect80 actual
ok 3 - diff: small change with long name gives more space to the name
expecting success:
git $cmd $args >output &&
grep " | " output >actual &&
test_cmp expect80 actual
ok 4 - show: small change with long name gives more space to the name
expecting success:
git $cmd $args >output &&
grep " | " output >actual &&
test_cmp expect80 actual
ok 5 - log: small change with long name gives more space to the name
expecting success:
git $cmd $args --stat=40 >output &&
grep " | " output >actual &&
test_cmp $expect.60 actual
ok 6 - format-patch --stat=width: a long name is given more room when the bar is short
expecting success:
git $cmd $args --stat-width=40 >output &&
grep " | " output >actual &&
test_cmp $expect.60 actual
ok 7 - format-patch --stat-width=width with long name
expecting success:
git $cmd $args --stat=60,30 >output &&
grep " | " output >actual &&
test_cmp $expect.6030 actual
ok 8 - format-patch --stat=...,name-width with long name
expecting success:
git $cmd $args --stat-name-width=30 >output &&
grep " | " output >actual &&
test_cmp $expect.6030 actual
ok 9 - format-patch --stat-name-width with long name
expecting success:
git $cmd $args --stat=40 >output &&
grep " | " output >actual &&
test_cmp $expect.60 actual
ok 10 - diff --stat=width: a long name is given more room when the bar is short
expecting success:
git $cmd $args --stat-width=40 >output &&
grep " | " output >actual &&
test_cmp $expect.60 actual
ok 11 - diff --stat-width=width with long name
expecting success:
git $cmd $args --stat=60,30 >output &&
grep " | " output >actual &&
test_cmp $expect.6030 actual
ok 12 - diff --stat=...,name-width with long name
expecting success:
git $cmd $args --stat-name-width=30 >output &&
grep " | " output >actual &&
test_cmp $expect.6030 actual
ok 13 - diff --stat-name-width with long name
expecting success:
git $cmd $args --stat=40 >output &&
grep " | " output >actual &&
test_cmp $expect.60 actual
ok 14 - show --stat=width: a long name is given more room when the bar is short
expecting success:
git $cmd $args --stat-width=40 >output &&
grep " | " output >actual &&
test_cmp $expect.60 actual
ok 15 - show --stat-width=width with long name
expecting success:
git $cmd $args --stat=60,30 >output &&
grep " | " output >actual &&
test_cmp $expect.6030 actual
ok 16 - show --stat=...,name-width with long name
expecting success:
git $cmd $args --stat-name-width=30 >output &&
grep " | " output >actual &&
test_cmp $expect.6030 actual
ok 17 - show --stat-name-width with long name
expecting success:
git $cmd $args --stat=40 >output &&
grep " | " output >actual &&
test_cmp $expect.60 actual
ok 18 - log --stat=width: a long name is given more room when the bar is short
expecting success:
git $cmd $args --stat-width=40 >output &&
grep " | " output >actual &&
test_cmp $expect.60 actual
ok 19 - log --stat-width=width with long name
expecting success:
git $cmd $args --stat=60,30 >output &&
grep " | " output >actual &&
test_cmp $expect.6030 actual
ok 20 - log --stat=...,name-width with long name
expecting success:
git $cmd $args --stat-name-width=30 >output &&
grep " | " output >actual &&
test_cmp $expect.6030 actual
ok 21 - log --stat-name-width with long name
expecting success:
>abcd &&
git add abcd &&
git commit -m message &&
i=0 &&
while test $i -lt 1000
do
echo $i && i=$(($i + 1))
done >abcd &&
git commit -m message abcd
[master 5b5ea7d] message
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 abcd
[master a3d12fd] message
Author: A U Thor <author@example.com>
1 file changed, 1000 insertions(+)
ok 22 - preparation for big change tests
expecting success:
COLUMNS=200 git format-patch -1 --stdout --cover-letter >output &&
grep " | " output >actual &&
test_cmp expect72 actual
ok 23 - format-patch --cover-letter ignores COLUMNS (big change)
expecting success:
COLUMNS=200 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 24 - format-patch ignores COLUMNS (big change)
expecting success:
COLUMNS=200 git $cmd $args --graph >output &&
grep " | " output >actual &&
test_cmp "$expect-graph" actual
ok 25 - format-patch --graph ignores COLUMNS (big change)
expecting success:
COLUMNS=200 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 26 - diff respects COLUMNS (big change)
expecting success:
COLUMNS=200 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 27 - show respects COLUMNS (big change)
expecting success:
COLUMNS=200 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 28 - log respects COLUMNS (big change)
expecting success:
COLUMNS=200 git $cmd $args --graph >output &&
grep " | " output >actual &&
test_cmp "$expect-graph" actual
ok 29 - log --graph respects COLUMNS (big change)
expecting success:
COLUMNS=40 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 30 - format-patch ignores not enough COLUMNS (big change)
expecting success:
COLUMNS=40 git $cmd $args --graph >output &&
grep " | " output >actual &&
test_cmp "$expect-graph" actual
ok 31 - format-patch --graph ignores not enough COLUMNS (big change)
expecting success:
COLUMNS=40 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 32 - diff respects not enough COLUMNS (big change)
expecting success:
COLUMNS=40 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 33 - show respects not enough COLUMNS (big change)
expecting success:
COLUMNS=40 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 34 - log respects not enough COLUMNS (big change)
expecting success:
COLUMNS=40 git $cmd $args --graph >output &&
grep " | " output >actual &&
test_cmp "$expect-graph" actual
ok 35 - log --graph respects not enough COLUMNS (big change)
expecting success:
git -c diff.statGraphWidth=26 $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 36 - format-patch ignores statGraphWidth config
expecting success:
git -c diff.statGraphWidth=26 $cmd $args --graph >output &&
grep " | " output >actual &&
test_cmp "$expect-graph" actual
ok 37 - format-patch --graph ignores statGraphWidth config
expecting success:
git -c diff.statGraphWidth=26 $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 38 - diff respects statGraphWidth config
expecting success:
git -c diff.statGraphWidth=26 $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 39 - show respects statGraphWidth config
expecting success:
git -c diff.statGraphWidth=26 $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 40 - log respects statGraphWidth config
expecting success:
git -c diff.statGraphWidth=26 $cmd $args --graph >output &&
grep " | " output >actual &&
test_cmp "$expect-graph" actual
ok 41 - log --graph respects statGraphWidth config
expecting success:
git $cmd $args --stat=40 >output &&
grep " | " output >actual &&
test_cmp expect actual
ok 42 - format-patch --stat=width with big change
expecting success:
git $cmd $args --stat-width=40 >output &&
grep " | " output >actual &&
test_cmp expect actual
ok 43 - format-patch --stat-width=width with big change
expecting success:
git $cmd $args --stat-graph-width=26 >output &&
grep " | " output >actual &&
test_cmp expect actual
ok 44 - format-patch --stat-graph-width with big change
expecting success:
git $cmd $args --stat-width=40 --graph >output &&
grep " | " output >actual &&
test_cmp expect-graph actual
ok 45 - format-patch --stat-width=width --graph with big change
expecting success:
git $cmd $args --stat-graph-width=26 --graph >output &&
grep " | " output >actual &&
test_cmp expect-graph actual
ok 46 - format-patch --stat-graph-width --graph with big change
expecting success:
git $cmd $args --stat=40 >output &&
grep " | " output >actual &&
test_cmp expect actual
ok 47 - diff --stat=width with big change
expecting success:
git $cmd $args --stat-width=40 >output &&
grep " | " output >actual &&
test_cmp expect actual
ok 48 - diff --stat-width=width with big change
expecting success:
git $cmd $args --stat-graph-width=26 >output &&
grep " | " output >actual &&
test_cmp expect actual
ok 49 - diff --stat-graph-width with big change
expecting success:
git $cmd $args --stat=40 >output &&
grep " | " output >actual &&
test_cmp expect actual
ok 50 - show --stat=width with big change
expecting success:
git $cmd $args --stat-width=40 >output &&
grep " | " output >actual &&
test_cmp expect actual
ok 51 - show --stat-width=width with big change
expecting success:
git $cmd $args --stat-graph-width=26 >output &&
grep " | " output >actual &&
test_cmp expect actual
ok 52 - show --stat-graph-width with big change
expecting success:
git $cmd $args --stat=40 >output &&
grep " | " output >actual &&
test_cmp expect actual
ok 53 - log --stat=width with big change
expecting success:
git $cmd $args --stat-width=40 >output &&
grep " | " output >actual &&
test_cmp expect actual
ok 54 - log --stat-width=width with big change
expecting success:
git $cmd $args --stat-graph-width=26 >output &&
grep " | " output >actual &&
test_cmp expect actual
ok 55 - log --stat-graph-width with big change
expecting success:
git $cmd $args --stat-width=40 --graph >output &&
grep " | " output >actual &&
test_cmp expect-graph actual
ok 56 - log --stat-width=width --graph with big change
expecting success:
git $cmd $args --stat-graph-width=26 --graph >output &&
grep " | " output >actual &&
test_cmp expect-graph actual
ok 57 - log --stat-graph-width --graph with big change
expecting success:
cp abcd aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &&
git add aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &&
git commit -m message
[master 9979495] message
Author: A U Thor <author@example.com>
1 file changed, 1000 insertions(+)
create mode 100644 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
ok 58 - preparation for long filename tests
expecting success:
git $cmd $args --stat-width=60 >output &&
grep " | " output >actual &&
test_cmp expect actual
ok 59 - format-patch --stat=width with big change is more balanced
expecting success:
git $cmd $args --stat-width=60 --graph >output &&
grep " | " output >actual &&
test_cmp expect-graph actual
ok 60 - format-patch --stat=width --graph with big change is balanced
expecting success:
git $cmd $args --stat-width=60 >output &&
grep " | " output >actual &&
test_cmp expect actual
ok 61 - diff --stat=width with big change is more balanced
expecting success:
git $cmd $args --stat-width=60 >output &&
grep " | " output >actual &&
test_cmp expect actual
ok 62 - show --stat=width with big change is more balanced
expecting success:
git $cmd $args --stat-width=60 >output &&
grep " | " output >actual &&
test_cmp expect actual
ok 63 - log --stat=width with big change is more balanced
expecting success:
git $cmd $args --stat-width=60 --graph >output &&
grep " | " output >actual &&
test_cmp expect-graph actual
ok 64 - log --stat=width --graph with big change is balanced
expecting success:
COLUMNS=200 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 65 - format-patch ignores COLUMNS (long filename)
expecting success:
COLUMNS=200 git $cmd $args --graph >output &&
grep " | " output >actual &&
test_cmp "$expect-graph" actual
ok 66 - format-patch --graph ignores COLUMNS (long filename)
expecting success:
COLUMNS=200 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 67 - diff respects COLUMNS (long filename)
expecting success:
COLUMNS=200 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 68 - show respects COLUMNS (long filename)
expecting success:
COLUMNS=200 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 69 - log respects COLUMNS (long filename)
expecting success:
COLUMNS=200 git $cmd $args --graph >output &&
grep " | " output >actual &&
test_cmp "$expect-graph" actual
ok 70 - log --graph respects COLUMNS (long filename)
expecting success:
COLUMNS=1 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 71 - format-patch ignores prefix greater than COLUMNS (big change)
expecting success:
COLUMNS=1 git $cmd $args --graph >output &&
grep " | " output >actual &&
test_cmp "$expect-graph" actual
ok 72 - format-patch --graph ignores prefix greater than COLUMNS (big change)
expecting success:
COLUMNS=1 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 73 - diff respects prefix greater than COLUMNS (big change)
expecting success:
COLUMNS=1 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 74 - show respects prefix greater than COLUMNS (big change)
expecting success:
COLUMNS=1 git $cmd $args >output &&
grep " | " output >actual &&
test_cmp "$expect" actual
ok 75 - log respects prefix greater than COLUMNS (big change)
expecting success:
COLUMNS=1 git $cmd $args --graph >output &&
grep " | " output >actual &&
test_cmp "$expect-graph" actual
ok 76 - log --graph respects prefix greater than COLUMNS (big change)
expecting success:
git checkout -b branch HEAD^^ &&
COLUMNS=100 git merge --stat --no-ff master^ >output &&
grep " | " output >actual &&
test_cmp expect actual
Switched to a new branch 'branch'
ok 77 - merge --stat respects COLUMNS (big change)
expecting success:
COLUMNS=100 git merge --stat --no-ff master >output &&
grep " | " output >actual &&
test_cmp expect actual
ok 78 - merge --stat respects COLUMNS (long filename)
# passed all 78 test(s)
1..78
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4062-diff-pickaxe.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4062-diff-pickaxe/.git/
expecting success:
test_commit initial &&
printf "%04096d" 0 >4096-zeroes.txt &&
git add 4096-zeroes.txt &&
test_tick &&
git commit -m "A 4k file"
[master (root-commit) 24b24cf] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
[master 98d74df] A 4k file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 4096-zeroes.txt
ok 1 - setup
expecting success:
git diff --name-only -G "^(0{64}){64}$" HEAD^ >out &&
test 4096-zeroes.txt = "$(cat out)"
ok 2 - -G matches
expecting success:
git diff --name-only -S0 --pickaxe-regex HEAD^ >out &&
verbose test 4096-zeroes.txt = "$(cat out)"
ok 3 - -S --pickaxe-regex
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4059-diff-submodule-not-initialized.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4059-diff-submodule-not-initialized/.git/
expecting success:
test_create_repo sm2 &&
add_file . foo &&
add_file sm2 foo1 foo2 &&
smhead1=$(git -C sm2 rev-parse --short --verify HEAD)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4059-diff-submodule-not-initialized/sm2/.git/
36d39d8
1beffeb
ok 1 - setup - submodules
expecting success:
git submodule add ./sm2 sm1 &&
commit_file sm1 .gitmodules &&
git diff-tree -p --no-commit-id --submodule=log HEAD -- sm1 >actual &&
cat >expected <<-EOF &&
Submodule sm1 0000000...$smhead1 (new submodule)
EOF
test_cmp expected actual
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4059-diff-submodule-not-initialized/sm1'...
done.
ok 2 - setup - git submodule add
expecting success:
rm -rf sm1 &&
git diff-tree -p --no-commit-id --submodule=log HEAD -- sm1 >actual &&
cat >expected <<-EOF &&
Submodule sm1 0000000...$smhead1 (new submodule)
EOF
test_cmp expected actual
ok 3 - submodule directory removed
expecting success:
git submodule update --checkout sm1 &&
smhead2=$(add_file sm1 foo3 foo4) &&
commit_file sm1 &&
git diff-tree -p --no-commit-id --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $smhead1..$smhead2:
> Add foo4 ($added foo4)
> Add foo3 ($added foo3)
EOF
test_cmp expected actual
Submodule path 'sm1': checked out '1beffeb46f4c598c329381e14c03d952fb2e60d8'
ok 4 - setup - submodule multiple commits
expecting success:
rm -rf sm1 &&
git diff-tree -p --no-commit-id --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $smhead1..$smhead2:
> Add foo4 ($added foo4)
> Add foo3 ($added foo3)
EOF
test_cmp expected actual
ok 5 - submodule removed multiple commits
expecting success:
git clone . sm3 &&
git -C sm3 diff-tree -p --no-commit-id --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $smhead1...$smhead2 (commits not present)
EOF
test_cmp expected actual
Cloning into 'sm3'...
done.
ok 6 - submodule not initialized in new clone
expecting success:
git submodule update --checkout sm1 &&
git mv sm1 sm4 &&
commit_file sm4 &&
git diff-tree -p --no-commit-id --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm4 0000000...$smhead2 (new submodule)
EOF
test_cmp expected actual
Submodule path 'sm1': checked out 'b762e6a22f976e7e5d55bfe47bb4c4694f97a64c'
ok 7 - setup submodule moved
expecting success:
smhead3=$(add_file sm4 foo6 foo7) &&
commit_file sm4 &&
rm -rf sm4 &&
git diff-tree -p --no-commit-id --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm4 $smhead2..$smhead3:
> Add foo7 ($added foo7)
> Add foo6 ($added foo6)
EOF
test_cmp expected actual
ok 8 - submodule moved then removed
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4063-diff-blobs.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4063-diff-blobs/.git/
expecting success:
echo one >one &&
echo two >two &&
chmod +x two &&
git add . &&
# cover systems where modes are ignored
git update-index --chmod=+x two &&
git commit -m base &&
sha1_one=$(git rev-parse HEAD:one) &&
sha1_two=$(git rev-parse HEAD:two)
[master (root-commit) 2c8be9f] base
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 one
create mode 100755 two
ok 1 - create some blobs
expecting success:
run_diff $sha1_one $sha1_two
ok 2 - diff by sha1
expecting success:
check_index $sha1_one $sha1_two
index 5626abf0f72e58d7a153368ba57db4c673c0e171..f719efd430d52bcfc8566a43b2eb655688d38871 100644
ok 3 - index of sha1 diff
expecting success:
check_paths $sha1_one $sha1_two
diff --git a/5626abf0f72e58d7a153368ba57db4c673c0e171 b/f719efd430d52bcfc8566a43b2eb655688d38871
ok 4 - sha1 diff uses arguments as paths
expecting success:
! grep mode diff
ok 5 - sha1 diff has no mode change
expecting success:
run_diff HEAD:one HEAD:two
ok 6 - diff by tree:path (run)
expecting success:
check_index $sha1_one $sha1_two
index 5626abf0f72e58d7a153368ba57db4c673c0e171..f719efd430d52bcfc8566a43b2eb655688d38871
ok 7 - index of tree:path diff
expecting success:
check_paths one two
diff --git a/one b/two
ok 8 - tree:path diff uses filenames as paths
expecting success:
check_mode 100644 100755
old mode 100644
new mode 100755
ok 9 - tree:path diff shows mode change
expecting success:
run_diff HEAD:one..HEAD:two
ok 10 - diff by ranged tree:path
expecting success:
check_index $sha1_one $sha1_two
index 5626abf0f72e58d7a153368ba57db4c673c0e171..f719efd430d52bcfc8566a43b2eb655688d38871
ok 11 - index of ranged tree:path diff
expecting success:
check_paths one two
diff --git a/one b/two
ok 12 - ranged tree:path diff uses filenames as paths
expecting success:
check_mode 100644 100755
old mode 100644
new mode 100755
ok 13 - ranged tree:path diff shows mode change
expecting success:
run_diff HEAD:one two
ok 14 - diff blob against file
expecting success:
check_index $sha1_one $sha1_two
index 5626abf0f72e58d7a153368ba57db4c673c0e171..f719efd430d52bcfc8566a43b2eb655688d38871
ok 15 - index of blob-file diff
expecting success:
check_paths one two
diff --git a/one b/two
ok 16 - blob-file diff uses filename as paths
checking prerequisite: FILEMODE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test "$(git config --bool core.filemode)" = true
)
prerequisite FILEMODE ok
expecting success:
check_mode 100644 100755
old mode 100644
new mode 100755
ok 17 - blob-file diff shows mode change
expecting success:
run_diff $sha1_one two &&
check_paths two two
diff --git a/two b/two
ok 18 - blob-file diff prefers filename to sha1
# passed all 18 test(s)
1..18
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4064-diff-oidfind.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4064-diff-oidfind/.git/
expecting success:
git commit --allow-empty -m "empty initial commit" &&
echo "Hello, world!" >greeting &&
git add greeting &&
git commit -m "add the greeting blob" && # borrowed from Git from the Bottom Up
git tag -m "the blob" greeting $(git rev-parse HEAD:greeting) &&
echo asdf >unrelated &&
git add unrelated &&
git commit -m "unrelated history" &&
git revert HEAD^ &&
git commit --allow-empty -m "another unrelated commit"
[master (root-commit) 8913d54] empty initial commit
Author: A U Thor <author@example.com>
[master 2e637b1] add the greeting blob
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 greeting
[master 28c4fdb] unrelated history
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 unrelated
Removing greeting
[master 023aa3c] Revert "add the greeting blob"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:29:12 2019 +0000
1 file changed, 1 deletion(-)
delete mode 100644 greeting
[master 53781c9] another unrelated commit
Author: A U Thor <author@example.com>
ok 1 - setup
expecting success:
cat >expect <<-EOF &&
Revert "add the greeting blob"
add the greeting blob
EOF
git log --format=%s --find-object=greeting^{blob} >actual &&
test_cmp expect actual
ok 2 - find the greeting blob
expecting success:
mkdir a &&
echo asdf >a/file &&
git add a/file &&
git commit -m "add a file in a subdirectory"
[master 1a4fafd] add a file in a subdirectory
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a/file
ok 3 - setup a tree
expecting success:
cat >expect <<-EOF &&
add a file in a subdirectory
EOF
git log --format=%s -t --find-object=HEAD:a >actual &&
test_cmp expect actual
ok 4 - find a tree
expecting success:
test_create_repo sub &&
test_commit -C sub sub &&
git submodule add ./sub sub &&
git commit -a -m "add sub"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4064-diff-oidfind/sub/.git/
[master (root-commit) 672648c] sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 sub.t
Adding existing repo at 'sub' to the index
[master 5c3c2b5] add sub
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub
ok 5 - setup a submodule
expecting success:
cat >expect <<-EOF &&
add sub
EOF
git log --format=%s --find-object=HEAD:sub >actual &&
test_cmp expect actual
ok 6 - find a submodule
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4065-diff-anchored.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4065-diff-anchored/.git/
expecting success:
printf "a\nb\nc\n" >pre &&
printf "c\na\nb\n" >post &&
# normally, c is moved to produce the smallest diff
test_expect_code 1 git diff --no-index pre post >diff &&
grep "^+c" diff &&
# with anchor, a is moved
test_expect_code 1 git diff --no-index --anchored=c pre post >diff &&
grep "^+a" diff
+c
+a
ok 1 - --anchored
expecting success:
printf "a\nb\nc\nd\ne\nf\n" >pre &&
printf "c\na\nb\nf\nd\ne\n" >post &&
# with 1 anchor, c is not moved, but f is moved
test_expect_code 1 git diff --no-index --anchored=c pre post >diff &&
grep "^+a" diff && # a is moved instead of c
grep "^+f" diff &&
# with 2 anchors, c and f are not moved
test_expect_code 1 git diff --no-index --anchored=c --anchored=f pre post >diff &&
grep "^+a" diff &&
grep "^+d" diff # d is moved instead of f
+a
+f
+a
+d
ok 2 - --anchored multiple
expecting success:
printf "a\nb\nc\n" >pre &&
printf "c\na\nb\n" >post &&
test_expect_code 1 git diff --no-index --anchored=x pre post >diff &&
grep "^+c" diff
+c
ok 3 - --anchored with nonexistent line has no effect
expecting success:
printf "a\nb\nc\nd\ne\nc\n" >pre &&
printf "c\na\nb\nc\nd\ne\n" >post &&
test_expect_code 1 git diff --no-index --anchored=c pre post >diff &&
grep "^+c" diff
+c
ok 4 - --anchored with non-unique line has no effect
expecting success:
printf "a\nb\nc\n" >pre &&
printf "c\na\nb\n" >post &&
test_expect_code 1 git diff --no-index --anchored=a --anchored=c pre post >diff &&
mv post expected_post &&
# Ensure that the diff is correct by applying it and then
# comparing the result with the original
git apply diff &&
diff expected_post post
ok 5 - diff still produced with impossible multiple --anchored
expecting success:
printf "a\nb\nc\n" >pre &&
printf "c\na\nb\n" >post &&
test_expect_code 1 git diff --no-index --patience --anchored=c pre post >diff &&
grep "^+a" diff &&
test_expect_code 1 git diff --no-index --anchored=c --patience pre post >diff &&
grep "^+c" diff &&
test_expect_code 1 git diff --no-index --histogram --anchored=c pre post >diff &&
grep "^+a" diff &&
test_expect_code 1 git diff --no-index --anchored=c --histogram pre post >diff &&
grep "^+c" diff
+a
+c
+a
+c
ok 6 - later algorithm arguments override earlier ones
expecting success:
printf "a\nb\nc\n" >file &&
git add file &&
git commit -m foo &&
printf "c\na\nb\n" >file &&
git add file &&
git commit -m foo &&
# with anchor, a is moved
git show --patience --anchored=c >diff &&
grep "^+a" diff
[master (root-commit) 48f07d6] foo
Author: A U Thor <author@example.com>
1 file changed, 3 insertions(+)
create mode 100644 file
[master d9bd04f] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
+a
ok 7 - --anchored works with other commands like "git show"
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4066-diff-emit-delay.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4066-diff-emit-delay/.git/
expecting success:
test_commit A &&
test_commit B &&
git checkout -b side HEAD^ &&
test_commit C &&
git merge -m M master &&
test_commit D
[master (root-commit) 0ddfaf1] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
[master d9df450] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B.t
Switched to a new branch 'side'
[side 5dee784] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C.t
Merging:
5dee784 C
virtual master
found 1 common ancestor:
0ddfaf1 A
Merge made by the 'recursive' strategy.
B.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 B.t
[side 4d3a2bb] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D.t
ok 1 - set up history with a merge
expecting success:
cat >expect <<-\EOF &&
commit D
---
D.t | 1 +
1 file changed, 1 insertion(+)
diff --git a/D.t b/D.t
new file mode 100644
index 0000000..1784810
--- /dev/null
+++ b/D.t
@@ -0,0 +1 @@
+D
commit M
B.t | 1 +
1 file changed, 1 insertion(+)
commit C
---
C.t | 1 +
1 file changed, 1 insertion(+)
diff --git a/C.t b/C.t
new file mode 100644
index 0000000..3cc58df
--- /dev/null
+++ b/C.t
@@ -0,0 +1 @@
+C
commit B
---
B.t | 1 +
1 file changed, 1 insertion(+)
diff --git a/B.t b/B.t
new file mode 100644
index 0000000..223b783
--- /dev/null
+++ b/B.t
@@ -0,0 +1 @@
+B
commit A
---
A.t | 1 +
1 file changed, 1 insertion(+)
diff --git a/A.t b/A.t
new file mode 100644
index 0000000..f70f10e
--- /dev/null
+++ b/A.t
@@ -0,0 +1 @@
+A
EOF
git log --format="commit %s" --cc -p --stat --color-moved >actual &&
test_cmp expect actual
ok 2 - log --cc -p --stat --color-moved
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4061-diff-indent.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4061-diff-indent/.git/
expecting success:
cat <<-\EOF >spaces.txt &&
1
2
a
b
3
4
EOF
cat <<-\EOF >functions.c &&
1
2
/* function */
foo() {
foo
}
3
4
EOF
git add spaces.txt functions.c &&
test_tick &&
git commit -m initial &&
git branch old &&
cat <<-\EOF >spaces.txt &&
1
2
a
b
a
b
3
4
EOF
cat <<-\EOF >functions.c &&
1
2
/* function */
bar() {
foo
}
/* function */
foo() {
foo
}
3
4
EOF
git add spaces.txt functions.c &&
test_tick &&
git commit -m initial &&
git branch new &&
tr "_" " " <<-\EOF >spaces-expect &&
diff --git a/spaces.txt b/spaces.txt
--- a/spaces.txt
+++ b/spaces.txt
@@ -3,5 +3,8 @@
a
_
b
+a
+
+b
3
4
EOF
tr "_" " " <<-\EOF >spaces-compacted-expect &&
diff --git a/spaces.txt b/spaces.txt
--- a/spaces.txt
+++ b/spaces.txt
@@ -2,6 +2,9 @@
2
a
_
+b
+a
+
b
3
4
EOF
tr "_" " " <<-\EOF >functions-expect &&
diff --git a/functions.c b/functions.c
--- a/functions.c
+++ b/functions.c
@@ -1,6 +1,11 @@
1
2
/* function */
+bar() {
+ foo
+}
+
+/* function */
foo() {
foo
}
EOF
tr "_" " " <<-\EOF >functions-compacted-expect
diff --git a/functions.c b/functions.c
--- a/functions.c
+++ b/functions.c
@@ -1,5 +1,10 @@
1
2
+/* function */
+bar() {
+ foo
+}
+
/* function */
foo() {
foo
EOF
[master (root-commit) a2a2312] initial
Author: A U Thor <author@example.com>
2 files changed, 16 insertions(+)
create mode 100644 functions.c
create mode 100644 spaces.txt
[master cc6bd2a] initial
Author: A U Thor <author@example.com>
2 files changed, 8 insertions(+)
ok 1 - prepare
expecting success:
git diff --no-indent-heuristic old new -- spaces.txt >out &&
compare_diff spaces-expect out
ok 2 - diff: ugly spaces
expecting success:
git -c diff.indentHeuristic=true diff --no-indent-heuristic old new -- spaces.txt >out2 &&
compare_diff spaces-expect out2
ok 3 - diff: --no-indent-heuristic overrides config
expecting success:
git -c diff.indentHeuristic=false diff --indent-heuristic old new -- spaces.txt >out-compacted &&
compare_diff spaces-compacted-expect out-compacted
ok 4 - diff: nice spaces with --indent-heuristic
expecting success:
git -c diff.indentHeuristic=true diff old new -- spaces.txt >out-compacted2 &&
compare_diff spaces-compacted-expect out-compacted2
ok 5 - diff: nice spaces with diff.indentHeuristic=true
expecting success:
git diff --indent-heuristic --patience old new -- spaces.txt >out-compacted3 &&
compare_diff spaces-compacted-expect out-compacted3
ok 6 - diff: --indent-heuristic with --patience
expecting success:
git diff --indent-heuristic --histogram old new -- spaces.txt >out-compacted4 &&
compare_diff spaces-compacted-expect out-compacted4
ok 7 - diff: --indent-heuristic with --histogram
expecting success:
git diff --no-indent-heuristic old new -- functions.c >out &&
compare_diff functions-expect out
ok 8 - diff: ugly functions
expecting success:
git diff --indent-heuristic old new -- functions.c >out-compacted &&
compare_diff functions-compacted-expect out-compacted
ok 9 - diff: nice functions with --indent-heuristic
expecting success:
git blame --indent-heuristic old..new -- spaces.txt >out-blame-compacted &&
compare_blame spaces-compacted-expect out-blame-compacted
ok 10 - blame: nice spaces with --indent-heuristic
expecting success:
git -c diff.indentHeuristic=true blame old..new -- spaces.txt >out-blame-compacted2 &&
compare_blame spaces-compacted-expect out-blame-compacted2
ok 11 - blame: nice spaces with diff.indentHeuristic=true
expecting success:
git blame --no-indent-heuristic old..new -- spaces.txt >out-blame &&
compare_blame spaces-expect out-blame
ok 12 - blame: ugly spaces with --no-indent-heuristic
expecting success:
git -c diff.indentHeuristic=false blame old..new -- spaces.txt >out-blame2 &&
compare_blame spaces-expect out-blame2
ok 13 - blame: ugly spaces with diff.indentHeuristic=false
expecting success:
git -c diff.indentHeuristic=true blame --no-indent-heuristic old..new -- spaces.txt >out-blame3 &&
git blame old..new -- spaces.txt >out-blame &&
compare_blame spaces-expect out-blame3
ok 14 - blame: --no-indent-heuristic overrides config
expecting success:
git -c diff.indentHeuristic=false blame --indent-heuristic old..new -- spaces.txt >out-blame-compacted3 &&
compare_blame spaces-compacted-expect out-blame-compacted2
ok 15 - blame: --indent-heuristic overrides config
expecting success:
git diff-tree --indent-heuristic -p old new -- spaces.txt >out-diff-tree-compacted &&
compare_diff spaces-compacted-expect out-diff-tree-compacted
ok 16 - diff-tree: nice spaces with --indent-heuristic
expecting success:
git -c diff.indentHeuristic=true diff-tree -p old new -- spaces.txt >out-diff-tree-compacted2 &&
compare_diff spaces-compacted-expect out-diff-tree-compacted2
ok 17 - diff-tree: nice spaces with diff.indentHeuristic=true
expecting success:
git diff-tree --no-indent-heuristic -p old new -- spaces.txt >out-diff-tree &&
compare_diff spaces-expect out-diff-tree
ok 18 - diff-tree: ugly spaces with --no-indent-heuristic
expecting success:
git -c diff.indentHeuristic=false diff-tree -p old new -- spaces.txt >out-diff-tree2 &&
compare_diff spaces-expect out-diff-tree2
ok 19 - diff-tree: ugly spaces with diff.indentHeuristic=false
expecting success:
git -c diff.indentHeuristic=false diff-tree --indent-heuristic -p old new -- spaces.txt >out-diff-tree-compacted3 &&
compare_diff spaces-compacted-expect out-diff-tree-compacted3
ok 20 - diff-tree: --indent-heuristic overrides config
expecting success:
git -c diff.indentHeuristic=true diff-tree --no-indent-heuristic -p old new -- spaces.txt >out-diff-tree3 &&
compare_diff spaces-expect out-diff-tree3
ok 21 - diff-tree: --no-indent-heuristic overrides config
expecting success:
git checkout -B diff-index &&
git reset --soft HEAD~ &&
git diff-index --indent-heuristic -p old -- spaces.txt >out-diff-index-compacted &&
compare_diff spaces-compacted-expect out-diff-index-compacted &&
git checkout -f master
Switched to a new branch 'diff-index'
Switched to branch 'master'
ok 22 - diff-index: nice spaces with --indent-heuristic
expecting success:
git checkout -B diff-index &&
git reset --soft HEAD~ &&
git -c diff.indentHeuristic=true diff-index -p old -- spaces.txt >out-diff-index-compacted2 &&
compare_diff spaces-compacted-expect out-diff-index-compacted2 &&
git checkout -f master
Switched to and reset branch 'diff-index'
Switched to branch 'master'
ok 23 - diff-index: nice spaces with diff.indentHeuristic=true
expecting success:
git checkout -B diff-index &&
git reset --soft HEAD~ &&
git diff-index --no-indent-heuristic -p old -- spaces.txt >out-diff-index &&
compare_diff spaces-expect out-diff-index &&
git checkout -f master
Switched to and reset branch 'diff-index'
Switched to branch 'master'
ok 24 - diff-index: ugly spaces with --no-indent-heuristic
expecting success:
git checkout -B diff-index &&
git reset --soft HEAD~ &&
git -c diff.indentHeuristic=false diff-index -p old -- spaces.txt >out-diff-index2 &&
compare_diff spaces-expect out-diff-index2 &&
git checkout -f master
Switched to and reset branch 'diff-index'
Switched to branch 'master'
ok 25 - diff-index: ugly spaces with diff.indentHeuristic=false
expecting success:
git checkout -B diff-index &&
git reset --soft HEAD~ &&
git -c diff.indentHeuristic=false diff-index --indent-heuristic -p old -- spaces.txt >out-diff-index-compacted3 &&
compare_diff spaces-compacted-expect out-diff-index-compacted3 &&
git checkout -f master
Switched to and reset branch 'diff-index'
Switched to branch 'master'
ok 26 - diff-index: --indent-heuristic overrides config
expecting success:
git checkout -B diff-index &&
git reset --soft HEAD~ &&
git -c diff.indentHeuristic=true diff-index --no-indent-heuristic -p old -- spaces.txt >out-diff-index3 &&
compare_diff spaces-expect out-diff-index3 &&
git checkout -f master
Switched to and reset branch 'diff-index'
Switched to branch 'master'
ok 27 - diff-index: --no-indent-heuristic overrides config
expecting success:
git checkout -B diff-files &&
git reset HEAD~ &&
git diff-files --indent-heuristic -p spaces.txt >out-diff-files-raw &&
grep -v index out-diff-files-raw >out-diff-files-compacted &&
compare_diff spaces-compacted-expect out-diff-files-compacted &&
git checkout -f master
Switched to a new branch 'diff-files'
Unstaged changes after reset:
M functions.c
M spaces.txt
Switched to branch 'master'
ok 28 - diff-files: nice spaces with --indent-heuristic
expecting success:
git checkout -B diff-files &&
git reset HEAD~ &&
git -c diff.indentHeuristic=true diff-files -p spaces.txt >out-diff-files-raw2 &&
grep -v index out-diff-files-raw2 >out-diff-files-compacted2 &&
compare_diff spaces-compacted-expect out-diff-files-compacted2 &&
git checkout -f master
Switched to and reset branch 'diff-files'
Unstaged changes after reset:
M functions.c
M spaces.txt
Switched to branch 'master'
ok 29 - diff-files: nice spaces with diff.indentHeuristic=true
expecting success:
git checkout -B diff-files &&
git reset HEAD~ &&
git diff-files --no-indent-heuristic -p spaces.txt >out-diff-files-raw &&
grep -v index out-diff-files-raw >out-diff-files &&
compare_diff spaces-expect out-diff-files &&
git checkout -f master
Switched to and reset branch 'diff-files'
Unstaged changes after reset:
M functions.c
M spaces.txt
Switched to branch 'master'
ok 30 - diff-files: ugly spaces with --no-indent-heuristic
expecting success:
git checkout -B diff-files &&
git reset HEAD~ &&
git -c diff.indentHeuristic=false diff-files -p spaces.txt >out-diff-files-raw2 &&
grep -v index out-diff-files-raw2 >out-diff-files &&
compare_diff spaces-expect out-diff-files &&
git checkout -f master
Switched to and reset branch 'diff-files'
Unstaged changes after reset:
M functions.c
M spaces.txt
Switched to branch 'master'
ok 31 - diff-files: ugly spaces with diff.indentHeuristic=false
expecting success:
git checkout -B diff-files &&
git reset HEAD~ &&
git -c diff.indentHeuristic=false diff-files --indent-heuristic -p spaces.txt >out-diff-files-raw3 &&
grep -v index out-diff-files-raw3 >out-diff-files-compacted &&
compare_diff spaces-compacted-expect out-diff-files-compacted &&
git checkout -f master
Switched to and reset branch 'diff-files'
Unstaged changes after reset:
M functions.c
M spaces.txt
Switched to branch 'master'
ok 32 - diff-files: --indent-heuristic overrides config
expecting success:
git checkout -B diff-files &&
git reset HEAD~ &&
git -c diff.indentHeuristic=true diff-files --no-indent-heuristic -p spaces.txt >out-diff-files-raw4 &&
grep -v index out-diff-files-raw4 >out-diff-files &&
compare_diff spaces-expect out-diff-files &&
git checkout -f master
Switched to and reset branch 'diff-files'
Unstaged changes after reset:
M functions.c
M spaces.txt
Switched to branch 'master'
ok 33 - diff-files: --no-indent-heuristic overrides config
# passed all 33 test(s)
1..33
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4100-apply-stat.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4100-apply-stat/.git/
expecting success:
git apply --stat --summary \
<"$TEST_DIRECTORY/t4100/t-apply-$num.patch" >current &&
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 1 - rename
expecting success:
sed -e "$UNC" <"$TEST_DIRECTORY/t4100/t-apply-$num.patch" |
git apply --recount --stat --summary >current &&
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
ok 2 - rename with recount
expecting success:
git apply --stat --summary \
<"$TEST_DIRECTORY/t4100/t-apply-$num.patch" >current &&
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
ok 3 - copy
expecting success:
sed -e "$UNC" <"$TEST_DIRECTORY/t4100/t-apply-$num.patch" |
git apply --recount --stat --summary >current &&
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
ok 4 - copy with recount
expecting success:
git apply --stat --summary \
<"$TEST_DIRECTORY/t4100/t-apply-$num.patch" >current &&
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
ok 5 - rewrite
expecting success:
sed -e "$UNC" <"$TEST_DIRECTORY/t4100/t-apply-$num.patch" |
git apply --recount --stat --summary >current &&
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
ok 6 - rewrite with recount
expecting success:
git apply --stat --summary \
<"$TEST_DIRECTORY/t4100/t-apply-$num.patch" >current &&
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
ok 7 - mode
expecting success:
sed -e "$UNC" <"$TEST_DIRECTORY/t4100/t-apply-$num.patch" |
git apply --recount --stat --summary >current &&
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
ok 8 - mode with recount
expecting success:
git apply --stat --summary \
<"$TEST_DIRECTORY/t4100/t-apply-$num.patch" >current &&
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
ok 9 - non git (1)
expecting success:
sed -e "$UNC" <"$TEST_DIRECTORY/t4100/t-apply-$num.patch" |
git apply --recount --stat --summary >current &&
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
ok 10 - non git (1) with recount
expecting success:
git apply --stat --summary \
<"$TEST_DIRECTORY/t4100/t-apply-$num.patch" >current &&
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
ok 11 - non git (2)
expecting success:
sed -e "$UNC" <"$TEST_DIRECTORY/t4100/t-apply-$num.patch" |
git apply --recount --stat --summary >current &&
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
ok 12 - non git (2) with recount
expecting success:
git apply --stat --summary \
<"$TEST_DIRECTORY/t4100/t-apply-$num.patch" >current &&
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
ok 13 - non git (3)
expecting success:
sed -e "$UNC" <"$TEST_DIRECTORY/t4100/t-apply-$num.patch" |
git apply --recount --stat --summary >current &&
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
ok 14 - non git (3) with recount
expecting success:
git apply --stat --summary \
<"$TEST_DIRECTORY/t4100/t-apply-$num.patch" >current &&
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
ok 15 - incomplete (1)
expecting success:
sed -e "$UNC" <"$TEST_DIRECTORY/t4100/t-apply-$num.patch" |
git apply --recount --stat --summary >current &&
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
ok 16 - incomplete (1) with recount
expecting success:
git apply --stat --summary \
<"$TEST_DIRECTORY/t4100/t-apply-$num.patch" >current &&
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
ok 17 - incomplete (2)
expecting success:
sed -e "$UNC" <"$TEST_DIRECTORY/t4100/t-apply-$num.patch" |
git apply --recount --stat --summary >current &&
test_i18ncmp "$TEST_DIRECTORY"/t4100/t-apply-$num.expect current
ok 18 - incomplete (2) with recount
# passed all 18 test(s)
1..18
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4102-apply-rename.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4102-apply-rename/.git/
expecting success: git update-index --add foo
ok 1 - setup
expecting success: git apply --index --stat --summary --apply test-patch
bar | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename foo => bar (47%)
ok 2 - apply
checking prerequisite: FILEMODE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test "$(git config --bool core.filemode)" = true
)
prerequisite FILEMODE ok
expecting success: test -f bar && ls -l bar | grep "^-..x......"
-rwxrwxr-x 1 buildd buildd 12 Aug 14 07:29 bar
ok 3 - validate
expecting success: git apply -R --index --stat --summary --apply test-patch &&
test "$(cat foo)" = "This is foo"
foo | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename bar => foo (47%)
ok 4 - apply reverse
expecting success: git apply --index --stat --summary --apply test-patch &&
test "$(cat bar)" = "This is bar" && test "$(cat foo)" = "This is foo"
bar | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
copy foo => bar (47%)
ok 5 - apply copy
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4060-diff-submodule-option-diff-format.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4060-diff-submodule-option-diff-format/.git/
expecting success:
test_create_repo sm1 &&
add_file . foo &&
head1=$(add_file sm1 foo1 foo2) &&
fullhead1=$(git -C sm1 rev-parse --verify HEAD)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4060-diff-submodule-option-diff-format/sm1/.git/
36d39d8
ok 1 - setup repository
expecting success:
git add sm1 &&
git diff-index -p --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 0000000...$head1 (new submodule)
diff --git a/sm1/foo1 b/sm1/foo1
new file mode 100644
index 0000000..1715acd
--- /dev/null
+++ b/sm1/foo1
@@ -0,0 +1 @@
+foo1
diff --git a/sm1/foo2 b/sm1/foo2
new file mode 100644
index 0000000..54b060e
--- /dev/null
+++ b/sm1/foo2
@@ -0,0 +1 @@
+foo2
EOF
test_cmp expected actual
warning: adding embedded git repository: sm1
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sm1
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sm1
hint:
hint: See "git help submodule" for more information.
ok 2 - added submodule
expecting success:
test_config diff.submodule log &&
git add sm1 &&
git diff-index -p --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 0000000...$head1 (new submodule)
diff --git a/sm1/foo1 b/sm1/foo1
new file mode 100644
index 0000000..1715acd
--- /dev/null
+++ b/sm1/foo1
@@ -0,0 +1 @@
+foo1
diff --git a/sm1/foo2 b/sm1/foo2
new file mode 100644
index 0000000..54b060e
--- /dev/null
+++ b/sm1/foo2
@@ -0,0 +1 @@
+foo2
EOF
test_cmp expected actual
ok 3 - added submodule, set diff.submodule
expecting success:
test_config diff.submodule log &&
git add sm1 &&
git diff --submodule=short --cached >actual &&
cat >expected <<-EOF &&
diff --git a/sm1 b/sm1
new file mode 160000
index 0000000..$head1
--- /dev/null
+++ b/sm1
@@ -0,0 +1 @@
+Subproject commit $fullhead1
EOF
test_cmp expected actual
ok 4 - --submodule=short overrides diff.submodule
expecting success:
test_config diff.submodule log &&
git diff-index -p HEAD >actual &&
cat >expected <<-EOF &&
diff --git a/sm1 b/sm1
new file mode 160000
index 0000000..$head1
--- /dev/null
+++ b/sm1
@@ -0,0 +1 @@
+Subproject commit $fullhead1
EOF
test_cmp expected actual
ok 5 - diff.submodule does not affect plumbing
expecting success:
git diff-index -p --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head1..$head2:
diff --git a/sm1/foo3 b/sm1/foo3
new file mode 100644
index 0000000..c1ec6c6
--- /dev/null
+++ b/sm1/foo3
@@ -0,0 +1 @@
+foo3
EOF
test_cmp expected actual
ok 6 - modified submodule(forward)
expecting success:
git diff --submodule=diff >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head1..$head2:
diff --git a/sm1/foo3 b/sm1/foo3
new file mode 100644
index 0000000..c1ec6c6
--- /dev/null
+++ b/sm1/foo3
@@ -0,0 +1 @@
+foo3
EOF
test_cmp expected actual
ok 7 - modified submodule(forward)
expecting success:
git diff --submodule >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head1..$head2:
> Add foo3 ($added foo3)
EOF
test_cmp expected actual
ok 8 - modified submodule(forward) --submodule
expecting success:
git diff --submodule=short >actual &&
cat >expected <<-EOF &&
diff --git a/sm1 b/sm1
index $head1..$head2 160000
--- a/sm1
+++ b/sm1
@@ -1 +1 @@
-Subproject commit $fullhead1
+Subproject commit $fullhead2
EOF
test_cmp expected actual
ok 9 - modified submodule(forward) --submodule=short
expecting success:
git diff-index -p --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head2..$head3 (rewind):
diff --git a/sm1/foo2 b/sm1/foo2
deleted file mode 100644
index 54b060e..0000000
--- a/sm1/foo2
+++ /dev/null
@@ -1 +0,0 @@
-foo2
diff --git a/sm1/foo3 b/sm1/foo3
deleted file mode 100644
index c1ec6c6..0000000
--- a/sm1/foo3
+++ /dev/null
@@ -1 +0,0 @@
-foo3
EOF
test_cmp expected actual
ok 10 - modified submodule(backward)
expecting success:
git diff-index -p --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head2...$head4:
diff --git a/sm1/foo2 b/sm1/foo2
deleted file mode 100644
index 54b060e..0000000
--- a/sm1/foo2
+++ /dev/null
@@ -1 +0,0 @@
-foo2
diff --git a/sm1/foo3 b/sm1/foo3
deleted file mode 100644
index c1ec6c6..0000000
--- a/sm1/foo3
+++ /dev/null
@@ -1 +0,0 @@
-foo3
diff --git a/sm1/foo4 b/sm1/foo4
new file mode 100644
index 0000000..a0016db
--- /dev/null
+++ b/sm1/foo4
@@ -0,0 +1 @@
+foo4
diff --git a/sm1/foo5 b/sm1/foo5
new file mode 100644
index 0000000..d6f2413
--- /dev/null
+++ b/sm1/foo5
@@ -0,0 +1 @@
+foo5
EOF
test_cmp expected actual
ok 11 - modified submodule(backward and forward)
expecting success:
git diff --submodule=diff --cached >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head4...0000000 (submodule deleted)
diff --git a/sm1/foo1 b/sm1/foo1
deleted file mode 100644
index 1715acd..0000000
--- a/sm1/foo1
+++ /dev/null
@@ -1 +0,0 @@
-foo1
diff --git a/sm1/foo4 b/sm1/foo4
deleted file mode 100644
index a0016db..0000000
--- a/sm1/foo4
+++ /dev/null
@@ -1 +0,0 @@
-foo4
diff --git a/sm1/foo5 b/sm1/foo5
deleted file mode 100644
index d6f2413..0000000
--- a/sm1/foo5
+++ /dev/null
@@ -1 +0,0 @@
-foo5
diff --git a/sm1 b/sm1
new file mode 100644
index 0000000..9da5fb8
--- /dev/null
+++ b/sm1
@@ -0,0 +1 @@
+sm1
EOF
test_cmp expected actual
ok 12 - typechanged submodule(submodule->blob), --cached
expecting success:
git diff --submodule=diff >actual &&
cat >expected <<-EOF &&
diff --git a/sm1 b/sm1
deleted file mode 100644
index 9da5fb8..0000000
--- a/sm1
+++ /dev/null
@@ -1 +0,0 @@
-sm1
Submodule sm1 0000000...$head4 (new submodule)
diff --git a/sm1/foo1 b/sm1/foo1
new file mode 100644
index 0000000..1715acd
--- /dev/null
+++ b/sm1/foo1
@@ -0,0 +1 @@
+foo1
diff --git a/sm1/foo4 b/sm1/foo4
new file mode 100644
index 0000000..a0016db
--- /dev/null
+++ b/sm1/foo4
@@ -0,0 +1 @@
+foo4
diff --git a/sm1/foo5 b/sm1/foo5
new file mode 100644
index 0000000..d6f2413
--- /dev/null
+++ b/sm1/foo5
@@ -0,0 +1 @@
+foo5
EOF
test_cmp expected actual
ok 13 - typechanged submodule(submodule->blob)
expecting success:
git diff-index -p --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head4...0000000 (submodule deleted)
diff --git a/sm1 b/sm1
new file mode 100644
index 0000000..9da5fb8
--- /dev/null
+++ b/sm1
@@ -0,0 +1 @@
+sm1
EOF
test_cmp expected actual
ok 14 - typechanged submodule(submodule->blob)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4060-diff-submodule-option-diff-format/sm1/.git/
expecting success:
git diff-index -p --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head4...$head6 (commits not present)
EOF
test_cmp expected actual
ok 15 - nonexistent commit
expecting success:
git diff-index -p --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
diff --git a/sm1 b/sm1
deleted file mode 100644
index 9da5fb8..0000000
--- a/sm1
+++ /dev/null
@@ -1 +0,0 @@
-sm1
Submodule sm1 0000000...$head6 (new submodule)
diff --git a/sm1/foo6 b/sm1/foo6
new file mode 100644
index 0000000..462398b
--- /dev/null
+++ b/sm1/foo6
@@ -0,0 +1 @@
+foo6
diff --git a/sm1/foo7 b/sm1/foo7
new file mode 100644
index 0000000..6e9262c
--- /dev/null
+++ b/sm1/foo7
@@ -0,0 +1 @@
+foo7
EOF
test_cmp expected actual
ok 16 - typechanged submodule(blob->submodule)
expecting success:
git diff-index -p --submodule=diff HEAD >actual &&
test_must_be_empty actual
ok 17 - submodule is up to date
expecting success:
echo new > sm1/new-file &&
git diff-index -p --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 contains untracked content
EOF
test_cmp expected actual
ok 18 - submodule contains untracked content
expecting success:
git diff-index -p --ignore-submodules=untracked --submodule=diff HEAD >actual &&
test_must_be_empty actual
ok 19 - submodule contains untracked content (untracked ignored)
expecting success:
git diff-index -p --ignore-submodules=dirty --submodule=diff HEAD >actual &&
test_must_be_empty actual
ok 20 - submodule contains untracked content (dirty ignored)
expecting success:
git diff-index -p --ignore-submodules=all --submodule=diff HEAD >actual &&
test_must_be_empty actual
ok 21 - submodule contains untracked content (all ignored)
expecting success:
echo new > sm1/foo6 &&
git diff-index -p --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 contains untracked content
Submodule sm1 contains modified content
diff --git a/sm1/foo6 b/sm1/foo6
index 462398b..3e75765 100644
--- a/sm1/foo6
+++ b/sm1/foo6
@@ -1 +1 @@
-foo6
+new
EOF
test_cmp expected actual
ok 22 - submodule contains untracked and modified content
expecting success:
echo new > sm1/foo6 &&
git diff-index -p --ignore-submodules=untracked --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 contains modified content
diff --git a/sm1/foo6 b/sm1/foo6
index 462398b..3e75765 100644
--- a/sm1/foo6
+++ b/sm1/foo6
@@ -1 +1 @@
-foo6
+new
EOF
test_cmp expected actual
ok 23 - submodule contains untracked and modified content (untracked ignored)
expecting success:
echo new > sm1/foo6 &&
git diff-index -p --ignore-submodules=dirty --submodule=diff HEAD >actual &&
test_must_be_empty actual
ok 24 - submodule contains untracked and modified content (dirty ignored)
expecting success:
echo new > sm1/foo6 &&
git diff-index -p --ignore-submodules --submodule=diff HEAD >actual &&
test_must_be_empty actual
ok 25 - submodule contains untracked and modified content (all ignored)
expecting success:
rm -f sm1/new-file &&
git diff-index -p --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 contains modified content
diff --git a/sm1/foo6 b/sm1/foo6
index 462398b..3e75765 100644
--- a/sm1/foo6
+++ b/sm1/foo6
@@ -1 +1 @@
-foo6
+new
EOF
test_cmp expected actual
ok 26 - submodule contains modified content
expecting success:
git diff-index -p --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 17243c9..$head8:
diff --git a/sm1/foo6 b/sm1/foo6
index 462398b..3e75765 100644
--- a/sm1/foo6
+++ b/sm1/foo6
@@ -1 +1 @@
-foo6
+new
EOF
test_cmp expected actual
ok 27 - submodule is modified
expecting success:
echo new > sm1/new-file &&
git diff-index -p --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 contains untracked content
Submodule sm1 17243c9..$head8:
diff --git a/sm1/foo6 b/sm1/foo6
index 462398b..3e75765 100644
--- a/sm1/foo6
+++ b/sm1/foo6
@@ -1 +1 @@
-foo6
+new
EOF
test_cmp expected actual
ok 28 - modified submodule contains untracked content
expecting success:
git diff-index -p --ignore-submodules=untracked --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 17243c9..$head8:
diff --git a/sm1/foo6 b/sm1/foo6
index 462398b..3e75765 100644
--- a/sm1/foo6
+++ b/sm1/foo6
@@ -1 +1 @@
-foo6
+new
EOF
test_cmp expected actual
ok 29 - modified submodule contains untracked content (untracked ignored)
expecting success:
git diff-index -p --ignore-submodules=dirty --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 17243c9..cfce562:
diff --git a/sm1/foo6 b/sm1/foo6
index 462398b..3e75765 100644
--- a/sm1/foo6
+++ b/sm1/foo6
@@ -1 +1 @@
-foo6
+new
EOF
test_cmp expected actual
ok 30 - modified submodule contains untracked content (dirty ignored)
expecting success:
git diff-index -p --ignore-submodules=all --submodule=diff HEAD >actual &&
test_must_be_empty actual
ok 31 - modified submodule contains untracked content (all ignored)
expecting success:
echo modification >> sm1/foo6 &&
git diff-index -p --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 contains untracked content
Submodule sm1 contains modified content
Submodule sm1 17243c9..cfce562:
diff --git a/sm1/foo6 b/sm1/foo6
index 462398b..dfda541 100644
--- a/sm1/foo6
+++ b/sm1/foo6
@@ -1 +1,2 @@
-foo6
+new
+modification
EOF
test_cmp expected actual
ok 32 - modified submodule contains untracked and modified content
expecting success:
echo modification >> sm1/foo6 &&
git diff-index -p --ignore-submodules=untracked --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 contains modified content
Submodule sm1 17243c9..cfce562:
diff --git a/sm1/foo6 b/sm1/foo6
index 462398b..e20e2d9 100644
--- a/sm1/foo6
+++ b/sm1/foo6
@@ -1 +1,3 @@
-foo6
+new
+modification
+modification
EOF
test_cmp expected actual
ok 33 - modified submodule contains untracked and modified content (untracked ignored)
expecting success:
echo modification >> sm1/foo6 &&
git diff-index -p --ignore-submodules=dirty --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 17243c9..cfce562:
diff --git a/sm1/foo6 b/sm1/foo6
index 462398b..3e75765 100644
--- a/sm1/foo6
+++ b/sm1/foo6
@@ -1 +1 @@
-foo6
+new
EOF
test_cmp expected actual
ok 34 - modified submodule contains untracked and modified content (dirty ignored)
expecting success:
echo modification >> sm1/foo6 &&
git diff-index -p --ignore-submodules --submodule=diff HEAD >actual &&
test_must_be_empty actual
ok 35 - modified submodule contains untracked and modified content (all ignored)
expecting success:
rm -f sm1/new-file &&
git diff-index -p --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 contains modified content
Submodule sm1 17243c9..cfce562:
diff --git a/sm1/foo6 b/sm1/foo6
index 462398b..ac466ca 100644
--- a/sm1/foo6
+++ b/sm1/foo6
@@ -1 +1,5 @@
-foo6
+new
+modification
+modification
+modification
+modification
EOF
test_cmp expected actual
ok 36 - modified submodule contains modified content
expecting success:
git diff-index -p --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 17243c9...0000000 (submodule deleted)
EOF
test_cmp expected actual
ok 37 - deleted submodule
expecting success:
test_create_repo sm2 &&
head7=$(add_file sm2 foo8 foo9) &&
git add sm2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4060-diff-submodule-option-diff-format/sm2/.git/
warning: adding embedded git repository: sm2
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sm2
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sm2
hint:
hint: See "git help submodule" for more information.
ok 38 - create second submodule
expecting success:
git diff-index -p --submodule=diff HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 17243c9...0000000 (submodule deleted)
Submodule sm2 0000000...a5a65c9 (new submodule)
diff --git a/sm2/foo8 b/sm2/foo8
new file mode 100644
index 0000000..db9916b
--- /dev/null
+++ b/sm2/foo8
@@ -0,0 +1 @@
+foo8
diff --git a/sm2/foo9 b/sm2/foo9
new file mode 100644
index 0000000..9c3b4f6
--- /dev/null
+++ b/sm2/foo9
@@ -0,0 +1 @@
+foo9
EOF
test_cmp expected actual
ok 39 - multiple submodules
expecting success:
git diff-index -p --submodule=diff HEAD sm2 >actual &&
cat >expected <<-EOF &&
Submodule sm2 0000000...a5a65c9 (new submodule)
diff --git a/sm2/foo8 b/sm2/foo8
new file mode 100644
index 0000000..db9916b
--- /dev/null
+++ b/sm2/foo8
@@ -0,0 +1 @@
+foo8
diff --git a/sm2/foo9 b/sm2/foo9
new file mode 100644
index 0000000..9c3b4f6
--- /dev/null
+++ b/sm2/foo9
@@ -0,0 +1 @@
+foo9
EOF
test_cmp expected actual
ok 40 - path filter
expecting success:
git diff-index -p --submodule=diff HEAD^ >actual &&
cat >expected <<-EOF &&
Submodule sm1 17243c9...0000000 (submodule deleted)
Submodule sm2 0000000...a5a65c9 (new submodule)
diff --git a/sm2/foo8 b/sm2/foo8
new file mode 100644
index 0000000..db9916b
--- /dev/null
+++ b/sm2/foo8
@@ -0,0 +1 @@
+foo8
diff --git a/sm2/foo9 b/sm2/foo9
new file mode 100644
index 0000000..9c3b4f6
--- /dev/null
+++ b/sm2/foo9
@@ -0,0 +1 @@
+foo9
EOF
test_cmp expected actual
ok 41 - given commit
expecting success:
(cd sm2 &&
REAL="$(pwd)/../.real" &&
mv .git "$REAL" &&
echo "gitdir: $REAL" >.git)
ok 42 - setup .git file for sm2
expecting success:
git diff --submodule=diff HEAD^ >actual &&
cat >expected <<-EOF &&
Submodule sm1 17243c9...0000000 (submodule deleted)
Submodule sm2 0000000...a5a65c9 (new submodule)
diff --git a/sm2/foo8 b/sm2/foo8
new file mode 100644
index 0000000..db9916b
--- /dev/null
+++ b/sm2/foo8
@@ -0,0 +1 @@
+foo8
diff --git a/sm2/foo9 b/sm2/foo9
new file mode 100644
index 0000000..9c3b4f6
--- /dev/null
+++ b/sm2/foo9
@@ -0,0 +1 @@
+foo9
EOF
test_cmp expected actual
ok 43 - diff --submodule=diff with .git file
expecting success:
git submodule add -f ./sm2 &&
git commit -a -m "add sm2" &&
git -C sm2 submodule add ../sm2 nested &&
git -C sm2 commit -a -m "nested sub"
Adding existing repo at 'sm2' to the index
[master 75db8a1] add sm2
Author: A U Thor <author@example.com>
2 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 .gitmodules
delete mode 160000 sm1
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4060-diff-submodule-option-diff-format/sm2/nested'...
done.
[master 280969a] nested sub
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 nested
ok 44 - setup nested submodule
expecting success:
echo "nested content" >sm2/nested/file &&
git -C sm2/nested add file &&
git -C sm2/nested commit --allow-empty -m "new HEAD"
[master b55928c] new HEAD
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 45 - move nested submodule HEAD
expecting success:
cat >expected <<-EOF &&
Submodule nested a5a65c9..b55928c:
diff --git a/nested/file b/nested/file
new file mode 100644
index 0000000..ca281f5
--- /dev/null
+++ b/nested/file
@@ -0,0 +1 @@
+nested content
EOF
git -C sm2 diff --submodule=diff >actual 2>err &&
test_must_be_empty err &&
test_cmp expected actual
ok 46 - diff --submodule=diff with moved nested submodule HEAD
expecting success:
cat >expected <<-EOF &&
Submodule sm2 contains modified content
Submodule sm2 a5a65c9..280969a:
diff --git a/sm2/.gitmodules b/sm2/.gitmodules
new file mode 100644
index 0000000..3a816b8
--- /dev/null
+++ b/sm2/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "nested"]
+ path = nested
+ url = ../sm2
Submodule nested 0000000...b55928c (new submodule)
diff --git a/sm2/nested/file b/sm2/nested/file
new file mode 100644
index 0000000..ca281f5
--- /dev/null
+++ b/sm2/nested/file
@@ -0,0 +1 @@
+nested content
diff --git a/sm2/nested/foo8 b/sm2/nested/foo8
new file mode 100644
index 0000000..db9916b
--- /dev/null
+++ b/sm2/nested/foo8
@@ -0,0 +1 @@
+foo8
diff --git a/sm2/nested/foo9 b/sm2/nested/foo9
new file mode 100644
index 0000000..9c3b4f6
--- /dev/null
+++ b/sm2/nested/foo9
@@ -0,0 +1 @@
+foo9
EOF
git diff --submodule=diff >actual 2>err &&
test_must_be_empty err &&
test_cmp expected actual
ok 47 - diff --submodule=diff recurses into nested submodules
# passed all 47 test(s)
1..47
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4101-apply-nonl.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4101-apply-nonl/.git/
expecting success:
git apply <"$TEST_DIRECTORY"/t4101/diff.$i-$j &&
test_cmp frotz.$j frotz
ok 1 - apply diff between 0 and 1
expecting success:
git apply <"$TEST_DIRECTORY"/t4101/diff.$i-$j &&
test_cmp frotz.$j frotz
ok 2 - apply diff between 0 and 2
expecting success:
git apply <"$TEST_DIRECTORY"/t4101/diff.$i-$j &&
test_cmp frotz.$j frotz
ok 3 - apply diff between 0 and 3
expecting success:
git apply <"$TEST_DIRECTORY"/t4101/diff.$i-$j &&
test_cmp frotz.$j frotz
ok 4 - apply diff between 1 and 0
expecting success:
git apply <"$TEST_DIRECTORY"/t4101/diff.$i-$j &&
test_cmp frotz.$j frotz
ok 5 - apply diff between 1 and 2
expecting success:
git apply <"$TEST_DIRECTORY"/t4101/diff.$i-$j &&
test_cmp frotz.$j frotz
ok 6 - apply diff between 1 and 3
expecting success:
git apply <"$TEST_DIRECTORY"/t4101/diff.$i-$j &&
test_cmp frotz.$j frotz
ok 7 - apply diff between 2 and 0
expecting success:
git apply <"$TEST_DIRECTORY"/t4101/diff.$i-$j &&
test_cmp frotz.$j frotz
ok 8 - apply diff between 2 and 1
expecting success:
git apply <"$TEST_DIRECTORY"/t4101/diff.$i-$j &&
test_cmp frotz.$j frotz
ok 9 - apply diff between 2 and 3
expecting success:
git apply <"$TEST_DIRECTORY"/t4101/diff.$i-$j &&
test_cmp frotz.$j frotz
ok 10 - apply diff between 3 and 0
expecting success:
git apply <"$TEST_DIRECTORY"/t4101/diff.$i-$j &&
test_cmp frotz.$j frotz
ok 11 - apply diff between 3 and 1
expecting success:
git apply <"$TEST_DIRECTORY"/t4101/diff.$i-$j &&
test_cmp frotz.$j frotz
ok 12 - apply diff between 3 and 2
# passed all 12 test(s)
1..12
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4067-diff-partial-clone.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4067-diff-partial-clone/.git/
expecting success:
test_when_finished "rm -rf server client trace" &&
test_create_repo server &&
echo a >server/a &&
echo b >server/b &&
git -C server add a b &&
git -C server commit -m x &&
test_config -C server uploadpack.allowfilter 1 &&
test_config -C server uploadpack.allowanysha1inwant 1 &&
git clone --bare --filter=blob:limit=0 "file://$(pwd)/server" client &&
# Ensure that there is exactly 1 negotiation by checking that there is
# only 1 "done" line sent. ("done" marks the end of negotiation.)
GIT_TRACE_PACKET="$(pwd)/trace" git -C client show HEAD &&
grep "git> done" trace >done_lines &&
test_line_count = 1 done_lines
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4067-diff-partial-clone/server/.git/
[master (root-commit) 33f9d8e] x
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 a
create mode 100644 b
Cloning into bare repository 'client'...
commit 33f9d8e99e8036efd5c04ff623d6276732d416d1
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:29:13 2019 +0000
x
diff --git a/a b/a
new file mode 100644
index 0000000..7898192
--- /dev/null
+++ b/a
@@ -0,0 +1 @@
+a
diff --git a/b b/b
new file mode 100644
index 0000000..6178079
--- /dev/null
+++ b/b
@@ -0,0 +1 @@
+b
ok 1 - git show batches blobs
expecting success:
test_when_finished "rm -rf server client trace" &&
test_create_repo server &&
echo a >server/a &&
echo b >server/b &&
git -C server add a b &&
git -C server commit -m x &&
echo c >server/c &&
echo d >server/d &&
git -C server add c d &&
git -C server commit -m x &&
test_config -C server uploadpack.allowfilter 1 &&
test_config -C server uploadpack.allowanysha1inwant 1 &&
git clone --bare --filter=blob:limit=0 "file://$(pwd)/server" client &&
# Ensure that there is exactly 1 negotiation by checking that there is
# only 1 "done" line sent. ("done" marks the end of negotiation.)
GIT_TRACE_PACKET="$(pwd)/trace" git -C client diff HEAD^ HEAD &&
grep "git> done" trace >done_lines &&
test_line_count = 1 done_lines
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4067-diff-partial-clone/server/.git/
[master (root-commit) 196d4df] x
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 a
create mode 100644 b
[master 99a7274] x
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 c
create mode 100644 d
Cloning into bare repository 'client'...
diff --git a/c b/c
new file mode 100644
index 0000000..f2ad6c7
--- /dev/null
+++ b/c
@@ -0,0 +1 @@
+c
diff --git a/d b/d
new file mode 100644
index 0000000..4bcfe98
--- /dev/null
+++ b/d
@@ -0,0 +1 @@
+d
ok 2 - diff batches blobs
expecting success:
test_when_finished "rm -rf server client trace" &&
test_create_repo server &&
echo a >server/a &&
echo b >server/b &&
git -C server add a b &&
git -C server commit -m x &&
echo another-a >server/a &&
git -C server add a &&
git -C server commit -m x &&
test_config -C server uploadpack.allowfilter 1 &&
test_config -C server uploadpack.allowanysha1inwant 1 &&
git clone --bare --filter=blob:limit=0 "file://$(pwd)/server" client &&
echo a | git hash-object --stdin >hash-old-a &&
echo another-a | git hash-object --stdin >hash-new-a &&
echo b | git hash-object --stdin >hash-b &&
# Ensure that only a and another-a are fetched.
GIT_TRACE_PACKET="$(pwd)/trace" git -C client diff HEAD^ HEAD &&
grep "want $(cat hash-old-a)" trace &&
grep "want $(cat hash-new-a)" trace &&
! grep "want $(cat hash-b)" trace
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4067-diff-partial-clone/server/.git/
[master (root-commit) 196d4df] x
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 a
create mode 100644 b
[master d777f16] x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Cloning into bare repository 'client'...
diff --git a/a b/a
index 7898192..594b61f 100644
--- a/a
+++ b/a
@@ -1 +1 @@
-a
+another-a
packet: git> want 78981922613b2afb6025042ff6bd878ac1994e85
packet: upload-pack< want 78981922613b2afb6025042ff6bd878ac1994e85
packet: git> want 594b61f56663a3c170222487bb2a7ca5cf7df2ad multi_ack_detailed side-band-64k thin-pack no-progress ofs-delta deepen-since deepen-not agent=git/2.23.0.rc1 filter
packet: upload-pack< want 594b61f56663a3c170222487bb2a7ca5cf7df2ad multi_ack_detailed side-band-64k thin-pack no-progress ofs-delta deepen-since deepen-not agent=git/2.23.0.rc1 filter
ok 3 - diff skips same-OID blobs
expecting success:
test_when_finished "rm -rf server client trace" &&
test_create_repo server &&
echo a >server/a &&
printf "b\nb\nb\nb\nb\n" >server/b &&
git -C server add a b &&
git -C server commit -m x &&
rm server/b &&
printf "b\nb\nb\nb\nbX\n" >server/c &&
git -C server add c &&
git -C server commit -a -m x &&
test_config -C server uploadpack.allowfilter 1 &&
test_config -C server uploadpack.allowanysha1inwant 1 &&
git clone --bare --filter=blob:limit=0 "file://$(pwd)/server" client &&
# Ensure that there is exactly 1 negotiation by checking that there is
# only 1 "done" line sent. ("done" marks the end of negotiation.)
GIT_TRACE_PACKET="$(pwd)/trace" git -C client diff -M HEAD^ HEAD >out &&
grep "similarity index" out &&
grep "git> done" trace >done_lines &&
test_line_count = 1 done_lines
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4067-diff-partial-clone/server/.git/
[master (root-commit) 746a1f6] x
Author: A U Thor <author@example.com>
2 files changed, 6 insertions(+)
create mode 100644 a
create mode 100644 b
[master d6c4928] x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
rename b => c (72%)
Cloning into bare repository 'client'...
similarity index 72%
ok 4 - diff with rename detection batches blobs
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4105-apply-fuzz.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4105-apply-fuzz/.git/
expecting success:
for i in 1 2 3 4 5 6 7 8 9 10 11 12
do
echo $i
done >file &&
git update-index --add file &&
for i in 1 2 3 4 5 6 7 a b c d e 8 9 10 11 12
do
echo $i
done >file &&
cat file >expect &&
git diff >O0.diff &&
sed -e "s/@@ -5,6 +5,11 @@/@@ -2,6 +2,11 @@/" >O1.diff O0.diff &&
sed -e "s/@@ -5,6 +5,11 @@/@@ -7,6 +7,11 @@/" >O2.diff O0.diff &&
sed -e "s/@@ -5,6 +5,11 @@/@@ -19,6 +19,11 @@/" >O3.diff O0.diff &&
sed -e "s/^ 5/ S/" >F0.diff O0.diff &&
sed -e "s/^ 5/ S/" >F1.diff O1.diff &&
sed -e "s/^ 5/ S/" >F2.diff O2.diff &&
sed -e "s/^ 5/ S/" >F3.diff O3.diff
ok 1 - setup
expecting success:
git checkout-index -f -q -u file &&
git apply O0.diff &&
test_cmp expect file
ok 2 - unmodified patch
expecting success:
git checkout-index -f -q -u file &&
git apply O1.diff &&
test_cmp expect file
ok 3 - minus offset
expecting success:
git checkout-index -f -q -u file &&
git apply O2.diff &&
test_cmp expect file
ok 4 - plus offset
expecting success:
git checkout-index -f -q -u file &&
git apply O3.diff &&
test_cmp expect file
ok 5 - big offset
expecting success:
git checkout-index -f -q -u file &&
git apply -C2 F0.diff &&
test_cmp expect file
Context reduced to (2/2) to apply fragment at 6
ok 6 - fuzz with no offset
expecting success:
git checkout-index -f -q -u file &&
git apply -C2 F1.diff &&
test_cmp expect file
Context reduced to (2/2) to apply fragment at 6
ok 7 - fuzz with minus offset
expecting success:
git checkout-index -f -q -u file &&
git apply -C2 F2.diff &&
test_cmp expect file
Context reduced to (2/2) to apply fragment at 6
ok 8 - fuzz with plus offset
expecting success:
git checkout-index -f -q -u file &&
git apply -C2 F3.diff &&
test_cmp expect file
Context reduced to (2/2) to apply fragment at 6
ok 9 - fuzz with big offset
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4106-apply-stdin.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4106-apply-stdin/.git/
expecting success:
echo hello >text &&
git add text &&
echo goodbye >text &&
git diff >patch
ok 1 - setup
expecting success:
echo "1 1 text" >expect &&
git apply --numstat - <patch >actual &&
test_cmp expect actual
ok 2 - git apply --numstat - < patch
expecting success:
for i in 1 2; do echo "1 1 text"; done >expect &&
git apply --numstat - < patch patch >actual &&
test_cmp expect actual
ok 3 - git apply --numstat - < patch patch
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4107-apply-ignore-whitespace.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4107-apply-ignore-whitespace/.git/
expecting success:
git apply patch1.patch
ok 1 - file creation
expecting success:
test_must_fail git apply patch2.patch
error: patch failed: main.c:10
error: main.c: patch does not apply
ok 2 - patch2 fails (retab)
expecting success:
git apply --ignore-whitespace patch2.patch
ok 3 - patch2 applies with --ignore-whitespace
expecting success:
git apply -R --ignore-space-change patch2.patch
ok 4 - patch2 reverse applies with --ignore-space-change
expecting success:
git apply patch2.patch &&
test_cmp main.c.final main.c
ok 5 - patch2 applies (apply.ignorewhitespace = change)
expecting success:
test_must_fail git apply patch3.patch
error: patch failed: main.c:10
error: main.c: patch does not apply
ok 6 - patch3 fails (missing string at EOL)
expecting success:
test_must_fail git apply patch4.patch
error: patch failed: main.c:21
error: main.c: patch does not apply
ok 7 - patch4 fails (missing EOL at EOF)
expecting success:
test_must_fail git apply patch5.patch
error: patch failed: main.c:2
error: main.c: patch does not apply
ok 8 - patch5 fails (leading whitespace differences matter)
expecting success:
rm -f main.c &&
git apply patch1.patch
ok 9 - re-create file (with --ignore-whitespace)
expecting success:
test_must_fail git apply --no-ignore-whitespace patch5.patch
error: patch failed: main.c:2
error: main.c: patch does not apply
ok 10 - patch5 fails (--no-ignore-whitespace)
expecting success:
echo 1 >file &&
git apply --ignore-space-change --inaccurate-eof <<-\EOF &&
diff --git a/file b/file
--- a/file
+++ b/file
@@ -1 +1 @@
-1
+2
EOF
printf 2 >expect &&
test_cmp expect file
ok 11 - apply --ignore-space-change --inaccurate-eof
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4109-apply-multifrag.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4109-apply-multifrag/.git/
expecting success:
git apply patch1.patch patch2.patch &&
test_cmp "$TEST_DIRECTORY/t4109/expect-1" main.c
patch1.patch:28: new blank line at EOF.
+
patch2.patch:58: new blank line at EOF.
+
warning: 2 lines add whitespace errors.
ok 1 - git apply (1)
expecting success:
git apply patch1.patch patch2.patch patch3.patch &&
test_cmp "$TEST_DIRECTORY/t4109/expect-2" main.c
patch1.patch:28: new blank line at EOF.
+
patch2.patch:58: new blank line at EOF.
+
warning: 2 lines add whitespace errors.
ok 2 - git apply (2)
expecting success:
git apply patch1.patch patch4.patch &&
test_cmp "$TEST_DIRECTORY/t4109/expect-3" main.c
patch1.patch:28: new blank line at EOF.
+
warning: 1 line adds whitespace errors.
ok 3 - git apply (3)
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4110-apply-scan.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4110-apply-scan/.git/
expecting success:
git apply \
"$TEST_DIRECTORY/t4110/patch1.patch" \
"$TEST_DIRECTORY/t4110/patch2.patch" \
"$TEST_DIRECTORY/t4110/patch3.patch" \
"$TEST_DIRECTORY/t4110/patch4.patch" \
"$TEST_DIRECTORY/t4110/patch5.patch" &&
test_cmp new.txt "$TEST_DIRECTORY/t4110/expect"
ok 1 - git apply scan
# passed all 1 test(s)
1..1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4104-apply-boundary.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4104-apply-boundary/.git/
expecting success:
for i in b c d e f g h i j k l m n o p q r s t u v w x y
do
echo $i
done >victim &&
cat victim >original &&
git update-index --add victim &&
# add to the head
for i in 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
do
echo $i
done >victim &&
cat victim >add-a-expect &&
git diff victim >add-a-patch.with &&
git diff --unified=0 >add-a-patch.without &&
# insert at line two
for i in b a c d e f g h i j k l m n o p q r s t u v w x y
do
echo $i
done >victim &&
cat victim >insert-a-expect &&
git diff victim >insert-a-patch.with &&
git diff --unified=0 >insert-a-patch.without &&
# modify at the head
for i in a c d e f g h i j k l m n o p q r s t u v w x y
do
echo $i
done >victim &&
cat victim >mod-a-expect &&
git diff victim >mod-a-patch.with &&
git diff --unified=0 >mod-a-patch.without &&
# remove from the head
for i in c d e f g h i j k l m n o p q r s t u v w x y
do
echo $i
done >victim &&
cat victim >del-a-expect &&
git diff victim >del-a-patch.with &&
git diff --unified=0 >del-a-patch.without &&
# add to the tail
for i in 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
do
echo $i
done >victim &&
cat victim >add-z-expect &&
git diff victim >add-z-patch.with &&
git diff --unified=0 >add-z-patch.without &&
# modify at the tail
for i in b c d e f g h i j k l m n o p q r s t u v w x z
do
echo $i
done >victim &&
cat victim >mod-z-expect &&
git diff victim >mod-z-patch.with &&
git diff --unified=0 >mod-z-patch.without &&
# remove from the tail
for i in b c d e f g h i j k l m n o p q r s t u v w x
do
echo $i
done >victim &&
cat victim >del-z-expect &&
git diff victim >del-z-patch.with &&
git diff --unified=0 >del-z-patch.without
# done
ok 1 - setup
expecting success:
cat original >victim &&
git update-index victim &&
git apply --index add-a-patch.with &&
test_cmp add-a-expect victim
ok 2 - apply add-a-patch with context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --index add-z-patch.with &&
test_cmp add-z-expect victim
ok 3 - apply add-z-patch with context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --index insert-a-patch.with &&
test_cmp insert-a-expect victim
ok 4 - apply insert-a-patch with context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --index mod-a-patch.with &&
test_cmp mod-a-expect victim
ok 5 - apply mod-a-patch with context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --index mod-z-patch.with &&
test_cmp mod-z-expect victim
ok 6 - apply mod-z-patch with context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --index del-a-patch.with &&
test_cmp del-a-expect victim
ok 7 - apply del-a-patch with context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --index del-z-patch.with &&
test_cmp del-z-expect victim
ok 8 - apply del-z-patch with context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --index --unidiff-zero add-a-patch.without &&
test_cmp add-a-expect victim
ok 9 - apply add-a-patch without context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --index --unidiff-zero add-z-patch.without &&
test_cmp add-z-expect victim
ok 10 - apply add-z-patch without context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --index --unidiff-zero insert-a-patch.without &&
test_cmp insert-a-expect victim
ok 11 - apply insert-a-patch without context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --index --unidiff-zero mod-a-patch.without &&
test_cmp mod-a-expect victim
ok 12 - apply mod-a-patch without context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --index --unidiff-zero mod-z-patch.without &&
test_cmp mod-z-expect victim
ok 13 - apply mod-z-patch without context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --index --unidiff-zero del-a-patch.without &&
test_cmp del-a-expect victim
ok 14 - apply del-a-patch without context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --index --unidiff-zero del-z-patch.without &&
test_cmp del-z-expect victim
ok 15 - apply del-z-patch without context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --unidiff-zero --index add-a-ng.without &&
test_cmp add-a-expect victim
ok 16 - apply non-git add-a-patch without context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --unidiff-zero --index add-z-ng.without &&
test_cmp add-z-expect victim
ok 17 - apply non-git add-z-patch without context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --unidiff-zero --index insert-a-ng.without &&
test_cmp insert-a-expect victim
ok 18 - apply non-git insert-a-patch without context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --unidiff-zero --index mod-a-ng.without &&
test_cmp mod-a-expect victim
ok 19 - apply non-git mod-a-patch without context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --unidiff-zero --index mod-z-ng.without &&
test_cmp mod-z-expect victim
ok 20 - apply non-git mod-z-patch without context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --unidiff-zero --index del-a-ng.without &&
test_cmp del-a-expect victim
ok 21 - apply non-git del-a-patch without context
expecting success:
cat original >victim &&
git update-index victim &&
git apply --unidiff-zero --index del-z-ng.without &&
test_cmp del-z-expect victim
ok 22 - apply non-git del-z-patch without context
expecting success:
>file &&
git add file &&
echo aaa >file &&
git diff >patch &&
git add file &&
echo bbb >file &&
git add file &&
test_must_fail git apply --check patch
error: patch failed: file:0
error: file: patch does not apply
ok 23 - two lines
expecting success:
{ echo a; echo b; echo c; echo d; } >file &&
git add file &&
echo e >>file &&
git diff >patch &&
>file &&
test_must_fail git apply patch
error: patch failed: file:2
error: file: patch does not apply
ok 24 - apply patch with 3 context lines matching at end
# passed all 24 test(s)
1..24
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4103-apply-binary.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4103-apply-binary/.git/
expecting success:
cat >file1 <<-\EOF &&
A quick brown fox jumps over the lazy dog.
A tiny little penguin runs around in circles.
There is a flag with Linux written on it.
A slow black-and-white panda just sits there,
munching on his bamboo.
EOF
cat file1 >file2 &&
cat file1 >file4 &&
git update-index --add --remove file1 file2 file4 &&
git commit -m "Initial Version" 2>/dev/null &&
git checkout -b binary &&
perl -pe "y/x/\000/" <file1 >file3 &&
cat file3 >file4 &&
git add file2 &&
perl -pe "y/\000/v/" <file3 >file1 &&
rm -f file2 &&
git update-index --add --remove file1 file2 file3 file4 &&
git commit -m "Second Version" &&
git diff-tree -p master binary >B.diff &&
git diff-tree -p -C master binary >C.diff &&
git diff-tree -p --binary master binary >BF.diff &&
git diff-tree -p --binary -C master binary >CF.diff &&
git diff-tree -p --full-index master binary >B-index.diff &&
git diff-tree -p -C --full-index master binary >C-index.diff &&
git diff-tree -p --binary --no-prefix master binary -- file3 >B0.diff &&
git init other-repo &&
(
cd other-repo &&
git fetch .. master &&
git reset --hard FETCH_HEAD
)
[master (root-commit) 38d786c] Initial Version
Author: A U Thor <author@example.com>
3 files changed, 15 insertions(+)
create mode 100644 file1
create mode 100644 file2
create mode 100644 file4
Switched to a new branch 'binary'
[binary 6659541] Second Version
Author: A U Thor <author@example.com>
3 files changed, 2 insertions(+), 2 deletions(-)
rename file2 => file3 (57%)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4103-apply-binary/other-repo/.git/
From ..
* branch master -> FETCH_HEAD
HEAD is now at 38d786c Initial Version
ok 1 - setup
expecting success: git checkout master &&
git apply --stat --summary B.diff
Switched to branch 'master'
file1 | 4 ++--
file2 | 5 -----
file3 | Bin
file4 | Bin
4 files changed, 2 insertions(+), 7 deletions(-)
delete mode 100644 file2
create mode 100644 file3
ok 2 - stat binary diff -- should not fail.
expecting success:
git checkout master &&
git apply --stat -p0 B0.diff
Already on 'master'
file3 | Bin
1 file changed, 0 insertions(+), 0 deletions(-)
ok 3 - stat binary -p0 diff -- should not fail.
expecting success: git checkout master &&
git apply --stat --summary C.diff
Already on 'master'
file1 | 4 ++--
file3 | Bin
file4 | Bin
3 files changed, 2 insertions(+), 2 deletions(-)
rename file2 => file3 (57%)
ok 4 - stat binary diff (copy) -- should not fail.
expecting success: git checkout master &&
test_must_fail git apply --check B.diff
Already on 'master'
error: cannot apply binary patch to 'file3' without full index line
error: file3: patch does not apply
error: cannot apply binary patch to 'file4' without full index line
error: file4: patch does not apply
ok 5 - check binary diff -- should fail.
expecting success: git checkout master &&
test_must_fail git apply --check C.diff
Already on 'master'
error: cannot apply binary patch to 'file2' without full index line
error: file2: patch does not apply
error: cannot apply binary patch to 'file4' without full index line
error: file4: patch does not apply
ok 6 - check binary diff (copy) -- should fail.
expecting success:
git checkout master &&
test_must_fail git apply --check --allow-binary-replacement B.diff
Already on 'master'
error: cannot apply binary patch to 'file3' without full index line
error: file3: patch does not apply
error: cannot apply binary patch to 'file4' without full index line
error: file4: patch does not apply
ok 7 - check incomplete binary diff with replacement -- should fail.
expecting success:
git checkout master &&
test_must_fail git apply --check --allow-binary-replacement C.diff
Already on 'master'
error: cannot apply binary patch to 'file2' without full index line
error: file2: patch does not apply
error: cannot apply binary patch to 'file4' without full index line
error: file4: patch does not apply
ok 8 - check incomplete binary diff with replacement (copy) -- should fail.
expecting success: git checkout master &&
git apply --check --allow-binary-replacement BF.diff
Already on 'master'
ok 9 - check binary diff with replacement.
expecting success: git checkout master &&
git apply --check --allow-binary-replacement CF.diff
Already on 'master'
ok 10 - check binary diff with replacement (copy).
expecting success: do_reset &&
test_must_fail git apply B.diff
HEAD is now at 38d786c Initial Version
Already on 'master'
error: cannot apply binary patch to 'file3' without full index line
error: file3: patch does not apply
error: cannot apply binary patch to 'file4' without full index line
error: file4: patch does not apply
ok 11 - apply binary diff -- should fail.
expecting success: do_reset &&
test_must_fail git apply --index B.diff
HEAD is now at 38d786c Initial Version
Already on 'master'
error: cannot apply binary patch to 'file3' without full index line
error: file3: patch does not apply
error: cannot apply binary patch to 'file4' without full index line
error: file4: patch does not apply
ok 12 - apply binary diff -- should fail.
expecting success: do_reset &&
test_must_fail git apply C.diff
HEAD is now at 38d786c Initial Version
Already on 'master'
error: cannot apply binary patch to 'file2' without full index line
error: file2: patch does not apply
error: cannot apply binary patch to 'file4' without full index line
error: file4: patch does not apply
ok 13 - apply binary diff (copy) -- should fail.
expecting success: do_reset &&
test_must_fail git apply --index C.diff
HEAD is now at 38d786c Initial Version
Already on 'master'
error: cannot apply binary patch to 'file2' without full index line
error: file2: patch does not apply
error: cannot apply binary patch to 'file4' without full index line
error: file4: patch does not apply
ok 14 - apply binary diff (copy) -- should fail.
expecting success:
do_reset &&
git apply B-index.diff
HEAD is now at 38d786c Initial Version
Already on 'master'
ok 15 - apply binary diff with full-index
expecting success:
do_reset &&
git apply C-index.diff
HEAD is now at 38d786c Initial Version
Already on 'master'
ok 16 - apply binary diff with full-index (copy)
expecting success:
(cd other-repo &&
do_reset &&
test_must_fail git apply ../B-index.diff)
HEAD is now at 38d786c Initial Version
Already on 'master'
error: missing binary patch data for 'file3'
error: binary patch does not apply to 'file3'
error: file3: patch does not apply
error: missing binary patch data for 'file4'
error: binary patch does not apply to 'file4'
error: file4: patch does not apply
ok 17 - apply full-index binary diff in new repo
expecting success: do_reset &&
git apply BF.diff
HEAD is now at 38d786c Initial Version
Already on 'master'
ok 18 - apply binary diff without replacement.
expecting success: do_reset &&
git apply CF.diff
HEAD is now at 38d786c Initial Version
Already on 'master'
ok 19 - apply binary diff without replacement (copy).
expecting success: do_reset &&
git apply --allow-binary-replacement --index BF.diff &&
test -z "$(git diff --name-status binary)"
HEAD is now at 38d786c Initial Version
Already on 'master'
ok 20 - apply binary diff.
expecting success: do_reset &&
git apply --allow-binary-replacement --index CF.diff &&
test -z "$(git diff --name-status binary)"
HEAD is now at 38d786c Initial Version
Already on 'master'
ok 21 - apply binary diff (copy).
expecting success:
do_reset &&
git apply -p0 --index B0.diff &&
test -z "$(git diff --name-status binary -- file3)"
HEAD is now at 38d786c Initial Version
Already on 'master'
ok 22 - apply binary -p0 diff
# passed all 22 test(s)
1..22
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4112-apply-renames.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4112-apply-renames/.git/
expecting success: git apply --check patch
ok 1 - check rename/copy patch
expecting success: git apply --index patch
ok 2 - apply rename/copy patch
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4113-apply-ending.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4113-apply-ending/.git/
expecting success: git update-index --add file
ok 1 - setup
expecting success: test_must_fail git apply --index test-patch
error: patch failed: file:1
error: file: patch does not apply
ok 2 - apply at the end
expecting success: test_must_fail git apply --index test-patch
error: patch failed: file:1
error: file: patch does not apply
ok 3 - apply at the beginning
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4108-apply-threeway.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4108-apply-threeway/.git/
expecting success:
test_tick &&
create_file >one 1 2 3 4 5 6 7 &&
cat one >two &&
git add one two &&
git commit -m initial &&
git branch side &&
test_tick &&
create_file >one 1 two 3 4 5 six 7 &&
create_file >two 1 two 3 4 5 6 7 &&
git commit -a -m master &&
git checkout side &&
create_file >one 1 2 3 4 five 6 7 &&
create_file >two 1 2 3 4 five 6 7 &&
git commit -a -m side &&
git checkout master
[master (root-commit) acfd9ea] initial
Author: A U Thor <author@example.com>
2 files changed, 14 insertions(+)
create mode 100644 one
create mode 100644 two
[master d66dc78] master
Author: A U Thor <author@example.com>
2 files changed, 3 insertions(+), 3 deletions(-)
Switched to branch 'side'
[side 3dc6c9f] side
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
Switched to branch 'master'
ok 1 - setup
expecting success:
git diff side^ side >P.diff &&
# should fail to apply
git reset --hard &&
git checkout master^0 &&
test_must_fail git apply --index P.diff &&
# should leave things intact
git diff-files --exit-code &&
git diff-index --exit-code --cached HEAD
HEAD is now at d66dc78 master
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d66dc78 master
error: patch failed: one:2
error: one: patch does not apply
error: patch failed: two:2
error: two: patch does not apply
ok 2 - apply without --3way
expecting success:
# Merging side should be similar to applying this patch
git diff ...side >P.diff &&
# The corresponding conflicted merge
git reset --hard &&
git checkout master^0 &&
test_must_fail git merge --no-commit side &&
git ls-files -s >expect.ls &&
git diff HEAD | sanitize_conflicted_diff >expect.diff &&
# should fail to apply
git reset --hard &&
git checkout master^0 &&
test_must_fail git apply --index --3way P.diff &&
git ls-files -s >actual.ls &&
git diff HEAD | sanitize_conflicted_diff >actual.diff &&
# The result should resemble the corresponding merge
test_cmp expect.ls actual.ls &&
test_cmp expect.diff actual.diff
HEAD is now at d66dc78 master
HEAD is now at d66dc78 master
Merging:
d66dc78 master
virtual side
found 1 common ancestor:
acfd9ea initial
Auto-merging two
Auto-merging one
CONFLICT (content): Merge conflict in one
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at d66dc78 master
HEAD is now at d66dc78 master
error: patch failed: one:2
Falling back to three-way merge...
Applied patch to 'one' with conflicts.
error: patch failed: two:2
Falling back to three-way merge...
Applied patch to 'two' cleanly.
U one
ok 3 - apply with --3way
expecting success:
git config rerere.enabled true &&
# Merging side should be similar to applying this patch
git diff ...side >P.diff &&
# The corresponding conflicted merge
git reset --hard &&
git checkout master^0 &&
test_must_fail git merge --no-commit side &&
# Manually resolve and record the resolution
create_file 1 two 3 4 five six 7 >one &&
git rerere &&
cat one >expect &&
# should fail to apply
git reset --hard &&
git checkout master^0 &&
test_must_fail git apply --index --3way P.diff &&
# but rerere should have replayed the recorded resolution
test_cmp expect one
HEAD is now at d66dc78 master
HEAD is now at d66dc78 master
Merging:
d66dc78 master
virtual side
found 1 common ancestor:
acfd9ea initial
Auto-merging two
Auto-merging one
CONFLICT (content): Merge conflict in one
Recorded preimage for 'one'
Automatic merge failed; fix conflicts and then commit the result.
Recorded resolution for 'one'.
HEAD is now at d66dc78 master
HEAD is now at d66dc78 master
error: patch failed: one:2
Falling back to three-way merge...
Applied patch to 'one' with conflicts.
error: patch failed: two:2
Falling back to three-way merge...
Applied patch to 'two' cleanly.
U one
Resolved 'one' using previous resolution.
ok 4 - apply with --3way with rerere enabled
expecting success:
git reset --hard &&
git checkout -b adder &&
create_file 1 2 3 4 5 6 7 >three &&
create_file 1 2 3 4 5 6 7 >four &&
git add three four &&
git commit -m "add three and four" &&
git checkout -b another adder^ &&
create_file 1 2 3 4 5 6 7 >three &&
create_file 1 2 3 four 5 6 7 >four &&
git add three four &&
git commit -m "add three and four" &&
# Merging another should be similar to applying this patch
git diff adder...another >P.diff &&
git checkout adder^0 &&
test_must_fail git merge --no-commit another &&
git ls-files -s >expect.ls &&
git diff HEAD | sanitize_conflicted_diff >expect.diff
HEAD is now at d66dc78 master
Switched to a new branch 'adder'
[adder 14bc0a0] add three and four
Author: A U Thor <author@example.com>
2 files changed, 14 insertions(+)
create mode 100644 four
create mode 100644 three
Switched to a new branch 'another'
[another 1dc7db6] add three and four
Author: A U Thor <author@example.com>
2 files changed, 14 insertions(+)
create mode 100644 four
create mode 100644 three
Note: switching to 'adder^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 14bc0a0 add three and four
Merging:
14bc0a0 add three and four
virtual another
found 1 common ancestor:
d66dc78 master
CONFLICT (add/add): Merge conflict in four
Auto-merging four
Recorded preimage for 'four'
Automatic merge failed; fix conflicts and then commit the result.
ok 5 - apply -3 with add/add conflict setup
expecting success:
# should fail to apply ...
git reset --hard &&
git checkout adder^0 &&
test_must_fail git apply --index --3way P.diff &&
# ... and leave conflicts in the index and in the working tree
git ls-files -s >actual.ls &&
git diff HEAD | sanitize_conflicted_diff >actual.diff &&
# The result should resemble the corresponding merge
test_cmp expect.ls actual.ls &&
test_cmp expect.diff actual.diff
HEAD is now at 14bc0a0 add three and four
HEAD is now at 14bc0a0 add three and four
Falling back to three-way merge...
Applied patch to 'four' with conflicts.
Falling back to three-way merge...
Applied patch to 'three' cleanly.
U four
Recorded preimage for 'four'
ok 6 - apply -3 with add/add conflict
expecting success:
# should fail to apply ...
git reset --hard &&
git checkout adder^0 &&
echo >>four &&
cat four >four.save &&
cat three >three.save &&
git ls-files -s >expect.ls &&
test_must_fail git apply --index --3way P.diff &&
# ... and should not touch anything
git ls-files -s >actual.ls &&
test_cmp expect.ls actual.ls &&
test_cmp four.save four &&
test_cmp three.save three
HEAD is now at 14bc0a0 add three and four
HEAD is now at 14bc0a0 add three and four
Falling back to three-way merge...
error: four: does not match index
error: cannot read the current contents of 'four'
error: four: patch does not apply
Falling back to three-way merge...
Applied patch to 'three' cleanly.
ok 7 - apply -3 with add/add conflict (dirty working tree)
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4115-apply-symlink.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4115-apply-symlink/.git/
expecting success:
test_ln_s_add path1/path2/path3/path4/path5 link1 &&
git commit -m initial &&
git branch side &&
rm -f link? &&
test_ln_s_add htap6 link1 &&
git commit -m second &&
git diff-tree -p HEAD^ HEAD >patch &&
git apply --stat --summary patch
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
[master (root-commit) 2811009] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 120000 link1
[master 74c9ecf] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
link1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
git checkout side &&
git apply patch &&
git diff-files -p >patched &&
test_cmp patch patched
Switched to branch 'side'
ok 2 - apply symlink patch
expecting success:
git checkout -f side &&
git apply --index patch &&
git diff-index --cached -p HEAD >patched &&
test_cmp patch patched
Already on 'side'
ok 3 - apply --index symlink patch
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4116-apply-reverse.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4116-apply-reverse/.git/
expecting success:
for i in a b c d e f g h i j k l m n; do echo $i; done >file1 &&
perl -pe "y/ijk/\\000\\001\\002/" <file1 >file2 &&
git add file1 file2 &&
git commit -m initial &&
git tag initial &&
for i in a b c g h i J K L m o n p q; do echo $i; done >file1 &&
perl -pe "y/mon/\\000\\001\\002/" <file1 >file2 &&
git commit -a -m second &&
git tag second &&
git diff --binary initial second >patch
[master (root-commit) 8a18cf2] initial
Author: A U Thor <author@example.com>
2 files changed, 14 insertions(+)
create mode 100644 file1
create mode 100644 file2
[master 3ce32d8] second
Author: A U Thor <author@example.com>
2 files changed, 6 insertions(+), 6 deletions(-)
ok 1 - setup
expecting success:
T0=$(git rev-parse "second^{tree}") &&
git reset --hard initial &&
git apply --index --binary patch &&
T1=$(git write-tree) &&
test "$T0" = "$T1"
HEAD is now at 8a18cf2 initial
ok 2 - apply in forward
expecting success:
git reset --hard second &&
git apply --reverse --binary --index patch &&
git diff >diff &&
test_must_be_empty diff
HEAD is now at 3ce32d8 second
ok 3 - apply in reverse
expecting success:
git archive --format=tar --prefix=initial/ initial | $TAR xf - &&
(
cd initial && git init && git add .
) &&
git archive --format=tar --prefix=second/ second | $TAR xf - &&
(
cd second && git init && git add .
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4116-apply-reverse/initial/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4116-apply-reverse/second/.git/
ok 4 - setup separate repository lacking postimage
expecting success:
T0=$(git rev-parse "second^{tree}") &&
(
cd initial &&
git apply --index --binary ../patch &&
T1=$(git write-tree) &&
test "$T0" = "$T1"
)
ok 5 - apply in forward without postimage
expecting success:
T0=$(git rev-parse "initial^{tree}") &&
(
cd second &&
git apply --index --binary --reverse ../patch &&
T1=$(git write-tree) &&
test "$T0" = "$T1"
)
ok 6 - apply in reverse without postimage
expecting success:
sed "s/a/a /" < file1 > file1.new &&
mv file1.new file1 &&
git diff | git apply --reverse --whitespace=error
ok 7 - reversing a whitespace introduction
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4117-apply-reject.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4117-apply-reject/.git/
expecting success:
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
do
echo $i
done >file1 &&
cat file1 >saved.file1 &&
git update-index --add file1 &&
git commit -m initial &&
for i in 1 2 A B 4 5 6 7 8 9 10 11 12 C 13 14 15 16 17 18 19 20 D 21
do
echo $i
done >file1 &&
git diff >patch.1 &&
cat file1 >clean &&
for i in 1 E 2 3 4 5 6 7 8 9 10 11 12 C 13 14 15 16 17 18 19 20 F 21
do
echo $i
done >expected &&
mv file1 file2 &&
git update-index --add --remove file1 file2 &&
git diff -M HEAD >patch.2 &&
rm -f file1 file2 &&
mv saved.file1 file1 &&
git update-index --add --remove file1 file2 &&
for i in 1 E 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 F 21
do
echo $i
done >file1 &&
cat file1 >saved.file1
[master (root-commit) ea4e777] initial
Author: A U Thor <author@example.com>
1 file changed, 21 insertions(+)
create mode 100644 file1
ok 1 - setup
expecting success:
test_when_finished "cat saved.file1 >file1" &&
git diff >patch.0 &&
git checkout file1 &&
test_must_fail git apply --reject --3way patch.0 &&
git diff --exit-code
Updated 1 path from the index
error: --reject and --3way cannot be used together.
ok 2 - apply --reject is incompatible with --3way
expecting success:
test_must_fail git apply patch.1 &&
test_cmp file1 saved.file1
error: patch failed: file1:1
error: file1: patch does not apply
ok 3 - apply without --reject should fail
expecting success:
test_must_fail git apply --verbose patch.1 &&
test_cmp file1 saved.file1
Checking patch file1...
error: while searching for:
1
2
3
4
5
6
error: patch failed: file1:1
error: file1: patch does not apply
ok 4 - apply without --reject should fail
expecting success:
cat saved.file1 >file1 &&
rm -f file1.rej file2.rej &&
test_must_fail git apply --reject patch.1 &&
test_cmp expected file1 &&
cat file1.rej &&
test_path_is_missing file2.rej
Checking patch file1...
error: while searching for:
1
2
3
4
5
6
error: patch failed: file1:1
error: while searching for:
18
19
20
21
error: patch failed: file1:18
Applying patch file1 with 2 rejects...
Rejected hunk #1.
Hunk #2 applied cleanly.
Rejected hunk #3.
diff a/file1 b/file1 (rejected hunks)
@@ -1,6 +1,7 @@
1
2
-3
+A
+B
4
5
6
@@ -18,4 +20,5 @@
18
19
20
+D
21
ok 5 - apply with --reject should fail but update the file
expecting success:
cat saved.file1 >file1 &&
rm -f file1.rej file2.rej file2 &&
test_must_fail git apply --reject patch.2 >rejects &&
test_path_is_missing file1 &&
test_cmp expected file2 &&
cat file2.rej &&
test_path_is_missing file1.rej
Checking patch file1 => file2...
error: while searching for:
1
2
3
4
5
6
error: patch failed: file1:1
error: while searching for:
18
19
20
21
error: patch failed: file1:18
Applying patch file1 => file2 with 2 rejects...
Rejected hunk #1.
Hunk #2 applied cleanly.
Rejected hunk #3.
diff a/file2 b/file2 (rejected hunks)
@@ -1,6 +1,7 @@
1
2
-3
+A
+B
4
5
6
@@ -18,4 +20,5 @@
18
19
20
+D
21
ok 6 - apply with --reject should fail but update the file
expecting success:
cat saved.file1 >file1 &&
rm -f file1.rej file2.rej file2 &&
test_must_fail git apply --reject --verbose patch.2 >rejects &&
test_path_is_missing file1 &&
test_cmp expected file2 &&
cat file2.rej &&
test_path_is_missing file1.rej
Checking patch file1 => file2...
error: while searching for:
1
2
3
4
5
6
error: patch failed: file1:1
error: while searching for:
18
19
20
21
error: patch failed: file1:18
Applying patch file1 => file2 with 2 rejects...
Rejected hunk #1.
Hunk #2 applied cleanly.
Rejected hunk #3.
diff a/file2 b/file2 (rejected hunks)
@@ -1,6 +1,7 @@
1
2
-3
+A
+B
4
5
6
@@ -18,4 +20,5 @@
18
19
20
+D
21
ok 7 - the same test with --verbose
expecting success:
git cat-file -p HEAD:file1 >file1 &&
rm -f file?.rej file2 &&
git apply --verbose patch.1 &&
test_cmp file1 clean
Checking patch file1...
Applied patch file1 cleanly.
ok 8 - apply cleanly with --verbose
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4111-apply-subdir.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4111-apply-subdir/.git/
expecting success:
cat >patch <<-\EOF &&
diff file.orig file
--- a/file.orig
+++ b/file
@@ -1 +1,2 @@
1
+2
EOF
patch="$(pwd)/patch" &&
echo 1 >preimage &&
printf "%s\n" 1 2 >postimage &&
echo 3 >other &&
test_tick &&
git commit --allow-empty -m basis
[master (root-commit) 2fa880c] basis
Author: A U Thor <author@example.com>
ok 1 - setup
expecting success:
reset_subdir() {
git reset &&
mkdir -p sub/dir/b &&
mkdir -p objects &&
cp "$1" file &&
cp "$1" objects/file &&
cp "$1" sub/dir/file &&
cp "$1" sub/dir/b/file &&
git add file sub/dir/file sub/dir/b/file objects/file &&
cp "$2" file &&
cp "$2" sub/dir/file &&
cp "$2" sub/dir/b/file &&
cp "$2" objects/file &&
test_might_fail git update-index --refresh -q
}
ok 2 - setup: subdir
expecting success:
cp postimage expected &&
reset_subdir other preimage &&
(
cd sub/dir &&
git apply "$patch"
) &&
test_cmp expected sub/dir/file
file: needs update
objects/file: needs update
sub/dir/b/file: needs update
sub/dir/file: needs update
ok 3 - apply from subdir of toplevel
expecting success:
cp postimage expected &&
cp other expected.working &&
reset_subdir preimage other &&
(
cd sub/dir &&
git apply --cached "$patch"
) &&
git show :sub/dir/file >actual &&
test_cmp expected actual &&
test_cmp expected.working sub/dir/file
file: needs update
objects/file: needs update
sub/dir/b/file: needs update
sub/dir/file: needs update
ok 4 - apply --cached from subdir of toplevel
expecting success:
cp postimage expected &&
reset_subdir preimage other &&
(
cd sub/dir &&
test_must_fail git apply --index "$patch"
) &&
reset_subdir other preimage &&
(
cd sub/dir &&
test_must_fail git apply --index "$patch"
) &&
reset_subdir preimage preimage &&
(
cd sub/dir &&
git apply --index "$patch"
) &&
git show :sub/dir/file >actual &&
test_cmp expected actual &&
test_cmp expected sub/dir/file
file: needs update
objects/file: needs update
sub/dir/b/file: needs update
sub/dir/file: needs update
error: sub/dir/file: does not match index
file: needs update
objects/file: needs update
sub/dir/b/file: needs update
sub/dir/file: needs update
error: sub/dir/file: does not match index
ok 5 - apply --index from subdir of toplevel
expecting success:
(
cd sub/dir &&
test_must_fail git apply <<-EOF
--- sub/dir/file
+++ sub/dir/file
@@ -1,0 +1,0 @@
--- file_in_root
+++ file_in_root
@@ -1,0 +1,0 @@
EOF
)
error: corrupt patch at line 4
ok 6 - apply half-broken patch from subdir of toplevel
expecting success:
cp postimage expected &&
cp preimage .git/file &&
cp preimage .git/objects/file &&
(
cd .git &&
git apply "$patch"
) &&
test_cmp expected .git/file
ok 7 - apply from .git dir
expecting success:
cp postimage expected &&
cp preimage .git/file &&
cp preimage .git/objects/file &&
(
cd .git/objects &&
git apply "$patch"
) &&
test_cmp expected .git/objects/file
ok 8 - apply from subdir of .git dir
expecting success:
cp postimage expected &&
cp other expected.working &&
cp other .git/file &&
reset_subdir preimage other &&
(
cd .git &&
git apply --cached "$patch"
) &&
git show :file >actual &&
test_cmp expected actual &&
test_cmp expected.working file &&
test_cmp expected.working .git/file
file: needs update
objects/file: needs update
sub/dir/b/file: needs update
sub/dir/file: needs update
ok 9 - apply --cached from .git dir
expecting success:
cp postimage expected &&
cp preimage expected.subdir &&
cp other .git/file &&
cp other .git/objects/file &&
reset_subdir preimage other &&
(
cd .git/objects &&
git apply --cached "$patch"
) &&
git show :file >actual &&
git show :objects/file >actual.subdir &&
test_cmp expected actual &&
test_cmp expected.subdir actual.subdir
file: needs update
objects/file: needs update
sub/dir/b/file: needs update
sub/dir/file: needs update
ok 10 - apply --cached from subdir of .git dir
# passed all 10 test(s)
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4114-apply-typechange.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4114-apply-typechange/.git/
expecting success:
echo "hello world" > foo &&
echo "hi planet" > bar &&
git update-index --add foo bar &&
git commit -m initial &&
git branch initial &&
rm -f foo &&
test_ln_s_add bar foo &&
git commit -m "foo symlinked to bar" &&
git branch foo-symlinked-to-bar &&
git rm -f foo &&
echo "how far is the sun?" > foo &&
git update-index --add foo &&
git commit -m "foo back to file" &&
git branch foo-back-to-file &&
printf "\0" > foo &&
git update-index foo &&
git commit -m "foo becomes binary" &&
git branch foo-becomes-binary &&
rm -f foo &&
git update-index --remove foo &&
mkdir foo &&
echo "if only I knew" > foo/baz &&
git update-index --add foo/baz &&
git commit -m "foo becomes a directory" &&
git branch "foo-becomes-a-directory" &&
echo "hello world" > foo/baz &&
git update-index foo/baz &&
git commit -m "foo/baz is the original foo" &&
git branch foo-baz-renamed-from-foo
[master (root-commit) 07b9a88] initial
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 bar
create mode 100644 foo
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
[master e87dda1] foo symlinked to bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
rewrite foo (100%)
mode change 100644 => 120000
rm 'foo'
[master da58f95] foo back to file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
rewrite foo (100%)
mode change 120000 => 100644
[master 8a23a8e] foo becomes binary
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
[master f437c61] foo becomes a directory
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
delete mode 100644 foo
create mode 100644 foo/baz
[master 5cc4b93] foo/baz is the original foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup repository and commits
expecting success:
git checkout -f initial &&
git diff-tree -M -p HEAD foo-baz-renamed-from-foo > patch &&
git apply --index < patch
Switched to branch 'initial'
ok 2 - file renamed from foo to foo/baz
expecting success:
git checkout -f foo-baz-renamed-from-foo &&
git diff-tree -M -p HEAD initial > patch &&
git apply --index < patch
Switched to branch 'foo-baz-renamed-from-foo'
ok 3 - file renamed from foo/baz to foo
expecting success:
git checkout -f foo-becomes-a-directory &&
git diff-tree -p HEAD initial > patch &&
git apply --index < patch
Switched to branch 'foo-becomes-a-directory'
ok 4 - directory becomes file
expecting success:
git checkout -f initial &&
git diff-tree -p HEAD foo-becomes-a-directory > patch &&
git apply --index < patch
Switched to branch 'initial'
ok 5 - file becomes directory
expecting success:
git checkout -f initial &&
git diff-tree -p HEAD foo-symlinked-to-bar > patch &&
git apply --index < patch
Already on 'initial'
ok 6 - file becomes symlink
expecting success:
git checkout -f foo-symlinked-to-bar &&
git diff-tree -p HEAD foo-back-to-file > patch &&
git apply --index < patch
Switched to branch 'foo-symlinked-to-bar'
ok 7 - symlink becomes file
expecting success:
git checkout -f foo-becomes-binary &&
git diff-tree -p --binary HEAD foo-symlinked-to-bar > patch &&
git apply --index < patch
Switched to branch 'foo-becomes-binary'
ok 8 - binary file becomes symlink
expecting success:
git checkout -f foo-symlinked-to-bar &&
git diff-tree -p --binary HEAD foo-becomes-binary > patch &&
git apply --index < patch
Switched to branch 'foo-symlinked-to-bar'
ok 9 - symlink becomes binary file
expecting success:
git checkout -f foo-symlinked-to-bar &&
git diff-tree -p HEAD foo-becomes-a-directory > patch &&
git apply --index < patch
Already on 'foo-symlinked-to-bar'
ok 10 - symlink becomes directory
expecting success:
git checkout -f foo-becomes-a-directory &&
git diff-tree -p HEAD foo-symlinked-to-bar > patch &&
git apply --index < patch
Switched to branch 'foo-becomes-a-directory'
ok 11 - directory becomes symlink
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4118-apply-empty-context.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4118-apply-empty-context/.git/
expecting success:
{
echo; echo;
echo A; echo B; echo C;
echo;
} >file1 &&
cat file1 >file1.orig &&
{
cat file1 &&
echo Q | tr -d "\\012"
} >file2 &&
cat file2 >file2.orig &&
git add file1 file2 &&
sed -e "/^B/d" <file1.orig >file1 &&
cat file1 > file2 &&
echo Q | tr -d "\\012" >>file2 &&
cat file1 >file1.mods &&
cat file2 >file2.mods &&
git diff |
sed -e "s/^ \$//" >diff.output
ok 1 - setup
expecting success:
git apply --numstat diff.output >actual &&
{
echo "0 1 file1" &&
echo "0 1 file2"
} >expect &&
test_cmp expect actual
ok 2 - apply --numstat
expecting success:
cat file1.orig >file1 &&
cat file2.orig >file2 &&
git update-index file1 file2 &&
git apply --index diff.output &&
test_cmp file1.mods file1 &&
test_cmp file2.mods file2
ok 3 - apply --apply
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4121-apply-diffs.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4121-apply-diffs/.git/
expecting success: git add file &&
git commit -q -m 1 &&
git checkout -b test &&
mv file file.tmp &&
echo 0 >file &&
cat file.tmp >>file &&
rm file.tmp &&
git commit -a -q -m 2 &&
echo 9 >>file &&
git commit -a -q -m 3 &&
git checkout master
Switched to a new branch 'test'
Switched to branch 'master'
ok 1 - setup
expecting success: ( git diff test~2 test~1 && git diff test~1 test~0 )| git apply
ok 2 - check if contextually independent diffs for the same file apply
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4123-apply-shrink.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4123-apply-shrink/.git/
expecting success:
git add F &&
mv F G &&
sed -e "s/1/11/" -e "s/999999/9/" -e "s/H/HH/" <G >F &&
git diff >patch &&
sed -e "/^\$/d" <G >F &&
git add F
ok 1 - setup
expecting success:
if git apply --index patch
then
echo Oops, should not have succeeded
false
else
status=$?
echo "Status was $status"
if test -f .git/index.lock
then
echo Oops, should not have crashed
false
fi
fi
error: patch failed: F:14
error: F: patch does not apply
Status was 1
ok 2 - apply should fail gracefully
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4120-apply-popt.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4120-apply-popt/.git/
expecting success:
mkdir sub &&
echo A >sub/file1 &&
cp sub/file1 file1.saved &&
git add sub/file1 &&
echo B >sub/file1 &&
git diff >patch.file &&
git checkout -- sub/file1 &&
git mv sub süb &&
echo B >süb/file1 &&
git diff >patch.escaped &&
grep "[\]" patch.escaped &&
rm süb/file1 &&
rmdir süb
diff --git "a/s\303\274b/file1" "b/s\303\274b/file1"
--- "a/s\303\274b/file1"
+++ "b/s\303\274b/file1"
ok 1 - setup
expecting success:
cp file1.saved file1 &&
git apply -p2 patch.file
ok 2 - apply git diff with -p2
expecting success:
cp file1.saved file1 &&
test_must_fail git apply --stat -p3 patch.file 2>err &&
test_i18ngrep "removing 3 leading" err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: git diff header lacks filename information when removing 3 leading pathname components (line 5)
ok 3 - apply with too large -p
expecting success:
cat >patch.quotes <<-\EOF &&
diff -u "a/"sub/file1 "b/"sub/file1
--- "a/"sub/file1
+++ "b/"sub/file1
@@ -1 +1 @@
-A
+B
EOF
echo B >expected &&
cp file1.saved file1 &&
git apply -p2 patch.quotes &&
test_cmp expected file1
ok 4 - apply (-p2) traditional diff with funny filenames
expecting success:
cp file1.saved file1 &&
test_must_fail git apply --stat -p3 patch.escaped 2>err &&
test_i18ngrep "removing 3 leading" err
error: git diff header lacks filename information when removing 3 leading pathname components (line 5)
ok 5 - apply with too large -p and fancy filename
expecting success:
cat >patch.chmod <<-\EOF &&
diff --git a/sub/file1 b/sub/file1
old mode 100644
new mode 100755
EOF
test_chmod -x file1 &&
git apply --index -p2 patch.chmod &&
case $(git ls-files -s file1) in 100755*) : good;; *) false;; esac
ok 6 - apply (-p2) diff, mode change only
checking prerequisite: FILEMODE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test "$(git config --bool core.filemode)" = true
)
prerequisite FILEMODE ok
expecting success:
test -x file1
ok 7 - file mode was changed
expecting success:
cat >patch.rename <<-\EOF &&
diff --git a/sub/file1 b/sub/file2
similarity index 100%
rename from sub/file1
rename to sub/file2
EOF
echo A >expected &&
cp file1.saved file1 &&
rm -f file2 &&
git apply -p2 patch.rename &&
test_cmp expected file2
ok 8 - apply (-p2) diff, rename
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4119-apply-config.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4119-apply-config/.git/
expecting success:
mkdir sub &&
echo A >sub/file1 &&
cp sub/file1 saved &&
git add sub/file1 &&
echo "B " >sub/file1 &&
git diff >patch.file
ok 1 - setup
expecting success:
rm -f sub/file1 &&
cp saved sub/file1 &&
git update-index --refresh &&
git apply --whitespace=strip patch.file &&
check_result sub/file1
patch.file:7: trailing whitespace.
B
warning: 1 line applied after fixing whitespace errors.
B
Happy
ok 2 - apply --whitespace=strip
expecting success:
rm -f sub/file1 &&
cp saved sub/file1 &&
git update-index --refresh &&
git config apply.whitespace strip &&
git apply patch.file &&
check_result sub/file1
patch.file:7: trailing whitespace.
B
warning: 1 line applied after fixing whitespace errors.
B
Happy
ok 3 - apply --whitespace=strip from config
expecting success:
cd "$D" &&
git config --unset-all apply.whitespace &&
rm -f sub/file1 &&
cp saved sub/file1 &&
git update-index --refresh &&
cd sub &&
git apply --whitespace=strip ../patch.file &&
check_result file1
sub/../patch.file:7: trailing whitespace.
B
warning: 1 line applied after fixing whitespace errors.
B
Happy
ok 4 - apply --whitespace=strip in subdir
expecting success:
cd "$D" &&
git config apply.whitespace strip &&
rm -f sub/file1 &&
cp saved sub/file1 &&
git update-index --refresh &&
cd sub &&
git apply ../patch.file &&
check_result file1
sub/../patch.file:7: trailing whitespace.
B
warning: 1 line applied after fixing whitespace errors.
B
Happy
ok 5 - apply --whitespace=strip from config in subdir
expecting success:
cd "$D" &&
git config apply.whitespace strip &&
rm -f sub/file1 &&
cp saved sub/file1 &&
git update-index --refresh &&
cd sub &&
git apply ../gpatch.file &&
check_result file1
sub/../gpatch.file:5: trailing whitespace.
B
warning: 1 line applied after fixing whitespace errors.
B
Happy
ok 6 - same in subdir but with traditional patch input
expecting success:
cd "$D" &&
git config apply.whitespace strip &&
rm -f sub/file1 &&
cp saved sub/file1 &&
git update-index --refresh &&
cd sub &&
git apply ../gpatch-sub.file &&
check_result file1
sub/../gpatch-sub.file:5: trailing whitespace.
B
warning: 1 line applied after fixing whitespace errors.
B
Happy
ok 7 - same but with traditional patch input of depth 1
expecting success:
cd "$D" &&
git config apply.whitespace strip &&
rm -f sub/file1 &&
cp saved sub/file1 &&
git update-index --refresh &&
cd sub &&
git apply ../gpatch-ab-sub.file &&
check_result file1
sub/../gpatch-ab-sub.file:5: trailing whitespace.
B
warning: 1 line applied after fixing whitespace errors.
B
Happy
ok 8 - same but with traditional patch input of depth 2
expecting success:
cd "$D" &&
git config apply.whitespace strip &&
rm -f sub/file1 &&
cp saved sub/file1 &&
git update-index --refresh &&
git apply -p0 gpatch-sub.file &&
check_result sub/file1
gpatch-sub.file:5: trailing whitespace.
B
warning: 1 line applied after fixing whitespace errors.
B
Happy
ok 9 - same but with traditional patch input of depth 1
expecting success:
cd "$D" &&
git config apply.whitespace strip &&
rm -f sub/file1 &&
cp saved sub/file1 &&
git update-index --refresh &&
git apply gpatch-ab-sub.file &&
check_result sub/file1
gpatch-ab-sub.file:5: trailing whitespace.
B
warning: 1 line applied after fixing whitespace errors.
B
Happy
ok 10 - same but with traditional patch input of depth 2
expecting success:
cd "$D" &&
git config apply.whitespace strip &&
cat >.gitattributes <<-EOF &&
/* whitespace=blank-at-eol
sub/* whitespace=-blank-at-eol
EOF
rm -f sub/file1 &&
cp saved sub/file1 &&
git update-index --refresh &&
cd sub &&
git apply ../gpatch.file &&
echo "B " >expect &&
test_cmp expect file1
ok 11 - in subdir with traditional patch input
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4125-apply-ws-fuzz.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4125-apply-ws-fuzz/.git/
expecting success:
>file &&
git add file &&
# file-0 is full of whitespace breakages
for l in a bb c d eeee f ggg h
do
echo "$l "
done >file-0 &&
# patch-0 creates a whitespace broken file
cat file-0 >file &&
git diff >patch-0 &&
git add file &&
# file-1 is still full of whitespace breakages,
# but has one line updated, without fixing any
# whitespaces.
# patch-1 records that change.
sed -e "s/d/D/" file-0 >file-1 &&
cat file-1 >file &&
git diff >patch-1 &&
# patch-all is the effect of both patch-0 and patch-1
>file &&
git add file &&
cat file-1 >file &&
git diff >patch-all &&
# patch-2 is the same as patch-1 but is based
# on a version that already has whitespace fixed,
# and does not introduce whitespace breakages.
sed -e "s/ \$//" patch-1 >patch-2 &&
# If all whitespace breakages are fixed the contents
# should look like file-fixed
sed -e "s/ \$//" file-1 >file-fixed
ok 1 - setup
expecting success:
>file &&
git add file &&
# Baseline. Applying without fixing any whitespace
# breakages.
git apply --whitespace=nowarn patch-0 &&
git apply --whitespace=nowarn patch-1 &&
# The result should obviously match.
test_cmp file-1 file
ok 2 - nofix
expecting success:
>file &&
git add file &&
# The first application will munge the context lines
# the second patch depends on. We should be able to
# adjust and still apply.
git apply --whitespace=fix patch-0 &&
git apply --whitespace=fix patch-1 &&
test_cmp file-fixed file
patch-0:6: trailing whitespace.
a
patch-0:7: trailing whitespace.
bb
patch-0:8: trailing whitespace.
c
patch-0:9: trailing whitespace.
d
patch-0:10: trailing whitespace.
eeee
warning: squelched 3 whitespace errors
warning: 8 lines applied after fixing whitespace errors.
patch-1:6: trailing whitespace.
a
patch-1:7: trailing whitespace.
bb
patch-1:8: trailing whitespace.
c
patch-1:10: trailing whitespace.
D
patch-1:11: trailing whitespace.
eeee
warning: squelched 2 whitespace errors
warning: 1 line applied after fixing whitespace errors.
ok 3 - withfix (forward)
expecting success:
>file &&
git add file &&
# Now we have a whitespace breakages on our side.
git apply --whitespace=nowarn patch-0 &&
# And somebody sends in a patch based on image
# with whitespace already fixed.
git apply --whitespace=fix patch-2 &&
# The result should accept the whitespace fixed
# postimage. But the line with "h" is beyond context
# horizon and left unfixed.
sed -e /h/d file-fixed >fixed-head &&
sed -e /h/d file >file-head &&
test_cmp fixed-head file-head &&
sed -n -e /h/p file-fixed >fixed-tail &&
sed -n -e /h/p file >file-tail &&
! test_cmp fixed-tail file-tail
--- fixed-tail 2019-08-14 07:29:19.028544634 +0000
+++ file-tail 2019-08-14 07:29:19.036544713 +0000
@@ -1 +1 @@
-h
+h
ok 4 - withfix (backward)
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4126-apply-empty.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4126-apply-empty/.git/
expecting success:
>empty &&
git add empty &&
test_tick &&
git commit -m initial &&
for i in a b c d e
do
echo $i
done >empty &&
cat empty >expect &&
git diff |
sed -e "/^diff --git/d" \
-e "/^index /d" \
-e "s|a/empty|empty.orig|" \
-e "s|b/empty|empty|" >patch0 &&
sed -e "s|empty|missing|" patch0 >patch1 &&
>empty &&
git update-index --refresh
[master (root-commit) e3f79fd] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 empty
ok 1 - setup
expecting success:
git reset --hard &&
rm -f missing &&
git apply patch0 &&
test_cmp expect empty
HEAD is now at e3f79fd initial
ok 2 - apply empty
expecting success:
git reset --hard &&
rm -f missing &&
git apply --index patch0 &&
test_cmp expect empty &&
git diff --exit-code
HEAD is now at e3f79fd initial
ok 3 - apply --index empty
expecting success:
git reset --hard &&
rm -f missing &&
git apply patch1 &&
test_cmp expect missing
HEAD is now at e3f79fd initial
ok 4 - apply create
expecting success:
git reset --hard &&
rm -f missing &&
git apply --index patch1 &&
test_cmp expect missing &&
git diff --exit-code
HEAD is now at e3f79fd initial
ok 5 - apply --index create
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4122-apply-symlink-inside.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4122-apply-symlink-inside/.git/
expecting success:
mkdir -p arch/i386/boot arch/x86_64 &&
test_write_lines 1 2 3 4 5 >arch/i386/boot/Makefile &&
test_ln_s_add ../i386/boot arch/x86_64/boot &&
git add . &&
test_tick &&
git commit -m initial &&
git branch test &&
rm arch/x86_64/boot &&
mkdir arch/x86_64/boot &&
test_write_lines 2 3 4 5 6 >arch/x86_64/boot/Makefile &&
git add . &&
test_tick &&
git commit -a -m second &&
git format-patch --binary -1 --stdout >test.patch
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
[master (root-commit) f9acfaa] initial
Author: A U Thor <author@example.com>
2 files changed, 6 insertions(+)
create mode 100644 arch/i386/boot/Makefile
create mode 120000 arch/x86_64/boot
[master e8e99d5] second
Author: A U Thor <author@example.com>
2 files changed, 5 insertions(+), 1 deletion(-)
delete mode 120000 arch/x86_64/boot
create mode 100644 arch/x86_64/boot/Makefile
ok 1 - setup
expecting success:
git checkout test &&
git diff --exit-code test &&
git diff --exit-code --cached test &&
git apply --index test.patch
Switched to branch 'test'
ok 2 - apply
expecting success:
git diff --exit-code master &&
git diff --exit-code --cached master &&
test_tick &&
git commit -m replay &&
T1=$(git rev-parse "master^{tree}") &&
T2=$(git rev-parse "HEAD^{tree}") &&
test "z$T1" = "z$T2"
[test 66a4bdc] replay
Author: A U Thor <author@example.com>
2 files changed, 5 insertions(+), 1 deletion(-)
delete mode 120000 arch/x86_64/boot
create mode 100644 arch/x86_64/boot/Makefile
ok 3 - check result
expecting success:
git reset --hard &&
mkdir -p arch/x86_64/dir &&
>arch/x86_64/dir/file &&
git add arch/x86_64/dir/file &&
echo line >arch/x86_64/dir/file &&
git diff >patch &&
git reset --hard &&
mkdir arch/i386/dir &&
>arch/i386/dir/file &&
ln -s ../i386/dir arch/x86_64/dir &&
test_must_fail git apply patch &&
test_must_fail git apply --cached patch &&
test_must_fail git apply --index patch
HEAD is now at 66a4bdc replay
HEAD is now at 66a4bdc replay
error: affected file 'arch/x86_64/dir/file' is beyond a symbolic link
error: arch/x86_64/dir/file: does not exist in index
error: arch/x86_64/dir/file: does not exist in index
ok 4 - do not read from beyond symbolic link
expecting success:
rm -rf arch/i386/dir arch/x86_64/dir &&
git reset --hard &&
ln -s ../i386/dir arch/x86_64/dir &&
git add arch/x86_64/dir &&
git diff HEAD >add_symlink.patch &&
git reset --hard &&
mkdir arch/x86_64/dir &&
>arch/x86_64/dir/file &&
git add arch/x86_64/dir/file &&
git diff HEAD >add_file.patch &&
git diff -R HEAD >del_file.patch &&
git reset --hard &&
rm -fr arch/x86_64/dir &&
cat add_symlink.patch add_file.patch >patch &&
cat add_symlink.patch del_file.patch >tricky_del &&
mkdir arch/i386/dir
HEAD is now at 66a4bdc replay
HEAD is now at 66a4bdc replay
HEAD is now at 66a4bdc replay
ok 5 - do not follow symbolic link (setup)
expecting success:
# same input creates a confusing symbolic link
test_must_fail git apply patch 2>error-wt &&
test_i18ngrep "beyond a symbolic link" error-wt &&
test_path_is_missing arch/x86_64/dir &&
test_path_is_missing arch/i386/dir/file &&
test_must_fail git apply --index patch 2>error-ix &&
test_i18ngrep "beyond a symbolic link" error-ix &&
test_path_is_missing arch/x86_64/dir &&
test_path_is_missing arch/i386/dir/file &&
test_must_fail git ls-files --error-unmatch arch/x86_64/dir &&
test_must_fail git ls-files --error-unmatch arch/i386/dir &&
test_must_fail git apply --cached patch 2>error-ct &&
test_i18ngrep "beyond a symbolic link" error-ct &&
test_must_fail git ls-files --error-unmatch arch/x86_64/dir &&
test_must_fail git ls-files --error-unmatch arch/i386/dir &&
>arch/i386/dir/file &&
git add arch/i386/dir/file &&
test_must_fail git apply tricky_del &&
test_path_is_file arch/i386/dir/file &&
test_must_fail git apply --index tricky_del &&
test_path_is_file arch/i386/dir/file &&
test_must_fail git ls-files --error-unmatch arch/x86_64/dir &&
git ls-files --error-unmatch arch/i386/dir &&
test_must_fail git apply --cached tricky_del &&
test_must_fail git ls-files --error-unmatch arch/x86_64/dir &&
git ls-files --error-unmatch arch/i386/dir
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: affected file 'arch/x86_64/dir/file' is beyond a symbolic link
error: affected file 'arch/x86_64/dir/file' is beyond a symbolic link
error: pathspec 'arch/x86_64/dir' did not match any file(s) known to git
Did you forget to 'git add'?
error: pathspec 'arch/i386/dir' did not match any file(s) known to git
Did you forget to 'git add'?
error: affected file 'arch/x86_64/dir/file' is beyond a symbolic link
error: pathspec 'arch/x86_64/dir' did not match any file(s) known to git
Did you forget to 'git add'?
error: pathspec 'arch/i386/dir' did not match any file(s) known to git
Did you forget to 'git add'?
error: arch/x86_64/dir/file: No such file or directory
error: arch/x86_64/dir/file: does not exist in index
error: pathspec 'arch/x86_64/dir' did not match any file(s) known to git
Did you forget to 'git add'?
arch/i386/dir/file
error: arch/x86_64/dir/file: does not exist in index
error: pathspec 'arch/x86_64/dir' did not match any file(s) known to git
Did you forget to 'git add'?
arch/i386/dir/file
ok 6 - do not follow symbolic link (same input)
expecting success:
# existing symbolic link
git reset --hard &&
ln -s ../i386/dir arch/x86_64/dir &&
git add arch/x86_64/dir &&
test_must_fail git apply add_file.patch 2>error-wt-add &&
test_i18ngrep "beyond a symbolic link" error-wt-add &&
test_path_is_missing arch/i386/dir/file &&
mkdir arch/i386/dir &&
>arch/i386/dir/file &&
test_must_fail git apply del_file.patch 2>error-wt-del &&
test_i18ngrep "beyond a symbolic link" error-wt-del &&
test_path_is_file arch/i386/dir/file &&
rm arch/i386/dir/file &&
test_must_fail git apply --index add_file.patch 2>error-ix-add &&
test_i18ngrep "beyond a symbolic link" error-ix-add &&
test_path_is_missing arch/i386/dir/file &&
test_must_fail git ls-files --error-unmatch arch/i386/dir &&
test_must_fail git apply --cached add_file.patch 2>error-ct-file &&
test_i18ngrep "beyond a symbolic link" error-ct-file &&
test_must_fail git ls-files --error-unmatch arch/i386/dir
HEAD is now at 66a4bdc replay
error: affected file 'arch/x86_64/dir/file' is beyond a symbolic link
error: reading from 'arch/x86_64/dir/file' beyond a symbolic link
error: affected file 'arch/x86_64/dir/file' is beyond a symbolic link
error: pathspec 'arch/i386/dir' did not match any file(s) known to git
Did you forget to 'git add'?
error: affected file 'arch/x86_64/dir/file' is beyond a symbolic link
error: pathspec 'arch/i386/dir' did not match any file(s) known to git
Did you forget to 'git add'?
ok 7 - do not follow symbolic link (existing)
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4128-apply-root.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4128-apply-root/.git/
expecting success:
mkdir -p some/sub/dir &&
echo Hello > some/sub/dir/file &&
git add some/sub/dir/file &&
git commit -m initial &&
git tag initial
[master (root-commit) d8519f7] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 some/sub/dir/file
ok 1 - setup
expecting success:
git apply --directory=some/sub -p3 --index patch &&
test Bello = $(git show :some/sub/dir/file) &&
test Bello = $(cat some/sub/dir/file)
ok 2 - apply --directory -p (1)
expecting success:
git reset --hard initial &&
git apply --directory=some/sub/ -p3 --index patch &&
test Bello = $(git show :some/sub/dir/file) &&
test Bello = $(cat some/sub/dir/file)
HEAD is now at d8519f7 initial
ok 3 - apply --directory -p (2)
expecting success:
git reset --hard initial &&
git apply --directory=some/sub/dir/ --index patch &&
test content = $(git show :some/sub/dir/newfile) &&
test content = $(cat some/sub/dir/newfile)
HEAD is now at d8519f7 initial
ok 4 - apply --directory (new file)
expecting success:
git reset --hard initial &&
git apply -p2 --directory=some/sub/dir/ --index patch &&
test content = $(git show :some/sub/dir/newfile2) &&
test content = $(cat some/sub/dir/newfile2)
HEAD is now at d8519f7 initial
ok 5 - apply --directory -p (new file)
expecting success:
git reset --hard initial &&
echo content >some/sub/dir/delfile &&
git add some/sub/dir/delfile &&
git apply --directory=some/sub/dir/ --index patch &&
! (git ls-files | grep delfile)
HEAD is now at d8519f7 initial
ok 6 - apply --directory (delete file)
expecting success:
git reset --hard initial &&
git apply --directory=some/sub/dir/ --index patch &&
test content = $(git show :some/sub/dir/quotefile) &&
test content = $(cat some/sub/dir/quotefile)
HEAD is now at d8519f7 initial
ok 7 - apply --directory (quoted filename)
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4127-apply-same-fn.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4127-apply-same-fn/.git/
expecting success:
for i in a b c d e f g h i j k l m
do
echo $i
done >same_fn &&
cp same_fn other_fn &&
git add same_fn other_fn &&
git commit -m initial
[master (root-commit) 7ea7c75] initial
Author: A U Thor <author@example.com>
2 files changed, 26 insertions(+)
create mode 100644 other_fn
create mode 100644 same_fn
ok 1 - setup
expecting success:
modify "s/^d/z/" same_fn &&
git diff > patch0 &&
git add same_fn &&
modify "s/^i/y/" same_fn &&
git diff >> patch0 &&
cp same_fn same_fn2 &&
git reset --hard &&
git apply patch0 &&
test_cmp same_fn same_fn2
HEAD is now at 7ea7c75 initial
ok 2 - apply same filename with independent changes
expecting success:
git reset --hard &&
modify "s/^d/z/" same_fn &&
git diff > patch0 &&
git add same_fn &&
modify "s/^e/y/" same_fn &&
git diff >> patch0 &&
cp same_fn same_fn2 &&
git reset --hard &&
git apply patch0 &&
test_cmp same_fn same_fn2
HEAD is now at 7ea7c75 initial
HEAD is now at 7ea7c75 initial
ok 3 - apply same filename with overlapping changes
expecting success:
git reset --hard &&
git mv same_fn new_fn &&
modify "s/^d/z/" new_fn &&
git add new_fn &&
git diff -M --cached > patch1 &&
modify "s/^e/y/" new_fn &&
git diff >> patch1 &&
cp new_fn new_fn2 &&
git reset --hard &&
git apply --index patch1 &&
test_cmp new_fn new_fn2
HEAD is now at 7ea7c75 initial
HEAD is now at 7ea7c75 initial
ok 4 - apply same new filename after rename
expecting success:
git reset --hard &&
git mv same_fn new_fn &&
modify "s/^d/z/" new_fn &&
git add new_fn &&
git diff -M --cached > patch1 &&
git mv new_fn same_fn &&
modify "s/^e/y/" same_fn &&
git diff >> patch1 &&
git reset --hard &&
test_must_fail git apply patch1
HEAD is now at 7ea7c75 initial
HEAD is now at 7ea7c75 initial
error: path same_fn has been renamed/deleted
ok 5 - apply same old filename after rename -- should fail.
expecting success:
git reset --hard &&
git mv same_fn new_fn &&
modify "s/^d/z/" new_fn &&
git add new_fn &&
git diff -M --cached > patch1 &&
git commit -m "a rename" &&
git mv other_fn same_fn &&
modify "s/^e/y/" same_fn &&
git add same_fn &&
git diff -M --cached >> patch1 &&
modify "s/^g/x/" same_fn &&
git diff >> patch1 &&
git reset --hard HEAD^ &&
git apply patch1
HEAD is now at 7ea7c75 initial
[master 18d4bee] a rename
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
rename same_fn => new_fn (92%)
HEAD is now at 7ea7c75 initial
ok 6 - apply A->B (rename), C->A (rename), A->A -- should pass.
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4129-apply-samemode.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4129-apply-samemode/.git/
expecting success:
echo original >file &&
git add file &&
test_tick &&
git commit -m initial &&
git tag initial &&
echo modified >file &&
git diff --stat -p >patch-0.txt &&
chmod +x file &&
git diff --stat -p >patch-1.txt &&
sed "s/^\(new mode \).*/\1/" <patch-1.txt >patch-empty-mode.txt &&
sed "s/^\(new mode \).*/\1garbage/" <patch-1.txt >patch-bogus-mode.txt
[master (root-commit) e950771] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 1 - setup
checking prerequisite: FILEMODE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test "$(git config --bool core.filemode)" = true
)
prerequisite FILEMODE ok
expecting success:
git reset --hard &&
chmod +x file &&
git apply patch-0.txt &&
test -x file
HEAD is now at e950771 initial
warning: file has type 100755, expected 100644
ok 2 - same mode (no index)
expecting success:
git reset --hard &&
chmod +x file &&
git add file &&
git apply --index patch-0.txt &&
test -x file &&
git diff --exit-code
HEAD is now at e950771 initial
warning: file has type 100755, expected 100644
ok 3 - same mode (with index)
expecting success:
git reset --hard &&
chmod +x file &&
git add file &&
git apply --cached patch-0.txt &&
git ls-files -s file | grep "^100755"
HEAD is now at e950771 initial
warning: file has type 100755, expected 100644
100755 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0 file
ok 4 - same mode (index only)
expecting success:
git reset --hard &&
git apply patch-1.txt &&
test -x file
HEAD is now at e950771 initial
ok 5 - mode update (no index)
expecting success:
git reset --hard &&
git apply --index patch-1.txt &&
test -x file &&
git diff --exit-code
HEAD is now at e950771 initial
ok 6 - mode update (with index)
expecting success:
git reset --hard &&
git apply --cached patch-1.txt &&
git ls-files -s file | grep "^100755"
HEAD is now at e950771 initial
100755 2e0996000b7e9019eabcad29391bf0f5c7702f0b 0 file
ok 7 - mode update (index only)
expecting success:
git reset --hard &&
test_must_fail git apply patch-empty-mode.txt 2>err &&
test_i18ngrep "invalid mode" err
HEAD is now at e950771 initial
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: invalid mode on line 5:
ok 8 - empty mode is rejected
expecting success:
git reset --hard &&
test_must_fail git apply patch-bogus-mode.txt 2>err &&
test_i18ngrep "invalid mode" err
HEAD is now at e950771 initial
error: invalid mode on line 5: garbage
ok 9 - bogus mode is rejected
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4130-apply-criss-cross-rename.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4130-apply-criss-cross-rename/.git/
expecting success:
# Ensure that file sizes are different, because on Windows
# lstat() does not discover inode numbers, and we need
# other properties to discover swapped files
# (mtime is not always different, either).
create_file file1 "some content" &&
create_file file2 "some other content" &&
create_file file3 "again something else" &&
git add file1 file2 file3 &&
git commit -m 1
[master (root-commit) 45ea8bb] 1
Author: A U Thor <author@example.com>
3 files changed, 303 insertions(+)
create mode 100644 file1
create mode 100644 file2
create mode 100644 file3
ok 1 - setup
expecting success:
mv file1 tmp &&
mv file2 file1 &&
mv tmp file2 &&
cp file1 file1-swapped &&
cp file2 file2-swapped
ok 2 - criss-cross rename
expecting success:
git diff -M -B > diff &&
git reset --hard
HEAD is now at 45ea8bb 1
ok 3 - diff -M -B
expecting success:
git apply diff &&
test_cmp file1 file1-swapped &&
test_cmp file2 file2-swapped
ok 4 - apply
expecting success:
git reset --hard &&
mv file1 tmp &&
mv file2 file1 &&
mv file3 file2 &&
mv tmp file3 &&
cp file1 file1-swapped &&
cp file2 file2-swapped &&
cp file3 file3-swapped
HEAD is now at 45ea8bb 1
ok 5 - criss-cross rename
expecting success:
git diff -M -B > diff &&
git reset --hard
HEAD is now at 45ea8bb 1
ok 6 - diff -M -B
expecting success:
git apply diff &&
test_cmp file1 file1-swapped &&
test_cmp file2 file2-swapped &&
test_cmp file3 file3-swapped
ok 7 - apply
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4131-apply-fake-ancestor.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4131-apply-fake-ancestor/.git/
expecting success:
test_commit 1 &&
test_commit 2 &&
mkdir sub &&
test_commit 3 sub/3.t &&
test_commit 4
[master (root-commit) d0dcf97] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1.t
[master 82335b2] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2.t
[master 0015c90] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 sub/3.t
[master 8d74a78] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 4.t
ok 1 - setup
expecting success:
git checkout 2 &&
echo "A" > 1.t &&
git diff > 1.patch &&
git reset --hard &&
git checkout 1 &&
git apply --build-fake-ancestor 1.ancestor 1.patch
Note: switching to '2'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 82335b2 2
HEAD is now at 82335b2 2
Previous HEAD position was 82335b2 2
HEAD is now at d0dcf97 1
ok 2 - apply --build-fake-ancestor
expecting success:
git checkout 3 &&
echo "C" > sub/3.t &&
git diff > 3.patch &&
git reset --hard &&
git checkout 4 &&
(
cd sub &&
git apply --build-fake-ancestor 3.ancestor ../3.patch &&
test -f 3.ancestor
) &&
git apply --build-fake-ancestor 3.ancestor 3.patch &&
test_cmp sub/3.ancestor 3.ancestor
Previous HEAD position was d0dcf97 1
HEAD is now at 0015c90 3
HEAD is now at 0015c90 3
Previous HEAD position was 0015c90 3
HEAD is now at 8d74a78 4
ok 3 - apply --build-fake-ancestor in a subdirectory
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4134-apply-submodule.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4134-apply-submodule/.git/
expecting success:
cat > create-sm.patch <<EOF &&
diff --git a/dir/sm b/dir/sm
new file mode 160000
index 0000000..0123456
--- /dev/null
+++ b/dir/sm
@@ -0,0 +1 @@
+Subproject commit 0123456789abcdef0123456789abcdef01234567
EOF
cat > remove-sm.patch <<EOF
diff --git a/dir/sm b/dir/sm
deleted file mode 160000
index 0123456..0000000
--- a/dir/sm
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 0123456789abcdef0123456789abcdef01234567
EOF
ok 1 - setup
expecting success:
git apply --index create-sm.patch &&
test -d dir/sm &&
git apply --index remove-sm.patch &&
test \! -d dir
ok 2 - removing a submodule also removes all leading subdirectories
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4133-apply-filenames.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4133-apply-filenames/.git/
expecting success:
cat > bad1.patch <<EOF &&
diff --git a/f b/f
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/f-blah
@@ -0,0 +1 @@
+1
EOF
cat > bad2.patch <<EOF
diff --git a/f b/f
deleted file mode 100644
index d00491f..0000000
--- b/f-blah
+++ /dev/null
@@ -1 +0,0 @@
-1
EOF
ok 1 - setup
expecting success:
test_must_fail git apply bad1.patch 2>err &&
test_i18ngrep "inconsistent new filename" err &&
test_must_fail git apply bad2.patch 2>err &&
test_i18ngrep "inconsistent old filename" err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: git apply: bad git-diff - inconsistent new filename on line 2
error: git apply: bad git-diff - inconsistent old filename on line 2
ok 2 - apply diff with inconsistent filenames in headers
expecting success:
cat >missing_new_filename.diff <<-\EOF &&
diff --git a/f b/f
index 0000000..d00491f
--- a/f
@@ -0,0 +1 @@
+1
EOF
test_must_fail git apply missing_new_filename.diff 2>err &&
test_i18ngrep "lacks filename information" err
error: git diff header lacks filename information (line 4)
ok 3 - apply diff with new filename missing from headers
expecting success:
cat >missing_old_filename.diff <<-\EOF &&
diff --git a/f b/f
index d00491f..0000000
+++ b/f
@@ -1 +0,0 @@
-1
EOF
test_must_fail git apply missing_old_filename.diff 2>err &&
test_i18ngrep "lacks filename information" err
error: git diff header lacks filename information (line 4)
ok 4 - apply diff with old filename missing from headers
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4132-apply-removal.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4132-apply-removal/.git/
expecting success:
cat <<-EOF >c &&
diff -ruN a/file b/file
--- a/file TS0
+++ b/file TS1
@@ -0,0 +1 @@
+something
EOF
cat <<-EOF >d &&
diff -ruN a/file b/file
--- a/file TS0
+++ b/file TS1
@@ -1 +0,0 @@
-something
EOF
timeWest="1982-09-16 07:00:00.000000000 -0800" &&
timeGMT="1982-09-16 15:00:00.000000000 +0000" &&
timeEast="1982-09-17 00:00:00.000000000 +0900" &&
epocWest="1969-12-31 16:00:00.000000000 -0800" &&
epocGMT="1970-01-01 00:00:00.000000000 +0000" &&
epocEast="1970-01-01 09:00:00.000000000 +0900" &&
epocWest2="1969-12-31 16:00:00 -08:00" &&
sed -e "s/TS0/$epocWest/" -e "s/TS1/$timeWest/" <c >createWest.patch &&
sed -e "s/TS0/$epocEast/" -e "s/TS1/$timeEast/" <c >createEast.patch &&
sed -e "s/TS0/$epocGMT/" -e "s/TS1/$timeGMT/" <c >createGMT.patch &&
sed -e "s/TS0/$timeWest/" -e "s/TS1/$timeWest/" <c >addWest.patch &&
sed -e "s/TS0/$timeEast/" -e "s/TS1/$timeEast/" <c >addEast.patch &&
sed -e "s/TS0/$timeGMT/" -e "s/TS1/$timeGMT/" <c >addGMT.patch &&
sed -e "s/TS0/$timeWest/" -e "s/TS1/$timeWest/" <d >emptyWest.patch &&
sed -e "s/TS0/$timeEast/" -e "s/TS1/$timeEast/" <d >emptyEast.patch &&
sed -e "s/TS0/$timeGMT/" -e "s/TS1/$timeGMT/" <d >emptyGMT.patch &&
sed -e "s/TS0/$timeWest/" -e "s/TS1/$epocWest/" <d >removeWest.patch &&
sed -e "s/TS0/$timeEast/" -e "s/TS1/$epocEast/" <d >removeEast.patch &&
sed -e "s/TS0/$timeGMT/" -e "s/TS1/$epocGMT/" <d >removeGMT.patch &&
sed -e "s/TS0/$timeWest/" -e "s/TS1/$epocWest2/" <d >removeWest2.patch &&
echo something >something
ok 1 - setup
expecting success:
rm -f file .git/index &&
case "$patch" in
create*)
# must be able to create
git apply --index $patch &&
test_cmp file something &&
# must notice the file is already there
>file &&
git add file &&
test_must_fail git apply $patch
;;
add*)
# must be able to create or patch
git apply $patch &&
test_cmp file something &&
>file &&
git apply $patch &&
test_cmp file something
;;
empty*)
# must leave an empty file
cat something >file &&
git add file &&
git apply --index $patch &&
test -f file &&
test_must_be_empty file
;;
remove*)
# must remove the file
cat something >file &&
git add file &&
git apply --index $patch &&
! test -f file
;;
esac
ok 2 - test addEast.patch
expecting success:
rm -f file .git/index &&
case "$patch" in
create*)
# must be able to create
git apply --index $patch &&
test_cmp file something &&
# must notice the file is already there
>file &&
git add file &&
test_must_fail git apply $patch
;;
add*)
# must be able to create or patch
git apply $patch &&
test_cmp file something &&
>file &&
git apply $patch &&
test_cmp file something
;;
empty*)
# must leave an empty file
cat something >file &&
git add file &&
git apply --index $patch &&
test -f file &&
test_must_be_empty file
;;
remove*)
# must remove the file
cat something >file &&
git add file &&
git apply --index $patch &&
! test -f file
;;
esac
ok 3 - test addGMT.patch
expecting success:
rm -f file .git/index &&
case "$patch" in
create*)
# must be able to create
git apply --index $patch &&
test_cmp file something &&
# must notice the file is already there
>file &&
git add file &&
test_must_fail git apply $patch
;;
add*)
# must be able to create or patch
git apply $patch &&
test_cmp file something &&
>file &&
git apply $patch &&
test_cmp file something
;;
empty*)
# must leave an empty file
cat something >file &&
git add file &&
git apply --index $patch &&
test -f file &&
test_must_be_empty file
;;
remove*)
# must remove the file
cat something >file &&
git add file &&
git apply --index $patch &&
! test -f file
;;
esac
ok 4 - test addWest.patch
expecting success:
rm -f file .git/index &&
case "$patch" in
create*)
# must be able to create
git apply --index $patch &&
test_cmp file something &&
# must notice the file is already there
>file &&
git add file &&
test_must_fail git apply $patch
;;
add*)
# must be able to create or patch
git apply $patch &&
test_cmp file something &&
>file &&
git apply $patch &&
test_cmp file something
;;
empty*)
# must leave an empty file
cat something >file &&
git add file &&
git apply --index $patch &&
test -f file &&
test_must_be_empty file
;;
remove*)
# must remove the file
cat something >file &&
git add file &&
git apply --index $patch &&
! test -f file
;;
esac
error: file: already exists in working directory
ok 5 - test createEast.patch
expecting success:
rm -f file .git/index &&
case "$patch" in
create*)
# must be able to create
git apply --index $patch &&
test_cmp file something &&
# must notice the file is already there
>file &&
git add file &&
test_must_fail git apply $patch
;;
add*)
# must be able to create or patch
git apply $patch &&
test_cmp file something &&
>file &&
git apply $patch &&
test_cmp file something
;;
empty*)
# must leave an empty file
cat something >file &&
git add file &&
git apply --index $patch &&
test -f file &&
test_must_be_empty file
;;
remove*)
# must remove the file
cat something >file &&
git add file &&
git apply --index $patch &&
! test -f file
;;
esac
error: file: already exists in working directory
ok 6 - test createGMT.patch
expecting success:
rm -f file .git/index &&
case "$patch" in
create*)
# must be able to create
git apply --index $patch &&
test_cmp file something &&
# must notice the file is already there
>file &&
git add file &&
test_must_fail git apply $patch
;;
add*)
# must be able to create or patch
git apply $patch &&
test_cmp file something &&
>file &&
git apply $patch &&
test_cmp file something
;;
empty*)
# must leave an empty file
cat something >file &&
git add file &&
git apply --index $patch &&
test -f file &&
test_must_be_empty file
;;
remove*)
# must remove the file
cat something >file &&
git add file &&
git apply --index $patch &&
! test -f file
;;
esac
error: file: already exists in working directory
ok 7 - test createWest.patch
expecting success:
rm -f file .git/index &&
case "$patch" in
create*)
# must be able to create
git apply --index $patch &&
test_cmp file something &&
# must notice the file is already there
>file &&
git add file &&
test_must_fail git apply $patch
;;
add*)
# must be able to create or patch
git apply $patch &&
test_cmp file something &&
>file &&
git apply $patch &&
test_cmp file something
;;
empty*)
# must leave an empty file
cat something >file &&
git add file &&
git apply --index $patch &&
test -f file &&
test_must_be_empty file
;;
remove*)
# must remove the file
cat something >file &&
git add file &&
git apply --index $patch &&
! test -f file
;;
esac
ok 8 - test emptyEast.patch
expecting success:
rm -f file .git/index &&
case "$patch" in
create*)
# must be able to create
git apply --index $patch &&
test_cmp file something &&
# must notice the file is already there
>file &&
git add file &&
test_must_fail git apply $patch
;;
add*)
# must be able to create or patch
git apply $patch &&
test_cmp file something &&
>file &&
git apply $patch &&
test_cmp file something
;;
empty*)
# must leave an empty file
cat something >file &&
git add file &&
git apply --index $patch &&
test -f file &&
test_must_be_empty file
;;
remove*)
# must remove the file
cat something >file &&
git add file &&
git apply --index $patch &&
! test -f file
;;
esac
ok 9 - test emptyGMT.patch
expecting success:
rm -f file .git/index &&
case "$patch" in
create*)
# must be able to create
git apply --index $patch &&
test_cmp file something &&
# must notice the file is already there
>file &&
git add file &&
test_must_fail git apply $patch
;;
add*)
# must be able to create or patch
git apply $patch &&
test_cmp file something &&
>file &&
git apply $patch &&
test_cmp file something
;;
empty*)
# must leave an empty file
cat something >file &&
git add file &&
git apply --index $patch &&
test -f file &&
test_must_be_empty file
;;
remove*)
# must remove the file
cat something >file &&
git add file &&
git apply --index $patch &&
! test -f file
;;
esac
ok 10 - test emptyWest.patch
expecting success:
rm -f file .git/index &&
case "$patch" in
create*)
# must be able to create
git apply --index $patch &&
test_cmp file something &&
# must notice the file is already there
>file &&
git add file &&
test_must_fail git apply $patch
;;
add*)
# must be able to create or patch
git apply $patch &&
test_cmp file something &&
>file &&
git apply $patch &&
test_cmp file something
;;
empty*)
# must leave an empty file
cat something >file &&
git add file &&
git apply --index $patch &&
test -f file &&
test_must_be_empty file
;;
remove*)
# must remove the file
cat something >file &&
git add file &&
git apply --index $patch &&
! test -f file
;;
esac
ok 11 - test removeEast.patch
expecting success:
rm -f file .git/index &&
case "$patch" in
create*)
# must be able to create
git apply --index $patch &&
test_cmp file something &&
# must notice the file is already there
>file &&
git add file &&
test_must_fail git apply $patch
;;
add*)
# must be able to create or patch
git apply $patch &&
test_cmp file something &&
>file &&
git apply $patch &&
test_cmp file something
;;
empty*)
# must leave an empty file
cat something >file &&
git add file &&
git apply --index $patch &&
test -f file &&
test_must_be_empty file
;;
remove*)
# must remove the file
cat something >file &&
git add file &&
git apply --index $patch &&
! test -f file
;;
esac
ok 12 - test removeGMT.patch
expecting success:
rm -f file .git/index &&
case "$patch" in
create*)
# must be able to create
git apply --index $patch &&
test_cmp file something &&
# must notice the file is already there
>file &&
git add file &&
test_must_fail git apply $patch
;;
add*)
# must be able to create or patch
git apply $patch &&
test_cmp file something &&
>file &&
git apply $patch &&
test_cmp file something
;;
empty*)
# must leave an empty file
cat something >file &&
git add file &&
git apply --index $patch &&
test -f file &&
test_must_be_empty file
;;
remove*)
# must remove the file
cat something >file &&
git add file &&
git apply --index $patch &&
! test -f file
;;
esac
ok 13 - test removeWest.patch
expecting success:
rm -f file .git/index &&
case "$patch" in
create*)
# must be able to create
git apply --index $patch &&
test_cmp file something &&
# must notice the file is already there
>file &&
git add file &&
test_must_fail git apply $patch
;;
add*)
# must be able to create or patch
git apply $patch &&
test_cmp file something &&
>file &&
git apply $patch &&
test_cmp file something
;;
empty*)
# must leave an empty file
cat something >file &&
git add file &&
git apply --index $patch &&
test -f file &&
test_must_be_empty file
;;
remove*)
# must remove the file
cat something >file &&
git add file &&
git apply --index $patch &&
! test -f file
;;
esac
ok 14 - test removeWest2.patch
# passed all 14 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4136-apply-check.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4136-apply-check/.git/
expecting success:
test_commit 1
[master (root-commit) d0dcf97] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1.t
ok 1 - setup
expecting success:
test_must_fail git apply --check - <<-\EOF
I am not a patch
I look nothing like a patch
git apply must fail
EOF
error: unrecognized input
ok 2 - apply --check exits non-zero with unrecognized input
expecting success:
cat >input <<-\EOF &&
diff --get a/1 b/1
index 6696ea4..606eddd 100644
--- a/1
+++ b/1
@@ -1,1 +1,1 @@
1
EOF
test_must_fail git apply --stat input &&
test_must_fail git apply --check input
error: corrupt patch at line 7
error: corrupt patch at line 7
ok 3 - apply exits non-zero with no-op patch
expecting success:
echo 1 >1 &&
git apply --recount --check <<-\EOF
diff --get a/1 b/1
index 6696ea4..606eddd 100644
--- a/1
+++ b/1
@@ -1,1 +1,1 @@
1
EOF
ok 4 - `apply --recount` allows no-op patch
expecting success:
test_must_fail git apply --check - <<-\EOF
diff --git a/1 b/2
new file mode 100644
copy from 1
copy to 2
EOF
error: inconsistent header lines 2 and 3
ok 5 - invalid combination: create and copy
expecting success:
test_must_fail git apply --check - <<-\EOF
diff --git a/1 b/2
new file mode 100644
rename from 1
rename to 2
EOF
error: inconsistent header lines 2 and 3
ok 6 - invalid combination: create and rename
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4138-apply-ws-expansion.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4138-apply-ws-expansion/.git/
expecting success:
#
## create test-N, patchN.patch, expect-N files
#
# test 1
printf "\t%s\n" 1 2 3 4 5 6 >before &&
printf "\t%s\n" 1 2 3 >after &&
printf "%64s\n" a b c >>after &&
printf "\t%s\n" 4 5 6 >>after &&
git diff --no-index before after |
sed -e "s/before/test-1/" -e "s/after/test-1/" >patch1.patch &&
printf "%64s\n" 1 2 3 4 5 6 >test-1 &&
printf "%64s\n" 1 2 3 a b c 4 5 6 >expect-1 &&
# test 2
printf "\t%s\n" a b c d e f >before &&
printf "\t%s\n" a b c >after &&
n=10 &&
x=1 &&
while test $x -lt $n
do
printf "%63s%d\n" "" $x >>after
x=$(( $x + 1 ))
done &&
printf "\t%s\n" d e f >>after &&
git diff --no-index before after |
sed -e "s/before/test-2/" -e "s/after/test-2/" >patch2.patch &&
printf "%64s\n" a b c d e f >test-2 &&
printf "%64s\n" a b c >expect-2 &&
x=1 &&
while test $x -lt $n
do
printf "%63s%d\n" "" $x >>expect-2
x=$(( $x + 1 ))
done &&
printf "%64s\n" d e f >>expect-2 &&
# test 3
printf "\t%s\n" a b c d e f >before &&
printf "\t%s\n" a b c >after &&
n=100 &&
x=0 &&
while test $x -lt $n
do
printf "%63s%02d\n" "" $x >>after
x=$(( $x + 1 ))
done &&
printf "\t%s\n" d e f >>after &&
git diff --no-index before after |
sed -e "s/before/test-3/" -e "s/after/test-3/" >patch3.patch &&
printf "%64s\n" a b c d e f >test-3 &&
printf "%64s\n" a b c >expect-3 &&
x=0 &&
while test $x -lt $n
do
printf "%63s%02d\n" "" $x >>expect-3
x=$(( $x + 1 ))
done &&
printf "%64s\n" d e f >>expect-3 &&
# test 4
>before &&
x=0 &&
while test $x -lt 50
do
printf "\t%02d\n" $x >>before
x=$(( $x + 1 ))
done &&
cat before >after &&
printf "%64s\n" a b c >>after &&
while test $x -lt 100
do
printf "\t%02d\n" $x >>before
printf "\t%02d\n" $x >>after
x=$(( $x + 1 ))
done &&
git diff --no-index before after |
sed -e "s/before/test-4/" -e "s/after/test-4/" >patch4.patch &&
>test-4 &&
x=0 &&
while test $x -lt 50
do
printf "%63s%02d\n" "" $x >>test-4
x=$(( $x + 1 ))
done &&
cat test-4 >expect-4 &&
printf "%64s\n" a b c >>expect-4 &&
while test $x -lt 100
do
printf "%63s%02d\n" "" $x >>test-4
printf "%63s%02d\n" "" $x >>expect-4
x=$(( $x + 1 ))
done &&
git config core.whitespace tab-in-indent,tabwidth=63 &&
git config apply.whitespace fix
ok 1 - setup
expecting success:
git apply patch$t.patch &&
test_cmp expect-$t test-$t
patch1.patch:6: tab in indent.
1
patch1.patch:7: tab in indent.
2
patch1.patch:8: tab in indent.
3
patch1.patch:12: tab in indent.
4
patch1.patch:13: tab in indent.
5
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.
ok 2 - apply with ws expansion (t=$t)
expecting success:
git apply patch$t.patch &&
test_cmp expect-$t test-$t
patch2.patch:6: tab in indent.
a
patch2.patch:7: tab in indent.
b
patch2.patch:8: tab in indent.
c
patch2.patch:18: tab in indent.
d
patch2.patch:19: tab in indent.
e
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.
ok 3 - apply with ws expansion (t=$t)
expecting success:
git apply patch$t.patch &&
test_cmp expect-$t test-$t
patch3.patch:6: tab in indent.
a
patch3.patch:7: tab in indent.
b
patch3.patch:8: tab in indent.
c
patch3.patch:109: tab in indent.
d
patch3.patch:110: tab in indent.
e
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.
ok 4 - apply with ws expansion (t=$t)
expecting success:
git apply patch$t.patch &&
test_cmp expect-$t test-$t
patch4.patch:6: tab in indent.
47
patch4.patch:7: tab in indent.
48
patch4.patch:8: tab in indent.
49
patch4.patch:12: tab in indent.
50
patch4.patch:13: tab in indent.
51
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.
ok 5 - apply with ws expansion (t=$t)
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4139-apply-escape.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4139-apply-escape/.git/
expecting success:
mkdir inside &&
mv .git inside/ &&
cd inside
ok 1 - bump git repo one level down
expecting success:
mkpatch_add ../foo >patch &&
test_must_fail git apply patch &&
test_path_is_missing ../foo
error: invalid path '../foo'
ok 2 - cannot create file containing ..
expecting success:
mkpatch_add ../foo >patch &&
git apply --unsafe-paths patch &&
test_path_is_file ../foo
ok 3 - can create file containing .. with --unsafe-paths
expecting success:
mkpatch_add ../foo >patch &&
test_must_fail git apply --index patch &&
test_path_is_missing ../foo
error: invalid path '../foo'
ok 4 - cannot create file containing .. (index)
expecting success:
mkpatch_add ../foo >patch &&
test_must_fail git apply --index --unsafe-paths patch &&
test_path_is_missing ../foo
error: invalid path '../foo'
ok 5 - cannot create file containing .. with --unsafe-paths (index)
expecting success:
mkpatch_del ../foo >patch &&
test_must_fail git apply patch &&
test_path_is_file ../foo
error: invalid path '../foo'
ok 6 - cannot delete file containing ..
expecting success:
mkpatch_del ../foo >patch &&
git apply --unsafe-paths patch &&
test_path_is_missing ../foo
ok 7 - can delete file containing .. with --unsafe-paths
expecting success:
mkpatch_del ../foo >patch &&
test_must_fail git apply --index patch &&
test_path_is_file ../foo
error: ../foo: does not exist in index
ok 8 - cannot delete file containing .. (index)
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:
{
mkpatch_symlink tmp .. &&
mkpatch_add tmp/foo ../foo
} >patch &&
test_must_fail git apply patch &&
test_path_is_missing tmp &&
test_path_is_missing ../foo
error: affected file 'tmp/foo' is beyond a symbolic link
ok 9 - symlink escape via ..
expecting success:
{
mkpatch_symlink tmp .. &&
mkpatch_add tmp/foo ../foo
} >patch &&
test_must_fail git apply --index patch &&
test_path_is_missing tmp &&
test_path_is_missing ../foo
error: affected file 'tmp/foo' is beyond a symbolic link
ok 10 - symlink escape via .. (index)
expecting success:
{
mkpatch_symlink tmp "$(pwd)" &&
mkpatch_add tmp/foo ../foo
} >patch &&
test_must_fail git apply patch &&
test_path_is_missing tmp &&
test_path_is_missing ../foo
error: affected file 'tmp/foo' is beyond a symbolic link
ok 11 - symlink escape via absolute path
expecting success:
{
mkpatch_symlink tmp "$(pwd)" &&
mkpatch_add tmp/foo ../foo
} >patch &&
test_must_fail git apply --index patch &&
test_path_is_missing tmp &&
test_path_is_missing ../foo
error: affected file 'tmp/foo' is beyond a symbolic link
ok 12 - symlink escape via absolute path (index)
# passed all 12 test(s)
1..12
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4135-apply-weird-filenames.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4135-apply-weird-filenames/.git/
expecting success:
vector=$TEST_DIRECTORY/t4135 &&
test_tick &&
git commit --allow-empty -m preimage &&
git tag preimage &&
reset_preimage() {
git checkout -f preimage^0 &&
git read-tree -u --reset HEAD &&
git update-index --refresh
}
[master (root-commit) 9cf544c] preimage
Author: A U Thor <author@example.com>
ok 1 - setup
expecting success:
echo postimage >expected &&
reset_preimage &&
rm -f 'postimage.txt' &&
git apply -v "$vector"/'git-plain.diff' &&
test_cmp expected 'postimage.txt'
Note: switching to 'preimage^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 9cf544c preimage
Checking patch postimage.txt...
Applied patch postimage.txt cleanly.
ok 2 - plain, git-style file creation patch
expecting success:
echo postimage >expected &&
reset_preimage &&
echo preimage >'postimage.txt' &&
git apply -v "$vector"/'diff-plain.diff' &&
test_cmp expected 'postimage.txt'
HEAD is now at 9cf544c preimage
Checking patch postimage.txt...
Applied patch postimage.txt cleanly.
ok 3 - plain, traditional patch
expecting success:
echo postimage >expected &&
reset_preimage &&
rm -f 'postimage.txt' &&
git apply -v "$vector"/'add-plain.diff' &&
test_cmp expected 'postimage.txt'
HEAD is now at 9cf544c preimage
Checking patch postimage.txt...
Applied patch postimage.txt cleanly.
ok 4 - plain, traditional file creation patch
expecting success:
echo postimage >expected &&
reset_preimage &&
rm -f 'post image.txt' &&
git apply -v "$vector"/'git-with spaces.diff' &&
test_cmp expected 'post image.txt'
HEAD is now at 9cf544c preimage
Checking patch post image.txt...
Applied patch post image.txt cleanly.
ok 5 - with spaces, git-style file creation patch
expecting success:
echo postimage >expected &&
reset_preimage &&
echo preimage >'post image.txt' &&
git apply -v "$vector"/'diff-with spaces.diff' &&
test_cmp expected 'post image.txt'
HEAD is now at 9cf544c preimage
Checking patch post image.txt...
Applied patch post image.txt cleanly.
ok 6 - with spaces, traditional patch
expecting success:
echo postimage >expected &&
reset_preimage &&
rm -f 'post image.txt' &&
git apply -v "$vector"/'add-with spaces.diff' &&
test_cmp expected 'post image.txt'
HEAD is now at 9cf544c preimage
Checking patch post image.txt...
Applied patch post image.txt cleanly.
ok 7 - with spaces, traditional file creation patch
checking prerequisite: FUNNYNAMES
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq !MINGW &&
touch -- \
"FUNNYNAMES tab embedded" \
"FUNNYNAMES \"quote embedded\"" \
"FUNNYNAMES newline
embedded" 2>/dev/null &&
rm -- \
"FUNNYNAMES tab embedded" \
"FUNNYNAMES \"quote embedded\"" \
"FUNNYNAMES newline
embedded" 2>/dev/null
)
prerequisite FUNNYNAMES ok
expecting success:
echo postimage >expected &&
reset_preimage &&
rm -f 'post image.txt' &&
git apply -v "$vector"/'git-with tab.diff' &&
test_cmp expected 'post image.txt'
HEAD is now at 9cf544c preimage
Checking patch "post\timage.txt"...
Applied patch "post\timage.txt" cleanly.
ok 8 - with tab, git-style file creation patch
expecting success:
echo postimage >expected &&
reset_preimage &&
echo preimage >'post image.txt' &&
git apply -v "$vector"/'diff-with tab.diff' &&
test_cmp expected 'post image.txt'
HEAD is now at 9cf544c preimage
Checking patch "post\timage.txt"...
Applied patch "post\timage.txt" cleanly.
ok 9 - with tab, traditional patch
expecting success:
echo postimage >expected &&
reset_preimage &&
rm -f 'post image.txt' &&
git apply -v "$vector"/'add-with tab.diff' &&
test_cmp expected 'post image.txt'
HEAD is now at 9cf544c preimage
Checking patch "post\timage.txt"...
Applied patch "post\timage.txt" cleanly.
ok 10 - with tab, traditional file creation patch
expecting success:
echo postimage >expected &&
reset_preimage &&
rm -f 'post\image.txt' &&
git apply -v "$vector"/'git-with backslash.diff' &&
test_cmp expected 'post\image.txt'
HEAD is now at 9cf544c preimage
Checking patch "post\\image.txt"...
Applied patch "post\\image.txt" cleanly.
ok 11 - with backslash, git-style file creation patch
expecting success:
echo postimage >expected &&
reset_preimage &&
echo preimage >'post\image.txt' &&
git apply -v "$vector"/'diff-with backslash.diff' &&
test_cmp expected 'post\image.txt'
HEAD is now at 9cf544c preimage
Checking patch "post\\image.txt"...
Applied patch "post\\image.txt" cleanly.
ok 12 - with backslash, traditional patch
expecting success:
echo postimage >expected &&
reset_preimage &&
rm -f 'post\image.txt' &&
git apply -v "$vector"/'add-with backslash.diff' &&
test_cmp expected 'post\image.txt'
HEAD is now at 9cf544c preimage
Checking patch "post\\image.txt"...
Applied patch "post\\image.txt" cleanly.
ok 13 - with backslash, traditional file creation patch
expecting success:
echo postimage >expected &&
reset_preimage &&
rm -f '"postimage".txt' &&
git apply -v "$vector"/'git-with quote.diff' &&
test_cmp expected '"postimage".txt'
HEAD is now at 9cf544c preimage
Checking patch "\"postimage\".txt"...
Applied patch "\"postimage\".txt" cleanly.
ok 14 - with quote, git-style file creation patch
checking known breakage:
echo postimage >expected &&
reset_preimage &&
echo preimage >'"postimage".txt' &&
git apply -v "$vector"/'diff-with quote.diff' &&
test_cmp expected '"postimage".txt'
HEAD is now at 9cf544c preimage
Checking patch postimage...
error: postimage: No such file or directory
not ok 15 - with quote, traditional patch # TODO known breakage
expecting success:
echo postimage >expected &&
reset_preimage &&
rm -f '"postimage".txt' &&
git apply -v "$vector"/'add-with quote.diff' &&
test_cmp expected '"postimage".txt'
HEAD is now at 9cf544c preimage
Checking patch "\"postimage\".txt"...
Applied patch "\"postimage\".txt" cleanly.
ok 16 - with quote, traditional file creation patch
expecting success:
echo postimage >expected &&
reset_preimage &&
rm -f postimage.txt &&
git apply -v "$vector/damaged.diff" &&
test_cmp expected postimage.txt
HEAD is now at 9cf544c preimage
Checking patch postimage.txt...
Applied patch postimage.txt cleanly.
ok 17 - whitespace-damaged traditional patch
expecting success:
echo postimage >expected &&
reset_preimage &&
rm -f "post image.txt" &&
git apply "$vector/funny-tz.diff" &&
test_cmp expected "post image.txt"
HEAD is now at 9cf544c preimage
ok 18 - traditional patch with colon in timezone
expecting success:
echo postimage >expected &&
reset_preimage &&
rm -f "post image.txt" &&
git apply "$vector/damaged-tz.diff" &&
test_cmp expected "post image.txt"
HEAD is now at 9cf544c preimage
ok 19 - traditional, whitespace-damaged, colon in timezone
expecting success:
>Makefile &&
git apply -p2 diff-from-svn &&
test_path_is_missing Makefile
ok 20 - apply handles a diff generated by Subversion
# still have 1 known breakage(s)
# passed all remaining 19 test(s)
1..20
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4124-apply-ws-rule.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4124-apply-ws-rule/.git/
expecting success:
>file &&
git add file &&
prepare_test_file >file &&
git diff-files -p >patch &&
>target &&
git add target
ok 1 - setup
expecting success:
apply_patch --whitespace=nowarn &&
test_cmp file target
ok 2 - whitespace=nowarn, default rule
expecting success:
apply_patch --whitespace=warn &&
test_cmp file target
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
<stdin>:14: space before tab in indent.
Seven SP, a HT and a SP (@%).
warning: squelched 5 whitespace errors
warning: 10 lines add whitespace errors.
ok 3 - whitespace=warn, default rule
expecting success:
test_must_fail apply_patch --whitespace=error-all &&
test_must_be_empty target
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
<stdin>:14: space before tab in indent.
Seven SP, a HT and a SP (@%).
<stdin>:15: space before tab in indent.
Eight SP, a HT and a SP (@#%).
<stdin>:17: space before tab in indent.
Fifteen SP and a HT (@#%).
<stdin>:19: space before tab in indent.
Sixteen SP and a HT (@#%=).
<stdin>:21: trailing whitespace.
A line with a (!) trailing SP
<stdin>:22: trailing whitespace.
A line with a (!) trailing HT
error: 10 lines add whitespace errors.
ok 4 - whitespace=error-all, default rule
expecting success:
git config core.whitespace -trailing,-space-before,-indent &&
apply_patch --whitespace=error-all &&
test_cmp file target
ok 5 - whitespace=error-all, no rule
expecting success:
git config --unset core.whitespace &&
echo "target -whitespace" >.gitattributes &&
apply_patch --whitespace=error-all &&
test_cmp file target
ok 6 - whitespace=error-all, no rule (attribute)
expecting success:
git config core.whitespace -trailing,-space,-indent,tab &&
rm -f .gitattributes &&
test_fix % &&
sed -e "s/_/ /g" -e "s/>/ /" <<-\EOF >expect &&
An_SP in an ordinary line>and a HT.
________A HT (%).
________A SP and a HT (@%).
_________A SP, a HT and a SP (@%).
_______Seven SP.
________Eight SP (#).
________Seven SP and a HT (@%).
________________Eight SP and a HT (@#%).
_________Seven SP, a HT and a SP (@%).
_________________Eight SP, a HT and a SP (@#%).
_______________Fifteen SP (#).
________________Fifteen SP and a HT (@#%).
________________Sixteen SP (#=).
________________________Sixteen SP and a HT (@#%=).
_____a__Five SP, a non WS, two SP.
A line with a (!) trailing SP_
A line with a (!) trailing HT>
EOF
test_cmp expect target
<stdin>:7: tab in indent.
A HT (%).
<stdin>:8: tab in indent.
A SP and a HT (@%).
<stdin>:9: tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: tab in indent.
Seven SP and a HT (@%).
<stdin>:13: tab in indent.
Eight SP and a HT (@#%).
warning: squelched 4 whitespace errors
warning: 9 lines applied after fixing whitespace errors.
ok 7 - spaces inserted by tab-in-indent
expecting success:
git config core.whitespace "$rule" &&
test_fix "$tt$ts$ti$th"
ok 8 - rule=-trailing,-space,-indent,-tab
expecting success:
git config core.whitespace "$rule,tabwidth=16" &&
test_fix "$tt$ts$ti16$th"
ok 9 - rule=-trailing,-space,-indent,-tab,tabwidth=16
expecting success:
git config --unset core.whitespace &&
echo "target whitespace=$rule" >.gitattributes &&
test_fix "$tt$ts$ti$th"
ok 10 - rule=-trailing,-space,-indent,-tab (attributes)
expecting success:
echo "target whitespace=$rule,tabwidth=16" >.gitattributes &&
test_fix "$tt$ts$ti16$th"
ok 11 - rule=-trailing,-space,-indent,-tab,tabwidth=16 (attributes)
expecting success:
git config core.whitespace "$rule" &&
test_fix "$tt$ts$ti$th"
<stdin>:7: tab in indent.
A HT (%).
<stdin>:8: tab in indent.
A SP and a HT (@%).
<stdin>:9: tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: tab in indent.
Seven SP and a HT (@%).
<stdin>:13: tab in indent.
Eight SP and a HT (@#%).
warning: squelched 4 whitespace errors
warning: 9 lines applied after fixing whitespace errors.
ok 12 - rule=-trailing,-space,-indent,tab
expecting success:
git config core.whitespace "$rule,tabwidth=16" &&
test_fix "$tt$ts$ti16$th"
<stdin>:7: tab in indent.
A HT (%).
<stdin>:8: tab in indent.
A SP and a HT (@%).
<stdin>:9: tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: tab in indent.
Seven SP and a HT (@%).
<stdin>:13: tab in indent.
Eight SP and a HT (@#%).
warning: squelched 4 whitespace errors
warning: 9 lines applied after fixing whitespace errors.
ok 13 - rule=-trailing,-space,-indent,tab,tabwidth=16
expecting success:
git config --unset core.whitespace &&
echo "target whitespace=$rule" >.gitattributes &&
test_fix "$tt$ts$ti$th"
<stdin>:7: tab in indent.
A HT (%).
<stdin>:8: tab in indent.
A SP and a HT (@%).
<stdin>:9: tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: tab in indent.
Seven SP and a HT (@%).
<stdin>:13: tab in indent.
Eight SP and a HT (@#%).
warning: squelched 4 whitespace errors
warning: 9 lines applied after fixing whitespace errors.
ok 14 - rule=-trailing,-space,-indent,tab (attributes)
expecting success:
echo "target whitespace=$rule,tabwidth=16" >.gitattributes &&
test_fix "$tt$ts$ti16$th"
<stdin>:7: tab in indent.
A HT (%).
<stdin>:8: tab in indent.
A SP and a HT (@%).
<stdin>:9: tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: tab in indent.
Seven SP and a HT (@%).
<stdin>:13: tab in indent.
Eight SP and a HT (@#%).
warning: squelched 4 whitespace errors
warning: 9 lines applied after fixing whitespace errors.
ok 15 - rule=-trailing,-space,-indent,tab,tabwidth=16 (attributes)
expecting success:
git config core.whitespace "$rule" &&
test_fix "$tt$ts$ti$th"
<stdin>:11: indent with spaces.
Eight SP (#).
<stdin>:16: indent with spaces.
Fifteen SP (#).
<stdin>:18: indent with spaces.
Sixteen SP (#=).
warning: 7 lines applied after fixing whitespace errors.
ok 16 - rule=-trailing,-space,indent,-tab
expecting success:
git config core.whitespace "$rule,tabwidth=16" &&
test_fix "$tt$ts$ti16$th"
<stdin>:18: indent with spaces.
Sixteen SP (#=).
warning: 2 lines applied after fixing whitespace errors.
ok 17 - rule=-trailing,-space,indent,-tab,tabwidth=16
expecting success:
git config --unset core.whitespace &&
echo "target whitespace=$rule" >.gitattributes &&
test_fix "$tt$ts$ti$th"
<stdin>:11: indent with spaces.
Eight SP (#).
<stdin>:16: indent with spaces.
Fifteen SP (#).
<stdin>:18: indent with spaces.
Sixteen SP (#=).
warning: 7 lines applied after fixing whitespace errors.
ok 18 - rule=-trailing,-space,indent,-tab (attributes)
expecting success:
echo "target whitespace=$rule,tabwidth=16" >.gitattributes &&
test_fix "$tt$ts$ti16$th"
<stdin>:18: indent with spaces.
Sixteen SP (#=).
warning: 2 lines applied after fixing whitespace errors.
ok 19 - rule=-trailing,-space,indent,-tab,tabwidth=16 (attributes)
expecting success:
git config core.whitespace "$rule" &&
test_fix "$tt$ts$ti$th"
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
<stdin>:14: space before tab in indent.
Seven SP, a HT and a SP (@%).
warning: squelched 3 whitespace errors
warning: 8 lines applied after fixing whitespace errors.
ok 20 - rule=-trailing,space,-indent,-tab
expecting success:
git config core.whitespace "$rule,tabwidth=16" &&
test_fix "$tt$ts$ti16$th"
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
<stdin>:14: space before tab in indent.
Seven SP, a HT and a SP (@%).
warning: squelched 3 whitespace errors
warning: 8 lines applied after fixing whitespace errors.
ok 21 - rule=-trailing,space,-indent,-tab,tabwidth=16
expecting success:
git config --unset core.whitespace &&
echo "target whitespace=$rule" >.gitattributes &&
test_fix "$tt$ts$ti$th"
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
<stdin>:14: space before tab in indent.
Seven SP, a HT and a SP (@%).
warning: squelched 3 whitespace errors
warning: 8 lines applied after fixing whitespace errors.
ok 22 - rule=-trailing,space,-indent,-tab (attributes)
expecting success:
echo "target whitespace=$rule,tabwidth=16" >.gitattributes &&
test_fix "$tt$ts$ti16$th"
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
<stdin>:14: space before tab in indent.
Seven SP, a HT and a SP (@%).
warning: squelched 3 whitespace errors
warning: 8 lines applied after fixing whitespace errors.
ok 23 - rule=-trailing,space,-indent,-tab,tabwidth=16 (attributes)
expecting success:
git config core.whitespace "$rule" &&
test_fix "$tt$ts$ti$th"
<stdin>:7: tab in indent.
A HT (%).
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
warning: squelched 4 whitespace errors
warning: 9 lines applied after fixing whitespace errors.
ok 24 - rule=-trailing,space,-indent,tab
expecting success:
git config core.whitespace "$rule,tabwidth=16" &&
test_fix "$tt$ts$ti16$th"
<stdin>:7: tab in indent.
A HT (%).
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
warning: squelched 4 whitespace errors
warning: 9 lines applied after fixing whitespace errors.
ok 25 - rule=-trailing,space,-indent,tab,tabwidth=16
expecting success:
git config --unset core.whitespace &&
echo "target whitespace=$rule" >.gitattributes &&
test_fix "$tt$ts$ti$th"
<stdin>:7: tab in indent.
A HT (%).
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
warning: squelched 4 whitespace errors
warning: 9 lines applied after fixing whitespace errors.
ok 26 - rule=-trailing,space,-indent,tab (attributes)
expecting success:
echo "target whitespace=$rule,tabwidth=16" >.gitattributes &&
test_fix "$tt$ts$ti16$th"
<stdin>:7: tab in indent.
A HT (%).
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
warning: squelched 4 whitespace errors
warning: 9 lines applied after fixing whitespace errors.
ok 27 - rule=-trailing,space,-indent,tab,tabwidth=16 (attributes)
expecting success:
git config core.whitespace "$rule" &&
test_fix "$tt$ts$ti$th"
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:11: indent with spaces.
Eight SP (#).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
warning: squelched 6 whitespace errors
warning: 11 lines applied after fixing whitespace errors.
ok 28 - rule=-trailing,space,indent,-tab
expecting success:
git config core.whitespace "$rule,tabwidth=16" &&
test_fix "$tt$ts$ti16$th"
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
<stdin>:14: space before tab in indent.
Seven SP, a HT and a SP (@%).
warning: squelched 4 whitespace errors
warning: 9 lines applied after fixing whitespace errors.
ok 29 - rule=-trailing,space,indent,-tab,tabwidth=16
expecting success:
git config --unset core.whitespace &&
echo "target whitespace=$rule" >.gitattributes &&
test_fix "$tt$ts$ti$th"
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:11: indent with spaces.
Eight SP (#).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
warning: squelched 6 whitespace errors
warning: 11 lines applied after fixing whitespace errors.
ok 30 - rule=-trailing,space,indent,-tab (attributes)
expecting success:
echo "target whitespace=$rule,tabwidth=16" >.gitattributes &&
test_fix "$tt$ts$ti16$th"
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
<stdin>:14: space before tab in indent.
Seven SP, a HT and a SP (@%).
warning: squelched 4 whitespace errors
warning: 9 lines applied after fixing whitespace errors.
ok 31 - rule=-trailing,space,indent,-tab,tabwidth=16 (attributes)
expecting success:
git config core.whitespace "$rule" &&
test_fix "$tt$ts$ti$th"
<stdin>:21: trailing whitespace.
A line with a (!) trailing SP
<stdin>:22: trailing whitespace.
A line with a (!) trailing HT
warning: 2 lines applied after fixing whitespace errors.
ok 32 - rule=trailing,-space,-indent,-tab
expecting success:
git config core.whitespace "$rule,tabwidth=16" &&
test_fix "$tt$ts$ti16$th"
<stdin>:21: trailing whitespace.
A line with a (!) trailing SP
<stdin>:22: trailing whitespace.
A line with a (!) trailing HT
warning: 2 lines applied after fixing whitespace errors.
ok 33 - rule=trailing,-space,-indent,-tab,tabwidth=16
expecting success:
git config --unset core.whitespace &&
echo "target whitespace=$rule" >.gitattributes &&
test_fix "$tt$ts$ti$th"
<stdin>:21: trailing whitespace.
A line with a (!) trailing SP
<stdin>:22: trailing whitespace.
A line with a (!) trailing HT
warning: 2 lines applied after fixing whitespace errors.
ok 34 - rule=trailing,-space,-indent,-tab (attributes)
expecting success:
echo "target whitespace=$rule,tabwidth=16" >.gitattributes &&
test_fix "$tt$ts$ti16$th"
<stdin>:21: trailing whitespace.
A line with a (!) trailing SP
<stdin>:22: trailing whitespace.
A line with a (!) trailing HT
warning: 2 lines applied after fixing whitespace errors.
ok 35 - rule=trailing,-space,-indent,-tab,tabwidth=16 (attributes)
expecting success:
git config core.whitespace "$rule" &&
test_fix "$tt$ts$ti$th"
<stdin>:7: tab in indent.
A HT (%).
<stdin>:8: tab in indent.
A SP and a HT (@%).
<stdin>:9: tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: tab in indent.
Seven SP and a HT (@%).
<stdin>:13: tab in indent.
Eight SP and a HT (@#%).
warning: squelched 6 whitespace errors
warning: 11 lines applied after fixing whitespace errors.
ok 36 - rule=trailing,-space,-indent,tab
expecting success:
git config core.whitespace "$rule,tabwidth=16" &&
test_fix "$tt$ts$ti16$th"
<stdin>:7: tab in indent.
A HT (%).
<stdin>:8: tab in indent.
A SP and a HT (@%).
<stdin>:9: tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: tab in indent.
Seven SP and a HT (@%).
<stdin>:13: tab in indent.
Eight SP and a HT (@#%).
warning: squelched 6 whitespace errors
warning: 11 lines applied after fixing whitespace errors.
ok 37 - rule=trailing,-space,-indent,tab,tabwidth=16
expecting success:
git config --unset core.whitespace &&
echo "target whitespace=$rule" >.gitattributes &&
test_fix "$tt$ts$ti$th"
<stdin>:7: tab in indent.
A HT (%).
<stdin>:8: tab in indent.
A SP and a HT (@%).
<stdin>:9: tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: tab in indent.
Seven SP and a HT (@%).
<stdin>:13: tab in indent.
Eight SP and a HT (@#%).
warning: squelched 6 whitespace errors
warning: 11 lines applied after fixing whitespace errors.
ok 38 - rule=trailing,-space,-indent,tab (attributes)
expecting success:
echo "target whitespace=$rule,tabwidth=16" >.gitattributes &&
test_fix "$tt$ts$ti16$th"
<stdin>:7: tab in indent.
A HT (%).
<stdin>:8: tab in indent.
A SP and a HT (@%).
<stdin>:9: tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: tab in indent.
Seven SP and a HT (@%).
<stdin>:13: tab in indent.
Eight SP and a HT (@#%).
warning: squelched 6 whitespace errors
warning: 11 lines applied after fixing whitespace errors.
ok 39 - rule=trailing,-space,-indent,tab,tabwidth=16 (attributes)
expecting success:
git config core.whitespace "$rule" &&
test_fix "$tt$ts$ti$th"
<stdin>:11: indent with spaces.
Eight SP (#).
<stdin>:16: indent with spaces.
Fifteen SP (#).
<stdin>:18: indent with spaces.
Sixteen SP (#=).
<stdin>:21: trailing whitespace.
A line with a (!) trailing SP
<stdin>:22: trailing whitespace.
A line with a (!) trailing HT
warning: 9 lines applied after fixing whitespace errors.
ok 40 - rule=trailing,-space,indent,-tab
expecting success:
git config core.whitespace "$rule,tabwidth=16" &&
test_fix "$tt$ts$ti16$th"
<stdin>:18: indent with spaces.
Sixteen SP (#=).
<stdin>:21: trailing whitespace.
A line with a (!) trailing SP
<stdin>:22: trailing whitespace.
A line with a (!) trailing HT
warning: 4 lines applied after fixing whitespace errors.
ok 41 - rule=trailing,-space,indent,-tab,tabwidth=16
expecting success:
git config --unset core.whitespace &&
echo "target whitespace=$rule" >.gitattributes &&
test_fix "$tt$ts$ti$th"
<stdin>:11: indent with spaces.
Eight SP (#).
<stdin>:16: indent with spaces.
Fifteen SP (#).
<stdin>:18: indent with spaces.
Sixteen SP (#=).
<stdin>:21: trailing whitespace.
A line with a (!) trailing SP
<stdin>:22: trailing whitespace.
A line with a (!) trailing HT
warning: 9 lines applied after fixing whitespace errors.
ok 42 - rule=trailing,-space,indent,-tab (attributes)
expecting success:
echo "target whitespace=$rule,tabwidth=16" >.gitattributes &&
test_fix "$tt$ts$ti16$th"
<stdin>:18: indent with spaces.
Sixteen SP (#=).
<stdin>:21: trailing whitespace.
A line with a (!) trailing SP
<stdin>:22: trailing whitespace.
A line with a (!) trailing HT
warning: 4 lines applied after fixing whitespace errors.
ok 43 - rule=trailing,-space,indent,-tab,tabwidth=16 (attributes)
expecting success:
git config core.whitespace "$rule" &&
test_fix "$tt$ts$ti$th"
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
<stdin>:14: space before tab in indent.
Seven SP, a HT and a SP (@%).
warning: squelched 5 whitespace errors
warning: 10 lines applied after fixing whitespace errors.
ok 44 - rule=trailing,space,-indent,-tab
expecting success:
git config core.whitespace "$rule,tabwidth=16" &&
test_fix "$tt$ts$ti16$th"
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
<stdin>:14: space before tab in indent.
Seven SP, a HT and a SP (@%).
warning: squelched 5 whitespace errors
warning: 10 lines applied after fixing whitespace errors.
ok 45 - rule=trailing,space,-indent,-tab,tabwidth=16
expecting success:
git config --unset core.whitespace &&
echo "target whitespace=$rule" >.gitattributes &&
test_fix "$tt$ts$ti$th"
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
<stdin>:14: space before tab in indent.
Seven SP, a HT and a SP (@%).
warning: squelched 5 whitespace errors
warning: 10 lines applied after fixing whitespace errors.
ok 46 - rule=trailing,space,-indent,-tab (attributes)
expecting success:
echo "target whitespace=$rule,tabwidth=16" >.gitattributes &&
test_fix "$tt$ts$ti16$th"
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
<stdin>:14: space before tab in indent.
Seven SP, a HT and a SP (@%).
warning: squelched 5 whitespace errors
warning: 10 lines applied after fixing whitespace errors.
ok 47 - rule=trailing,space,-indent,-tab,tabwidth=16 (attributes)
expecting success:
git config core.whitespace "$rule" &&
test_fix "$tt$ts$ti$th"
<stdin>:7: tab in indent.
A HT (%).
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
warning: squelched 6 whitespace errors
warning: 11 lines applied after fixing whitespace errors.
ok 48 - rule=trailing,space,-indent,tab
expecting success:
git config core.whitespace "$rule,tabwidth=16" &&
test_fix "$tt$ts$ti16$th"
<stdin>:7: tab in indent.
A HT (%).
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
warning: squelched 6 whitespace errors
warning: 11 lines applied after fixing whitespace errors.
ok 49 - rule=trailing,space,-indent,tab,tabwidth=16
expecting success:
git config --unset core.whitespace &&
echo "target whitespace=$rule" >.gitattributes &&
test_fix "$tt$ts$ti$th"
<stdin>:7: tab in indent.
A HT (%).
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
warning: squelched 6 whitespace errors
warning: 11 lines applied after fixing whitespace errors.
ok 50 - rule=trailing,space,-indent,tab (attributes)
expecting success:
echo "target whitespace=$rule,tabwidth=16" >.gitattributes &&
test_fix "$tt$ts$ti16$th"
<stdin>:7: tab in indent.
A HT (%).
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
warning: squelched 6 whitespace errors
warning: 11 lines applied after fixing whitespace errors.
ok 51 - rule=trailing,space,-indent,tab,tabwidth=16 (attributes)
expecting success:
git config core.whitespace "$rule" &&
test_fix "$tt$ts$ti$th"
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:11: indent with spaces.
Eight SP (#).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
warning: squelched 8 whitespace errors
warning: 13 lines applied after fixing whitespace errors.
ok 52 - rule=trailing,space,indent,-tab
expecting success:
git config core.whitespace "$rule,tabwidth=16" &&
test_fix "$tt$ts$ti16$th"
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
<stdin>:14: space before tab in indent.
Seven SP, a HT and a SP (@%).
warning: squelched 6 whitespace errors
warning: 11 lines applied after fixing whitespace errors.
ok 53 - rule=trailing,space,indent,-tab,tabwidth=16
expecting success:
git config --unset core.whitespace &&
echo "target whitespace=$rule" >.gitattributes &&
test_fix "$tt$ts$ti$th"
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:11: indent with spaces.
Eight SP (#).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
warning: squelched 8 whitespace errors
warning: 13 lines applied after fixing whitespace errors.
ok 54 - rule=trailing,space,indent,-tab (attributes)
expecting success:
echo "target whitespace=$rule,tabwidth=16" >.gitattributes &&
test_fix "$tt$ts$ti16$th"
<stdin>:8: space before tab in indent.
A SP and a HT (@%).
<stdin>:9: space before tab in indent.
A SP, a HT and a SP (@%).
<stdin>:12: space before tab in indent.
Seven SP and a HT (@%).
<stdin>:13: space before tab in indent.
Eight SP and a HT (@#%).
<stdin>:14: space before tab in indent.
Seven SP, a HT and a SP (@%).
warning: squelched 6 whitespace errors
warning: 11 lines applied after fixing whitespace errors.
ok 55 - rule=trailing,space,indent,-tab,tabwidth=16 (attributes)
expecting success:
>target &&
create_patch >patch-file &&
git apply --whitespace=fix patch-file &&
grep "newline$" target &&
grep "^$" target
patch-file:8: trailing whitespace.
A line with trailing whitespace and no newline
warning: 1 line applied after fixing whitespace errors.
A line with trailing whitespace and no newline
ok 56 - trailing whitespace & no newline at the end of file
expecting success:
test_might_fail git config --unset core.whitespace &&
rm -f .gitattributes &&
{ echo a; echo b; echo c; } >one &&
git add one &&
{ echo a; echo b; echo c; } >expect &&
{ cat expect; echo; } >one &&
git diff -- one >patch &&
git checkout one &&
git apply --whitespace=fix patch &&
test_cmp expect one
Updated 1 path from the index
patch:9: new blank line at EOF.
+
warning: 1 line adds whitespace errors.
ok 57 - blank at EOF with --whitespace=fix (1)
expecting success:
{ echo a; echo b; echo c; } >one &&
git add one &&
{ echo a; echo c; } >expect &&
{ cat expect; echo; echo; } >one &&
git diff -- one >patch &&
git checkout one &&
git apply --whitespace=fix patch &&
test_cmp expect one
Updated 1 path from the index
patch:9: new blank line at EOF.
+
warning: 1 line adds whitespace errors.
ok 58 - blank at EOF with --whitespace=fix (2)
expecting success:
{ echo a; echo b; echo; } >one &&
git add one &&
{ echo a; echo c; echo; } >expect &&
{ cat expect; echo; echo; } >one &&
git diff -- one >patch &&
git checkout one &&
git apply --whitespace=fix patch &&
test_cmp expect one
Updated 1 path from the index
patch:9: new blank line at EOF.
+
warning: 1 line adds whitespace errors.
ok 59 - blank at EOF with --whitespace=fix (3)
expecting success:
{ echo a; echo b; echo; echo; echo; echo; echo; echo d; } >one &&
git add one &&
{ echo a; echo c; echo; echo; echo; echo; echo; echo; echo d; } >expect &&
cp expect one &&
git diff -- one >patch &&
git checkout one &&
git apply --whitespace=fix patch &&
test_cmp expect one
Updated 1 path from the index
ok 60 - blank at end of hunk, not at EOF with --whitespace=fix
expecting success:
{ echo a; echo b; echo c; } >one &&
git add one &&
echo >>one &&
cat one >expect &&
git diff -- one >patch &&
git checkout one &&
git apply --whitespace=warn patch 2>error &&
test_cmp expect one &&
grep "new blank line at EOF" error
Updated 1 path from the index
patch:9: new blank line at EOF.
ok 61 - blank at EOF with --whitespace=warn
expecting success:
{ echo a; echo b; echo c; } >one &&
git add one &&
cat one >expect &&
echo >>one &&
git diff -- one >patch &&
git checkout one &&
test_must_fail git apply --whitespace=error patch 2>error &&
test_cmp expect one &&
grep "new blank line at EOF" error
Updated 1 path from the index
patch:9: new blank line at EOF.
ok 62 - blank at EOF with --whitespace=error
expecting success:
{ echo a; echo b; echo c; } >one &&
git add one &&
echo " " >>one &&
cat one >expect &&
git diff -- one >patch &&
git checkout one &&
git apply --whitespace=warn patch 2>error &&
test_cmp expect one &&
grep "new blank line at EOF" error
Updated 1 path from the index
patch:9: new blank line at EOF.
ok 63 - blank but not empty at EOF
expecting success:
{ echo; echo; echo; echo; } >one &&
git add one &&
{ echo b; } >>one &&
git diff -- one >patch &&
git checkout one &&
{ echo a; echo; } >one &&
cp one expect &&
test_must_fail git apply --whitespace=fix patch &&
test_cmp expect one &&
test_must_fail git apply --ignore-space-change --whitespace=fix patch &&
test_cmp expect one
Updated 1 path from the index
error: patch failed: one:2
error: one: patch does not apply
error: patch failed: one:2
error: one: patch does not apply
ok 64 - applying beyond EOF requires one non-blank context line
expecting success:
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do
echo; echo; echo; echo;
done >one &&
git add one &&
echo a >>one &&
git diff -- one >patch &&
>one &&
test_must_fail git apply --whitespace=fix patch &&
test_must_fail git apply --ignore-space-change --whitespace=fix patch
error: patch failed: one:62
error: one: patch does not apply
error: patch failed: one:62
error: one: patch does not apply
ok 65 - tons of blanks at EOF should not apply
expecting success:
echo a >one &&
echo >>one &&
git add one &&
echo b >>one &&
cp one expect &&
git diff -- one >patch &&
echo a >one &&
cp one saved-one &&
test_must_fail git apply patch &&
git apply --whitespace=fix patch &&
test_cmp expect one &&
mv saved-one one &&
git apply --ignore-space-change --whitespace=fix patch &&
test_cmp expect one
error: patch failed: one:1
error: one: patch does not apply
ok 66 - missing blank line at end with --whitespace=fix
expecting success:
{ echo a; echo; echo b; echo c; } >one &&
cp one no-blank-lines &&
{ echo; echo; } >>one &&
git add one &&
echo d >>one &&
cp one expect &&
echo >>one &&
git diff -- one >patch &&
cp no-blank-lines one &&
test_must_fail git apply patch &&
git apply --whitespace=fix patch &&
test_cmp expect one &&
mv no-blank-lines one &&
test_must_fail git apply patch &&
git apply --ignore-space-change --whitespace=fix patch &&
test_cmp expect one
error: patch failed: one:4
error: one: patch does not apply
patch:10: new blank line at EOF.
+
warning: 1 line adds whitespace errors.
error: patch failed: one:4
error: one: patch does not apply
patch:10: new blank line at EOF.
+
warning: 1 line adds whitespace errors.
ok 67 - two missing blank lines at end with --whitespace=fix
expecting success:
{ echo a; echo; } >one &&
git add one &&
{ echo b; echo a; echo; } >one &&
cp one expect &&
git diff -- one >patch &&
echo a >one &&
test_must_fail git apply patch &&
git apply --whitespace=fix patch &&
test_cmp expect one
error: patch failed: one:1
error: one: patch does not apply
ok 68 - missing blank line at end, insert before end, --whitespace=fix
expecting success:
{ echo a; echo b; echo c; } >one &&
cp one no-blank-lines &&
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do
echo; echo; echo; echo;
done >>one &&
git add one &&
echo a >one &&
cp one expect &&
git diff -- one >patch &&
cp no-blank-lines one &&
test_must_fail git apply patch &&
git apply --whitespace=fix patch &&
test_cmp expect one &&
mv no-blank-lines one &&
git apply --ignore-space-change --whitespace=fix patch &&
test_cmp expect one
error: patch failed: one:1
error: one: patch does not apply
ok 69 - shrink file with tons of missing blanks at end of file
expecting success:
{ echo a; echo b; } >one &&
git add one &&
{ echo c; echo d; } >>one &&
git diff -- one >patch &&
echo a >one &&
test_must_fail git apply patch &&
test_must_fail git apply --whitespace=fix patch &&
test_must_fail git apply --ignore-space-change --whitespace=fix patch
error: patch failed: one:1
error: one: patch does not apply
error: patch failed: one:1
error: one: patch does not apply
error: patch failed: one:1
error: one: patch does not apply
ok 70 - missing blanks at EOF must only match blank lines
expecting success:
git add one &&
echo d >>one &&
git diff -- one >patch &&
{ echo a; echo b; echo c; } >one &&
cp one expect &&
{ echo; echo d; } >>expect &&
git add one &&
git apply --whitespace=fix patch &&
test_cmp expect one
patch:8: trailing whitespace.
warning: 1 line adds whitespace errors.
ok 71 - missing blank line should match context line with spaces
expecting success:
git add one &&
echo d >>one &&
cp one expect &&
git diff -- one >patch &&
{ echo a; echo b; echo c; } >one &&
git add one &&
git checkout-index -f one &&
git apply --ignore-space-change --whitespace=fix patch &&
test_cmp expect one
patch:8: trailing whitespace.
warning: 1 line adds whitespace errors.
ok 72 - same, but with the --ignore-space-option
expecting success:
git config core.whitespace cr-at-eol &&
printf "a\r\n" >one &&
printf "b\r\n" >>one &&
printf "c\r\n" >>one &&
cp one save-one &&
printf " \r\n" >>one &&
git add one &&
printf "d\r\n" >>one &&
cp one expect &&
git diff -- one >patch &&
mv save-one one &&
git apply --ignore-space-change --whitespace=fix patch &&
test_cmp expect one
patch:8: trailing whitespace.
warning: 1 line adds whitespace errors.
ok 73 - same, but with CR-LF line endings && cr-at-eol set
expecting success:
git config --unset core.whitespace &&
printf "a\r\n" >one &&
cp one save-one &&
git add one &&
printf "b\r\n" >>one &&
cp one expect &&
git diff -- one >patch &&
mv save-one one &&
echo "one text=auto" >.gitattributes &&
git apply patch &&
test_cmp expect one
ok 74 - CR-LF line endings && add line && text=auto
expecting success:
printf "a\r\n" >one &&
cp one save-one &&
git add one &&
printf "b\r\n" >one &&
cp one expect &&
git diff -- one >patch &&
mv save-one one &&
echo "one text=auto" >.gitattributes &&
git apply patch &&
test_cmp expect one
ok 75 - CR-LF line endings && change line && text=auto
expecting success:
printf "a\n" >one &&
git add one &&
printf "b\r\n" >one &&
git diff -- one >patch &&
printf "a\r\n" >one &&
echo "one text=auto" >.gitattributes &&
git -c core.eol=CRLF apply patch &&
printf "b\r\n" >expect &&
test_cmp expect one
warning: CRLF will be replaced by LF in one.
The file will have its original line endings in your working directory
ok 76 - LF in repo, CRLF in worktree && change line && text=auto
expecting success:
qz_to_tab_space >preimage <<-\EOF &&
QQa
QQb
QQc
ZZZZZZZZZZZZZZZZd
QQe
QQf
QQg
EOF
qz_to_tab_space >patch <<-\EOF &&
diff --git a/preimage b/preimage
--- a/preimage
+++ b/preimage
@@ -1,7 +1,6 @@
QQa
QQb
QQc
-QQd
QQe
QQf
QQg
EOF
git -c core.whitespace=tab-in-indent apply --whitespace=fix patch
patch:5: tab in indent.
a
patch:6: tab in indent.
b
patch:7: tab in indent.
c
patch:9: tab in indent.
e
patch:10: tab in indent.
f
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.
ok 77 - whitespace=fix to expand
expecting success:
git config core.whitespace blank-at-eol &&
>used &&
>unused &&
git add used unused &&
echo "used" >used &&
echo "unused " >unused &&
git diff-files -p used unused >patch &&
git apply --include=used --stat --whitespace=error <patch
used | 1 +
1 file changed, 1 insertion(+)
ok 78 - whitespace check skipped for excluded paths
# passed all 78 test(s)
1..78
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4151-am-abort.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4151-am-abort/.git/
expecting success:
for i in a b c d e f g
do
echo $i
done >file-1 &&
cp file-1 file-2 &&
test_tick &&
git add file-1 file-2 &&
git commit -m initial &&
git tag initial &&
git format-patch --stdout --root initial >initial.patch &&
for i in 2 3 4 5 6
do
echo $i >>file-1 &&
echo $i >otherfile-$i &&
git add otherfile-$i &&
test_tick &&
git commit -a -m $i || return 1
done &&
git format-patch --no-numbered initial &&
git checkout -b side initial &&
echo local change >file-2-expect
[master (root-commit) 1732241] initial
Author: A U Thor <author@example.com>
2 files changed, 14 insertions(+)
create mode 100644 file-1
create mode 100644 file-2
[master a485f10] 2
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 otherfile-2
[master b72e0d7] 3
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 otherfile-3
[master f1dbda2] 4
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 otherfile-4
[master 73a4960] 5
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 otherfile-5
[master 87a053c] 6
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 otherfile-6
0001-2.patch
0002-3.patch
0003-4.patch
0004-5.patch
0005-6.patch
Switched to a new branch 'side'
ok 1 - setup
expecting success:
git reset --hard initial &&
cp file-2-expect file-2 &&
test_must_fail git am$with3 000[1245]-*.patch &&
git log --pretty=tformat:%s >actual &&
for i in 3 2 initial
do
echo $i
done >expect &&
test_cmp expect actual
HEAD is now at 1732241 initial
error: patch failed: file-1:8
error: file-1: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: 2
Applying: 3
Applying: 5
Patch failed at 0003 5
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 2 - am stops at a patch that does not apply
expecting success:
test_must_fail git am$with3 --skip >output &&
test_i18ngrep "^Applying: 6$" output &&
test_cmp file-2-expect file-2 &&
test ! -f .git/MERGE_RR
error: patch failed: file-1:9
error: file-1: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Applying: 6
ok 3 - am --skip continue after failed am
expecting success:
git am --abort &&
git rev-parse HEAD >actual &&
git rev-parse initial >expect &&
test_cmp expect actual &&
test_cmp file-2-expect file-2 &&
git diff-index --exit-code --cached HEAD &&
test ! -f .git/MERGE_RR
ok 4 - am --abort goes back after failed am
expecting success:
git reset --hard initial &&
cp file-2-expect file-2 &&
test_must_fail git am$with3 000[1245]-*.patch &&
git log --pretty=tformat:%s >actual &&
for i in 3 2 initial
do
echo $i
done >expect &&
test_cmp expect actual
HEAD is now at 1732241 initial
Applying: 2
Applying: 3
Applying: 5
Using index info to reconstruct a base tree...
M file-1
Falling back to patching base and 3-way merge...
Merging:
62dd7f8 3
virtual 5
found 1 common ancestor:
virtual 2e4b8a989c579cac9d3cc1897320a3e27805d080
Auto-merging file-1
CONFLICT (content): Merge conflict in file-1
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0003 5
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 5 - am -3 stops at a patch that does not apply
expecting success:
test_must_fail git am$with3 --skip >output &&
test_i18ngrep "^Applying: 6$" output &&
test_cmp file-2-expect file-2 &&
test ! -f .git/MERGE_RR
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: 6
ok 6 - am -3 --skip continue after failed am -3
expecting success:
git am --abort &&
git rev-parse HEAD >actual &&
git rev-parse initial >expect &&
test_cmp expect actual &&
test_cmp file-2-expect file-2 &&
git diff-index --exit-code --cached HEAD &&
test ! -f .git/MERGE_RR
ok 7 - am --abort goes back after failed am -3
expecting success:
git reset --hard initial &&
test_must_fail git am -3 0003-*.patch &&
test 3 -eq $(git ls-files -u | wc -l) &&
test 4 = "$(cat otherfile-4)" &&
git am --skip &&
test_cmp_rev initial HEAD &&
test -z "$(git ls-files -u)" &&
test_path_is_missing otherfile-4
HEAD is now at 1732241 initial
Applying: 4
Using index info to reconstruct a base tree...
M file-1
Falling back to patching base and 3-way merge...
Merging:
1732241 initial
virtual 4
found 1 common ancestor:
virtual ca28a003e7272ffcb030f00a3e373a07e49ce912
Auto-merging file-1
CONFLICT (content): Merge conflict in file-1
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 4
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 8 - am -3 --skip removes otherfile-4
expecting success:
git reset --hard initial &&
test_must_fail git am -3 0003-*.patch &&
test 3 -eq $(git ls-files -u | wc -l) &&
test 4 = "$(cat otherfile-4)" &&
git am --abort &&
test_cmp_rev initial HEAD &&
test -z "$(git ls-files -u)" &&
test_path_is_missing otherfile-4
HEAD is now at 1732241 initial
Applying: 4
Using index info to reconstruct a base tree...
M file-1
Falling back to patching base and 3-way merge...
Merging:
1732241 initial
virtual 4
found 1 common ancestor:
virtual ca28a003e7272ffcb030f00a3e373a07e49ce912
Auto-merging file-1
CONFLICT (content): Merge conflict in file-1
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 4
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 9 - am -3 --abort removes otherfile-4
expecting success:
test_must_fail git am 0004-*.patch &&
test_commit unrelated &&
git rev-parse HEAD >expect &&
git am --abort &&
git rev-parse HEAD >actual &&
test_cmp expect actual
error: patch failed: file-1:8
error: file-1: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: 5
Patch failed at 0001 5
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
[side f386b22] unrelated
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 unrelated.t
warning: You seem to have moved HEAD since the last 'am' failure.
Not rewinding to ORIG_HEAD
ok 10 - am --abort will keep the local commits intact
expecting success:
git reset --hard initial &&
echo dirtyfile >dirtyfile &&
cp dirtyfile dirtyfile.expected &&
git add dirtyfile &&
test_must_fail git am 0001-*.patch &&
test_cmp_rev initial HEAD &&
test_path_is_file dirtyfile &&
test_cmp dirtyfile.expected dirtyfile &&
git am --abort &&
test_cmp_rev initial HEAD &&
test_path_is_file dirtyfile &&
test_cmp dirtyfile.expected dirtyfile
HEAD is now at 1732241 initial
fatal: Dirty index: cannot apply patches (dirty: dirtyfile)
ok 11 - am --abort will keep dirty index intact
expecting success:
git checkout -f --orphan orphan &&
git reset &&
rm -f otherfile-4 &&
test_must_fail git am -3 0003-*.patch &&
test 2 -eq $(git ls-files -u | wc -l) &&
test 4 = "$(cat otherfile-4)"
Switched to a new branch 'orphan'
Applying: 4
Using index info to reconstruct a base tree...
A file-1
Falling back to patching base and 3-way merge...
Merging:
virtual HEAD
virtual 4
found 1 common ancestor:
virtual ca28a003e7272ffcb030f00a3e373a07e49ce912
CONFLICT (modify/delete): file-1 deleted in HEAD and modified in 4. Version 4 of file-1 left in tree at file-1~4.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 4
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 12 - am -3 stops on conflict on unborn branch
expecting success:
test_path_is_dir .git/rebase-apply &&
echo tmpfile >tmpfile &&
git add tmpfile &&
git am --skip &&
test -z "$(git ls-files)" &&
test_path_is_missing otherfile-4 &&
test_path_is_missing tmpfile
ok 13 - am -3 --skip clears index on unborn branch
expecting success:
git checkout -f --orphan orphan &&
git reset &&
rm -f otherfile-4 file-1 &&
test_must_fail git am -3 0003-*.patch &&
test 2 -eq $(git ls-files -u | wc -l) &&
test 4 = "$(cat otherfile-4)" &&
git am --abort &&
test -z "$(git ls-files -u)" &&
test_path_is_missing otherfile-4
Switched to a new branch 'orphan'
Applying: 4
Using index info to reconstruct a base tree...
A file-1
Falling back to patching base and 3-way merge...
Merging:
virtual HEAD
virtual 4
found 1 common ancestor:
virtual ca28a003e7272ffcb030f00a3e373a07e49ce912
CONFLICT (modify/delete): file-1 deleted in HEAD and modified in 4. Version 4 of file-1 left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 4
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 14 - am -3 --abort removes otherfile-4 on unborn branch
expecting success:
git checkout -f --orphan orphan &&
git reset &&
rm -f otherfile-4 otherfile-2 file-1 file-2 &&
test_must_fail git am -3 initial.patch 0003-*.patch &&
test 3 -eq $(git ls-files -u | wc -l) &&
test 4 = "$(cat otherfile-4)" &&
git am --abort &&
test -z "$(git ls-files -u)" &&
test_path_is_missing otherfile-4 &&
test_path_is_missing file-1 &&
test_path_is_missing file-2 &&
test 0 -eq $(git log --oneline 2>/dev/null | wc -l) &&
test refs/heads/orphan = "$(git symbolic-ref HEAD)"
Switched to a new branch 'orphan'
applying to an empty history
Applying: initial
Applying: 4
Using index info to reconstruct a base tree...
M file-1
Falling back to patching base and 3-way merge...
Merging:
03bb45f initial
virtual 4
found 1 common ancestor:
virtual ca28a003e7272ffcb030f00a3e373a07e49ce912
Auto-merging file-1
CONFLICT (content): Merge conflict in file-1
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0002 4
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 15 - am -3 --abort on unborn branch removes applied commits
expecting success:
git checkout -f --orphan orphan &&
git reset &&
test_must_fail git am 0004-*.patch &&
test_commit unrelated2 &&
git rev-parse HEAD >expect &&
git am --abort &&
git rev-parse HEAD >actual &&
test_cmp expect actual
Switched to a new branch 'orphan'
error: file-1: does not exist in index
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: 5
Patch failed at 0001 5
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
[orphan (root-commit) 823805c] unrelated2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 unrelated2.t
warning: You seem to have moved HEAD since the last 'am' failure.
Not rewinding to ORIG_HEAD
ok 16 - am --abort on unborn branch will keep local commits intact
expecting success:
git checkout -f --orphan skip-stat-info &&
git reset &&
test_commit skip-should-be-untouched &&
test-tool chmtime =0 skip-should-be-untouched.t &&
git update-index --refresh &&
git diff-files --exit-code --quiet &&
test_must_fail git am 0001-*.patch &&
git am --skip &&
git diff-files --exit-code --quiet
Switched to a new branch 'skip-stat-info'
[skip-stat-info (root-commit) 2297a89] skip-should-be-untouched
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 skip-should-be-untouched.t
error: file-1: does not exist in index
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: 2
Patch failed at 0001 2
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 17 - am --skip leaves index stat info alone
expecting success:
git checkout -f --orphan abort-stat-info &&
git reset &&
test_commit abort-should-be-untouched &&
test-tool chmtime =0 abort-should-be-untouched.t &&
git update-index --refresh &&
git diff-files --exit-code --quiet &&
test_must_fail git am 0001-*.patch &&
git am --abort &&
git diff-files --exit-code --quiet
Switched to a new branch 'abort-stat-info'
[abort-stat-info (root-commit) 3038985] abort-should-be-untouched
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 abort-should-be-untouched.t
error: file-1: does not exist in index
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: 2
Patch failed at 0001 2
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 18 - am --abort leaves index stat info alone
# passed all 18 test(s)
1..18
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4152-am-subjects.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4152-am-subjects/.git/
expecting success:
test_commit baseline file
[master (root-commit) 2f64c43] baseline
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 1 - setup baseline commit
expecting success:
git reset --hard baseline &&
echo $type >file &&
git commit -a -m "$subject" &&
git format-patch -1 --stdout >$type.patch &&
git format-patch -1 --stdout -k >$type-k.patch
HEAD is now at 2f64c43 baseline
[master 5d59063] short subject
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 2 - create patches with short subject
expecting success:
git reset --hard baseline &&
echo $type >file &&
git commit -a -m "$subject" &&
git format-patch -1 --stdout >$type.patch &&
git format-patch -1 --stdout -k >$type-k.patch
HEAD is now at 2f64c43 baseline
[master 512ba33] this is a long subject that is virtually guaranteed to require wrapping via format-patch if it is all going to appear on a single line
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 3 - create patches with long subject
expecting success:
git reset --hard baseline &&
echo $type >file &&
git commit -a -m "$subject" &&
git format-patch -1 --stdout >$type.patch &&
git format-patch -1 --stdout -k >$type-k.patch
HEAD is now at 2f64c43 baseline
[master 230e818] this is a long subject that is virtually guaranteed to require wrapping via format-patch if it is all going to appear on a single line
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 4 - create patches with multiline subject
expecting success:
check_subject short
HEAD is now at 2f64c43 baseline
Applying: short subject
ok 5 - short subject preserved (format-patch | am)
expecting success:
check_subject short-k
HEAD is now at 2f64c43 baseline
Applying: short subject
ok 6 - short subject preserved (format-patch -k | am)
expecting success:
check_subject short-k -k
HEAD is now at 2f64c43 baseline
Applying: short subject
ok 7 - short subject preserved (format-patch -k | am -k)
expecting success:
check_subject long
HEAD is now at 2f64c43 baseline
Applying: this is a long subject that is virtually guaranteed to require wrapping via format-patch if it is all going to appear on a single line
ok 8 - long subject preserved (format-patch | am)
expecting success:
check_subject long-k
HEAD is now at 2f64c43 baseline
Applying: this is a long subject that is virtually guaranteed to require wrapping via format-patch if it is all going to appear on a single line
ok 9 - long subject preserved (format-patch -k | am)
expecting success:
check_subject long-k -k
HEAD is now at 2f64c43 baseline
Applying: this is a long subject that is virtually guaranteed to require wrapping via format-patch if it is all going to appear on a single line
ok 10 - long subject preserved (format-patch -k | am -k)
expecting success:
check_subject multiline
HEAD is now at 2f64c43 baseline
Applying: this is a long subject that is virtually guaranteed to require wrapping via format-patch if it is all going to appear on a single line
ok 11 - multiline subject unwrapped (format-patch | am)
expecting success:
check_subject multiline-k
HEAD is now at 2f64c43 baseline
Applying: this is a long subject that is virtually guaranteed to require wrapping via format-patch if it is all going to appear on a single line
ok 12 - multiline subject unwrapped (format-patch -k | am)
expecting success:
check_subject multiline-k -k
HEAD is now at 2f64c43 baseline
Applying: this is a long subject that is virtually guaranteed
ok 13 - multiline subject preserved (format-patch -k | am -k)
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4153-am-resume-override-opts.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4153-am-resume-override-opts/.git/
expecting success:
test_commit initial file &&
test_commit first file &&
git checkout initial &&
git mv file file2 &&
test_tick &&
git commit -m renamed-file &&
git tag renamed-file &&
git checkout -b side initial &&
test_commit side1 file &&
test_commit side2 file &&
format_patch side1 &&
format_patch side2
[master (root-commit) b6d2089] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 3aaf771] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Note: switching to 'initial'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at b6d2089 initial
[detached HEAD 5e7fd8e] renamed-file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename file => file2 (100%)
Previous HEAD position was 5e7fd8e renamed-file
Switched to a new branch 'side'
[side ccf21da] side1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[side 58bd40e] side2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
checking prerequisite: TTY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq PERL &&
# Reading from the pty master seems to get stuck _sometimes_
# on Mac OS X 10.5.0, using Perl 5.10.0 or 5.8.9.
#
# Reproduction recipe: run
#
# i=0
# while ./test-terminal.perl echo hi $i
# do
# : $((i = $i + 1))
# done
#
# After 2000 iterations or so it hangs.
# https://rt.cpan.org/Ticket/Display.html?id=65692
#
test "$(uname -s)" != Darwin &&
perl "$TEST_DIRECTORY"/test-terminal.perl \
sh -c "test -t 1 && test -t 2"
)
prerequisite TTY ok
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout renamed-file &&
# Applying side1 will fail as the file has been renamed.
test_must_fail git am --no-3way side[12].eml &&
test_path_is_dir .git/rebase-apply &&
test_cmp_rev renamed-file HEAD &&
test -z "$(git ls-files -u)" &&
# Applying side1 with am --3way will succeed due to the threeway-merge.
# Applying side2 will fail as --3way does not apply to it.
test_must_fail test_terminal git am --3way </dev/zero &&
test_path_is_dir .git/rebase-apply &&
test side1 = "$(cat file2)"
HEAD is now at 58bd40e side2
Note: switching to 'renamed-file'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 5e7fd8e renamed-file
error: file: does not exist in index
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: side1
Patch failed at 0001 side1
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Applying: side1
Using index info to reconstruct a base tree...
A file
Falling back to patching base and 3-way merge...
Merging:
5e7fd8e renamed-file
virtual side1
found 1 common ancestor:
virtual 99f2e3e1cb15f9b52fa29f66d380dda061d917ab
error: file: does not exist in index
Applying: side2
[33mhint: Use 'git am --show-current-patch' to see the failed patch[m
Patch failed at 0002 side2
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
died of signal 15 at /<<PKGBUILDDIR>>/t/test-terminal.perl line 35.
ok 2 - --3way overrides --no-3way
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
# Applying side1 will be quiet.
test_must_fail git am --quiet side[123].eml >out &&
test_path_is_dir .git/rebase-apply &&
test_i18ngrep ! "^Applying: " out &&
echo side1 >file &&
git add file &&
# Applying side1 will not be quiet.
# Applying side2 will be quiet.
git am --no-quiet --continue >out &&
echo "Applying: side1" >expected &&
test_i18ncmp expected out
HEAD is now at 8e08c98 side1
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
8e08c98 side1
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> 8e08c98
HEAD is now at 3aaf771 first
error: patch failed: file:1
error: file: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 3 - --no-quiet overrides --quiet
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
test_must_fail git am --no-signoff side[12].eml &&
test_path_is_dir .git/rebase-apply &&
echo side1 >file &&
git add file &&
git am --signoff --continue &&
# Applied side1 will be signed off
echo "Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" >expected &&
git cat-file commit HEAD^ | grep "Signed-off-by:" >actual &&
test_cmp expected actual &&
# Applied side2 will not be signed off
test $(git cat-file commit HEAD | grep -c "Signed-off-by:") -eq 0
HEAD is now at 1d25943 side2
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
1d25943 side2
0400be0 side1
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> 1d25943
HEAD is now at 3aaf771 first
error: patch failed: file:1
error: file: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: side1
Patch failed at 0001 side1
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Applying: side1
Applying: side2
ok 4 - --signoff overrides --no-signoff
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
rm -f file.rej &&
test_must_fail git am --no-reject side1.eml &&
test_path_is_dir .git/rebase-apply &&
test_path_is_missing file.rej &&
test_must_fail test_terminal git am --reject </dev/zero &&
test_path_is_dir .git/rebase-apply &&
test_path_is_file file.rej
HEAD is now at 4f3810f side2
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
4f3810f side2
deca85c side1
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> 4f3810f
HEAD is now at 3aaf771 first
error: patch failed: file:1
error: file: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: side1
Patch failed at 0001 side1
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Checking patch file...
error: while searching for:
initial
error: patch failed: file:1
Applying patch file with 1 reject...
Rejected hunk #1.
[33mhint: Use 'git am --show-current-patch' to see the failed patch[m
Applying: side1
Patch failed at 0001 side1
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
died of signal 15 at /<<PKGBUILDDIR>>/t/test-terminal.perl line 35.
ok 5 - --reject overrides --no-reject
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4201-shortlog.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4201-shortlog/.git/
expecting success:
test_tick &&
echo 1 >a1 &&
git add a1 &&
tree=$(git write-tree) &&
commit=$(printf "%s\n" "Test" "" | git commit-tree "$tree") &&
git update-ref HEAD "$commit" &&
echo 2 >a1 &&
git commit --quiet -m "This is a very, very long first line for the commit message to see if it is wrapped correctly" a1 &&
# test if the wrapping is still valid
# when replacing all is by treble clefs.
echo 3 >a1 &&
git commit --quiet -m "$(
echo "This is a very, very long first line for the commit message to see if it is wrapped correctly" |
sed "s/i/1234/g" |
tr 1234 "\360\235\204\236")" a1 &&
# now fsck up the utf8
git config i18n.commitencoding non-utf-8 &&
echo 4 >a1 &&
git commit --quiet -m "$(
echo "This is a very, very long first line for the commit message to see if it is wrapped correctly" |
sed "s/i/1234/g" |
tr 1234 "\370\235\204\236")" a1 &&
echo 5 >a1 &&
git commit --quiet -m "a 12 34 56 78" a1 &&
echo 6 >a1 &&
git commit --quiet -m "Commit by someone else" \
--author="Someone else <not!me>" a1 &&
cat >expect.template <<-\EOF
A U Thor (5):
SUBJECT
SUBJECT
SUBJECT
SUBJECT
SUBJECT
Someone else (1):
SUBJECT
EOF
ok 1 - setup
expecting success:
git shortlog HEAD >log &&
fuzz log >log.predictable &&
test_cmp expect.template log.predictable
ok 2 - default output format
expecting success:
sed s/SUBJECT/OBJECT_NAME/ expect.template >expect &&
git shortlog --format="%H" HEAD >log &&
fuzz log >log.predictable &&
test_cmp expect log.predictable
ok 3 - pretty format
expecting success:
sed s/SUBJECT/OBJID/ expect.template >expect &&
git shortlog --format="%h" --abbrev=35 HEAD >log &&
fuzz log >log.predictable &&
test_cmp expect log.predictable
ok 4 - --abbrev
expecting success:
sed "s/SUBJECT/two lines/" expect.template >expect &&
git shortlog --format="two%nlines" HEAD >log &&
fuzz log >log.predictable &&
test_cmp expect log.predictable
ok 5 - output from user-defined format is re-wrapped
expecting success:
cat >expect <<\EOF &&
A U Thor (5):
Test
This is a very, very long first line for the commit message to see if
it is wrapped correctly
Th𝄞s 𝄞s a very, very long f𝄞rst l𝄞ne for the comm𝄞t message to see 𝄞f
𝄞t 𝄞s wrapped correctly
a 12 34
56 78
Someone else (1):
Commit by someone else
EOF
git shortlog -w HEAD >out &&
test_cmp expect out
ok 6 - shortlog wrapping
expecting success:
git log --no-expand-tabs HEAD >log &&
GIT_DIR=non-existing git shortlog -w <log >out &&
test_cmp expect out
ok 7 - shortlog from non-git directory
expecting success:
git log --format=raw HEAD >log &&
GIT_DIR=non-existing git shortlog -w <log >out &&
test_cmp expect out
ok 8 - shortlog can read --format=raw output
expecting success:
test_must_fail env GIT_DIR=non-existing git shortlog foo 2>out &&
test_i18ngrep "too many arguments" out
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: too many arguments given outside repository
ok 9 - shortlog from non-git directory refuses extra arguments
expecting success:
cat >expect <<\EOF &&
A U Thor (2):
bbbbbbbbbbbbbbbbbb: bbbbbbbb bbb bbbb bbbbbbb bb bbbb bbb bbbbb bbbbbb
aaaaaaaaaaaaaaaaaaaaaa: aaaaaa aaaaaaaaaa aaaa aaaaaaaa aa aaaa aa aaa
EOF
git shortlog -w >out <<\EOF &&
commit 0000000000000000000000000000000000000001
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
aaaaaaaaaaaaaaaaaaaaaa: aaaaaa aaaaaaaaaa aaaa aaaaaaaa aa aaaa aa aaa
commit 0000000000000000000000000000000000000002
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
bbbbbbbbbbbbbbbbbb: bbbbbbbb bbb bbbb bbbbbbb bb bbbb bbb bbbbb bbbbbb
EOF
test_cmp expect out
ok 10 - shortlog should add newline when input line matches wraplen
expecting success:
git reset --hard "$commit" &&
git config --unset i18n.commitencoding &&
echo 2 > a1 &&
git commit --quiet -m "$MSG1" --author="$DSCHOE" a1 &&
git config i18n.commitencoding "ISO8859-1" &&
echo 3 > a1 &&
git commit --quiet -m "$(iconvfromutf8toiso88591 "$MSG2")" \
--author="$(iconvfromutf8toiso88591 "$DSCHOE")" a1 &&
git config --unset i18n.commitencoding &&
git shortlog HEAD~2.. > out &&
test_cmp expect out
HEAD is now at aa97132 Test
ok 11 - shortlog encoding
expecting success:
git shortlog --all &&
git shortlog --branches &&
git shortlog --exclude=refs/heads/m* --all
A U Thor (1):
Test
Jöhännës "Dschö" Schindëlin (2):
set a1 to 2 and some non-ASCII chars: Äßø
set a1 to 3 and some non-ASCII chars: áæï
A U Thor (1):
Test
Jöhännës "Dschö" Schindëlin (2):
set a1 to 2 and some non-ASCII chars: Äßø
set a1 to 3 and some non-ASCII chars: áæï
A U Thor (1):
Test
Jöhännës "Dschö" Schindëlin (2):
set a1 to 2 and some non-ASCII chars: Äßø
set a1 to 3 and some non-ASCII chars: áæï
ok 12 - shortlog with revision pseudo options
expecting success:
git shortlog --output=shortlog -1 master >output &&
test_must_be_empty output &&
test_line_count = 3 shortlog
ok 13 - shortlog with --output=<file>
expecting success:
git checkout --orphan side &&
git commit --allow-empty -m one &&
git commit --allow-empty -m two &&
GIT_COMMITTER_NAME="Sin Nombre" git commit --allow-empty -m three &&
cat >expect <<-\EOF &&
2 C O Mitter
1 Sin Nombre
EOF
git shortlog -nsc HEAD >actual &&
test_cmp expect actual
Switched to a new branch 'side'
[side (root-commit) 9ed1028] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a1
[side 4046e48] two
Author: A U Thor <author@example.com>
[side 1c4141a] three
Author: A U Thor <author@example.com>
ok 14 - shortlog --committer (internal)
expecting success:
git log --format=full | git shortlog -nsc >actual &&
test_cmp expect actual
ok 15 - shortlog --committer (external)
# passed all 15 test(s)
1..15
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4200-rerere.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4200-rerere/.git/
expecting success:
cat >a1 <<-\EOF &&
Some title
==========
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them? To die: to sleep;
No more; and by a sleep to say we end
The heart-ache and the thousand natural shocks
That flesh is heir to, 'tis a consummation
Devoutly to be wish'd.
EOF
git add a1 &&
test_tick &&
git commit -q -a -m initial &&
cat >>a1 <<-\EOF &&
Some title
==========
To die, to sleep;
To sleep: perchance to dream: ay, there's the rub;
For in that sleep of death what dreams may come
When we have shuffled off this mortal coil,
Must give us pause: there's the respect
That makes calamity of so long life;
EOF
git checkout -b first &&
test_tick &&
git commit -q -a -m first &&
git checkout -b second master &&
git show first:a1 |
sed -e "s/To die, t/To die! T/" -e "s/Some title/Some Title/" >a1 &&
echo "* END *" >>a1 &&
test_tick &&
git commit -q -a -m second
Switched to a new branch 'first'
M a1
Switched to a new branch 'second'
ok 1 - setup
expecting success:
rm -rf .git/rr-cache &&
git config rerere.enabled false &&
test_must_fail git merge first &&
! test -d .git/rr-cache
Merging:
fcd23fa second
virtual first
found 1 common ancestor:
70749e0 initial
Auto-merging a1
CONFLICT (content): Merge conflict in a1
Automatic merge failed; fix conflicts and then commit the result.
ok 2 - nothing recorded without rerere
expecting success:
git reset --hard &&
mkdir .git/rr-cache &&
test_might_fail git config --unset rerere.enabled &&
test_must_fail git merge first &&
sha1=$(perl -pe "s/ .*//" .git/MERGE_RR) &&
rr=.git/rr-cache/$sha1 &&
grep "^=======\$" $rr/preimage &&
! test -f $rr/postimage &&
! test -f $rr/thisimage
HEAD is now at fcd23fa second
Merging:
fcd23fa second
virtual first
found 1 common ancestor:
70749e0 initial
Auto-merging a1
CONFLICT (content): Merge conflict in a1
Recorded preimage for 'a1'
Automatic merge failed; fix conflicts and then commit the result.
=======
=======
ok 3 - activate rerere, old style (conflicting merge)
expecting success:
rm -rf .git/rr-cache &&
git config rerere.enabled true &&
git reset --hard &&
test_must_fail git merge first &&
sha1=$(perl -pe "s/ .*//" .git/MERGE_RR) &&
rr=.git/rr-cache/$sha1 &&
grep ^=======$ $rr/preimage
HEAD is now at fcd23fa second
Merging:
fcd23fa second
virtual first
found 1 common ancestor:
70749e0 initial
Auto-merging a1
CONFLICT (content): Merge conflict in a1
Recorded preimage for 'a1'
Automatic merge failed; fix conflicts and then commit the result.
=======
=======
ok 4 - rerere.enabled works, too
expecting success:
rm -rf .git/rr-cache &&
git config rerere.enabled true &&
git reset --hard &&
test_must_fail git merge first &&
sha1=$(perl -pe "s/ .*//" .git/MERGE_RR) &&
rr=.git/rr-cache/$sha1
HEAD is now at fcd23fa second
Merging:
fcd23fa second
virtual first
found 1 common ancestor:
70749e0 initial
Auto-merging a1
CONFLICT (content): Merge conflict in a1
Recorded preimage for 'a1'
Automatic merge failed; fix conflicts and then commit the result.
ok 5 - set up rr-cache
expecting success:
# no postimage or thisimage yet
! test -f $rr/postimage &&
! test -f $rr/thisimage &&
# preimage has right number of lines
cnt=$(sed -ne "/^<<<<<<</,/^>>>>>>>/p" $rr/preimage | wc -l) &&
echo $cnt &&
test $cnt = 13
13
ok 6 - rr-cache looks sane
expecting success:
git show first:a1 >a1 &&
cat >expect <<-\EOF &&
--- a/a1
+++ b/a1
@@ -1,4 +1,4 @@
-Some Title
+Some title
==========
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
@@ -8,21 +8,11 @@
The heart-ache and the thousand natural shocks
That flesh is heir to, 'tis a consummation
Devoutly to be wish'd.
-<<<<<<<
-Some Title
-==========
-To die! To sleep;
-=======
Some title
==========
To die, to sleep;
->>>>>>>
To sleep: perchance to dream: ay, there's the rub;
For in that sleep of death what dreams may come
When we have shuffled off this mortal coil,
Must give us pause: there's the respect
That makes calamity of so long life;
-<<<<<<<
-=======
-* END *
->>>>>>>
EOF
git rerere diff >out &&
test_cmp expect out
ok 7 - rerere diff
expecting success:
echo a1 >expect &&
git rerere status >out &&
test_cmp expect out
ok 8 - rerere status
expecting success:
git show first:a1 | sed "s/To die: t/To die! T/" >expect &&
git commit -q -a -m "prefer first over second" &&
test -f $rr/postimage &&
oldmtimepost=$(test-tool chmtime --get -60 $rr/postimage) &&
git checkout -b third master &&
git show second^:a1 | sed "s/To die: t/To die! T/" >a1 &&
git commit -q -a -m third &&
test_must_fail git merge first &&
# rerere kicked in
! grep "^=======\$" a1 &&
test_cmp expect a1
Recorded resolution for 'a1'.
Switched to a new branch 'third'
Merging:
40cb797 third
virtual first
found 1 common ancestor:
70749e0 initial
Auto-merging a1
CONFLICT (content): Merge conflict in a1
Resolved 'a1' using previous resolution.
Automatic merge failed; fix conflicts and then commit the result.
ok 9 - first postimage wins
expecting success:
newmtimepost=$(test-tool chmtime --get $rr/postimage) &&
test $oldmtimepost -lt $newmtimepost
ok 10 - rerere updates postimage timestamp
expecting success:
mv $rr/postimage .git/post-saved &&
echo "$sha1 a1" | perl -pe "y/\012/\000/" >.git/MERGE_RR &&
git rerere clear &&
! test -d $rr
ok 11 - rerere clear
expecting success:
git reset --hard &&
mkdir -p $rr &&
test_must_fail git merge first &&
test -f $rr/preimage
HEAD is now at 40cb797 third
Merging:
40cb797 third
virtual first
found 1 common ancestor:
70749e0 initial
Auto-merging a1
CONFLICT (content): Merge conflict in a1
Recorded preimage for 'a1'
Automatic merge failed; fix conflicts and then commit the result.
ok 12 - leftover directory
expecting success:
git reset --hard &&
mkdir -p $rr &&
cp .git/post-saved $rr/postimage &&
test_must_fail git merge first &&
test -f $rr/preimage
HEAD is now at 40cb797 third
Merging:
40cb797 third
virtual first
found 1 common ancestor:
70749e0 initial
Auto-merging a1
CONFLICT (content): Merge conflict in a1
Resolved 'a1' using previous resolution.
Automatic merge failed; fix conflicts and then commit the result.
ok 13 - missing preimage
expecting success:
mkdir -p $rr &&
echo Hello >$rr/preimage &&
echo World >$rr/postimage &&
sha2=4000000000000000000000000000000000000000 &&
rr2=.git/rr-cache/$sha2 &&
mkdir $rr2 &&
echo Hello >$rr2/preimage &&
almost_15_days_ago=$((60-15*86400)) &&
just_over_15_days_ago=$((-1-15*86400)) &&
almost_60_days_ago=$((60-60*86400)) &&
just_over_60_days_ago=$((-1-60*86400)) &&
test-tool chmtime =$just_over_60_days_ago $rr/preimage &&
test-tool chmtime =$almost_60_days_ago $rr/postimage &&
test-tool chmtime =$almost_15_days_ago $rr2/preimage
ok 14 - set up for garbage collection tests
expecting success:
git rerere gc &&
test -f $rr/preimage &&
test -f $rr2/preimage
ok 15 - gc preserves young or recently used records
expecting success:
test-tool chmtime =$just_over_60_days_ago $rr/postimage &&
test-tool chmtime =$just_over_15_days_ago $rr2/preimage &&
git rerere gc &&
! test -f $rr/preimage &&
! test -f $rr2/preimage
ok 16 - old records rest in peace
expecting success:
rm -fr .git/rr-cache &&
rr=.git/rr-cache/$ZERO_OID &&
mkdir -p "$rr" &&
>"$rr/preimage" &&
>"$rr/postimage" &&
two_days_ago=$((-2*86400)) &&
test-tool chmtime =$two_days_ago "$rr/preimage" &&
test-tool chmtime =$two_days_ago "$rr/postimage" &&
find .git/rr-cache -type f | sort >original &&
git -c "gc.rerereresolved=$five_days" \
-c "gc.rerereunresolved=$five_days" rerere gc &&
find .git/rr-cache -type f | sort >actual &&
test_cmp original actual &&
git -c "gc.rerereresolved=$five_days" \
-c "gc.rerereunresolved=$right_now" rerere gc &&
find .git/rr-cache -type f | sort >actual &&
test_cmp original actual &&
git -c "gc.rerereresolved=$right_now" \
-c "gc.rerereunresolved=$right_now" rerere gc &&
find .git/rr-cache -type f | sort >actual &&
test_must_be_empty actual
ok 17 - rerere gc with custom expiry (5, 0)
expecting success:
rm -fr .git/rr-cache &&
rr=.git/rr-cache/$ZERO_OID &&
mkdir -p "$rr" &&
>"$rr/preimage" &&
>"$rr/postimage" &&
two_days_ago=$((-2*86400)) &&
test-tool chmtime =$two_days_ago "$rr/preimage" &&
test-tool chmtime =$two_days_ago "$rr/postimage" &&
find .git/rr-cache -type f | sort >original &&
git -c "gc.rerereresolved=$five_days" \
-c "gc.rerereunresolved=$five_days" rerere gc &&
find .git/rr-cache -type f | sort >actual &&
test_cmp original actual &&
git -c "gc.rerereresolved=$five_days" \
-c "gc.rerereunresolved=$right_now" rerere gc &&
find .git/rr-cache -type f | sort >actual &&
test_cmp original actual &&
git -c "gc.rerereresolved=$right_now" \
-c "gc.rerereunresolved=$right_now" rerere gc &&
find .git/rr-cache -type f | sort >actual &&
test_must_be_empty actual
ok 18 - rerere gc with custom expiry (5.days.ago, now)
expecting success:
git reset --hard &&
git checkout -b fourth &&
echo Hallo >file2 &&
git add file2 &&
test_tick &&
git commit -m version1 &&
git checkout third &&
echo Bello >file2 &&
git add file2 &&
test_tick &&
git commit -m version2 &&
test_must_fail git merge fourth &&
echo Cello >file2 &&
git add file2 &&
git commit -m resolution
HEAD is now at 40cb797 third
Switched to a new branch 'fourth'
[fourth 26401ec] version1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
Switched to branch 'third'
[third 1f50303] version2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
Merging:
1f50303 version2
virtual fourth
found 1 common ancestor:
40cb797 third
CONFLICT (add/add): Merge conflict in file2
Auto-merging file2
Recorded preimage for 'file2'
Automatic merge failed; fix conflicts and then commit the result.
Recorded resolution for 'file2'.
[third e9acb28] resolution
Author: A U Thor <author@example.com>
ok 19 - setup: file2 added differently in two branches
expecting success:
echo Cello >expected &&
git reset --hard HEAD~2 &&
git checkout -b fifth &&
echo Hallo >file3 &&
git add file3 &&
test_tick &&
git commit -m version1 &&
git checkout third &&
echo Bello >file3 &&
git add file3 &&
test_tick &&
git commit -m version2 &&
git tag version2 &&
test_must_fail git merge fifth &&
test_cmp expected file3 &&
test_must_fail git update-index --refresh
HEAD is now at 40cb797 third
Switched to a new branch 'fifth'
[fifth 9b6b3c4] version1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
Switched to branch 'third'
[third 7eec302] version2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
Merging:
7eec302 version2
virtual fifth
found 1 common ancestor:
40cb797 third
CONFLICT (add/add): Merge conflict in file3
Auto-merging file3
Resolved 'file3' using previous resolution.
Automatic merge failed; fix conflicts and then commit the result.
file3: needs merge
ok 20 - resolution was recorded properly
expecting success:
git config rerere.autoupdate true &&
git reset --hard &&
git checkout version2 &&
test_must_fail git merge fifth &&
git update-index --refresh
HEAD is now at 7eec302 version2
Note: switching to 'version2'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 7eec302 version2
Merging:
7eec302 version2
virtual fifth
found 1 common ancestor:
40cb797 third
CONFLICT (add/add): Merge conflict in file3
Auto-merging file3
Staged 'file3' using previous resolution.
Automatic merge failed; fix conflicts and then commit the result.
ok 21 - rerere.autoupdate
expecting success:
test_might_fail git config --unset rerere.autoupdate &&
git reset --hard &&
git checkout version2 &&
test_must_fail git merge --rerere-autoupdate fifth &&
git update-index --refresh
HEAD is now at 7eec302 version2
HEAD is now at 7eec302 version2
Merging:
7eec302 version2
virtual fifth
found 1 common ancestor:
40cb797 third
CONFLICT (add/add): Merge conflict in file3
Auto-merging file3
Staged 'file3' using previous resolution.
Automatic merge failed; fix conflicts and then commit the result.
ok 22 - merge --rerere-autoupdate
expecting success:
headblob=$(git rev-parse version2:file3) &&
mergeblob=$(git rev-parse fifth:file3) &&
cat >expected <<-EOF &&
100644 $headblob 2 file3
100644 $mergeblob 3 file3
EOF
git config rerere.autoupdate true &&
git reset --hard &&
git checkout version2 &&
test_must_fail git merge --no-rerere-autoupdate fifth &&
git ls-files -u >actual &&
test_cmp expected actual
HEAD is now at 7eec302 version2
HEAD is now at 7eec302 version2
Merging:
7eec302 version2
virtual fifth
found 1 common ancestor:
40cb797 third
CONFLICT (add/add): Merge conflict in file3
Auto-merging file3
Resolved 'file3' using previous resolution.
Automatic merge failed; fix conflicts and then commit the result.
ok 23 - merge --no-rerere-autoupdate
expecting success:
headblob=$(git rev-parse version2:file3) &&
mergeblob=$(git rev-parse fifth:file3) &&
cat >expected.unresolved <<-EOF &&
100644 $headblob 2 file3
100644 $mergeblob 3 file3
EOF
test_might_fail git config --unset rerere.autoupdate &&
git reset --hard &&
git checkout version2 &&
fifth=$(git rev-parse fifth) &&
echo "$fifth branch fifth of ." |
git fmt-merge-msg >msg &&
ancestor=$(git merge-base version2 fifth) &&
test_must_fail git merge-recursive "$ancestor" -- HEAD fifth &&
git ls-files --stage >failedmerge &&
cp file3 file3.conflict &&
git ls-files -u >actual &&
test_cmp expected.unresolved actual
HEAD is now at 7eec302 version2
HEAD is now at 7eec302 version2
Merging HEAD with fifth
Merging:
7eec302 version2
9b6b3c4 version1
found 1 common ancestor:
40cb797 third
CONFLICT (add/add): Merge conflict in file3
Auto-merging file3
ok 24 - set up an unresolved merge
expecting success:
test_might_fail git config --unset rerere.autoupdate &&
git rm -fr --cached . &&
git update-index --index-info <failedmerge &&
cp file3.conflict file3 &&
test_must_fail git update-index --refresh -q &&
git rerere &&
git ls-files -u >actual &&
test_cmp expected.unresolved actual
rm 'a1'
rm 'file3'
rm 'file3'
file3: needs merge
Resolved 'file3' using previous resolution.
ok 25 - explicit rerere
expecting success:
git config rerere.autoupdate true &&
git rm -fr --cached . &&
git update-index --index-info <failedmerge &&
cp file3.conflict file3 &&
test_must_fail git update-index --refresh -q &&
git rerere &&
git update-index --refresh
rm 'a1'
rm 'file3'
rm 'file3'
file3: needs merge
Staged 'file3' using previous resolution.
ok 26 - explicit rerere with autoupdate
expecting success:
git config rerere.autoupdate false &&
git rm -fr --cached . &&
git update-index --index-info <failedmerge &&
cp file3.conflict file3 &&
git rerere &&
git ls-files -u >actual1 &&
git rm -fr --cached . &&
git update-index --index-info <failedmerge &&
cp file3.conflict file3 &&
git rerere --rerere-autoupdate &&
git update-index --refresh &&
git rm -fr --cached . &&
git update-index --index-info <failedmerge &&
cp file3.conflict file3 &&
git rerere --rerere-autoupdate --no-rerere-autoupdate &&
git ls-files -u >actual2 &&
git rm -fr --cached . &&
git update-index --index-info <failedmerge &&
cp file3.conflict file3 &&
git rerere --rerere-autoupdate --no-rerere-autoupdate --rerere-autoupdate &&
git update-index --refresh &&
test_cmp expected.unresolved actual1 &&
test_cmp expected.unresolved actual2
rm 'a1'
rm 'file3'
Resolved 'file3' using previous resolution.
rm 'a1'
rm 'file3'
rm 'file3'
Staged 'file3' using previous resolution.
rm 'a1'
rm 'file3'
Resolved 'file3' using previous resolution.
rm 'a1'
rm 'file3'
rm 'file3'
Staged 'file3' using previous resolution.
ok 27 - explicit rerere --rerere-autoupdate overrides
expecting success:
git rm -fr --cached . &&
git update-index --index-info <failedmerge &&
cp file3.conflict file3 &&
test_must_fail git rerere --no-no-rerere-autoupdate 2>err &&
test_i18ngrep [Uu]sage err &&
test_must_fail git update-index --refresh
rm 'a1'
rm 'file3'
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
usage: git rerere [clear | forget <path>... | status | remaining | diff | gc]
file3: needs merge
ok 28 - rerere --no-no-rerere-autoupdate
expecting success:
test_must_fail git rerere -h >help &&
test_i18ngrep [Uu]sage help
usage: git rerere [clear | forget <path>... | status | remaining | diff | gc]
ok 29 - rerere -h
expecting success:
rm -fr .git/rr-cache &&
mkdir .git/rr-cache &&
git reset --hard &&
test_seq 1 6 >early &&
>late &&
test_seq 11 15 >short &&
test_seq 111 120 >long &&
concat_insert short >file1 &&
concat_insert long >file2 &&
git add file1 file2 &&
git commit -m base &&
git tag base &&
git checkout -b six.1 &&
concat_insert short 6.1 >file1 &&
concat_insert long 6.1 >file2 &&
git add file1 file2 &&
git commit -m 6.1 &&
git checkout -b six.2 HEAD^ &&
concat_insert short 6.2 >file1 &&
concat_insert long 6.2 >file2 &&
git add file1 file2 &&
git commit -m 6.2 &&
# At this point, six.1 and six.2
# - derive from common ancestor that has two files
# 1...6 7 11..15 (file1) and 1...6 7 111..120 (file2)
# - six.1 replaces these 7s with 6.1
# - six.2 replaces these 7s with 6.2
merge_conflict_resolve &&
# Check that rerere knows that file1 and file2 have conflicts
printf "%s\n" file1 file2 >expect &&
git ls-files -u | sed -e "s/^.* //" | sort -u >actual &&
test_cmp expect actual &&
git rerere status | sort >actual &&
test_cmp expect actual &&
git rerere remaining >actual &&
test_cmp expect actual &&
count_pre_post 2 0 &&
# Pretend that the conflicts were made quite some time ago
test-tool chmtime -172800 $(find .git/rr-cache/ -type f) &&
# Unresolved entries have not expired yet
git -c gc.rerereresolved=5 -c gc.rerereunresolved=5 rerere gc &&
count_pre_post 2 0 &&
# Unresolved entries have expired
git -c gc.rerereresolved=5 -c gc.rerereunresolved=1 rerere gc &&
count_pre_post 0 0 &&
# Recreate the conflicted state
merge_conflict_resolve &&
count_pre_post 2 0 &&
# Clear it
git rerere clear &&
count_pre_post 0 0 &&
# Recreate the conflicted state
merge_conflict_resolve &&
count_pre_post 2 0 &&
# We resolved file1 and file2
git rerere &&
git rerere remaining >actual &&
test_must_be_empty actual &&
# We must have recorded both of them
count_pre_post 2 2 &&
# Now we should be able to resolve them both
git reset --hard &&
test_must_fail git merge six.1 &&
git rerere &&
git rerere remaining >actual &&
test_must_be_empty actual &&
concat_insert short 6.1 6.2 >file1.expect &&
concat_insert long 6.1 6.2 >file2.expect &&
test_cmp file1.expect file1 &&
test_cmp file2.expect file2 &&
# Forget resolution for file2
git rerere forget file2 &&
echo file2 >expect &&
git rerere status >actual &&
test_cmp expect actual &&
count_pre_post 2 1 &&
# file2 already has correct resolution, so record it again
git rerere &&
# Pretend that the resolutions are old again
test-tool chmtime -172800 $(find .git/rr-cache/ -type f) &&
# Resolved entries have not expired yet
git -c gc.rerereresolved=5 -c gc.rerereunresolved=5 rerere gc &&
count_pre_post 2 2 &&
# Resolved entries have expired
git -c gc.rerereresolved=1 -c gc.rerereunresolved=5 rerere gc &&
count_pre_post 0 0
HEAD is now at 7eec302 version2
[detached HEAD 40e0609] base
Author: A U Thor <author@example.com>
2 files changed, 29 insertions(+)
create mode 100644 file1
create mode 100644 file2
Switched to a new branch 'six.1'
[six.1 605006b] 6.1
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
Switched to a new branch 'six.2'
[six.2 ba09fec] 6.2
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
HEAD is now at ba09fec 6.2
Merging:
ba09fec 6.2
virtual six.1
found 1 common ancestor:
40e0609 base
Auto-merging file2
CONFLICT (content): Merge conflict in file2
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Recorded preimage for 'file1'
Recorded preimage for 'file2'
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at ba09fec 6.2
Merging:
ba09fec 6.2
virtual six.1
found 1 common ancestor:
40e0609 base
Auto-merging file2
CONFLICT (content): Merge conflict in file2
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Recorded preimage for 'file1'
Recorded preimage for 'file2'
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at ba09fec 6.2
Merging:
ba09fec 6.2
virtual six.1
found 1 common ancestor:
40e0609 base
Auto-merging file2
CONFLICT (content): Merge conflict in file2
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Recorded preimage for 'file1'
Recorded preimage for 'file2'
Automatic merge failed; fix conflicts and then commit the result.
Recorded resolution for 'file1'.
Recorded resolution for 'file2'.
HEAD is now at ba09fec 6.2
Merging:
ba09fec 6.2
virtual six.1
found 1 common ancestor:
40e0609 base
Auto-merging file2
CONFLICT (content): Merge conflict in file2
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Resolved 'file1' using previous resolution.
Resolved 'file2' using previous resolution.
Automatic merge failed; fix conflicts and then commit the result.
Updated preimage for 'file2'
Forgot resolution for 'file2'
Recorded resolution for 'file2'.
ok 30 - multiple identical conflicts
expecting success:
git reset --hard &&
git checkout -b branch-1 master &&
echo "bar" >test &&
git add test &&
git commit -q -m two &&
git reset --hard &&
git checkout -b branch-2 master &&
echo "foo" >test &&
git add test &&
git commit -q -a -m one &&
test_must_fail git merge branch-1 &&
echo "<<<<<<< a" >test &&
git rerere &&
git rerere clear
HEAD is now at ba09fec 6.2
Switched to a new branch 'branch-1'
HEAD is now at 5727ee8 two
Switched to a new branch 'branch-2'
Merging:
95c3f31 one
virtual branch-1
found 1 common ancestor:
70749e0 initial
CONFLICT (add/add): Merge conflict in test
Auto-merging test
Recorded preimage for 'test'
Automatic merge failed; fix conflicts and then commit the result.
error: could not parse conflict hunks in 'test'
ok 31 - rerere with unexpected conflict markers does not crash
expecting success:
git reset --hard &&
git checkout -b A master &&
echo "bar" >test &&
git add test &&
git commit -q -m two &&
echo "baz" >test &&
git add test &&
git commit -q -m three &&
git reset --hard &&
git checkout -b B master &&
echo "foo" >test &&
git add test &&
git commit -q -a -m one &&
test_must_fail git merge A~ &&
git add test &&
git commit -q -m "will solve conflicts later" &&
test_must_fail git merge A &&
echo "resolved" >test &&
git add test &&
git commit -q -m "solved conflict" &&
echo "resolved" >expect &&
git reset --hard HEAD~~ &&
test_must_fail git merge A~ &&
git add test &&
git commit -q -m "will solve conflicts later" &&
test_must_fail git merge A &&
cat test >actual &&
test_cmp expect actual &&
git add test &&
git commit -m "rerere solved conflict" &&
git reset --hard HEAD~ &&
test_must_fail git merge A &&
cat test >actual &&
test_cmp expect actual
HEAD is now at 95c3f31 one
Switched to a new branch 'A'
HEAD is now at 8f8d617 three
Switched to a new branch 'B'
Merging:
95c3f31 one
virtual A~
found 1 common ancestor:
70749e0 initial
CONFLICT (add/add): Merge conflict in test
Auto-merging test
Recorded preimage for 'test'
Automatic merge failed; fix conflicts and then commit the result.
Recorded preimage for 'test'
Merging:
35eb3e9 will solve conflicts later
virtual A
found 1 common ancestor:
5727ee8 two
Auto-merging test
CONFLICT (content): Merge conflict in test
Recorded preimage for 'test'
Automatic merge failed; fix conflicts and then commit the result.
Recorded resolution for 'test'.
HEAD is now at 95c3f31 one
Merging:
95c3f31 one
virtual A~
found 1 common ancestor:
70749e0 initial
CONFLICT (add/add): Merge conflict in test
Auto-merging test
Recorded preimage for 'test'
Automatic merge failed; fix conflicts and then commit the result.
Recorded preimage for 'test'
Merging:
35eb3e9 will solve conflicts later
virtual A
found 1 common ancestor:
5727ee8 two
Auto-merging test
CONFLICT (content): Merge conflict in test
Resolved 'test' using previous resolution.
Automatic merge failed; fix conflicts and then commit the result.
[B c1558e5] rerere solved conflict
Author: A U Thor <author@example.com>
HEAD is now at 35eb3e9 will solve conflicts later
Merging:
35eb3e9 will solve conflicts later
virtual A
found 1 common ancestor:
5727ee8 two
Auto-merging test
CONFLICT (content): Merge conflict in test
Resolved 'test' using previous resolution.
Automatic merge failed; fix conflicts and then commit the result.
ok 32 - rerere with inner conflict markers
expecting success:
test_create_repo stage_1_handling &&
(
cd stage_1_handling &&
test_seq 1 10 >original &&
git add original &&
git commit -m original &&
git checkout -b A master &&
git mv original A &&
git commit -m "rename to A" &&
git checkout -b B master &&
git mv original B &&
git commit -m "rename to B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4200-rerere/stage_1_handling/.git/
[master (root-commit) 64a4a07] original
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 original
Switched to a new branch 'A'
[A cc792a7] rename to A
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename original => A (100%)
Switched to a new branch 'B'
[B 02c49bb] rename to B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename original => B (100%)
ok 33 - setup simple stage 1 handling
expecting success:
(
cd stage_1_handling &&
git config rerere.enabled true &&
git checkout A^0 &&
test_must_fail git merge B^0
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at cc792a7 rename to A
Merging:
cc792a7 rename to A
virtual B^0
found 1 common ancestor:
64a4a07 original
CONFLICT (rename/rename): Rename "original"->"A" in branch "HEAD" rename "original"->"B" in "B^0"
Automatic merge failed; fix conflicts and then commit the result.
ok 34 - test simple stage 1 handling
# passed all 34 test(s)
1..34
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4150-am.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4150-am/.git/
expecting success:
cat >msg <<-\EOF &&
second
Lorem ipsum dolor sit amet, consectetuer sadipscing elitr, sed diam nonumy
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita
kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem
ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At
vero eos et accusam et justo duo dolores et ea rebum.
EOF
qz_to_tab_space <<-\EOF >>msg &&
QDuis autem vel eum iriure dolor in hendrerit in vulputate velit
Qesse molestie consequat, vel illum dolore eu feugiat nulla facilisis
Qat vero eros et accumsan et iusto odio dignissim qui blandit
Qpraesent luptatum zzril delenit augue duis dolore te feugait nulla
Qfacilisi.
EOF
cat >>msg <<-\EOF &&
Lorem ipsum dolor sit amet,
consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut
laoreet dolore magna aliquam erat volutpat.
git
---
+++
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure
dolor in hendrerit in vulputate velit esse molestie consequat, vel illum
dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio
dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te
feugait nulla facilisi.
Reported-by: A N Other <a.n.other@example.com>
EOF
cat >failmail <<-\EOF &&
From foo@example.com Fri May 23 10:43:49 2008
From: foo@example.com
To: bar@example.com
Subject: Re: [RFC/PATCH] git-foo.sh
Date: Fri, 23 May 2008 05:23:42 +0200
Sometimes we have to find out that there's nothing left.
EOF
cat >pine <<-\EOF &&
From MAILER-DAEMON Fri May 23 10:43:49 2008
Date: 23 May 2008 05:23:42 +0200
From: Mail System Internal Data <MAILER-DAEMON@example.com>
Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA
Message-ID: <foo-0001@example.com>
This text is part of the internal format of your mail folder, and is not
a real message. It is created automatically by the mail system software.
If deleted, important folder data will be lost, and it will be re-created
with the data reset to initial values.
EOF
cat >msg-without-scissors-line <<-\EOF &&
Test that git-am --scissors cuts at the scissors line
This line should be included in the commit message.
EOF
printf "Subject: " >subject-prefix &&
cat - subject-prefix msg-without-scissors-line >msg-with-scissors-line <<-\EOF
This line should not be included in the commit message with --scissors enabled.
- - >8 - - remove everything above this line - - >8 - -
EOF
ok 1 - setup: messages
expecting success:
echo hello >file &&
git add file &&
test_tick &&
git commit -m first &&
git tag first &&
echo world >>file &&
git add file &&
test_tick &&
git commit -F msg &&
git tag second &&
git format-patch --stdout first >patch1 &&
{
echo "Message-Id: <1226501681-24923-1-git-send-email-bda@mnsspb.ru>" &&
echo "X-Fake-Field: Line One" &&
echo "X-Fake-Field: Line Two" &&
echo "X-Fake-Field: Line Three" &&
git format-patch --stdout first | sed -e "1d"
} > patch1.eml &&
{
echo "X-Fake-Field: Line One" &&
echo "X-Fake-Field: Line Two" &&
echo "X-Fake-Field: Line Three" &&
git format-patch --stdout first | sed -e "1d"
} | append_cr >patch1-crlf.eml &&
{
printf "%255s\\n" ""
echo "X-Fake-Field: Line One" &&
echo "X-Fake-Field: Line Two" &&
echo "X-Fake-Field: Line Three" &&
git format-patch --stdout first | sed -e "1d"
} > patch1-ws.eml &&
{
sed -ne "1p" msg &&
echo &&
echo "From: $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>" &&
echo "Date: $GIT_AUTHOR_DATE" &&
echo &&
sed -e "1,2d" msg &&
echo "---" &&
git diff-tree --no-commit-id --stat -p second
} >patch1-stgit.eml &&
mkdir stgit-series &&
cp patch1-stgit.eml stgit-series/patch &&
{
echo "# This series applies on GIT commit $(git rev-parse first)" &&
echo "patch"
} >stgit-series/series &&
{
echo "# HG changeset patch" &&
echo "# User $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>" &&
echo "# Date $test_tick 25200" &&
echo "# $(git show --pretty="%aD" -s second)" &&
echo "# Node ID $ZERO_OID" &&
echo "# Parent $ZERO_OID" &&
cat msg &&
echo &&
git diff-tree --no-commit-id -p second
} >patch1-hg.eml &&
echo file >file &&
git add file &&
git commit -F msg-without-scissors-line &&
git tag expected-for-scissors &&
git reset --hard HEAD^ &&
echo file >file &&
git add file &&
git commit -F msg-with-scissors-line &&
git tag expected-for-no-scissors &&
git format-patch --stdout expected-for-no-scissors^ >patch-with-scissors-line.eml &&
git reset --hard HEAD^ &&
sed -n -e "3,\$p" msg >file &&
git add file &&
test_tick &&
git commit -m third &&
git format-patch --stdout first >patch2 &&
git checkout -b lorem &&
sed -n -e "11,\$p" msg >file &&
head -n 9 msg >>file &&
test_tick &&
git commit -a -m "moved stuff" &&
echo goodbye >another &&
git add another &&
test_tick &&
git commit -m "added another file" &&
git format-patch --stdout master >lorem-move.patch &&
git format-patch --no-prefix --stdout master >lorem-zero.patch &&
git checkout -b rename &&
git mv file renamed &&
git commit -m "renamed a file" &&
git format-patch -M --stdout lorem >rename.patch &&
git reset --soft lorem^ &&
git commit -m "renamed a file and added another" &&
git format-patch -M --stdout lorem^ >rename-add.patch &&
# reset time
sane_unset test_tick &&
test_tick
[master (root-commit) 6b2d93f] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 88f8893] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 27dee8a] Test that git-am --scissors cuts at the scissors line
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 2 deletions(-)
HEAD is now at 88f8893 second
[master 9f99c7e] This line should not be included in the commit message with --scissors enabled.
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 2 deletions(-)
HEAD is now at 88f8893 second
[master 7179449] third
Author: A U Thor <author@example.com>
1 file changed, 30 insertions(+), 2 deletions(-)
rewrite file (100%)
Switched to a new branch 'lorem'
[lorem 4670218] moved stuff
Author: A U Thor <author@example.com>
1 file changed, 9 insertions(+), 8 deletions(-)
[lorem 1048ce6] added another file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 another
Switched to a new branch 'rename'
[rename fc8826b] renamed a file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename file => renamed (100%)
[rename 756adf8] renamed a file and added another
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 100644 another
rename file => renamed (100%)
ok 2 - setup
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
test_tick &&
git am <patch1 &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code second &&
test "$(git rev-parse second)" = "$(git rev-parse HEAD)" &&
test "$(git rev-parse second^)" = "$(git rev-parse HEAD^)"
HEAD is now at 756adf8 renamed a file and added another
Note: switching to 'first'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 6b2d93f first
Applying: second
ok 3 - am applies patch correctly
expecting success:
test_when_finished "rm -f dirtyfile" &&
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
echo dirtyfile >dirtyfile &&
git add dirtyfile &&
test_must_fail git am patch1 &&
test_path_is_dir .git/rebase-apply &&
test_cmp_rev first HEAD
HEAD is now at 88f8893 second
Previous HEAD position was 88f8893 second
HEAD is now at 6b2d93f first
fatal: Dirty index: cannot apply patches (dirty: dirtyfile)
ok 4 - am fails if index is dirty
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
git am patch1.eml &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code second &&
test "$(git rev-parse second)" = "$(git rev-parse HEAD)" &&
test "$(git rev-parse second^)" = "$(git rev-parse HEAD^)"
HEAD is now at 6b2d93f first
HEAD is now at 6b2d93f first
Applying: second
ok 5 - am applies patch e-mail not in a mbox
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
git am patch1-crlf.eml &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code second &&
test "$(git rev-parse second)" = "$(git rev-parse HEAD)" &&
test "$(git rev-parse second^)" = "$(git rev-parse HEAD^)"
HEAD is now at 88f8893 second
Previous HEAD position was 88f8893 second
HEAD is now at 6b2d93f first
Applying: second
ok 6 - am applies patch e-mail not in a mbox with CRLF
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
git am patch1-ws.eml &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code second &&
test "$(git rev-parse second)" = "$(git rev-parse HEAD)" &&
test "$(git rev-parse second^)" = "$(git rev-parse HEAD^)"
HEAD is now at 88f8893 second
Previous HEAD position was 88f8893 second
HEAD is now at 6b2d93f first
Applying: second
ok 7 - am applies patch e-mail with preceding whitespace
expecting success:
rm -fr .git/rebase-apply &&
git checkout -f first &&
git am patch1-stgit.eml &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code second &&
test_cmp_rev second HEAD &&
test_cmp_rev second^ HEAD^
Previous HEAD position was 88f8893 second
HEAD is now at 6b2d93f first
Applying: second
ok 8 - am applies stgit patch
expecting success:
rm -fr .git/rebase-apply &&
git checkout -f first &&
git am --patch-format=stgit <patch1-stgit.eml &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code second &&
test_cmp_rev second HEAD &&
test_cmp_rev second^ HEAD^
Previous HEAD position was 88f8893 second
HEAD is now at 6b2d93f first
Applying: second
ok 9 - am --patch-format=stgit applies stgit patch
expecting success:
rm -fr .git/rebase-apply &&
git checkout -f first &&
git am stgit-series/series &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code second &&
test_cmp_rev second HEAD &&
test_cmp_rev second^ HEAD^
Previous HEAD position was 88f8893 second
HEAD is now at 6b2d93f first
Applying: second
ok 10 - am applies stgit series
expecting success:
rm -fr .git/rebase-apply &&
git checkout -f first &&
git am patch1-hg.eml &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code second &&
test_cmp_rev second HEAD &&
test_cmp_rev second^ HEAD^
Previous HEAD position was 88f8893 second
HEAD is now at 6b2d93f first
Applying: second
ok 11 - am applies hg patch
expecting success:
rm -fr .git/rebase-apply &&
git checkout -f first &&
git am --patch-format=hg <patch1-hg.eml &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code second &&
test_cmp_rev second HEAD &&
test_cmp_rev second^ HEAD^
Previous HEAD position was 88f8893 second
HEAD is now at 6b2d93f first
Applying: second
ok 12 - am --patch-format=hg applies hg patch
expecting success:
test_when_finished "rm -f .git/hooks/applypatch-msg" &&
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
mkdir -p .git/hooks &&
write_script .git/hooks/applypatch-msg <<-\EOF &&
cat "$1" >actual-msg &&
echo hook-message >"$1"
EOF
git am patch1 &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code second &&
echo hook-message >expected &&
git log -1 --format=format:%B >actual &&
test_cmp expected actual &&
git log -1 --format=format:%B second >expected &&
test_cmp expected actual-msg
HEAD is now at 88f8893 second
Previous HEAD position was 88f8893 second
HEAD is now at 6b2d93f first
Applying: hook-message
ok 13 - am with applypatch-msg hook
expecting success:
test_when_finished "rm -f .git/hooks/applypatch-msg" &&
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
mkdir -p .git/hooks &&
write_script .git/hooks/applypatch-msg <<-\EOF &&
exit 1
EOF
test_must_fail git am patch1 &&
test_path_is_dir .git/rebase-apply &&
git diff --exit-code first &&
test_cmp_rev first HEAD
HEAD is now at fa25691 hook-message
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
fa25691 hook-message
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> fa25691
HEAD is now at 6b2d93f first
ok 14 - am with failing applypatch-msg hook
expecting success:
test_when_finished "rm -f .git/hooks/pre-applypatch" &&
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
mkdir -p .git/hooks &&
write_script .git/hooks/pre-applypatch <<-\EOF &&
git diff first >diff.actual
exit 0
EOF
git am patch1 &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code second &&
test_cmp_rev second HEAD &&
git diff first..second >diff.expected &&
test_cmp diff.expected diff.actual
HEAD is now at 6b2d93f first
HEAD is now at 6b2d93f first
Applying: second
ok 15 - am with pre-applypatch hook
expecting success:
test_when_finished "rm -f .git/hooks/pre-applypatch" &&
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
mkdir -p .git/hooks &&
write_script .git/hooks/pre-applypatch <<-\EOF &&
exit 1
EOF
test_must_fail git am patch1 &&
test_path_is_dir .git/rebase-apply &&
git diff --exit-code second &&
test_cmp_rev first HEAD
HEAD is now at 88f8893 second
Previous HEAD position was 88f8893 second
HEAD is now at 6b2d93f first
Applying: second
ok 16 - am with failing pre-applypatch hook
expecting success:
test_when_finished "rm -f .git/hooks/post-applypatch" &&
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
mkdir -p .git/hooks &&
write_script .git/hooks/post-applypatch <<-\EOF &&
git rev-parse HEAD >head.actual
git diff second >diff.actual
exit 0
EOF
git am patch1 &&
test_path_is_missing .git/rebase-apply &&
test_cmp_rev second HEAD &&
git rev-parse second >head.expected &&
test_cmp head.expected head.actual &&
git diff second >diff.expected &&
test_cmp diff.expected diff.actual
HEAD is now at 6b2d93f first
HEAD is now at 6b2d93f first
Applying: second
ok 17 - am with post-applypatch hook
expecting success:
test_when_finished "rm -f .git/hooks/post-applypatch" &&
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
mkdir -p .git/hooks &&
write_script .git/hooks/post-applypatch <<-\EOF &&
git rev-parse HEAD >head.actual
exit 1
EOF
git am patch1 &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code second &&
test_cmp_rev second HEAD &&
git rev-parse second >head.expected &&
test_cmp head.expected head.actual
HEAD is now at 88f8893 second
Previous HEAD position was 88f8893 second
HEAD is now at 6b2d93f first
Applying: second
ok 18 - am with failing post-applypatch hook
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout second &&
git am --scissors patch-with-scissors-line.eml &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code expected-for-scissors &&
test_cmp_rev expected-for-scissors HEAD
HEAD is now at 88f8893 second
HEAD is now at 88f8893 second
Applying: Test that git-am --scissors cuts at the scissors line
ok 19 - am --scissors cuts the message at the scissors line
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout second &&
test_config mailinfo.scissors true &&
git am --no-scissors patch-with-scissors-line.eml &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code expected-for-no-scissors &&
test_cmp_rev expected-for-no-scissors HEAD
HEAD is now at 27dee8a Test that git-am --scissors cuts at the scissors line
Previous HEAD position was 27dee8a Test that git-am --scissors cuts at the scissors line
HEAD is now at 88f8893 second
Applying: This line should not be included in the commit message with --scissors enabled.
ok 20 - am --no-scissors overrides mailinfo.scissors
expecting success:
GIT_AUTHOR_NAME="Another Thor" &&
GIT_AUTHOR_EMAIL="a.thor@example.com" &&
GIT_COMMITTER_NAME="Co M Miter" &&
GIT_COMMITTER_EMAIL="c.miter@example.com" &&
export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL
ok 21 - setup: new author and committer
expecting success:
test_tick &&
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
git am patch2 &&
test_path_is_missing .git/rebase-apply &&
test "$(git rev-parse master^^)" = "$(git rev-parse HEAD^^)" &&
git diff --exit-code master..HEAD &&
git diff --exit-code master^..HEAD^ &&
compare author master HEAD &&
compare author master^ HEAD^ &&
test "$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" = \
"$(git log -1 --pretty=format:"%cn <%ce>" HEAD)"
HEAD is now at 9f99c7e This line should not be included in the commit message with --scissors enabled.
Previous HEAD position was 9f99c7e This line should not be included in the commit message with --scissors enabled.
HEAD is now at 6b2d93f first
Applying: second
Applying: third
ok 22 - am changes committer and keeps author
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout -b master2 first &&
git am --signoff <patch2 &&
{
printf "third\n\nSigned-off-by: %s <%s>\n\n" \
"$GIT_COMMITTER_NAME" "$GIT_COMMITTER_EMAIL" &&
cat msg &&
printf "Signed-off-by: %s <%s>\n\n" \
"$GIT_COMMITTER_NAME" "$GIT_COMMITTER_EMAIL"
} >expected-log &&
git log --pretty=%B -2 HEAD >actual &&
test_cmp expected-log actual
HEAD is now at ae63ba7 third
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
ae63ba7 third
480301e second
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> ae63ba7
Switched to a new branch 'master2'
Applying: second
Applying: third
ok 23 - am --signoff adds Signed-off-by: line
expecting success:
echo refs/heads/master2 >expected &&
git symbolic-ref HEAD >actual &&
test_cmp expected actual
ok 24 - am stays in branch
expecting success:
git format-patch --stdout first >patch3 &&
git reset --hard first &&
git am --signoff <patch3 &&
git log --pretty=%B -2 HEAD >actual &&
test_cmp expected-log actual
HEAD is now at 6b2d93f first
Applying: second
Applying: third
ok 25 - am --signoff does not add Signed-off-by: line if already there
expecting success:
NAME="A N Other" &&
EMAIL="a.n.other@example.com" &&
{
printf "third\n\nSigned-off-by: %s <%s>\nSigned-off-by: %s <%s>\n\n" \
"$GIT_COMMITTER_NAME" "$GIT_COMMITTER_EMAIL" \
"$NAME" "$EMAIL" &&
cat msg &&
printf "Signed-off-by: %s <%s>\nSigned-off-by: %s <%s>\n\n" \
"$GIT_COMMITTER_NAME" "$GIT_COMMITTER_EMAIL" \
"$NAME" "$EMAIL"
} >expected-log &&
git reset --hard first &&
GIT_COMMITTER_NAME="$NAME" GIT_COMMITTER_EMAIL="$EMAIL" \
git am --signoff <patch3 &&
git log --pretty=%B -2 HEAD >actual &&
test_cmp expected-log actual
HEAD is now at 6b2d93f first
Applying: second
Applying: third
ok 26 - am --signoff adds Signed-off-by: if another author is preset
expecting success:
NAME="A N Other" &&
EMAIL="a.n.other@example.com" &&
{
printf "third\n\nSigned-off-by: %s <%s>\n\
Signed-off-by: %s <%s>\nSigned-off-by: %s <%s>\n\n" \
"$GIT_COMMITTER_NAME" "$GIT_COMMITTER_EMAIL" \
"$NAME" "$EMAIL" \
"$GIT_COMMITTER_NAME" "$GIT_COMMITTER_EMAIL" &&
cat msg &&
printf "Signed-off-by: %s <%s>\nSigned-off-by: %s <%s>\n\
Signed-off-by: %s <%s>\n\n" \
"$GIT_COMMITTER_NAME" "$GIT_COMMITTER_EMAIL" \
"$NAME" "$EMAIL" \
"$GIT_COMMITTER_NAME" "$GIT_COMMITTER_EMAIL"
} >expected-log &&
git format-patch --stdout first >patch3 &&
git reset --hard first &&
git am --signoff <patch3 &&
git log --pretty=%B -2 HEAD >actual &&
test_cmp expected-log actual
HEAD is now at 6b2d93f first
Applying: second
Applying: third
ok 27 - am --signoff duplicates Signed-off-by: if it is not the last one
expecting success:
git format-patch --stdout HEAD^ >tmp &&
sed -e "/^Subject/ s,\[PATCH,Re: Re: Re: & 1/5 v2] [foo," tmp >patch4 &&
git reset --hard HEAD^ &&
git am <patch4 &&
git rev-parse HEAD >expected &&
git rev-parse master2 >actual &&
test_cmp expected actual
HEAD is now at b55fe7d second
Applying: third
ok 28 - am without --keep removes Re: and [PATCH] stuff
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout HEAD^ &&
git am --keep patch4 &&
test_path_is_missing .git/rebase-apply &&
git cat-file commit HEAD >actual &&
grep "Re: Re: Re: \[PATCH 1/5 v2\] \[foo\] third" actual
HEAD is now at e3375b9 third
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at b55fe7d second
Applying: Re: Re: Re: [PATCH 1/5 v2] [foo] third
Re: Re: Re: [PATCH 1/5 v2] [foo] third
ok 29 - am --keep really keeps the subject
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout HEAD^ &&
git am --keep-non-patch patch4 &&
test_path_is_missing .git/rebase-apply &&
git cat-file commit HEAD >actual &&
grep "^\[foo\] third" actual
HEAD is now at f45669a Re: Re: Re: [PATCH 1/5 v2] [foo] third
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
f45669a Re: Re: Re: [PATCH 1/5 v2] [foo] third
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> f45669a
HEAD is now at b55fe7d second
Applying: [foo] third
[foo] third
ok 30 - am --keep-non-patch really keeps the non-patch part
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout -b base3way master2 &&
sed -n -e "3,\$p" msg >file &&
head -n 9 msg >>file &&
git add file &&
test_tick &&
git commit -m "copied stuff"
HEAD is now at 44e89ee [foo] third
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
44e89ee [foo] third
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> 44e89ee
Switched to a new branch 'base3way'
[base3way 899ba97] copied stuff
Author: Another Thor <a.thor@example.com>
1 file changed, 9 insertions(+)
ok 31 - setup am -3
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout -b lorem2 base3way &&
git am -3 lorem-move.patch &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code lorem
HEAD is now at 899ba97 copied stuff
Switched to a new branch 'lorem2'
Applying: moved stuff
Using index info to reconstruct a base tree...
M file
Falling back to patching base and 3-way merge...
Merging:
899ba97 copied stuff
virtual moved stuff
found 1 common ancestor:
virtual f192f7dcb36af1757e1a66463400563fdcef521e
Auto-merging file
Applying: added another file
ok 32 - am -3 falls back to 3-way merge
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout -b lorem3 base3way &&
git am -3 -p0 lorem-zero.patch &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code lorem
HEAD is now at be86ef0 added another file
Switched to a new branch 'lorem3'
Applying: moved stuff
Using index info to reconstruct a base tree...
M file
Falling back to patching base and 3-way merge...
Merging:
899ba97 copied stuff
virtual moved stuff
found 1 common ancestor:
virtual f192f7dcb36af1757e1a66463400563fdcef521e
Auto-merging file
Applying: added another file
ok 33 - am -3 -p0 can read --no-prefix patch
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout -b lorem4 base3way &&
test_config am.threeWay 1 &&
git am lorem-move.patch &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code lorem
HEAD is now at be86ef0 added another file
Switched to a new branch 'lorem4'
Applying: moved stuff
Using index info to reconstruct a base tree...
M file
Falling back to patching base and 3-way merge...
Merging:
899ba97 copied stuff
virtual moved stuff
found 1 common ancestor:
virtual f192f7dcb36af1757e1a66463400563fdcef521e
Auto-merging file
Applying: added another file
ok 34 - am with config am.threeWay falls back to 3-way merge
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout -b lorem5 base3way &&
test_config am.threeWay 1 &&
test_must_fail git am --no-3way lorem-move.patch &&
test_path_is_dir .git/rebase-apply
HEAD is now at be86ef0 added another file
Switched to a new branch 'lorem5'
error: patch failed: file:28
error: file: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: moved stuff
Patch failed at 0001 moved stuff
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 35 - am with config am.threeWay overridden by --no-3way
expecting success:
grep "^rename from" rename.patch &&
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout lorem^0 &&
git am rename.patch &&
test_path_is_missing .git/rebase-apply &&
git update-index --refresh &&
git diff --exit-code rename
rename from file
HEAD is now at 899ba97 copied stuff
Note: switching to 'lorem^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 1048ce6 added another file
Applying: renamed a file
ok 36 - am can rename a file
expecting success:
grep "^rename from" rename.patch &&
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout lorem^0 &&
git am -3 rename.patch &&
test_path_is_missing .git/rebase-apply &&
git update-index --refresh &&
git diff --exit-code rename
rename from file
HEAD is now at 366127b renamed a file
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
366127b renamed a file
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> 366127b
HEAD is now at 1048ce6 added another file
Applying: renamed a file
ok 37 - am -3 can rename a file
expecting success:
grep "^rename from" rename-add.patch &&
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout lorem^0 &&
git am -3 rename-add.patch &&
test_path_is_missing .git/rebase-apply &&
git update-index --refresh &&
git diff --exit-code rename
rename from file
HEAD is now at 366127b renamed a file
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
366127b renamed a file
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> 366127b
HEAD is now at 1048ce6 added another file
Applying: renamed a file and added another
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
1048ce6 added another file
virtual renamed a file and added another
found 1 common ancestor:
virtual d0e8bd27a52a44dc341376225b2fa62e456df51e
ok 38 - am -3 can rename a file after falling back to 3-way merge
expecting success:
rm -fr .git/rebase-apply &&
git checkout -f lorem2 &&
git reset base3way --hard &&
git am -3 -q lorem-move.patch >output.out 2>&1 &&
test_must_be_empty output.out
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
732bd79 renamed a file and added another
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> 732bd79
Switched to branch 'lorem2'
HEAD is now at 899ba97 copied stuff
ok 39 - am -3 -q is quiet
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout lorem2^^ &&
test_must_fail git am lorem-move.patch &&
test -d .git/rebase-apply
HEAD is now at be86ef0 added another file
Note: switching to 'lorem2^^'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 899ba97 copied stuff
error: patch failed: file:28
error: file: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: moved stuff
Patch failed at 0001 moved stuff
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 40 - am pauses on conflict
expecting success:
git am --show-current-patch >actual.patch &&
test_cmp .git/rebase-apply/0001 actual.patch
ok 41 - am --show-current-patch
expecting success:
echo goodbye >expected &&
git am --skip &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code lorem2^^ -- file &&
test_cmp expected another
Applying: added another file
ok 42 - am --skip works
expecting success:
mkdir .git/rebase-apply &&
git am --abort &&
test_path_is_missing .git/rebase-apply
ok 43 - am --abort removes a stray directory
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout lorem2^^ &&
test_must_fail git am lorem-move.patch &&
test_path_is_dir .git/rebase-apply &&
test_cmp_rev lorem2^^ HEAD &&
test_must_fail git am <lorem-move.patch &&
test_path_is_dir .git/rebase-apply &&
test_cmp_rev lorem2^^ HEAD
HEAD is now at e608aee added another file
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
e608aee added another file
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> e608aee
HEAD is now at 899ba97 copied stuff
error: patch failed: file:28
error: file: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: moved stuff
Patch failed at 0001 moved stuff
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
fatal: previous rebase directory .git/rebase-apply still exists but mbox given.
ok 44 - am refuses patches when paused
expecting success:
echo goodbye >expected &&
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout lorem2^^ &&
test_must_fail git am lorem-move.patch &&
test -d .git/rebase-apply &&
echo resolved >>file &&
git add file &&
git am --resolved &&
test_path_is_missing .git/rebase-apply &&
test_cmp expected another
HEAD is now at 899ba97 copied stuff
HEAD is now at 899ba97 copied stuff
error: patch failed: file:28
error: file: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: moved stuff
Patch failed at 0001 moved stuff
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Applying: moved stuff
Applying: added another file
ok 45 - am --resolved works
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout lorem2^^ &&
test_must_fail git am lorem-move.patch &&
test_path_is_dir .git/rebase-apply &&
test_cmp_rev lorem2^^ HEAD &&
test_must_fail git am --resolved &&
test_path_is_dir .git/rebase-apply &&
test_cmp_rev lorem2^^ HEAD
HEAD is now at 25c657e added another file
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
25c657e added another file
d8fd27b moved stuff
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> 25c657e
HEAD is now at 899ba97 copied stuff
error: patch failed: file:28
error: file: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: moved stuff
Patch failed at 0001 moved stuff
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Applying: moved stuff
No changes - did you forget to use 'git add'?
If there is nothing left to stage, chances are that something else
already introduced the same changes; you might want to skip this patch.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 46 - am --resolved fails if index has no changes
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout second &&
test_must_fail git am -3 lorem-move.patch &&
test_path_is_dir .git/rebase-apply &&
test_cmp_rev second HEAD &&
test_must_fail git am --resolved >err &&
test_path_is_dir .git/rebase-apply &&
test_cmp_rev second HEAD &&
test_i18ngrep "still have unmerged paths" err
HEAD is now at 899ba97 copied stuff
Previous HEAD position was 899ba97 copied stuff
HEAD is now at 88f8893 second
Applying: moved stuff
Using index info to reconstruct a base tree...
M file
Falling back to patching base and 3-way merge...
Merging:
88f8893 second
virtual moved stuff
found 1 common ancestor:
virtual f192f7dcb36af1757e1a66463400563fdcef521e
Auto-merging file
CONFLICT (content): Merge conflict in file
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 moved stuff
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
You still have unmerged paths in your index.
ok 47 - am --resolved fails if index has unmerged entries
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
cat pine patch1 | git am &&
test_path_is_missing .git/rebase-apply &&
git diff --exit-code master^..HEAD
HEAD is now at 88f8893 second
Previous HEAD position was 88f8893 second
HEAD is now at 6b2d93f first
Applying: second
ok 48 - am takes patches from a Pine mailbox
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
test_must_fail git am <failmail &&
git am --abort &&
test_path_is_missing .git/rebase-apply
HEAD is now at 7ce6dd8 second
Patch is empty.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 49 - am fails on mail without patch
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
echo "---" >>failmail &&
test_must_fail git am <failmail &&
git am --skip &&
test_path_is_missing .git/rebase-apply
HEAD is now at 7ce6dd8 second
error: unrecognized input
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: git-foo.sh
Patch failed at 0001 git-foo.sh
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 50 - am fails on empty patch
expecting success:
rm -fr subdir &&
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
(
mkdir -p subdir &&
cd subdir &&
git am <../patch1
) &&
git diff --exit-code second
HEAD is now at 7ce6dd8 second
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
7ce6dd8 second
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> 7ce6dd8
HEAD is now at 6b2d93f first
Applying: second
ok 51 - am works from stdin in subdirectory
expecting success:
rm -fr subdir &&
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
(
mkdir -p subdir &&
cd subdir &&
git am ../patch1
) &&
git diff --exit-code second
HEAD is now at 7ce6dd8 second
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
7ce6dd8 second
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> 7ce6dd8
HEAD is now at 6b2d93f first
Applying: second
ok 52 - am works from file (relative path given) in subdirectory
expecting success:
rm -fr subdir &&
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
P=$(pwd) &&
(
mkdir -p subdir &&
cd subdir &&
git am "$P/patch1"
) &&
git diff --exit-code second
HEAD is now at 7ce6dd8 second
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
7ce6dd8 second
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> 7ce6dd8
HEAD is now at 6b2d93f first
Applying: second
ok 53 - am works from file (absolute path given) in subdirectory
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
test_tick &&
git am --committer-date-is-author-date patch1 &&
git cat-file commit HEAD | sed -e "/^\$/q" >head1 &&
sed -ne "/^author /s/.*> //p" head1 >at &&
sed -ne "/^committer /s/.*> //p" head1 >ct &&
test_cmp at ct
HEAD is now at 7ce6dd8 second
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
7ce6dd8 second
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> 7ce6dd8
HEAD is now at 6b2d93f first
Applying: second
ok 54 - am --committer-date-is-author-date
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
test_tick &&
git am patch1 &&
git cat-file commit HEAD | sed -e "/^\$/q" >head1 &&
sed -ne "/^author /s/.*> //p" head1 >at &&
sed -ne "/^committer /s/.*> //p" head1 >ct &&
! test_cmp at ct
HEAD is now at 5709bd2 second
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
5709bd2 second
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> 5709bd2
HEAD is now at 6b2d93f first
Applying: second
--- at 2019-08-14 07:29:30.816664760 +0000
+++ ct 2019-08-14 07:29:30.820664801 +0000
@@ -1 +1 @@
-1112912053 -0700
+1112912293 -0700
ok 55 - am without --committer-date-is-author-date
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
test_tick &&
git am --ignore-date patch1 &&
git cat-file commit HEAD | sed -e "/^\$/q" >head1 &&
sed -ne "/^author /s/.*> //p" head1 >at &&
grep "+0000" at
HEAD is now at 9fa39e1 second
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
9fa39e1 second
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> 9fa39e1
HEAD is now at 6b2d93f first
Applying: second
1565767770 +0000
ok 56 - am --ignore-date
expecting success:
git rev-parse first^{tree} >expected &&
rm -fr .git/rebase-apply &&
git reset --hard &&
rm -fr subdir &&
mkdir subdir &&
git format-patch --numbered-files -o subdir -1 first &&
(
cd subdir &&
git init &&
git am 1
) &&
(
cd subdir &&
git rev-parse HEAD^{tree} >../actual
) &&
test_cmp expected actual
HEAD is now at 075f86b second
subdir/1
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4150-am/subdir/.git/
applying to an empty history
Applying: first
ok 57 - am into an unborn branch
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
test_tick &&
sed -e "s/second/second \\\n foo/" patch1 >patchnl &&
git am <patchnl >output.out 2>&1 &&
test_i18ngrep "^Applying: second \\\n foo$" output.out
HEAD is now at 075f86b second
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
075f86b second
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> 075f86b
HEAD is now at 6b2d93f first
Applying: second \n foo
ok 58 - am newline in subject
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout first &&
test_tick &&
git am -q <patch1 >output.out 2>&1 &&
test_must_be_empty output.out
HEAD is now at bee6b96 second \n foo
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
bee6b96 second \n foo
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> bee6b96
HEAD is now at 6b2d93f first
ok 59 - am -q is quiet
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
touch empty-file &&
test_tick &&
test_must_fail git am empty-file 2>actual &&
echo Patch format detection failed. >expected &&
test_i18ncmp expected actual
HEAD is now at 0b3df7d second
ok 60 - am empty-file does not infloop
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout HEAD^ &&
git am --message-id patch1.eml &&
test_path_is_missing .git/rebase-apply &&
git cat-file commit HEAD | tail -n1 >actual &&
grep Message-Id patch1.eml >expected &&
test_cmp expected actual
HEAD is now at 0b3df7d second
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
0b3df7d second
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> 0b3df7d
HEAD is now at 6b2d93f first
Applying: second
ok 61 - am --message-id really adds the message id
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout HEAD^ &&
test_config am.messageid true &&
git am patch1.eml &&
test_path_is_missing .git/rebase-apply &&
git cat-file commit HEAD | tail -n1 >actual &&
grep Message-Id patch1.eml >expected &&
test_cmp expected actual
HEAD is now at 9b1f34c second
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
9b1f34c second
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> 9b1f34c
HEAD is now at 6b2d93f first
Applying: second
ok 62 - am.messageid really adds the message id
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
git checkout HEAD^ &&
git am -s --message-id patch1.eml &&
test_path_is_missing .git/rebase-apply &&
git cat-file commit HEAD | tail -n2 | head -n1 >actual &&
grep Message-Id patch1.eml >expected &&
test_cmp expected actual
HEAD is now at 9b1f34c second
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
9b1f34c second
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> 9b1f34c
HEAD is now at 6b2d93f first
Applying: second
ok 63 - am --message-id -s signs off after the message id
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
# make patches one->two and two->three...
test_commit one file &&
test_commit two file &&
test_commit three file &&
git format-patch -2 --stdout >seq.patch &&
# and create a situation that conflicts...
git reset --hard one &&
test_commit other file &&
# enable rerere...
test_config rerere.enabled true &&
test_when_finished "rm -rf .git/rr-cache" &&
# ...and apply. Our resolution is to skip the first
# patch, and the rerere the second one.
test_must_fail git am -3 seq.patch &&
test_must_fail git am --skip &&
echo resolved >file &&
git add file &&
git am --resolved &&
# now apply again, and confirm that rerere engaged (we still
# expect failure from am because rerere does not auto-commit
# for us).
git reset --hard other &&
test_must_fail git am -3 seq.patch &&
test_must_fail git am --skip &&
echo resolved >expect &&
test_cmp expect file
HEAD is now at 58671be second
[detached HEAD c69a679] one
Author: Another Thor <a.thor@example.com>
1 file changed, 1 insertion(+), 2 deletions(-)
[detached HEAD 5302f0e] two
Author: Another Thor <a.thor@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD e05c5d4] three
Author: Another Thor <a.thor@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at c69a679 one
[detached HEAD 8ec6c25] other
Author: Another Thor <a.thor@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Applying: two
Using index info to reconstruct a base tree...
M file
Falling back to patching base and 3-way merge...
Merging:
8ec6c25 other
virtual two
found 1 common ancestor:
virtual 693a3de402bb23897ed5c931273e53c78eff0495
Auto-merging file
CONFLICT (content): Merge conflict in file
Recorded preimage for 'file'
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 two
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Applying: three
Using index info to reconstruct a base tree...
M file
Falling back to patching base and 3-way merge...
Merging:
8ec6c25 other
virtual three
found 1 common ancestor:
virtual aad8d5cef3915ab78b3227abaaac99b62db9eb54
Auto-merging file
CONFLICT (content): Merge conflict in file
Recorded preimage for 'file'
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0002 three
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Recorded resolution for 'file'.
Applying: three
HEAD is now at 8ec6c25 other
Applying: two
Using index info to reconstruct a base tree...
M file
Falling back to patching base and 3-way merge...
Merging:
8ec6c25 other
virtual two
found 1 common ancestor:
virtual 693a3de402bb23897ed5c931273e53c78eff0495
Auto-merging file
CONFLICT (content): Merge conflict in file
Recorded preimage for 'file'
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 two
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Applying: three
Using index info to reconstruct a base tree...
M file
Falling back to patching base and 3-way merge...
Merging:
8ec6c25 other
virtual three
found 1 common ancestor:
virtual aad8d5cef3915ab78b3227abaaac99b62db9eb54
Auto-merging file
CONFLICT (content): Merge conflict in file
Resolved 'file' using previous resolution.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0002 three
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 64 - am -3 works with rerere
expecting success:
rm -fr .git/rebase-apply &&
git reset --hard &&
echo signed >file &&
git add file &&
cat >msg <<-EOF &&
subject here
Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>
[jc: tweaked log message]
Signed-off-by: J C H <j@c.h>
EOF
git commit -F msg &&
git cat-file commit HEAD | sed -e 1,/^$/d >original &&
git format-patch --stdout -1 >patch &&
git reset --hard HEAD^ &&
git am -s patch &&
(
cat original &&
echo "Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
) >expect &&
git cat-file commit HEAD | sed -e 1,/^$/d >actual &&
test_cmp expect actual &&
cat >msg <<-\EOF &&
subject here
We make sure that there is a blank line between the log
message proper and Signed-off-by: line added.
EOF
git reset HEAD^ &&
git commit -F msg file &&
git cat-file commit HEAD | sed -e 1,/^$/d >original &&
git format-patch --stdout -1 >patch &&
git reset --hard HEAD^ &&
git am -s patch &&
(
cat original &&
echo &&
echo "Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
) >expect &&
git cat-file commit HEAD | sed -e 1,/^$/d >actual &&
test_cmp expect actual
HEAD is now at 8ec6c25 other
[detached HEAD aae1281] subject here
Author: Another Thor <a.thor@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at 8ec6c25 other
Applying: subject here
Unstaged changes after reset:
M file
[detached HEAD 683db8c] subject here
Author: Another Thor <a.thor@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at 8ec6c25 other
Applying: subject here
ok 65 - am -s unexpected trailer block
expecting success:
rm -fr .git/rebase-apply &&
git checkout -f first &&
echo mboxrd >>file &&
git add file &&
cat >msg <<-\INPUT_END &&
mboxrd should escape the body
From could trip up a loose mbox parser
>From extra escape for reversibility
INPUT_END
git commit -F msg &&
git format-patch --pretty=mboxrd --stdout -1 >mboxrd1 &&
grep "^>From could trip up a loose mbox parser" mboxrd1 &&
git checkout -f first &&
git am --patch-format=mboxrd mboxrd1 &&
git cat-file commit HEAD | tail -n4 >out &&
test_cmp msg out
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
f8e9fae subject here
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> f8e9fae
HEAD is now at 6b2d93f first
[detached HEAD dc8a2ae] mboxrd should escape the body
Author: Another Thor <a.thor@example.com>
1 file changed, 1 insertion(+)
>From could trip up a loose mbox parser
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
dc8a2ae mboxrd should escape the body
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> dc8a2ae
HEAD is now at 6b2d93f first
Applying: mboxrd should escape the body
ok 66 - am --patch-format=mboxrd handles mboxrd
expecting success:
FORTY="String that has a length of more than forty characters" &&
LONG="$FORTY $FORTY" &&
rm -fr .git/rebase-apply &&
git checkout -f first &&
echo one >> file &&
git commit -am "$LONG
Body test" --author="$LONG <long@example.com>" &&
git format-patch --stdout -1 >patch &&
# bump from, date, and subject down to in-body header
perl -lpe "
if (/^From:/) {
print \"From: x <x\@example.com>\";
print \"Date: Sat, 1 Jan 2000 00:00:00 +0000\";
print \"Subject: x\n\";
}
" patch >msg &&
git checkout HEAD^ &&
git am msg &&
# Ensure that the author and full message are present
git cat-file commit HEAD | grep "^author.*long@example.com" &&
git cat-file commit HEAD | grep "^$LONG$"
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
dc8a2ae mboxrd should escape the body
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> dc8a2ae
HEAD is now at 6b2d93f first
[detached HEAD c97171e] String that has a length of more than forty characters String that has a length of more than forty characters
Author: String that has a length of more than forty characters String that has a length of more than forty characters <long@example.com>
1 file changed, 1 insertion(+)
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
c97171e String that has a length of more than forty characters String that has a length of more than forty characters
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> c97171e
HEAD is now at 6b2d93f first
Applying: String that has a length of more than forty characters String that has a length of more than forty characters
author long@example.com <long@example.com> 1112912773 -0700
String that has a length of more than forty characters String that has a length of more than forty characters
ok 67 - am works with multi-line in-body headers
expecting success:
mkdir .git/rebase-apply &&
>.git/rebase-apply/last &&
>.git/rebase-apply/next &&
git rev-parse HEAD^ >.git/ORIG_HEAD &&
git rev-parse HEAD >expected &&
git am --quit &&
test_path_is_missing .git/rebase-apply &&
git rev-parse HEAD >actual &&
test_cmp expected actual
ok 68 - am --quit keeps HEAD where it is
# passed all 68 test(s)
1..68
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4203-mailmap.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4203-mailmap/.git/
expecting success:
cat >contacts <<-\EOF &&
A U Thor <author@example.com>
nick1 <bugs@company.xx>
EOF
echo one >one &&
git add one &&
test_tick &&
git commit -m initial &&
echo two >>one &&
git add one &&
test_tick &&
git commit --author "nick1 <bugs@company.xx>" -m second
[master (root-commit) 3a2fdcb] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one
[master e0f6049] second
Author: nick1 <bugs@company.xx>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
test_must_fail git check-mailmap
fatal: no contacts specified
ok 2 - check-mailmap no arguments
expecting success:
cat >expect <<-\EOF &&
A U Thor <author@example.com>
nick1 <bugs@company.xx>
EOF
git check-mailmap \
"A U Thor <author@example.com>" \
"nick1 <bugs@company.xx>" >actual &&
test_cmp expect actual
ok 3 - check-mailmap arguments
expecting success:
cat >expect <<-\EOF &&
A U Thor <author@example.com>
nick1 <bugs@company.xx>
EOF
git check-mailmap --stdin <contacts >actual &&
test_cmp expect actual
ok 4 - check-mailmap --stdin
expecting success:
cat >expect <<-\EOF &&
Internal Guy <bugs@company.xy>
EOF
cat <contacts >>expect &&
git check-mailmap --stdin "Internal Guy <bugs@company.xy>" \
<contacts >actual &&
test_cmp expect actual
ok 5 - check-mailmap --stdin arguments
expecting success:
test_must_fail git check-mailmap bogus
fatal: unable to parse contact: bogus
ok 6 - check-mailmap bogus contact
expecting success:
git shortlog HEAD >actual &&
test_cmp expect actual
ok 7 - No mailmap
expecting success:
echo "Repo Guy <author@example.com>" > .mailmap &&
git shortlog HEAD >actual &&
test_cmp expect actual
ok 8 - default .mailmap
expecting success:
mkdir -p internal_mailmap &&
echo "Internal Guy <bugs@company.xx>" > internal_mailmap/.mailmap &&
git config mailmap.file internal_mailmap/.mailmap &&
git shortlog HEAD >actual &&
test_cmp expect actual
ok 9 - mailmap.file set
expecting success:
echo "External Guy <author@example.com>" >> internal_mailmap/.mailmap &&
git config mailmap.file internal_mailmap/.mailmap &&
git shortlog HEAD >actual &&
test_cmp expect actual
ok 10 - mailmap.file override
expecting success:
rm internal_mailmap/.mailmap &&
rmdir internal_mailmap &&
git shortlog HEAD >actual &&
test_cmp expect actual
ok 11 - mailmap.file non-existent
expecting success:
mkdir -p internal_mailmap &&
echo "<bugs@company.xy> <bugs@company.xx>" >internal_mailmap/.mailmap &&
echo "Internal Guy <bugs@company.xx>" >>internal_mailmap/.mailmap &&
git shortlog HEAD >actual &&
test_cmp expect actual
ok 12 - name entry after email entry
expecting success:
mkdir -p internal_mailmap &&
echo "<bugs@company.xy> <bugs@company.xx>" >internal_mailmap/.mailmap &&
echo "Internal Guy <BUGS@Company.xx>" >>internal_mailmap/.mailmap &&
git shortlog HEAD >actual &&
test_cmp expect actual
ok 13 - name entry after email entry, case-insensitive
expecting success:
rm -f .mailmap internal_mailmap/.mailmap &&
git shortlog HEAD >actual &&
test_cmp expect actual
ok 14 - No mailmap files, but configured
expecting success:
git checkout -b map &&
test_when_finished "git checkout master" &&
cat >just-bugs <<-\EOF &&
Blob Guy <bugs@company.xx>
EOF
cat >both <<-\EOF &&
Blob Guy <author@example.com>
Blob Guy <bugs@company.xx>
EOF
printf "Tricky Guy <author@example.com>" >no-newline &&
git add just-bugs both no-newline &&
git commit -m "my mailmaps" &&
echo "Repo Guy <author@example.com>" >.mailmap &&
echo "Internal Guy <author@example.com>" >internal.map
Switched to a new branch 'map'
[map d53f9b1] my mailmaps
Author: A U Thor <author@example.com>
3 files changed, 4 insertions(+)
create mode 100644 both
create mode 100644 just-bugs
create mode 100644 no-newline
Switched to branch 'master'
ok 15 - setup mailmap blob tests
expecting success:
cat >expect <<-\EOF &&
Blob Guy (1):
second
Repo Guy (1):
initial
EOF
git -c mailmap.blob=map:just-bugs shortlog HEAD >actual &&
test_cmp expect actual
ok 16 - mailmap.blob set
expecting success:
cat >expect <<-\EOF &&
Blob Guy (2):
initial
second
EOF
git -c mailmap.blob=map:both shortlog HEAD >actual &&
test_cmp expect actual
ok 17 - mailmap.blob overrides .mailmap
expecting success:
cat >expect <<-\EOF &&
Blob Guy (1):
second
Internal Guy (1):
initial
EOF
git \
-c mailmap.blob=map:both \
-c mailmap.file=internal.map \
shortlog HEAD >actual &&
test_cmp expect actual
ok 18 - mailmap.file overrides mailmap.blob
expecting success:
cat >expect <<-\EOF &&
Repo Guy (1):
initial
nick1 (1):
second
EOF
git -c mailmap.blob=map:nonexistent shortlog HEAD >actual &&
test_cmp expect actual
ok 19 - mailmap.blob can be missing
expecting success:
git init non-bare &&
(
cd non-bare &&
test_commit one .mailmap "Fake Name <author@example.com>" &&
echo " 1 Fake Name" >expect &&
git shortlog -ns HEAD >actual &&
test_cmp expect actual &&
rm .mailmap &&
echo " 1 A U Thor" >expect &&
git shortlog -ns HEAD >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4203-mailmap/non-bare/.git/
[master (root-commit) c736a92] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 .mailmap
ok 20 - mailmap.blob defaults to off in non-bare repo
expecting success:
git clone --bare non-bare bare &&
(
cd bare &&
echo " 1 Fake Name" >expect &&
git shortlog -ns HEAD >actual &&
test_cmp expect actual
)
Cloning into bare repository 'bare'...
done.
ok 21 - mailmap.blob defaults to HEAD:.mailmap in bare repo
expecting success:
cat >expect <<-\EOF &&
Tricky Guy (1):
initial
nick1 (1):
second
EOF
git -c mailmap.blob=map:no-newline shortlog HEAD >actual &&
test_cmp expect actual
ok 22 - mailmap.blob can handle blobs without trailing newline
expecting success:
rm -f .mailmap
ok 23 - cleanup after mailmap.blob tests
expecting success:
echo " 1 A <author@example.com>" >expect &&
echo " 1 nick1 <bugs@company.xx>" >>expect &&
echo "A <author@example.com>" >.mailmap &&
test_when_finished "rm .mailmap" &&
git shortlog -es HEAD >actual &&
test_cmp expect actual
ok 24 - single-character name
expecting success:
echo " 1 A U Thor <AUTHOR@example.com>" >expect &&
echo " 1 nick1 <bugs@company.xx>" >>expect &&
echo "<AUTHOR@example.com> <author@example.com>" >.mailmap &&
test_when_finished "rm .mailmap" &&
git shortlog -es HEAD >actual &&
test_cmp expect actual
ok 25 - preserve canonical email case
expecting success:
echo three >>one &&
git add one &&
test_tick &&
git commit --author "nick2 <bugs@company.xx>" -m third &&
echo four >>one &&
git add one &&
test_tick &&
git commit --author "nick2 <nick2@company.xx>" -m fourth &&
echo five >>one &&
git add one &&
test_tick &&
git commit --author "santa <me@company.xx>" -m fifth &&
echo six >>one &&
git add one &&
test_tick &&
git commit --author "claus <me@company.xx>" -m sixth &&
echo seven >>one &&
git add one &&
test_tick &&
git commit --author "CTO <cto@coompany.xx>" -m seventh &&
mkdir -p internal_mailmap &&
echo "Committed <committer@example.com>" > internal_mailmap/.mailmap &&
echo "<cto@company.xx> <cto@coompany.xx>" >> internal_mailmap/.mailmap &&
echo "Some Dude <some@dude.xx> nick1 <bugs@company.xx>" >> internal_mailmap/.mailmap &&
echo "Other Author <other@author.xx> nick2 <bugs@company.xx>" >> internal_mailmap/.mailmap &&
echo "Other Author <other@author.xx> <nick2@company.xx>" >> internal_mailmap/.mailmap &&
echo "Santa Claus <santa.claus@northpole.xx> <me@company.xx>" >> internal_mailmap/.mailmap &&
echo "Santa Claus <santa.claus@northpole.xx> <me@company.xx>" >> internal_mailmap/.mailmap &&
git shortlog -e HEAD >actual &&
test_cmp expect actual
[master 4db1a3d] third
Author: nick2 <bugs@company.xx>
1 file changed, 1 insertion(+)
[master e371838] fourth
Author: nick2 <nick2@company.xx>
1 file changed, 1 insertion(+)
[master 25e4bf3] fifth
Author: santa <me@company.xx>
1 file changed, 1 insertion(+)
[master 17c3971] sixth
Author: claus <me@company.xx>
1 file changed, 1 insertion(+)
[master f399f22] seventh
Author: CTO <cto@coompany.xx>
1 file changed, 1 insertion(+)
ok 26 - Shortlog output (complex mapping)
expecting success:
git log --pretty=format:"Author %an <%ae> maps to %aN <%aE>%nCommitter %cn <%ce> maps to %cN <%cE>%n" >actual &&
test_cmp expect actual
ok 27 - Log output (complex mapping)
expecting success:
git log --use-mailmap | grep Author >actual &&
test_cmp expect actual
ok 28 - Log output with --use-mailmap
expecting success:
git -c log.mailmap=True log | grep Author >actual &&
test_cmp expect actual
ok 29 - Log output with log.mailmap
expecting success:
cat >expect <<-\EOF &&
Author: CTO <cto@coompany.xx>
Author: claus <me@company.xx>
Author: santa <me@company.xx>
Author: nick2 <nick2@company.xx>
Author: nick2 <bugs@company.xx>
Author: nick1 <bugs@company.xx>
Author: A U Thor <author@example.com>
EOF
git -c log.mailmap=False log | grep Author > actual &&
test_cmp expect actual
ok 30 - log.mailmap=false disables mailmap
expecting success:
cat >expect <<-\EOF &&
Author: CTO <cto@coompany.xx>
Author: claus <me@company.xx>
Author: santa <me@company.xx>
Author: nick2 <nick2@company.xx>
Author: nick2 <bugs@company.xx>
Author: nick1 <bugs@company.xx>
Author: A U Thor <author@example.com>
EOF
git log --no-use-mailmap | grep Author > actual &&
test_cmp expect actual
ok 31 - --no-use-mailmap disables mailmap
expecting success:
git log --use-mailmap --author Santa | grep Author >actual &&
test_cmp expect actual
ok 32 - Grep author with --use-mailmap
expecting success:
git -c log.mailmap=True log --author Santa | grep Author >actual &&
test_cmp expect actual
ok 33 - Grep author with log.mailmap
expecting success:
git log --author Santa | grep Author >actual &&
test_cmp expect actual
ok 34 - log.mailmap is true by default these days
expecting success:
git log --use-mailmap --author "<cto@coompany.xx>" >actual &&
test_must_be_empty actual
ok 35 - Only grep replaced author with --use-mailmap
expecting success:
git blame one >actual &&
fuzz_blame actual >actual.fuzz &&
test_cmp expect actual.fuzz
ok 36 - Blame output (complex mapping)
expecting success:
test_must_fail git commit --author "nick" --allow-empty -meight &&
git commit --author "Some Dude" --allow-empty -meight &&
git show --pretty=format:"%an <%ae>%n" >actual &&
test_cmp expect actual
fatal: --author 'nick' is not 'Name <email>' and matches no existing author
[master 41e4fcf] eight
Author: Some Dude <some@dude.xx>
ok 37 - commit --author honors mailmap
# passed all 37 test(s)
1..37
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4204-patch-id.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4204-patch-id/.git/
expecting success:
as="a a a a a a a a" && # eight a
test_write_lines $as >foo &&
test_write_lines $as >bar &&
git add foo bar &&
git commit -a -m initial &&
test_write_lines $as b >foo &&
test_write_lines $as b >bar &&
git commit -a -m first &&
git checkout -b same master &&
git commit --amend -m same-msg &&
git checkout -b notsame master &&
echo c >foo &&
echo c >bar &&
git commit --amend -a -m notsame-msg &&
test_write_lines bar foo >bar-then-foo &&
test_write_lines foo bar >foo-then-bar
[master (root-commit) bded825] initial
Author: A U Thor <author@example.com>
2 files changed, 16 insertions(+)
create mode 100644 bar
create mode 100644 foo
[master 4ae4dbd] first
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
Switched to a new branch 'same'
[same 2329b20] same-msg
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:29:33 2019 +0000
2 files changed, 2 insertions(+)
Switched to a new branch 'notsame'
[notsame b964128] notsame-msg
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:29:33 2019 +0000
2 files changed, 2 insertions(+), 16 deletions(-)
ok 1 - setup
expecting success:
git log -p -1 | git patch-id >output &&
grep "^[a-f0-9]\{40\} $(git rev-parse HEAD)$" output
f107563c3b906af306765d78fce3e3a7e121cb5d b964128b370f16ef1ae3708c06efcacb85fce514
ok 2 - patch-id output is well-formed
expecting success:
get_patch_id master &&
get_patch_id same &&
test_cmp patch-id_master patch-id_same
ok 3 - patch-id detects equality
expecting success:
get_patch_id master &&
get_patch_id notsame &&
! test_cmp patch-id_master patch-id_notsame
--- patch-id_master 2019-08-14 07:29:34.200700301 +0000
+++ patch-id_notsame 2019-08-14 07:29:34.224700555 +0000
@@ -1 +1 @@
-5d64663409e35f10b786d5942856240338437436
+f107563c3b906af306765d78fce3e3a7e121cb5d
ok 4 - patch-id detects inequality
expecting success:
get_patch_id master &&
git checkout same &&
git format-patch -1 --stdout | calc_patch_id same &&
test_cmp patch-id_master patch-id_same &&
set $(git format-patch -1 --stdout | git patch-id) &&
test "$2" = $(git rev-parse HEAD)
Switched to branch 'same'
ok 5 - patch-id supports git-format-patch output
expecting success:
get_patch_id master &&
git checkout same &&
git format-patch -1 --stdout | sed "s/ \$//" | calc_patch_id same &&
test_cmp patch-id_master patch-id_same
Already on 'same'
ok 6 - whitespace is irrelevant in footer
expecting success:
test_patch_id_file_order irrelevant --stable --stable
Already on 'same'
ok 7 - file order is irrelevant with --stable
expecting success:
test_patch_id_file_order relevant --unstable --unstable
Already on 'same'
--- patch-id_order---unstable-relevant 2019-08-14 07:29:34.680705376 +0000
+++ patch-id_ordered-order---unstable-relevant 2019-08-14 07:29:34.724705841 +0000
@@ -1 +1 @@
-5d64663409e35f10b786d5942856240338437436
+cdb26c63dc1ab08a93181ff3446560b20801f812
ok 8 - file order is relevant with --unstable
expecting success:
test_patch_id relevant default
Already on 'same'
--- patch-id_order-default-relevant 2019-08-14 07:29:34.784706475 +0000
+++ patch-id_ordered-order-default-relevant 2019-08-14 07:29:34.808706729 +0000
@@ -1 +1 @@
-5d64663409e35f10b786d5942856240338437436
+cdb26c63dc1ab08a93181ff3446560b20801f812
ok 9 - default is unstable
expecting success:
test_config patchid.stable true &&
test_patch_id irrelevant patchid.stable=true
Already on 'same'
ok 10 - patchid.stable = true is stable
expecting success:
test_config patchid.stable false &&
test_patch_id relevant patchid.stable=false
Already on 'same'
--- patch-id_order-patchid.stable=false-relevant 2019-08-14 07:29:34.992708674 +0000
+++ patch-id_ordered-order-patchid.stable=false-relevant 2019-08-14 07:29:35.040709183 +0000
@@ -1 +1 @@
-5d64663409e35f10b786d5942856240338437436
+cdb26c63dc1ab08a93181ff3446560b20801f812
ok 11 - patchid.stable = false is unstable
expecting success:
test_config patchid.stable true &&
test_patch_id relevant patchid.stable=true--unstable --unstable
Already on 'same'
--- patch-id_order-patchid.stable=true--unstable-relevant 2019-08-14 07:29:35.108709904 +0000
+++ patch-id_ordered-order-patchid.stable=true--unstable-relevant 2019-08-14 07:29:35.160710455 +0000
@@ -1 +1 @@
-5d64663409e35f10b786d5942856240338437436
+cdb26c63dc1ab08a93181ff3446560b20801f812
ok 12 - --unstable overrides patchid.stable = true
expecting success:
test_config patchid.stable false &&
test_patch_id irrelevant patchid.stable=false--stable --stable
Already on 'same'
ok 13 - --stable overrides patchid.stable = false
expecting success:
get_patch_id master &&
git checkout same &&
git format-patch -1 --attach --stdout | calc_patch_id same &&
test_cmp patch-id_master patch-id_same
Already on 'same'
ok 14 - patch-id supports git-format-patch MIME output
expecting success:
test_config patchid.stable true &&
mkdir subdir &&
# copy these because test_patch_id() looks for them in
# the current directory
cp bar-then-foo foo-then-bar subdir &&
(
cd subdir &&
test_patch_id irrelevant patchid.stable=true
)
Already on 'same'
ok 15 - patch-id respects config from subdir
expecting success:
cat nonl | calc_patch_id nonl &&
cat withnl | calc_patch_id withnl &&
test_cmp patch-id_nonl patch-id_withnl
ok 16 - patch-id handles no-nl-at-eof markers
# passed all 16 test(s)
1..16
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4206-log-follow-harder-copies.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4206-log-follow-harder-copies/.git/
expecting success: git add path0 &&
git commit -m "Add path0"
[master (root-commit) f35c075] Add path0
Author: A U Thor <author@example.com>
1 file changed, 4 insertions(+)
create mode 100644 path0
ok 1 - add a file path0 and commit.
expecting success: git add path0 &&
git commit -m "Change path0"
[master 25f4870] Change path0
Author: A U Thor <author@example.com>
1 file changed, 3 insertions(+), 3 deletions(-)
ok 2 - Change path0.
expecting success: git add path1 &&
git commit -m "Copy path1 from path0"
[master d42e1cf] Copy path1 from path0
Author: A U Thor <author@example.com>
1 file changed, 4 insertions(+)
create mode 100644 path1
ok 3 - copy path0 to path1.
expecting success: git log --follow --name-status --pretty="format:%s" path1 > current
ok 4 - find the copy path0 -> path1 harder
expecting success: compare_diff_patch current expected
ok 5 - validate the output.
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4207-log-decoration-colors.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4207-log-decoration-colors/.git/
expecting success:
git config diff.color.commit yellow &&
git config color.decorate.branch green &&
git config color.decorate.remoteBranch red &&
git config color.decorate.tag "reverse bold yellow" &&
git config color.decorate.stash magenta &&
git config color.decorate.HEAD cyan &&
c_reset="<RESET>" &&
c_commit="<YELLOW>" &&
c_branch="<GREEN>" &&
c_remoteBranch="<RED>" &&
c_tag="<BOLD;REVERSE;YELLOW>" &&
c_stash="<MAGENTA>" &&
c_HEAD="<CYAN>" &&
test_commit A &&
git clone . other &&
(
cd other &&
test_commit A1
) &&
git remote add -f other ./other &&
test_commit B &&
git tag v1.0 &&
echo >>A.t &&
git stash save Changes to A.t
[master (root-commit) 0ddfaf1] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
Cloning into 'other'...
done.
[master ca6ed14] A1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A1.t
Updating other
From ./other
* [new branch] master -> other/master
* [new tag] A1 -> A1
[master d9df450] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B.t
Saved working directory and index state On master: Changes to A.t
ok 1 - setup
expecting success:
git log --first-parent --abbrev=10 --all --decorate --oneline --color=always |
sed "s/[0-9a-f]\{10,10\}/COMMIT_ID/" |
test_decode_color >out &&
test_cmp expected out
ok 2 - Commit Decorations Colored Correctly
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4208-log-magic-pathspec.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4208-log-magic-pathspec/.git/
expecting success:
test_commit initial &&
test_tick &&
git commit --allow-empty -m empty &&
mkdir sub
[master (root-commit) 24b24cf] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
[master 41d179c] empty
Author: A U Thor <author@example.com>
ok 1 - setup
expecting success:
git log :/
commit 24b24cf8a829f5b8c30dfc018b0a459a2ccaf380
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
initial
ok 2 - "git log :/" should not be ambiguous
expecting success:
: >a &&
test_must_fail git log :/a 2>error &&
test_i18ngrep ambiguous error
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: ambiguous argument ':/a': both revision and filename
ok 3 - "git log :/a" should be ambiguous (applied both rev and worktree)
expecting success:
git log :/a --
commit 24b24cf8a829f5b8c30dfc018b0a459a2ccaf380
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
initial
ok 4 - "git log :/a -- " should not be ambiguous
expecting success:
test_when_finished "git checkout master" &&
git checkout --detach &&
# Must manually call `test_tick` instead of using `test_commit`,
# because the latter additionally creates a tag, which would make
# the commit reachable not only via HEAD.
test_tick &&
git commit --allow-empty -m detached &&
test_tick &&
git commit --allow-empty -m something-else &&
git log :/detached --
HEAD is now at 41d179c empty
[detached HEAD 29f803f] detached
Author: A U Thor <author@example.com>
[detached HEAD 1c7309e] something-else
Author: A U Thor <author@example.com>
commit 29f803fa5dd3286073a333650848a30b4d2166d5
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
detached
commit 41d179cf92d6e064ff558d58ffa668d1ed939109
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
empty
commit 24b24cf8a829f5b8c30dfc018b0a459a2ccaf380
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
initial
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
1c7309e something-else
29f803f detached
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> 1c7309e
Switched to branch 'master'
ok 5 - "git log :/detached -- " should find a commit only in HEAD
expecting success:
test_must_fail git log :/detached --
fatal: bad revision ':/detached'
ok 6 - "git log :/detached -- " should not find an orphaned commit
expecting success:
git worktree add other-tree HEAD &&
git -C other-tree checkout --detach &&
test_tick &&
git -C other-tree commit --allow-empty -m other-detached &&
git -C other-tree log :/other-detached -- &&
test_must_fail git log :/other-detached --
Preparing worktree (detached HEAD 41d179c)
HEAD is now at 41d179c empty
HEAD is now at 41d179c empty
[detached HEAD 690db08] other-detached
Author: A U Thor <author@example.com>
commit 690db086fe427145ef8254ddd95f5a291f5ad2dd
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
other-detached
commit 41d179cf92d6e064ff558d58ffa668d1ed939109
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
empty
commit 24b24cf8a829f5b8c30dfc018b0a459a2ccaf380
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
initial
fatal: bad revision ':/other-detached'
ok 7 - "git log :/detached -- " should find HEAD only of own worktree
expecting success:
git log -- :/a
ok 8 - "git log -- :/a" should not be ambiguous
expecting success:
git log :/in
commit 24b24cf8a829f5b8c30dfc018b0a459a2ccaf380
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
initial
ok 9 - "git log :/in" should not be ambiguous
expecting success:
test_must_fail git log : 2>error &&
test_i18ngrep ambiguous error
fatal: ambiguous argument ':': unknown revision or path not in the working tree.
ok 10 - "git log :" should be ambiguous
expecting success:
git log -- :
commit 24b24cf8a829f5b8c30dfc018b0a459a2ccaf380
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
initial
ok 11 - git log -- :
expecting success:
initial=$(git rev-parse --short HEAD^) &&
cat >expected <<-EOF &&
$initial initial
EOF
(cd sub && git log --oneline HEAD -- :/ >../actual) &&
test_cmp expected actual
ok 12 - git log HEAD -- :/
expecting success:
git log :^sub
commit 24b24cf8a829f5b8c30dfc018b0a459a2ccaf380
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
initial
ok 13 - "git log :^sub" is not ambiguous
expecting success:
test_must_fail git log :^does-not-exist
fatal: ambiguous argument ':^does-not-exist': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ok 14 - "git log :^does-not-exist" does not match anything
expecting success:
git log :!sub &&
test_must_fail git log :!does-not-exist
commit 24b24cf8a829f5b8c30dfc018b0a459a2ccaf380
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
initial
fatal: ambiguous argument ':!does-not-exist': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ok 15 - "git log :!" behaves the same as :^
expecting success:
git log ":(exclude)sub"
commit 24b24cf8a829f5b8c30dfc018b0a459a2ccaf380
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
initial
ok 16 - "git log :(exclude)sub" is not ambiguous
expecting success:
test_must_fail git log ":(exclude)sub" --
fatal: bad revision ':(exclude)sub'
ok 17 - "git log :(exclude)sub --" must resolve as an object
expecting success:
test_must_fail git log ":(unknown-magic)" 2>error &&
test_i18ngrep pathspec.magic error
fatal: Invalid pathspec magic 'unknown-magic' in ':(unknown-magic)'
ok 18 - "git log :(unknown-magic) complains of bogus magic
expecting success:
git reset --hard &&
>a &&
git add a &&
git commit -m "add an empty a" --allow-empty &&
echo 1 >a &&
git commit -a -m "update a to 1" &&
git checkout HEAD^ &&
echo 2 >a &&
git commit -a -m "update a to 2" &&
test_must_fail git merge master &&
git add a &&
git log --merge -- a
HEAD is now at 41d179c empty
[master 520c03e] add an empty a
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a
[master 35b719c] update a to 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 520c03e add an empty a
[detached HEAD 61d8fe9] update a to 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Merging:
61d8fe9 update a to 2
virtual master
found 1 common ancestor:
520c03e add an empty a
Auto-merging a
CONFLICT (content): Merge conflict in a
Automatic merge failed; fix conflicts and then commit the result.
commit 61d8fe935ee13c992ada18f68c7d4b175f28ae77
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
update a to 2
commit 35b719c5373bb94b370829ac90035e2cd80daaba
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
update a to 1
ok 19 - command line pathspec parsing for "git log"
expecting success:
test_when_finished "rm -rf repo submodule" &&
git init submodule &&
test_commit -C submodule initial &&
git init repo &&
>"repo/[bracket]" &&
git -C repo add "[bracket]" &&
test_tick &&
git -C repo commit -m bracket &&
git -C repo rev-list HEAD -- "[bracket]" >expect &&
git -C repo submodule add ../submodule &&
test_tick &&
git -C repo commit -m submodule &&
git -C repo rev-list HEAD -- "[bracket]" >actual &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4208-log-magic-pathspec/submodule/.git/
[master (root-commit) 31243c6] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4208-log-magic-pathspec/repo/.git/
[master (root-commit) fcad989] bracket
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 [bracket]
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4208-log-magic-pathspec/repo/submodule'...
done.
[master 2614379] submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 submodule
ok 20 - tree_entry_interesting does not match past submodule boundaries
# passed all 20 test(s)
1..20
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4202-log.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4202-log/.git/
expecting success:
echo one >one &&
git add one &&
test_tick &&
git commit -m initial &&
echo ichi >one &&
git add one &&
test_tick &&
git commit -m second &&
git mv one ichi &&
test_tick &&
git commit -m third &&
cp ichi ein &&
git add ein &&
test_tick &&
git commit -m fourth &&
mkdir a &&
echo ni >a/two &&
git add a/two &&
test_tick &&
git commit -m fifth &&
git rm a/two &&
test_tick &&
git commit -m sixth
[master (root-commit) 3a2fdcb] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one
[master f7dab8e] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 2fbe8c0] third
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename one => ichi (100%)
[master 5d31159] fourth
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 ein
[master 394ef78] fifth
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a/two
rm 'a/two'
[master 804a787] sixth
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 a/two
ok 1 - setup
expecting success:
git log --pretty="format:%s" > actual &&
test_cmp expect actual
ok 2 - pretty
expecting success:
git log --pretty="tformat:%s" > actual &&
test_cmp expect actual
ok 3 - pretty (tformat)
expecting success:
git log --pretty="%s" > actual &&
test_cmp expect actual
ok 4 - pretty (shortcut)
expecting success:
git log --format="%s" > actual &&
test_cmp expect actual
ok 5 - format
expecting success:
git log -2 --format="%w(11,1,2)This is the %s commit." > actual &&
test_cmp expect actual
ok 6 - format %w(11,1,2)
expecting success:
git log -2 --format="%w(,1,2)This is%nthe %s%ncommit." > actual &&
test_cmp expect actual
ok 7 - format %w(,1,2)
expecting success:
git log --oneline > actual &&
test_cmp expect actual
ok 8 - oneline
expecting success:
git log --no-renames --pretty="format:%s" --diff-filter=A HEAD > actual &&
git log --no-renames --pretty="format:%s" --diff-filter A HEAD > actual-separate &&
printf "fifth\nfourth\nthird\ninitial" > expect &&
test_cmp expect actual &&
test_cmp expect actual-separate
ok 9 - diff-filter=A
expecting success:
actual=$(git log --pretty="format:%s" --diff-filter=M HEAD) &&
expect=$(echo second) &&
verbose test "$actual" = "$expect"
ok 10 - diff-filter=M
expecting success:
actual=$(git log --no-renames --pretty="format:%s" --diff-filter=D HEAD) &&
expect=$(echo sixth ; echo third) &&
verbose test "$actual" = "$expect"
ok 11 - diff-filter=D
expecting success:
actual=$(git log -M --pretty="format:%s" --diff-filter=R HEAD) &&
expect=$(echo third) &&
verbose test "$actual" = "$expect"
ok 12 - diff-filter=R
expecting success:
actual=$(git log -C -C --pretty="format:%s" --diff-filter=C HEAD) &&
expect=$(echo fourth) &&
verbose test "$actual" = "$expect"
ok 13 - diff-filter=C
expecting success:
actual=$(git log --follow --pretty="format:%s" ichi) &&
expect=$(echo third ; echo second ; echo initial) &&
verbose test "$actual" = "$expect"
ok 14 - git log --follow
expecting success:
test_config log.follow true &&
actual=$(git log --pretty="format:%s" ichi) &&
expect=$(echo third ; echo second ; echo initial) &&
verbose test "$actual" = "$expect"
ok 15 - git config log.follow works like --follow
expecting success:
test_config log.follow true &&
git log --pretty="format:%s" ichi ein
fourth
thirdok 16 - git config log.follow does not die with multiple paths
expecting success:
test_config log.follow true &&
git log --
commit 804a7879c6cac637c9d34d1608e3e54867d90b7e
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:18:13 2005 -0700
sixth
commit 394ef780a000df496e0a8fdd648963c3f9d96f56
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
fifth
commit 5d311594784eefe7b43496741766fe058f1c91a1
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
fourth
commit 2fbe8c09c8e84c2346ba2ac744cb09a926773855
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
third
commit f7dab8eda217fc1e06315e7c91b6bd7c2a56363a
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
second
commit 3a2fdcbc365f1f169c2d433dbb277d88b412d8c9
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
initial
ok 17 - git config log.follow does not die with no paths
expecting success:
test_config log.follow true &&
actual=$(git log --no-follow --pretty="format:%s" ichi) &&
expect="third" &&
verbose test "$actual" = "$expect"
ok 18 - git config log.follow is overridden by --no-follow
expecting success:
git log --no-walk --oneline 5d31159 804a787 394ef78 > actual &&
test_cmp expect actual
ok 19 - git log --no-walk <commits> sorts by commit time
expecting success:
git log --no-walk=sorted --oneline 5d31159 804a787 394ef78 > actual &&
test_cmp expect actual
ok 20 - git log --no-walk=sorted <commits> sorts by commit time
expecting success:
git log --line-prefix="=== " --no-walk --oneline 5d31159 804a787 394ef78 > actual &&
test_cmp expect actual
ok 21 - git log --line-prefix="=== " --no-walk <commits> sorts by commit time
expecting success:
git log --no-walk=unsorted --oneline 5d31159 804a787 394ef78 > actual &&
test_cmp expect actual
ok 22 - git log --no-walk=unsorted <commits> leaves list of commits as given
expecting success:
git show --oneline -s 5d31159 804a787 394ef78 > actual &&
test_cmp expect actual
ok 23 - git show <commits> leaves list of commits as given
expecting success:
echo case >one &&
test_tick &&
git add one &&
git commit -a -m Second
[master e9e4904] Second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one
ok 24 - setup case sensitivity tests
expecting success:
echo second >expect &&
git log -1 --pretty="tformat:%s" --grep=sec >actual &&
test_cmp expect actual
ok 25 - log --grep
expecting success:
# Fixed
git -c grep.patternType=fixed log --pretty="tformat:%s" --invert-grep --grep=th --grep=Sec >actual &&
test_cmp expect actual &&
# POSIX basic
git -c grep.patternType=basic log --pretty="tformat:%s" --invert-grep --grep=t[h] --grep=S[e]c >actual &&
test_cmp expect actual &&
# POSIX extended
git -c grep.patternType=basic log --pretty="tformat:%s" --invert-grep --grep=t[h] --grep=S[e]c >actual &&
test_cmp expect actual &&
# PCRE
if test_have_prereq PCRE
then
git -c grep.patternType=perl log --pretty="tformat:%s" --invert-grep --grep=t[h] --grep=S[e]c >actual &&
test_cmp expect actual
fi
ok 26 - log --invert-grep --grep
expecting success:
echo initial >expect &&
# Fixed
git -c grep.patternType=fixed log --pretty="tformat:%s" --invert-grep -i --grep=th --grep=Sec >actual &&
test_cmp expect actual &&
# POSIX basic
git -c grep.patternType=basic log --pretty="tformat:%s" --invert-grep -i --grep=t[h] --grep=S[e]c >actual &&
test_cmp expect actual &&
# POSIX extended
git -c grep.patternType=extended log --pretty="tformat:%s" --invert-grep -i --grep=t[h] --grep=S[e]c >actual &&
test_cmp expect actual &&
# PCRE
if test_have_prereq PCRE
then
git -c grep.patternType=perl log --pretty="tformat:%s" --invert-grep -i --grep=t[h] --grep=S[e]c >actual &&
test_cmp expect actual
fi
ok 27 - log --invert-grep --grep -i
expecting success:
echo second >expect &&
git log -1 --pretty="tformat:%s" --grep sec >actual &&
test_cmp expect actual &&
test_must_fail git log -1 --pretty="tformat:%s" --grep
fatal: Option '--grep' requires a value
ok 28 - log --grep option parsing
expecting success:
echo Second >expect &&
git log -1 --pretty="tformat:%s" -i --grep=sec >actual &&
test_cmp expect actual
ok 29 - log -i --grep
expecting success:
echo Second >expect &&
# Fixed
git log -1 --pretty="tformat:%s" --grep=sec -i >actual &&
test_cmp expect actual &&
# POSIX basic
git -c grep.patternType=basic log -1 --pretty="tformat:%s" --grep=s[e]c -i >actual &&
test_cmp expect actual &&
# POSIX extended
git -c grep.patternType=extended log -1 --pretty="tformat:%s" --grep=s[e]c -i >actual &&
test_cmp expect actual &&
# PCRE
if test_have_prereq PCRE
then
git -c grep.patternType=perl log -1 --pretty="tformat:%s" --grep=s[e]c -i >actual &&
test_cmp expect actual
fi
ok 30 - log --grep -i
expecting success:
echo second >expect &&
# basic would need \(s\) to do the same
git log -1 --pretty="tformat:%s" -F -E --grep="(s).c.nd" >actual &&
test_cmp expect actual
ok 31 - log -F -E --grep=<ere> uses ere
expecting success:
test_when_finished "rm -rf num_commits" &&
git init num_commits &&
(
cd num_commits &&
test_commit 1d &&
test_commit 2e
) &&
# In PCRE \d in [\d] is like saying "0-9", and matches the 2
# in 2e...
echo 2e >expect &&
git -C num_commits log -1 --pretty="tformat:%s" -F -E --perl-regexp --grep="[\d]" >actual &&
test_cmp expect actual &&
# ...in POSIX basic and extended it is the same as [d],
# i.e. "d", which matches 1d, but does not match 2e.
echo 1d >expect &&
git -C num_commits log -1 --pretty="tformat:%s" -F -E --grep="[\d]" >actual &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4202-log/num_commits/.git/
[master (root-commit) 5550d7b] 1d
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1d.t
[master efc81b0] 2e
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2e.t
ok 32 - log -F -E --perl-regexp --grep=<pcre> uses PCRE
expecting success:
git -c grep.patterntype=fixed \
log -1 --pretty=tformat:%s --grep=s.c.nd >actual &&
test_must_be_empty actual
ok 33 - log with grep.patternType configuration
expecting success:
echo second >expect &&
git -c grep.patterntype=fixed \
log -1 --pretty=tformat:%s --basic-regexp --grep=s.c.nd >actual &&
test_cmp expect actual
ok 34 - log with grep.patternType configuration and command line
checking prerequisite: FAIL_PREREQS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
git env--helper --type=bool --default=0 --exit-code GIT_TEST_FAIL_PREREQS
)
prerequisite FAIL_PREREQS not satisfied
expecting success:
git init pattern-type &&
(
cd pattern-type &&
test_commit 1 file A &&
# The tagname is overridden here because creating a
# tag called "(1|2)" as test_commit would otherwise
# implicitly do would fail on e.g. MINGW.
test_commit "(1|2)" file B 2 &&
echo "(1|2)" >expect.fixed &&
cp expect.fixed expect.basic &&
cp expect.fixed expect.extended &&
cp expect.fixed expect.perl &&
# A strcmp-like match with fixed.
git -c grep.patternType=fixed log --pretty=tformat:%s \
--grep="(1|2)" >actual.fixed &&
# POSIX basic matches (, | and ) literally.
git -c grep.patternType=basic log --pretty=tformat:%s \
--grep="(.|.)" >actual.basic &&
# POSIX extended needs to have | escaped to match it
# literally, whereas under basic this is the same as
# (|2), i.e. it would also match "1". This test checks
# for extended by asserting that it is not matching
# what basic would match.
git -c grep.patternType=extended log --pretty=tformat:%s \
--grep="\|2" >actual.extended &&
if test_have_prereq PCRE
then
# Only PCRE would match [\d]\| with only
# "(1|2)" due to [\d]. POSIX basic would match
# both it and "1" since similarly to the
# extended match above it is the same as
# \([\d]\|\). POSIX extended would
# match neither.
git -c grep.patternType=perl log --pretty=tformat:%s \
--grep="[\d]\|" >actual.perl &&
test_cmp expect.perl actual.perl
fi &&
test_cmp expect.fixed actual.fixed &&
test_cmp expect.basic actual.basic &&
test_cmp expect.extended actual.extended &&
git log --pretty=tformat:%s -F \
--grep="(1|2)" >actual.fixed.short-arg &&
git log --pretty=tformat:%s -E \
--grep="\|2" >actual.extended.short-arg &&
if test_have_prereq PCRE
then
git log --pretty=tformat:%s -P \
--grep="[\d]\|" >actual.perl.short-arg
else
test_must_fail git log -P \
--grep="[\d]\|"
fi &&
test_cmp expect.fixed actual.fixed.short-arg &&
test_cmp expect.extended actual.extended.short-arg &&
if test_have_prereq PCRE
then
test_cmp expect.perl actual.perl.short-arg
fi &&
git log --pretty=tformat:%s --fixed-strings \
--grep="(1|2)" >actual.fixed.long-arg &&
git log --pretty=tformat:%s --basic-regexp \
--grep="(.|.)" >actual.basic.long-arg &&
git log --pretty=tformat:%s --extended-regexp \
--grep="\|2" >actual.extended.long-arg &&
if test_have_prereq PCRE
then
git log --pretty=tformat:%s --perl-regexp \
--grep="[\d]\|" >actual.perl.long-arg &&
test_cmp expect.perl actual.perl.long-arg
else
test_must_fail git log --perl-regexp \
--grep="[\d]\|"
fi &&
test_cmp expect.fixed actual.fixed.long-arg &&
test_cmp expect.basic actual.basic.long-arg &&
test_cmp expect.extended actual.extended.long-arg
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4202-log/pattern-type/.git/
[master (root-commit) d509854] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 0b7d5f0] (1|2)
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 35 - log with various grep.patternType configurations & command-lines
expecting success:
git log --graph --pretty=tformat:%s >actual &&
test_cmp expect actual
ok 36 - simple log --graph
expecting success:
git log --graph --line-prefix="123 " --pretty=tformat:%s >actual &&
test_cmp expect actual
ok 37 - simple log --graph --line-prefix="123 "
expecting success:
git checkout -b side HEAD~4 &&
test_commit side-1 1 1 &&
test_commit side-2 2 2 &&
git checkout master &&
git merge side
Switched to a new branch 'side'
[side 4447a16] side-1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1
[side 1666e54] side-2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2
Switched to branch 'master'
Merging:
e9e4904 Second
virtual side
found 1 common ancestor:
2fbe8c0 third
Merge made by the 'recursive' strategy.
1 | 1 +
2 | 1 +
2 files changed, 2 insertions(+)
create mode 100644 1
create mode 100644 2
ok 38 - set up merge history
expecting success:
git log --graph --date-order --pretty=tformat:%s |
sed "s/ *\$//" >actual &&
test_cmp expect actual
ok 39 - log --graph with merge
expecting success:
git log --line-prefix="| | | " --graph --date-order --pretty=tformat:%s |
sed "s/ *\$//" >actual &&
test_cmp expect actual
ok 40 - log --graph --line-prefix="| | | " with merge
expecting success:
test_config log.graphColors " blue,invalid-color, cyan, red , " &&
git log --color=always --graph --date-order --pretty=tformat:%s |
test_decode_color | sed "s/ *\$//" >actual &&
test_cmp expect.colors actual
error: invalid color value: invalid-color
warning: ignore invalid color 'invalid-color' in log.graphColors
ok 41 - log --graph with merge with log.graphColors
expecting success:
git log --raw --graph --oneline -m master | head -n 500 >actual &&
grep "initial" actual
* 3a2fdcb initial
ok 42 - log --raw --graph -m with merge
expecting success:
git diff-tree --graph master^ | head -n 500 >actual &&
grep "one" actual
:000000 100644 0000000000000000000000000000000000000000 9a333834d7f76d26bf24f07f0d8ab00010e78b91 A one
ok 43 - diff-tree --graph
expecting success:
git log --graph --date-order --pretty=short |
git name-rev --name-only --stdin |
sed "s/Merge:.*/Merge: A B/;s/ *\$//" >actual &&
test_cmp expect actual
ok 44 - log --graph with full output
expecting success:
git checkout -b tangle HEAD~6 &&
test_commit tangle-a tangle-a a &&
git merge master~3 &&
git merge side~1 &&
git checkout master &&
git merge tangle &&
git checkout -b reach &&
test_commit reach &&
git checkout master &&
git checkout -b octopus-a &&
test_commit octopus-a &&
git checkout master &&
git checkout -b octopus-b &&
test_commit octopus-b &&
git checkout master &&
test_commit seventh &&
git merge octopus-a octopus-b &&
git merge reach
Switched to a new branch 'tangle'
[tangle f6c510e] tangle-a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 tangle-a
Merging:
f6c510e tangle-a
virtual master~3
found 1 common ancestor:
f7dab8e second
Merge made by the 'recursive' strategy.
a/two | 1 +
one => ein | 0
ichi | 1 +
3 files changed, 2 insertions(+)
create mode 100644 a/two
rename one => ein (100%)
create mode 100644 ichi
Merging:
2dc6a29 Merge branch 'master' (early part) into tangle
virtual side~1
found 1 common ancestor:
2fbe8c0 third
Merge made by the 'recursive' strategy.
1 | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1
Switched to branch 'master'
Merging:
e8dcb3b Merge branch 'side'
virtual tangle
found 2 common ancestors:
394ef78 fifth
4447a16 side-1
Merging:
394ef78 fifth
4447a16 side-1
found 1 common ancestor:
2fbe8c0 third
Merge made by the 'recursive' strategy.
tangle-a | 1 +
1 file changed, 1 insertion(+)
create mode 100644 tangle-a
Switched to a new branch 'reach'
[reach 973a5f9] reach
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 reach.t
Switched to branch 'master'
Switched to a new branch 'octopus-a'
[octopus-a 5c3c15c] octopus-a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 octopus-a.t
Switched to branch 'master'
Switched to a new branch 'octopus-b'
[octopus-b ef3da6e] octopus-b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 octopus-b.t
Switched to branch 'master'
[master c379a04] seventh
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 seventh.t
warning: refname 'octopus-a' is ambiguous.
warning: refname 'octopus-b' is ambiguous.
warning: refname 'octopus-a' is ambiguous.
warning: refname 'octopus-b' is ambiguous.
Trying simple merge with octopus-a
Trying simple merge with octopus-b
Merge made by the 'octopus' strategy.
octopus-a.t | 1 +
octopus-b.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 octopus-a.t
create mode 100644 octopus-b.t
warning: refname 'reach' is ambiguous.
warning: refname 'reach' is ambiguous.
Merging:
f20367c Merge tags 'octopus-a' and 'octopus-b'
virtual reach
found 1 common ancestor:
5e75a13 Merge branch 'tangle'
Merge made by the 'recursive' strategy.
reach.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 reach.t
ok 45 - set up more tangled history
expecting success:
git log --graph --date-order --pretty=tformat:%s |
sed "s/ *\$//" >actual &&
test_cmp expect actual
ok 46 - log --graph with merge
expecting success:
git log --oneline --no-decorate >expect.none &&
git log --oneline --decorate >expect.short &&
git log --oneline --decorate=full >expect.full &&
echo "[log] decorate" >>.git/config &&
git log --oneline >actual &&
test_cmp expect.short actual &&
test_config log.decorate true &&
git log --oneline >actual &&
test_cmp expect.short actual &&
git log --oneline --decorate=full >actual &&
test_cmp expect.full actual &&
git log --oneline --decorate=no >actual &&
test_cmp expect.none actual &&
test_config log.decorate no &&
git log --oneline >actual &&
test_cmp expect.none actual &&
git log --oneline --decorate >actual &&
test_cmp expect.short actual &&
git log --oneline --decorate=full >actual &&
test_cmp expect.full actual &&
test_config log.decorate 1 &&
git log --oneline >actual &&
test_cmp expect.short actual &&
git log --oneline --decorate=full >actual &&
test_cmp expect.full actual &&
git log --oneline --decorate=no >actual &&
test_cmp expect.none actual &&
test_config log.decorate short &&
git log --oneline >actual &&
test_cmp expect.short actual &&
git log --oneline --no-decorate >actual &&
test_cmp expect.none actual &&
git log --oneline --decorate=full >actual &&
test_cmp expect.full actual &&
test_config log.decorate full &&
git log --oneline >actual &&
test_cmp expect.full actual &&
git log --oneline --no-decorate >actual &&
test_cmp expect.none actual &&
git log --oneline --decorate >actual &&
test_cmp expect.short actual &&
test_unconfig log.decorate &&
git log --pretty=raw >expect.raw &&
test_config log.decorate full &&
git log --pretty=raw >actual &&
test_cmp expect.raw actual
ok 47 - log.decorate configuration
expecting success:
cat >expect.decorate <<-\EOF &&
Merge-tag-reach
Merge-tags-octopus-a-and-octopus-b
seventh
octopus-b (octopus-b)
octopus-a (octopus-a)
reach
EOF
git log -n6 --decorate=short --pretty="tformat:%f%d" \
--decorate-refs="heads/octopus*" >actual &&
test_cmp expect.decorate actual
ok 48 - decorate-refs with glob
expecting success:
cat >expect.decorate <<-\EOF &&
Merge-tag-reach
Merge-tags-octopus-a-and-octopus-b
seventh
octopus-b
octopus-a
reach (tag: reach)
EOF
git log -n6 --decorate=short --pretty="tformat:%f%d" \
--decorate-refs="tags/reach" >actual &&
test_cmp expect.decorate actual
ok 49 - decorate-refs without globs
expecting success:
cat >expect.decorate <<-\EOF &&
Merge-tag-reach
Merge-tags-octopus-a-and-octopus-b
seventh
octopus-b (octopus-b)
octopus-a (octopus-a)
reach (tag: reach)
EOF
git log -n6 --decorate=short --pretty="tformat:%f%d" \
--decorate-refs="heads/octopus*" \
--decorate-refs="tags/reach" >actual &&
test_cmp expect.decorate actual
ok 50 - multiple decorate-refs
expecting success:
cat >expect.decorate <<-\EOF &&
Merge-tag-reach (HEAD -> master)
Merge-tags-octopus-a-and-octopus-b
seventh (tag: seventh)
octopus-b (tag: octopus-b)
octopus-a (tag: octopus-a)
reach (tag: reach, reach)
EOF
git log -n6 --decorate=short --pretty="tformat:%f%d" \
--decorate-refs-exclude="heads/octopus*" >actual &&
test_cmp expect.decorate actual
ok 51 - decorate-refs-exclude with glob
expecting success:
cat >expect.decorate <<-\EOF &&
Merge-tag-reach (HEAD -> master)
Merge-tags-octopus-a-and-octopus-b
seventh (tag: seventh)
octopus-b (tag: octopus-b, octopus-b)
octopus-a (tag: octopus-a, octopus-a)
reach (reach)
EOF
git log -n6 --decorate=short --pretty="tformat:%f%d" \
--decorate-refs-exclude="tags/reach" >actual &&
test_cmp expect.decorate actual
ok 52 - decorate-refs-exclude without globs
expecting success:
cat >expect.decorate <<-\EOF &&
Merge-tag-reach (HEAD -> master)
Merge-tags-octopus-a-and-octopus-b
seventh (tag: seventh)
octopus-b (tag: octopus-b)
octopus-a (tag: octopus-a)
reach (reach)
EOF
git log -n6 --decorate=short --pretty="tformat:%f%d" \
--decorate-refs-exclude="heads/octopus*" \
--decorate-refs-exclude="tags/reach" >actual &&
test_cmp expect.decorate actual
ok 53 - multiple decorate-refs-exclude
expecting success:
cat >expect.decorate <<-\EOF &&
Merge-tag-reach (master)
Merge-tags-octopus-a-and-octopus-b
seventh
octopus-b
octopus-a
reach (reach)
EOF
git log -n6 --decorate=short --pretty="tformat:%f%d" \
--decorate-refs="heads/*" \
--decorate-refs-exclude="heads/oc*" >actual &&
test_cmp expect.decorate actual
ok 54 - decorate-refs and decorate-refs-exclude
expecting success:
git log --oneline --decorate=full >expect.full &&
git log --oneline --decorate=short >expect.short &&
test_config log.decorate full &&
test_config log.mailmap true &&
git log --oneline >actual &&
test_cmp expect.full actual &&
git log --oneline --decorate=short >actual &&
test_cmp expect.short actual
ok 55 - log.decorate config parsing
checking prerequisite: TTY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq PERL &&
# Reading from the pty master seems to get stuck _sometimes_
# on Mac OS X 10.5.0, using Perl 5.10.0 or 5.8.9.
#
# Reproduction recipe: run
#
# i=0
# while ./test-terminal.perl echo hi $i
# do
# : $((i = $i + 1))
# done
#
# After 2000 iterations or so it hangs.
# https://rt.cpan.org/Ticket/Display.html?id=65692
#
test "$(uname -s)" != Darwin &&
perl "$TEST_DIRECTORY"/test-terminal.perl \
sh -c "test -t 1 && test -t 2"
)
prerequisite TTY ok
expecting success:
git log --color --oneline --decorate >expect.short &&
test_terminal git log --oneline >actual &&
test_cmp expect.short actual
died of signal 15 at /<<PKGBUILDDIR>>/t/test-terminal.perl line 35.
ok 56 - log output on a TTY
expecting success:
git log -g --abbrev-commit --pretty=oneline >expect &&
git reflog >actual &&
test_cmp expect actual
ok 57 - reflog is expected format
expecting success:
git log --no-merges --raw >expect &&
git whatchanged >actual &&
test_cmp expect actual
ok 58 - whatchanged is expected format
expecting success:
git log --abbrev-commit >expect.log.abbrev &&
git log --no-abbrev-commit >expect.log.full &&
git log --pretty=raw >expect.log.raw &&
git reflog --abbrev-commit >expect.reflog.abbrev &&
git reflog --no-abbrev-commit >expect.reflog.full &&
git whatchanged --abbrev-commit >expect.whatchanged.abbrev &&
git whatchanged --no-abbrev-commit >expect.whatchanged.full &&
test_config log.abbrevCommit true &&
git log >actual &&
test_cmp expect.log.abbrev actual &&
git log --no-abbrev-commit >actual &&
test_cmp expect.log.full actual &&
git log --pretty=raw >actual &&
test_cmp expect.log.raw actual &&
git reflog >actual &&
test_cmp expect.reflog.abbrev actual &&
git reflog --no-abbrev-commit >actual &&
test_cmp expect.reflog.full actual &&
git whatchanged >actual &&
test_cmp expect.whatchanged.abbrev actual &&
git whatchanged --no-abbrev-commit >actual &&
test_cmp expect.whatchanged.full actual
ok 59 - log.abbrevCommit configuration
expecting success:
# This tests for a regression introduced in v1.7.2-rc0~103^2~2
test_create_repo regression &&
(
cd regression &&
test_commit needs-another-commit &&
test_commit foo.bar &&
git log -M --follow -p foo.bar.t &&
git log -M --follow --stat foo.bar.t &&
git log -M --follow --name-only foo.bar.t
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4202-log/regression/.git/
[master (root-commit) 2c943e6] needs-another-commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 needs-another-commit.t
[master 88a3158] foo.bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.bar.t
commit 88a3158a223f4c9eff6009796d6f4a01db6f394c
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:28:13 2005 -0700
foo.bar
diff --git a/foo.bar.t b/foo.bar.t
new file mode 100644
index 0000000..fbf8e96
--- /dev/null
+++ b/foo.bar.t
@@ -0,0 +1 @@
+foo.bar
commit 88a3158a223f4c9eff6009796d6f4a01db6f394c
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:28:13 2005 -0700
foo.bar
foo.bar.t | 1 +
1 file changed, 1 insertion(+)
commit 88a3158a223f4c9eff6009796d6f4a01db6f394c
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:28:13 2005 -0700
foo.bar
foo.bar.t
ok 60 - show added path under "--follow -M"
expecting success:
test_create_repo follow-c &&
(
cd follow-c &&
test_commit initial file original &&
git rm file &&
test_commit rename file2 original &&
git reset --hard initial &&
test_commit modify file foo &&
git merge -m merge rename &&
git log -c --follow file2
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4202-log/follow-c/.git/
[master (root-commit) 1ae2302] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
rm 'file'
[master b666f54] rename
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename file => file2 (100%)
HEAD is now at 1ae2302 initial
[master ab921c8] modify
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Merging:
ab921c8 modify
virtual rename
found 1 common ancestor:
1ae2302 initial
Merge made by the 'recursive' strategy.
file => file2 | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename file => file2 (100%)
commit 0071b8c0b17b9c12c2c48a042c83e27bab6aad4e
Merge: ab921c8 b666f54
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:29:13 2005 -0700
merge
commit b666f54d82025f8eaec1a190d72356cf651c2521
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:28:13 2005 -0700
rename
diff --git a/file b/file2
similarity index 100%
rename from file
rename to file2
commit 1ae230258ca6e8e83c5d2d3840b9cf430273fca2
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:27:13 2005 -0700
initial
diff --git a/file b/file
new file mode 100644
index 0000000..4b48dee
--- /dev/null
+++ b/file
@@ -0,0 +1 @@
+original
ok 61 - git log -c --follow
expecting success:
git log --no-renames --graph --pretty=short --stat -p >actual &&
sanitize_output >actual.sanitized <actual &&
test_i18ncmp expect actual.sanitized
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 62 - log --graph with diff and stats
expecting success:
git log --line-prefix="*** " --no-renames --graph --pretty=short --stat -p >actual &&
sanitize_output >actual.sanitized <actual &&
test_i18ncmp expect actual.sanitized
ok 63 - log --line-prefix="*** " --graph with diff and stats
expecting success:
git log --graph --format=%s --name-status tangle..reach >actual &&
sanitize_output <actual >actual.sanitized &&
test_cmp expect actual.sanitized
warning: refname 'reach' is ambiguous.
ok 64 - log --graph with --name-status
expecting success:
git log --graph --format=%s --name-only tangle..reach >actual &&
sanitize_output <actual >actual.sanitized &&
test_cmp expect actual.sanitized
warning: refname 'reach' is ambiguous.
ok 65 - log --graph with --name-only
expecting success:
mkdir -p a/b &&
( echo sixth && echo fifth ) >expect &&
( cd a/b && git log --format=%s .. ) >actual &&
test_cmp expect actual
ok 66 - dotdot is a parent directory
expecting success:
test_when_finished "git reset --hard && git checkout master" &&
git checkout -b signed master &&
echo foo >foo &&
git add foo &&
git commit -S -m signed_commit
Switched to a new branch 'signed'
[signed 955b474] signed_commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
HEAD is now at 955b474 signed_commit
Switched to branch 'master'
ok 67 - setup signed branch
expecting success:
test_when_finished "git reset --hard && git checkout master" &&
git checkout -b signed-x509 master &&
echo foo >foo &&
git add foo &&
test_config gpg.format x509 &&
test_config user.signingkey $GIT_COMMITTER_EMAIL &&
git commit -S -m signed_commit
Switched to a new branch 'signed-x509'
[signed-x509 d7cf6f2] signed_commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
HEAD is now at d7cf6f2 signed_commit
Switched to branch 'master'
ok 68 - setup signed branch x509
expecting success:
git log --graph --show-signature -n1 signed >actual &&
grep "^| gpg: Signature made" actual &&
grep "^| gpg: Good signature" actual
| gpg: Signature made Wed Aug 14 07:29:36 2019 UTC
| gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
ok 69 - log --graph --show-signature
expecting success:
git log --graph --show-signature -n1 signed-x509 >actual &&
grep "^| gpgsm: Signature made" actual &&
grep "^| gpgsm: Good signature" actual
| gpgsm: Signature made 2019-08-14 07:29:37 using certificate ID 0xFA23FD65
| gpgsm: Good signature from "/CN=C O Mitter/O=Example/SN=C O/GN=Mitter"
ok 70 - log --graph --show-signature x509
expecting success:
test_when_finished "git reset --hard && git checkout master" &&
git checkout -b plain master &&
echo aaa >bar &&
git add bar &&
git commit -m bar_commit &&
git checkout -b tagged master &&
echo bbb >baz &&
git add baz &&
git commit -m baz_commit &&
git tag -s -m signed_tag_msg signed_tag &&
git checkout plain &&
git merge --no-ff -m msg signed_tag &&
git log --graph --show-signature -n1 plain >actual &&
grep "^|\\\ merged tag" actual &&
grep "^| | gpg: Signature made" actual &&
grep "^| | gpg: Good signature" actual
Switched to a new branch 'plain'
[plain b631594] bar_commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
Switched to a new branch 'tagged'
[tagged 018c3a1] baz_commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 baz
Switched to branch 'plain'
Merging:
b631594 bar_commit
virtual signed_tag
found 1 common ancestor:
8ef4f46 Merge tag 'reach'
Merge made by the 'recursive' strategy.
baz | 1 +
1 file changed, 1 insertion(+)
create mode 100644 baz
|\ merged tag 'signed_tag'
| | gpg: Signature made Wed Aug 14 07:29:37 2019 UTC
| | gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
HEAD is now at cd0f5b4 msg
Switched to branch 'master'
ok 71 - log --graph --show-signature for merged tag
expecting success:
test_when_finished "git reset --hard && git checkout master" &&
test_config gpg.format x509 &&
test_config user.signingkey $GIT_COMMITTER_EMAIL &&
git checkout -b plain-x509 master &&
echo aaa >bar &&
git add bar &&
git commit -m bar_commit &&
git checkout -b tagged-x509 master &&
echo bbb >baz &&
git add baz &&
git commit -m baz_commit &&
git tag -s -m signed_tag_msg signed_tag_x509 &&
git checkout plain-x509 &&
git merge --no-ff -m msg signed_tag_x509 &&
git log --graph --show-signature -n1 plain-x509 >actual &&
grep "^|\\\ merged tag" actual &&
grep "^| | gpgsm: Signature made" actual &&
grep "^| | gpgsm: Good signature" actual
Switched to a new branch 'plain-x509'
[plain-x509 b631594] bar_commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
Switched to a new branch 'tagged-x509'
[tagged-x509 018c3a1] baz_commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 baz
Switched to branch 'plain-x509'
Merging:
b631594 bar_commit
virtual signed_tag_x509
found 1 common ancestor:
8ef4f46 Merge tag 'reach'
Merge made by the 'recursive' strategy.
baz | 1 +
1 file changed, 1 insertion(+)
create mode 100644 baz
|\ merged tag 'signed_tag_x509'
| | gpgsm: Signature made 2019-08-14 07:29:38 using certificate ID 0xFA23FD65
| | gpgsm: Good signature from "/CN=C O Mitter/O=Example/SN=C O/GN=Mitter"
HEAD is now at fdb73ea msg
Switched to branch 'master'
ok 72 - log --graph --show-signature for merged tag x509
expecting success:
git log -1 --show-signature --no-show-signature signed >actual &&
! grep "^gpg:" actual
ok 73 - --no-show-signature overrides --show-signature
expecting success:
test_config log.showsignature true &&
git log -1 signed >actual &&
grep "gpg: Signature made" actual &&
grep "gpg: Good signature" actual
gpg: Signature made Wed Aug 14 07:29:36 2019 UTC
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
ok 74 - log.showsignature=true behaves like --show-signature
expecting success:
test_config log.showsignature true &&
git log -1 --no-show-signature signed >actual &&
! grep "^gpg:" actual
ok 75 - --no-show-signature overrides log.showsignature=true
expecting success:
test_config log.showsignature false &&
git log -1 --show-signature signed >actual &&
grep "gpg: Signature made" actual &&
grep "gpg: Good signature" actual
gpg: Signature made Wed Aug 14 07:29:36 2019 UTC
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
ok 76 - --show-signature overrides log.showsignature=false
expecting success:
test_must_fail git log --graph --no-walk
fatal: cannot combine --no-walk with --graph
ok 77 - log --graph --no-walk is forbidden
expecting success:
git init empty &&
test_must_fail git -C empty log 2>stderr &&
test_i18ngrep does.not.have.any.commits stderr &&
echo 1234abcd >empty/.git/refs/heads/master &&
test_must_fail git -C empty log 2>stderr &&
test_i18ngrep broken stderr &&
echo "ref: refs/heads/invalid.lock" >empty/.git/HEAD &&
test_must_fail git -C empty log 2>stderr &&
test_i18ngrep broken stderr &&
test_must_fail git -C empty log --default totally-bogus 2>stderr &&
test_i18ngrep broken stderr
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4202-log/empty/.git/
fatal: your current branch 'master' does not have any commits yet
fatal: your current branch appears to be broken
fatal: your current branch appears to be broken
fatal: your current branch appears to be broken
ok 78 - log diagnoses bogus HEAD
expecting success:
git log --branches=does-not-exist >actual &&
test_must_be_empty actual
ok 79 - log does not default to HEAD when rev input is given
expecting success:
git checkout --orphan source-a &&
test_commit one &&
test_commit two &&
git checkout -b source-b HEAD^ &&
test_commit three
Switched to a new branch 'source-a'
[source-a (root-commit) 1ac6c77] one
Author: A U Thor <author@example.com>
11 files changed, 11 insertions(+)
create mode 100644 1
create mode 100644 2
create mode 100644 ein
create mode 100644 ichi
create mode 100644 octopus-a.t
create mode 100644 octopus-b.t
create mode 100644 one
create mode 100644 one.t
create mode 100644 reach.t
create mode 100644 seventh.t
create mode 100644 tangle-a
[source-a 8e393e1] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
Switched to a new branch 'source-b'
[source-b 09e12a9] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
ok 80 - set up --source tests
expecting success:
cat >expect <<-\EOF &&
09e12a9 source-b three
8e393e1 source-a two
1ac6c77 source-b one
EOF
git log --oneline --source source-a source-b >actual &&
test_cmp expect actual
ok 81 - log --source paints branch names
expecting success:
git tag -m tagged source-tag &&
cat >expect <<-\EOF &&
09e12a9 source-tag three
8e393e1 source-a two
1ac6c77 source-tag one
EOF
git log --oneline --source source-tag source-a >actual &&
test_cmp expect actual
ok 82 - log --source paints tag names
expecting success:
cat >expect <<-\EOF &&
09e12a9 source-b three
8e393e1 source-a two
EOF
git log --oneline --source source-a...source-b >actual &&
test_cmp expect actual
ok 83 - log --source paints symmetric ranges
expecting success:
test_must_fail git log --exclude-promisor-objects source-a
fatal: unrecognized argument: --exclude-promisor-objects
ok 84 - --exclude-promisor-objects does not BUG-crash
# passed all 84 test(s)
1..84
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4205-log-pretty-formats.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4205-log-pretty-formats/.git/
expecting success:
>foo &&
>bar &&
git add foo &&
test_tick &&
git config i18n.commitEncoding $test_encoding &&
commit_msg $test_encoding | git commit -F - &&
git add bar &&
test_tick &&
git commit -m "add bar" &&
git config --unset i18n.commitEncoding
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 foo
[master 91b4447] add bar
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 bar
ok 1 - set up basic repos
expecting success:
git log --pretty=oneline >expected &&
git config pretty.test-alias oneline &&
git log --pretty=test-alias >actual &&
test_cmp expected actual
ok 2 - alias builtin format
expecting success:
git log --pretty=oneline >expected &&
git config pretty.oneline "%H" &&
git log --pretty=oneline >actual &&
test_cmp expected actual
ok 3 - alias masking builtin format
expecting success:
git log --pretty="format:%h" >expected &&
git config pretty.test-alias "format:%h" &&
git log --pretty=test-alias >actual &&
test_cmp expected actual
ok 4 - alias user-defined format
expecting success:
git config i18n.logOutputEncoding $test_encoding &&
git log --oneline >expected-s &&
git log --pretty="tformat:%h %s" >actual-s &&
git config --unset i18n.logOutputEncoding &&
test_cmp expected-s actual-s
ok 5 - alias user-defined tformat with %s (ISO8859-1 encoding)
expecting success:
git log --oneline >expected-s &&
git log --pretty="tformat:%h %s" >actual-s &&
test_cmp expected-s actual-s
ok 6 - alias user-defined tformat with %s (utf-8 encoding)
expecting success:
git log --pretty="tformat:%h" >expected &&
git config pretty.test-alias "tformat:%h" &&
git log --pretty=test-alias >actual &&
test_cmp expected actual
ok 7 - alias user-defined tformat
expecting success:
git config pretty.test-alias format-that-will-never-exist &&
test_must_fail git log --pretty=test-alias
fatal: invalid --pretty format: test-alias
ok 8 - alias non-existent format
expecting success:
git log --pretty="tformat:%h" >expected &&
git config pretty.test-foo "tformat:%h" &&
git config pretty.test-bar test-foo &&
git log --pretty=test-bar >actual && test_cmp expected actual
ok 9 - alias of an alias
expecting success:
git log --pretty=format:"Two %H" >expected &&
git config pretty.duplicate "format:One %H" &&
git config --add pretty.duplicate "format:Two %H" &&
git log --pretty=duplicate >actual &&
test_cmp expected actual
ok 10 - alias masking an alias
expecting success:
git config pretty.test-foo test-bar &&
git config pretty.test-bar test-foo &&
test_must_fail git log --pretty=test-foo
fatal: invalid --pretty format: 'test-foo' references an alias which points to itself
ok 11 - alias loop
expecting success:
printf "add bar\0$(commit_msg)" >expected &&
git log -z --pretty="format:%s" >actual &&
test_cmp expected actual
ok 12 - NUL separation
expecting success:
printf "add bar\0$(commit_msg)\0" >expected &&
git log -z --pretty="tformat:%s" >actual &&
test_cmp expected actual
ok 13 - NUL termination
expecting success:
stat0_part=$(git diff --stat HEAD^ HEAD) &&
stat1_part=$(git diff-tree --no-commit-id --stat --root HEAD^) &&
printf "add bar\n$stat0_part\n\0$(commit_msg)\n$stat1_part\n" >expected &&
git log -z --stat --pretty="format:%s" >actual &&
test_i18ncmp expected actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 14 - NUL separation with --stat
checking known breakage:
stat0_part=$(git diff --stat HEAD^ HEAD) &&
stat1_part=$(git diff-tree --no-commit-id --stat --root HEAD^) &&
printf "add bar\n$stat0_part\n\0$(commit_msg)\n$stat1_part\n0" >expected &&
git log -z --stat --pretty="tformat:%s" >actual &&
test_cmp expected actual
Binary files expected and actual differ
not ok 15 - NUL termination with --stat # TODO known breakage
expecting success:
test_commit "message one" one one message-one &&
test_commit "message two" two two message-two &&
head1=$(git rev-parse --verify --short HEAD~0) &&
head2=$(git rev-parse --verify --short HEAD~1) &&
head3=$(git rev-parse --verify --short HEAD~2) &&
head4=$(git rev-parse --verify --short HEAD~3)
[master 23ca4f5] message one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one
[master a015cbe] message two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two
ok 16 - setup more commits
expecting success:
git log --pretty="tformat:%<(40)%s" >actual &&
qz_to_tab_space <<-EOF >expected &&
message two Z
message one Z
add bar Z
$(commit_msg) Z
EOF
test_cmp expected actual
ok 17 - left alignment formatting
expecting success:
git -c i18n.logOutputEncoding=$test_encoding log --pretty="tformat:%<(40)%s" >actual &&
qz_to_tab_space <<-EOF | iconv -f utf-8 -t $test_encoding >expected &&
message two Z
message one Z
add bar Z
$(commit_msg) Z
EOF
test_cmp expected actual
ok 18 - left alignment formatting. i18n.logOutputEncoding
expecting success:
git log --pretty="tformat:%h %<|(40)%s" >actual &&
qz_to_tab_space <<-EOF >expected &&
$head1 message two Z
$head2 message one Z
$head3 add bar Z
$head4 $(commit_msg) Z
EOF
test_cmp expected actual
ok 19 - left alignment formatting at the nth column
expecting success:
COLUMNS=50 git log --pretty="tformat:%h %<|(-10)%s" >actual &&
qz_to_tab_space <<-EOF >expected &&
$head1 message two Z
$head2 message one Z
$head3 add bar Z
$head4 $(commit_msg) Z
EOF
test_cmp expected actual
ok 20 - left alignment formatting at the nth column
expecting success:
git -c i18n.logOutputEncoding=$test_encoding log --pretty="tformat:%h %<|(40)%s" >actual &&
qz_to_tab_space <<-EOF | iconv -f utf-8 -t $test_encoding >expected &&
$head1 message two Z
$head2 message one Z
$head3 add bar Z
$head4 $(commit_msg) Z
EOF
test_cmp expected actual
ok 21 - left alignment formatting at the nth column. i18n.logOutputEncoding
expecting success:
git log --pretty="tformat:%<(1)%s" >actual &&
cat <<-EOF >expected &&
message two
message one
add bar
$(commit_msg)
EOF
test_cmp expected actual
ok 22 - left alignment formatting with no padding
expecting success:
git -c i18n.logOutputEncoding=$test_encoding log --pretty="tformat:%<(1)%s" >actual &&
cat <<-EOF | iconv -f utf-8 -t $test_encoding >expected &&
message two
message one
add bar
$(commit_msg)
EOF
test_cmp expected actual
ok 23 - left alignment formatting with no padding. i18n.logOutputEncoding
expecting success:
git log --pretty="tformat:%<(10,trunc)%s" >actual &&
qz_to_tab_space <<-\EOF >expected &&
message ..
message ..
add bar Z
initial...
EOF
test_cmp expected actual
ok 24 - left alignment formatting with trunc
expecting success:
git -c i18n.logOutputEncoding=$test_encoding log --pretty="tformat:%<(10,trunc)%s" >actual &&
qz_to_tab_space <<-\EOF | iconv -f utf-8 -t $test_encoding >expected &&
message ..
message ..
add bar Z
initial...
EOF
test_cmp expected actual
ok 25 - left alignment formatting with trunc. i18n.logOutputEncoding
expecting success:
git log --pretty="tformat:%<(10,ltrunc)%s" >actual &&
qz_to_tab_space <<-EOF >expected &&
..sage two
..sage one
add bar Z
..${sample_utf8_part}lich
EOF
test_cmp expected actual
ok 26 - left alignment formatting with ltrunc
expecting success:
git -c i18n.logOutputEncoding=$test_encoding log --pretty="tformat:%<(10,ltrunc)%s" >actual &&
qz_to_tab_space <<-EOF | iconv -f utf-8 -t $test_encoding >expected &&
..sage two
..sage one
add bar Z
..${sample_utf8_part}lich
EOF
test_cmp expected actual
ok 27 - left alignment formatting with ltrunc. i18n.logOutputEncoding
expecting success:
git log --pretty="tformat:%<(10,mtrunc)%s" >actual &&
qz_to_tab_space <<-\EOF >expected &&
mess.. two
mess.. one
add bar Z
init..lich
EOF
test_cmp expected actual
ok 28 - left alignment formatting with mtrunc
expecting success:
git -c i18n.logOutputEncoding=$test_encoding log --pretty="tformat:%<(10,mtrunc)%s" >actual &&
qz_to_tab_space <<-\EOF | iconv -f utf-8 -t $test_encoding >expected &&
mess.. two
mess.. one
add bar Z
init..lich
EOF
test_cmp expected actual
ok 29 - left alignment formatting with mtrunc. i18n.logOutputEncoding
expecting success:
git log --pretty="tformat:%>(40)%s" >actual &&
qz_to_tab_space <<-EOF >expected &&
Z message two
Z message one
Z add bar
Z $(commit_msg)
EOF
test_cmp expected actual
ok 30 - right alignment formatting
expecting success:
git -c i18n.logOutputEncoding=$test_encoding log --pretty="tformat:%>(40)%s" >actual &&
qz_to_tab_space <<-EOF | iconv -f utf-8 -t $test_encoding >expected &&
Z message two
Z message one
Z add bar
Z $(commit_msg)
EOF
test_cmp expected actual
ok 31 - right alignment formatting. i18n.logOutputEncoding
expecting success:
git log --pretty="tformat:%h %>|(40)%s" >actual &&
qz_to_tab_space <<-EOF >expected &&
$head1 message two
$head2 message one
$head3 add bar
$head4 $(commit_msg)
EOF
test_cmp expected actual
ok 32 - right alignment formatting at the nth column
expecting success:
COLUMNS=50 git log --pretty="tformat:%h %>|(-10)%s" >actual &&
qz_to_tab_space <<-EOF >expected &&
$head1 message two
$head2 message one
$head3 add bar
$head4 $(commit_msg)
EOF
test_cmp expected actual
ok 33 - right alignment formatting at the nth column
expecting success:
git -c i18n.logOutputEncoding=$test_encoding log --pretty="tformat:%h %>|(40)%s" >actual &&
qz_to_tab_space <<-EOF | iconv -f utf-8 -t $test_encoding >expected &&
$head1 message two
$head2 message one
$head3 add bar
$head4 $(commit_msg)
EOF
test_cmp expected actual
ok 34 - right alignment formatting at the nth column. i18n.logOutputEncoding
expecting success:
git -c i18n.logOutputEncoding=$test_encoding log --graph --pretty="tformat:%h %>|(40)%s" >actual &&
iconv -f utf-8 -t $test_encoding >expected <<-EOF &&
* $head1 message two
* $head2 message one
* $head3 add bar
* $head4 $(commit_msg)
EOF
test_cmp expected actual
ok 35 - right alignment formatting at the nth column with --graph. i18n.logOutputEncoding
expecting success:
git log --pretty="tformat:%>(1)%s" >actual &&
cat <<-EOF >expected &&
message two
message one
add bar
$(commit_msg)
EOF
test_cmp expected actual
ok 36 - right alignment formatting with no padding
expecting success:
git log --graph --pretty="tformat:%>(1)%s" >actual &&
cat <<-EOF >expected &&
* message two
* message one
* add bar
* $(commit_msg)
EOF
test_cmp expected actual
ok 37 - right alignment formatting with no padding and with --graph
expecting success:
git -c i18n.logOutputEncoding=$test_encoding log --pretty="tformat:%>(1)%s" >actual &&
cat <<-EOF | iconv -f utf-8 -t $test_encoding >expected &&
message two
message one
add bar
$(commit_msg)
EOF
test_cmp expected actual
ok 38 - right alignment formatting with no padding. i18n.logOutputEncoding
expecting success:
git log --pretty="tformat:%><(40)%s" >actual &&
qz_to_tab_space <<-EOF >expected &&
Z message two Z
Z message one Z
Z add bar Z
Z $(commit_msg) Z
EOF
test_cmp expected actual
ok 39 - center alignment formatting
expecting success:
git -c i18n.logOutputEncoding=$test_encoding log --pretty="tformat:%><(40)%s" >actual &&
qz_to_tab_space <<-EOF | iconv -f utf-8 -t $test_encoding >expected &&
Z message two Z
Z message one Z
Z add bar Z
Z $(commit_msg) Z
EOF
test_cmp expected actual
ok 40 - center alignment formatting. i18n.logOutputEncoding
expecting success:
git log --pretty="tformat:%h %><|(40)%s" >actual &&
qz_to_tab_space <<-EOF >expected &&
$head1 message two Z
$head2 message one Z
$head3 add bar Z
$head4 $(commit_msg) Z
EOF
test_cmp expected actual
ok 41 - center alignment formatting at the nth column
expecting success:
COLUMNS=70 git log --pretty="tformat:%h %><|(-30)%s" >actual &&
qz_to_tab_space <<-EOF >expected &&
$head1 message two Z
$head2 message one Z
$head3 add bar Z
$head4 $(commit_msg) Z
EOF
test_cmp expected actual
ok 42 - center alignment formatting at the nth column
expecting success:
git -c i18n.logOutputEncoding=$test_encoding log --pretty="tformat:%h %><|(40)%s" >actual &&
qz_to_tab_space <<-EOF | iconv -f utf-8 -t $test_encoding >expected &&
$head1 message two Z
$head2 message one Z
$head3 add bar Z
$head4 $(commit_msg) Z
EOF
test_cmp expected actual
ok 43 - center alignment formatting at the nth column. i18n.logOutputEncoding
expecting success:
git log --pretty="tformat:%><(1)%s" >actual &&
cat <<-EOF >expected &&
message two
message one
add bar
$(commit_msg)
EOF
test_cmp expected actual
ok 44 - center alignment formatting with no padding
expecting success:
git -c i18n.logOutputEncoding=$test_encoding log --pretty="tformat:%><(1)%s" >actual &&
cat <<-EOF | iconv -f utf-8 -t $test_encoding >expected &&
message two
message one
add bar
$(commit_msg)
EOF
test_cmp expected actual
ok 45 - center alignment formatting with no padding. i18n.logOutputEncoding
expecting success:
git commit --amend -m short --author "long long long <long@me.com>" &&
git log --pretty="tformat:%<(10,trunc)%s%>>(10,ltrunc)% an" >actual &&
cat <<-\EOF >expected &&
short long long long
message .. A U Thor
add bar A U Thor
initial... A U Thor
EOF
test_cmp expected actual
[master 2151238] short
Author: long long long <long@me.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 two
ok 46 - left/right alignment formatting with stealing
expecting success:
git -c i18n.logOutputEncoding=$test_encoding log --pretty="tformat:%<(10,trunc)%s%>>(10,ltrunc)% an" >actual &&
cat <<-\EOF | iconv -f utf-8 -t $test_encoding >expected &&
short long long long
message .. A U Thor
add bar A U Thor
initial... A U Thor
EOF
test_cmp expected actual
ok 47 - left/right alignment formatting with stealing. i18n.logOutputEncoding
expecting success:
git log --color --pretty="tformat:%<(10,trunc)%s%>>(10,ltrunc)%C(auto)%d" |
test_decode_color |
nul_to_q >actual &&
! grep Q actual
ok 48 - strbuf_utf8_replace() not producing NUL
expecting success:
git log --format=%ai%n%ci |
sed -e "s/ /T/; s/ //; s/..\$/:&/" >expected &&
git log --format=%aI%n%cI >actual &&
test_cmp expected actual
ok 49 - ISO and ISO-strict date formats display the same values
expecting success:
head1=$(git rev-parse --verify HEAD~0) &&
head2=$(git rev-parse --verify HEAD~1)
ok 50 - set up log decoration tests
expecting success:
git tag -a tag1 -m tag1 &&
git tag -a tag2 -m tag2 tag1 &&
git tag -d tag1 &&
git commit --amend -m shorter &&
git log --no-walk --tags --pretty="%H %d" --decorate=full >actual &&
cat <<-EOF >expected &&
$head2 (tag: refs/tags/message-one)
$old_head1 (tag: refs/tags/message-two)
$head1 (tag: refs/tags/tag2)
EOF
sort -k3 actual >actual1 &&
test_cmp expected actual1
hint: You have created a nested tag. The object referred to by your new tag is
hint: already a tag. If you meant to tag the object that it points to, use:
hint:
hint: git tag -f tag2 tag1^{}
Deleted tag 'tag1' (was 3df4ac8)
[master e1fa287] shorter
Author: long long long <long@me.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 two
ok 51 - log decoration properly follows tag chain
expecting success:
git log --no-walk --tags --pretty="%H %D" --decorate=full >actual &&
cat >expected <<-EOF &&
$head2 tag: refs/tags/message-one
$old_head1 tag: refs/tags/message-two
$head1 tag: refs/tags/tag2
EOF
sort -k3 actual >actual1 &&
test_cmp expected actual1
ok 52 - clean log decoration
expecting success:
echo "Some contents" >trailerfile &&
git add trailerfile &&
git commit -F - <<-EOF
trailers: this commit message has trailers
This commit is a test commit with trailers at the end. We parse this
message and display the trailers using %(trailers).
$(cat trailers)
EOF
[master 6ec41af] trailers: this commit message has trailers
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 trailerfile
ok 53 - set up trailer tests
expecting success:
git log --no-walk --pretty="%(trailers)" >actual &&
{
cat trailers &&
echo
} >expect &&
test_cmp expect actual
ok 54 - pretty format %(trailers) shows trailers
expecting success:
git log --no-walk --pretty="%(trailers:only)" >actual &&
{
grep -v patch.description <trailers &&
echo
} >expect &&
test_cmp expect actual
ok 55 - %(trailers:only) shows only "key: value" trailers
expecting success:
git log --no-walk --pretty=format:"%(trailers:only=yes)" >actual &&
grep -v patch.description <trailers >expect &&
test_cmp expect actual
ok 56 - %(trailers:only=yes) shows only "key: value" trailers
expecting success:
git log --no-walk --pretty=format:"%(trailers:only=no)" >actual &&
cat trailers >expect &&
test_cmp expect actual
ok 57 - %(trailers:only=no) shows all trailers
expecting success:
git log --no-walk --pretty=format:"%(trailers:only=yes)" >actual &&
grep -v patch.description <trailers >expect &&
test_cmp expect actual
ok 58 - %(trailers:only=no,only=true) shows only "key: value" trailers
expecting success:
git log --no-walk --pretty="%(trailers:unfold)" >actual &&
{
unfold <trailers &&
echo
} >expect &&
test_cmp expect actual
ok 59 - %(trailers:unfold) unfolds trailers
expecting success:
git log --no-walk --pretty="%(trailers:only,unfold)" >actual &&
git log --no-walk --pretty="%(trailers:unfold,only)" >reverse &&
test_cmp actual reverse &&
{
grep -v patch.description <trailers | unfold &&
echo
} >expect &&
test_cmp expect actual
ok 60 - :only and :unfold work together
expecting success:
git log --no-walk --pretty="format:%(trailers:key=Acked-by)" >actual &&
echo "Acked-by: A U Thor <author@example.com>" >expect &&
test_cmp expect actual
ok 61 - pretty format %(trailers:key=foo) shows that trailer
expecting success:
git log --no-walk --pretty="format:%(trailers:key=AcKed-bY)" >actual &&
echo "Acked-by: A U Thor <author@example.com>" >expect &&
test_cmp expect actual
ok 62 - pretty format %(trailers:key=foo) is case insensitive
expecting success:
git log --no-walk --pretty="format:%(trailers:key=Acked-by:)" >actual &&
echo "Acked-by: A U Thor <author@example.com>" >expect &&
test_cmp expect actual
ok 63 - pretty format %(trailers:key=foo:) trailing colon also works
expecting success:
git log --no-walk --pretty="format:%(trailers:key=Acked-by:,key=Signed-off-By)" >actual &&
grep -v patch.description <trailers >expect &&
test_cmp expect actual
ok 64 - pretty format %(trailers:key=foo) multiple keys
expecting success:
git log --no-walk --pretty="x%(trailers:key=Nacked-by)x" >actual &&
echo "xx" >expect &&
test_cmp expect actual
ok 65 - %(trailers:key=nonexistant) becomes empty
expecting success:
git log --no-walk --pretty="format:%(trailers:key=Signed-Off-by)" >actual &&
grep -v patch.description <trailers | grep -v Acked-by >expect &&
test_cmp expect actual
ok 66 - %(trailers:key=foo) handles multiple lines even if folded
expecting success:
git log --no-walk --pretty="format:%(trailers:key=Signed-Off-by,unfold)" >actual &&
unfold <trailers | grep Signed-off-by >expect &&
test_cmp expect actual
ok 67 - %(trailers:key=foo,unfold) properly unfolds
expecting success:
git log --no-walk --pretty="format:%(trailers:key=Acked-by,only=no)" >actual &&
{
echo "Acked-by: A U Thor <author@example.com>" &&
grep patch.description <trailers
} >expect &&
test_cmp expect actual
ok 68 - pretty format %(trailers:key=foo,only=no) also includes nontrailer lines
expecting success:
git log --no-walk --pretty="tformat:%(trailers:key)" >actual &&
echo "%(trailers:key)" >expect &&
test_cmp expect actual
ok 69 - %(trailers:key) without value is error
expecting success:
git log --no-walk --pretty="format:%(trailers:key=Acked-by,valueonly)" >actual &&
echo "A U Thor <author@example.com>" >expect &&
test_cmp expect actual
ok 70 - %(trailers:key=foo,valueonly) shows only value
expecting success:
git log --no-walk --pretty=format:"X%(trailers:separator=%x00,unfold)X" >actual &&
printf "XSigned-off-by: A U Thor <author@example.com>\0Acked-by: A U Thor <author@example.com>\0[ v2 updated patch description ]\0Signed-off-by: A U Thor <author@example.com>X" >expect &&
test_cmp expect actual
ok 71 - pretty format %(trailers:separator) changes separator
expecting success:
git commit --allow-empty -F - <<-\EOF &&
Important fix
The fix is explained here
Closes: #1234
EOF
git commit --allow-empty -F - <<-\EOF &&
Another fix
The fix is explained here
Closes: #567
Closes: #890
EOF
git commit --allow-empty -F - <<-\EOF &&
Does not close any tickets
EOF
git log --pretty="%s% (trailers:separator=%x2c%x20,key=Closes,valueonly)" HEAD~3.. >actual &&
test_write_lines \
"Does not close any tickets" \
"Another fix #567, #890" \
"Important fix #1234" >expect &&
test_cmp expect actual
[master 7552cfc] Important fix
Author: A U Thor <author@example.com>
[master d209f85] Another fix
Author: A U Thor <author@example.com>
[master 0407bf5] Does not close any tickets
Author: A U Thor <author@example.com>
ok 72 - pretty format %(trailers) combining separator/key/valueonly
expecting success:
git commit --allow-empty -F - <<-\EOF &&
this is the subject
This is the body. The message has a "---" line which would confuse a
message+patch parser. But here we know we have only a commit message,
so we get it right.
trailer: wrong
---
This is more body.
trailer: right
EOF
{
echo "trailer: right" &&
echo
} >expect &&
git log --no-walk --format="%(trailers)" >actual &&
test_cmp expect actual
[master 46ac407] this is the subject
Author: A U Thor <author@example.com>
ok 73 - trailer parsing not fooled by --- line
expecting success:
git checkout --orphan source-a &&
test_commit one &&
test_commit two &&
git checkout -b source-b HEAD^ &&
test_commit three
Switched to a new branch 'source-a'
[source-a (root-commit) aa5db7b] one
Author: A U Thor <author@example.com>
6 files changed, 4 insertions(+)
create mode 100644 bar
create mode 100644 foo
create mode 100644 one
create mode 100644 one.t
create mode 100644 trailerfile
create mode 100644 two
[source-a cb4b6b5] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
Switched to a new branch 'source-b'
[source-b d08742c] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
ok 74 - set up %S tests
expecting success:
cat >expect <<-\EOF &&
source-b
source-a
source-b
EOF
git log --format=%S source-a source-b >actual &&
test_cmp expect actual
ok 75 - log --format=%S paints branch names
expecting success:
git tag -m tagged source-tag &&
cat >expect <<-\EOF &&
source-tag
source-a
source-tag
EOF
git log --format=%S source-tag source-a >actual &&
test_cmp expect actual
ok 76 - log --format=%S paints tag names
expecting success:
cat >expect <<-\EOF &&
source-b
source-a
EOF
git log --format=%S source-a...source-b >actual &&
test_cmp expect actual
ok 77 - log --format=%S paints symmetric ranges
expecting success:
git log --format="source-b %h" source-b >expect &&
git log --format="%S %h" source-b >actual &&
test_cmp expect actual
ok 78 - %S in git log --format works with other placeholders (part 1)
expecting success:
git log --format="%h source-b" source-b >expect &&
git log --format="%h %S" source-b >actual &&
test_cmp expect actual
ok 79 - %S in git log --format works with other placeholders (part 2)
# still have 1 known breakage(s)
# passed all remaining 78 test(s)
1..79
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4210-log-i18n.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4210-log-i18n/.git/
expecting success:
test_tick &&
cat >msg <<-EOF &&
utf8
t${utf8_e}st
EOF
git add msg &&
git -c i18n.commitencoding=utf8 commit -F msg &&
cat >msg <<-EOF &&
latin1
t${latin1_e}st
EOF
git add msg &&
git -c i18n.commitencoding=ISO-8859-1 commit -F msg
[master (root-commit) cbf2796] utf8
Author: A U Thor <author@example.com>
1 file changed, 3 insertions(+)
create mode 100644 msg
[master b077cf9] latin1
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+), 2 deletions(-)
ok 1 - create commits in different encodings
expecting success:
cat >expect <<-\EOF &&
latin1
utf8
EOF
git log --encoding=utf8 --format=%s --grep=$utf8_e >actual &&
test_cmp expect actual
ok 2 - log --grep searches in log output encoding (utf8)
expecting success:
cat >expect <<-\EOF &&
latin1
utf8
EOF
git log --encoding=ISO-8859-1 --format=%s --grep=$latin1_e >actual &&
test_cmp expect actual
ok 3 - log --grep searches in log output encoding (latin1)
expecting success:
git log --encoding=utf8 --format=%s --grep=$latin1_e >actual &&
test_must_be_empty actual
ok 4 - log --grep does not find non-reencoded values (utf8)
expecting success:
git log --encoding=ISO-8859-1 --format=%s --grep=$utf8_e >actual &&
test_must_be_empty actual
ok 5 - log --grep does not find non-reencoded values (latin1)
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4212-log-corrupt.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4212-log-corrupt/.git/
expecting success:
test_commit foo &&
git cat-file commit HEAD |
sed "/^author /s/>/>-<>/" >broken_email.commit &&
git hash-object -w -t commit broken_email.commit >broken_email.hash &&
git update-ref refs/heads/broken_email $(cat broken_email.hash)
[master (root-commit) ddd63c9] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
ok 1 - setup
expecting success:
test_must_fail git fsck 2>actual &&
test_i18ngrep invalid.author actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error in commit fb99366eaec195640f250774fc94d75e4f06f441: missingSpaceBeforeDate: invalid author/committer line - missing space before date
ok 2 - fsck notices broken commit
expecting success:
{
echo commit $(cat broken_email.hash)
echo "Author: A U Thor <author@example.com>"
echo "Date: Thu Apr 7 15:13:13 2005 -0700"
echo
echo " foo"
} >expect.out &&
git log broken_email >actual.out 2>actual.err &&
test_cmp expect.out actual.out &&
test_must_be_empty actual.err
ok 3 - git log with broken author email
expecting success:
echo "A U Thor+author@example.com+Thu Apr 7 15:13:13 2005 -0700" >expect.out &&
git log --format="%an+%ae+%ad" broken_email >actual.out 2>actual.err &&
test_cmp expect.out actual.out &&
test_must_be_empty actual.err
ok 4 - git log --format with broken author email
expecting success:
commit=$(munge_author_date HEAD totally_bogus) &&
echo "Date: Thu Jan 1 00:00:00 1970 +0000" >expect &&
git log -1 $commit >actual.full &&
grep Date <actual.full >actual &&
test_cmp expect actual
ok 5 - unparsable dates produce sentinel value
expecting success:
commit=$(munge_author_date HEAD totally_bogus) &&
echo >expect &&
git log -1 --format=%ad $commit >actual &&
test_cmp expect actual
ok 6 - unparsable dates produce sentinel value (%ad)
expecting success:
commit=$(munge_author_date HEAD 18446744073709551617) &&
echo "Thu Jan 1 00:00:00 1970 +0000" >expect &&
git log -1 --format=%ad $commit >actual &&
test_cmp expect actual
ok 7 - date parser recognizes integer overflow
expecting success:
commit=$(munge_author_date HEAD 18446744073709551614) &&
echo "Thu Jan 1 00:00:00 1970 +0000" >expect &&
git log -1 --format=%ad $commit >actual &&
test_cmp expect actual
ok 8 - date parser recognizes time_t overflow
expecting success:
commit=$(munge_author_date HEAD 999999999999999999) &&
git log -1 --format=%ad $commit
Thu Jan 1 00:00:00 1970 +0000
ok 9 - absurdly far-in-future date
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4209-log-pickaxe.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4209-log-pickaxe/.git/
expecting success:
>expect_nomatch &&
>file &&
git add file &&
test_tick &&
git commit -m initial &&
git rev-parse --verify HEAD >expect_initial &&
echo Picked >file &&
git add file &&
test_tick &&
git commit --author="Another Person <another@example.com>" -m second &&
git rev-parse --verify HEAD >expect_second
[master (root-commit) 1bd44cb] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
[master 64f6655] second
Author: Another Person <another@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
git log --grep=initial --format=%H >actual &&
test_cmp expect_initial actual
ok 2 - log --grep (match)
expecting success:
git log --grep=InItial --format=%H >actual &&
test_cmp expect_nomatch actual
ok 3 - log --grep (nomatch)
expecting success:
git log --regexp-ignore-case --grep=InItial --format=%H >actual &&
test_cmp expect_initial actual
ok 4 - log --grep --regexp-ignore-case (match)
expecting success:
git log -i --grep=InItial --format=%H >actual &&
test_cmp expect_initial actual
ok 5 - log --grep -i (match)
expecting success:
git log --regexp-ignore-case --grep=initail --format=%H >actual &&
test_cmp expect_nomatch actual
ok 6 - log --grep --regexp-ignore-case (nomatch)
expecting success:
git log -i --grep=initail --format=%H >actual &&
test_cmp expect_nomatch actual
ok 7 - log --grep -i (nomatch)
expecting success:
git log --author=Person --format=%H >actual &&
test_cmp expect_second actual
ok 8 - log --author (match)
expecting success:
git log --author=person --format=%H >actual &&
test_cmp expect_nomatch actual
ok 9 - log --author (nomatch)
expecting success:
git log --regexp-ignore-case --author=person --format=%H >actual &&
test_cmp expect_second actual
ok 10 - log --author --regexp-ignore-case (match)
expecting success:
git log -i --author=person --format=%H >actual &&
test_cmp expect_second actual
ok 11 - log --author -i (match)
expecting success:
git log --regexp-ignore-case --author=spreon --format=%H >actual &&
test_cmp expect_nomatch actual
ok 12 - log --author --regexp-ignore-case (nomatch)
expecting success:
git log -i --author=spreon --format=%H >actual &&
test_cmp expect_nomatch actual
ok 13 - log --author -i (nomatch)
expecting success:
git log -Gpicked --format=%H >actual &&
test_cmp expect_nomatch actual
ok 14 - log -G (nomatch)
expecting success:
git log -GPicked --format=%H >actual &&
test_cmp expect_second actual
ok 15 - log -G (match)
expecting success:
git log --regexp-ignore-case -Gpickle --format=%H >actual &&
test_cmp expect_nomatch actual
ok 16 - log -G --regexp-ignore-case (nomatch)
expecting success:
git log -i -Gpickle --format=%H >actual &&
test_cmp expect_nomatch actual
ok 17 - log -G -i (nomatch)
expecting success:
git log --regexp-ignore-case -Gpicked --format=%H >actual &&
test_cmp expect_second actual
ok 18 - log -G --regexp-ignore-case (match)
expecting success:
git log -i -Gpicked --format=%H >actual &&
test_cmp expect_second actual
ok 19 - log -G -i (match)
expecting success:
echo "* diff=test" >.gitattributes &&
test_must_fail git -c diff.test.textconv=missing log -Gfoo &&
rm .gitattributes
error: cannot run missing: No such file or directory
fatal: unable to read files to diff
ok 20 - log -G --textconv (missing textconv tool)
expecting success:
echo "* diff=test" >.gitattributes &&
git -c diff.test.textconv=missing log -Gfoo --no-textconv >actual &&
test_cmp expect_nomatch actual &&
rm .gitattributes
ok 21 - log -G --no-textconv (missing textconv tool)
expecting success:
git log -Spicked --format=%H >actual &&
test_cmp expect_nomatch actual
ok 22 - log -S (nomatch)
expecting success:
git log -SPicked --format=%H >actual &&
test_cmp expect_second actual
ok 23 - log -S (match)
expecting success:
git log --regexp-ignore-case -Spicked --format=%H >actual &&
test_cmp expect_second actual
ok 24 - log -S --regexp-ignore-case (match)
expecting success:
git log -i -Spicked --format=%H >actual &&
test_cmp expect_second actual
ok 25 - log -S -i (match)
expecting success:
git log --regexp-ignore-case -Spickle --format=%H >actual &&
test_cmp expect_nomatch actual
ok 26 - log -S --regexp-ignore-case (nomatch)
expecting success:
git log -i -Spickle --format=%H >actual &&
test_cmp expect_nomatch actual
ok 27 - log -S -i (nomatch)
expecting success:
git log --pickaxe-regex -Sp.cked --format=%H >actual &&
test_cmp expect_nomatch actual
ok 28 - log -S --pickaxe-regex (nomatch)
expecting success:
git log --pickaxe-regex -SP.cked --format=%H >actual &&
test_cmp expect_second actual
ok 29 - log -S --pickaxe-regex (match)
expecting success:
git log --pickaxe-regex --regexp-ignore-case -Sp.cked --format=%H >actual &&
test_cmp expect_second actual
ok 30 - log -S --pickaxe-regex --regexp-ignore-case (match)
expecting success:
git log --pickaxe-regex -i -Sp.cked --format=%H >actual &&
test_cmp expect_second actual
ok 31 - log -S --pickaxe-regex -i (match)
expecting success:
git log --pickaxe-regex --regexp-ignore-case -Sp.ckle --format=%H >actual &&
test_cmp expect_nomatch actual
ok 32 - log -S --pickaxe-regex --regexp-ignore-case (nomatch)
expecting success:
git log --pickaxe-regex -i -Sp.ckle --format=%H >actual &&
test_cmp expect_nomatch actual
ok 33 - log -S --pickaxe-regex -i (nomatch)
expecting success:
echo "* diff=test" >.gitattributes &&
test_must_fail git -c diff.test.textconv=missing log -Sfoo &&
rm .gitattributes
error: cannot run missing: No such file or directory
fatal: unable to read files to diff
ok 34 - log -S --textconv (missing textconv tool)
expecting success:
echo "* diff=test" >.gitattributes &&
git -c diff.test.textconv=missing log -Sfoo --no-textconv >actual &&
test_cmp expect_nomatch actual &&
rm .gitattributes
ok 35 - log -S --no-textconv (missing textconv tool)
expecting success:
git checkout --orphan GS-binary-and-text &&
git read-tree --empty &&
printf "a\na\0a\n" >data.bin &&
git add data.bin &&
git commit -m "create binary file" data.bin &&
printf "a\na\0a\n" >>data.bin &&
git commit -m "modify binary file" data.bin &&
git rm data.bin &&
git commit -m "delete binary file" data.bin &&
git log >full-log
Switched to a new branch 'GS-binary-and-text'
[GS-binary-and-text (root-commit) 398ab87] create binary file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 data.bin
[GS-binary-and-text 6e95bf4] modify binary file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rm 'data.bin'
[GS-binary-and-text 40b3416] delete binary file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 data.bin
ok 36 - setup log -[GS] binary & --text
expecting success:
git log -Ga >log &&
test_must_be_empty log
ok 37 - log -G ignores binary files
expecting success:
git log -a -Ga >log &&
test_cmp log full-log
ok 38 - log -G looks into binary files with -a
expecting success:
test_when_finished "rm .gitattributes" &&
echo "* diff=bin" >.gitattributes &&
git -c diff.bin.textconv=cat log -Ga >log &&
test_cmp log full-log
ok 39 - log -G looks into binary files with textconv filter
expecting success:
git log -Sa >log &&
test_cmp log full-log
ok 40 - log -S looks into binary files
# passed all 40 test(s)
1..40
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4214-log-graph-octopus.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4214-log-graph-octopus/.git/
expecting success:
cat >expect.uncolored <<-\EOF &&
* left
| *---. octopus-merge
| |\ \ \
|/ / / /
| | | * 4
| | * | 3
| | |/
| * | 2
| |/
* | 1
|/
* initial
EOF
cat >expect.colors <<-\EOF &&
* left
<RED>|<RESET> *<BLUE>-<RESET><BLUE>-<RESET><MAGENTA>-<RESET><MAGENTA>.<RESET> octopus-merge
<RED>|<RESET> <RED>|<RESET><YELLOW>\<RESET> <BLUE>\<RESET> <MAGENTA>\<RESET>
<RED>|<RESET><RED>/<RESET> <YELLOW>/<RESET> <BLUE>/<RESET> <MAGENTA>/<RESET>
<RED>|<RESET> <YELLOW>|<RESET> <BLUE>|<RESET> * 4
<RED>|<RESET> <YELLOW>|<RESET> * <MAGENTA>|<RESET> 3
<RED>|<RESET> <YELLOW>|<RESET> <MAGENTA>|<RESET><MAGENTA>/<RESET>
<RED>|<RESET> * <MAGENTA>|<RESET> 2
<RED>|<RESET> <MAGENTA>|<RESET><MAGENTA>/<RESET>
* <MAGENTA>|<RESET> 1
<MAGENTA>|<RESET><MAGENTA>/<RESET>
* initial
EOF
test_commit initial &&
for i in 1 2 3 4 ; do
git checkout master -b $i || return $?
# Make tag name different from branch name, to avoid
# ambiguity error when calling checkout.
test_commit $i $i $i tag$i || return $?
done &&
git checkout 1 -b merge &&
test_tick &&
git merge -m octopus-merge 1 2 3 4 &&
git checkout 1 -b L &&
test_commit left
[master (root-commit) 24b24cf] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
Switched to a new branch '1'
[1 0152a24] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1
Switched to a new branch '2'
[2 bca45ad] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2
Switched to a new branch '3'
[3 ec94035] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 3
Switched to a new branch '4'
[4 132f27d] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 4
Switched to a new branch 'merge'
Trying simple merge with 2
Trying simple merge with 3
Trying simple merge with 4
Merge made by the 'octopus' strategy.
2 | 1 +
3 | 1 +
4 | 1 +
3 files changed, 3 insertions(+)
create mode 100644 2
create mode 100644 3
create mode 100644 4
Switched to a new branch 'L'
[L 4d89b91] left
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 left.t
ok 1 - set up merge history
expecting success:
test_config log.graphColors red,green,yellow,blue,magenta,cyan &&
git log --color=always --graph --date-order --pretty=tformat:%s --all >actual.colors.raw &&
test_decode_color <actual.colors.raw | sed "s/ *\$//" >actual.colors &&
test_cmp expect.colors actual.colors
ok 2 - log --graph with tricky octopus merge with colors
expecting success:
git log --color=never --graph --date-order --pretty=tformat:%s --all >actual.raw &&
sed "s/ *\$//" actual.raw >actual &&
test_cmp expect.uncolored actual
ok 3 - log --graph with tricky octopus merge, no color
expecting success:
cat >expect.uncolored <<-\EOF &&
*---. octopus-merge
|\ \ \
| | | * 4
| | * | 3
| | |/
| * | 2
| |/
* | 1
|/
* initial
EOF
git log --color=never --graph --date-order --pretty=tformat:%s merge >actual.raw &&
sed "s/ *\$//" actual.raw >actual &&
test_cmp expect.uncolored actual
ok 4 - log --graph with normal octopus merge, no color
expecting success:
cat >expect.colors <<-\EOF &&
*<YELLOW>-<RESET><YELLOW>-<RESET><BLUE>-<RESET><BLUE>.<RESET> octopus-merge
<RED>|<RESET><GREEN>\<RESET> <YELLOW>\<RESET> <BLUE>\<RESET>
<RED>|<RESET> <GREEN>|<RESET> <YELLOW>|<RESET> * 4
<RED>|<RESET> <GREEN>|<RESET> * <BLUE>|<RESET> 3
<RED>|<RESET> <GREEN>|<RESET> <BLUE>|<RESET><BLUE>/<RESET>
<RED>|<RESET> * <BLUE>|<RESET> 2
<RED>|<RESET> <BLUE>|<RESET><BLUE>/<RESET>
* <BLUE>|<RESET> 1
<BLUE>|<RESET><BLUE>/<RESET>
* initial
EOF
test_config log.graphColors red,green,yellow,blue,magenta,cyan &&
git log --color=always --graph --date-order --pretty=tformat:%s merge >actual.colors.raw &&
test_decode_color <actual.colors.raw | sed "s/ *\$//" >actual.colors &&
test_cmp expect.colors actual.colors
ok 5 - log --graph with normal octopus merge with colors
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4211-line-log.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4211-line-log/.git/
expecting success:
git fast-import < "$TEST_DIRECTORY"/t4211/history.export &&
git reset --hard
/<<PKGBUILDDIR>>/git-fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects: 5000
Total objects: 35 ( 0 duplicates )
blobs : 11 ( 0 duplicates 10 deltas of 10 attempts)
trees : 12 ( 0 duplicates 0 deltas of 11 attempts)
commits: 12 ( 0 duplicates 0 deltas of 0 attempts)
tags : 0 ( 0 duplicates 0 deltas of 0 attempts)
Total branches: 4 ( 4 loads )
marks: 1024 ( 23 unique )
atoms: 2
Memory total: 2395 KiB
pools: 2122 KiB
objects: 273 KiB
---------------------------------------------------------------------
pack_report: getpagesize() = 4096
pack_report: core.packedGitWindowSize = 33554432
pack_report: core.packedGitLimit = 268435456
pack_report: pack_used_ctr = 7
pack_report: pack_mmap_calls = 4
pack_report: pack_open_windows = 0 / 1
pack_report: pack_mapped = 0 / 3020
---------------------------------------------------------------------
HEAD is now at 0d8dcfc move within the file
ok 1 - setup (import history)
expecting success:
git log -L 4,12:a.c simple >actual &&
test_cmp "$TEST_DIRECTORY"/t4211/expect.simple-f actual
ok 2 - -L 4,12:a.c simple
expecting success:
git log -L 4,+9:a.c simple >actual &&
test_cmp "$TEST_DIRECTORY"/t4211/expect.simple-f actual
ok 3 - -L 4,+9:a.c simple
expecting success:
git log -L '/long f/,/^}/:a.c' simple >actual &&
test_cmp "$TEST_DIRECTORY"/t4211/expect.simple-f actual
ok 4 - -L '/long f/,/^}/:a.c' simple
expecting success:
git log -L :f:a.c simple >actual &&
test_cmp "$TEST_DIRECTORY"/t4211/expect.simple-f-to-main actual
ok 5 - -L :f:a.c simple
expecting success:
git log -L '/main/,/^}/:a.c' simple >actual &&
test_cmp "$TEST_DIRECTORY"/t4211/expect.simple-main actual
ok 6 - -L '/main/,/^}/:a.c' simple
expecting success:
git log -L :main:a.c simple >actual &&
test_cmp "$TEST_DIRECTORY"/t4211/expect.simple-main-to-end actual
ok 7 - -L :main:a.c simple
expecting success:
git log -L 1,+4:a.c simple >actual &&
test_cmp "$TEST_DIRECTORY"/t4211/expect.beginning-of-file actual
ok 8 - -L 1,+4:a.c simple
expecting success:
git log -L 20:a.c simple >actual &&
test_cmp "$TEST_DIRECTORY"/t4211/expect.end-of-file actual
ok 9 - -L 20:a.c simple
expecting success:
git log -L '/long f/',/^}/:a.c -L /main/,/^}/:a.c simple >actual &&
test_cmp "$TEST_DIRECTORY"/t4211/expect.two-ranges actual
ok 10 - -L '/long f/',/^}/:a.c -L /main/,/^}/:a.c simple
expecting success:
git log -L 24,+1:a.c simple >actual &&
test_cmp "$TEST_DIRECTORY"/t4211/expect.vanishes-early actual
ok 11 - -L 24,+1:a.c simple
expecting success:
git log -M -L '/long f/,/^}/:b.c' move-support >actual &&
test_cmp "$TEST_DIRECTORY"/t4211/expect.move-support-f actual
ok 12 - -M -L '/long f/,/^}/:b.c' move-support
expecting success:
git log -M -L ':f:b.c' parallel-change >actual &&
test_cmp "$TEST_DIRECTORY"/t4211/expect.parallel-change-f-to-main actual
ok 13 - -M -L ':f:b.c' parallel-change
expecting success:
git log -L 4,12:a.c -L :main:a.c simple >actual &&
test_cmp "$TEST_DIRECTORY"/t4211/expect.multiple actual
ok 14 - -L 4,12:a.c -L :main:a.c simple
expecting success:
git log -L 4,18:a.c -L ^:main:a.c simple >actual &&
test_cmp "$TEST_DIRECTORY"/t4211/expect.multiple-overlapping actual
ok 15 - -L 4,18:a.c -L ^:main:a.c simple
expecting success:
git log -L :main:a.c -L 4,18:a.c simple >actual &&
test_cmp "$TEST_DIRECTORY"/t4211/expect.multiple-overlapping actual
ok 16 - -L :main:a.c -L 4,18:a.c simple
expecting success:
git log -L 4:a.c -L 8,12:a.c simple >actual &&
test_cmp "$TEST_DIRECTORY"/t4211/expect.multiple-superset actual
ok 17 - -L 4:a.c -L 8,12:a.c simple
expecting success:
git log -L 8,12:a.c -L 4:a.c simple >actual &&
test_cmp "$TEST_DIRECTORY"/t4211/expect.multiple-superset actual
ok 18 - -L 8,12:a.c -L 4:a.c simple
expecting success:
test_must_fail git log -L 2>errors &&
test_i18ngrep 'switch.*requires a value' errors
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: switch `L' requires a value
ok 19 - invalid args: -L
expecting success:
test_must_fail git log -L b.c 2>errors &&
test_i18ngrep 'argument not .start,end:file' errors
fatal: -L argument not 'start,end:file' or ':funcname:file': b.c
ok 20 - invalid args: -L b.c
expecting success:
test_must_fail git log -L 1: 2>errors &&
test_i18ngrep 'argument not .start,end:file' errors
fatal: -L argument not 'start,end:file' or ':funcname:file': 1:
ok 21 - invalid args: -L 1:
expecting success:
test_must_fail git log -L 1:nonexistent 2>errors &&
test_i18ngrep 'There is no path' errors
fatal: There is no path nonexistent in the commit
ok 22 - invalid args: -L 1:nonexistent
expecting success:
test_must_fail git log -L 1:simple 2>errors &&
test_i18ngrep 'There is no path' errors
fatal: There is no path simple in the commit
ok 23 - invalid args: -L 1:simple
expecting success:
test_must_fail git log -L '/foo:b.c' 2>errors &&
test_i18ngrep 'argument not .start,end:file' errors
fatal: -L argument not 'start,end:file' or ':funcname:file': /foo:b.c
ok 24 - invalid args: -L '/foo:b.c'
expecting success:
test_must_fail git log -L 1000:b.c 2>errors &&
test_i18ngrep 'has only.*lines' errors
fatal: file b.c has only 26 lines
ok 25 - invalid args: -L 1000:b.c
expecting success:
test_must_fail git log -L :b.c 2>errors &&
test_i18ngrep 'argument not .start,end:file' errors
fatal: -L argument not 'start,end:file' or ':funcname:file': :b.c
ok 26 - invalid args: -L :b.c
expecting success:
test_must_fail git log -L :foo:b.c 2>errors &&
test_i18ngrep 'no match' errors
fatal: -L parameter 'foo' starting at line 1: no match
ok 27 - invalid args: -L :foo:b.c
expecting success:
n=$(wc -l <b.c) &&
git log -L $n:b.c
commit 0d8dcfc6b968e06a27d5215bad1fdde3de9d6235
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:50:24 2013 +0100
move within the file
diff --git a/b.c b/b.c
--- a/b.c
+++ b/b.c
@@ -25,0 +26,1 @@
+}
ok 28 - -L X (X == nlines)
expecting success:
n=$(expr $(wc -l <b.c) + 1) &&
test_must_fail git log -L $n:b.c
fatal: file b.c has only 26 lines
ok 29 - -L X (X == nlines + 1)
expecting success:
n=$(expr $(wc -l <b.c) + 2) &&
test_must_fail git log -L $n:b.c
fatal: file b.c has only 26 lines
ok 30 - -L X (X == nlines + 2)
expecting success:
n=$(printf "%d" $(wc -l <b.c)) &&
git log -L ,$n:b.c
commit 0d8dcfc6b968e06a27d5215bad1fdde3de9d6235
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:50:24 2013 +0100
move within the file
diff --git a/b.c b/b.c
--- a/b.c
+++ b/b.c
@@ -1,24 +1,26 @@
#include <unistd.h>
#include <stdio.h>
-long f(long x)
-{
- int s = 0;
- while (x) {
- x /= 2;
- s++;
- }
- return s;
-}
+long f(long x);
/*
* This is only an example!
*/
int main ()
{
printf("%ld\n", f(15));
return 0;
}
/* incomplete lines are bad! */
+
+long f(long x)
+{
+ int s = 0;
+ while (x) {
+ x /= 2;
+ s++;
+ }
+ return s;
+}
commit 6ce3c4ff690136099bb17e1a8766b75764726ea7
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:49:50 2013 +0100
another simple change
diff --git a/b.c b/b.c
--- a/b.c
+++ b/b.c
@@ -1,24 +1,24 @@
#include <unistd.h>
#include <stdio.h>
long f(long x)
{
int s = 0;
while (x) {
- x >>= 1;
+ x /= 2;
s++;
}
return s;
}
/*
* This is only an example!
*/
int main ()
{
printf("%ld\n", f(15));
return 0;
}
/* incomplete lines are bad! */
commit 4659538844daa2849b1a9e7d6fadb96fcd26fc83
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:48:43 2013 +0100
change back to complete line
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -1,22 +1,24 @@
#include <unistd.h>
#include <stdio.h>
long f(long x)
{
int s = 0;
while (x) {
x >>= 1;
s++;
}
return s;
}
/*
* This is only an example!
*/
int main ()
{
printf("%ld\n", f(15));
return 0;
-}
\ No newline at end of file
+}
+
+/* incomplete lines are bad! */
commit 100b61a6f2f720f812620a9d10afb3a960ccb73c
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:48:10 2013 +0100
change to an incomplete line at end
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -1,22 +1,22 @@
#include <unistd.h>
#include <stdio.h>
long f(long x)
{
int s = 0;
while (x) {
x >>= 1;
s++;
}
return s;
}
/*
* This is only an example!
*/
int main ()
{
printf("%ld\n", f(15));
return 0;
-}
+}
\ No newline at end of file
commit 4a23ae5c98d59a58c6da036156959f2dc9f472ad
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:47:40 2013 +0100
change at very beginning
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -1,21 +1,22 @@
+#include <unistd.h>
#include <stdio.h>
long f(long x)
{
int s = 0;
while (x) {
x >>= 1;
s++;
}
return s;
}
/*
* This is only an example!
*/
int main ()
{
printf("%ld\n", f(15));
return 0;
}
commit 39b6eb2d5b706d3322184a169f666f25ed3fbd00
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:45:41 2013 +0100
touch comment
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -1,21 +1,21 @@
#include <stdio.h>
long f(long x)
{
int s = 0;
while (x) {
x >>= 1;
s++;
}
return s;
}
/*
- * A comment.
+ * This is only an example!
*/
int main ()
{
printf("%ld\n", f(15));
return 0;
}
commit a6eb82647d5d67f893da442f8f9375fd89a3b1e2
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:45:16 2013 +0100
touch both functions
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -1,21 +1,21 @@
#include <stdio.h>
-int f(int x)
+long f(long x)
{
int s = 0;
while (x) {
x >>= 1;
s++;
}
return s;
}
/*
* A comment.
*/
int main ()
{
- printf("%d\n", f(15));
+ printf("%ld\n", f(15));
return 0;
}
commit f04fb20f2c77850996cba739709acc6faecc58f7
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:44:55 2013 +0100
change f()
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -1,20 +1,21 @@
#include <stdio.h>
int f(int x)
{
int s = 0;
while (x) {
x >>= 1;
s++;
}
+ return s;
}
/*
* A comment.
*/
int main ()
{
printf("%d\n", f(15));
return 0;
}
commit de4c48ae814792c02a49c4c3c0c757ae69c55f6a
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:44:48 2013 +0100
initial
diff --git a/a.c b/a.c
--- /dev/null
+++ b/a.c
@@ -0,0 +1,20 @@
+#include <stdio.h>
+
+int f(int x)
+{
+ int s = 0;
+ while (x) {
+ x >>= 1;
+ s++;
+ }
+}
+
+/*
+ * A comment.
+ */
+
+int main ()
+{
+ printf("%d\n", f(15));
+ return 0;
+}
ok 31 - -L ,Y (Y == nlines)
expecting success:
n=$(expr $(wc -l <b.c) + 1) &&
git log -L ,$n:b.c
commit 0d8dcfc6b968e06a27d5215bad1fdde3de9d6235
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:50:24 2013 +0100
move within the file
diff --git a/b.c b/b.c
--- a/b.c
+++ b/b.c
@@ -1,24 +1,26 @@
#include <unistd.h>
#include <stdio.h>
-long f(long x)
-{
- int s = 0;
- while (x) {
- x /= 2;
- s++;
- }
- return s;
-}
+long f(long x);
/*
* This is only an example!
*/
int main ()
{
printf("%ld\n", f(15));
return 0;
}
/* incomplete lines are bad! */
+
+long f(long x)
+{
+ int s = 0;
+ while (x) {
+ x /= 2;
+ s++;
+ }
+ return s;
+}
commit 6ce3c4ff690136099bb17e1a8766b75764726ea7
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:49:50 2013 +0100
another simple change
diff --git a/b.c b/b.c
--- a/b.c
+++ b/b.c
@@ -1,24 +1,24 @@
#include <unistd.h>
#include <stdio.h>
long f(long x)
{
int s = 0;
while (x) {
- x >>= 1;
+ x /= 2;
s++;
}
return s;
}
/*
* This is only an example!
*/
int main ()
{
printf("%ld\n", f(15));
return 0;
}
/* incomplete lines are bad! */
commit 4659538844daa2849b1a9e7d6fadb96fcd26fc83
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:48:43 2013 +0100
change back to complete line
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -1,22 +1,24 @@
#include <unistd.h>
#include <stdio.h>
long f(long x)
{
int s = 0;
while (x) {
x >>= 1;
s++;
}
return s;
}
/*
* This is only an example!
*/
int main ()
{
printf("%ld\n", f(15));
return 0;
-}
\ No newline at end of file
+}
+
+/* incomplete lines are bad! */
commit 100b61a6f2f720f812620a9d10afb3a960ccb73c
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:48:10 2013 +0100
change to an incomplete line at end
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -1,22 +1,22 @@
#include <unistd.h>
#include <stdio.h>
long f(long x)
{
int s = 0;
while (x) {
x >>= 1;
s++;
}
return s;
}
/*
* This is only an example!
*/
int main ()
{
printf("%ld\n", f(15));
return 0;
-}
+}
\ No newline at end of file
commit 4a23ae5c98d59a58c6da036156959f2dc9f472ad
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:47:40 2013 +0100
change at very beginning
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -1,21 +1,22 @@
+#include <unistd.h>
#include <stdio.h>
long f(long x)
{
int s = 0;
while (x) {
x >>= 1;
s++;
}
return s;
}
/*
* This is only an example!
*/
int main ()
{
printf("%ld\n", f(15));
return 0;
}
commit 39b6eb2d5b706d3322184a169f666f25ed3fbd00
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:45:41 2013 +0100
touch comment
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -1,21 +1,21 @@
#include <stdio.h>
long f(long x)
{
int s = 0;
while (x) {
x >>= 1;
s++;
}
return s;
}
/*
- * A comment.
+ * This is only an example!
*/
int main ()
{
printf("%ld\n", f(15));
return 0;
}
commit a6eb82647d5d67f893da442f8f9375fd89a3b1e2
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:45:16 2013 +0100
touch both functions
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -1,21 +1,21 @@
#include <stdio.h>
-int f(int x)
+long f(long x)
{
int s = 0;
while (x) {
x >>= 1;
s++;
}
return s;
}
/*
* A comment.
*/
int main ()
{
- printf("%d\n", f(15));
+ printf("%ld\n", f(15));
return 0;
}
commit f04fb20f2c77850996cba739709acc6faecc58f7
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:44:55 2013 +0100
change f()
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -1,20 +1,21 @@
#include <stdio.h>
int f(int x)
{
int s = 0;
while (x) {
x >>= 1;
s++;
}
+ return s;
}
/*
* A comment.
*/
int main ()
{
printf("%d\n", f(15));
return 0;
}
commit de4c48ae814792c02a49c4c3c0c757ae69c55f6a
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:44:48 2013 +0100
initial
diff --git a/a.c b/a.c
--- /dev/null
+++ b/a.c
@@ -0,0 +1,20 @@
+#include <stdio.h>
+
+int f(int x)
+{
+ int s = 0;
+ while (x) {
+ x >>= 1;
+ s++;
+ }
+}
+
+/*
+ * A comment.
+ */
+
+int main ()
+{
+ printf("%d\n", f(15));
+ return 0;
+}
ok 32 - -L ,Y (Y == nlines + 1)
expecting success:
n=$(expr $(wc -l <b.c) + 2) &&
git log -L ,$n:b.c
commit 0d8dcfc6b968e06a27d5215bad1fdde3de9d6235
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:50:24 2013 +0100
move within the file
diff --git a/b.c b/b.c
--- a/b.c
+++ b/b.c
@@ -1,24 +1,26 @@
#include <unistd.h>
#include <stdio.h>
-long f(long x)
-{
- int s = 0;
- while (x) {
- x /= 2;
- s++;
- }
- return s;
-}
+long f(long x);
/*
* This is only an example!
*/
int main ()
{
printf("%ld\n", f(15));
return 0;
}
/* incomplete lines are bad! */
+
+long f(long x)
+{
+ int s = 0;
+ while (x) {
+ x /= 2;
+ s++;
+ }
+ return s;
+}
commit 6ce3c4ff690136099bb17e1a8766b75764726ea7
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:49:50 2013 +0100
another simple change
diff --git a/b.c b/b.c
--- a/b.c
+++ b/b.c
@@ -1,24 +1,24 @@
#include <unistd.h>
#include <stdio.h>
long f(long x)
{
int s = 0;
while (x) {
- x >>= 1;
+ x /= 2;
s++;
}
return s;
}
/*
* This is only an example!
*/
int main ()
{
printf("%ld\n", f(15));
return 0;
}
/* incomplete lines are bad! */
commit 4659538844daa2849b1a9e7d6fadb96fcd26fc83
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:48:43 2013 +0100
change back to complete line
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -1,22 +1,24 @@
#include <unistd.h>
#include <stdio.h>
long f(long x)
{
int s = 0;
while (x) {
x >>= 1;
s++;
}
return s;
}
/*
* This is only an example!
*/
int main ()
{
printf("%ld\n", f(15));
return 0;
-}
\ No newline at end of file
+}
+
+/* incomplete lines are bad! */
commit 100b61a6f2f720f812620a9d10afb3a960ccb73c
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:48:10 2013 +0100
change to an incomplete line at end
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -1,22 +1,22 @@
#include <unistd.h>
#include <stdio.h>
long f(long x)
{
int s = 0;
while (x) {
x >>= 1;
s++;
}
return s;
}
/*
* This is only an example!
*/
int main ()
{
printf("%ld\n", f(15));
return 0;
-}
+}
\ No newline at end of file
commit 4a23ae5c98d59a58c6da036156959f2dc9f472ad
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:47:40 2013 +0100
change at very beginning
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -1,21 +1,22 @@
+#include <unistd.h>
#include <stdio.h>
long f(long x)
{
int s = 0;
while (x) {
x >>= 1;
s++;
}
return s;
}
/*
* This is only an example!
*/
int main ()
{
printf("%ld\n", f(15));
return 0;
}
commit 39b6eb2d5b706d3322184a169f666f25ed3fbd00
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:45:41 2013 +0100
touch comment
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -1,21 +1,21 @@
#include <stdio.h>
long f(long x)
{
int s = 0;
while (x) {
x >>= 1;
s++;
}
return s;
}
/*
- * A comment.
+ * This is only an example!
*/
int main ()
{
printf("%ld\n", f(15));
return 0;
}
commit a6eb82647d5d67f893da442f8f9375fd89a3b1e2
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:45:16 2013 +0100
touch both functions
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -1,21 +1,21 @@
#include <stdio.h>
-int f(int x)
+long f(long x)
{
int s = 0;
while (x) {
x >>= 1;
s++;
}
return s;
}
/*
* A comment.
*/
int main ()
{
- printf("%d\n", f(15));
+ printf("%ld\n", f(15));
return 0;
}
commit f04fb20f2c77850996cba739709acc6faecc58f7
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:44:55 2013 +0100
change f()
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -1,20 +1,21 @@
#include <stdio.h>
int f(int x)
{
int s = 0;
while (x) {
x >>= 1;
s++;
}
+ return s;
}
/*
* A comment.
*/
int main ()
{
printf("%d\n", f(15));
return 0;
}
commit de4c48ae814792c02a49c4c3c0c757ae69c55f6a
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:44:48 2013 +0100
initial
diff --git a/a.c b/a.c
--- /dev/null
+++ b/a.c
@@ -0,0 +1,20 @@
+#include <stdio.h>
+
+int f(int x)
+{
+ int s = 0;
+ while (x) {
+ x >>= 1;
+ s++;
+ }
+}
+
+/*
+ * A comment.
+ */
+
+int main ()
+{
+ printf("%d\n", f(15));
+ return 0;
+}
ok 33 - -L ,Y (Y == nlines + 2)
expecting success:
git checkout parallel-change &&
git log --first-parent -L 1,1:b.c
Switched to branch 'parallel-change'
commit 4a23ae5c98d59a58c6da036156959f2dc9f472ad
Author: Thomas Rast <trast@student.ethz.ch>
Date: Thu Feb 28 10:47:40 2013 +0100
change at very beginning
diff --git a/a.c b/a.c
--- a/a.c
+++ b/a.c
@@ -0,0 +1,1 @@
+#include <unistd.h>
ok 34 - -L with --first-parent and a merge
expecting success:
git checkout parallel-change &&
git log --output=log -L :main:b.c >output &&
test_must_be_empty output &&
test_line_count = 70 log
Already on 'parallel-change'
ok 35 - -L with --output
expecting success:
test_seq 500 > c.c &&
git add c.c &&
git commit -m "many lines" &&
test_seq 1000 > c.c &&
git add c.c &&
git commit -m "modify many lines" &&
git log $(for x in $(test_seq 200); do echo -L $((2*x)),+1:c.c; done)
[parallel-change 1ac7c81] many lines
Author: A U Thor <author@example.com>
1 file changed, 500 insertions(+)
create mode 100644 c.c
[parallel-change dd14458] modify many lines
Author: A U Thor <author@example.com>
1 file changed, 500 insertions(+)
commit 1ac7c8109c60e0733b426cb90b7e1ea822788ba8
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:29:41 2019 +0000
many lines
diff --git a/c.c b/c.c
--- /dev/null
+++ b/c.c
@@ -0,0 +2,1 @@
+2
ok 36 - range_set_union
expecting success:
git log --format="commit %s" -L1,24:b.c >expect.raw &&
grep ^commit expect.raw >expect &&
git log --format="commit %s" -L1,24:b.c -s >actual &&
test_cmp expect actual
ok 37 - -s shows only line-log commits
expecting success:
git log -L1,24:b.c >expect &&
git log -L1,24:b.c -p >actual &&
test_cmp expect actual
ok 38 - -p shows the default patch output
expecting success:
test_must_fail git log -L1,24:b.c --raw
fatal: -L does not yet support diff formats besides -p and -s
ok 39 - --raw is forbidden
# passed all 39 test(s)
1..39
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4252-am-options.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4252-am-options/.git/
expecting success:
cp "$tm/file-1-0" file-1 &&
cp "$tm/file-2-0" file-2 &&
git add file-1 file-2 &&
test_tick &&
git commit -m initial &&
git tag initial
[master (root-commit) f06d5e1] initial
Author: A U Thor <author@example.com>
2 files changed, 14 insertions(+)
create mode 100644 file-1
create mode 100644 file-2
ok 1 - setup
expecting success:
rm -rf .git/rebase-apply &&
git reset --hard initial &&
test_must_fail git am --whitespace=fix "$tm"/am-test-1-? &&
git am --skip &&
grep 3 file-1 &&
grep "^Six$" file-2
HEAD is now at f06d5e1 initial
.git/rebase-apply/patch:9: trailing whitespace.
Three
error: patch failed: file-1:1
error: file-1: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: Three
Patch failed at 0001 Three
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
.git/rebase-apply/patch:13: trailing whitespace.
Six
warning: 1 line applied after fixing whitespace errors.
Applying: Six
3
Six
ok 2 - interrupted am --whitespace=fix
expecting success:
rm -rf .git/rebase-apply &&
git reset --hard initial &&
test_must_fail git am -C1 "$tm"/am-test-2-? &&
git am --skip &&
grep 3 file-1 &&
grep "^Three$" file-2
HEAD is now at f06d5e1 initial
.git/rebase-apply/patch:9: trailing whitespace.
Three
error: patch failed: file-1:1
error: file-1: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: Three
Patch failed at 0001 Three
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Context reduced to (1/1) to apply fragment at 2
Applying: Six
3
Three
ok 3 - interrupted am -C1
expecting success:
rm -rf .git/rebase-apply &&
git reset --hard initial &&
test_must_fail git am -p2 "$tm"/am-test-3-? &&
git am --skip &&
grep 3 file-1 &&
grep "^Three$" file-2
HEAD is now at f06d5e1 initial
.git/rebase-apply/patch:9: trailing whitespace.
Three
error: patch failed: file-1:1
error: file-1: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: Three
Patch failed at 0001 Three
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Applying: Six
3
Three
ok 4 - interrupted am -p2
expecting success:
rm -rf .git/rebase-apply &&
git reset --hard initial &&
test_must_fail git am -p2 -C1 "$tm"/am-test-4-? &&
git am --skip &&
grep 3 file-1 &&
grep "^Three$" file-2
HEAD is now at f06d5e1 initial
.git/rebase-apply/patch:9: trailing whitespace.
Three
error: patch failed: file-1:1
error: file-1: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: Three
Patch failed at 0001 Three
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Context reduced to (1/1) to apply fragment at 2
Applying: Six
3
Three
ok 5 - interrupted am -C1 -p2
expecting success:
rm -rf .git/rebase-apply &&
git reset --hard initial &&
test_must_fail git am --directory="frotz nitfol" "$tm"/am-test-5-? &&
git am --skip &&
grep One "frotz nitfol/file-5"
HEAD is now at f06d5e1 initial
error: frotz nitfol/junk/file-2: does not exist in index
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: Six
Patch failed at 0001 Six
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Applying: Six
One
ok 6 - interrupted am --directory="frotz nitfol"
expecting success:
with_sq="with'sq" &&
rm -fr .git/rebase-apply &&
git reset --hard initial &&
git am --directory="$with_sq" "$tm"/am-test-5-2 &&
test -f "$with_sq/file-5"
HEAD is now at f06d5e1 initial
Applying: Six
ok 7 - apply to a funny path
expecting success:
rm -rf .git/rebase-apply &&
git reset --hard initial &&
test_must_fail git am --reject "$tm"/am-test-6-1 &&
grep "@@ -1,3 +1,3 @@" file-2.rej &&
test_must_fail git diff-files --exit-code --quiet file-2 &&
grep "[-]-reject" .git/rebase-apply/apply-opt
HEAD is now at f06d5e1 initial
Checking patch file-2...
error: while searching for:
0
2
3
error: patch failed: file-2:1
Applying patch file-2 with 1 reject...
Rejected hunk #1.
Hunk #2 applied cleanly.
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: Huh
Patch failed at 0001 Huh
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
@@ -1,3 +1,3 @@
'--reject'
ok 8 - am --reject
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4254-am-corrupt.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4254-am-corrupt/.git/
expecting success:
# Note the missing "+++" line:
cat >bad-patch.diff <<-\EOF &&
From: A U Thor <au.thor@example.com>
diff --git a/f b/f
index 7898192..6178079 100644
--- a/f
@@ -1 +1 @@
-a
+b
EOF
echo a >f &&
git add f &&
test_tick &&
git commit -m initial
[master (root-commit) 07398d1] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 f
ok 1 - setup
expecting success:
test_must_fail git -c advice.amWorkDir=false am bad-patch.diff 2>actual
Applying:
Patch failed at 0001
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 2 - try to apply corrupted patch
expecting success:
echo "error: git diff header lacks filename information (line 4)" >expected &&
test_path_is_file f &&
test_i18ncmp expected actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 3 - compare diagnostic; ensure file is still here
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4253-am-keep-cr-dos.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4253-am-keep-cr-dos/.git/
expecting success:
append_cr <file1 >file &&
git add file &&
git commit -m Initial &&
git tag initial &&
append_cr <file2 >file &&
git commit -a -m Second &&
append_cr <file3 >file &&
git commit -a -m Third
[master (root-commit) 5000b2d] Initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master c9681ce] Second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 59b35e2] Third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup repository with dos files
expecting success:
git checkout -b dosfiles initial &&
git format-patch -k initial..master &&
test_must_fail git am -k -3 000*.patch &&
git am --abort &&
rm -rf .git/rebase-apply 000*.patch
Switched to a new branch 'dosfiles'
0001-Second.patch
0002-Third.patch
Applying: Second
error: patch failed: file:1
error: file: patch does not apply
error: Did you hand edit your patch?
It does not apply to blobs recorded in its index.
hint: Use 'git am --show-current-patch' to see the failed patch
Using index info to reconstruct a base tree...
Patch failed at 0001 Second
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 2 - am with dos files without --keep-cr
expecting success:
git checkout -b dosfiles-keep-cr initial &&
git format-patch -k --stdout initial..master >output &&
git am --keep-cr -k -3 output &&
git diff --exit-code master
Switched to a new branch 'dosfiles-keep-cr'
Applying: Second
Applying: Third
ok 3 - am with dos files with --keep-cr
expecting success:
git config am.keepcr 1 &&
git checkout -b dosfiles-conf-keepcr initial &&
git format-patch -k --stdout initial..master >output &&
git am -k -3 output &&
git diff --exit-code master
Switched to a new branch 'dosfiles-conf-keepcr'
Applying: Second
Applying: Third
ok 4 - am with dos files config am.keepcr
expecting success:
git config am.keepcr 1 &&
git checkout -b dosfiles-conf-keepcr-override initial &&
git format-patch -k initial..master &&
test_must_fail git am -k -3 --no-keep-cr 000*.patch &&
git am --abort &&
rm -rf .git/rebase-apply 000*.patch
Switched to a new branch 'dosfiles-conf-keepcr-override'
0001-Second.patch
0002-Third.patch
Applying: Second
error: patch failed: file:1
error: file: patch does not apply
error: Did you hand edit your patch?
It does not apply to blobs recorded in its index.
hint: Use 'git am --show-current-patch' to see the failed patch
Using index info to reconstruct a base tree...
Patch failed at 0001 Second
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 5 - am with dos files config am.keepcr overridden by --no-keep-cr
expecting success:
git checkout -b dosfiles-keep-cr-continue initial &&
git format-patch -k initial..master &&
append_cr <file1a >file &&
git commit -m "different patch" file &&
test_must_fail git am --keep-cr -k -3 000*.patch &&
append_cr <file2 >file &&
git add file &&
git am -3 --resolved &&
git diff --exit-code master
Switched to a new branch 'dosfiles-keep-cr-continue'
0001-Second.patch
0002-Third.patch
[dosfiles-keep-cr-continue f56d911] different patch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Applying: Second
Using index info to reconstruct a base tree...
M file
Falling back to patching base and 3-way merge...
Merging:
f56d911 different patch
virtual Second
found 1 common ancestor:
virtual 0626bbef2b13f86fc002fb580ec5fac3fd75fa44
Auto-merging file
CONFLICT (content): Merge conflict in file
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 Second
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Applying: Second
Applying: Third
ok 6 - am with dos files with --keep-cr continue
expecting success:
git config am.keepcr 1 &&
git checkout -b unixfiles-conf-keepcr-override initial &&
cp -f file1 file &&
git commit -m "line ending to unix" file &&
git format-patch -k initial..master &&
git am -k -3 --no-keep-cr 000*.patch &&
git diff --exit-code -w master
Switched to a new branch 'unixfiles-conf-keepcr-override'
[unixfiles-conf-keepcr-override a90b4ed] line ending to unix
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
0001-Second.patch
0002-Third.patch
Applying: Second
Applying: Third
ok 7 - am with unix files config am.keepcr overridden by --no-keep-cr
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4213-log-tabexpand.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4213-log-tabexpand/.git/
expecting success:
test_tick &&
sed -e "s/Q/$HT/g" <<-EOF >msg &&
Q$title
Q$body
EOF
git commit --allow-empty -F msg
[master (root-commit) 4243c44] tab indent at the beginning of the title line
Author: A U Thor <author@example.com>
ok 1 - setup
expecting success:
count_expand $in $default $fmt &&
count_expand $in 8 0 $fmt --expand-tabs &&
count_expand $in 8 0 --expand-tabs $fmt &&
count_expand $in 8 0 $fmt --expand-tabs=8 &&
count_expand $in 8 0 --expand-tabs=8 $fmt &&
count_expand $in 0 1 $fmt --no-expand-tabs &&
count_expand $in 0 1 --no-expand-tabs $fmt &&
count_expand $in 0 1 $fmt --expand-tabs=0 &&
count_expand $in 0 1 --expand-tabs=0 $fmt &&
count_expand $in 4 0 $fmt --expand-tabs=4 &&
count_expand $in 4 0 --expand-tabs=4 $fmt
ok 2 - expand/no-expand
expecting success:
count_expand $in $default $fmt &&
count_expand $in 8 0 $fmt --expand-tabs &&
count_expand $in 8 0 --expand-tabs $fmt &&
count_expand $in 8 0 $fmt --expand-tabs=8 &&
count_expand $in 8 0 --expand-tabs=8 $fmt &&
count_expand $in 0 1 $fmt --no-expand-tabs &&
count_expand $in 0 1 --no-expand-tabs $fmt &&
count_expand $in 0 1 $fmt --expand-tabs=0 &&
count_expand $in 0 1 --expand-tabs=0 $fmt &&
count_expand $in 4 0 $fmt --expand-tabs=4 &&
count_expand $in 4 0 --expand-tabs=4 $fmt
ok 3 - expand/no-expand for --pretty
expecting success:
count_expand $in $default $fmt &&
count_expand $in 8 0 $fmt --expand-tabs &&
count_expand $in 8 0 --expand-tabs $fmt &&
count_expand $in 8 0 $fmt --expand-tabs=8 &&
count_expand $in 8 0 --expand-tabs=8 $fmt &&
count_expand $in 0 1 $fmt --no-expand-tabs &&
count_expand $in 0 1 --no-expand-tabs $fmt &&
count_expand $in 0 1 $fmt --expand-tabs=0 &&
count_expand $in 0 1 --expand-tabs=0 $fmt &&
count_expand $in 4 0 $fmt --expand-tabs=4 &&
count_expand $in 4 0 --expand-tabs=4 $fmt
ok 4 - expand/no-expand for --pretty=short
expecting success:
count_expand $in $default $fmt &&
count_expand $in 8 0 $fmt --expand-tabs &&
count_expand $in 8 0 --expand-tabs $fmt &&
count_expand $in 8 0 $fmt --expand-tabs=8 &&
count_expand $in 8 0 --expand-tabs=8 $fmt &&
count_expand $in 0 1 $fmt --no-expand-tabs &&
count_expand $in 0 1 --no-expand-tabs $fmt &&
count_expand $in 0 1 $fmt --expand-tabs=0 &&
count_expand $in 0 1 --expand-tabs=0 $fmt &&
count_expand $in 4 0 $fmt --expand-tabs=4 &&
count_expand $in 4 0 --expand-tabs=4 $fmt
ok 5 - expand/no-expand for --pretty=medium
expecting success:
count_expand $in $default $fmt &&
count_expand $in 8 0 $fmt --expand-tabs &&
count_expand $in 8 0 --expand-tabs $fmt &&
count_expand $in 8 0 $fmt --expand-tabs=8 &&
count_expand $in 8 0 --expand-tabs=8 $fmt &&
count_expand $in 0 1 $fmt --no-expand-tabs &&
count_expand $in 0 1 --no-expand-tabs $fmt &&
count_expand $in 0 1 $fmt --expand-tabs=0 &&
count_expand $in 0 1 --expand-tabs=0 $fmt &&
count_expand $in 4 0 $fmt --expand-tabs=4 &&
count_expand $in 4 0 --expand-tabs=4 $fmt
ok 6 - expand/no-expand for --pretty=full
expecting success:
count_expand $in $default $fmt &&
count_expand $in 8 0 $fmt --expand-tabs &&
count_expand $in 8 0 --expand-tabs $fmt &&
count_expand $in 8 0 $fmt --expand-tabs=8 &&
count_expand $in 8 0 --expand-tabs=8 $fmt &&
count_expand $in 0 1 $fmt --no-expand-tabs &&
count_expand $in 0 1 --no-expand-tabs $fmt &&
count_expand $in 0 1 $fmt --expand-tabs=0 &&
count_expand $in 0 1 --expand-tabs=0 $fmt &&
count_expand $in 4 0 $fmt --expand-tabs=4 &&
count_expand $in 4 0 --expand-tabs=4 $fmt
ok 7 - expand/no-expand for --pretty=fuller
expecting success:
count_expand $in $default $fmt &&
count_expand $in 8 0 $fmt --expand-tabs &&
count_expand $in 8 0 --expand-tabs $fmt &&
count_expand $in 8 0 $fmt --expand-tabs=8 &&
count_expand $in 8 0 --expand-tabs=8 $fmt &&
count_expand $in 0 1 $fmt --no-expand-tabs &&
count_expand $in 0 1 --no-expand-tabs $fmt &&
count_expand $in 0 1 $fmt --expand-tabs=0 &&
count_expand $in 0 1 --expand-tabs=0 $fmt &&
count_expand $in 4 0 $fmt --expand-tabs=4 &&
count_expand $in 4 0 --expand-tabs=4 $fmt
ok 8 - expand/no-expand for --pretty=raw
expecting success:
count_expand $in $default $fmt &&
count_expand $in 8 0 $fmt --expand-tabs &&
count_expand $in 8 0 --expand-tabs $fmt &&
count_expand $in 8 0 $fmt --expand-tabs=8 &&
count_expand $in 8 0 --expand-tabs=8 $fmt &&
count_expand $in 0 1 $fmt --no-expand-tabs &&
count_expand $in 0 1 --no-expand-tabs $fmt &&
count_expand $in 0 1 $fmt --expand-tabs=0 &&
count_expand $in 0 1 --expand-tabs=0 $fmt &&
count_expand $in 4 0 $fmt --expand-tabs=4 &&
count_expand $in 4 0 --expand-tabs=4 $fmt
ok 9 - expand/no-expand for --pretty=email
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4256-am-format-flowed.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4256-am-format-flowed/.git/
expecting success:
cp "$TEST_DIRECTORY/t4256/1/mailinfo.c.orig" mailinfo.c &&
git add mailinfo.c &&
git commit -m initial
[master (root-commit) d7e3fad] initial
Author: A U Thor <author@example.com>
1 file changed, 1185 insertions(+)
create mode 100644 mailinfo.c
ok 1 - setup
expecting success:
git am <"$TEST_DIRECTORY/t4256/1/patch" >stdout 2>stderr &&
test_i18ngrep "warning: Patch sent with format=flowed" stderr &&
test_cmp "$TEST_DIRECTORY/t4256/1/mailinfo.c" mailinfo.c
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
warning: Patch sent with format=flowed; space at the end of lines might be lost.
ok 2 - am with format=flowed
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4257-am-interactive.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4257-am-interactive/.git/
expecting success:
test_commit unrelated &&
test_commit no-conflict &&
test_commit conflict-patch file patch &&
git format-patch --stdout -2 >mbox &&
git reset --hard unrelated &&
test_commit conflict-master file master base
[master (root-commit) 16dd07d] unrelated
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 unrelated.t
[master 7c8fce7] no-conflict
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 no-conflict.t
[master fe3fedc] conflict-patch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
HEAD is now at 16dd07d unrelated
[master e7f9e2c] conflict-master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 1 - set up patches to apply
expecting success:
test_must_fail git am mbox &&
echo resolved >file &&
git add -u &&
git am --resolved
error: file: already exists in index
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: no-conflict
Applying: conflict-patch
Patch failed at 0002 conflict-patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Applying: conflict-patch
ok 2 - applying all patches generates conflict
expecting success:
git reset --hard base &&
# apply the first, but not the second
test_write_lines y n | git am -i mbox &&
echo no-conflict >expect &&
git log -1 --format=%s >actual &&
test_cmp expect actual
HEAD is now at e7f9e2c conflict-master
Commit Body is:
--------------------------
no-conflict
--------------------------
Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all: Applying: no-conflict
Commit Body is:
--------------------------
conflict-patch
--------------------------
Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all: ok 3 - interactive am can apply a single patch
expecting success:
git reset --hard base &&
# apply both; the second one will conflict
test_write_lines y y | test_must_fail git am -i mbox &&
echo resolved >file &&
git add -u &&
# interactive "--resolved" will ask us if we want to apply the result
echo y | git am -i --resolved &&
echo conflict-patch >expect &&
git log -1 --format=%s >actual &&
test_cmp expect actual &&
echo resolved >expect &&
git cat-file blob HEAD:file >actual &&
test_cmp expect actual
HEAD is now at e7f9e2c conflict-master
error: file: already exists in index
hint: Use 'git am --show-current-patch' to see the failed patch
Commit Body is:
--------------------------
no-conflict
--------------------------
Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all: Applying: no-conflict
Commit Body is:
--------------------------
conflict-patch
--------------------------
Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all: Applying: conflict-patch
Patch failed at 0002 conflict-patch
When you have resolved this problem, run "git am -i --continue".
If you prefer to skip this patch, run "git am -i --skip" instead.
To restore the original branch and stop patching, run "git am -i --abort".
Applying: conflict-patch
Commit Body is:
--------------------------
conflict-patch
--------------------------
Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all: ok 4 - interactive am can resolve conflict
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4300-merge-tree.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4300-merge-tree/.git/
expecting success:
test_commit "initial" "initial-file" "initial"
[master (root-commit) c1d16d8] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial-file
ok 1 - setup
expecting success:
cat >expected <<\EXPECTED &&
added in remote
their 100644 43d5a8ed6ef6c00ff775008633f95787d088285d ONE
@@ -0,0 +1 @@
+AAA
EXPECTED
git reset --hard initial &&
test_commit "add-a-not-b" "ONE" "AAA" &&
git merge-tree initial initial add-a-not-b >actual &&
test_cmp expected actual
HEAD is now at c1d16d8 initial
[master e55b628] add-a-not-b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 ONE
ok 2 - file add A, !B
expecting success:
git reset --hard initial &&
test_commit "add-not-a-b" "ONE" "AAA" &&
git merge-tree initial add-not-a-b initial >actual &&
test_must_be_empty actual
HEAD is now at c1d16d8 initial
[master fe72a09] add-not-a-b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 ONE
ok 3 - file add !A, B
expecting success:
git reset --hard initial &&
test_commit "add-a-b-same-A" "ONE" "AAA" &&
git reset --hard initial &&
test_commit "add-a-b-same-B" "ONE" "AAA" &&
git merge-tree initial add-a-b-same-A add-a-b-same-B >actual &&
test_must_be_empty actual
HEAD is now at c1d16d8 initial
[master adad022] add-a-b-same-A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 ONE
HEAD is now at c1d16d8 initial
[master c566426] add-a-b-same-B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 ONE
ok 4 - file add A, B (same)
expecting success:
cat >expected <<\EXPECTED &&
added in both
our 100644 43d5a8ed6ef6c00ff775008633f95787d088285d ONE
their 100644 ba629238ca89489f2b350e196ca445e09d8bb834 ONE
@@ -1 +1,5 @@
+<<<<<<< .our
AAA
+=======
+BBB
+>>>>>>> .their
EXPECTED
git reset --hard initial &&
test_commit "add-a-b-diff-A" "ONE" "AAA" &&
git reset --hard initial &&
test_commit "add-a-b-diff-B" "ONE" "BBB" &&
git merge-tree initial add-a-b-diff-A add-a-b-diff-B >actual &&
test_cmp expected actual
HEAD is now at c1d16d8 initial
[master 59aa417] add-a-b-diff-A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 ONE
HEAD is now at c1d16d8 initial
[master 06b549e] add-a-b-diff-B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 ONE
ok 5 - file add A, B (different)
expecting success:
git reset --hard initial &&
test_commit "change-a-not-b" "initial-file" "BBB" &&
git merge-tree initial change-a-not-b initial >actual &&
test_must_be_empty actual
HEAD is now at c1d16d8 initial
[master 46329de] change-a-not-b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 6 - file change A, !B
expecting success:
cat >expected <<\EXPECTED &&
merged
result 100644 ba629238ca89489f2b350e196ca445e09d8bb834 initial-file
our 100644 e79c5e8f964493290a409888d5413a737e8e5dd5 initial-file
@@ -1 +1 @@
-initial
+BBB
EXPECTED
git reset --hard initial &&
test_commit "change-not-a-b" "initial-file" "BBB" &&
git merge-tree initial initial change-not-a-b >actual &&
test_cmp expected actual
HEAD is now at c1d16d8 initial
[master 4667cad] change-not-a-b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 7 - file change !A, B
expecting success:
git reset --hard initial &&
test_commit "change-a-b-same-A" "initial-file" "AAA" &&
git reset --hard initial &&
test_commit "change-a-b-same-B" "initial-file" "AAA" &&
git merge-tree initial change-a-b-same-A change-a-b-same-B >actual &&
test_must_be_empty actual
HEAD is now at c1d16d8 initial
[master 17f6774] change-a-b-same-A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at c1d16d8 initial
[master c618aaa] change-a-b-same-B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 8 - file change A, B (same)
expecting success:
cat >expected <<\EXPECTED &&
changed in both
base 100644 e79c5e8f964493290a409888d5413a737e8e5dd5 initial-file
our 100644 43d5a8ed6ef6c00ff775008633f95787d088285d initial-file
their 100644 ba629238ca89489f2b350e196ca445e09d8bb834 initial-file
@@ -1 +1,5 @@
+<<<<<<< .our
AAA
+=======
+BBB
+>>>>>>> .their
EXPECTED
git reset --hard initial &&
test_commit "change-a-b-diff-A" "initial-file" "AAA" &&
git reset --hard initial &&
test_commit "change-a-b-diff-B" "initial-file" "BBB" &&
git merge-tree initial change-a-b-diff-A change-a-b-diff-B >actual &&
test_cmp expected actual
HEAD is now at c1d16d8 initial
[master f14ee41] change-a-b-diff-A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at c1d16d8 initial
[master 6faccc3] change-a-b-diff-B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 9 - file change A, B (different)
expecting success:
cat >expected <<\EXPECTED &&
changed in both
base 100644 f4f1f998c7776568c4ff38f516d77fef9399b5a7 ONE
our 100644 af14c2c3475337c73759d561ef70b59e5c731176 ONE
their 100644 372d761493f524d44d59bd24700c3bdf914c973c ONE
@@ -7,7 +7,11 @@
AAA
AAA
AAA
+<<<<<<< .our
BBB
+=======
+CCC
+>>>>>>> .their
AAA
AAA
AAA
EXPECTED
git reset --hard initial &&
test_commit "change-a-b-mix-base" "ONE" "
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA
AAA" &&
test_commit "change-a-b-mix-A" "ONE" \
"$(sed -e "1{s/AAA/BBB/;}" -e "10{s/AAA/BBB/;}" <ONE)" &&
git reset --hard change-a-b-mix-base &&
test_commit "change-a-b-mix-B" "ONE" \
"$(sed -e "1{s/AAA/BBB/;}" -e "10{s/AAA/CCC/;}" <ONE)" &&
git merge-tree change-a-b-mix-base change-a-b-mix-A change-a-b-mix-B \
>actual &&
test_cmp expected actual
HEAD is now at c1d16d8 initial
[master 8f24aa4] change-a-b-mix-base
Author: A U Thor <author@example.com>
1 file changed, 16 insertions(+)
create mode 100644 ONE
[master 37be425] change-a-b-mix-A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at 8f24aa4 change-a-b-mix-base
[master 9bb3ceb] change-a-b-mix-B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 10 - file change A, B (mixed)
expecting success:
git reset --hard initial &&
test_commit "rm-a-not-b-base" "ONE" "AAA" &&
git rm ONE &&
git commit -m "rm-a-not-b" &&
git tag "rm-a-not-b" &&
git merge-tree rm-a-not-b-base rm-a-not-b rm-a-not-b-base >actual &&
test_must_be_empty actual
HEAD is now at c1d16d8 initial
[master 6bc469c] rm-a-not-b-base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 ONE
rm 'ONE'
[master eaee347] rm-a-not-b
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 ONE
ok 11 - file remove A, !B
expecting success:
cat >expected <<\EXPECTED &&
removed in remote
base 100644 43d5a8ed6ef6c00ff775008633f95787d088285d ONE
our 100644 43d5a8ed6ef6c00ff775008633f95787d088285d ONE
@@ -1 +0,0 @@
-AAA
EXPECTED
git reset --hard initial &&
test_commit "rm-not-a-b-base" "ONE" "AAA" &&
git rm ONE &&
git commit -m "rm-not-a-b" &&
git tag "rm-not-a-b" &&
git merge-tree rm-a-not-b-base rm-a-not-b-base rm-a-not-b >actual &&
test_cmp expected actual
HEAD is now at c1d16d8 initial
[master 4c80bfe] rm-not-a-b-base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 ONE
rm 'ONE'
[master f5c368c] rm-not-a-b
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 ONE
ok 12 - file remove !A, B
expecting success:
git reset --hard initial &&
test_commit "rm-a-b-base" "ONE" "AAA" &&
git rm ONE &&
git commit -m "rm-a-b" &&
git tag "rm-a-b" &&
git merge-tree rm-a-b-base rm-a-b rm-a-b >actual &&
test_must_be_empty actual
HEAD is now at c1d16d8 initial
[master ba896b0] rm-a-b-base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 ONE
rm 'ONE'
[master e5794d5] rm-a-b
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 ONE
ok 13 - file remove A, B (same)
expecting success:
cat >expected <<\EXPECTED &&
removed in remote
base 100644 43d5a8ed6ef6c00ff775008633f95787d088285d ONE
our 100644 ba629238ca89489f2b350e196ca445e09d8bb834 ONE
@@ -1 +0,0 @@
-BBB
EXPECTED
git reset --hard initial &&
test_commit "change-a-rm-b-base" "ONE" "AAA" &&
test_commit "change-a-rm-b-A" "ONE" "BBB" &&
git reset --hard change-a-rm-b-base &&
git rm ONE &&
git commit -m "change-a-rm-b-B" &&
git tag "change-a-rm-b-B" &&
git merge-tree change-a-rm-b-base change-a-rm-b-A change-a-rm-b-B \
>actual &&
test_cmp expected actual
HEAD is now at c1d16d8 initial
[master 425fe11] change-a-rm-b-base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 ONE
[master d7b5417] change-a-rm-b-A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at 425fe11 change-a-rm-b-base
rm 'ONE'
[master a35c11c] change-a-rm-b-B
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 ONE
ok 14 - file change A, remove B
expecting success:
cat >expected <<\EXPECTED &&
removed in local
base 100644 43d5a8ed6ef6c00ff775008633f95787d088285d ONE
their 100644 ba629238ca89489f2b350e196ca445e09d8bb834 ONE
EXPECTED
git reset --hard initial &&
test_commit "rm-a-change-b-base" "ONE" "AAA" &&
git rm ONE &&
git commit -m "rm-a-change-b-A" &&
git tag "rm-a-change-b-A" &&
git reset --hard rm-a-change-b-base &&
test_commit "rm-a-change-b-B" "ONE" "BBB" &&
git merge-tree rm-a-change-b-base rm-a-change-b-A rm-a-change-b-B \
>actual &&
test_cmp expected actual
HEAD is now at c1d16d8 initial
[master e3f76d1] rm-a-change-b-base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 ONE
rm 'ONE'
[master 12305ab] rm-a-change-b-A
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 ONE
HEAD is now at e3f76d1 rm-a-change-b-base
[master 30c5a34] rm-a-change-b-B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 15 - file remove A, change B
expecting success:
git reset --hard initial &&
mkdir sub &&
test_commit "add sub/file" "sub/file" "file" add-tree-A &&
git merge-tree initial add-tree-A add-tree-A >actual &&
test_must_be_empty actual
HEAD is now at c1d16d8 initial
[master f146135] add sub/file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 sub/file
ok 16 - tree add A, B (same)
expecting success:
cat >expect <<-\EOF &&
added in both
our 100644 43d5a8ed6ef6c00ff775008633f95787d088285d sub/file
their 100644 ba629238ca89489f2b350e196ca445e09d8bb834 sub/file
@@ -1 +1,5 @@
+<<<<<<< .our
AAA
+=======
+BBB
+>>>>>>> .their
EOF
git reset --hard initial &&
mkdir sub &&
test_commit "add sub/file" "sub/file" "AAA" add-tree-a-b-A &&
git reset --hard initial &&
mkdir sub &&
test_commit "add sub/file" "sub/file" "BBB" add-tree-a-b-B &&
git merge-tree initial add-tree-a-b-A add-tree-a-b-B >actual &&
test_cmp expect actual
HEAD is now at c1d16d8 initial
[master 278e538] add sub/file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 sub/file
HEAD is now at c1d16d8 initial
[master b437163] add sub/file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 sub/file
ok 17 - tree add A, B (different)
expecting success:
cat >expect <<-\EOF &&
removed in remote
base 100644 43d5a8ed6ef6c00ff775008633f95787d088285d sub/file
our 100644 43d5a8ed6ef6c00ff775008633f95787d088285d sub/file
@@ -1 +0,0 @@
-AAA
EOF
git reset --hard initial &&
mkdir sub &&
test_commit "add sub/file" "sub/file" "AAA" tree-remove-b-initial &&
git rm sub/file &&
test_tick &&
git commit -m "remove sub/file" &&
git tag tree-remove-b-B &&
git merge-tree tree-remove-b-initial tree-remove-b-initial tree-remove-b-B >actual &&
test_cmp expect actual
HEAD is now at c1d16d8 initial
[master 06f44d6] add sub/file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 sub/file
rm 'sub/file'
[master 7d2ab7e] remove sub/file
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 sub/file
ok 18 - tree unchanged A, removed B
expecting success:
git reset --hard initial &&
rm initial-file &&
mkdir initial-file &&
test_commit "turn-file-to-tree" "initial-file/ONE" "CCC" &&
git merge-tree initial initial turn-file-to-tree >actual &&
cat >expect <<-\EOF &&
added in remote
their 100644 43aa4fdec31eb92e1fdc2f0ce6ea9ddb7c32bcf7 initial-file/ONE
@@ -0,0 +1 @@
+CCC
removed in remote
base 100644 e79c5e8f964493290a409888d5413a737e8e5dd5 initial-file
our 100644 e79c5e8f964493290a409888d5413a737e8e5dd5 initial-file
@@ -1 +0,0 @@
-initial
EOF
test_cmp expect actual
HEAD is now at c1d16d8 initial
[master c7dbe97] turn-file-to-tree
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
delete mode 100644 initial-file
create mode 100644 initial-file/ONE
ok 19 - turn file to tree
expecting success:
git reset --hard initial &&
mkdir dir &&
test_commit "add-tree" "dir/path" "AAA" &&
test_commit "add-another-tree" "dir/another" "BBB" &&
rm -fr dir &&
test_commit "make-file" "dir" "CCC" &&
git merge-tree add-tree add-another-tree make-file >actual &&
cat >expect <<-\EOF &&
removed in remote
base 100644 43d5a8ed6ef6c00ff775008633f95787d088285d dir/path
our 100644 43d5a8ed6ef6c00ff775008633f95787d088285d dir/path
@@ -1 +0,0 @@
-AAA
added in remote
their 100644 43aa4fdec31eb92e1fdc2f0ce6ea9ddb7c32bcf7 dir
@@ -0,0 +1 @@
+CCC
EOF
test_cmp expect actual
HEAD is now at c1d16d8 initial
[master fadeed0] add-tree
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dir/path
[master 2076f67] add-another-tree
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dir/another
[master 8ffb08d] make-file
Author: A U Thor <author@example.com>
3 files changed, 1 insertion(+), 2 deletions(-)
create mode 100644 dir
delete mode 100644 dir/another
delete mode 100644 dir/path
ok 20 - turn tree to file
# passed all 20 test(s)
1..20
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5001-archive-attr.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5001-archive-attr/.git/
expecting success:
echo ignored >ignored &&
echo ignored export-ignore >>.git/info/attributes &&
git add ignored &&
echo ignored by tree >ignored-by-tree &&
echo ignored-by-tree export-ignore >.gitattributes &&
mkdir ignored-by-tree.d &&
>ignored-by-tree.d/file &&
echo ignored-by-tree.d export-ignore >>.gitattributes &&
git add ignored-by-tree ignored-by-tree.d .gitattributes &&
echo ignored by worktree >ignored-by-worktree &&
echo ignored-by-worktree export-ignore >.gitattributes &&
git add ignored-by-worktree &&
mkdir excluded-by-pathspec.d &&
>excluded-by-pathspec.d/file &&
git add excluded-by-pathspec.d &&
printf "A\$Format:%s\$O" "$SUBSTFORMAT" >nosubstfile &&
printf "A\$Format:%s\$O" "$SUBSTFORMAT" >substfile1 &&
printf "A not substituted O" >substfile2 &&
echo "substfile?" export-subst >>.git/info/attributes &&
git add nosubstfile substfile1 substfile2 &&
git commit -m. &&
git clone --bare . bare &&
cp .git/info/attributes bare/info/attributes
[master (root-commit) 6b76ec4] .
Author: A U Thor <author@example.com>
9 files changed, 8 insertions(+)
create mode 100644 .gitattributes
create mode 100644 excluded-by-pathspec.d/file
create mode 100644 ignored
create mode 100644 ignored-by-tree
create mode 100644 ignored-by-tree.d/file
create mode 100644 ignored-by-worktree
create mode 100644 nosubstfile
create mode 100644 substfile1
create mode 100644 substfile2
Cloning into bare repository 'bare'...
done.
ok 1 - setup
expecting success:
git archive HEAD >archive.tar &&
(mkdir archive && cd archive && "$TAR" xf -) <archive.tar
ok 2 - git archive
expecting success: test ! -e archive/ignored
ok 3 - archive/ignored does not exist
expecting success: test ! -e archive/ignored-by-tree
ok 4 - archive/ignored-by-tree does not exist
expecting success: test ! -e archive/ignored-by-tree.d
ok 5 - archive/ignored-by-tree.d does not exist
expecting success: test ! -e archive/ignored-by-tree.d/file
ok 6 - archive/ignored-by-tree.d/file does not exist
expecting success: test -e archive/ignored-by-worktree
ok 7 - archive/ignored-by-worktree exists
expecting success: test -e archive/excluded-by-pathspec.d
ok 8 - archive/excluded-by-pathspec.d exists
expecting success: test -e archive/excluded-by-pathspec.d/file
ok 9 - archive/excluded-by-pathspec.d/file exists
expecting success:
git archive HEAD ":!excluded-by-pathspec.d" >archive-pathspec.tar &&
extract_tar_to_dir archive-pathspec
ok 10 - git archive with pathspec
expecting success: test ! -e archive-pathspec/ignored
ok 11 - archive-pathspec/ignored does not exist
expecting success: test ! -e archive-pathspec/ignored-by-tree
ok 12 - archive-pathspec/ignored-by-tree does not exist
expecting success: test ! -e archive-pathspec/ignored-by-tree.d
ok 13 - archive-pathspec/ignored-by-tree.d does not exist
expecting success: test ! -e archive-pathspec/ignored-by-tree.d/file
ok 14 - archive-pathspec/ignored-by-tree.d/file does not exist
expecting success: test -e archive-pathspec/ignored-by-worktree
ok 15 - archive-pathspec/ignored-by-worktree exists
expecting success: test ! -e archive-pathspec/excluded-by-pathspec.d
ok 16 - archive-pathspec/excluded-by-pathspec.d does not exist
expecting success: test ! -e archive-pathspec/excluded-by-pathspec.d/file
ok 17 - archive-pathspec/excluded-by-pathspec.d/file does not exist
expecting success:
git archive HEAD ":!excluded-by-p*" >archive-pathspec-wildcard.tar &&
extract_tar_to_dir archive-pathspec-wildcard
ok 18 - git archive with wildcard pathspec
expecting success: test ! -e archive-pathspec-wildcard/ignored
ok 19 - archive-pathspec-wildcard/ignored does not exist
expecting success: test ! -e archive-pathspec-wildcard/ignored-by-tree
ok 20 - archive-pathspec-wildcard/ignored-by-tree does not exist
expecting success: test ! -e archive-pathspec-wildcard/ignored-by-tree.d
ok 21 - archive-pathspec-wildcard/ignored-by-tree.d does not exist
expecting success: test ! -e archive-pathspec-wildcard/ignored-by-tree.d/file
ok 22 - archive-pathspec-wildcard/ignored-by-tree.d/file does not exist
expecting success: test -e archive-pathspec-wildcard/ignored-by-worktree
ok 23 - archive-pathspec-wildcard/ignored-by-worktree exists
expecting success: test ! -e archive-pathspec-wildcard/excluded-by-pathspec.d
ok 24 - archive-pathspec-wildcard/excluded-by-pathspec.d does not exist
expecting success: test ! -e archive-pathspec-wildcard/excluded-by-pathspec.d/file
ok 25 - archive-pathspec-wildcard/excluded-by-pathspec.d/file does not exist
expecting success:
git archive --worktree-attributes HEAD >worktree.tar &&
(mkdir worktree && cd worktree && "$TAR" xf -) <worktree.tar
ok 26 - git archive with worktree attributes
expecting success: test ! -e worktree/ignored
ok 27 - worktree/ignored does not exist
expecting success: test -e worktree/ignored-by-tree
ok 28 - worktree/ignored-by-tree exists
expecting success: test ! -e worktree/ignored-by-worktree
ok 29 - worktree/ignored-by-worktree does not exist
expecting success:
git archive --worktree-attributes --worktree-attributes HEAD >worktree.tar &&
(mkdir worktree2 && cd worktree2 && "$TAR" xf -) <worktree.tar
ok 30 - git archive --worktree-attributes option
expecting success: test ! -e worktree2/ignored
ok 31 - worktree2/ignored does not exist
expecting success: test -e worktree2/ignored-by-tree
ok 32 - worktree2/ignored-by-tree exists
expecting success: test ! -e worktree2/ignored-by-worktree
ok 33 - worktree2/ignored-by-worktree does not exist
expecting success:
(cd bare && git archive HEAD) >bare-archive.tar &&
test_cmp_bin archive.tar bare-archive.tar
ok 34 - git archive vs. bare
expecting success:
(cd bare && git archive --worktree-attributes HEAD) >bare-worktree.tar &&
(mkdir bare-worktree && cd bare-worktree && "$TAR" xf -) <bare-worktree.tar
ok 35 - git archive with worktree attributes, bare
expecting success: test ! -e bare-worktree/ignored
ok 36 - bare-worktree/ignored does not exist
expecting success: test -e bare-worktree/ignored-by-tree
ok 37 - bare-worktree/ignored-by-tree exists
expecting success: test -e bare-worktree/ignored-by-worktree
ok 38 - bare-worktree/ignored-by-worktree exists
expecting success:
git log "--pretty=format:A${SUBSTFORMAT}O" HEAD >substfile1.expected &&
test_cmp nosubstfile archive/nosubstfile &&
test_cmp substfile1.expected archive/substfile1 &&
test_cmp substfile2 archive/substfile2
ok 39 - export-subst
# passed all 39 test(s)
1..39
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5000-tar-tree.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5000-tar-tree/.git/
expecting success:
test_oid_cache <<-EOF
obj sha1:19f9c8273ec45a8938e6999cb59b3ff66739902a
obj sha256:3c666f798798601571f5cec0adb57ce4aba8546875e7693177e0535f34d2c49b
EOF
ok 1 - setup
expecting success: mkdir a &&
echo simple textfile >a/a &&
ten=0123456789 && hundred=$ten$ten$ten$ten$ten$ten$ten$ten$ten$ten &&
echo long filename >a/four$hundred &&
mkdir a/bin &&
test-tool genrandom "frotz" 500000 >a/bin/sh &&
printf "A\$Format:%s\$O" "$SUBSTFORMAT" >a/substfile1 &&
printf "A not substituted O" >a/substfile2 &&
if test_have_prereq SYMLINKS; then
ln -s a a/l1
else
printf %s a > a/l1
fi &&
(p=long_path_to_a_file && cd a &&
for depth in 1 2 3 4 5; do mkdir $p && cd $p; done &&
echo text >file_with_long_path) &&
(cd a && find .) | sort >a.lst
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 2 - populate workdir
expecting success: echo ignore me >a/ignored &&
echo ignored export-ignore >.git/info/attributes
ok 3 - add ignored file
expecting success:
git add a &&
GIT_COMMITTER_DATE="2005-05-27 22:00" git commit -m initial
[master (root-commit) 0857f92] initial
Author: A U Thor <author@example.com>
8 files changed, 7 insertions(+)
create mode 100644 a/a
create mode 100644 a/bin/sh
create mode 100644 a/four0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
create mode 100644 a/ignored
create mode 120000 a/l1
create mode 100644 a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/file_with_long_path
create mode 100644 a/substfile1
create mode 100644 a/substfile2
ok 4 - add files to repository
expecting success:
echo "substfile?" export-subst >>.git/info/attributes &&
git log --max-count=1 "--pretty=format:A${SUBSTFORMAT}O" HEAD \
>a/substfile1
ok 5 - setup export-subst
expecting success: git clone --bare . bare.git &&
cp .git/info/attributes bare.git/info/attributes
Cloning into bare repository 'bare.git'...
done.
ok 6 - create bare clone
expecting success: rm a/ignored
ok 7 - remove ignored file
expecting success: git archive HEAD >b.tar
ok 8 - git archive
expecting success:
(mkdir $dir && cd $dir && "$TAR" xf -) <$tarfile
ok 9 - extract tar archive
checking prerequisite: TAR_NEEDS_PAX_FALLBACK
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
(
mkdir pax &&
cd pax &&
"$TAR" xf "$TEST_DIRECTORY"/t5000/pax.tar &&
test -f PaxHeaders.1791/file
)
)
prerequisite TAR_NEEDS_PAX_FALLBACK not satisfied
skipping test: interpret pax headers
(
cd $dir &&
for header in *.paxheader
do
data=${header%.paxheader}.data &&
if test -h $data || test -e $data
then
path=$(get_pax_header $header path) &&
if test -n "$path"
then
mv "$data" "$path"
fi
fi
done
)
ok 10 # skip interpret pax headers (missing TAR_NEEDS_PAX_FALLBACK)
expecting success:
(cd ${dir_with_prefix}a && find .) | sort >$listfile &&
test_cmp a.lst $listfile
ok 11 - validate filenames
expecting success:
diff -r a ${dir_with_prefix}a
ok 12 - validate file contents
expecting success:
git archive --prefix=prefix/ HEAD >with_prefix.tar
ok 13 - git archive --prefix=prefix/
expecting success:
(mkdir $dir && cd $dir && "$TAR" xf -) <$tarfile
ok 14 - extract tar archive
skipping test: interpret pax headers
(
cd $dir &&
for header in *.paxheader
do
data=${header%.paxheader}.data &&
if test -h $data || test -e $data
then
path=$(get_pax_header $header path) &&
if test -n "$path"
then
mv "$data" "$path"
fi
fi
done
)
ok 15 # skip interpret pax headers (missing TAR_NEEDS_PAX_FALLBACK)
expecting success:
(cd ${dir_with_prefix}a && find .) | sort >$listfile &&
test_cmp a.lst $listfile
ok 16 - validate filenames
expecting success:
diff -r a ${dir_with_prefix}a
ok 17 - validate file contents
expecting success:
git archive --prefix=olde- HEAD >with_olde-prefix.tar
ok 18 - git-archive --prefix=olde-
expecting success:
(mkdir $dir && cd $dir && "$TAR" xf -) <$tarfile
ok 19 - extract tar archive
skipping test: interpret pax headers
(
cd $dir &&
for header in *.paxheader
do
data=${header%.paxheader}.data &&
if test -h $data || test -e $data
then
path=$(get_pax_header $header path) &&
if test -n "$path"
then
mv "$data" "$path"
fi
fi
done
)
ok 20 # skip interpret pax headers (missing TAR_NEEDS_PAX_FALLBACK)
expecting success:
(cd ${dir_with_prefix}a && find .) | sort >$listfile &&
test_cmp a.lst $listfile
ok 21 - validate filenames
expecting success:
diff -r a ${dir_with_prefix}a
ok 22 - validate file contents
expecting success:
test_config core.bigfilethreshold 1 &&
git archive HEAD >b3.tar &&
test_cmp_bin b.tar b3.tar
ok 23 - git archive on large files
expecting success: (cd bare.git && git archive HEAD) >b3.tar
ok 24 - git archive in a bare repo
expecting success: test_cmp_bin b.tar b3.tar
ok 25 - git archive vs. the same in a bare repo
expecting success: git archive --output=b4.tar HEAD &&
test_cmp_bin b.tar b4.tar
ok 26 - git archive with --output
expecting success: git archive --remote=. HEAD >b5.tar &&
test_cmp_bin b.tar b5.tar
ok 27 - git archive --remote
expecting success:
git config remote.foo.url . &&
(
cd a &&
git archive --remote=foo --output=../b5-nick.tar HEAD
) &&
test_cmp_bin b.tar b5-nick.tar
ok 28 - git archive --remote with configured remote
expecting success: mkdir extract &&
"$TAR" xf b.tar -C extract a/a &&
test-tool chmtime --get extract/a/a >b.mtime &&
echo "1117231200" >expected.mtime &&
test_cmp expected.mtime b.mtime
ok 29 - validate file modification time
expecting success: git get-tar-commit-id <b.tar >b.commitid &&
test_cmp .git/$(git symbolic-ref HEAD) b.commitid
ok 30 - git get-tar-commit-id
expecting success:
git archive --format=tar --output=d4.zip HEAD &&
test_cmp_bin b.tar d4.zip
ok 31 - git archive with --output, override inferred format
checking prerequisite: GZIP
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&gzip --version
)
gzip 1.9
Copyright (C) 2017 Free Software Foundation, Inc.
Copyright (C) 1993 Jean-loup Gailly.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Written by Jean-loup Gailly.
prerequisite GZIP ok
expecting success:
git archive --output=d5.tgz --remote=. HEAD &&
gzip -d -c <d5.tgz >d5.tar &&
test_cmp_bin b.tar d5.tar
ok 32 - git archive with --output and --remote creates .tgz
expecting success:
nongit git archive --list
tar
tgz
tar.gz
zip
ok 33 - git archive --list outside of a git repo
expecting success:
git archive HEAD >expect.tar &&
nongit git archive --remote="$PWD" HEAD >actual.tar &&
test_cmp_bin expect.tar actual.tar
ok 34 - git archive --remote outside of a git repo
expecting success:
test_commit unreachable &&
sha1=$(git rev-parse HEAD) &&
git reset --hard HEAD^ &&
git archive $sha1 >remote.tar &&
test_must_fail git archive --remote=. $sha1 >remote.tar
[master ae4f0ee] unreachable
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 unreachable.t
HEAD is now at 0857f92 initial
remote: fatal: no such ref: ae4f0eecd687d6620290bbbb20702f9b2228e1aa
fatal: sent error to the client: git upload-archive: archiver died with error
remote: git upload-archive: archiver died with error
ok 35 - clients cannot access unreachable commits
expecting success:
test_commit unreachable1 &&
sha1=$(git rev-parse HEAD) &&
git reset --hard HEAD^ &&
git archive $sha1 >remote.tar &&
test_config uploadarchive.allowUnreachable true &&
git archive --remote=. $sha1 >remote.tar
[master 388d421] unreachable1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 unreachable1.t
HEAD is now at 0857f92 initial
ok 36 - upload-archive can allow unreachable commits
expecting success:
git config tar.tar.foo.command "tr ab ba" &&
git config tar.bar.command "tr ab ba" &&
git config tar.bar.remote true &&
git config tar.invalid baz
ok 37 - setup tar filters
expecting success:
git archive --list >output &&
grep "^tar\.foo\$" output &&
grep "^bar\$" output
tar.foo
bar
ok 38 - archive --list mentions user filter
expecting success:
git archive --list --remote=. >output &&
! grep "^tar\.foo\$" output &&
grep "^bar\$" output
bar
ok 39 - archive --list shows only enabled remote filters
expecting success:
git archive --format=tar.foo HEAD >config.tar.foo &&
tr ab ba <config.tar.foo >config.tar &&
test_cmp_bin b.tar config.tar &&
git archive --format=bar HEAD >config.bar &&
tr ab ba <config.bar >config.tar &&
test_cmp_bin b.tar config.tar
ok 40 - invoke tar filter by format
expecting success:
git archive -o config-implicit.tar.foo HEAD &&
test_cmp_bin config.tar.foo config-implicit.tar.foo &&
git archive -o config-implicit.bar HEAD &&
test_cmp_bin config.tar.foo config-implicit.bar
ok 41 - invoke tar filter by extension
expecting success:
git archive -o config-implicit.baz HEAD &&
test_cmp_bin b.tar config-implicit.baz
ok 42 - default output format remains tar
expecting success:
git archive -o config-implicittar.foo HEAD &&
test_cmp_bin b.tar config-implicittar.foo
ok 43 - extension matching requires dot
expecting success:
test_must_fail git archive --remote=. --format=tar.foo HEAD \
>remote.tar.foo &&
git archive --remote=. --format=bar >remote.bar HEAD &&
test_cmp_bin remote.bar config.bar
remote: fatal: Unknown archive format 'tar.foo'
remote: git upload-archive: archiver died with error
fatal: sent error to the client: git upload-archive: archiver died with error
ok 44 - only enabled filters are available remotely
expecting success:
git archive --format=tgz HEAD >j.tgz
ok 45 - git archive --format=tgz
expecting success:
git archive --format=tar.gz HEAD >j1.tar.gz &&
test_cmp_bin j.tgz j1.tar.gz
ok 46 - git archive --format=tar.gz
expecting success:
git archive --output=j2.tgz HEAD &&
test_cmp_bin j.tgz j2.tgz
ok 47 - infer tgz from .tgz filename
expecting success:
git archive --output=j3.tar.gz HEAD &&
test_cmp_bin j.tgz j3.tar.gz
ok 48 - infer tgz from .tar.gz filename
expecting success:
gzip -d -c <j.tgz >j.tar &&
test_cmp_bin b.tar j.tar
ok 49 - extract tgz file
expecting success:
git archive --remote=. --format=tar.gz HEAD >remote.tar.gz &&
test_cmp_bin j.tgz remote.tar.gz
ok 50 - remote tar.gz is allowed by default
expecting success:
git config tar.tar.gz.remote false &&
test_must_fail git archive --remote=. --format=tar.gz HEAD \
>remote.tar.gz
fatal: sent error to the client: git upload-archive: archiver died with error
remote: fatal: Unknown archive format 'tar.gz'
remote: git upload-archive: archiver died with error
ok 51 - remote tar.gz can be disabled
expecting success:
git archive -v HEAD -- ":(glob)**/sh" >/dev/null 2>actual &&
cat >expect <<EOF &&
a/
a/bin/
a/bin/sh
EOF
test_cmp expect actual
ok 52 - archive and :(glob)
expecting success:
test_must_fail git archive -v HEAD -- "*.abc" >/dev/null
fatal: pathspec '*.abc' did not match any files
ok 53 - catch non-matching pathspec
checking prerequisite: LONG_IS_64BIT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test 8 -le "$(build_option sizeof-long)"
)
prerequisite LONG_IS_64BIT not satisfied
skipping test: set up repository with huge blob
obj=$(test_oid obj) &&
path=$(test_oid_to_path $obj) &&
mkdir -p .git/objects/$(dirname $path) &&
cp "$TEST_DIRECTORY"/t5000/huge-object .git/objects/$path &&
rm -f .git/index &&
git update-index --add --cacheinfo 100644,$obj,huge &&
git commit -m huge
ok 54 # skip set up repository with huge blob (missing LONG_IS_64BIT)
skipping test: generate tar with huge size
{
git archive HEAD
echo $? >exit-code
} | test_copy_bytes 4096 >huge.tar &&
echo 141 >expect &&
test_cmp expect exit-code
ok 55 # skip generate tar with huge size (missing LONG_IS_64BIT)
checking prerequisite: TAR_HUGE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
echo "68719476737 4147" >expect &&
tar_info "$TEST_DIRECTORY"/t5000/huge-and-future.tar >actual &&
test_cmp expect actual
)
tar: Extended header mtime=68719476737 is out of range -2147483648..2147483647
tar: Extended header atime=68719476737 is out of range -2147483648..2147483647
tar: rmtlseek not stopped at a record boundary
tar: Error is not recoverable: exiting now
--- expect 2019-08-14 07:29:49.112829995 +0000
+++ actual 2019-08-14 07:29:49.124830109 +0000
@@ -1 +1 @@
-68719476737 4147
+68719476737 1970
prerequisite TAR_HUGE not satisfied
skipping test: system tar can read our huge size
echo 68719476737 >expect &&
tar_info huge.tar | cut -d" " -f1 >actual &&
test_cmp expect actual
ok 56 # skip system tar can read our huge size (missing LONG_IS_64BIT,TAR_HUGE of TAR_HUGE,LONG_IS_64BIT)
checking prerequisite: TIME_IS_64BIT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&test-tool date is64bit
)
prerequisite TIME_IS_64BIT ok
expecting success:
rm -f .git/index &&
echo content >file &&
git add file &&
GIT_COMMITTER_DATE="@68719476737 +0000" \
git commit -m "tempori parendum"
[master 160d097] tempori parendum
Author: A U Thor <author@example.com>
9 files changed, 1 insertion(+), 7 deletions(-)
delete mode 100644 a/a
delete mode 100644 a/bin/sh
delete mode 100644 a/four0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
delete mode 100644 a/ignored
delete mode 120000 a/l1
delete mode 100644 a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/file_with_long_path
delete mode 100644 a/substfile1
delete mode 100644 a/substfile2
create mode 100644 file
ok 57 - set up repository with far-future commit
expecting success:
git archive HEAD >future.tar
ok 58 - generate tar with future mtime
checking prerequisite: TIME_T_IS_64BIT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&test-tool date time_t-is64bit
)
prerequisite TIME_T_IS_64BIT not satisfied
skipping test: system tar can read our future mtime
echo 4147 >expect &&
tar_info future.tar | cut -d" " -f2 >actual &&
test_cmp expect actual
ok 59 # skip system tar can read our future mtime (missing TIME_T_IS_64BIT,TAR_HUGE of TAR_HUGE,TIME_IS_64BIT,TIME_T_IS_64BIT)
# passed all 59 test(s)
1..59
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5002-archive-attr-pattern.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5002-archive-attr-pattern/.git/
expecting success:
echo ignored >ignored &&
echo ignored export-ignore >>.git/info/attributes &&
git add ignored &&
mkdir not-ignored-dir &&
echo ignored-in-tree >not-ignored-dir/ignored &&
echo not-ignored-in-tree >not-ignored-dir/ignored-only-if-dir &&
git add not-ignored-dir &&
mkdir ignored-only-if-dir &&
echo ignored by ignored dir >ignored-only-if-dir/ignored-by-ignored-dir &&
echo ignored-only-if-dir/ export-ignore >>.git/info/attributes &&
git add ignored-only-if-dir &&
mkdir -p ignored-without-slash &&
echo "ignored without slash" >ignored-without-slash/foo &&
git add ignored-without-slash/foo &&
echo "ignored-without-slash export-ignore" >>.git/info/attributes &&
mkdir -p wildcard-without-slash &&
echo "ignored without slash" >wildcard-without-slash/foo &&
git add wildcard-without-slash/foo &&
echo "wild*-without-slash export-ignore" >>.git/info/attributes &&
mkdir -p deep/and/slashless &&
echo "ignored without slash" >deep/and/slashless/foo &&
git add deep/and/slashless/foo &&
echo "deep/and/slashless export-ignore" >>.git/info/attributes &&
mkdir -p deep/with/wildcard &&
echo "ignored without slash" >deep/with/wildcard/foo &&
git add deep/with/wildcard/foo &&
echo "deep/*t*/wildcard export-ignore" >>.git/info/attributes &&
mkdir -p one-level-lower/two-levels-lower/ignored-only-if-dir &&
echo ignored by ignored dir >one-level-lower/two-levels-lower/ignored-only-if-dir/ignored-by-ignored-dir &&
git add one-level-lower &&
git commit -m. &&
git clone --bare . bare &&
cp .git/info/attributes bare/info/attributes
[master (root-commit) b8b6876] .
Author: A U Thor <author@example.com>
9 files changed, 9 insertions(+)
create mode 100644 deep/and/slashless/foo
create mode 100644 deep/with/wildcard/foo
create mode 100644 ignored
create mode 100644 ignored-only-if-dir/ignored-by-ignored-dir
create mode 100644 ignored-without-slash/foo
create mode 100644 not-ignored-dir/ignored
create mode 100644 not-ignored-dir/ignored-only-if-dir
create mode 100644 one-level-lower/two-levels-lower/ignored-only-if-dir/ignored-by-ignored-dir
create mode 100644 wildcard-without-slash/foo
Cloning into bare repository 'bare'...
done.
ok 1 - setup
expecting success:
git archive HEAD >archive.tar &&
(mkdir archive && cd archive && "$TAR" xf -) <archive.tar
ok 2 - git archive
expecting success: test ! -e archive/ignored
ok 3 - archive/ignored does not exist
expecting success: test ! -e archive/not-ignored-dir/ignored
ok 4 - archive/not-ignored-dir/ignored does not exist
expecting success: test -e archive/not-ignored-dir/ignored-only-if-dir
ok 5 - archive/not-ignored-dir/ignored-only-if-dir exists
expecting success: test -e archive/not-ignored-dir/
ok 6 - archive/not-ignored-dir/ exists
expecting success: test ! -e archive/ignored-only-if-dir/
ok 7 - archive/ignored-only-if-dir/ does not exist
expecting success: test ! -e archive/ignored-ony-if-dir/ignored-by-ignored-dir
ok 8 - archive/ignored-ony-if-dir/ignored-by-ignored-dir does not exist
expecting success: test ! -e archive/ignored-without-slash/
ok 9 - archive/ignored-without-slash/ does not exist
expecting success: test ! -e archive/ignored-without-slash/foo
ok 10 - archive/ignored-without-slash/foo does not exist
expecting success: test ! -e archive/wildcard-without-slash/
ok 11 - archive/wildcard-without-slash/ does not exist
expecting success: test ! -e archive/wildcard-without-slash/foo
ok 12 - archive/wildcard-without-slash/foo does not exist
expecting success: test ! -e archive/deep/and/slashless/
ok 13 - archive/deep/and/slashless/ does not exist
expecting success: test ! -e archive/deep/and/slashless/foo
ok 14 - archive/deep/and/slashless/foo does not exist
expecting success: test ! -e archive/deep/with/wildcard/
ok 15 - archive/deep/with/wildcard/ does not exist
expecting success: test ! -e archive/deep/with/wildcard/foo
ok 16 - archive/deep/with/wildcard/foo does not exist
expecting success: test ! -e archive/one-level-lower/
ok 17 - archive/one-level-lower/ does not exist
expecting success: test ! -e archive/one-level-lower/two-levels-lower/ignored-only-if-dir/
ok 18 - archive/one-level-lower/two-levels-lower/ignored-only-if-dir/ does not exist
expecting success: test ! -e archive/one-level-lower/two-levels-lower/ignored-ony-if-dir/ignored-by-ignored-dir
ok 19 - archive/one-level-lower/two-levels-lower/ignored-ony-if-dir/ignored-by-ignored-dir does not exist
# passed all 19 test(s)
1..19
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5003-archive-zip.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5003-archive-zip/.git/
expecting success: mkdir a &&
echo simple textfile >a/a &&
mkdir a/bin &&
cp /bin/sh a/bin &&
printf "text\r" >a/text.cr &&
printf "text\r\n" >a/text.crlf &&
printf "text\n" >a/text.lf &&
printf "text\r" >a/nodiff.cr &&
printf "text\r\n" >a/nodiff.crlf &&
printf "text\n" >a/nodiff.lf &&
printf "text\r" >a/custom.cr &&
printf "text\r\n" >a/custom.crlf &&
printf "text\n" >a/custom.lf &&
printf "\0\r" >a/binary.cr &&
printf "\0\r\n" >a/binary.crlf &&
printf "\0\n" >a/binary.lf &&
printf "\0\r" >a/diff.cr &&
printf "\0\r\n" >a/diff.crlf &&
printf "\0\n" >a/diff.lf &&
printf "A\$Format:%s\$O" "$SUBSTFORMAT" >a/substfile1 &&
printf "A not substituted O" >a/substfile2 &&
(p=long_path_to_a_file && cd a &&
for depth in 1 2 3 4 5; do mkdir $p && cd $p; done &&
echo text >file_with_long_path)
ok 1 - populate workdir
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
checking prerequisite: UNZIP_SYMLINKS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
(
mkdir unzip-symlinks &&
cd unzip-symlinks &&
"$GIT_UNZIP" "$TEST_DIRECTORY"/t5003/infozip-symlinks.zip &&
test -h symlink
)
)
Archive: /<<PKGBUILDDIR>>/t/t5003/infozip-symlinks.zip
extracting: textfile
linking: symlink -> textfile
finishing deferred symbolic links:
symlink -> textfile
prerequisite UNZIP_SYMLINKS ok
expecting success:
ln -s a a/symlink_to_a
ok 2 - add symlink
expecting success:
(cd a && find .) | sort >a.lst
ok 3 - prepare file list
expecting success: echo ignore me >a/ignored &&
echo ignored export-ignore >.git/info/attributes
ok 4 - add ignored file
expecting success:
git add a &&
GIT_COMMITTER_DATE="2005-05-27 22:00" git commit -m initial
[master (root-commit) 4d1e276] initial
Author: A U Thor <author@example.com>
22 files changed, 15 insertions(+)
create mode 100644 a/a
create mode 100755 a/bin/sh
create mode 100644 a/binary.cr
create mode 100644 a/binary.crlf
create mode 100644 a/binary.lf
create mode 100644 a/custom.cr
create mode 100644 a/custom.crlf
create mode 100644 a/custom.lf
create mode 100644 a/diff.cr
create mode 100644 a/diff.crlf
create mode 100644 a/diff.lf
create mode 100644 a/ignored
create mode 100644 a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/file_with_long_path
create mode 100644 a/nodiff.cr
create mode 100644 a/nodiff.crlf
create mode 100644 a/nodiff.lf
create mode 100644 a/substfile1
create mode 100644 a/substfile2
create mode 120000 a/symlink_to_a
create mode 100644 a/text.cr
create mode 100644 a/text.crlf
create mode 100644 a/text.lf
ok 5 - add files to repository
expecting success:
echo "a/nodiff.* -diff" >>.git/info/attributes &&
echo "a/diff.* diff" >>.git/info/attributes &&
echo "a/custom.* diff=custom" >>.git/info/attributes &&
git config diff.custom.binary true &&
echo "substfile?" export-subst >>.git/info/attributes &&
git log --max-count=1 "--pretty=format:A${SUBSTFORMAT}O" HEAD \
>a/substfile1
ok 6 - setup export-subst and diff attributes
expecting success:
git clone --bare . bare.git &&
cp .git/info/attributes bare.git/info/attributes &&
# Recreate our changes to .git/config rather than just copying it, as
# we do not want to clobber core.bare or other settings.
git -C bare.git config diff.custom.binary true
Cloning into bare repository 'bare.git'...
done.
ok 7 - create bare clone
expecting success: rm a/ignored
ok 8 - remove ignored file
expecting success: git archive --format=zip HEAD >d.zip
ok 9 - git archive --format=zip
checking prerequisite: UNZIP
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
"$GIT_UNZIP" -v
test $? -ne 127
)
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 8.3.0 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:
(mkdir $dir && cd $dir && "$GIT_UNZIP" ../$zipfile)
Archive: ../d.zip
4d1e276b3ffefe8682c13a553fd2d4008ab79e07
creating: a/
extracting: a/a
creating: a/bin/
inflating: a/bin/sh
extracting: a/binary.cr
extracting: a/binary.crlf
extracting: a/binary.lf
extracting: a/custom.cr
extracting: a/custom.crlf
extracting: a/custom.lf
extracting: a/diff.cr
extracting: a/diff.crlf
extracting: a/diff.lf
creating: a/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
extracting: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/file_with_long_path
extracting: a/nodiff.cr
extracting: a/nodiff.crlf
extracting: a/nodiff.lf
extracting: a/substfile1
extracting: a/substfile2
linking: a/symlink_to_a -> a
extracting: a/text.cr
extracting: a/text.crlf
extracting: a/text.lf
finishing deferred symbolic links:
a/symlink_to_a -> a
ok 10 - extract ZIP archive
expecting success:
(cd d/a && find .) | sort >d.lst &&
test_cmp a.lst d.lst
ok 11 - validate filenames
expecting success:
diff -r a d/a
ok 12 - validate file contents
expecting success:
(mkdir $dir && cd $dir && "$GIT_UNZIP" -a ../$zipfile)
Archive: ../d.zip
4d1e276b3ffefe8682c13a553fd2d4008ab79e07
creating: a/
extracting: a/a [text]
creating: a/bin/
inflating: a/bin/sh [binary]
extracting: a/binary.cr [binary]
extracting: a/binary.crlf [binary]
extracting: a/binary.lf [binary]
extracting: a/custom.cr [binary]
extracting: a/custom.crlf [binary]
extracting: a/custom.lf [binary]
extracting: a/diff.cr [text]
extracting: a/diff.crlf [text]
extracting: a/diff.lf [text]
creating: a/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
extracting: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/file_with_long_path [text]
extracting: a/nodiff.cr [binary]
extracting: a/nodiff.crlf [binary]
extracting: a/nodiff.lf [binary]
extracting: a/substfile1 [text]
extracting: a/substfile2 [text]
linking: a/symlink_to_a -> a
extracting: a/text.cr [text]
extracting: a/text.crlf [text]
extracting: a/text.lf [text]
finishing deferred symbolic links:
a/symlink_to_a -> a
ok 13 - extract ZIP archive with EOL conversion
expecting success:
test_cmp_bin eol_d/a/text.cr eol_d/a/text.crlf &&
test_cmp_bin eol_d/a/text.cr eol_d/a/text.lf
ok 14 - validate that text files are converted
expecting success:
test_cmp_bin a/binary.cr eol_d/a/binary.cr &&
test_cmp_bin a/binary.crlf eol_d/a/binary.crlf &&
test_cmp_bin a/binary.lf eol_d/a/binary.lf
ok 15 - validate that binary files are unchanged
expecting success:
test_cmp_bin eol_d/a/diff.cr eol_d/a/diff.crlf &&
test_cmp_bin eol_d/a/diff.cr eol_d/a/diff.lf
ok 16 - validate that diff files are converted
expecting success:
test_cmp_bin a/nodiff.cr eol_d/a/nodiff.cr &&
test_cmp_bin a/nodiff.crlf eol_d/a/nodiff.crlf &&
test_cmp_bin a/nodiff.lf eol_d/a/nodiff.lf
ok 17 - validate that -diff files are unchanged
expecting success:
test_cmp_bin a/custom.cr eol_d/a/custom.cr &&
test_cmp_bin a/custom.crlf eol_d/a/custom.crlf &&
test_cmp_bin a/custom.lf eol_d/a/custom.lf
ok 18 - validate that custom diff is unchanged
expecting success: (cd bare.git && git archive --format=zip HEAD) >d1.zip
ok 19 - git archive --format=zip in a bare repo
expecting success: test_cmp_bin d.zip d1.zip
ok 20 - git archive --format=zip vs. the same in a bare repo
expecting success: git archive --format=zip --output=d2.zip HEAD &&
test_cmp_bin d.zip d2.zip
ok 21 - git archive --format=zip with --output
expecting success:
git archive --output=d3.zip HEAD &&
test_cmp_bin d.zip d3.zip
ok 22 - git archive with --output, inferring format (local)
expecting success:
git archive --remote=. --output=d4.zip HEAD &&
test_cmp_bin d.zip d4.zip
ok 23 - git archive with --output, inferring format (remote)
expecting success: git archive --format=zip --prefix=prefix/ HEAD >e.zip
ok 24 - git archive --format=zip with prefix
expecting success:
(mkdir $dir && cd $dir && "$GIT_UNZIP" ../$zipfile)
Archive: ../e.zip
4d1e276b3ffefe8682c13a553fd2d4008ab79e07
creating: prefix/
creating: prefix/a/
extracting: prefix/a/a
creating: prefix/a/bin/
inflating: prefix/a/bin/sh
extracting: prefix/a/binary.cr
extracting: prefix/a/binary.crlf
extracting: prefix/a/binary.lf
extracting: prefix/a/custom.cr
extracting: prefix/a/custom.crlf
extracting: prefix/a/custom.lf
extracting: prefix/a/diff.cr
extracting: prefix/a/diff.crlf
extracting: prefix/a/diff.lf
creating: prefix/a/long_path_to_a_file/
creating: prefix/a/long_path_to_a_file/long_path_to_a_file/
creating: prefix/a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
creating: prefix/a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
creating: prefix/a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
extracting: prefix/a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/file_with_long_path
extracting: prefix/a/nodiff.cr
extracting: prefix/a/nodiff.crlf
extracting: prefix/a/nodiff.lf
extracting: prefix/a/substfile1
extracting: prefix/a/substfile2
linking: prefix/a/symlink_to_a -> a
extracting: prefix/a/text.cr
extracting: prefix/a/text.crlf
extracting: prefix/a/text.lf
finishing deferred symbolic links:
prefix/a/symlink_to_a -> a
ok 25 - extract ZIP archive
expecting success:
(cd e/prefix/a && find .) | sort >e.lst &&
test_cmp a.lst e.lst
ok 26 - validate filenames
expecting success:
diff -r a e/prefix/a
ok 27 - validate file contents
expecting success:
(mkdir $dir && cd $dir && "$GIT_UNZIP" -a ../$zipfile)
Archive: ../e.zip
4d1e276b3ffefe8682c13a553fd2d4008ab79e07
creating: prefix/
creating: prefix/a/
extracting: prefix/a/a [text]
creating: prefix/a/bin/
inflating: prefix/a/bin/sh [binary]
extracting: prefix/a/binary.cr [binary]
extracting: prefix/a/binary.crlf [binary]
extracting: prefix/a/binary.lf [binary]
extracting: prefix/a/custom.cr [binary]
extracting: prefix/a/custom.crlf [binary]
extracting: prefix/a/custom.lf [binary]
extracting: prefix/a/diff.cr [text]
extracting: prefix/a/diff.crlf [text]
extracting: prefix/a/diff.lf [text]
creating: prefix/a/long_path_to_a_file/
creating: prefix/a/long_path_to_a_file/long_path_to_a_file/
creating: prefix/a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
creating: prefix/a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
creating: prefix/a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
extracting: prefix/a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/file_with_long_path [text]
extracting: prefix/a/nodiff.cr [binary]
extracting: prefix/a/nodiff.crlf [binary]
extracting: prefix/a/nodiff.lf [binary]
extracting: prefix/a/substfile1 [text]
extracting: prefix/a/substfile2 [text]
linking: prefix/a/symlink_to_a -> a
extracting: prefix/a/text.cr [text]
extracting: prefix/a/text.crlf [text]
extracting: prefix/a/text.lf [text]
finishing deferred symbolic links:
prefix/a/symlink_to_a -> a
ok 28 - extract ZIP archive with EOL conversion
expecting success:
test_cmp_bin eol_e/prefix/a/text.cr eol_e/prefix/a/text.crlf &&
test_cmp_bin eol_e/prefix/a/text.cr eol_e/prefix/a/text.lf
ok 29 - validate that text files are converted
expecting success:
test_cmp_bin a/binary.cr eol_e/prefix/a/binary.cr &&
test_cmp_bin a/binary.crlf eol_e/prefix/a/binary.crlf &&
test_cmp_bin a/binary.lf eol_e/prefix/a/binary.lf
ok 30 - validate that binary files are unchanged
expecting success:
test_cmp_bin eol_e/prefix/a/diff.cr eol_e/prefix/a/diff.crlf &&
test_cmp_bin eol_e/prefix/a/diff.cr eol_e/prefix/a/diff.lf
ok 31 - validate that diff files are converted
expecting success:
test_cmp_bin a/nodiff.cr eol_e/prefix/a/nodiff.cr &&
test_cmp_bin a/nodiff.crlf eol_e/prefix/a/nodiff.crlf &&
test_cmp_bin a/nodiff.lf eol_e/prefix/a/nodiff.lf
ok 32 - validate that -diff files are unchanged
expecting success:
test_cmp_bin a/custom.cr eol_e/prefix/a/custom.cr &&
test_cmp_bin a/custom.crlf eol_e/prefix/a/custom.crlf &&
test_cmp_bin a/custom.lf eol_e/prefix/a/custom.lf
ok 33 - validate that custom diff is unchanged
expecting success:
test_config core.bigfilethreshold 1 &&
git archive -0 --format=zip HEAD >large.zip
ok 34 - git archive -0 --format=zip on large files
expecting success:
(mkdir $dir && cd $dir && "$GIT_UNZIP" ../$zipfile)
Archive: ../large.zip
4d1e276b3ffefe8682c13a553fd2d4008ab79e07
creating: a/
extracting: a/a
creating: a/bin/
extracting: a/bin/sh
extracting: a/binary.cr
extracting: a/binary.crlf
extracting: a/binary.lf
extracting: a/custom.cr
extracting: a/custom.crlf
extracting: a/custom.lf
extracting: a/diff.cr
extracting: a/diff.crlf
extracting: a/diff.lf
creating: a/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
extracting: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/file_with_long_path
extracting: a/nodiff.cr
extracting: a/nodiff.crlf
extracting: a/nodiff.lf
extracting: a/substfile1
extracting: a/substfile2
linking: a/symlink_to_a -> a
extracting: a/text.cr
extracting: a/text.crlf
extracting: a/text.lf
finishing deferred symbolic links:
a/symlink_to_a -> a
ok 35 - extract ZIP archive
expecting success:
(cd large/a && find .) | sort >large.lst &&
test_cmp a.lst large.lst
ok 36 - validate filenames
expecting success:
diff -r a large/a
ok 37 - validate file contents
expecting success:
(mkdir $dir && cd $dir && "$GIT_UNZIP" -a ../$zipfile)
Archive: ../large.zip
4d1e276b3ffefe8682c13a553fd2d4008ab79e07
creating: a/
extracting: a/a [text]
creating: a/bin/
extracting: a/bin/sh [binary]
extracting: a/binary.cr [binary]
extracting: a/binary.crlf [binary]
extracting: a/binary.lf [binary]
extracting: a/custom.cr [binary]
extracting: a/custom.crlf [binary]
extracting: a/custom.lf [binary]
extracting: a/diff.cr [text]
extracting: a/diff.crlf [text]
extracting: a/diff.lf [text]
creating: a/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
extracting: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/file_with_long_path [text]
extracting: a/nodiff.cr [binary]
extracting: a/nodiff.crlf [binary]
extracting: a/nodiff.lf [binary]
extracting: a/substfile1 [text]
extracting: a/substfile2 [text]
linking: a/symlink_to_a -> a
extracting: a/text.cr [text]
extracting: a/text.crlf [text]
extracting: a/text.lf [text]
finishing deferred symbolic links:
a/symlink_to_a -> a
ok 38 - extract ZIP archive with EOL conversion
expecting success:
test_cmp_bin eol_large/a/text.cr eol_large/a/text.crlf &&
test_cmp_bin eol_large/a/text.cr eol_large/a/text.lf
ok 39 - validate that text files are converted
expecting success:
test_cmp_bin a/binary.cr eol_large/a/binary.cr &&
test_cmp_bin a/binary.crlf eol_large/a/binary.crlf &&
test_cmp_bin a/binary.lf eol_large/a/binary.lf
ok 40 - validate that binary files are unchanged
expecting success:
test_cmp_bin eol_large/a/diff.cr eol_large/a/diff.crlf &&
test_cmp_bin eol_large/a/diff.cr eol_large/a/diff.lf
ok 41 - validate that diff files are converted
expecting success:
test_cmp_bin a/nodiff.cr eol_large/a/nodiff.cr &&
test_cmp_bin a/nodiff.crlf eol_large/a/nodiff.crlf &&
test_cmp_bin a/nodiff.lf eol_large/a/nodiff.lf
ok 42 - validate that -diff files are unchanged
expecting success:
test_cmp_bin a/custom.cr eol_large/a/custom.cr &&
test_cmp_bin a/custom.crlf eol_large/a/custom.crlf &&
test_cmp_bin a/custom.lf eol_large/a/custom.lf
ok 43 - validate that custom diff is unchanged
expecting success:
test_config core.bigfilethreshold 1 &&
git archive --format=zip HEAD >large-compressed.zip
ok 44 - git archive --format=zip on large files
expecting success:
(mkdir $dir && cd $dir && "$GIT_UNZIP" ../$zipfile)
Archive: ../large-compressed.zip
4d1e276b3ffefe8682c13a553fd2d4008ab79e07
creating: a/
inflating: a/a
creating: a/bin/
inflating: a/bin/sh
inflating: a/binary.cr
inflating: a/binary.crlf
inflating: a/binary.lf
inflating: a/custom.cr
inflating: a/custom.crlf
inflating: a/custom.lf
inflating: a/diff.cr
inflating: a/diff.crlf
inflating: a/diff.lf
creating: a/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
inflating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/file_with_long_path
inflating: a/nodiff.cr
inflating: a/nodiff.crlf
inflating: a/nodiff.lf
extracting: a/substfile1
extracting: a/substfile2
linking: a/symlink_to_a -> a
inflating: a/text.cr
inflating: a/text.crlf
inflating: a/text.lf
finishing deferred symbolic links:
a/symlink_to_a -> a
ok 45 - extract ZIP archive
expecting success:
(cd large-compressed/a && find .) | sort >large-compressed.lst &&
test_cmp a.lst large-compressed.lst
ok 46 - validate filenames
expecting success:
diff -r a large-compressed/a
ok 47 - validate file contents
expecting success:
(mkdir $dir && cd $dir && "$GIT_UNZIP" -a ../$zipfile)
Archive: ../large-compressed.zip
4d1e276b3ffefe8682c13a553fd2d4008ab79e07
creating: a/
inflating: a/a [text]
creating: a/bin/
inflating: a/bin/sh [binary]
inflating: a/binary.cr [binary]
inflating: a/binary.crlf [binary]
inflating: a/binary.lf [binary]
inflating: a/custom.cr [binary]
inflating: a/custom.crlf [binary]
inflating: a/custom.lf [binary]
inflating: a/diff.cr [text]
inflating: a/diff.crlf [text]
inflating: a/diff.lf [text]
creating: a/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
creating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/
inflating: a/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/long_path_to_a_file/file_with_long_path [text]
inflating: a/nodiff.cr [binary]
inflating: a/nodiff.crlf [binary]
inflating: a/nodiff.lf [binary]
extracting: a/substfile1 [text]
extracting: a/substfile2 [text]
linking: a/symlink_to_a -> a
inflating: a/text.cr [text]
inflating: a/text.crlf [text]
inflating: a/text.lf [text]
finishing deferred symbolic links:
a/symlink_to_a -> a
ok 48 - extract ZIP archive with EOL conversion
expecting success:
test_cmp_bin eol_large-compressed/a/text.cr eol_large-compressed/a/text.crlf &&
test_cmp_bin eol_large-compressed/a/text.cr eol_large-compressed/a/text.lf
ok 49 - validate that text files are converted
expecting success:
test_cmp_bin a/binary.cr eol_large-compressed/a/binary.cr &&
test_cmp_bin a/binary.crlf eol_large-compressed/a/binary.crlf &&
test_cmp_bin a/binary.lf eol_large-compressed/a/binary.lf
ok 50 - validate that binary files are unchanged
expecting success:
test_cmp_bin eol_large-compressed/a/diff.cr eol_large-compressed/a/diff.crlf &&
test_cmp_bin eol_large-compressed/a/diff.cr eol_large-compressed/a/diff.lf
ok 51 - validate that diff files are converted
expecting success:
test_cmp_bin a/nodiff.cr eol_large-compressed/a/nodiff.cr &&
test_cmp_bin a/nodiff.crlf eol_large-compressed/a/nodiff.crlf &&
test_cmp_bin a/nodiff.lf eol_large-compressed/a/nodiff.lf
ok 52 - validate that -diff files are unchanged
expecting success:
test_cmp_bin a/custom.cr eol_large-compressed/a/custom.cr &&
test_cmp_bin a/custom.crlf eol_large-compressed/a/custom.crlf &&
test_cmp_bin a/custom.lf eol_large-compressed/a/custom.lf
ok 53 - validate that custom diff is unchanged
# passed all 53 test(s)
1..53
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4137-apply-submodule.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/.git/
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
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1/.git/
[master (root-commit) 82718df] Base inside first submodule
Author: A U Thor <author@example.com>
3 files changed, 4 insertions(+)
create mode 100644 .gitignore
create mode 100644 file1
create mode 100644 file2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub2/.git/
[master (root-commit) 145cc64] nested submodule 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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_repo/.git/
[master (root-commit) 88871fe] 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
Switched to a new branch 'add_sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_repo/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_repo/uninitialized_sub'...
done.
[add_sub1 ae92393] Add sub1
Author: A U Thor <author@example.com>
2 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 uninitialized_sub
Switched to a new branch 'remove_sub1'
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
[remove_sub1 e5168e4] Revert "Add sub1"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:29:22 2019 +0000
3 files changed, 9 deletions(-)
delete mode 100644 .gitmodules
delete mode 160000 sub1
delete mode 160000 uninitialized_sub
Switched to a new branch 'modify_sub1'
Switched to a new branch 'modifications'
[modifications fbb62ad] modified file2 and added file3
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 file3
To /<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1
* [new branch] modifications -> modifications
[modify_sub1 861f2fb] Modify sub1
Author: A U Thor <author@example.com>
Switched to a new branch 'add_nested_sub'
Switched to a new branch 'add_nested_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_repo/sub1/sub2'...
done.
[add_nested_sub db466c7] add a nested submodule
Author: A U Thor <author@example.com>
2 files changed, 5 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub2
[add_nested_sub 3f7be54] update submodule, that updates a nested submodule
Author: A U Thor <author@example.com>
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
[modify_sub1_recursively c604218] make a change in nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
[modify_sub1_recursively 281157b] update nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[modify_sub1_recursively 18d615b] update sub1, that updates nested sub
Author: A U Thor <author@example.com>
To /<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
To /<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub2
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
Cleared directory 'sub2'
Submodule 'sub2' (../submodule_update_sub2) unregistered for path 'sub2'
Switched to a new branch 'replace_sub1_with_directory'
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Previous HEAD position was 82718df Base inside first submodule
Switched to branch 'modifications'
rm 'sub1'
[replace_sub1_with_directory 3d54368] 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
Switched to a new branch 'replace_directory_with_sub1'
Removing sub1/file3
Removing sub1/file2
Removing sub1/file1
Adding sub1
[replace_directory_with_sub1 a816234] Revert "Replace sub1 with directory"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:29:24 2019 +0000
4 files changed, 4 insertions(+), 3 deletions(-)
delete mode 100644 sub1/file1
delete mode 100644 sub1/file2
delete mode 100644 sub1/file3
Switched to a new branch 'replace_sub1_with_file'
rm 'sub1'
[replace_sub1_with_file ff21ff0] 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'
[replace_file_with_sub1 2a4283d] Revert "Replace sub1 with file"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:29:24 2019 +0000
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
Switched to a new branch 'invalid_sub1'
[invalid_sub1 b938fa3] Invalid sub1 commit
Author: A U Thor <author@example.com>
Switched to a new branch 'valid_sub1'
[valid_sub1 eb30591] Revert "Invalid sub1 commit"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:29:24 2019 +0000
warning: unable to rmdir 'uninitialized_sub': Directory not empty
Switched to branch 'master'
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Submodule path 'uninitialized_sub': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
ok 1 - apply_index: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Submodule path 'uninitialized_sub': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
ok 2 - apply_index: added submodule leaves existing empty directory alone
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
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Submodule path 'uninitialized_sub': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
ok 3 - apply_index: 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
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Submodule path 'uninitialized_sub': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
ok 4 - apply_index: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
ok 5 - apply_index: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
ok 6 - apply_index: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: sub1/file1: already exists in working directory
error: sub1/file2: already exists in working directory
ok 7 - apply_index: replace submodule with a directory must fail
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: sub1/file1: already exists in working directory
error: sub1/file2: already exists in working directory
ok 8 - apply_index: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
error: unable to write file 'sub1' mode 100644: Directory not empty
'actual' is not empty, it contains:
:100644 100644 af3a0c56edfba1a28f50ada5ec2832a7f2f9b907 0000000000000000000000000000000000000000 M .gitmodules
not ok 9 - apply_index: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
error: unable to write file 'sub1' mode 100644: Directory not empty
'actual' is not empty, it contains:
:100644 100644 af3a0c56edfba1a28f50ada5ec2832a7f2f9b907 0000000000000000000000000000000000000000 M .gitmodules
not ok 10 - apply_index: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Submodule path 'sub1': checked out 'fbb62adcf380a61a9daa6dfb522c0fd1a93f6923'
ok 11 - apply_index: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
error: Server does not allow request for unadvertised object 0123456789012345678901234567890123456789
Fetched in submodule path 'sub1', but it did not contain 0123456789012345678901234567890123456789. Direct fetching of that commit failed.
ok 12 - apply_index: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Submodule path 'uninitialized_sub': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
ok 13 - apply_index: 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 &&
>sub1 &&
test_must_fail $command add_sub1 &&
test_superproject_content origin/no_submodule &&
test_must_be_empty sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
error: sub1: already exists in working directory
ok 14 - apply_index: added submodule doesn't remove untracked unignored file with same name
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Submodule path 'uninitialized_sub': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
ok 15 - apply_3way: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Submodule path 'uninitialized_sub': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
ok 16 - apply_3way: added submodule leaves existing empty directory alone
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
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Submodule path 'uninitialized_sub': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
ok 17 - apply_3way: 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
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Submodule path 'uninitialized_sub': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
ok 18 - apply_3way: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
ok 19 - apply_3way: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
ok 20 - apply_3way: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Falling back to three-way merge...
error: sub1/file1: does not exist in index
error: cannot read the current contents of 'sub1/file1'
error: sub1/file1: patch does not apply
Falling back to three-way merge...
error: sub1/file2: does not exist in index
error: cannot read the current contents of 'sub1/file2'
error: sub1/file2: patch does not apply
ok 21 - apply_3way: replace submodule with a directory must fail
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Falling back to three-way merge...
error: sub1/file1: does not exist in index
error: cannot read the current contents of 'sub1/file1'
error: sub1/file1: patch does not apply
Falling back to three-way merge...
error: sub1/file2: does not exist in index
error: cannot read the current contents of 'sub1/file2'
error: sub1/file2: patch does not apply
ok 22 - apply_3way: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
error: unable to write file 'sub1' mode 100644: Directory not empty
'actual' is not empty, it contains:
:100644 100644 af3a0c56edfba1a28f50ada5ec2832a7f2f9b907 0000000000000000000000000000000000000000 M .gitmodules
not ok 23 - apply_3way: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
error: unable to write file 'sub1' mode 100644: Directory not empty
'actual' is not empty, it contains:
:100644 100644 af3a0c56edfba1a28f50ada5ec2832a7f2f9b907 0000000000000000000000000000000000000000 M .gitmodules
not ok 24 - apply_3way: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Submodule path 'sub1': checked out 'fbb62adcf380a61a9daa6dfb522c0fd1a93f6923'
ok 25 - apply_3way: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
error: Server does not allow request for unadvertised object 0123456789012345678901234567890123456789
Fetched in submodule path 'sub1', but it did not contain 0123456789012345678901234567890123456789. Direct fetching of that commit failed.
ok 26 - apply_3way: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4137-apply-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
Submodule path 'uninitialized_sub': checked out '82718df301649de65d92d4c14c9dddbf72df395d'
ok 27 - apply_3way: 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 &&
>sub1 &&
test_must_fail $command add_sub1 &&
test_superproject_content origin/no_submodule &&
test_must_be_empty sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
error: sub1: patch does not apply
ok 28 - apply_3way: added submodule doesn't remove untracked unignored file with same name
# still have 4 known breakage(s)
# passed all remaining 24 test(s)
1..28
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5100-mailinfo.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5100-mailinfo/.git/
expecting success: git mailsplit -o. "$DATA/sample.mbox" >last &&
last=$(cat last) &&
echo total is $last &&
test $(cat last) = 18
total is 18
ok 1 - split sample box
expecting success:
check_mailinfo "$mail" "" &&
if test -f "$DATA/msg$mail--scissors"
then
check_mailinfo "$mail" --scissors
fi &&
if test -f "$DATA/msg$mail--no-inbody-headers"
then
check_mailinfo "$mail" --no-inbody-headers
fi &&
if test -f "$DATA/msg$mail--message-id"
then
check_mailinfo "$mail" --message-id
fi
ok 2 - mailinfo 0001
expecting success:
check_mailinfo "$mail" "" &&
if test -f "$DATA/msg$mail--scissors"
then
check_mailinfo "$mail" --scissors
fi &&
if test -f "$DATA/msg$mail--no-inbody-headers"
then
check_mailinfo "$mail" --no-inbody-headers
fi &&
if test -f "$DATA/msg$mail--message-id"
then
check_mailinfo "$mail" --message-id
fi
ok 3 - mailinfo 0002
expecting success:
check_mailinfo "$mail" "" &&
if test -f "$DATA/msg$mail--scissors"
then
check_mailinfo "$mail" --scissors
fi &&
if test -f "$DATA/msg$mail--no-inbody-headers"
then
check_mailinfo "$mail" --no-inbody-headers
fi &&
if test -f "$DATA/msg$mail--message-id"
then
check_mailinfo "$mail" --message-id
fi
ok 4 - mailinfo 0003
expecting success:
check_mailinfo "$mail" "" &&
if test -f "$DATA/msg$mail--scissors"
then
check_mailinfo "$mail" --scissors
fi &&
if test -f "$DATA/msg$mail--no-inbody-headers"
then
check_mailinfo "$mail" --no-inbody-headers
fi &&
if test -f "$DATA/msg$mail--message-id"
then
check_mailinfo "$mail" --message-id
fi
ok 5 - mailinfo 0004
expecting success:
check_mailinfo "$mail" "" &&
if test -f "$DATA/msg$mail--scissors"
then
check_mailinfo "$mail" --scissors
fi &&
if test -f "$DATA/msg$mail--no-inbody-headers"
then
check_mailinfo "$mail" --no-inbody-headers
fi &&
if test -f "$DATA/msg$mail--message-id"
then
check_mailinfo "$mail" --message-id
fi
ok 6 - mailinfo 0005
expecting success:
check_mailinfo "$mail" "" &&
if test -f "$DATA/msg$mail--scissors"
then
check_mailinfo "$mail" --scissors
fi &&
if test -f "$DATA/msg$mail--no-inbody-headers"
then
check_mailinfo "$mail" --no-inbody-headers
fi &&
if test -f "$DATA/msg$mail--message-id"
then
check_mailinfo "$mail" --message-id
fi
ok 7 - mailinfo 0006
expecting success:
check_mailinfo "$mail" "" &&
if test -f "$DATA/msg$mail--scissors"
then
check_mailinfo "$mail" --scissors
fi &&
if test -f "$DATA/msg$mail--no-inbody-headers"
then
check_mailinfo "$mail" --no-inbody-headers
fi &&
if test -f "$DATA/msg$mail--message-id"
then
check_mailinfo "$mail" --message-id
fi
ok 8 - mailinfo 0007
expecting success:
check_mailinfo "$mail" "" &&
if test -f "$DATA/msg$mail--scissors"
then
check_mailinfo "$mail" --scissors
fi &&
if test -f "$DATA/msg$mail--no-inbody-headers"
then
check_mailinfo "$mail" --no-inbody-headers
fi &&
if test -f "$DATA/msg$mail--message-id"
then
check_mailinfo "$mail" --message-id
fi
ok 9 - mailinfo 0008
expecting success:
check_mailinfo "$mail" "" &&
if test -f "$DATA/msg$mail--scissors"
then
check_mailinfo "$mail" --scissors
fi &&
if test -f "$DATA/msg$mail--no-inbody-headers"
then
check_mailinfo "$mail" --no-inbody-headers
fi &&
if test -f "$DATA/msg$mail--message-id"
then
check_mailinfo "$mail" --message-id
fi
ok 10 - mailinfo 0009
expecting success:
check_mailinfo "$mail" "" &&
if test -f "$DATA/msg$mail--scissors"
then
check_mailinfo "$mail" --scissors
fi &&
if test -f "$DATA/msg$mail--no-inbody-headers"
then
check_mailinfo "$mail" --no-inbody-headers
fi &&
if test -f "$DATA/msg$mail--message-id"
then
check_mailinfo "$mail" --message-id
fi
ok 11 - mailinfo 0010
expecting success:
check_mailinfo "$mail" "" &&
if test -f "$DATA/msg$mail--scissors"
then
check_mailinfo "$mail" --scissors
fi &&
if test -f "$DATA/msg$mail--no-inbody-headers"
then
check_mailinfo "$mail" --no-inbody-headers
fi &&
if test -f "$DATA/msg$mail--message-id"
then
check_mailinfo "$mail" --message-id
fi
ok 12 - mailinfo 0011
expecting success:
check_mailinfo "$mail" "" &&
if test -f "$DATA/msg$mail--scissors"
then
check_mailinfo "$mail" --scissors
fi &&
if test -f "$DATA/msg$mail--no-inbody-headers"
then
check_mailinfo "$mail" --no-inbody-headers
fi &&
if test -f "$DATA/msg$mail--message-id"
then
check_mailinfo "$mail" --message-id
fi
ok 13 - mailinfo 0012
expecting success:
check_mailinfo "$mail" "" &&
if test -f "$DATA/msg$mail--scissors"
then
check_mailinfo "$mail" --scissors
fi &&
if test -f "$DATA/msg$mail--no-inbody-headers"
then
check_mailinfo "$mail" --no-inbody-headers
fi &&
if test -f "$DATA/msg$mail--message-id"
then
check_mailinfo "$mail" --message-id
fi
ok 14 - mailinfo 0013
expecting success:
check_mailinfo "$mail" "" &&
if test -f "$DATA/msg$mail--scissors"
then
check_mailinfo "$mail" --scissors
fi &&
if test -f "$DATA/msg$mail--no-inbody-headers"
then
check_mailinfo "$mail" --no-inbody-headers
fi &&
if test -f "$DATA/msg$mail--message-id"
then
check_mailinfo "$mail" --message-id
fi
ok 15 - mailinfo 0014
expecting success:
check_mailinfo "$mail" "" &&
if test -f "$DATA/msg$mail--scissors"
then
check_mailinfo "$mail" --scissors
fi &&
if test -f "$DATA/msg$mail--no-inbody-headers"
then
check_mailinfo "$mail" --no-inbody-headers
fi &&
if test -f "$DATA/msg$mail--message-id"
then
check_mailinfo "$mail" --message-id
fi
ok 16 - mailinfo 0015
expecting success:
check_mailinfo "$mail" "" &&
if test -f "$DATA/msg$mail--scissors"
then
check_mailinfo "$mail" --scissors
fi &&
if test -f "$DATA/msg$mail--no-inbody-headers"
then
check_mailinfo "$mail" --no-inbody-headers
fi &&
if test -f "$DATA/msg$mail--message-id"
then
check_mailinfo "$mail" --message-id
fi
ok 17 - mailinfo 0016
expecting success:
check_mailinfo "$mail" "" &&
if test -f "$DATA/msg$mail--scissors"
then
check_mailinfo "$mail" --scissors
fi &&
if test -f "$DATA/msg$mail--no-inbody-headers"
then
check_mailinfo "$mail" --no-inbody-headers
fi &&
if test -f "$DATA/msg$mail--message-id"
then
check_mailinfo "$mail" --message-id
fi
ok 18 - mailinfo 0017
expecting success:
check_mailinfo "$mail" "" &&
if test -f "$DATA/msg$mail--scissors"
then
check_mailinfo "$mail" --scissors
fi &&
if test -f "$DATA/msg$mail--no-inbody-headers"
then
check_mailinfo "$mail" --no-inbody-headers
fi &&
if test -f "$DATA/msg$mail--message-id"
then
check_mailinfo "$mail" --message-id
fi
ok 19 - mailinfo 0018
expecting success: mkdir rfc2047 &&
git mailsplit -orfc2047 "$DATA/rfc2047-samples.mbox" \
>rfc2047/last &&
last=$(cat rfc2047/last) &&
echo total is $last &&
test $(cat rfc2047/last) = 11
total is 11
ok 20 - split box with rfc2047 samples
expecting success:
git mailinfo -u "$mail-msg" "$mail-patch" <"$mail" >"$mail-info" &&
echo msg &&
test_cmp "$DATA/empty" "$mail-msg" &&
echo patch &&
test_cmp "$DATA/empty" "$mail-patch" &&
echo info &&
test_cmp "$DATA/rfc2047-info-$(basename $mail)" "$mail-info"
msg
patch
info
ok 21 - mailinfo rfc2047/0001
expecting success:
git mailinfo -u "$mail-msg" "$mail-patch" <"$mail" >"$mail-info" &&
echo msg &&
test_cmp "$DATA/empty" "$mail-msg" &&
echo patch &&
test_cmp "$DATA/empty" "$mail-patch" &&
echo info &&
test_cmp "$DATA/rfc2047-info-$(basename $mail)" "$mail-info"
msg
patch
info
ok 22 - mailinfo rfc2047/0002
expecting success:
git mailinfo -u "$mail-msg" "$mail-patch" <"$mail" >"$mail-info" &&
echo msg &&
test_cmp "$DATA/empty" "$mail-msg" &&
echo patch &&
test_cmp "$DATA/empty" "$mail-patch" &&
echo info &&
test_cmp "$DATA/rfc2047-info-$(basename $mail)" "$mail-info"
msg
patch
info
ok 23 - mailinfo rfc2047/0003
expecting success:
git mailinfo -u "$mail-msg" "$mail-patch" <"$mail" >"$mail-info" &&
echo msg &&
test_cmp "$DATA/empty" "$mail-msg" &&
echo patch &&
test_cmp "$DATA/empty" "$mail-patch" &&
echo info &&
test_cmp "$DATA/rfc2047-info-$(basename $mail)" "$mail-info"
msg
patch
info
ok 24 - mailinfo rfc2047/0004
expecting success:
git mailinfo -u "$mail-msg" "$mail-patch" <"$mail" >"$mail-info" &&
echo msg &&
test_cmp "$DATA/empty" "$mail-msg" &&
echo patch &&
test_cmp "$DATA/empty" "$mail-patch" &&
echo info &&
test_cmp "$DATA/rfc2047-info-$(basename $mail)" "$mail-info"
msg
patch
info
ok 25 - mailinfo rfc2047/0005
expecting success:
git mailinfo -u "$mail-msg" "$mail-patch" <"$mail" >"$mail-info" &&
echo msg &&
test_cmp "$DATA/empty" "$mail-msg" &&
echo patch &&
test_cmp "$DATA/empty" "$mail-patch" &&
echo info &&
test_cmp "$DATA/rfc2047-info-$(basename $mail)" "$mail-info"
msg
patch
info
ok 26 - mailinfo rfc2047/0006
expecting success:
git mailinfo -u "$mail-msg" "$mail-patch" <"$mail" >"$mail-info" &&
echo msg &&
test_cmp "$DATA/empty" "$mail-msg" &&
echo patch &&
test_cmp "$DATA/empty" "$mail-patch" &&
echo info &&
test_cmp "$DATA/rfc2047-info-$(basename $mail)" "$mail-info"
msg
patch
info
ok 27 - mailinfo rfc2047/0007
expecting success:
git mailinfo -u "$mail-msg" "$mail-patch" <"$mail" >"$mail-info" &&
echo msg &&
test_cmp "$DATA/empty" "$mail-msg" &&
echo patch &&
test_cmp "$DATA/empty" "$mail-patch" &&
echo info &&
test_cmp "$DATA/rfc2047-info-$(basename $mail)" "$mail-info"
msg
patch
info
ok 28 - mailinfo rfc2047/0008
expecting success:
git mailinfo -u "$mail-msg" "$mail-patch" <"$mail" >"$mail-info" &&
echo msg &&
test_cmp "$DATA/empty" "$mail-msg" &&
echo patch &&
test_cmp "$DATA/empty" "$mail-patch" &&
echo info &&
test_cmp "$DATA/rfc2047-info-$(basename $mail)" "$mail-info"
msg
patch
info
ok 29 - mailinfo rfc2047/0009
expecting success:
git mailinfo -u "$mail-msg" "$mail-patch" <"$mail" >"$mail-info" &&
echo msg &&
test_cmp "$DATA/empty" "$mail-msg" &&
echo patch &&
test_cmp "$DATA/empty" "$mail-patch" &&
echo info &&
test_cmp "$DATA/rfc2047-info-$(basename $mail)" "$mail-info"
msg
patch
info
ok 30 - mailinfo rfc2047/0010
expecting success:
git mailinfo -u "$mail-msg" "$mail-patch" <"$mail" >"$mail-info" &&
echo msg &&
test_cmp "$DATA/empty" "$mail-msg" &&
echo patch &&
test_cmp "$DATA/empty" "$mail-patch" &&
echo info &&
test_cmp "$DATA/rfc2047-info-$(basename $mail)" "$mail-info"
msg
patch
info
ok 31 - mailinfo rfc2047/0011
expecting success:
git mailsplit -d3 -o. "$DATA/nul-plain" &&
test_cmp "$DATA/nul-plain" 001 &&
(cat 001 | git mailinfo msg patch) &&
test_line_count = 4 patch
1
ok 32 - respect NULs
expecting success:
git mailsplit -d5 -o. "$DATA/nul-b64.in" &&
test_cmp "$DATA/nul-b64.in" 00001 &&
git mailinfo msg patch <00001 &&
test_cmp "$DATA/nul-b64.expect" patch
1
Author: Junio C Hamano
Email: gitster@pobox.com
Subject: second
Date: Sun, 25 May 2008 00:38:18 -0700
ok 33 - Preserve NULs out of MIME encoded message
expecting success:
mkdir info-from &&
git mailsplit -oinfo-from "$DATA/info-from.in" &&
test_cmp "$DATA/info-from.in" info-from/0001 &&
git mailinfo info-from/msg info-from/patch \
<info-from/0001 >info-from/out &&
test_cmp "$DATA/info-from.expect" info-from/out
1
ok 34 - mailinfo on from header without name works
expecting success:
mkdir embed-from &&
git mailsplit -oembed-from "$DATA/embed-from.in" &&
test_cmp "$DATA/embed-from.in" embed-from/0001 &&
git mailinfo embed-from/msg embed-from/patch \
<embed-from/0001 >embed-from/out &&
test_cmp "$DATA/embed-from.expect" embed-from/out
1
ok 35 - mailinfo finds headers after embedded From line
expecting success:
mkdir quoted-from &&
git mailsplit -oquoted-from "$DATA/quoted-from.in" &&
test_cmp "$DATA/quoted-from.in" quoted-from/0001 &&
git mailinfo quoted-from/msg quoted-from/patch \
<quoted-from/0001 >quoted-from/out &&
test_cmp "$DATA/quoted-from.expect" quoted-from/msg
1
ok 36 - mailinfo on message with quoted >From
expecting success:
mkdir mboxrd &&
git mailsplit -omboxrd --mboxrd \
"$DATA/sample.mboxrd" >last &&
test x"$(cat last)" = x2 &&
for i in 0001 0002
do
git mailinfo mboxrd/msg mboxrd/patch \
<mboxrd/$i >mboxrd/out &&
test_cmp "$DATA/${i}mboxrd" mboxrd/msg
done &&
sp=" " &&
echo "From " >expect &&
echo "From " >>expect &&
echo >> expect &&
cat >sp <<-INPUT_END &&
From mboxrd Mon Sep 17 00:00:00 2001
From: trailing spacer <sp@example.com>
Subject: [PATCH] a commit with trailing space
From$sp
>From$sp
INPUT_END
git mailsplit -f2 -omboxrd --mboxrd <sp >last &&
test x"$(cat last)" = x1 &&
git mailinfo mboxrd/msg mboxrd/patch <mboxrd/0003 &&
test_cmp expect mboxrd/msg
Author: trailing spacer
Email: sp@example.com
Subject: a commit with trailing space
ok 37 - mailinfo unescapes with --mboxrd
expecting success:
mkdir quoted-string &&
git mailinfo /dev/null /dev/null <"$DATA/quoted-string.in" \
>quoted-string/info &&
test_cmp "$DATA/quoted-string.expect" quoted-string/info
ok 38 - mailinfo handles rfc2822 quoted-string
expecting success:
mkdir comment &&
git mailinfo /dev/null /dev/null <"$DATA/comment.in" \
>comment/info &&
test_cmp "$DATA/comment.expect" comment/info
ok 39 - mailinfo handles rfc2822 comment
expecting success:
test_config mailinfo.scissors true &&
(
mkdir sub &&
cd sub &&
git mailinfo ../msg0014.sc ../patch0014.sc <../0014 >../info0014.sc
) &&
test_cmp "$DATA/msg0014--scissors" msg0014.sc &&
test_cmp "$DATA/patch0014--scissors" patch0014.sc &&
test_cmp "$DATA/info0014--scissors" info0014.sc
ok 40 - mailinfo with mailinfo.scissors config
expecting success:
subj="$(echo "Subject: [PATCH] [other] [PATCH] message" |
git mailinfo /dev/null /dev/null)" &&
test z"$subj" = z"Subject: message"
ok 41 - mailinfo no options
expecting success:
subj="$(echo "Subject: [PATCH] [other] [PATCH] message" |
git mailinfo -k /dev/null /dev/null)" &&
test z"$subj" = z"Subject: [PATCH] [other] [PATCH] message"
ok 42 - mailinfo -k
expecting success:
subj="$(echo "Subject: [other] message" |
git mailinfo -b /dev/null /dev/null)" &&
test z"$subj" = z"Subject: [other] message"
ok 43 - mailinfo -b no [PATCH]
expecting success:
subj="$(echo "Subject: [PATCH] [other] message" |
git mailinfo -b /dev/null /dev/null)" &&
test z"$subj" = z"Subject: [other] message"
ok 44 - mailinfo -b leading [PATCH]
expecting success:
subj="$(echo "Subject: [PATCH] [PATCH] message" |
git mailinfo -b /dev/null /dev/null)" &&
test z"$subj" = z"Subject: message"
ok 45 - mailinfo -b double [PATCH]
checking known breakage:
subj="$(echo "Subject: [other] [PATCH] message" |
git mailinfo -b /dev/null /dev/null)" &&
test z"$subj" = z"Subject: [other] message"
fatal: `pos + len' is too far after the end of the buffer
not ok 46 - mailinfo -b trailing [PATCH] # TODO known breakage
checking known breakage:
subj="$(echo "Subject: [PATCH] [other] [PATCH] message" |
git mailinfo -b /dev/null /dev/null)" &&
test z"$subj" = z"Subject: [other] message"
fatal: `pos + len' is too far after the end of the buffer
not ok 47 - mailinfo -b separated double [PATCH] # TODO known breakage
# still have 2 known breakage(s)
# passed all remaining 45 test(s)
1..47
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5200-update-server-info.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5200-update-server-info/.git/
expecting success: test_commit file
[master (root-commit) 4c1911f] file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.t
ok 1 - setup
expecting success:
git update-server-info &&
test_path_is_file .git/info/refs
ok 2 - create info/refs
expecting success:
test-tool chmtime =0 .git/info/refs &&
test-tool chmtime --get .git/info/refs >a
ok 3 - modify and store mtime
expecting success:
git update-server-info &&
test-tool chmtime --get .git/info/refs >b &&
test_cmp a b
ok 4 - info/refs is not needlessly overwritten
expecting success:
git update-server-info -f &&
test-tool chmtime --get .git/info/refs >b &&
! test_cmp a b
--- a 2019-08-14 07:29:55.408891550 +0000
+++ b 2019-08-14 07:29:55.496892435 +0000
@@ -1 +1 @@
-0
+1565767795
ok 5 - info/refs can be forced to update
expecting success:
test-tool chmtime =0 .git/info/refs &&
test-tool chmtime --get .git/info/refs >b &&
test_cmp a b &&
git update-ref refs/heads/foo HEAD &&
git update-server-info &&
test-tool chmtime --get .git/info/refs >b &&
! test_cmp a b
--- a 2019-08-14 07:29:55.408891550 +0000
+++ b 2019-08-14 07:29:55.592893401 +0000
@@ -1 +1 @@
-0
+1565767795
ok 6 - info/refs updates when changes are made
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5150-request-pull.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/.git/
expecting success:
git init --bare upstream.git &&
git init --bare downstream.git &&
git clone upstream.git upstream-private &&
git clone downstream.git local &&
trash_url="file://$TRASH_DIRECTORY" &&
downstream_url="$trash_url/downstream.git/" &&
upstream_url="$trash_url/upstream.git/" &&
(
cd upstream-private &&
cat <<-\EOT >mnemonic.txt &&
Thirtey days hath November,
Aprile, June, and September:
EOT
git add mnemonic.txt &&
test_tick &&
git commit -m "\"Thirty days\", a reminder of month lengths" &&
git tag -m "version 1" -a initial &&
git push --tags origin master
) &&
(
cd local &&
git remote add upstream "$trash_url/upstream.git" &&
git fetch upstream &&
git pull upstream master &&
cat <<-\EOT >>mnemonic.txt &&
Of twyecescore-eightt is but eine,
And all the remnante be thrycescore-eine.
O’course Leap yare comes an’pynes,
Ev’rie foure yares, gote it ryghth.
An’twyecescore-eight is but twyecescore-nyne.
EOT
git add mnemonic.txt &&
test_tick &&
git commit -m "More detail" &&
git tag -m "version 2" -a full &&
git checkout -b simplify HEAD^ &&
mv mnemonic.txt mnemonic.standard &&
cat <<-\EOT >mnemonic.clarified &&
Thirty days has September,
All the rest I can’t remember.
EOT
git add -N mnemonic.standard mnemonic.clarified &&
git commit -a -m "Adapt to use modern, simpler English
But keep the old version, too, in case some people prefer it." &&
git checkout master
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/upstream.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git/
Cloning into 'upstream-private'...
warning: You appear to have cloned an empty repository.
done.
Cloning into 'local'...
warning: You appear to have cloned an empty repository.
done.
[master (root-commit) 7244768] "Thirty days", a reminder of month lengths
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
create mode 100644 mnemonic.txt
To /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/upstream.git
* [new branch] master -> master
* [new tag] initial -> initial
From file:///<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/upstream
* [new branch] master -> upstream/master
* [new tag] initial -> initial
From file:///<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/upstream
* branch master -> FETCH_HEAD
[master cc0f4ce] More detail
Author: A U Thor <author@example.com>
1 file changed, 5 insertions(+)
Switched to a new branch 'simplify'
[simplify 6fa5b4f] Adapt to use modern, simpler English
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 mnemonic.clarified
rename mnemonic.txt => mnemonic.standard (100%)
Switched to branch 'master'
Your branch is based on 'origin/master', but the upstream is gone.
(use "git branch --unset-upstream" to fixup)
ok 1 - setup
expecting success:
downstream_url_for_sed=$(
printf "%s\n" "$downstream_url" |
sed -e 's/\\/\\\\/g' -e 's/[[/.*^$]/\\&/g'
) &&
cat <<-\EOT >read-request.sed &&
#!/bin/sed -nf
# Note that a request could ask for "tag $tagname"
/ in the Git repository at:$/!d
n
/^$/ n
s/ tag \([^ ]*\)$/ tag--\1/
s/^[ ]*\(.*\) \([^ ]*\)/please pull\
\1\
\2/p
q
EOT
cat <<-EOT >fuzz.sed
#!/bin/sed -nf
s/$downstream_url_for_sed/URL/g
s/$OID_REGEX/OBJECT_NAME/g
s/A U Thor/AUTHOR/g
s/[-0-9]\{10\} [:0-9]\{8\} [-+][0-9]\{4\}/DATE/g
s/ [^ ].*/ SUBJECT/g
s/ [^ ].* (DATE)/ SUBJECT (DATE)/g
s|tags/full|BRANCH|g
s/mnemonic.txt/FILENAME/g
s/^version [0-9]/VERSION/
/^ FILENAME | *[0-9]* [-+]*\$/ b diffstat
/^AUTHOR ([0-9]*):\$/ b shortlog
p
b
: diffstat
n
/ [0-9]* files* changed/ {
a\\
DIFFSTAT
b
}
b diffstat
: shortlog
/^ [a-zA-Z]/ n
/^[a-zA-Z]* ([0-9]*):\$/ n
/^\$/ N
/^\n[a-zA-Z]* ([0-9]*):\$/!{
a\\
SHORTLOG
D
}
n
b shortlog
EOT
ok 2 - setup: two scripts for reading pull requests
expecting success:
rm -fr downstream.git &&
git init --bare downstream.git &&
(
cd local &&
git checkout initial &&
git merge --ff-only master &&
test_must_fail git request-pull initial "$downstream_url" \
2>../err
) &&
grep "No match for commit .*" err &&
grep "Are you sure you pushed" err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git/
Note: switching to 'initial'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 7244768 "Thirty days", a reminder of month lengths
Updating 7244768..cc0f4ce
Fast-forward
mnemonic.txt | 5 +++++
1 file changed, 5 insertions(+)
The following changes since commit 7244768f7e34b5fbdf65e26dda6c138d29596555:
"Thirty days", a reminder of month lengths (2005-04-07 15:13:13 -0700)
are available in the Git repository at:
file:///<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git/
for you to fetch changes up to cc0f4cedef2d8246b90a5255caa6a61ad760ad56:
More detail (2005-04-07 15:13:13 -0700)
----------------------------------------------------------------
A U Thor (1):
More detail
mnemonic.txt | 5 +++++
1 file changed, 5 insertions(+)
warn: No match for commit cc0f4cedef2d8246b90a5255caa6a61ad760ad56 found at file:///<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git/
warn: Are you sure you pushed 'HEAD' there?
ok 3 - pull request when forgot to push
expecting success:
rm -fr downstream.git &&
git init --bare downstream.git &&
(
cd local &&
git checkout initial &&
git merge --ff-only master &&
git push origin master:for-upstream &&
git request-pull initial origin master:for-upstream >../request
) &&
sed -nf read-request.sed <request >digest &&
cat digest &&
{
read task &&
read repository &&
read branch
} <digest &&
(
cd upstream-private &&
git checkout initial &&
git pull --ff-only "$repository" "$branch"
) &&
test "$branch" = for-upstream &&
test_cmp local/mnemonic.txt upstream-private/mnemonic.txt
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git/
Previous HEAD position was cc0f4ce More detail
HEAD is now at 7244768 "Thirty days", a reminder of month lengths
Updating 7244768..cc0f4ce
Fast-forward
mnemonic.txt | 5 +++++
1 file changed, 5 insertions(+)
To /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git
* [new branch] master -> for-upstream
please pull
/<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git
for-upstream
Note: switching to 'initial'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 7244768 "Thirty days", a reminder of month lengths
From /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream
* branch for-upstream -> FETCH_HEAD
Updating 7244768..cc0f4ce
Fast-forward
mnemonic.txt | 5 +++++
1 file changed, 5 insertions(+)
ok 4 - pull request after push
expecting success:
rm -fr downstream.git &&
git init --bare downstream.git &&
(
cd local &&
git checkout initial &&
git merge --ff-only master &&
git push --tags origin master simplify &&
git push origin master:for-upstream &&
git request-pull initial "$downstream_url" >../request
) &&
sed -nf read-request.sed <request >digest &&
cat digest &&
{
read task &&
read repository &&
read branch
} <digest &&
test -z "$branch"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git/
Previous HEAD position was cc0f4ce More detail
HEAD is now at 7244768 "Thirty days", a reminder of month lengths
Updating 7244768..cc0f4ce
Fast-forward
mnemonic.txt | 5 +++++
1 file changed, 5 insertions(+)
To /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git
* [new branch] master -> master
* [new branch] simplify -> simplify
* [new tag] full -> full
* [new tag] initial -> initial
To /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git
* [new branch] master -> for-upstream
please pull
file:///<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git/
ok 5 - request asks HEAD to be pulled
expecting success:
rm -fr downstream.git &&
git init --bare downstream.git &&
cat <<-\EOT >expect &&
The following changes since commit OBJECT_NAME:
SUBJECT (DATE)
are available in the Git repository at:
URL BRANCH
for you to fetch changes up to OBJECT_NAME:
SUBJECT (DATE)
----------------------------------------------------------------
VERSION
----------------------------------------------------------------
SHORTLOG
DIFFSTAT
EOT
(
cd local &&
git checkout initial &&
git merge --ff-only master &&
git push origin tags/full &&
git request-pull initial "$downstream_url" tags/full >../request
) &&
<request sed -nf fuzz.sed >request.fuzzy &&
test_i18ncmp expect request.fuzzy &&
(
cd local &&
git request-pull initial "$downstream_url" tags/full:refs/tags/full
) >request &&
sed -nf fuzz.sed <request >request.fuzzy &&
test_i18ncmp expect request.fuzzy &&
(
cd local &&
git request-pull initial "$downstream_url" full
) >request &&
grep " tags/full\$" request
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git/
Previous HEAD position was cc0f4ce More detail
HEAD is now at 7244768 "Thirty days", a reminder of month lengths
Updating 7244768..cc0f4ce
Fast-forward
mnemonic.txt | 5 +++++
1 file changed, 5 insertions(+)
To /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git
* [new tag] full -> full
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
file:///<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git/ tags/full
ok 6 - pull request format
expecting success:
(
cd local &&
OPTIONS_KEEPDASHDASH=Yes &&
export OPTIONS_KEEPDASHDASH &&
git checkout initial &&
git merge --ff-only master &&
git push origin master:for-upstream &&
git request-pull -- initial "$downstream_url" master:for-upstream >../request
)
Previous HEAD position was cc0f4ce More detail
HEAD is now at 7244768 "Thirty days", a reminder of month lengths
Updating 7244768..cc0f4ce
Fast-forward
mnemonic.txt | 5 +++++
1 file changed, 5 insertions(+)
To /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git
* [new branch] master -> for-upstream
ok 7 - request-pull ignores OPTIONS_KEEPDASHDASH poison
expecting success:
rm -fr downstream.git &&
git init --bare downstream.git &&
(
cd local &&
git checkout initial &&
git merge --ff-only master &&
git tag -mrelease v2.0 &&
git push origin refs/tags/v2.0:refs/tags/v2-0 &&
test_must_fail git request-pull initial "$downstream_url" tags/v2.0 \
2>../err
) &&
grep "No match for commit .*" err &&
grep "Are you sure you pushed" err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git/
Previous HEAD position was cc0f4ce More detail
HEAD is now at 7244768 "Thirty days", a reminder of month lengths
Updating 7244768..cc0f4ce
Fast-forward
mnemonic.txt | 5 +++++
1 file changed, 5 insertions(+)
To /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git
* [new tag] v2.0 -> v2-0
The following changes since commit 7244768f7e34b5fbdf65e26dda6c138d29596555:
"Thirty days", a reminder of month lengths (2005-04-07 15:13:13 -0700)
are available in the Git repository at:
file:///<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git/ tags/v2.0
for you to fetch changes up to cc0f4cedef2d8246b90a5255caa6a61ad760ad56:
More detail (2005-04-07 15:13:13 -0700)
----------------------------------------------------------------
release
----------------------------------------------------------------
A U Thor (1):
More detail
mnemonic.txt | 5 +++++
1 file changed, 5 insertions(+)
warn: No match for commit cc0f4cedef2d8246b90a5255caa6a61ad760ad56 found at file:///<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git/
warn: Are you sure you pushed 'tags/v2.0' there?
ok 8 - request-pull quotes regex metacharacters properly
expecting success:
rm -fr downstream.git &&
git init --bare downstream.git &&
(
cd local &&
git checkout initial &&
git merge --ff-only master &&
git push origin HEAD:refs/tags/full &&
test_must_fail git request-pull initial "$downstream_url" tags/full \
2>../err
) &&
grep "points to a different object" err &&
grep "Are you sure you pushed" err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git/
Previous HEAD position was cc0f4ce More detail
HEAD is now at 7244768 "Thirty days", a reminder of month lengths
Updating 7244768..cc0f4ce
Fast-forward
mnemonic.txt | 5 +++++
1 file changed, 5 insertions(+)
To /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git
* [new tag] HEAD -> full
The following changes since commit 7244768f7e34b5fbdf65e26dda6c138d29596555:
"Thirty days", a reminder of month lengths (2005-04-07 15:13:13 -0700)
are available in the Git repository at:
file:///<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git/ tags/full
for you to fetch changes up to cc0f4cedef2d8246b90a5255caa6a61ad760ad56:
More detail (2005-04-07 15:13:13 -0700)
----------------------------------------------------------------
version 2
----------------------------------------------------------------
A U Thor (1):
More detail
mnemonic.txt | 5 +++++
1 file changed, 5 insertions(+)
warn: refs/tags/full found at file:///<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git/ but points to a different object
warn: Are you sure you pushed 'tags/full' there?
ok 9 - pull request with mismatched object
expecting success:
rm -fr downstream.git &&
git init --bare downstream.git &&
(
cd local &&
git checkout initial &&
git merge --ff-only master &&
git push origin refs/tags/full &&
git tag -f -m"Thirty-one days" full &&
test_must_fail git request-pull initial "$downstream_url" tags/full \
2>../err
) &&
grep "points to a different object" err &&
grep "Are you sure you pushed" err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git/
Previous HEAD position was cc0f4ce More detail
HEAD is now at 7244768 "Thirty days", a reminder of month lengths
Updating 7244768..cc0f4ce
Fast-forward
mnemonic.txt | 5 +++++
1 file changed, 5 insertions(+)
To /<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git
* [new tag] full -> full
Updated tag 'full' (was a82f848)
The following changes since commit 7244768f7e34b5fbdf65e26dda6c138d29596555:
"Thirty days", a reminder of month lengths (2005-04-07 15:13:13 -0700)
are available in the Git repository at:
file:///<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git/ tags/full
for you to fetch changes up to cc0f4cedef2d8246b90a5255caa6a61ad760ad56:
More detail (2005-04-07 15:13:13 -0700)
----------------------------------------------------------------
Thirty-one days
----------------------------------------------------------------
A U Thor (1):
More detail
mnemonic.txt | 5 +++++
1 file changed, 5 insertions(+)
warn: refs/tags/full found at file:///<<PKGBUILDDIR>>/t/trash directory.t5150-request-pull/downstream.git/ but points to a different object
warn: Are you sure you pushed 'tags/full' there?
ok 10 - pull request with stale object
# passed all 10 test(s)
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5301-sliding-window.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5301-sliding-window/.git/
expecting success: rm -f .git/index* &&
for i in a b c
do
echo $i >$i &&
test-tool genrandom "$i" 32768 >>$i &&
git update-index --add $i || return 1
done &&
echo d >d && cat c >>d && git update-index --add d &&
tree=$(git write-tree) &&
commit1=$(git commit-tree $tree </dev/null) &&
git update-ref HEAD $commit1 &&
git repack -a -d &&
test "$(git count-objects)" = "0 objects, 0 kilobytes" &&
pack1=$(ls .git/objects/pack/*.pack) &&
test -f "$pack1"
ok 1 - setup
expecting success: git verify-pack -v "$pack1"
9865fac3524bcf17109d27d7de0f71508a5578cb commit 163 124 12
d67b2ae81f0bd18212d239b6a965711041f73739 blob 32770 32789 136
7c0c57f15aee3c4cbe243c44d3c01ecfa949bb25 blob 32770 32789 32925
f76f6b9f6aed8209a40d300bf7dcb4fcf9863531 blob 32772 32791 65714
556c804eac998cc8fa89f225a29870c3d873477b blob 10 22 98505 1 f76f6b9f6aed8209a40d300bf7dcb4fcf9863531
b7fabea4d93049ea90d45d8252b9a4f8ee7c9c2c tree 116 115 98527
non delta: 5 objects
chain length = 1: 1 object
.git/objects/pack/pack-21f4b2a01f44093beff8f9e3fd6ec9103fc95912.pack: ok
ok 2 - verify-pack -v, defaults
expecting success: git config core.packedGitWindowSize 512 &&
git verify-pack -v "$pack1"
9865fac3524bcf17109d27d7de0f71508a5578cb commit 163 124 12
d67b2ae81f0bd18212d239b6a965711041f73739 blob 32770 32789 136
7c0c57f15aee3c4cbe243c44d3c01ecfa949bb25 blob 32770 32789 32925
f76f6b9f6aed8209a40d300bf7dcb4fcf9863531 blob 32772 32791 65714
556c804eac998cc8fa89f225a29870c3d873477b blob 10 22 98505 1 f76f6b9f6aed8209a40d300bf7dcb4fcf9863531
b7fabea4d93049ea90d45d8252b9a4f8ee7c9c2c tree 116 115 98527
non delta: 5 objects
chain length = 1: 1 object
.git/objects/pack/pack-21f4b2a01f44093beff8f9e3fd6ec9103fc95912.pack: ok
ok 3 - verify-pack -v, packedGitWindowSize == 1 page
expecting success: git config core.packedGitWindowSize 512 &&
git config core.packedGitLimit 512 &&
git verify-pack -v "$pack1"
9865fac3524bcf17109d27d7de0f71508a5578cb commit 163 124 12
d67b2ae81f0bd18212d239b6a965711041f73739 blob 32770 32789 136
7c0c57f15aee3c4cbe243c44d3c01ecfa949bb25 blob 32770 32789 32925
f76f6b9f6aed8209a40d300bf7dcb4fcf9863531 blob 32772 32791 65714
556c804eac998cc8fa89f225a29870c3d873477b blob 10 22 98505 1 f76f6b9f6aed8209a40d300bf7dcb4fcf9863531
b7fabea4d93049ea90d45d8252b9a4f8ee7c9c2c tree 116 115 98527
non delta: 5 objects
chain length = 1: 1 object
.git/objects/pack/pack-21f4b2a01f44093beff8f9e3fd6ec9103fc95912.pack: ok
ok 4 - verify-pack -v, packedGit{WindowSize,Limit} == 1 page
expecting success: git config core.packedGitWindowSize 512 &&
git config core.packedGitLimit 512 &&
commit2=$(git commit-tree $tree -p $commit1 </dev/null) &&
git update-ref HEAD $commit2 &&
git repack -a -d &&
test "$(git count-objects)" = "0 objects, 0 kilobytes" &&
pack2=$(ls .git/objects/pack/*.pack) &&
test -f "$pack2" &&
test "$pack1" \!= "$pack2"
ok 5 - repack -a -d, packedGit{WindowSize,Limit} == 1 page
expecting success: git config --unset core.packedGitWindowSize &&
git config --unset core.packedGitLimit &&
git verify-pack -v "$pack2"
cac9fb77fb6cb7b420997d2ce793fab04b0ff602 commit 211 154 12
9865fac3524bcf17109d27d7de0f71508a5578cb commit 9 20 166 1 cac9fb77fb6cb7b420997d2ce793fab04b0ff602
d67b2ae81f0bd18212d239b6a965711041f73739 blob 32770 32789 186
7c0c57f15aee3c4cbe243c44d3c01ecfa949bb25 blob 32770 32789 32975
f76f6b9f6aed8209a40d300bf7dcb4fcf9863531 blob 32772 32791 65764
556c804eac998cc8fa89f225a29870c3d873477b blob 10 22 98555 1 f76f6b9f6aed8209a40d300bf7dcb4fcf9863531
b7fabea4d93049ea90d45d8252b9a4f8ee7c9c2c tree 116 115 98577
non delta: 5 objects
chain length = 1: 2 objects
.git/objects/pack/pack-3983e414c88582a76c61e04cd163d512a00623aa.pack: ok
ok 6 - verify-pack -v, defaults
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5004-archive-corner-cases.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5004-archive-corner-cases/.git/
expecting success:
git commit --allow-empty -m foo &&
perl -e "print \"\\0\" x 10240" >10knuls.tar
[master (root-commit) 9e1192b] foo
Author: A U Thor <author@example.com>
ok 1 - create commit with empty tree and fake empty tar
expecting success:
git archive --format=tar HEAD >empty-with-pax-header.tar &&
make_dir extract &&
"$TAR" xf empty-with-pax-header.tar -C extract &&
check_dir extract
ok 2 - tar archive of commit with empty tree
expecting success:
git archive --format=tar HEAD: >empty.tar &&
test_cmp_bin 10knuls.tar empty.tar
ok 3 - tar archive of empty tree is empty
expecting success:
git archive --format=tar --prefix=foo/ HEAD >prefix.tar &&
make_dir extract &&
"$TAR" xf prefix.tar -C extract &&
check_dir extract foo
ok 4 - tar archive of empty tree with prefix
checking prerequisite: UNZIP
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
"$GIT_UNZIP" -v
test $? -ne 127
)
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 8.3.0 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:
# Detect the exit code produced when our particular flavor of unzip
# sees an empty archive. Infozip will generate a warning and exit with
# code 1. But in the name of sanity, we do not expect other unzip
# implementations to do the same thing (it would be perfectly
# reasonable to exit 0, for example).
#
# This makes our test less rigorous on some platforms (unzip may not
# handle the empty repo at all, making our later check of its exit code
# a no-op). But we cannot do anything reasonable except skip the test
# on such platforms anyway, and this is the moral equivalent.
{
"$GIT_UNZIP" "$TEST_DIRECTORY"/t5004/empty.zip
expect_code=$?
} &&
git archive --format=zip HEAD >empty.zip &&
make_dir extract &&
(
cd extract &&
test_expect_code $expect_code "$GIT_UNZIP" ../empty.zip
) &&
check_dir extract
Archive: /<<PKGBUILDDIR>>/t/t5004/empty.zip
fc8e0d59c1cc5c14b6919fb2006b27fe337e7d0e
warning [/<<PKGBUILDDIR>>/t/t5004/empty.zip]: zipfile is empty
Archive: ../empty.zip
9e1192be92807c9ec03ab31ab6b20cd9241068d1
warning [../empty.zip]: zipfile is empty
ok 5 - zip archive of empty tree is empty
expecting success:
# We do not have to play exit-code tricks here, because our
# result should not be empty; it has a directory in it.
git archive --format=zip --prefix=foo/ HEAD >prefix.zip &&
make_dir extract &&
(
cd extract &&
"$GIT_UNZIP" ../prefix.zip
) &&
check_dir extract foo
Archive: ../prefix.zip
9e1192be92807c9ec03ab31ab6b20cd9241068d1
creating: foo/
ok 6 - zip archive of empty tree with prefix
expecting success:
test_must_fail git archive --format=tar HEAD -- foo >/dev/null
fatal: pathspec 'foo' did not match any files
ok 7 - archive complains about pathspec on empty tree
expecting success:
empty_tree=$(git hash-object -t tree /dev/null) &&
root_tree=$(printf "040000 tree $empty_tree\tsub\n" | git mktree)
ok 8 - create a commit with an empty subtree
expecting success:
git archive --format=tar $root_tree >subtree-all.tar &&
test_cmp_bin 10knuls.tar subtree-all.tar
ok 9 - archive empty subtree with no pathspec
expecting success:
git archive --format=tar $root_tree -- sub >subtree-path.tar &&
test_cmp_bin 10knuls.tar subtree-path.tar
ok 10 - archive empty subtree by direct pathspec
checking prerequisite: ZIPINFO
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
n=$("$ZIPINFO" "$TEST_DIRECTORY"/t5004/empty.zip | sed -n "2s/.* //p")
test "x$n" = "x0"
)
prerequisite ZIPINFO ok
expecting success:
# add a directory with 256 files
mkdir 00 &&
for a in 0 1 2 3 4 5 6 7 8 9 a b c d e f
do
for b in 0 1 2 3 4 5 6 7 8 9 a b c d e f
do
: >00/$a$b
done
done &&
git add 00 &&
git commit -m "256 files in 1 directory" &&
# duplicate it to get 65536 files in 256 directories
subtree=$(git write-tree --prefix=00/) &&
for c in 0 1 2 3 4 5 6 7 8 9 a b c d e f
do
for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f
do
echo "040000 tree $subtree $c$d"
done
done >tree &&
tree=$(git mktree <tree) &&
# zip them
git archive -o many.zip $tree &&
# check the number of entries in the ZIP file directory
expr 65536 + 256 >expect &&
"$ZIPINFO" many.zip | head -2 | sed -n "2s/.* //p" >actual &&
test_cmp expect actual
[master 1bba640] 256 files in 1 directory
Author: A U Thor <author@example.com>
256 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 00/00
create mode 100644 00/01
create mode 100644 00/02
create mode 100644 00/03
create mode 100644 00/04
create mode 100644 00/05
create mode 100644 00/06
create mode 100644 00/07
create mode 100644 00/08
create mode 100644 00/09
create mode 100644 00/0a
create mode 100644 00/0b
create mode 100644 00/0c
create mode 100644 00/0d
create mode 100644 00/0e
create mode 100644 00/0f
create mode 100644 00/10
create mode 100644 00/11
create mode 100644 00/12
create mode 100644 00/13
create mode 100644 00/14
create mode 100644 00/15
create mode 100644 00/16
create mode 100644 00/17
create mode 100644 00/18
create mode 100644 00/19
create mode 100644 00/1a
create mode 100644 00/1b
create mode 100644 00/1c
create mode 100644 00/1d
create mode 100644 00/1e
create mode 100644 00/1f
create mode 100644 00/20
create mode 100644 00/21
create mode 100644 00/22
create mode 100644 00/23
create mode 100644 00/24
create mode 100644 00/25
create mode 100644 00/26
create mode 100644 00/27
create mode 100644 00/28
create mode 100644 00/29
create mode 100644 00/2a
create mode 100644 00/2b
create mode 100644 00/2c
create mode 100644 00/2d
create mode 100644 00/2e
create mode 100644 00/2f
create mode 100644 00/30
create mode 100644 00/31
create mode 100644 00/32
create mode 100644 00/33
create mode 100644 00/34
create mode 100644 00/35
create mode 100644 00/36
create mode 100644 00/37
create mode 100644 00/38
create mode 100644 00/39
create mode 100644 00/3a
create mode 100644 00/3b
create mode 100644 00/3c
create mode 100644 00/3d
create mode 100644 00/3e
create mode 100644 00/3f
create mode 100644 00/40
create mode 100644 00/41
create mode 100644 00/42
create mode 100644 00/43
create mode 100644 00/44
create mode 100644 00/45
create mode 100644 00/46
create mode 100644 00/47
create mode 100644 00/48
create mode 100644 00/49
create mode 100644 00/4a
create mode 100644 00/4b
create mode 100644 00/4c
create mode 100644 00/4d
create mode 100644 00/4e
create mode 100644 00/4f
create mode 100644 00/50
create mode 100644 00/51
create mode 100644 00/52
create mode 100644 00/53
create mode 100644 00/54
create mode 100644 00/55
create mode 100644 00/56
create mode 100644 00/57
create mode 100644 00/58
create mode 100644 00/59
create mode 100644 00/5a
create mode 100644 00/5b
create mode 100644 00/5c
create mode 100644 00/5d
create mode 100644 00/5e
create mode 100644 00/5f
create mode 100644 00/60
create mode 100644 00/61
create mode 100644 00/62
create mode 100644 00/63
create mode 100644 00/64
create mode 100644 00/65
create mode 100644 00/66
create mode 100644 00/67
create mode 100644 00/68
create mode 100644 00/69
create mode 100644 00/6a
create mode 100644 00/6b
create mode 100644 00/6c
create mode 100644 00/6d
create mode 100644 00/6e
create mode 100644 00/6f
create mode 100644 00/70
create mode 100644 00/71
create mode 100644 00/72
create mode 100644 00/73
create mode 100644 00/74
create mode 100644 00/75
create mode 100644 00/76
create mode 100644 00/77
create mode 100644 00/78
create mode 100644 00/79
create mode 100644 00/7a
create mode 100644 00/7b
create mode 100644 00/7c
create mode 100644 00/7d
create mode 100644 00/7e
create mode 100644 00/7f
create mode 100644 00/80
create mode 100644 00/81
create mode 100644 00/82
create mode 100644 00/83
create mode 100644 00/84
create mode 100644 00/85
create mode 100644 00/86
create mode 100644 00/87
create mode 100644 00/88
create mode 100644 00/89
create mode 100644 00/8a
create mode 100644 00/8b
create mode 100644 00/8c
create mode 100644 00/8d
create mode 100644 00/8e
create mode 100644 00/8f
create mode 100644 00/90
create mode 100644 00/91
create mode 100644 00/92
create mode 100644 00/93
create mode 100644 00/94
create mode 100644 00/95
create mode 100644 00/96
create mode 100644 00/97
create mode 100644 00/98
create mode 100644 00/99
create mode 100644 00/9a
create mode 100644 00/9b
create mode 100644 00/9c
create mode 100644 00/9d
create mode 100644 00/9e
create mode 100644 00/9f
create mode 100644 00/a0
create mode 100644 00/a1
create mode 100644 00/a2
create mode 100644 00/a3
create mode 100644 00/a4
create mode 100644 00/a5
create mode 100644 00/a6
create mode 100644 00/a7
create mode 100644 00/a8
create mode 100644 00/a9
create mode 100644 00/aa
create mode 100644 00/ab
create mode 100644 00/ac
create mode 100644 00/ad
create mode 100644 00/ae
create mode 100644 00/af
create mode 100644 00/b0
create mode 100644 00/b1
create mode 100644 00/b2
create mode 100644 00/b3
create mode 100644 00/b4
create mode 100644 00/b5
create mode 100644 00/b6
create mode 100644 00/b7
create mode 100644 00/b8
create mode 100644 00/b9
create mode 100644 00/ba
create mode 100644 00/bb
create mode 100644 00/bc
create mode 100644 00/bd
create mode 100644 00/be
create mode 100644 00/bf
create mode 100644 00/c0
create mode 100644 00/c1
create mode 100644 00/c2
create mode 100644 00/c3
create mode 100644 00/c4
create mode 100644 00/c5
create mode 100644 00/c6
create mode 100644 00/c7
create mode 100644 00/c8
create mode 100644 00/c9
create mode 100644 00/ca
create mode 100644 00/cb
create mode 100644 00/cc
create mode 100644 00/cd
create mode 100644 00/ce
create mode 100644 00/cf
create mode 100644 00/d0
create mode 100644 00/d1
create mode 100644 00/d2
create mode 100644 00/d3
create mode 100644 00/d4
create mode 100644 00/d5
create mode 100644 00/d6
create mode 100644 00/d7
create mode 100644 00/d8
create mode 100644 00/d9
create mode 100644 00/da
create mode 100644 00/db
create mode 100644 00/dc
create mode 100644 00/dd
create mode 100644 00/de
create mode 100644 00/df
create mode 100644 00/e0
create mode 100644 00/e1
create mode 100644 00/e2
create mode 100644 00/e3
create mode 100644 00/e4
create mode 100644 00/e5
create mode 100644 00/e6
create mode 100644 00/e7
create mode 100644 00/e8
create mode 100644 00/e9
create mode 100644 00/ea
create mode 100644 00/eb
create mode 100644 00/ec
create mode 100644 00/ed
create mode 100644 00/ee
create mode 100644 00/ef
create mode 100644 00/f0
create mode 100644 00/f1
create mode 100644 00/f2
create mode 100644 00/f3
create mode 100644 00/f4
create mode 100644 00/f5
create mode 100644 00/f6
create mode 100644 00/f7
create mode 100644 00/f8
create mode 100644 00/f9
create mode 100644 00/fa
create mode 100644 00/fb
create mode 100644 00/fc
create mode 100644 00/fd
create mode 100644 00/fe
create mode 100644 00/ff
ok 11 - zip archive with many entries
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
checking prerequisite: UNZIP_ZIP64_SUPPORT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
"$GIT_UNZIP" -v | grep ZIP64_SUPPORT
)
ZIP64_SUPPORT (archives using Zip64 for large files supported)
prerequisite UNZIP_ZIP64_SUPPORT ok
skipping test: zip archive bigger than 4GB
# build string containing 65536 characters
s=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef &&
s=$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s &&
s=$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s &&
# create blob with a length of 65536 + 1 bytes
blob=$(echo $s | git hash-object -w --stdin) &&
# create tree containing 65500 entries of that blob
for i in $(test_seq 1 65500)
do
echo "100644 blob $blob $i"
done >tree &&
tree=$(git mktree <tree) &&
# zip it, creating an archive a bit bigger than 4GB
git archive -0 -o many-big.zip $tree &&
"$GIT_UNZIP" -t many-big.zip 9999 65500 &&
"$GIT_UNZIP" -t many-big.zip
ok 12 # skip zip archive bigger than 4GB (missing EXPENSIVE of EXPENSIVE,UNZIP,UNZIP_ZIP64_SUPPORT)
checking prerequisite: LONG_IS_64BIT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test 8 -le "$(build_option sizeof-long)"
)
prerequisite LONG_IS_64BIT not satisfied
skipping test: zip archive with files bigger than 4GB
# Pack created with:
# dd if=/dev/zero of=file bs=1M count=4100 && git hash-object -w file
mkdir -p .git/objects/pack &&
(
cd .git/objects/pack &&
"$GIT_UNZIP" "$TEST_DIRECTORY"/t5004/big-pack.zip
) &&
blob=754a93d6fada4c6873360e6cb4b209132271ab0e &&
size=$(expr 4100 "*" 1024 "*" 1024) &&
# create a tree containing the file
tree=$(echo "100644 blob $blob big-file" | git mktree) &&
# zip it, creating an archive with a file bigger than 4GB
git archive -o big.zip $tree &&
"$GIT_UNZIP" -t big.zip &&
"$ZIPINFO" big.zip >big.lst &&
grep $size big.lst
ok 13 # skip zip archive with files bigger than 4GB (missing LONG_IS_64BIT,EXPENSIVE of EXPENSIVE,LONG_IS_64BIT,UNZIP,UNZIP_ZIP64_SUPPORT,ZIPINFO)
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5303-pack-corruption-resilience.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5303-pack-corruption-resilience/.git/
expecting success: create_test_files &&
create_new_pack &&
git prune-packed &&
git cat-file blob $blob_1 > /dev/null &&
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5303-pack-corruption-resilience/.git/
06686a2094b7518d92cd6e26efaab209b398ebd3 blob 2007 2020 12
30fd6590c6df999b5a77622491bee8cb1b96d807 blob 168 201 2032 1 06686a2094b7518d92cd6e26efaab209b398ebd3
44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 blob 117 150 2233 2 30fd6590c6df999b5a77622491bee8cb1b96d807
non delta: 1 object
chain length = 1: 1 object
chain length = 2: 1 object
.git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack: ok
ok 1 - initial setup validation
expecting success: do_corrupt_object $blob_1 0 < zero &&
test_must_fail git cat-file blob $blob_1 > /dev/null &&
test_must_fail git cat-file blob $blob_2 > /dev/null &&
test_must_fail git cat-file blob $blob_3 > /dev/null
1+0 records in
1+0 records out
1 byte copied, 0.000110181 s, 9.1 kB/s
fatal: pack has bad object at offset 12: unknown object type 0
error: unknown object type 0 at offset 12 in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
fatal: packed object 06686a2094b7518d92cd6e26efaab209b398ebd3 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
fatal: packed object 30fd6590c6df999b5a77622491bee8cb1b96d807 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
fatal: packed object 44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
ok 2 - create corruption in header of first object
expecting success: mv ${pack}.idx tmp &&
git hash-object -t blob -w file_1 &&
mv tmp ${pack}.idx &&
git cat-file blob $blob_1 > /dev/null &&
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null
06686a2094b7518d92cd6e26efaab209b398ebd3
error: unknown object type 0 at offset 12 in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
error: unknown object type 0 at offset 12 in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
error: failed to read delta base object 06686a2094b7518d92cd6e26efaab209b398ebd3 at offset 12 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
error: unknown object type 0 at offset 12 in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
error: failed to read delta base object 06686a2094b7518d92cd6e26efaab209b398ebd3 at offset 12 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
ok 3 - ... but having a loose copy allows for full recovery
expecting success: git prune-packed &&
test_must_fail git cat-file blob $blob_2 > /dev/null &&
mv ${pack}.idx tmp &&
git hash-object -t blob -w file_2 &&
mv tmp ${pack}.idx &&
test_must_fail git cat-file blob $blob_1 > /dev/null &&
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null
fatal: packed object 30fd6590c6df999b5a77622491bee8cb1b96d807 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
30fd6590c6df999b5a77622491bee8cb1b96d807
error: unknown object type 0 at offset 12 in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
fatal: packed object 06686a2094b7518d92cd6e26efaab209b398ebd3 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
error: unknown object type 0 at offset 12 in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
error: failed to read delta base object 06686a2094b7518d92cd6e26efaab209b398ebd3 at offset 12 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
error: failed to read delta base object 30fd6590c6df999b5a77622491bee8cb1b96d807 at offset 2032 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
ok 4 - ... and loose copy of first delta allows for partial recovery
expecting success: create_new_pack &&
git prune-packed &&
chmod +w ${pack}.pack &&
perl -i.bak -pe "s/ base /abcdef/" ${pack}.pack &&
test_must_fail git cat-file blob $blob_1 > /dev/null &&
test_must_fail git cat-file blob $blob_2 > /dev/null &&
test_must_fail git cat-file blob $blob_3 > /dev/null
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5303-pack-corruption-resilience/.git/
06686a2094b7518d92cd6e26efaab209b398ebd3 blob 2007 2020 12
30fd6590c6df999b5a77622491bee8cb1b96d807 blob 168 201 2032 1 06686a2094b7518d92cd6e26efaab209b398ebd3
44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 blob 117 150 2233 2 30fd6590c6df999b5a77622491bee8cb1b96d807
non delta: 1 object
chain length = 1: 1 object
chain length = 2: 1 object
.git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack: ok
error: inflate: data stream error (incorrect data check)
fatal: packed object 06686a2094b7518d92cd6e26efaab209b398ebd3 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
error: inflate: data stream error (incorrect data check)
error: failed to read delta base object 06686a2094b7518d92cd6e26efaab209b398ebd3 at offset 12 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
fatal: packed object 30fd6590c6df999b5a77622491bee8cb1b96d807 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
error: inflate: data stream error (incorrect data check)
error: failed to read delta base object 06686a2094b7518d92cd6e26efaab209b398ebd3 at offset 12 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
error: failed to read delta base object 30fd6590c6df999b5a77622491bee8cb1b96d807 at offset 2032 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
fatal: packed object 44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
ok 5 - create corruption in data of first object
expecting success: mv ${pack}.idx tmp &&
git hash-object -t blob -w file_1 &&
mv tmp ${pack}.idx &&
git cat-file blob $blob_1 > /dev/null &&
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null
06686a2094b7518d92cd6e26efaab209b398ebd3
error: inflate: data stream error (incorrect data check)
error: inflate: data stream error (incorrect data check)
error: failed to read delta base object 06686a2094b7518d92cd6e26efaab209b398ebd3 at offset 12 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
error: inflate: data stream error (incorrect data check)
error: failed to read delta base object 06686a2094b7518d92cd6e26efaab209b398ebd3 at offset 12 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
ok 6 - ... but having a loose copy allows for full recovery
expecting success: git prune-packed &&
test_must_fail git cat-file blob $blob_2 > /dev/null &&
mv ${pack}.idx tmp &&
git hash-object -t blob -w file_2 &&
mv tmp ${pack}.idx &&
test_must_fail git cat-file blob $blob_1 > /dev/null &&
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null
error: inflate: data stream error (incorrect data check)
error: failed to read delta base object 06686a2094b7518d92cd6e26efaab209b398ebd3 at offset 12 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
fatal: packed object 30fd6590c6df999b5a77622491bee8cb1b96d807 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
30fd6590c6df999b5a77622491bee8cb1b96d807
error: inflate: data stream error (incorrect data check)
fatal: packed object 06686a2094b7518d92cd6e26efaab209b398ebd3 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
error: inflate: data stream error (incorrect data check)
error: failed to read delta base object 06686a2094b7518d92cd6e26efaab209b398ebd3 at offset 12 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
error: inflate: data stream error (incorrect data check)
error: failed to read delta base object 06686a2094b7518d92cd6e26efaab209b398ebd3 at offset 12 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
error: failed to read delta base object 30fd6590c6df999b5a77622491bee8cb1b96d807 at offset 2032 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
ok 7 - ... and loose copy of second object allows for partial recovery
expecting success: create_new_pack &&
git prune-packed &&
do_corrupt_object $blob_2 0 < zero &&
git cat-file blob $blob_1 > /dev/null &&
test_must_fail git cat-file blob $blob_2 > /dev/null &&
test_must_fail git cat-file blob $blob_3 > /dev/null
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5303-pack-corruption-resilience/.git/
06686a2094b7518d92cd6e26efaab209b398ebd3 blob 2007 2020 12
30fd6590c6df999b5a77622491bee8cb1b96d807 blob 168 201 2032 1 06686a2094b7518d92cd6e26efaab209b398ebd3
44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 blob 117 150 2233 2 30fd6590c6df999b5a77622491bee8cb1b96d807
non delta: 1 object
chain length = 1: 1 object
chain length = 2: 1 object
.git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack: ok
1+0 records in
1+0 records out
1 byte copied, 9.5781e-05 s, 10.4 kB/s
fatal: pack has bad object at offset 2032: unknown object type 0
error: unknown object type 0 at offset 2032 in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
fatal: packed object 30fd6590c6df999b5a77622491bee8cb1b96d807 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
fatal: packed object 44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
ok 8 - create corruption in header of first delta
expecting success: mv ${pack}.idx tmp &&
git hash-object -t blob -w file_2 &&
mv tmp ${pack}.idx &&
git cat-file blob $blob_1 > /dev/null &&
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null
30fd6590c6df999b5a77622491bee8cb1b96d807
error: unknown object type 0 at offset 2032 in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
error: unknown object type 0 at offset 2032 in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
error: failed to read delta base object 30fd6590c6df999b5a77622491bee8cb1b96d807 at offset 2032 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
ok 9 - ... but having a loose copy allows for full recovery
expecting success: do_repack &&
git prune-packed &&
git verify-pack ${pack}.pack &&
git cat-file blob $blob_1 > /dev/null &&
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null
error: unknown object type 0 at offset 2032 in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
ok 10 - ... and then a repack "clears" the corruption
expecting success: create_new_pack &&
git prune-packed &&
chmod +w ${pack}.pack &&
perl -i.bak -pe "s/ delta1 /abcdefgh/" ${pack}.pack &&
git cat-file blob $blob_1 > /dev/null &&
test_must_fail git cat-file blob $blob_2 > /dev/null &&
test_must_fail git cat-file blob $blob_3 > /dev/null
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5303-pack-corruption-resilience/.git/
06686a2094b7518d92cd6e26efaab209b398ebd3 blob 2007 2020 12
30fd6590c6df999b5a77622491bee8cb1b96d807 blob 168 201 2032 1 06686a2094b7518d92cd6e26efaab209b398ebd3
44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 blob 117 150 2233 2 30fd6590c6df999b5a77622491bee8cb1b96d807
non delta: 1 object
chain length = 1: 1 object
chain length = 2: 1 object
.git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack: ok
error: inflate: data stream error (incorrect data check)
error: failed to unpack compressed delta at offset 2054 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
fatal: packed object 30fd6590c6df999b5a77622491bee8cb1b96d807 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
error: inflate: data stream error (incorrect data check)
error: failed to unpack compressed delta at offset 2054 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
error: failed to read delta base object 30fd6590c6df999b5a77622491bee8cb1b96d807 at offset 2032 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
fatal: packed object 44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
ok 11 - create corruption in data of first delta
expecting success: mv ${pack}.idx tmp &&
git hash-object -t blob -w file_2 &&
mv tmp ${pack}.idx &&
git cat-file blob $blob_1 > /dev/null &&
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null
30fd6590c6df999b5a77622491bee8cb1b96d807
error: inflate: data stream error (incorrect data check)
error: failed to unpack compressed delta at offset 2054 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
error: inflate: data stream error (incorrect data check)
error: failed to unpack compressed delta at offset 2054 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
error: failed to read delta base object 30fd6590c6df999b5a77622491bee8cb1b96d807 at offset 2032 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
ok 12 - ... but having a loose copy allows for full recovery
expecting success: do_repack &&
git prune-packed &&
git verify-pack ${pack}.pack &&
git cat-file blob $blob_1 > /dev/null &&
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null
error: bad packed object CRC for 30fd6590c6df999b5a77622491bee8cb1b96d807
error: bad packed object CRC for 30fd6590c6df999b5a77622491bee8cb1b96d807
ok 13 - ... and then a repack "clears" the corruption
expecting success: create_new_pack &&
git prune-packed &&
do_corrupt_object $blob_2 2 < zero &&
git cat-file blob $blob_1 > /dev/null &&
test_must_fail git cat-file blob $blob_2 > /dev/null &&
test_must_fail git cat-file blob $blob_3 > /dev/null
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5303-pack-corruption-resilience/.git/
06686a2094b7518d92cd6e26efaab209b398ebd3 blob 2007 2020 12
30fd6590c6df999b5a77622491bee8cb1b96d807 blob 168 201 2032 1 06686a2094b7518d92cd6e26efaab209b398ebd3
44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 blob 117 150 2233 2 30fd6590c6df999b5a77622491bee8cb1b96d807
non delta: 1 object
chain length = 1: 1 object
chain length = 2: 1 object
.git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack: ok
1+0 records in
1+0 records out
1 byte copied, 9.8981e-05 s, 10.1 kB/s
fatal: pack is corrupted (SHA1 mismatch)
fatal: packed object 30fd6590c6df999b5a77622491bee8cb1b96d807 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
fatal: packed object 44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
ok 14 - corruption in delta base reference of first delta (OBJ_REF_DELTA)
expecting success: mv ${pack}.idx tmp &&
git hash-object -t blob -w file_2 &&
mv tmp ${pack}.idx &&
git cat-file blob $blob_1 > /dev/null &&
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null
30fd6590c6df999b5a77622491bee8cb1b96d807
error: failed to validate delta base reference at offset 2054 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
error: failed to read delta base object 30fd6590c6df999b5a77622491bee8cb1b96d807 at offset 2032 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
ok 15 - ... but having a loose copy allows for full recovery
expecting success: do_repack &&
git prune-packed &&
git verify-pack ${pack}.pack &&
git cat-file blob $blob_1 > /dev/null &&
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null
ok 16 - ... and then a repack "clears" the corruption
expecting success: create_new_pack --delta-base-offset &&
git prune-packed &&
do_corrupt_object $blob_2 2 < zero &&
git cat-file blob $blob_1 > /dev/null &&
test_must_fail git cat-file blob $blob_2 > /dev/null &&
test_must_fail git cat-file blob $blob_3 > /dev/null
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5303-pack-corruption-resilience/.git/
06686a2094b7518d92cd6e26efaab209b398ebd3 blob 2007 2020 12
30fd6590c6df999b5a77622491bee8cb1b96d807 blob 168 183 2032 1 06686a2094b7518d92cd6e26efaab209b398ebd3
44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 blob 117 132 2215 2 30fd6590c6df999b5a77622491bee8cb1b96d807
non delta: 1 object
chain length = 1: 1 object
chain length = 2: 1 object
.git/objects/pack/pack-417bd5d650269e28ec8026312b966d0bf1dab469.pack: ok
1+0 records in
1+0 records out
1 byte copied, 9.3841e-05 s, 10.7 kB/s
fatal: pack has bad object at offset 2032: delta base offset is out of bound
fatal: packed object 30fd6590c6df999b5a77622491bee8cb1b96d807 (stored in .git/objects/pack/pack-417bd5d650269e28ec8026312b966d0bf1dab469.pack) is corrupt
fatal: packed object 44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 (stored in .git/objects/pack/pack-417bd5d650269e28ec8026312b966d0bf1dab469.pack) is corrupt
ok 17 - corruption #0 in delta base reference of first delta (OBJ_OFS_DELTA)
expecting success: mv ${pack}.idx tmp &&
git hash-object -t blob -w file_2 &&
mv tmp ${pack}.idx &&
git cat-file blob $blob_1 > /dev/null &&
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null
30fd6590c6df999b5a77622491bee8cb1b96d807
error: failed to validate delta base reference at offset 2034 from .git/objects/pack/pack-417bd5d650269e28ec8026312b966d0bf1dab469.pack
error: failed to read delta base object 30fd6590c6df999b5a77622491bee8cb1b96d807 at offset 2032 from .git/objects/pack/pack-417bd5d650269e28ec8026312b966d0bf1dab469.pack
ok 18 - ... but having a loose copy allows for full recovery
expecting success: do_repack --delta-base-offset &&
git prune-packed &&
git verify-pack ${pack}.pack &&
git cat-file blob $blob_1 > /dev/null &&
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null
error: delta base offset out of bound for 30fd6590c6df999b5a77622491bee8cb1b96d807
ok 19 - ... and then a repack "clears" the corruption
expecting success: create_new_pack --delta-base-offset &&
git prune-packed &&
printf "\001" | do_corrupt_object $blob_2 2 &&
git cat-file blob $blob_1 > /dev/null &&
test_must_fail git cat-file blob $blob_2 > /dev/null &&
test_must_fail git cat-file blob $blob_3 > /dev/null
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5303-pack-corruption-resilience/.git/
06686a2094b7518d92cd6e26efaab209b398ebd3 blob 2007 2020 12
30fd6590c6df999b5a77622491bee8cb1b96d807 blob 168 183 2032 1 06686a2094b7518d92cd6e26efaab209b398ebd3
44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 blob 117 132 2215 2 30fd6590c6df999b5a77622491bee8cb1b96d807
non delta: 1 object
chain length = 1: 1 object
chain length = 2: 1 object
.git/objects/pack/pack-417bd5d650269e28ec8026312b966d0bf1dab469.pack: ok
1+0 records in
1+0 records out
1 byte copied, 9.7901e-05 s, 10.2 kB/s
error: inflate: data stream error (incorrect header check)
fatal: pack has bad object at offset 2032: inflate returned -3
error: bad offset for revindex
fatal: packed object 30fd6590c6df999b5a77622491bee8cb1b96d807 (stored in .git/objects/pack/pack-417bd5d650269e28ec8026312b966d0bf1dab469.pack) is corrupt
error: bad offset for revindex
fatal: packed object 44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 (stored in .git/objects/pack/pack-417bd5d650269e28ec8026312b966d0bf1dab469.pack) is corrupt
ok 20 - corruption #1 in delta base reference of first delta (OBJ_OFS_DELTA)
expecting success: mv ${pack}.idx tmp &&
git hash-object -t blob -w file_2 &&
mv tmp ${pack}.idx &&
git cat-file blob $blob_1 > /dev/null &&
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null
30fd6590c6df999b5a77622491bee8cb1b96d807
error: bad offset for revindex
error: bad offset for revindex
error: bad offset for revindex
error: bad offset for revindex
error: failed to validate delta base reference at offset 2054 from .git/objects/pack/pack-417bd5d650269e28ec8026312b966d0bf1dab469.pack
error: bad offset for revindex
error: failed to read delta base object 30fd6590c6df999b5a77622491bee8cb1b96d807 at offset 2032 from .git/objects/pack/pack-417bd5d650269e28ec8026312b966d0bf1dab469.pack
ok 21 - ... but having a loose copy allows for full recovery
expecting success: do_repack --delta-base-offset &&
git prune-packed &&
git verify-pack ${pack}.pack &&
git cat-file blob $blob_1 > /dev/null &&
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null
error: bad offset for revindex
error: inflate: data stream error (incorrect header check)
error: delta data unpack-initial failed
ok 22 - ... and then a repack "clears" the corruption
expecting success: do_corrupt_object $blob_2 2 < zero &&
git cat-file blob $blob_1 > /dev/null &&
test_must_fail git cat-file blob $blob_2 > /dev/null &&
test_must_fail git cat-file blob $blob_3 > /dev/null &&
mv ${pack}.idx tmp &&
git hash-object -t blob -w file_1 &&
git hash-object -t blob -w file_2 &&
printf "$blob_1\n$blob_2\n" | git pack-objects .git/objects/pack/pack &&
git prune-packed &&
mv tmp ${pack}.idx &&
git cat-file blob $blob_1 > /dev/null &&
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null
1+0 records in
1+0 records out
1 byte copied, 9.3681e-05 s, 10.7 kB/s
fatal: pack has bad object at offset 2032: delta base offset is out of bound
fatal: packed object 30fd6590c6df999b5a77622491bee8cb1b96d807 (stored in .git/objects/pack/pack-417bd5d650269e28ec8026312b966d0bf1dab469.pack) is corrupt
fatal: packed object 44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 (stored in .git/objects/pack/pack-417bd5d650269e28ec8026312b966d0bf1dab469.pack) is corrupt
06686a2094b7518d92cd6e26efaab209b398ebd3
30fd6590c6df999b5a77622491bee8cb1b96d807
8e27963e1e80900149c7ca3ea5eeb0cf53e9cb23
error: failed to validate delta base reference at offset 2034 from .git/objects/pack/pack-417bd5d650269e28ec8026312b966d0bf1dab469.pack
error: failed to read delta base object 30fd6590c6df999b5a77622491bee8cb1b96d807 at offset 2032 from .git/objects/pack/pack-417bd5d650269e28ec8026312b966d0bf1dab469.pack
ok 23 - ... and a redundant pack allows for full recovery too
expecting success: create_new_pack --delta-base-offset &&
git prune-packed &&
printf "\220\033" | do_corrupt_object $blob_3 2 &&
git cat-file blob $blob_1 >/dev/null &&
git cat-file blob $blob_2 >/dev/null &&
test_must_fail git cat-file blob $blob_3 >/dev/null
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5303-pack-corruption-resilience/.git/
06686a2094b7518d92cd6e26efaab209b398ebd3 blob 2007 2020 12
30fd6590c6df999b5a77622491bee8cb1b96d807 blob 168 183 2032 1 06686a2094b7518d92cd6e26efaab209b398ebd3
44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 blob 117 132 2215 2 30fd6590c6df999b5a77622491bee8cb1b96d807
non delta: 1 object
chain length = 1: 1 object
chain length = 2: 1 object
.git/objects/pack/pack-417bd5d650269e28ec8026312b966d0bf1dab469.pack: ok
2+0 records in
2+0 records out
2 bytes copied, 0.000108441 s, 18.4 kB/s
fatal: pack is corrupted (SHA1 mismatch)
error: failed to apply delta
fatal: packed object 44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 (stored in .git/objects/pack/pack-417bd5d650269e28ec8026312b966d0bf1dab469.pack) is corrupt
ok 24 - corruption of delta base reference pointing to wrong object
expecting success: mv ${pack}.idx tmp &&
git hash-object -t blob -w file_3 &&
mv tmp ${pack}.idx &&
git cat-file blob $blob_1 > /dev/null &&
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null
44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4
error: failed to apply delta
ok 25 - ... but having a loose copy allows for full recovery
expecting success: do_repack --delta-base-offset --no-reuse-delta &&
git prune-packed &&
git verify-pack ${pack}.pack &&
git cat-file blob $blob_1 > /dev/null &&
git cat-file blob $blob_2 > /dev/null &&
git cat-file blob $blob_3 > /dev/null
error: bad packed object CRC for 44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4
ok 26 - ... and then a repack "clears" the corruption
expecting success: create_new_pack &&
git prune-packed &&
printf "\262\001" | do_corrupt_object $blob_1 0 &&
test_must_fail git cat-file blob $blob_1 > /dev/null &&
test_must_fail git cat-file blob $blob_2 > /dev/null &&
test_must_fail git cat-file blob $blob_3 > /dev/null
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5303-pack-corruption-resilience/.git/
06686a2094b7518d92cd6e26efaab209b398ebd3 blob 2007 2020 12
30fd6590c6df999b5a77622491bee8cb1b96d807 blob 168 201 2032 1 06686a2094b7518d92cd6e26efaab209b398ebd3
44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 blob 117 150 2233 2 30fd6590c6df999b5a77622491bee8cb1b96d807
non delta: 1 object
chain length = 1: 1 object
chain length = 2: 1 object
.git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack: ok
2+0 records in
2+0 records out
2 bytes copied, 9.7441e-05 s, 20.5 kB/s
fatal: pack has bad object at offset 12: inflate returned -5
fatal: packed object 06686a2094b7518d92cd6e26efaab209b398ebd3 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
error: failed to read delta base object 06686a2094b7518d92cd6e26efaab209b398ebd3 at offset 12 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
fatal: packed object 30fd6590c6df999b5a77622491bee8cb1b96d807 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
error: failed to read delta base object 06686a2094b7518d92cd6e26efaab209b398ebd3 at offset 12 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
error: failed to read delta base object 30fd6590c6df999b5a77622491bee8cb1b96d807 at offset 2032 from .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack
fatal: packed object 44cc0b565eca87cf836116abe0f9e2ff4fd0b0a4 (stored in .git/objects/pack/pack-bbfb7489c21eaac49a086215e1c3699ef989f595.pack) is corrupt
ok 27 - corrupting header to have too small output buffer fails unpack
expecting success: printf "\0\1\1X" > minimal_delta &&
test-tool delta -p /dev/null minimal_delta /dev/null
ok 28 - apply good minimal delta
expecting success: printf "\0\1\2XX" > too_big_literal &&
test_must_fail test-tool delta -p /dev/null too_big_literal /dev/null
error: delta replay has gone wild
delta operation failed (returned NULL)
ok 29 - apply delta with too many literal bytes
expecting success: printf "\4\1\221\0\2" > too_big_copy &&
printf base >base &&
test_must_fail test-tool delta -p base too_big_copy /dev/null
error: delta replay has gone wild
delta operation failed (returned NULL)
ok 30 - apply delta with too many copied bytes
expecting success: printf "\0\2\2X" > truncated_delta &&
test_must_fail test-tool delta -p /dev/null truncated_delta /dev/null
error: delta replay has gone wild
delta operation failed (returned NULL)
ok 31 - apply delta with too few literal bytes
expecting success: printf "\0\1\221\0\1" > truncated_base &&
test_must_fail test-tool delta -p /dev/null truncated_base /dev/null
error: delta replay has gone wild
delta operation failed (returned NULL)
ok 32 - apply delta with too few bytes in base
expecting success: printf "\4\2\1X\221" > truncated_copy_delta &&
printf base >base &&
test_must_fail test-tool delta -p base truncated_copy_delta /dev/null
error: delta replay has gone wild
delta operation failed (returned NULL)
ok 33 - apply delta with truncated copy parameters
expecting success: printf "\0\1\1X\1" > tail_garbage_literal &&
test_must_fail test-tool delta -p /dev/null tail_garbage_literal /dev/null
error: delta replay has gone wild
delta operation failed (returned NULL)
ok 34 - apply delta with trailing garbage literal
expecting success: printf "\4\1\1X\221\0\1" > tail_garbage_copy &&
printf base >base &&
test_must_fail test-tool delta -p /dev/null tail_garbage_copy /dev/null
delta operation failed (returned NULL)
ok 35 - apply delta with trailing garbage copy
expecting success: printf "\0\1\1X\0" > tail_garbage_opcode &&
test_must_fail test-tool delta -p /dev/null tail_garbage_opcode /dev/null
error: unexpected delta opcode 0
delta operation failed (returned NULL)
ok 36 - apply delta with trailing garbage opcode
# passed all 36 test(s)
1..36
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5304-prune.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5304-prune/.git/
expecting success:
: > file &&
git add file &&
test_tick &&
git commit -m initial &&
git gc
[master (root-commit) 1bd44cb] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
ok 1 - setup
expecting success:
orig_pack=$(echo .git/objects/pack/*.pack) &&
: > .git/objects/tmp_1.pack &&
: > .git/objects/tmp_2.pack &&
test-tool chmtime =-86501 .git/objects/tmp_1.pack &&
git prune --expire 1.day &&
test_path_is_file $orig_pack &&
test_path_is_file .git/objects/tmp_2.pack &&
test_path_is_missing .git/objects/tmp_1.pack
ok 2 - prune stale packs
expecting success:
add_blob &&
git prune --expire=1.hour.ago &&
verbose test $((1 + $before)) = $(git count-objects | sed "s/ .*//") &&
test_path_is_file $BLOB_FILE &&
test-tool chmtime =-86500 $BLOB_FILE &&
git prune --expire 1.day &&
verbose test $before = $(git count-objects | sed "s/ .*//") &&
test_path_is_missing $BLOB_FILE
ok 3 - prune --expire
expecting success:
add_blob &&
test-tool chmtime =-$((2*$week-30)) $BLOB_FILE &&
git gc &&
verbose test $((1 + $before)) = $(git count-objects | sed "s/ .*//") &&
test_path_is_file $BLOB_FILE &&
test-tool chmtime =-$((2*$week+1)) $BLOB_FILE &&
git gc &&
verbose test $before = $(git count-objects | sed "s/ .*//") &&
test_path_is_missing $BLOB_FILE
ok 4 - gc: implicit prune --expire
expecting success:
git config gc.pruneExpire invalid &&
test_must_fail git gc
error: Invalid gc.pruneexpire: 'invalid'
fatal: bad config variable 'gc.pruneexpire' in file '.git/config' at line 7
ok 5 - gc: refuse to start with invalid gc.pruneExpire
expecting success:
git config gc.pruneExpire 2.days.ago &&
git gc
ok 6 - gc: start with ok gc.pruneExpire
expecting success:
test_must_fail git prune garbage &&
test_must_fail git prune --- &&
test_must_fail git prune --no-such-option
fatal: unrecognized argument: garbage
error: unknown option `-'
usage: git prune [-n] [-v] [--progress] [--expire <time>] [--] [<head>...]
-n, --dry-run do not remove, show only
-v, --verbose report pruned objects
--progress show progress
--expire <expiry-date>
expire objects older than <time>
--exclude-promisor-objects
limit traversal to objects outside promisor packfiles
error: unknown option `no-such-option'
usage: git prune [-n] [-v] [--progress] [--expire <time>] [--] [<head>...]
-n, --dry-run do not remove, show only
-v, --verbose report pruned objects
--progress show progress
--expire <expiry-date>
expire objects older than <time>
--exclude-promisor-objects
limit traversal to objects outside promisor packfiles
ok 7 - prune: prune nonsense parameters
expecting success:
git config core.logAllRefUpdates false &&
mv .git/logs .git/logs.old &&
: > file2 &&
git add file2 &&
git commit -m temporary &&
tmp_head=$(git rev-list -1 HEAD) &&
git reset HEAD^ &&
git prune &&
test_must_fail git reset $tmp_head --
[master bfcb208] temporary
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file2
fatal: Could not parse object 'bfcb208a0bde848c9f19fc14ef5257e858575bcb'.
ok 8 - prune: prune unreachable heads
expecting success:
git checkout --detach --quiet &&
git commit --allow-empty -m "detached commit" &&
# verify that there is no reflogs
# (should be removed and disabled by previous test)
test_path_is_missing .git/logs &&
git prune -n >prune_actual &&
test_must_be_empty prune_actual
[detached HEAD c34e89b] detached commit
Author: A U Thor <author@example.com>
ok 9 - prune: do not prune detached HEAD with no reflog
expecting success:
head_oid=$(git rev-parse HEAD) &&
git checkout --quiet master &&
git prune -v >prune_actual &&
grep "$head_oid" prune_actual
c34e89b682ec97c13fe9306a95efc6e8d3ab348a commit
ok 10 - prune: prune former HEAD after checking out branch
expecting success:
: > file2 &&
git add file2 &&
git commit -m temporary &&
tmp_head=$(git rev-list -1 HEAD) &&
git reset HEAD^ &&
git prune -- $tmp_head &&
git reset $tmp_head --
[master bfcb208] temporary
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file2
ok 11 - prune: do not prune heads listed as an argument
expecting success:
add_blob &&
test-tool chmtime =-$((5001*$day)) $BLOB_FILE &&
git config gc.pruneExpire 2.days.ago &&
git gc --no-prune &&
verbose test 1 = $(git count-objects | sed "s/ .*//") &&
test_path_is_file $BLOB_FILE
ok 12 - gc --no-prune
expecting success:
git config gc.pruneExpire 5002.days.ago &&
git gc &&
test_path_is_file $BLOB_FILE &&
git config gc.pruneExpire 5000.days.ago &&
git gc &&
test_path_is_missing $BLOB_FILE
ok 13 - gc respects gc.pruneExpire
expecting success:
add_blob &&
test-tool chmtime =-$((5001*$day)) $BLOB_FILE &&
git gc --prune=5002.days.ago &&
test_path_is_file $BLOB_FILE &&
git gc --prune=5000.days.ago &&
test_path_is_missing $BLOB_FILE
ok 14 - gc --prune=<date>
expecting success:
add_blob &&
git gc --prune=never &&
test_path_is_file $BLOB_FILE &&
git gc --prune=now &&
test_path_is_missing $BLOB_FILE
ok 15 - gc --prune=never
expecting success:
git config gc.pruneExpire never &&
add_blob &&
git gc &&
test_path_is_file $BLOB_FILE &&
git config gc.pruneExpire now &&
git gc &&
test_path_is_missing $BLOB_FILE
ok 16 - gc respects gc.pruneExpire=never
expecting success:
add_blob &&
git prune --expire=never &&
test_path_is_file $BLOB_FILE &&
git prune &&
test_path_is_missing $BLOB_FILE
ok 17 - prune --expire=never
expecting success:
add_blob &&
test-tool chmtime =-$((2*$week+1)) $BLOB_FILE &&
git clone --no-hardlinks . aclone &&
(
cd aclone &&
verbose test 1 = $(git count-objects | sed "s/ .*//") &&
test_path_is_file $BLOB_FILE &&
git gc --prune &&
verbose test 0 = $(git count-objects | sed "s/ .*//") &&
test_path_is_missing $BLOB_FILE
)
Cloning into 'aclone'...
done.
ok 18 - gc: prune old objects after local clone
expecting success:
test_when_finished "rm -f .git/objects/pack/fake*" &&
test_when_finished "rm -f .git/objects/pack/foo*" &&
: >.git/objects/pack/foo &&
: >.git/objects/pack/foo.bar &&
: >.git/objects/pack/foo.keep &&
: >.git/objects/pack/foo.pack &&
: >.git/objects/pack/fake.bar &&
: >.git/objects/pack/fake.keep &&
: >.git/objects/pack/fake.pack &&
: >.git/objects/pack/fake.idx &&
: >.git/objects/pack/fake2.keep &&
: >.git/objects/pack/fake3.idx &&
git count-objects -v 2>stderr &&
grep "index file .git/objects/pack/fake.idx is too small" stderr &&
grep "^warning:" stderr | sort >actual &&
cat >expected <<\EOF &&
warning: garbage found: .git/objects/pack/fake.bar
warning: garbage found: .git/objects/pack/foo
warning: garbage found: .git/objects/pack/foo.bar
warning: no corresponding .idx or .pack: .git/objects/pack/fake2.keep
warning: no corresponding .idx: .git/objects/pack/foo.keep
warning: no corresponding .idx: .git/objects/pack/foo.pack
warning: no corresponding .pack: .git/objects/pack/fake3.idx
EOF
test_cmp expected actual
count: 1
size: 4
in-pack: 5
packs: 1
size-pack: 1
prune-packable: 0
garbage: 7
size-garbage: 0
error: index file .git/objects/pack/fake.idx is too small
error: index file .git/objects/pack/fake.idx is too small
ok 19 - garbage report in count-objects -v
expecting success:
test_when_finished "rm -f .git/objects/pack/fake*" &&
test_when_finished "rm -f .git/objects/pack/foo*" &&
: >.git/objects/pack/foo.keep &&
: >.git/objects/pack/foo.pack &&
: >.git/objects/pack/fake.idx &&
: >.git/objects/pack/fake2.keep &&
: >.git/objects/pack/fake2.idx &&
: >.git/objects/pack/fake3.keep &&
git gc &&
git count-objects -v 2>stderr &&
grep "^warning:" stderr | sort >actual &&
cat >expected <<\EOF &&
warning: no corresponding .idx or .pack: .git/objects/pack/fake3.keep
warning: no corresponding .idx: .git/objects/pack/foo.keep
warning: no corresponding .idx: .git/objects/pack/foo.pack
EOF
test_cmp expected actual
count: 0
size: 0
in-pack: 5
packs: 1
size-pack: 1
prune-packable: 0
garbage: 3
size-garbage: 0
ok 20 - clean pack garbage with gc
expecting success:
oid=$(echo hi|git commit-tree HEAD^{tree}) &&
echo $oid >.git/shallow &&
git prune --dry-run >out &&
grep $oid .git/shallow &&
grep $oid out &&
git prune &&
test_path_is_missing .git/shallow
600238ca122b30a155a15330dffd6abd056eca17
600238ca122b30a155a15330dffd6abd056eca17 commit
Removing 600238ca122b30a155a15330dffd6abd056eca17 from .git/shallow
ok 21 - prune .git/shallow
expecting success:
oid=$(echo hi|git commit-tree HEAD^{tree}) &&
echo $oid >.git/shallow &&
git update-ref refs/heads/shallow-tip $oid &&
git repack -ad &&
# verify assumption that all loose objects are gone
git count-objects | grep ^0 &&
git prune &&
echo $oid >expect &&
test_cmp expect .git/shallow
0 objects, 0 kilobytes
ok 22 - prune .git/shallow when there are no loose objects
expecting success:
test_create_repo A &&
git -C A commit --allow-empty -m "initial commit" &&
git clone --shared A B &&
git -C B commit --allow-empty -m "next commit" &&
git -C B prune
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5304-prune/A/.git/
[master (root-commit) 96ee8f3] initial commit
Author: A U Thor <author@example.com>
Cloning into 'B'...
done.
[master 40123d0] next commit
Author: A U Thor <author@example.com>
ok 23 - prune: handle alternate object database
expecting success:
git worktree add second-worktree &&
echo "new blob for second-worktree" >second-worktree/blob &&
git -C second-worktree add blob &&
git prune --expire=now &&
git -C second-worktree show :blob >actual &&
test_cmp second-worktree/blob actual
Preparing worktree (new branch 'second-worktree')
HEAD is now at bfcb208 temporary
ok 24 - prune: handle index in multiple worktrees
expecting success:
git worktree add --detach third-worktree &&
echo "new blob for third-worktree" >third-worktree/blob &&
git -C third-worktree add blob &&
git -C third-worktree commit -m "third" &&
rm .git/worktrees/third-worktree/index &&
test_must_fail git -C third-worktree show :blob &&
git prune --expire=now &&
git -C third-worktree show HEAD:blob >actual &&
test_cmp third-worktree/blob actual
Preparing worktree (detached HEAD bfcb208)
HEAD is now at bfcb208 temporary
[detached HEAD fd12556] third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 blob
fatal: Path 'blob' exists on disk, but not in the index.
ok 25 - prune: handle HEAD in multiple worktrees
expecting success:
git config core.logAllRefUpdates true &&
echo "lost blob for third-worktree" >expected &&
(
cd third-worktree &&
cat ../expected >blob &&
git add blob &&
git commit -m "second commit in third" &&
git reset --hard HEAD^
) &&
git prune --expire=now &&
oid=`git hash-object expected` &&
git -C third-worktree show "$oid" >actual &&
test_cmp expected actual
[detached HEAD 0e1afb4] second commit in third
Author: A U Thor <author@example.com>
3 files changed, 1 insertion(+), 1 deletion(-)
delete mode 100644 file
delete mode 100644 file2
HEAD is now at fd12556 third
ok 26 - prune: handle HEAD reflog in multiple worktrees
expecting success:
test_must_fail git prune --expire 2>error &&
test_i18ngrep "requires a value" error &&
test_must_fail git prune --expire=nyah 2>error &&
test_i18ngrep "malformed expiration" error &&
git prune --no-expire
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: option `expire' requires a value
fatal: malformed expiration date 'nyah'
ok 27 - prune: handle expire option correctly
expecting success:
git repack -adb &&
blob=$(echo bitmap-unreachable-blob | git hash-object -w --stdin) &&
git prune --expire=now &&
git cat-file -e HEAD &&
test_must_fail git cat-file -e $blob
ok 28 - trivial prune with bitmaps enabled
# passed all 28 test(s)
1..28
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5300-pack-object.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5300-pack-object/.git/
expecting success: rm -f .git/index* &&
perl -e "print \"a\" x 4096;" > a &&
perl -e "print \"b\" x 4096;" > b &&
perl -e "print \"c\" x 4096;" > c &&
test-tool genrandom "seed a" 2097152 > a_big &&
test-tool genrandom "seed b" 2097152 > b_big &&
git update-index --add a a_big b b_big c &&
cat c >d && echo foo >>d && git update-index --add d &&
tree=$(git write-tree) &&
commit=$(git commit-tree $tree </dev/null) && {
echo $tree &&
echo $commit &&
git ls-tree $tree | sed -e "s/.* \\([0-9a-f]*\\) .*/\\1/"
} >obj-list && {
git diff-tree --root -p $commit &&
while read object
do
t=$(git cat-file -t $object) &&
git cat-file $t $object || return 1
done <obj-list
} >expect
ok 1 - setup
expecting success: packname_1=$(git pack-objects --window=0 test-1 <obj-list)
ok 2 - pack without delta
expecting success: test_must_fail git pack-objects --window=0 test-1 blah blah <obj-list
usage: git pack-objects --stdout [<options>...] [< <ref-list> | < <object-list>]
or: git pack-objects [<options>...] <base-name> [< <ref-list> | < <object-list>]
-q, --quiet do not show progress meter
--progress show progress meter
--all-progress show progress meter during object writing phase
--all-progress-implied
similar to --all-progress when progress meter is shown
--index-version <version>[,<offset>]
write the pack index file in the specified idx format version
--max-pack-size <n> maximum size of each output pack file
--local ignore borrowed objects from alternate object store
--incremental ignore packed objects
--window <n> limit pack window by objects
--window-memory <n> limit pack window by memory in addition to object limit
--depth <n> maximum length of delta chain allowed in the resulting pack
--reuse-delta reuse existing deltas
--reuse-object reuse existing objects
--delta-base-offset use OFS_DELTA objects
--threads <n> use threads when searching for best delta matches
--non-empty do not create an empty pack output
--revs read revision arguments from standard input
--unpacked limit the objects to those that are not yet packed
--all include objects reachable from any reference
--reflog include objects referred by reflog entries
--indexed-objects include objects referred to by the index
--stdout output pack to stdout
--include-tag include tag objects that refer to objects to be packed
--keep-unreachable keep unreachable objects
--pack-loose-unreachable
pack loose unreachable objects
--unpack-unreachable[=<time>]
unpack unreachable objects newer than <time>
--sparse use the sparse reachability algorithm
--thin create thin packs
--shallow create packs suitable for shallow fetches
--honor-pack-keep ignore packs that have companion .keep file
--keep-pack <name> ignore this pack
--compression <n> pack compression level
--keep-true-parents do not hide commits by grafts
--use-bitmap-index use a bitmap index if available to speed up counting objects
--write-bitmap-index write a bitmap index together with the pack index
--filter <args> object filtering
--missing <action> handling for missing objects
--exclude-promisor-objects
do not pack objects in promisor packfiles
--delta-islands respect islands during delta compression
ok 3 - pack-objects with bogus arguments
expecting success: GIT_OBJECT_DIRECTORY=.git2/objects &&
export GIT_OBJECT_DIRECTORY &&
git init &&
git unpack-objects -n <test-1-720c1feb08065063855d60e1970a5bf27ee8e72f.pack &&
git unpack-objects <test-1-720c1feb08065063855d60e1970a5bf27ee8e72f.pack
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5300-pack-object/.git/
ok 4 - unpack without delta
expecting success: (cd ../.git && find objects -type f -print) |
while read path
do
cmp $path ../.git/$path || {
echo $path differs.
return 1
}
done
ok 5 - check unpack without delta
expecting success: pwd &&
packname_2=$(git pack-objects test-2 <obj-list)
/<<PKGBUILDDIR>>/t/trash directory.t5300-pack-object
ok 6 - pack with REF_DELTA
expecting success: GIT_OBJECT_DIRECTORY=.git2/objects &&
export GIT_OBJECT_DIRECTORY &&
git init &&
git unpack-objects -n <test-2-${packname_2}.pack &&
git unpack-objects <test-2-${packname_2}.pack
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5300-pack-object/.git/
ok 7 - unpack with REF_DELTA
expecting success: (cd ../.git && find objects -type f -print) |
while read path
do
cmp $path ../.git/$path || {
echo $path differs.
return 1
}
done
ok 8 - check unpack with REF_DELTA
expecting success: pwd &&
packname_3=$(git pack-objects --delta-base-offset test-3 <obj-list)
/<<PKGBUILDDIR>>/t/trash directory.t5300-pack-object
ok 9 - pack with OFS_DELTA
expecting success: GIT_OBJECT_DIRECTORY=.git2/objects &&
export GIT_OBJECT_DIRECTORY &&
git init &&
git unpack-objects -n <test-3-${packname_3}.pack &&
git unpack-objects <test-3-${packname_3}.pack
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5300-pack-object/.git/
ok 10 - unpack with OFS_DELTA
expecting success: (cd ../.git && find objects -type f -print) |
while read path
do
cmp $path ../.git/$path || {
echo $path differs.
return 1
}
done
ok 11 - check unpack with OFS_DELTA
expecting success:
perl -e '
defined($_ = -s $_) or die for @ARGV;
exit 1 if $ARGV[0] <= $ARGV[1];
' test-2-$packname_2.pack test-3-$packname_3.pack
ok 12 - compare delta flavors
expecting success: GIT_OBJECT_DIRECTORY=.git2/objects &&
export GIT_OBJECT_DIRECTORY &&
git init &&
cp test-1-${packname_1}.pack test-1-${packname_1}.idx .git2/objects/pack && {
git diff-tree --root -p $commit &&
while read object
do
t=$(git cat-file -t $object) &&
git cat-file $t $object || return 1
done <obj-list
} >current &&
cmp expect current
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5300-pack-object/.git/
ok 13 - use packed objects
expecting success: GIT_OBJECT_DIRECTORY=.git2/objects &&
export GIT_OBJECT_DIRECTORY &&
rm -f .git2/objects/pack/test-* &&
cp test-2-${packname_2}.pack test-2-${packname_2}.idx .git2/objects/pack && {
git diff-tree --root -p $commit &&
while read object
do
t=$(git cat-file -t $object) &&
git cat-file $t $object || return 1
done <obj-list
} >current &&
cmp expect current
ok 14 - use packed deltified (REF_DELTA) objects
expecting success: GIT_OBJECT_DIRECTORY=.git2/objects &&
export GIT_OBJECT_DIRECTORY &&
rm -f .git2/objects/pack/test-* &&
cp test-3-${packname_3}.pack test-3-${packname_3}.idx .git2/objects/pack && {
git diff-tree --root -p $commit &&
while read object
do
t=$(git cat-file -t $object) &&
git cat-file $t $object || return 1
done <obj-list
} >current &&
cmp expect current
ok 15 - use packed deltified (OFS_DELTA) objects
expecting success:
(
rm -fr missing-pack &&
mkdir missing-pack &&
cd missing-pack &&
git init &&
GOP=.git/objects/pack &&
rm -fr $GOP &&
git index-pack --stdin --keep=test <../test-3-${packname_3}.pack &&
test -f $GOP/pack-${packname_3}.pack &&
cmp $GOP/pack-${packname_3}.pack ../test-3-${packname_3}.pack &&
test -f $GOP/pack-${packname_3}.idx &&
cmp $GOP/pack-${packname_3}.idx ../test-3-${packname_3}.idx &&
test -f $GOP/pack-${packname_3}.keep
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5300-pack-object/missing-pack/.git/
keep 082b345e4f2b5c20cbb6559f13ad686a8d94ea1c
ok 16 - survive missing objects/pack directory
expecting success: git verify-pack test-1-${packname_1}.idx \
test-2-${packname_2}.idx \
test-3-${packname_3}.idx
ok 17 - verify pack
expecting success: git verify-pack -v test-1-${packname_1}.idx \
test-2-${packname_2}.idx \
test-3-${packname_3}.idx
3c5699c72c7dae4ca3b3ca9de37d68a592b50a45 tree 182 169 12
2d03e67aee5e1042b7c70cd9647f005d79503ffc commit 163 123 181
9d235ed07cd19811a6ceb342de82f190e49c9f68 blob 4096 31 304
012b05d476b4ffc9e62d036156b99467206f1efa blob 2097152 2097802 335
c82de19312b6c3695c0c18f70709a6c535682a67 blob 4096 31 2098137
6a9aaa62f091ea4b20590414e8b58c1b0b32b5bf blob 2097152 2097802 2098168
0be779221aca65277fd447c8207e1b3c2706ae20 blob 4096 31 4195970
b010fe5253f7dc59c6605dacb92fcea00d199d4e blob 4100 36 4196001
non delta: 8 objects
test-1-720c1feb08065063855d60e1970a5bf27ee8e72f.pack: ok
3c5699c72c7dae4ca3b3ca9de37d68a592b50a45 tree 182 169 12
2d03e67aee5e1042b7c70cd9647f005d79503ffc commit 163 123 181
9d235ed07cd19811a6ceb342de82f190e49c9f68 blob 4096 31 304
012b05d476b4ffc9e62d036156b99467206f1efa blob 2097152 2097802 335
c82de19312b6c3695c0c18f70709a6c535682a67 blob 4096 31 2098137
6a9aaa62f091ea4b20590414e8b58c1b0b32b5bf blob 2097152 2097802 2098168
b010fe5253f7dc59c6605dacb92fcea00d199d4e blob 4100 36 4195970
0be779221aca65277fd447c8207e1b3c2706ae20 blob 6 35 4196006 1 b010fe5253f7dc59c6605dacb92fcea00d199d4e
non delta: 7 objects
chain length = 1: 1 object
test-2-99dede94264545a012b05626f05a43a7aa45e822.pack: ok
3c5699c72c7dae4ca3b3ca9de37d68a592b50a45 tree 182 169 12
2d03e67aee5e1042b7c70cd9647f005d79503ffc commit 163 123 181
9d235ed07cd19811a6ceb342de82f190e49c9f68 blob 4096 31 304
012b05d476b4ffc9e62d036156b99467206f1efa blob 2097152 2097802 335
c82de19312b6c3695c0c18f70709a6c535682a67 blob 4096 31 2098137
6a9aaa62f091ea4b20590414e8b58c1b0b32b5bf blob 2097152 2097802 2098168
b010fe5253f7dc59c6605dacb92fcea00d199d4e blob 4100 36 4195970
0be779221aca65277fd447c8207e1b3c2706ae20 blob 6 16 4196006 1 b010fe5253f7dc59c6605dacb92fcea00d199d4e
non delta: 7 objects
chain length = 1: 1 object
test-3-082b345e4f2b5c20cbb6559f13ad686a8d94ea1c.pack: ok
ok 18 - verify pack -v
expecting success: cat test-1-${packname_1}.idx >test-3.idx &&
cat test-2-${packname_2}.pack >test-3.pack &&
if git verify-pack test-3.idx
then false
else :;
fi
fatal: sha1 file 'test-3.idx' validation error
ok 19 - verify-pack catches mismatched .idx and .pack files
expecting success: cat test-1-${packname_1}.pack >test-3.pack &&
echo | dd of=test-3.pack count=1 bs=1 conv=notrunc seek=2 &&
if git verify-pack test-3.idx
then false
else :;
fi
1+0 records in
1+0 records out
1 byte copied, 0.010854 s, 0.1 kB/s
fatal: pack signature mismatch
ok 20 - verify-pack catches a corrupted pack signature
expecting success: cat test-1-${packname_1}.pack >test-3.pack &&
echo | dd of=test-3.pack count=1 bs=1 conv=notrunc seek=7 &&
if git verify-pack test-3.idx
then false
else :;
fi
1+0 records in
1+0 records out
1 byte copied, 0.0287992 s, 0.0 kB/s
fatal: pack version 10 unsupported
ok 21 - verify-pack catches a corrupted pack version
expecting success: cat test-1-${packname_1}.pack >test-3.pack &&
echo | dd of=test-3.pack count=1 bs=1 conv=notrunc seek=12 &&
if git verify-pack test-3.idx
then false
else :;
fi
1+0 records in
1+0 records out
1 byte copied, 0.0155933 s, 0.1 kB/s
fatal: pack has bad object at offset 12: unknown object type 0
ok 22 - verify-pack catches a corrupted type/size of the 1st packed object data
expecting success: l=$(wc -c <test-3.idx) &&
l=$(expr $l - 20) &&
cat test-1-${packname_1}.pack >test-3.pack &&
printf "%20s" "" | dd of=test-3.idx count=20 bs=1 conv=notrunc seek=$l &&
if git verify-pack test-3.pack
then false
else :;
fi
20+0 records in
20+0 records out
20 bytes copied, 0.000247823 s, 80.7 kB/s
fatal: sha1 file 'test-3.idx' validation error
ok 23 - verify-pack catches a corrupted sum of the index file itself
expecting success: cat test-1-${packname_1}.pack >test-3.pack &&
git index-pack -o tmp.idx test-3.pack &&
cmp tmp.idx test-1-${packname_1}.idx &&
git index-pack test-3.pack &&
cmp test-3.idx test-1-${packname_1}.idx &&
cat test-2-${packname_2}.pack >test-3.pack &&
git index-pack -o tmp.idx test-2-${packname_2}.pack &&
cmp tmp.idx test-2-${packname_2}.idx &&
git index-pack test-3.pack &&
cmp test-3.idx test-2-${packname_2}.idx &&
cat test-3-${packname_3}.pack >test-3.pack &&
git index-pack -o tmp.idx test-3-${packname_3}.pack &&
cmp tmp.idx test-3-${packname_3}.idx &&
git index-pack test-3.pack &&
cmp test-3.idx test-3-${packname_3}.idx &&
cat test-1-${packname_1}.pack >test-4.pack &&
rm -f test-4.keep &&
git index-pack --keep=why test-4.pack &&
cmp test-1-${packname_1}.idx test-4.idx &&
test -f test-4.keep &&
:
720c1feb08065063855d60e1970a5bf27ee8e72f
720c1feb08065063855d60e1970a5bf27ee8e72f
99dede94264545a012b05626f05a43a7aa45e822
99dede94264545a012b05626f05a43a7aa45e822
082b345e4f2b5c20cbb6559f13ad686a8d94ea1c
082b345e4f2b5c20cbb6559f13ad686a8d94ea1c
720c1feb08065063855d60e1970a5bf27ee8e72f
ok 24 - build pack index for an existing pack
expecting success:
for j in a b c d e f g
do
for i in 0 1 2 3 4 5 6 7 8 9
do
o=$(echo $j$i | git hash-object -w --stdin) &&
echo "100644 $o 0 $j$i"
done
done >LIST &&
rm -f .git/index &&
git update-index --index-info <LIST &&
LIST=$(git write-tree) &&
rm -f .git/index &&
head -n 10 LIST | git update-index --index-info &&
LI=$(git write-tree) &&
rm -f .git/index &&
tail -n 10 LIST | git update-index --index-info &&
ST=$(git write-tree) &&
git rev-list --objects "$LIST" "$LI" "$ST" >actual &&
PACK5=$( git pack-objects test-5 <actual ) &&
PACK6=$( (
echo "$LIST"
echo "$LI"
echo "$ST"
) | git pack-objects test-6 ) &&
test_create_repo test-5 &&
(
cd test-5 &&
git unpack-objects --strict <../test-5-$PACK5.pack &&
git ls-tree -r $LIST &&
git ls-tree -r $LI &&
git ls-tree -r $ST
) &&
test_create_repo test-6 &&
(
# tree-only into empty repo -- many unreachables
cd test-6 &&
test_must_fail git unpack-objects --strict <../test-6-$PACK6.pack
) &&
(
# already populated -- no unreachables
cd test-5 &&
git unpack-objects --strict <../test-6-$PACK6.pack
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5300-pack-object/test-5/.git/
100644 blob 0042f6c56d8fc1896f3efc2cdc5060e5b5e44e02 0 a0
100644 blob da0f8ed91a8f2f0f067b3bdf26265d5ca48cf82c 0 a1
100644 blob c1827f07e114c20547dc6a7296588870a4b5b62c 0 a2
100644 blob d616f7380ad325123fed6f628d02fa76e1ce77c3 0 a3
100644 blob 88ba23dca8c8529f8165539c369925a99391a4d1 0 a4
100644 blob fafec68b313bde633804c37b46810f136ee12ea6 0 a5
100644 blob 5b521d0587015867ac1a23fa00be3f3fce080b9f 0 a6
100644 blob 6bac181dd20780870c30d69308f5a90b59a15102 0 a7
100644 blob f1914bb68f8515ba7d1ab0f0cddcdf960731773d 0 a8
100644 blob dbe2bc1151e5d5d469644f20189f923f006ed0cc 0 a9
100644 blob 2270a80fbb71d7109b85e7489f3f307d0141a559 0 b0
100644 blob c9c6af7f78bc47490dbf3e822cf2f3c24d4b9061 0 b1
100644 blob e6bfff5c1d0f0ecd501552b43a1e13d8008abc31 0 b2
100644 blob 6d0875c82a99774922eab07fbc08510fc85d9e0a 0 b3
100644 blob 8e953e84d803f13fd06416a1bd8161dcd93cfd00 0 b4
100644 blob 90a5159bf020296276ea5ca1bcd292a9b1de9947 0 b5
100644 blob 07eb61d36f49569a2b0649af299f9f00013d0969 0 b6
100644 blob 6e6d33cfc7b1581413a88ae0759202b25ac4cad1 0 b7
100644 blob 5d453c66b522d8de5d99c03bd2bf8b65ca0bcf33 0 b8
100644 blob 9a16e0d1a643983973291127012d2694a0b17fe8 0 b9
100644 blob caecf05cdbb03e144f113ecab2b99e5ee74df706 0 c0
100644 blob ae9304576a6ec3419b231b2b9c8e33a06f97f9fb 0 c1
100644 blob 16f9ec009e5568c435f473ba3a1df732d49ce8c3 0 c2
100644 blob 0771aea884dd394a7b12783d049f05b5599f41a4 0 c3
100644 blob a103f673dd1b7c5727aa0ae0100419adc50e1b76 0 c4
100644 blob c36357109ce20af8f90df3c0dd0784e89408d707 0 c5
100644 blob 86a716504cbdc40a135faa5ab199d15e364c416d 0 c6
100644 blob 20be68787e59f4cb8983b641d170c4baf8ea25dd 0 c7
100644 blob bb420bc8fb9e91530fdc25e363f6b822d5195309 0 c8
100644 blob f899bd1761a5ca5978799bc3189a04d3c52d8435 0 c9
100644 blob 79a5e858be4a3a969e3b71406fef0d3d36e1d387 0 d0
100644 blob 6f1852975b9306ae5d8dfdf0d4cb1f5cb36ac229 0 d1
100644 blob fd3671590780b645e1bef030d550191f6cdf1c95 0 d2
100644 blob 69c77a9ea746edd27b46107142fc2c5288c1daf5 0 d3
100644 blob d7b30ee07d4b9819a77a3b122282b4c04528ec21 0 d4
100644 blob fa590f3f8bfbef6095cf6525e8497b2b2b46445c 0 d5
100644 blob fef4390d19cb98fa97efd44c09d4e2eb7b084b40 0 d6
100644 blob a5adf29249757619b8890c86f2cfcfeee611b5d8 0 d7
100644 blob 1859919d049c078ba63fcecbce60e697c6da8e01 0 d8
100644 blob b6148c82443a60d1d5ce07872a85e3c544b5f4b0 0 d9
100644 blob 4fe4106b50b257f3d6ffd23b750d2d1945c2608b 0 e0
100644 blob 5ff91639494693b1f238b5dc9baf8be95142c3ab 0 e1
100644 blob 3811af3ca744c2fb44077a8025c23b4d4166a449 0 e2
100644 blob 9338c3fa1f74d202651154257572d32aed57cc16 0 e3
100644 blob c5195815f83aa9ef1ebac9e11f14d62b26406c99 0 e4
100644 blob 0c44c89ef9c29077cceebc6dd9ca0b3a950c95ee 0 e5
100644 blob f17172bc54cfa55a9e531cc845dff39855cd8df0 0 e6
100644 blob 29870e9ccff84f86938ee588a47b39cf3a802e6b 0 e7
100644 blob e8d01d007452cede5c6eafc3343fc80675b1e2f9 0 e8
100644 blob 0c1945ad576ffc445ad69a3fafd1d3c04cc0bd40 0 e9
100644 blob 844dc808a1d3d769ddcf5430eac933d4d87ff606 0 f0
100644 blob 8e1e71d5ce34c01b6fe83bc5051545f2918c8c2b 0 f1
100644 blob 9de77c18733ab8009a956c25e28c85fe203a17d7 0 f2
100644 blob 45d9e0e9fc8859787c33081dffdf12f41b54fcf3 0 f3
100644 blob c48ac4847d3abae8e5899dcc5cf490a98df55755 0 f4
100644 blob 14c61ecf25961ce674048103c5fa5ea3c535a5cd 0 f5
100644 blob 59ce90029dfd9e224701a040a26153e9f2feb74c 0 f6
100644 blob 0a7bd52ffb819609cf65f40eb91be62000db47e5 0 f7
100644 blob c7e617f6b429a1f3b462df6add2b4ea2cf702faf 0 f8
100644 blob a720d8c8d277ad31ee5b180bef57379b5f62517c 0 f9
100644 blob 2e7d2f0b106eb8823e449a020497e26b86dc3eb1 0 g0
100644 blob d8a17fff13638d804e8bf7f9f357c174db98f126 0 g1
100644 blob 247c4abd244a429297a4c4b091592ae13bbf4677 0 g2
100644 blob affaa5ba8c43cfc71469226e0d57cb6823c843da 0 g3
100644 blob 51bc00f93e60aeef7dccfcf646e3f615056112bd 0 g4
100644 blob 02b4fdd23d495769852f1550c10eb015f0fe0039 0 g5
100644 blob e65aa9d64b596da2ba61e0662b1173f1e16dcbcf 0 g6
100644 blob e19089689a05907b359f52c972ee7d2294fa96ab 0 g7
100644 blob 30c2af9542d38e1f248390632612e0fb944fd27d 0 g8
100644 blob 09827d7e43d81089e868e9f0f06502b865939c05 0 g9
100644 blob 0042f6c56d8fc1896f3efc2cdc5060e5b5e44e02 0 a0
100644 blob da0f8ed91a8f2f0f067b3bdf26265d5ca48cf82c 0 a1
100644 blob c1827f07e114c20547dc6a7296588870a4b5b62c 0 a2
100644 blob d616f7380ad325123fed6f628d02fa76e1ce77c3 0 a3
100644 blob 88ba23dca8c8529f8165539c369925a99391a4d1 0 a4
100644 blob fafec68b313bde633804c37b46810f136ee12ea6 0 a5
100644 blob 5b521d0587015867ac1a23fa00be3f3fce080b9f 0 a6
100644 blob 6bac181dd20780870c30d69308f5a90b59a15102 0 a7
100644 blob f1914bb68f8515ba7d1ab0f0cddcdf960731773d 0 a8
100644 blob dbe2bc1151e5d5d469644f20189f923f006ed0cc 0 a9
100644 blob 2e7d2f0b106eb8823e449a020497e26b86dc3eb1 0 g0
100644 blob d8a17fff13638d804e8bf7f9f357c174db98f126 0 g1
100644 blob 247c4abd244a429297a4c4b091592ae13bbf4677 0 g2
100644 blob affaa5ba8c43cfc71469226e0d57cb6823c843da 0 g3
100644 blob 51bc00f93e60aeef7dccfcf646e3f615056112bd 0 g4
100644 blob 02b4fdd23d495769852f1550c10eb015f0fe0039 0 g5
100644 blob e65aa9d64b596da2ba61e0662b1173f1e16dcbcf 0 g6
100644 blob e19089689a05907b359f52c972ee7d2294fa96ab 0 g7
100644 blob 30c2af9542d38e1f248390632612e0fb944fd27d 0 g8
100644 blob 09827d7e43d81089e868e9f0f06502b865939c05 0 g9
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5300-pack-object/test-6/.git/
fatal: object of unexpected type
ok 25 - unpacking with --strict
expecting success:
for j in a b c d e f g
do
for i in 0 1 2 3 4 5 6 7 8 9
do
o=$(echo $j$i | git hash-object -w --stdin) &&
echo "100644 $o 0 $j$i"
done
done >LIST &&
rm -f .git/index &&
git update-index --index-info <LIST &&
LIST=$(git write-tree) &&
rm -f .git/index &&
head -n 10 LIST | git update-index --index-info &&
LI=$(git write-tree) &&
rm -f .git/index &&
tail -n 10 LIST | git update-index --index-info &&
ST=$(git write-tree) &&
git rev-list --objects "$LIST" "$LI" "$ST" >actual &&
PACK5=$( git pack-objects test-5 <actual ) &&
PACK6=$( (
echo "$LIST"
echo "$LI"
echo "$ST"
) | git pack-objects test-6 ) &&
test_create_repo test-7 &&
(
cd test-7 &&
git index-pack --strict --stdin <../test-5-$PACK5.pack &&
git ls-tree -r $LIST &&
git ls-tree -r $LI &&
git ls-tree -r $ST
) &&
test_create_repo test-8 &&
(
# tree-only into empty repo -- many unreachables
cd test-8 &&
test_must_fail git index-pack --strict --stdin <../test-6-$PACK6.pack
) &&
(
# already populated -- no unreachables
cd test-7 &&
git index-pack --strict --stdin <../test-6-$PACK6.pack
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5300-pack-object/test-7/.git/
pack 580f6e9e5f1fc55c922ae4f748e6adb3737375f4
100644 blob 0042f6c56d8fc1896f3efc2cdc5060e5b5e44e02 0 a0
100644 blob da0f8ed91a8f2f0f067b3bdf26265d5ca48cf82c 0 a1
100644 blob c1827f07e114c20547dc6a7296588870a4b5b62c 0 a2
100644 blob d616f7380ad325123fed6f628d02fa76e1ce77c3 0 a3
100644 blob 88ba23dca8c8529f8165539c369925a99391a4d1 0 a4
100644 blob fafec68b313bde633804c37b46810f136ee12ea6 0 a5
100644 blob 5b521d0587015867ac1a23fa00be3f3fce080b9f 0 a6
100644 blob 6bac181dd20780870c30d69308f5a90b59a15102 0 a7
100644 blob f1914bb68f8515ba7d1ab0f0cddcdf960731773d 0 a8
100644 blob dbe2bc1151e5d5d469644f20189f923f006ed0cc 0 a9
100644 blob 2270a80fbb71d7109b85e7489f3f307d0141a559 0 b0
100644 blob c9c6af7f78bc47490dbf3e822cf2f3c24d4b9061 0 b1
100644 blob e6bfff5c1d0f0ecd501552b43a1e13d8008abc31 0 b2
100644 blob 6d0875c82a99774922eab07fbc08510fc85d9e0a 0 b3
100644 blob 8e953e84d803f13fd06416a1bd8161dcd93cfd00 0 b4
100644 blob 90a5159bf020296276ea5ca1bcd292a9b1de9947 0 b5
100644 blob 07eb61d36f49569a2b0649af299f9f00013d0969 0 b6
100644 blob 6e6d33cfc7b1581413a88ae0759202b25ac4cad1 0 b7
100644 blob 5d453c66b522d8de5d99c03bd2bf8b65ca0bcf33 0 b8
100644 blob 9a16e0d1a643983973291127012d2694a0b17fe8 0 b9
100644 blob caecf05cdbb03e144f113ecab2b99e5ee74df706 0 c0
100644 blob ae9304576a6ec3419b231b2b9c8e33a06f97f9fb 0 c1
100644 blob 16f9ec009e5568c435f473ba3a1df732d49ce8c3 0 c2
100644 blob 0771aea884dd394a7b12783d049f05b5599f41a4 0 c3
100644 blob a103f673dd1b7c5727aa0ae0100419adc50e1b76 0 c4
100644 blob c36357109ce20af8f90df3c0dd0784e89408d707 0 c5
100644 blob 86a716504cbdc40a135faa5ab199d15e364c416d 0 c6
100644 blob 20be68787e59f4cb8983b641d170c4baf8ea25dd 0 c7
100644 blob bb420bc8fb9e91530fdc25e363f6b822d5195309 0 c8
100644 blob f899bd1761a5ca5978799bc3189a04d3c52d8435 0 c9
100644 blob 79a5e858be4a3a969e3b71406fef0d3d36e1d387 0 d0
100644 blob 6f1852975b9306ae5d8dfdf0d4cb1f5cb36ac229 0 d1
100644 blob fd3671590780b645e1bef030d550191f6cdf1c95 0 d2
100644 blob 69c77a9ea746edd27b46107142fc2c5288c1daf5 0 d3
100644 blob d7b30ee07d4b9819a77a3b122282b4c04528ec21 0 d4
100644 blob fa590f3f8bfbef6095cf6525e8497b2b2b46445c 0 d5
100644 blob fef4390d19cb98fa97efd44c09d4e2eb7b084b40 0 d6
100644 blob a5adf29249757619b8890c86f2cfcfeee611b5d8 0 d7
100644 blob 1859919d049c078ba63fcecbce60e697c6da8e01 0 d8
100644 blob b6148c82443a60d1d5ce07872a85e3c544b5f4b0 0 d9
100644 blob 4fe4106b50b257f3d6ffd23b750d2d1945c2608b 0 e0
100644 blob 5ff91639494693b1f238b5dc9baf8be95142c3ab 0 e1
100644 blob 3811af3ca744c2fb44077a8025c23b4d4166a449 0 e2
100644 blob 9338c3fa1f74d202651154257572d32aed57cc16 0 e3
100644 blob c5195815f83aa9ef1ebac9e11f14d62b26406c99 0 e4
100644 blob 0c44c89ef9c29077cceebc6dd9ca0b3a950c95ee 0 e5
100644 blob f17172bc54cfa55a9e531cc845dff39855cd8df0 0 e6
100644 blob 29870e9ccff84f86938ee588a47b39cf3a802e6b 0 e7
100644 blob e8d01d007452cede5c6eafc3343fc80675b1e2f9 0 e8
100644 blob 0c1945ad576ffc445ad69a3fafd1d3c04cc0bd40 0 e9
100644 blob 844dc808a1d3d769ddcf5430eac933d4d87ff606 0 f0
100644 blob 8e1e71d5ce34c01b6fe83bc5051545f2918c8c2b 0 f1
100644 blob 9de77c18733ab8009a956c25e28c85fe203a17d7 0 f2
100644 blob 45d9e0e9fc8859787c33081dffdf12f41b54fcf3 0 f3
100644 blob c48ac4847d3abae8e5899dcc5cf490a98df55755 0 f4
100644 blob 14c61ecf25961ce674048103c5fa5ea3c535a5cd 0 f5
100644 blob 59ce90029dfd9e224701a040a26153e9f2feb74c 0 f6
100644 blob 0a7bd52ffb819609cf65f40eb91be62000db47e5 0 f7
100644 blob c7e617f6b429a1f3b462df6add2b4ea2cf702faf 0 f8
100644 blob a720d8c8d277ad31ee5b180bef57379b5f62517c 0 f9
100644 blob 2e7d2f0b106eb8823e449a020497e26b86dc3eb1 0 g0
100644 blob d8a17fff13638d804e8bf7f9f357c174db98f126 0 g1
100644 blob 247c4abd244a429297a4c4b091592ae13bbf4677 0 g2
100644 blob affaa5ba8c43cfc71469226e0d57cb6823c843da 0 g3
100644 blob 51bc00f93e60aeef7dccfcf646e3f615056112bd 0 g4
100644 blob 02b4fdd23d495769852f1550c10eb015f0fe0039 0 g5
100644 blob e65aa9d64b596da2ba61e0662b1173f1e16dcbcf 0 g6
100644 blob e19089689a05907b359f52c972ee7d2294fa96ab 0 g7
100644 blob 30c2af9542d38e1f248390632612e0fb944fd27d 0 g8
100644 blob 09827d7e43d81089e868e9f0f06502b865939c05 0 g9
100644 blob 0042f6c56d8fc1896f3efc2cdc5060e5b5e44e02 0 a0
100644 blob da0f8ed91a8f2f0f067b3bdf26265d5ca48cf82c 0 a1
100644 blob c1827f07e114c20547dc6a7296588870a4b5b62c 0 a2
100644 blob d616f7380ad325123fed6f628d02fa76e1ce77c3 0 a3
100644 blob 88ba23dca8c8529f8165539c369925a99391a4d1 0 a4
100644 blob fafec68b313bde633804c37b46810f136ee12ea6 0 a5
100644 blob 5b521d0587015867ac1a23fa00be3f3fce080b9f 0 a6
100644 blob 6bac181dd20780870c30d69308f5a90b59a15102 0 a7
100644 blob f1914bb68f8515ba7d1ab0f0cddcdf960731773d 0 a8
100644 blob dbe2bc1151e5d5d469644f20189f923f006ed0cc 0 a9
100644 blob 2e7d2f0b106eb8823e449a020497e26b86dc3eb1 0 g0
100644 blob d8a17fff13638d804e8bf7f9f357c174db98f126 0 g1
100644 blob 247c4abd244a429297a4c4b091592ae13bbf4677 0 g2
100644 blob affaa5ba8c43cfc71469226e0d57cb6823c843da 0 g3
100644 blob 51bc00f93e60aeef7dccfcf646e3f615056112bd 0 g4
100644 blob 02b4fdd23d495769852f1550c10eb015f0fe0039 0 g5
100644 blob e65aa9d64b596da2ba61e0662b1173f1e16dcbcf 0 g6
100644 blob e19089689a05907b359f52c972ee7d2294fa96ab 0 g7
100644 blob 30c2af9542d38e1f248390632612e0fb944fd27d 0 g8
100644 blob 09827d7e43d81089e868e9f0f06502b865939c05 0 g9
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5300-pack-object/test-8/.git/
fatal: did not receive expected object 0042f6c56d8fc1896f3efc2cdc5060e5b5e44e02
pack 499fed00672b4ac4e35132711ee1664a089f355e
ok 26 - index-pack with --strict
expecting success:
git config pack.packSizeLimit 3m &&
packname_10=$(git pack-objects test-10 <obj-list) &&
test 2 = $(ls test-10-*.pack | wc -l)
ok 27 - honor pack.packSizeLimit
expecting success:
git verify-pack test-10-*.pack
ok 28 - verify resulting packs
expecting success:
git config pack.packSizeLimit 1 &&
packname_11=$(git pack-objects test-11 <obj-list) &&
test 5 = $(ls test-11-*.pack | wc -l)
warning: minimum pack size limit is 1 MiB
ok 29 - tolerate packsizelimit smaller than biggest object
expecting success:
git verify-pack test-11-*.pack
ok 30 - verify resulting packs
expecting success:
# make sure we have a pack with no matching index file
cp test-1-*.pack foo.pack
ok 31 - set up pack for non-repo tests
expecting success:
nongit test_must_fail git index-pack --stdin <foo.pack &&
test_path_is_missing non-repo/.git
fatal: --stdin requires a git repository
ok 32 - index-pack --stdin complains of non-repo
expecting success:
nongit git index-pack ../foo.pack &&
test_path_is_file foo.idx
720c1feb08065063855d60e1970a5bf27ee8e72f
ok 33 - index-pack <pack> works in non-repo
expecting success:
rm -f foo.idx &&
nongit git index-pack --strict ../foo.pack &&
test_path_is_file foo.idx
720c1feb08065063855d60e1970a5bf27ee8e72f
ok 34 - index-pack --strict <pack> works in non-repo
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
skipping test: index-pack --threads=N or pack.threads=N warns when no pthreads
test_must_fail git index-pack --threads=2 2>err &&
grep ^warning: err >warnings &&
test_line_count = 1 warnings &&
grep -F "no threads support, ignoring --threads=2" err &&
test_must_fail git -c pack.threads=2 index-pack 2>err &&
grep ^warning: err >warnings &&
test_line_count = 1 warnings &&
grep -F "no threads support, ignoring pack.threads" err &&
test_must_fail git -c pack.threads=2 index-pack --threads=4 2>err &&
grep ^warning: err >warnings &&
test_line_count = 2 warnings &&
grep -F "no threads support, ignoring --threads=4" err &&
grep -F "no threads support, ignoring pack.threads" err
ok 35 # skip index-pack --threads=N or pack.threads=N warns when no pthreads (missing !PTHREADS of !PTHREADS,C_LOCALE_OUTPUT)
skipping test: pack-objects --threads=N or pack.threads=N warns when no pthreads
git pack-objects --threads=2 --stdout --all </dev/null >/dev/null 2>err &&
grep ^warning: err >warnings &&
test_line_count = 1 warnings &&
grep -F "no threads support, ignoring --threads" err &&
git -c pack.threads=2 pack-objects --stdout --all </dev/null >/dev/null 2>err &&
grep ^warning: err >warnings &&
test_line_count = 1 warnings &&
grep -F "no threads support, ignoring pack.threads" err &&
git -c pack.threads=2 pack-objects --threads=4 --stdout --all </dev/null >/dev/null 2>err &&
grep ^warning: err >warnings &&
test_line_count = 2 warnings &&
grep -F "no threads support, ignoring --threads" err &&
grep -F "no threads support, ignoring pack.threads" err
ok 36 # skip pack-objects --threads=N or pack.threads=N warns when no pthreads (missing !PTHREADS of !PTHREADS,C_LOCALE_OUTPUT)
expecting success:
GIT_TEST_FULL_IN_PACK_ARRAY=1 git repack -ad &&
git fsck
warning: minimum pack size limit is 1 MiB
notice: HEAD points to an unborn branch (master)
notice: No default references
dangling commit 2d03e67aee5e1042b7c70cd9647f005d79503ffc
dangling tree eb486020614a4c764f9df37263317ed4ea372ef8
dangling tree ebe633107a37152edb13864b30d6878084f68c92
ok 37 - pack-objects in too-many-packs mode
expecting success:
git init corrupt &&
(
cd corrupt &&
long_a=$(git hash-object -w ../a | sed -e "s!^..!&/!") &&
long_b=$(git hash-object -w ../b | sed -e "s!^..!&/!") &&
test -f .git/objects/$long_b &&
cp -f .git/objects/$long_a \
.git/objects/$long_b
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5300-pack-object/corrupt/.git/
ok 38 - setup: fake a SHA1 hash collision
expecting success:
(
cd corrupt &&
test_must_fail git index-pack -o ../bad.idx ../test-3.pack 2>msg &&
test_i18ngrep "SHA1 COLLISION FOUND" msg
)
fatal: SHA1 COLLISION FOUND WITH c82de19312b6c3695c0c18f70709a6c535682a67 !
ok 39 - make sure index-pack detects the SHA1 collision
expecting success:
(
cd corrupt &&
test_must_fail git -c core.bigfilethreshold=1 index-pack -o ../bad.idx ../test-3.pack 2>msg &&
test_i18ngrep "SHA1 COLLISION FOUND" msg
)
fatal: SHA1 COLLISION FOUND WITH c82de19312b6c3695c0c18f70709a6c535682a67 !
ok 40 - make sure index-pack detects the SHA1 collision (large blobs)
# passed all 40 test(s)
1..40
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5305-include-tag.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5305-include-tag/.git/
expecting success:
echo c >d &&
git update-index --add d &&
tree=$(git write-tree) &&
commit=$(git commit-tree $tree </dev/null) &&
echo "object $commit" >sig &&
echo "type commit" >>sig &&
echo "tag mytag" >>sig &&
echo "tagger $(git var GIT_COMMITTER_IDENT)" >>sig &&
echo >>sig &&
echo "our test tag" >>sig &&
tag=$(git mktag <sig) &&
rm d sig &&
git update-ref refs/tags/mytag $tag && {
echo $tree &&
echo $commit &&
git ls-tree $tree | sed -e "s/.* \\([0-9a-f]*\\) .*/\\1/"
} >obj-list
ok 1 - setup
expecting success:
packname=$(git pack-objects \
--window=0 \
test-no-include <obj-list)
ok 2 - pack without --include-tag
expecting success:
rm -rf clone.git &&
git init clone.git &&
git -C clone.git unpack-objects <test-no-include-${packname}.pack
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5305-include-tag/clone.git/.git/
ok 3 - unpack objects
expecting success:
git rev-list --objects $commit >list.expect &&
test_must_fail git -C clone.git cat-file -e $tag &&
git -C clone.git rev-list --objects $commit >list.actual &&
test_cmp list.expect list.actual
ok 4 - check unpacked result (have commit, no tag)
expecting success:
packname=$(git pack-objects \
--window=0 \
--include-tag \
test-include <obj-list)
ok 5 - pack with --include-tag
expecting success:
rm -rf clone.git &&
git init clone.git &&
git -C clone.git unpack-objects <test-include-${packname}.pack
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5305-include-tag/clone.git/.git/
ok 6 - unpack objects
expecting success:
git rev-list --objects mytag >list.expect &&
git -C clone.git rev-list --objects $tag >list.actual &&
test_cmp list.expect list.actual
ok 7 - check unpacked result (have commit, have tag)
expecting success:
test_commit commit &&
git tag -m inner inner HEAD &&
git tag -m outer outer inner &&
git tag -d inner
[master (root-commit) b6b0ff3] commit
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 commit.t
create mode 100644 d
hint: You have created a nested tag. The object referred to by your new tag is
hint: already a tag. If you meant to tag the object that it points to, use:
hint:
hint: git tag -f outer inner^{}
Deleted tag 'inner' (was 4a3d125)
ok 8 - create hidden inner tag
expecting success:
packname=$(
{
echo HEAD &&
echo outer
} |
git pack-objects --revs test-hidden-explicit
)
ok 9 - pack explicit outer tag
expecting success:
rm -rf clone.git &&
git init clone.git &&
git -C clone.git unpack-objects <test-hidden-explicit-${packname}.pack
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5305-include-tag/clone.git/.git/
ok 10 - unpack objects
expecting success:
git -C clone.git rev-list --objects $(git rev-parse outer HEAD)
b6b0ff3317698915de9c0bec0caab17e3884f5cc
f29dea06355cfae615126151f86d323b8249923c outer
4a3d125fea2ae6987f86d32a1f9598b386f2edcc inner
c5b8485de618df1bc5b007d1a28eeb3e4c4deae8
01f9a2aac3e315c5caa00db4019f1d934171dba0 commit.t
f2ad6c76f0115a6ba5b00456a849810e7ec0af20 d
ok 11 - check unpacked result (have all objects)
expecting success:
packname=$(
echo HEAD |
git pack-objects --revs --include-tag test-hidden-implied
)
ok 12 - pack implied outer tag
expecting success:
rm -rf clone.git &&
git init clone.git &&
git -C clone.git unpack-objects <test-hidden-implied-${packname}.pack
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5305-include-tag/clone.git/.git/
ok 13 - unpack objects
expecting success:
git -C clone.git rev-list --objects $(git rev-parse outer HEAD)
b6b0ff3317698915de9c0bec0caab17e3884f5cc
f29dea06355cfae615126151f86d323b8249923c outer
4a3d125fea2ae6987f86d32a1f9598b386f2edcc inner
c5b8485de618df1bc5b007d1a28eeb3e4c4deae8
01f9a2aac3e315c5caa00db4019f1d934171dba0 commit.t
f2ad6c76f0115a6ba5b00456a849810e7ec0af20 d
ok 14 - check unpacked result (have all objects)
expecting success:
rm -rf clone.git &&
git clone --no-local --single-branch -b master . clone.git &&
git -C clone.git fsck
Cloning into 'clone.git'...
ok 15 - single-branch clone can transfer tag
# passed all 15 test(s)
1..15
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5306-pack-nobase.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5306-pack-nobase/.git/
expecting success: for a in a b c d e f g h i; do echo $a >>text; done &&
echo side >side &&
git update-index --add text side &&
A=$(echo A | git commit-tree $(git write-tree)) &&
echo m >>text &&
git update-index text &&
B=$(echo B | git commit-tree $(git write-tree) -p $A) &&
git update-ref HEAD $B
ok 1 - setup base
expecting success: base_objects=$(pwd)/.git/objects &&
(mkdir patch_clone &&
cd patch_clone &&
git init &&
echo "$base_objects" >.git/objects/info/alternates &&
echo q >>text &&
git read-tree $B &&
git update-index text &&
git update-ref HEAD $(echo C | git commit-tree $(git write-tree) -p $B) &&
rm .git/objects/info/alternates &&
git --git-dir=../.git cat-file commit $B |
git hash-object -t commit -w --stdin &&
git --git-dir=../.git cat-file tree "$B^{tree}" |
git hash-object -t tree -w --stdin
) &&
C=$(git --git-dir=patch_clone/.git rev-parse HEAD)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5306-pack-nobase/patch_clone/.git/
bf1081814ef5accf304776ac5aeb349a0ffbf26b
f9037bf6e8d95d31af48907ab2c93c2d6c2c7fcd
ok 2 - setup patch_clone
expecting success: (mkdir user_clone &&
cd user_clone &&
git init &&
git pull ../.git &&
test $(git rev-parse HEAD) = $B &&
git pull ../patch_clone/.git &&
test $(git rev-parse HEAD) = $C
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5306-pack-nobase/user_clone/.git/
From ../
* branch HEAD -> FETCH_HEAD
From ../patch_clone/
* branch HEAD -> FETCH_HEAD
Updating bf10818..cb7181b
Fast-forward
text | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
ok 3 - indirectly clone patch_clone
expecting success: (mkdir user_direct &&
cd user_direct &&
git init &&
test_must_fail git fetch ../patch_clone/.git
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5306-pack-nobase/user_direct/.git/
remote: error: Could not read bde3007e41c698f4f64603abb453df58017d896a
remote: fatal: Failed to traverse parents of commit bf1081814ef5accf304776ac5aeb349a0ffbf26b
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: protocol error: bad pack header
ok 4 - clone of patch_clone is incomplete
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5307-pack-missing-commit.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5307-pack-missing-commit/.git/
expecting success:
for i in 1 2 3 4 5
do
echo "$i" >"file$i" &&
git add "file$i" &&
test_tick &&
git commit -m "$i" &&
git tag "tag$i"
done &&
obj=$(git rev-parse --verify tag3) &&
fanout=$(expr "$obj" : "\(..\)") &&
remainder=$(expr "$obj" : "..\(.*\)") &&
rm -f ".git/objects/$fanout/$remainder"
[master (root-commit) f1e5f64] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1
[master 464ac64] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
[master 4b3f9fe] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
[master 4387cd0] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file4
[master 18dfde5] 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file5
ok 1 - setup
expecting success:
test_must_fail git fsck
error: refs/tags/tag3: invalid sha1 pointer 4b3f9fe85f6c3449091baf9783e2641f38efdd8e
error: HEAD: invalid reflog entry 4b3f9fe85f6c3449091baf9783e2641f38efdd8e
error: HEAD: invalid reflog entry 4b3f9fe85f6c3449091baf9783e2641f38efdd8e
error: refs/heads/master: invalid reflog entry 4b3f9fe85f6c3449091baf9783e2641f38efdd8e
error: refs/heads/master: invalid reflog entry 4b3f9fe85f6c3449091baf9783e2641f38efdd8e
broken link from commit 4387cd029ff9d3e6d049717fc055ca04b972bfb8
to commit 4b3f9fe85f6c3449091baf9783e2641f38efdd8e
missing commit 4b3f9fe85f6c3449091baf9783e2641f38efdd8e
dangling tree 5907482de36080ec355b7811e41e23276d5799ba
ok 2 - check corruption
expecting success:
test_must_fail env GIT_TEST_COMMIT_GRAPH=0 git rev-list HEAD
error: Could not read 4b3f9fe85f6c3449091baf9783e2641f38efdd8e
fatal: Failed to traverse parents of commit 4387cd029ff9d3e6d049717fc055ca04b972bfb8
18dfde5380f75061a4c4e203210947d874f34b14
ok 3 - rev-list notices corruption (1)
expecting success:
test_must_fail env GIT_TEST_COMMIT_GRAPH=0 git rev-list --objects HEAD
error: Could not read 4b3f9fe85f6c3449091baf9783e2641f38efdd8e
fatal: Failed to traverse parents of commit 4387cd029ff9d3e6d049717fc055ca04b972bfb8
18dfde5380f75061a4c4e203210947d874f34b14
ok 4 - rev-list notices corruption (2)
expecting success:
echo HEAD |
test_must_fail git pack-objects --revs pack
error: Could not read 4b3f9fe85f6c3449091baf9783e2641f38efdd8e
fatal: Failed to traverse parents of commit 4387cd029ff9d3e6d049717fc055ca04b972bfb8
ok 5 - pack-objects notices corruption
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5308-pack-detect-duplicates.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5308-pack-detect-duplicates/.git/
checking prerequisite: SHA1
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test $(git hash-object /dev/null) = e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
)
prerequisite SHA1 ok
expecting success:
create_pack no-dups.pack 1 &&
git index-pack --stdin <no-dups.pack
pack 2b6334c837f829fc85b8483b099737d46872fcf1
ok 1 - pack with no duplicates
expecting success:
clear_packs &&
create_pack dups.pack 100 &&
git index-pack --stdin <dups.pack
pack 9452d1779e83b02a99c82f7dd97a9ed27464a46e
ok 2 - index-pack will allow duplicate objects by default
expecting success:
cat >input <<-EOF &&
$LO_SHA1
$HI_SHA1
$MISSING_SHA1
EOF
cat >expect <<-EOF
$LO_SHA1 blob 2
$HI_SHA1 blob 0
$MISSING_SHA1 missing
EOF
ok 3 - create batch-check test vectors
expecting success:
git cat-file --batch-check <input >actual &&
test_cmp expect actual
ok 4 - lookup in duplicated pack
expecting success:
clear_packs &&
create_pack dups.pack 2 &&
test_must_fail git index-pack --strict --stdin <dups.pack &&
test_expect_code 1 git cat-file -e $LO_SHA1
fatal: The same object e68fe8129b546b101aee9510c5328e7f21ca1d18 appears twice in the pack
ok 5 - index-pack can reject packs with duplicates
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5309-pack-delta-cycles.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5309-pack-delta-cycles/.git/
checking prerequisite: SHA1
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test $(git hash-object /dev/null) = e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
)
prerequisite SHA1 ok
expecting success:
clear_packs &&
{
pack_header 2 &&
pack_obj $A $B &&
pack_obj $B
} >ab.pack &&
pack_trailer ab.pack &&
git index-pack --stdin <ab.pack &&
git cat-file -t $A &&
git cat-file -t $B
pack 8af524300e46c11647862073e882d467bc0dd22d
blob
blob
ok 1 - index-pack works with a single delta (A->B)
expecting success:
clear_packs &&
{
pack_header 2 &&
pack_obj $A &&
pack_obj $B $A
} >ba.pack &&
pack_trailer ba.pack &&
git index-pack --stdin <ba.pack &&
git cat-file -t $A &&
git cat-file -t $B
pack 80442ca09df79dab1a7b2ac6fc4928bfbeeddc20
blob
blob
ok 2 - index-pack works with a single delta (B->A)
expecting success:
clear_packs &&
{
pack_header 1 &&
pack_obj $A $B
} >missing.pack &&
pack_trailer missing.pack &&
test_must_fail git index-pack --fix-thin --stdin <missing.pack
fatal: pack has 1 unresolved delta
ok 3 - index-pack detects missing base objects
expecting success:
clear_packs &&
{
pack_header 2 &&
pack_obj $A $B &&
pack_obj $B $A
} >cycle.pack &&
pack_trailer cycle.pack &&
test_must_fail git index-pack --fix-thin --stdin <cycle.pack
fatal: pack has 2 unresolved deltas
ok 4 - index-pack detects REF_DELTA cycles
checking known breakage:
clear_packs &&
git index-pack --stdin <ab.pack &&
git index-pack --stdin --fix-thin <cycle.pack
pack 8af524300e46c11647862073e882d467bc0dd22d
BUG: builtin/index-pack.c:1006: child->real_type != OBJ_REF_DELTA
Aborted
not ok 5 - failover to an object in another pack # TODO known breakage
checking known breakage:
clear_packs &&
{
pack_header 3 &&
pack_obj $A $B &&
pack_obj $B $A &&
pack_obj $A
} >recoverable.pack &&
pack_trailer recoverable.pack &&
git index-pack --fix-thin --stdin <recoverable.pack
BUG: builtin/index-pack.c:1006: child->real_type != OBJ_REF_DELTA
Aborted
not ok 6 - failover to a duplicate object in the same pack # TODO known breakage
# still have 2 known breakage(s)
# passed all remaining 4 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5311-pack-bitmaps-shallow.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5311-pack-bitmaps-shallow/.git/
expecting success:
echo 1 >file &&
git add file &&
git commit -m orig &&
echo 2 >file &&
git commit -a -m update &&
git clone --no-local --bare --depth=1 . shallow.git &&
echo 1 >file &&
git commit -a -m repeat
[master (root-commit) 69b6e1c] orig
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 95528f1] update
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Cloning into bare repository 'shallow.git'...
[master e8650ac] repeat
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup shallow repo
expecting success:
git repack -adb
ok 2 - turn on bitmaps in the parent
expecting success:
(cd shallow.git && git fetch)
From /<<PKGBUILDDIR>>/t/trash directory.t5311-pack-bitmaps-shallow/.
* branch HEAD -> FETCH_HEAD
ok 3 - shallow fetch from bitmapped repo
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5302-pack-index.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5302-pack-index/.git/
expecting success: rm -rf .git &&
git init &&
git config pack.threads 1 &&
i=1 &&
while test $i -le 100
do
iii=$(printf %03i $i)
test-tool genrandom "bar" 200 > wide_delta_$iii &&
test-tool genrandom "baz $iii" 50 >> wide_delta_$iii &&
test-tool genrandom "foo"$i 100 > deep_delta_$iii &&
test-tool genrandom "foo"$(expr $i + 1) 100 >> deep_delta_$iii &&
test-tool genrandom "foo"$(expr $i + 2) 100 >> deep_delta_$iii &&
echo $iii >file_$iii &&
test-tool genrandom "$iii" 8192 >>file_$iii &&
git update-index --add file_$iii deep_delta_$iii wide_delta_$iii &&
i=$(expr $i + 1) || return 1
done &&
{ echo 101 && test-tool genrandom 100 8192; } >file_101 &&
git update-index --add file_101 &&
tree=$(git write-tree) &&
commit=$(git commit-tree $tree </dev/null) && {
echo $tree &&
git ls-tree $tree | sed -e "s/.* \\([0-9a-f]*\\) .*/\\1/"
} >obj-list &&
git update-ref HEAD $commit
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5302-pack-index/.git/
ok 1 - setup
expecting success: pack1=$(git pack-objects --index-version=1 test-1 <obj-list) &&
git verify-pack -v "test-1-${pack1}.pack"
4307528f01beff143cd36a903cb8c9a9983a4c27 tree 12036 7200 12
e43b5801e4ac39a512e5d9423fc272cf5c3343f9 blob 300 313 7212
78fcb2fa30f448929fae32736f0fb56733d08746 blob 108 141 7525 1 e43b5801e4ac39a512e5d9423fc272cf5c3343f9
1c547eac61c40965963e85a56c24991ab1a0e3ef blob 108 141 7666 2 78fcb2fa30f448929fae32736f0fb56733d08746
571c7b54485960a9820927983c702eec1b41e91a blob 108 141 7807 3 1c547eac61c40965963e85a56c24991ab1a0e3ef
671d8800ae6936f107d70de2dbec536afb47d89a blob 108 141 7948 4 571c7b54485960a9820927983c702eec1b41e91a
f2377b316d0d92e3c29a2d6dba598ca02fb80e9c blob 108 141 8089 5 671d8800ae6936f107d70de2dbec536afb47d89a
0483297992ed4cd5ab3b5790912b1f03598ea660 blob 108 141 8230 6 f2377b316d0d92e3c29a2d6dba598ca02fb80e9c
1ddb0e1ff0db350df93807fda44ef75358d7ddb0 blob 108 141 8371 7 0483297992ed4cd5ab3b5790912b1f03598ea660
19dec2e189cd33584d2173979aecea01b3c59904 blob 108 141 8512 8 1ddb0e1ff0db350df93807fda44ef75358d7ddb0
2bc95d3b86ed1808b73d84f5c0287a61df979063 blob 108 141 8653 9 19dec2e189cd33584d2173979aecea01b3c59904
b8f11d512203fd0260eb79edd5cfca416ca404cb blob 300 313 8794
ef790963bda7ffd9e3556cf4211492680b34c2bf blob 108 141 9107 1 b8f11d512203fd0260eb79edd5cfca416ca404cb
a854bd2ad779f987395c790d0aa378277a7d3216 blob 108 141 9248 2 ef790963bda7ffd9e3556cf4211492680b34c2bf
b750a0431df80025eff766f0811e6a85e1dbc32a blob 108 141 9389 3 a854bd2ad779f987395c790d0aa378277a7d3216
9e793c3eeb7402e17eafb61928b96648a54a8789 blob 108 141 9530 4 b750a0431df80025eff766f0811e6a85e1dbc32a
35691bb59cfc8e5f0749a3c2df2d236150d7f7d1 blob 108 141 9671 5 9e793c3eeb7402e17eafb61928b96648a54a8789
0df5edef6dcc6452cf814984a4d4ea23a8e41e3c blob 108 141 9812 6 35691bb59cfc8e5f0749a3c2df2d236150d7f7d1
305f923c2d2e1fff9ec067b42443fff88aeebc67 blob 108 141 9953 7 0df5edef6dcc6452cf814984a4d4ea23a8e41e3c
67db08cb82e0053ee51773fbf4bdc50094e03767 blob 108 141 10094 8 305f923c2d2e1fff9ec067b42443fff88aeebc67
61a87ea87b8af074a75d0af78e77f2ed6141922c blob 108 141 10235 9 67db08cb82e0053ee51773fbf4bdc50094e03767
5e69af01a42867f9be8213089efc57c6a1517976 blob 300 313 10376
1280048552e2ee86127654132148d3c2e208b397 blob 108 141 10689 1 5e69af01a42867f9be8213089efc57c6a1517976
ec86b748af33306ff620ebe591da28ed622c1b4d blob 108 141 10830 2 1280048552e2ee86127654132148d3c2e208b397
ce83a0772693235f137100863f4217f9c6398a53 blob 108 141 10971 3 ec86b748af33306ff620ebe591da28ed622c1b4d
ebd5d1af0d246aa4f8e288c539b906eb765d48e1 blob 108 141 11112 4 ce83a0772693235f137100863f4217f9c6398a53
ef99659edf6a12a9320e29453d1e17054863c3d1 blob 108 141 11253 5 ebd5d1af0d246aa4f8e288c539b906eb765d48e1
17dc4d50c25440e569d3c4dabf41bb562c9013fc blob 108 141 11394 6 ef99659edf6a12a9320e29453d1e17054863c3d1
36a0964d29672133cea581290233bae77c3b8cca blob 108 141 11535 7 17dc4d50c25440e569d3c4dabf41bb562c9013fc
60a658626764685c980311c6325263eabdbe0547 blob 108 141 11676 8 36a0964d29672133cea581290233bae77c3b8cca
a7b6688d2a6f15e6f91d1701f64ca7da42a5a73a blob 108 141 11817 9 60a658626764685c980311c6325263eabdbe0547
ef1259b944f1b0c4ade62c049c2ea41daf63ccc7 blob 300 313 11958
612f382c01ffd0ea89c2a840cc683cfd1108628e blob 108 141 12271 1 ef1259b944f1b0c4ade62c049c2ea41daf63ccc7
ba0b924be466e9d85f8ba5563211e570d12d2841 blob 108 141 12412 2 612f382c01ffd0ea89c2a840cc683cfd1108628e
d05e80ce75fe6189e1b08dfc5fb9bf0a1a6e544e blob 108 141 12553 3 ba0b924be466e9d85f8ba5563211e570d12d2841
e80b417ea517c993f906556a00fa8acaceb559b4 blob 108 141 12694 4 d05e80ce75fe6189e1b08dfc5fb9bf0a1a6e544e
8cc2e1974c339c43bd481c205ea0024b54dbcb83 blob 108 141 12835 5 e80b417ea517c993f906556a00fa8acaceb559b4
8e57f0560c1135c5cdaca2c69094489ad6ddcdb0 blob 108 141 12976 6 8cc2e1974c339c43bd481c205ea0024b54dbcb83
416013a155571063a96f1e443ee44a8ac3f09c1b blob 108 141 13117 7 8e57f0560c1135c5cdaca2c69094489ad6ddcdb0
8dc7c392787f4ec7bb28c57bc6744a2b5f3122ed blob 108 141 13258 8 416013a155571063a96f1e443ee44a8ac3f09c1b
beb699952b6a188a54675c11696cb6a2652b5249 blob 108 141 13399 9 8dc7c392787f4ec7bb28c57bc6744a2b5f3122ed
0f66db930e6ce643852ad45eb91dc203575fb5f4 blob 300 313 13540
9a3a619d26a6e19b556d119d760b40a6397a9df4 blob 108 141 13853 1 0f66db930e6ce643852ad45eb91dc203575fb5f4
66336af04f97cfd40474e8aa4cea2e25275b5f94 blob 108 141 13994 2 9a3a619d26a6e19b556d119d760b40a6397a9df4
bf8886056d3abf37690115bfee10bf14ef5e4db9 blob 108 141 14135 3 66336af04f97cfd40474e8aa4cea2e25275b5f94
2c1120aee9298045837641feab263b3655725aa3 blob 108 141 14276 4 bf8886056d3abf37690115bfee10bf14ef5e4db9
f47f0d90220589a45dbccd06c8468eca7c04d70a blob 108 141 14417 5 2c1120aee9298045837641feab263b3655725aa3
add63edc5ce2dd58ff7d66b153f44d03b0d93df2 blob 108 141 14558 6 f47f0d90220589a45dbccd06c8468eca7c04d70a
75642e5399f1b51a33f0c6430af2fd997e4db578 blob 108 141 14699 7 add63edc5ce2dd58ff7d66b153f44d03b0d93df2
64e473488413d66fe6e464b3f09827501eb353fe blob 108 141 14840 8 75642e5399f1b51a33f0c6430af2fd997e4db578
597244daf249731fc922a26acfe6fb9ea3baca7f blob 108 141 14981 9 64e473488413d66fe6e464b3f09827501eb353fe
8d5f6b41255c60ea8f44892b918a38eebe43de6b blob 300 313 15122
c26e8fbe6bd52d34b340f61780b6e3dd3b9bed94 blob 108 141 15435 1 8d5f6b41255c60ea8f44892b918a38eebe43de6b
0246ff570c396c37ff08c0f5f9d88c84fc21a297 blob 108 141 15576 2 c26e8fbe6bd52d34b340f61780b6e3dd3b9bed94
cff9bb4b47c1bc50205d6a793d8d02bee852a229 blob 108 141 15717 3 0246ff570c396c37ff08c0f5f9d88c84fc21a297
2096ec927d087ee1076f1118e8fe48ab21a27bd7 blob 108 141 15858 4 cff9bb4b47c1bc50205d6a793d8d02bee852a229
0ff6b3e6f0b0957b5b05a06d9b4580f0e1798501 blob 108 141 15999 5 2096ec927d087ee1076f1118e8fe48ab21a27bd7
633de7a70fe29cecb721bb5033573fbf175b31fc blob 108 141 16140 6 0ff6b3e6f0b0957b5b05a06d9b4580f0e1798501
76db9ca0f1afa9c247d4c5a2fe60ca95154fd465 blob 108 141 16281 7 633de7a70fe29cecb721bb5033573fbf175b31fc
df4c5c8e8e25621bba74f233d59c76e5810f8677 blob 108 141 16422 8 76db9ca0f1afa9c247d4c5a2fe60ca95154fd465
9fc4cce844af6ed26932eb84045df0ab4a79f0b7 blob 108 141 16563 9 df4c5c8e8e25621bba74f233d59c76e5810f8677
ef3ddda4c2922f10089dfed6436267b445d5b118 blob 300 313 16704
1bdedd473270eef5c2c67c968ba1d5ee081013ee blob 108 141 17017 1 ef3ddda4c2922f10089dfed6436267b445d5b118
9d28c1ea0790ee28b8c35bc3fe88629980708730 blob 108 141 17158 2 1bdedd473270eef5c2c67c968ba1d5ee081013ee
a3264a35996ccaf722f869be8e379864e28ef561 blob 108 141 17299 3 9d28c1ea0790ee28b8c35bc3fe88629980708730
cd6f1b15bb20b9c706f8f80c77b7c210921f0b26 blob 108 141 17440 4 a3264a35996ccaf722f869be8e379864e28ef561
60601746c22df38cc0bcbce68f359fb2796d7569 blob 108 141 17581 5 cd6f1b15bb20b9c706f8f80c77b7c210921f0b26
f15a3f5dae93709cce491d407dad343f9577d8c5 blob 108 141 17722 6 60601746c22df38cc0bcbce68f359fb2796d7569
5dd384bbc7186571a9cccdba2ebaa794e87bfbdd blob 108 141 17863 7 f15a3f5dae93709cce491d407dad343f9577d8c5
d18475904b78554f1fd6f96b4c1ad44e84edf873 blob 108 141 18004 8 5dd384bbc7186571a9cccdba2ebaa794e87bfbdd
67728c76be3b7d5319ff2a93fc78aca0ff3824eb blob 108 141 18145 9 d18475904b78554f1fd6f96b4c1ad44e84edf873
c1ec14f204e244f32aa93c66e3fb6a7d4f58c081 blob 300 313 18286
258424ed6e5c4377a2aa55fb6d4818a3580291ad blob 108 141 18599 1 c1ec14f204e244f32aa93c66e3fb6a7d4f58c081
fcaa7a21cb9d0b0aa84d2cbac5115d7c300739a2 blob 108 141 18740 2 258424ed6e5c4377a2aa55fb6d4818a3580291ad
e1bfca166c2ff676f665fd3c58d7dea896ec48d7 blob 108 141 18881 3 fcaa7a21cb9d0b0aa84d2cbac5115d7c300739a2
383c3c67e93cfd05d272b187e3af5c1e00bcae5c blob 108 141 19022 4 e1bfca166c2ff676f665fd3c58d7dea896ec48d7
ad6a3267a9e0d49014eec133a5e968315e8ce834 blob 108 141 19163 5 383c3c67e93cfd05d272b187e3af5c1e00bcae5c
9dfc592085bb14371890b41e48c98b220420669b blob 108 141 19304 6 ad6a3267a9e0d49014eec133a5e968315e8ce834
c872afc7539f689178b7385010010ca7aef8f09a blob 108 141 19445 7 9dfc592085bb14371890b41e48c98b220420669b
1bc038b18c5039a05e173da2fd2b65b3d34ccd2b blob 108 141 19586 8 c872afc7539f689178b7385010010ca7aef8f09a
bdd7bd883f75c1726538851757168dc0dc33e222 blob 108 141 19727 9 1bc038b18c5039a05e173da2fd2b65b3d34ccd2b
71529d6ca58922aa05603b6f2784f87cad8703cf blob 300 313 19868
2bebfa6240e319a1c31951d05c8135f089fbbd29 blob 108 141 20181 1 71529d6ca58922aa05603b6f2784f87cad8703cf
83fcb919ae7bc9a80912c9bfd5731acd36666480 blob 108 141 20322 2 2bebfa6240e319a1c31951d05c8135f089fbbd29
b97506df40bbd212b52062b851cd88f04abb59b3 blob 108 141 20463 3 83fcb919ae7bc9a80912c9bfd5731acd36666480
298dc4942c3b3db53d484ffa86b451755cd2125f blob 108 141 20604 4 b97506df40bbd212b52062b851cd88f04abb59b3
ba11c807afc9699e7ea1cab791699bfd698c7e7d blob 108 141 20745 5 298dc4942c3b3db53d484ffa86b451755cd2125f
b1281e620292c2e74d8770eb99f0b6871e4cca59 blob 108 141 20886 6 ba11c807afc9699e7ea1cab791699bfd698c7e7d
368cd4d02a420764e0d31b35576f73b777c34604 blob 108 141 21027 7 b1281e620292c2e74d8770eb99f0b6871e4cca59
16d1323e84e3d5b058ab2ac8245db85bc4606c88 blob 108 141 21168 8 368cd4d02a420764e0d31b35576f73b777c34604
711d5e6b0d21b3aa205dcc960ec51475be8a25a5 blob 108 141 21309 9 16d1323e84e3d5b058ab2ac8245db85bc4606c88
d174d532539487c9aedbbaf38d556061b5acf826 blob 300 313 21450
bf5dcb9013df15ff0ae10e0682a92a7688a7720b blob 108 141 21763 1 d174d532539487c9aedbbaf38d556061b5acf826
fb214b786310655bc8ee46d89ca9a04ec9aed0c3 blob 108 141 21904 2 bf5dcb9013df15ff0ae10e0682a92a7688a7720b
b94140f4006d05e7e3822f5db19adc2b73a2cc05 blob 108 141 22045 3 fb214b786310655bc8ee46d89ca9a04ec9aed0c3
4019b50c838197ca4b8d664a4164a183cac8ad11 blob 108 141 22186 4 b94140f4006d05e7e3822f5db19adc2b73a2cc05
2826157afde0e74742115842ac2dddf5c3b5e23e blob 108 141 22327 5 4019b50c838197ca4b8d664a4164a183cac8ad11
99556fcde6a0be62a72c8b0c6682576a1d596bea blob 108 141 22468 6 2826157afde0e74742115842ac2dddf5c3b5e23e
8f5e7974c287b07f1cf8116485c4135340b807f3 blob 108 141 22609 7 99556fcde6a0be62a72c8b0c6682576a1d596bea
f9982291dfe87a9def1b12d24f9ca9a024a9dd8e blob 108 141 22750 8 8f5e7974c287b07f1cf8116485c4135340b807f3
3c5c0be699798d2f4fbe651051b9f17156f133c1 blob 108 141 22891 9 f9982291dfe87a9def1b12d24f9ca9a024a9dd8e
1297547aab30f952af805d38f6f1c1930cb3117b blob 8196 8210 23032
862f6954d9afd549b48fa2ef8e2f8ab96e309916 blob 8196 8210 31242
0471b3b8ab8da19f3968dc238e9555f4e48ce858 blob 8196 8210 39452
c80092496b80b5f21503b8c838dccfc1f2e2ddde blob 8196 8210 47662
e5a12c79cec70d52817054c4b9ef321003c6755f blob 8196 8210 55872
bf96a31446f37d8e57bb38a00797aa3af1f99370 blob 8196 8210 64082
0508b858e01f0367552fb14722388ba48dbd36f7 blob 8196 8210 72292
359017d1534767455090901a260985de1658d752 blob 8196 8210 80502
8d06001a3d38390afa66576caa6c55c796e33835 blob 8196 8210 88712
8162ceb825c07e3b1e17f5775665085da9b1e855 blob 8196 8210 96922
6910c5a645c9fe7f6b728034566b1668f0677a8e blob 8196 8210 105132
09ba511a995b8ea75067036d5c046f39052a3bd8 blob 8196 8210 113342
f45d142313c7a5270a60c664bb463cddadc467c1 blob 8196 8210 121552
964e51bf7d344bda71ea5e12dbd7bfb90120fcf0 blob 8196 8210 129762
408dd031138139f6ac6f402988f960527871f71a blob 8196 8210 137972
912fa0ec5536f31122e34577a4baf3b22d40de2a blob 8196 8210 146182
f02359c44ca04a542cc5bf59aa5f1de6cd1d5a4c blob 8196 8210 154392
b0566dd5d479c80c278bd5455c92aca689328471 blob 8196 8210 162602
49d17d605f042c1e978a68f625be6ab6294fa8fa blob 8196 8210 170812
8f744480abe8ad05bc419d1ab2e375b9c0fa3978 blob 8196 8210 179022
fff3a3a92d2268a464dbdcd00fc055885ee3cba9 blob 8196 8210 187232
f5fc0ff4afc14d9dfcb2580d3f438edd4cd8130a blob 8196 8210 195442
01179d82b18c252824e20e190543e0e84950d820 blob 8196 8210 203652
de3ed457f973b7ffb20edc36002c47a6e4b41066 blob 8196 8210 211862
9c4e1f8c16d04d90a2217279240996276d617067 blob 8196 8210 220072
816f18d19f433f5df9edbfb5547684b519fdeb3b blob 8196 8210 228282
72e7428e5ee3797ca0bf955f723b915bee919c48 blob 8196 8210 236492
41adb5af8e7f9737b16261fb0c224c7550c82f23 blob 8196 8210 244702
94f5d368a7c4ea294c463dc45cf15d387fa83c4e blob 8196 8210 252912
85fdf2eed169dbc1fe2d71439b589b0326dad12b blob 8196 8210 261122
bab18d872e9183c6d450b326477205bb0cc081cb blob 8196 8210 269332
b31fb3fb181512bc608b58cb33323d97ad6eac2f blob 8196 8210 277542
20a9519106ab64bf043456a58b6bfb04f1c7b39d blob 8196 8210 285752
94a015b2b6053f7a1d541969919e879bb2b75eef blob 8196 8210 293962
7353550b9b0e1da4f68b9484dfad2634100a00cc blob 8196 8210 302172
e28a360bcbd69ca1a0bb47834e640069c6672a8d blob 8196 8210 310382
8e6ffc05856460c2e08c8e9d824bbf510d3c1b52 blob 8196 8210 318592
ceade5760b1ba0bc11d4e4db6982ddf671495e58 blob 8196 8210 326802
92534f38b94c1da321d88c9ab5af8c3e804c2507 blob 8196 8210 335012
f5577acbfd83dddf90b2054d6cb5dce2df6d06ee blob 8196 8210 343222
59a27076dc0a8989215a160d61ac401e41c05126 blob 8196 8210 351432
2db6b919f253444b5437d8251e5d101d5a34e1b3 blob 8196 8210 359642
c1c35c36d4300da28c0570746adaf2f5b0b015a3 blob 8196 8210 367852
03a6f56dbbb556425ef8c43c31519b32eb5629a4 blob 8196 8210 376062
dd6209d4c0c5d4f210a8d1bb4a4d314cf284dea9 blob 8196 8210 384272
8c04fa425f4dfb4555b376e73d8f28d56b97a569 blob 8196 8210 392482
614e235cd8ca8af7ccf402a92eb34baadaaa3f18 blob 8196 8210 400692
b2f07ee5771d9e0de7166bc72a4a7ebce9830779 blob 8196 8210 408902
852ba0cf084474c1b0b48052606ae27346a5b1a1 blob 8196 8210 417112
15ff79f644a0596529eba0592017dce39e222b8e blob 8196 8210 425322
75f67c0c230f8923db5831094b1cc67f61bf1734 blob 8196 8210 433532
95b51158cd6365da9b10f1d8b06ba76dc5d5c5f1 blob 8196 8210 441742
5217ce416b26a3d76191d873490110746d0e8a04 blob 8196 8210 449952
c16eb68827fa5d6da73b320b431cf736c7a6a4af blob 8196 8210 458162
57983aab7f7384626a6a1f9ec08fba1902dd11e5 blob 8196 8210 466372
84e4d2ce637781776791c8e2cf4a9312a2783ceb blob 8196 8210 474582
2175a1a9d8757b3836f5cc44c6af0297aea36709 blob 8196 8210 482792
9b655d54faaf0a737a03731852f27cf6b552bcaf blob 8196 8210 491002
a3233ba1323f07a0d68f6020e7209025819cfa13 blob 8196 8210 499212
5a65a213ee0ebdc285c8e8eca24e9eda97f8a384 blob 8196 8210 507422
de1679ebb44d3fe59e8d2378471b56db384fb181 blob 8196 8210 515632
d2e455cc03081911f9ecd81245becd858d1e64ca blob 8196 8210 523842
72826d3e97bc228616e06235566a0db59c94bd74 blob 8196 8210 532052
debe389b3bdd62d96748db592e99cb0cc7b1b0f2 blob 8196 8210 540262
e572e59eee8119f8fb58e8595ecd0c622f2d6e29 blob 8196 8210 548472
197f45d948a36ac3762e5daf6ef4d43a5d969503 blob 8196 8210 556682
fb294d29a9d045d5a46a9c00e53777b394ceb346 blob 8196 8210 564892
10f7133774acbc162f5f79804744d64747eee380 blob 8196 8210 573102
16b9dea85eab6d7e452bdea4889e24a8ad79afd5 blob 8196 8210 581312
08a8cf223e5dc57504da3cd8eb56d33f276dc1b9 blob 8196 8210 589522
e3332ff9a2540b45e599be0c7bca8bbe28af2b43 blob 8196 8210 597732
5e1b961ae623672df764f64b737f332318d43baa blob 8196 8210 605942
14caba1bc2835573f3c20b7f2e5fb638a08e12ee blob 8196 8210 614152
84d1369c26d187b24dffe9029e81e119e4a374f5 blob 8196 8210 622362
5ef3a0f4954ade2d5c290ccc4d791c3b219d89ea blob 8196 8210 630572
610d16151ceb1dc4d5138f63ed410819a8b9161c blob 8196 8210 638782
3545eb1f5549261267ab0577b94372e88b49731d blob 8196 8210 646992
0d6e5c0388744cf82463ce1283ff99e863e9b26e blob 8196 8210 655202
611261b75bd720d3433ea8975d555b1ac3e692bd blob 8196 8210 663412
e25dc2ac80f9f78aa2809b5cd254ce47a51efbe5 blob 8196 8210 671622
ea5a4b4fed0bab7beffd3c7fc6cc549df47017d7 blob 8196 8210 679832
d68756996794df8c00dfcbf520662b14cb06958e blob 8196 8210 688042
b5b44a475116c2d0054edf54c699909d5d583aac blob 8196 8210 696252
99ff18078623c32b85a49cc8a03e3c58ee94eecb blob 8196 8210 704462
159fdc73e63cf90624d128d87b8185154727714e blob 8196 8210 712672
1f0ca97497381a196e53a7639ee769ed019469a3 blob 8196 8210 720882
6dbed45fde708bb67e6b21bd55976483305f9e74 blob 8196 8210 729092
b5ec32ad29b65e5742cd1857d17e92c2efc5da96 blob 8196 8210 737302
cf823d111604e8a014e0702b5e15b242bb961c78 blob 8196 8210 745512
72528baaeeba0d9c01da36a7a0add1ac49d860f2 blob 8196 8210 753722
b976a8fd346486d78cdebeaa0b0ac200befca629 blob 8196 8210 761932
e652cd97e9aae1523d892c1f417274dd26c3bcd3 blob 8196 8210 770142
aa82432626cc08fb818a20aa62b607aa52e7b35d blob 8196 8210 778352
d67069815168092ee0eadeab8177002bd0376b6f blob 8196 8210 786562
fa7ca115eb82e14f0263990362d4fc27591e1143 blob 8196 8210 794772
5cadb04c4d4ec953dffc528bf75561a6ae1c5820 blob 8196 8210 802982
a769ce6dfe1abe1b6162627b2b5df89f4f7d4317 blob 8196 8210 811192
bf265906aab0df90b6a4bdb1fe6f8088a9038435 blob 8196 8210 819402
b302b77fd5595784b5e85e91f8b4314fff49a6a1 blob 8196 8210 827612
3927444e44b49dfa6cdc768298ae879ec298c45d blob 8196 8210 835822
0b968294884af115eb5a1b941b3dabd48470c3bb blob 12 41 844032 1 3927444e44b49dfa6cdc768298ae879ec298c45d
34a68de99f94f6f9e437a288349602768eae4b92 blob 250 263 844073
8517d36660dffb896fb4e283ad110023aaebaf1b blob 57 90 844336 1 34a68de99f94f6f9e437a288349602768eae4b92
e3fc6633c069c8e246d77a408e4747c2852ba44a blob 57 90 844426 1 34a68de99f94f6f9e437a288349602768eae4b92
37a071e55d1f2e07af146ca6017d98dd85beae68 blob 57 90 844516 1 34a68de99f94f6f9e437a288349602768eae4b92
a8179a233b7aeeb7a450c5d321d4b73df936b64b blob 57 90 844606 1 34a68de99f94f6f9e437a288349602768eae4b92
99e0b239888c8b71671fb948e41111876e61a3c2 blob 57 90 844696 1 34a68de99f94f6f9e437a288349602768eae4b92
e26e04b4786bf6b0ec3c5d528e7002cd58e2401b blob 57 90 844786 1 34a68de99f94f6f9e437a288349602768eae4b92
a6106f10ea80724dbc32b328d9892111589a2111 blob 57 90 844876 1 34a68de99f94f6f9e437a288349602768eae4b92
d1669a170780865ccd7645211c2e1cebdfb28aad blob 57 90 844966 1 34a68de99f94f6f9e437a288349602768eae4b92
53a19e0c2c34ef1a4e1bbc9aa1cba4cb9bc2dd80 blob 57 90 845056 1 34a68de99f94f6f9e437a288349602768eae4b92
26ff29a62e7a6359d3975813fd645af871576125 blob 57 90 845146 1 34a68de99f94f6f9e437a288349602768eae4b92
c1d6b9953613f5732cd40d8cffbb2b746a71fb92 blob 57 90 845236 1 34a68de99f94f6f9e437a288349602768eae4b92
a2bfcc19d1592c43af33617500394e1ac09e968c blob 57 90 845326 1 34a68de99f94f6f9e437a288349602768eae4b92
36c0479c58cef0b9a10b56934ed42a862e1dcfe2 blob 57 90 845416 1 34a68de99f94f6f9e437a288349602768eae4b92
642aa265517d66c88f030a2230eb97e77c973905 blob 57 90 845506 1 34a68de99f94f6f9e437a288349602768eae4b92
29cd4721cd3cef7f5a2e032d6c2d6908427cd5af blob 57 90 845596 1 34a68de99f94f6f9e437a288349602768eae4b92
ae5ccb1578fbc399571f4f0132edd18c55b19ef0 blob 57 90 845686 1 34a68de99f94f6f9e437a288349602768eae4b92
d22feecdd32e57af8fd88bda0fbde8fbb96d4f1c blob 57 90 845776 1 34a68de99f94f6f9e437a288349602768eae4b92
ab2acc4bd273e799b56effc7e208a01814432ba5 blob 57 90 845866 1 34a68de99f94f6f9e437a288349602768eae4b92
2d5f83c6857691045da554091b8f2d82477d9baf blob 57 90 845956 1 34a68de99f94f6f9e437a288349602768eae4b92
fac99cd6f9219ee888b9382ee44a3b7932723b12 blob 57 90 846046 1 34a68de99f94f6f9e437a288349602768eae4b92
b32b0ed27f34e4a9d7c4aab24dfa2d6c51b1c2eb blob 57 90 846136 1 34a68de99f94f6f9e437a288349602768eae4b92
a3f38fbdbe8f34acc61f3a325104e739a875a4b6 blob 57 90 846226 1 34a68de99f94f6f9e437a288349602768eae4b92
6bc5c86eeb3dfcc3ca2343e39cc91dec35ddc90b blob 57 90 846316 1 34a68de99f94f6f9e437a288349602768eae4b92
38897be9103dbc6aff7d1ecd15c1dc6c6d18b0a7 blob 57 90 846406 1 34a68de99f94f6f9e437a288349602768eae4b92
69e0b8ef8cda369575b6801c6ed47daf09aa3c62 blob 57 90 846496 1 34a68de99f94f6f9e437a288349602768eae4b92
c3e6c8cf465113a74926f3d5c73a3b400970643c blob 57 90 846586 1 34a68de99f94f6f9e437a288349602768eae4b92
a31a03a60bad0896133e6e52982da2e7e22832ff blob 57 90 846676 1 34a68de99f94f6f9e437a288349602768eae4b92
735fe835bee0cfa2d7ecc2f195c22de3e7b208b3 blob 57 90 846766 1 34a68de99f94f6f9e437a288349602768eae4b92
84705bfd7a24eb59137fdc26c070c4329eee46a7 blob 57 90 846856 1 34a68de99f94f6f9e437a288349602768eae4b92
5090e761c398db8c0b3fe1c0069535c3b7a9a575 blob 57 90 846946 1 34a68de99f94f6f9e437a288349602768eae4b92
c5c8cc3525a17842c2e668d1499c7c2518202a87 blob 57 90 847036 1 34a68de99f94f6f9e437a288349602768eae4b92
441d41902c4ccb987a866663ebbcc729fbcc4072 blob 57 90 847126 1 34a68de99f94f6f9e437a288349602768eae4b92
55bc16727ba8a63a31eabd811cfc740dc423bab6 blob 57 90 847216 1 34a68de99f94f6f9e437a288349602768eae4b92
86c6bd761eacb8a021246263994bf02d1163c7b5 blob 57 90 847306 1 34a68de99f94f6f9e437a288349602768eae4b92
8812057b6f2583732f83db5bac543549cc621783 blob 57 90 847396 1 34a68de99f94f6f9e437a288349602768eae4b92
c8043aaa6a70318be94ef87be98ea2c7de7f23f5 blob 57 90 847486 1 34a68de99f94f6f9e437a288349602768eae4b92
9d48f3c2e700d81fbe46fbccc400bedc8666221a blob 57 90 847576 1 34a68de99f94f6f9e437a288349602768eae4b92
fd68f118bfc99562e08bd153a3f1c604f1ac0124 blob 57 90 847666 1 34a68de99f94f6f9e437a288349602768eae4b92
879bc6e196323012740d55b1e5bbd9937632ecf3 blob 57 90 847756 1 34a68de99f94f6f9e437a288349602768eae4b92
a3ed4b758faeca44e89792c3f1b0536b685d0552 blob 57 90 847846 1 34a68de99f94f6f9e437a288349602768eae4b92
d9dd72f666a9d30dee5cdd894ca365a82e965594 blob 57 90 847936 1 34a68de99f94f6f9e437a288349602768eae4b92
088ddcb945af72c47348b65a63992c71b6b9dbe8 blob 57 90 848026 1 34a68de99f94f6f9e437a288349602768eae4b92
9e7b55d50c530d08c120379e19bb1c1653bb3063 blob 57 90 848116 1 34a68de99f94f6f9e437a288349602768eae4b92
2dfd9df0b22049f88e22ae86e4370155ecb23271 blob 57 90 848206 1 34a68de99f94f6f9e437a288349602768eae4b92
9de2bb387fc8bf63dbc7a68cb22b9e8439896326 blob 57 90 848296 1 34a68de99f94f6f9e437a288349602768eae4b92
a7eacc2c62dfd538c2948cce08cd217cc72a7140 blob 57 90 848386 1 34a68de99f94f6f9e437a288349602768eae4b92
291b2d8c01a9bc50bc4605bc479a183193de2e45 blob 57 90 848476 1 34a68de99f94f6f9e437a288349602768eae4b92
464adf43722b49bca34d8727d70db33c9ec70097 blob 57 90 848566 1 34a68de99f94f6f9e437a288349602768eae4b92
aa6095774c04683081cad47f300324a88ea95f2e blob 57 90 848656 1 34a68de99f94f6f9e437a288349602768eae4b92
896562b116d22c48f8872854123c523b76928061 blob 57 90 848746 1 34a68de99f94f6f9e437a288349602768eae4b92
f01eb69ea9caabb9fe801ef0f1bfdfa4477e0e34 blob 57 90 848836 1 34a68de99f94f6f9e437a288349602768eae4b92
d8603740ffe28d592c9d10ae2d6ec9dd0cf71949 blob 57 90 848926 1 34a68de99f94f6f9e437a288349602768eae4b92
8eb88090ce51c8ce838b12302c761bbf806c3fcc blob 57 90 849016 1 34a68de99f94f6f9e437a288349602768eae4b92
e961d288a95c209fe01ba42f01a18605eb5a85d3 blob 57 90 849106 1 34a68de99f94f6f9e437a288349602768eae4b92
abd14d13fada2545825fdf71c5d4a22ebb60f697 blob 57 90 849196 1 34a68de99f94f6f9e437a288349602768eae4b92
6a54ffedf41f419c66f6cd734a27ec5968f79b5a blob 57 90 849286 1 34a68de99f94f6f9e437a288349602768eae4b92
b6fa6c3c025c4f875c78423ab993a9349cd964c5 blob 57 90 849376 1 34a68de99f94f6f9e437a288349602768eae4b92
088e69e7ab273e35b4f63ecb1b915a3997f13dff blob 57 90 849466 1 34a68de99f94f6f9e437a288349602768eae4b92
609652080c31409406c828cb996e41fa6a286654 blob 57 90 849556 1 34a68de99f94f6f9e437a288349602768eae4b92
90d3d9b65a2f0c939f45a86f65192846e8066e7f blob 57 90 849646 1 34a68de99f94f6f9e437a288349602768eae4b92
05b4f18d9841f7abb271e81accadea31c5416a71 blob 57 90 849736 1 34a68de99f94f6f9e437a288349602768eae4b92
cfdd1e216211554d586bb3be233190457c5f5c0d blob 57 90 849826 1 34a68de99f94f6f9e437a288349602768eae4b92
73375ca0591d6c17f37b9f287a7c19f368fc644f blob 57 90 849916 1 34a68de99f94f6f9e437a288349602768eae4b92
46cd94a7854b7360f8f8a7e637e2575e707f7b04 blob 57 90 850006 1 34a68de99f94f6f9e437a288349602768eae4b92
ec35852188f9e88aa67849934b0c50bd698fafef blob 57 90 850096 1 34a68de99f94f6f9e437a288349602768eae4b92
0106e17481932f5c223fafadc1d26abc6adf40d6 blob 57 90 850186 1 34a68de99f94f6f9e437a288349602768eae4b92
f846f988e45d97ac0163885e65920643f0029922 blob 57 90 850276 1 34a68de99f94f6f9e437a288349602768eae4b92
636d415b097ff0c103e63d09d96aeb07fdad2045 blob 57 90 850366 1 34a68de99f94f6f9e437a288349602768eae4b92
497017bb8901086d3120553a384f3500ceb86f2e blob 57 90 850456 1 34a68de99f94f6f9e437a288349602768eae4b92
c50bc0b26b2336dbe90b9c7bdaa8d4cfb8f65638 blob 57 90 850546 1 34a68de99f94f6f9e437a288349602768eae4b92
921538e73389e99e294938d8580ababdb639f140 blob 57 90 850636 1 34a68de99f94f6f9e437a288349602768eae4b92
9ede1b01ec1751bf9ca9d5845ac005edc6935601 blob 57 90 850726 1 34a68de99f94f6f9e437a288349602768eae4b92
1ba5df91f11a1011f4788bc4cc067743828dda41 blob 57 90 850816 1 34a68de99f94f6f9e437a288349602768eae4b92
188728c24ca8cf687133dd0a5782e8819cee10a6 blob 57 90 850906 1 34a68de99f94f6f9e437a288349602768eae4b92
cb0d0270d7c50e33aacd9a4247333622c62846a4 blob 57 90 850996 1 34a68de99f94f6f9e437a288349602768eae4b92
dd39f8544a79066c925baca19ddc02623970efd1 blob 57 90 851086 1 34a68de99f94f6f9e437a288349602768eae4b92
d0b35a20e2ffaa46d895d6296f555dd98956d536 blob 57 90 851176 1 34a68de99f94f6f9e437a288349602768eae4b92
ae274e8cd31f35d743e68b3c8420e604386fc514 blob 57 90 851266 1 34a68de99f94f6f9e437a288349602768eae4b92
d1ede5db04b30c10d395c13dec020c90320498b8 blob 57 90 851356 1 34a68de99f94f6f9e437a288349602768eae4b92
2adace6c3082b12f42112482372696d66c36e4ae blob 57 90 851446 1 34a68de99f94f6f9e437a288349602768eae4b92
035e7e54cee9eb197af435b6b6dcced489c233f6 blob 57 90 851536 1 34a68de99f94f6f9e437a288349602768eae4b92
74aced6a3316fd8d726932ed908b035cd33afef6 blob 57 90 851626 1 34a68de99f94f6f9e437a288349602768eae4b92
efbbfa01b16e997301bb440aad9c885321bb13d2 blob 57 90 851716 1 34a68de99f94f6f9e437a288349602768eae4b92
92433746fe3340a5d4bc3f5487545f5167eaeaad blob 57 90 851806 1 34a68de99f94f6f9e437a288349602768eae4b92
da7b351a2560fd44fe89fc6288c3efa72eace9eb blob 57 90 851896 1 34a68de99f94f6f9e437a288349602768eae4b92
63176d3a0ae88aee86fa1b2b4390ed0850e67a9b blob 57 90 851986 1 34a68de99f94f6f9e437a288349602768eae4b92
5e10cf16f2bf33110cf59f53d583527d676820e1 blob 57 90 852076 1 34a68de99f94f6f9e437a288349602768eae4b92
aeb87caeb18972ad237d4c5628bfedb2dca51d47 blob 57 90 852166 1 34a68de99f94f6f9e437a288349602768eae4b92
141df301ab1d7f9e40b90fb4435ec4ac40ae544d blob 57 90 852256 1 34a68de99f94f6f9e437a288349602768eae4b92
e7172196f3fd2742cbe382daa02fd9641b9f6ffb blob 57 90 852346 1 34a68de99f94f6f9e437a288349602768eae4b92
4e78d6c905bc6d0c06ad066400f0570a391f9385 blob 57 90 852436 1 34a68de99f94f6f9e437a288349602768eae4b92
c096ccf827c047c3a20cfb1dd3fd5b0485ec2a0b blob 57 90 852526 1 34a68de99f94f6f9e437a288349602768eae4b92
91c4bc3b3c200535d88f76e9e3566658cb7b2bfd blob 57 90 852616 1 34a68de99f94f6f9e437a288349602768eae4b92
0b7888c3e508fe256fe859ba46c77d100abbce3f blob 57 90 852706 1 34a68de99f94f6f9e437a288349602768eae4b92
36cfe418f3038689cd47b64845c6f24886f9ec73 blob 57 90 852796 1 34a68de99f94f6f9e437a288349602768eae4b92
54c9d6ab199e99bdbba483ef1287e0cc31fc84b3 blob 57 90 852886 1 34a68de99f94f6f9e437a288349602768eae4b92
8b64b7aafc16c177bcc58813c7a853f622feb10f blob 57 90 852976 1 34a68de99f94f6f9e437a288349602768eae4b92
6ff2ccef89b04f0539f51c0ffcbe5f7bcf108ced blob 57 90 853066 1 34a68de99f94f6f9e437a288349602768eae4b92
7b419ded53760b5dbe136c1ec83ef3f338fab544 blob 57 90 853156 1 34a68de99f94f6f9e437a288349602768eae4b92
non delta: 112 objects
chain length = 1: 110 objects
chain length = 2: 10 objects
chain length = 3: 10 objects
chain length = 4: 10 objects
chain length = 5: 10 objects
chain length = 6: 10 objects
chain length = 7: 10 objects
chain length = 8: 10 objects
chain length = 9: 10 objects
test-1-1c54d893dd9bf6645ecee2886ea72f2c2030bea1.pack: ok
ok 2 - pack-objects with index version 1
expecting success: pack2=$(git pack-objects --index-version=2 test-2 <obj-list) &&
git verify-pack -v "test-2-${pack2}.pack"
4307528f01beff143cd36a903cb8c9a9983a4c27 tree 12036 7200 12
e43b5801e4ac39a512e5d9423fc272cf5c3343f9 blob 300 313 7212
78fcb2fa30f448929fae32736f0fb56733d08746 blob 108 141 7525 1 e43b5801e4ac39a512e5d9423fc272cf5c3343f9
1c547eac61c40965963e85a56c24991ab1a0e3ef blob 108 141 7666 2 78fcb2fa30f448929fae32736f0fb56733d08746
571c7b54485960a9820927983c702eec1b41e91a blob 108 141 7807 3 1c547eac61c40965963e85a56c24991ab1a0e3ef
671d8800ae6936f107d70de2dbec536afb47d89a blob 108 141 7948 4 571c7b54485960a9820927983c702eec1b41e91a
f2377b316d0d92e3c29a2d6dba598ca02fb80e9c blob 108 141 8089 5 671d8800ae6936f107d70de2dbec536afb47d89a
0483297992ed4cd5ab3b5790912b1f03598ea660 blob 108 141 8230 6 f2377b316d0d92e3c29a2d6dba598ca02fb80e9c
1ddb0e1ff0db350df93807fda44ef75358d7ddb0 blob 108 141 8371 7 0483297992ed4cd5ab3b5790912b1f03598ea660
19dec2e189cd33584d2173979aecea01b3c59904 blob 108 141 8512 8 1ddb0e1ff0db350df93807fda44ef75358d7ddb0
2bc95d3b86ed1808b73d84f5c0287a61df979063 blob 108 141 8653 9 19dec2e189cd33584d2173979aecea01b3c59904
b8f11d512203fd0260eb79edd5cfca416ca404cb blob 300 313 8794
ef790963bda7ffd9e3556cf4211492680b34c2bf blob 108 141 9107 1 b8f11d512203fd0260eb79edd5cfca416ca404cb
a854bd2ad779f987395c790d0aa378277a7d3216 blob 108 141 9248 2 ef790963bda7ffd9e3556cf4211492680b34c2bf
b750a0431df80025eff766f0811e6a85e1dbc32a blob 108 141 9389 3 a854bd2ad779f987395c790d0aa378277a7d3216
9e793c3eeb7402e17eafb61928b96648a54a8789 blob 108 141 9530 4 b750a0431df80025eff766f0811e6a85e1dbc32a
35691bb59cfc8e5f0749a3c2df2d236150d7f7d1 blob 108 141 9671 5 9e793c3eeb7402e17eafb61928b96648a54a8789
0df5edef6dcc6452cf814984a4d4ea23a8e41e3c blob 108 141 9812 6 35691bb59cfc8e5f0749a3c2df2d236150d7f7d1
305f923c2d2e1fff9ec067b42443fff88aeebc67 blob 108 141 9953 7 0df5edef6dcc6452cf814984a4d4ea23a8e41e3c
67db08cb82e0053ee51773fbf4bdc50094e03767 blob 108 141 10094 8 305f923c2d2e1fff9ec067b42443fff88aeebc67
61a87ea87b8af074a75d0af78e77f2ed6141922c blob 108 141 10235 9 67db08cb82e0053ee51773fbf4bdc50094e03767
5e69af01a42867f9be8213089efc57c6a1517976 blob 300 313 10376
1280048552e2ee86127654132148d3c2e208b397 blob 108 141 10689 1 5e69af01a42867f9be8213089efc57c6a1517976
ec86b748af33306ff620ebe591da28ed622c1b4d blob 108 141 10830 2 1280048552e2ee86127654132148d3c2e208b397
ce83a0772693235f137100863f4217f9c6398a53 blob 108 141 10971 3 ec86b748af33306ff620ebe591da28ed622c1b4d
ebd5d1af0d246aa4f8e288c539b906eb765d48e1 blob 108 141 11112 4 ce83a0772693235f137100863f4217f9c6398a53
ef99659edf6a12a9320e29453d1e17054863c3d1 blob 108 141 11253 5 ebd5d1af0d246aa4f8e288c539b906eb765d48e1
17dc4d50c25440e569d3c4dabf41bb562c9013fc blob 108 141 11394 6 ef99659edf6a12a9320e29453d1e17054863c3d1
36a0964d29672133cea581290233bae77c3b8cca blob 108 141 11535 7 17dc4d50c25440e569d3c4dabf41bb562c9013fc
60a658626764685c980311c6325263eabdbe0547 blob 108 141 11676 8 36a0964d29672133cea581290233bae77c3b8cca
a7b6688d2a6f15e6f91d1701f64ca7da42a5a73a blob 108 141 11817 9 60a658626764685c980311c6325263eabdbe0547
ef1259b944f1b0c4ade62c049c2ea41daf63ccc7 blob 300 313 11958
612f382c01ffd0ea89c2a840cc683cfd1108628e blob 108 141 12271 1 ef1259b944f1b0c4ade62c049c2ea41daf63ccc7
ba0b924be466e9d85f8ba5563211e570d12d2841 blob 108 141 12412 2 612f382c01ffd0ea89c2a840cc683cfd1108628e
d05e80ce75fe6189e1b08dfc5fb9bf0a1a6e544e blob 108 141 12553 3 ba0b924be466e9d85f8ba5563211e570d12d2841
e80b417ea517c993f906556a00fa8acaceb559b4 blob 108 141 12694 4 d05e80ce75fe6189e1b08dfc5fb9bf0a1a6e544e
8cc2e1974c339c43bd481c205ea0024b54dbcb83 blob 108 141 12835 5 e80b417ea517c993f906556a00fa8acaceb559b4
8e57f0560c1135c5cdaca2c69094489ad6ddcdb0 blob 108 141 12976 6 8cc2e1974c339c43bd481c205ea0024b54dbcb83
416013a155571063a96f1e443ee44a8ac3f09c1b blob 108 141 13117 7 8e57f0560c1135c5cdaca2c69094489ad6ddcdb0
8dc7c392787f4ec7bb28c57bc6744a2b5f3122ed blob 108 141 13258 8 416013a155571063a96f1e443ee44a8ac3f09c1b
beb699952b6a188a54675c11696cb6a2652b5249 blob 108 141 13399 9 8dc7c392787f4ec7bb28c57bc6744a2b5f3122ed
0f66db930e6ce643852ad45eb91dc203575fb5f4 blob 300 313 13540
9a3a619d26a6e19b556d119d760b40a6397a9df4 blob 108 141 13853 1 0f66db930e6ce643852ad45eb91dc203575fb5f4
66336af04f97cfd40474e8aa4cea2e25275b5f94 blob 108 141 13994 2 9a3a619d26a6e19b556d119d760b40a6397a9df4
bf8886056d3abf37690115bfee10bf14ef5e4db9 blob 108 141 14135 3 66336af04f97cfd40474e8aa4cea2e25275b5f94
2c1120aee9298045837641feab263b3655725aa3 blob 108 141 14276 4 bf8886056d3abf37690115bfee10bf14ef5e4db9
f47f0d90220589a45dbccd06c8468eca7c04d70a blob 108 141 14417 5 2c1120aee9298045837641feab263b3655725aa3
add63edc5ce2dd58ff7d66b153f44d03b0d93df2 blob 108 141 14558 6 f47f0d90220589a45dbccd06c8468eca7c04d70a
75642e5399f1b51a33f0c6430af2fd997e4db578 blob 108 141 14699 7 add63edc5ce2dd58ff7d66b153f44d03b0d93df2
64e473488413d66fe6e464b3f09827501eb353fe blob 108 141 14840 8 75642e5399f1b51a33f0c6430af2fd997e4db578
597244daf249731fc922a26acfe6fb9ea3baca7f blob 108 141 14981 9 64e473488413d66fe6e464b3f09827501eb353fe
8d5f6b41255c60ea8f44892b918a38eebe43de6b blob 300 313 15122
c26e8fbe6bd52d34b340f61780b6e3dd3b9bed94 blob 108 141 15435 1 8d5f6b41255c60ea8f44892b918a38eebe43de6b
0246ff570c396c37ff08c0f5f9d88c84fc21a297 blob 108 141 15576 2 c26e8fbe6bd52d34b340f61780b6e3dd3b9bed94
cff9bb4b47c1bc50205d6a793d8d02bee852a229 blob 108 141 15717 3 0246ff570c396c37ff08c0f5f9d88c84fc21a297
2096ec927d087ee1076f1118e8fe48ab21a27bd7 blob 108 141 15858 4 cff9bb4b47c1bc50205d6a793d8d02bee852a229
0ff6b3e6f0b0957b5b05a06d9b4580f0e1798501 blob 108 141 15999 5 2096ec927d087ee1076f1118e8fe48ab21a27bd7
633de7a70fe29cecb721bb5033573fbf175b31fc blob 108 141 16140 6 0ff6b3e6f0b0957b5b05a06d9b4580f0e1798501
76db9ca0f1afa9c247d4c5a2fe60ca95154fd465 blob 108 141 16281 7 633de7a70fe29cecb721bb5033573fbf175b31fc
df4c5c8e8e25621bba74f233d59c76e5810f8677 blob 108 141 16422 8 76db9ca0f1afa9c247d4c5a2fe60ca95154fd465
9fc4cce844af6ed26932eb84045df0ab4a79f0b7 blob 108 141 16563 9 df4c5c8e8e25621bba74f233d59c76e5810f8677
ef3ddda4c2922f10089dfed6436267b445d5b118 blob 300 313 16704
1bdedd473270eef5c2c67c968ba1d5ee081013ee blob 108 141 17017 1 ef3ddda4c2922f10089dfed6436267b445d5b118
9d28c1ea0790ee28b8c35bc3fe88629980708730 blob 108 141 17158 2 1bdedd473270eef5c2c67c968ba1d5ee081013ee
a3264a35996ccaf722f869be8e379864e28ef561 blob 108 141 17299 3 9d28c1ea0790ee28b8c35bc3fe88629980708730
cd6f1b15bb20b9c706f8f80c77b7c210921f0b26 blob 108 141 17440 4 a3264a35996ccaf722f869be8e379864e28ef561
60601746c22df38cc0bcbce68f359fb2796d7569 blob 108 141 17581 5 cd6f1b15bb20b9c706f8f80c77b7c210921f0b26
f15a3f5dae93709cce491d407dad343f9577d8c5 blob 108 141 17722 6 60601746c22df38cc0bcbce68f359fb2796d7569
5dd384bbc7186571a9cccdba2ebaa794e87bfbdd blob 108 141 17863 7 f15a3f5dae93709cce491d407dad343f9577d8c5
d18475904b78554f1fd6f96b4c1ad44e84edf873 blob 108 141 18004 8 5dd384bbc7186571a9cccdba2ebaa794e87bfbdd
67728c76be3b7d5319ff2a93fc78aca0ff3824eb blob 108 141 18145 9 d18475904b78554f1fd6f96b4c1ad44e84edf873
c1ec14f204e244f32aa93c66e3fb6a7d4f58c081 blob 300 313 18286
258424ed6e5c4377a2aa55fb6d4818a3580291ad blob 108 141 18599 1 c1ec14f204e244f32aa93c66e3fb6a7d4f58c081
fcaa7a21cb9d0b0aa84d2cbac5115d7c300739a2 blob 108 141 18740 2 258424ed6e5c4377a2aa55fb6d4818a3580291ad
e1bfca166c2ff676f665fd3c58d7dea896ec48d7 blob 108 141 18881 3 fcaa7a21cb9d0b0aa84d2cbac5115d7c300739a2
383c3c67e93cfd05d272b187e3af5c1e00bcae5c blob 108 141 19022 4 e1bfca166c2ff676f665fd3c58d7dea896ec48d7
ad6a3267a9e0d49014eec133a5e968315e8ce834 blob 108 141 19163 5 383c3c67e93cfd05d272b187e3af5c1e00bcae5c
9dfc592085bb14371890b41e48c98b220420669b blob 108 141 19304 6 ad6a3267a9e0d49014eec133a5e968315e8ce834
c872afc7539f689178b7385010010ca7aef8f09a blob 108 141 19445 7 9dfc592085bb14371890b41e48c98b220420669b
1bc038b18c5039a05e173da2fd2b65b3d34ccd2b blob 108 141 19586 8 c872afc7539f689178b7385010010ca7aef8f09a
bdd7bd883f75c1726538851757168dc0dc33e222 blob 108 141 19727 9 1bc038b18c5039a05e173da2fd2b65b3d34ccd2b
71529d6ca58922aa05603b6f2784f87cad8703cf blob 300 313 19868
2bebfa6240e319a1c31951d05c8135f089fbbd29 blob 108 141 20181 1 71529d6ca58922aa05603b6f2784f87cad8703cf
83fcb919ae7bc9a80912c9bfd5731acd36666480 blob 108 141 20322 2 2bebfa6240e319a1c31951d05c8135f089fbbd29
b97506df40bbd212b52062b851cd88f04abb59b3 blob 108 141 20463 3 83fcb919ae7bc9a80912c9bfd5731acd36666480
298dc4942c3b3db53d484ffa86b451755cd2125f blob 108 141 20604 4 b97506df40bbd212b52062b851cd88f04abb59b3
ba11c807afc9699e7ea1cab791699bfd698c7e7d blob 108 141 20745 5 298dc4942c3b3db53d484ffa86b451755cd2125f
b1281e620292c2e74d8770eb99f0b6871e4cca59 blob 108 141 20886 6 ba11c807afc9699e7ea1cab791699bfd698c7e7d
368cd4d02a420764e0d31b35576f73b777c34604 blob 108 141 21027 7 b1281e620292c2e74d8770eb99f0b6871e4cca59
16d1323e84e3d5b058ab2ac8245db85bc4606c88 blob 108 141 21168 8 368cd4d02a420764e0d31b35576f73b777c34604
711d5e6b0d21b3aa205dcc960ec51475be8a25a5 blob 108 141 21309 9 16d1323e84e3d5b058ab2ac8245db85bc4606c88
d174d532539487c9aedbbaf38d556061b5acf826 blob 300 313 21450
bf5dcb9013df15ff0ae10e0682a92a7688a7720b blob 108 141 21763 1 d174d532539487c9aedbbaf38d556061b5acf826
fb214b786310655bc8ee46d89ca9a04ec9aed0c3 blob 108 141 21904 2 bf5dcb9013df15ff0ae10e0682a92a7688a7720b
b94140f4006d05e7e3822f5db19adc2b73a2cc05 blob 108 141 22045 3 fb214b786310655bc8ee46d89ca9a04ec9aed0c3
4019b50c838197ca4b8d664a4164a183cac8ad11 blob 108 141 22186 4 b94140f4006d05e7e3822f5db19adc2b73a2cc05
2826157afde0e74742115842ac2dddf5c3b5e23e blob 108 141 22327 5 4019b50c838197ca4b8d664a4164a183cac8ad11
99556fcde6a0be62a72c8b0c6682576a1d596bea blob 108 141 22468 6 2826157afde0e74742115842ac2dddf5c3b5e23e
8f5e7974c287b07f1cf8116485c4135340b807f3 blob 108 141 22609 7 99556fcde6a0be62a72c8b0c6682576a1d596bea
f9982291dfe87a9def1b12d24f9ca9a024a9dd8e blob 108 141 22750 8 8f5e7974c287b07f1cf8116485c4135340b807f3
3c5c0be699798d2f4fbe651051b9f17156f133c1 blob 108 141 22891 9 f9982291dfe87a9def1b12d24f9ca9a024a9dd8e
1297547aab30f952af805d38f6f1c1930cb3117b blob 8196 8210 23032
862f6954d9afd549b48fa2ef8e2f8ab96e309916 blob 8196 8210 31242
0471b3b8ab8da19f3968dc238e9555f4e48ce858 blob 8196 8210 39452
c80092496b80b5f21503b8c838dccfc1f2e2ddde blob 8196 8210 47662
e5a12c79cec70d52817054c4b9ef321003c6755f blob 8196 8210 55872
bf96a31446f37d8e57bb38a00797aa3af1f99370 blob 8196 8210 64082
0508b858e01f0367552fb14722388ba48dbd36f7 blob 8196 8210 72292
359017d1534767455090901a260985de1658d752 blob 8196 8210 80502
8d06001a3d38390afa66576caa6c55c796e33835 blob 8196 8210 88712
8162ceb825c07e3b1e17f5775665085da9b1e855 blob 8196 8210 96922
6910c5a645c9fe7f6b728034566b1668f0677a8e blob 8196 8210 105132
09ba511a995b8ea75067036d5c046f39052a3bd8 blob 8196 8210 113342
f45d142313c7a5270a60c664bb463cddadc467c1 blob 8196 8210 121552
964e51bf7d344bda71ea5e12dbd7bfb90120fcf0 blob 8196 8210 129762
408dd031138139f6ac6f402988f960527871f71a blob 8196 8210 137972
912fa0ec5536f31122e34577a4baf3b22d40de2a blob 8196 8210 146182
f02359c44ca04a542cc5bf59aa5f1de6cd1d5a4c blob 8196 8210 154392
b0566dd5d479c80c278bd5455c92aca689328471 blob 8196 8210 162602
49d17d605f042c1e978a68f625be6ab6294fa8fa blob 8196 8210 170812
8f744480abe8ad05bc419d1ab2e375b9c0fa3978 blob 8196 8210 179022
fff3a3a92d2268a464dbdcd00fc055885ee3cba9 blob 8196 8210 187232
f5fc0ff4afc14d9dfcb2580d3f438edd4cd8130a blob 8196 8210 195442
01179d82b18c252824e20e190543e0e84950d820 blob 8196 8210 203652
de3ed457f973b7ffb20edc36002c47a6e4b41066 blob 8196 8210 211862
9c4e1f8c16d04d90a2217279240996276d617067 blob 8196 8210 220072
816f18d19f433f5df9edbfb5547684b519fdeb3b blob 8196 8210 228282
72e7428e5ee3797ca0bf955f723b915bee919c48 blob 8196 8210 236492
41adb5af8e7f9737b16261fb0c224c7550c82f23 blob 8196 8210 244702
94f5d368a7c4ea294c463dc45cf15d387fa83c4e blob 8196 8210 252912
85fdf2eed169dbc1fe2d71439b589b0326dad12b blob 8196 8210 261122
bab18d872e9183c6d450b326477205bb0cc081cb blob 8196 8210 269332
b31fb3fb181512bc608b58cb33323d97ad6eac2f blob 8196 8210 277542
20a9519106ab64bf043456a58b6bfb04f1c7b39d blob 8196 8210 285752
94a015b2b6053f7a1d541969919e879bb2b75eef blob 8196 8210 293962
7353550b9b0e1da4f68b9484dfad2634100a00cc blob 8196 8210 302172
e28a360bcbd69ca1a0bb47834e640069c6672a8d blob 8196 8210 310382
8e6ffc05856460c2e08c8e9d824bbf510d3c1b52 blob 8196 8210 318592
ceade5760b1ba0bc11d4e4db6982ddf671495e58 blob 8196 8210 326802
92534f38b94c1da321d88c9ab5af8c3e804c2507 blob 8196 8210 335012
f5577acbfd83dddf90b2054d6cb5dce2df6d06ee blob 8196 8210 343222
59a27076dc0a8989215a160d61ac401e41c05126 blob 8196 8210 351432
2db6b919f253444b5437d8251e5d101d5a34e1b3 blob 8196 8210 359642
c1c35c36d4300da28c0570746adaf2f5b0b015a3 blob 8196 8210 367852
03a6f56dbbb556425ef8c43c31519b32eb5629a4 blob 8196 8210 376062
dd6209d4c0c5d4f210a8d1bb4a4d314cf284dea9 blob 8196 8210 384272
8c04fa425f4dfb4555b376e73d8f28d56b97a569 blob 8196 8210 392482
614e235cd8ca8af7ccf402a92eb34baadaaa3f18 blob 8196 8210 400692
b2f07ee5771d9e0de7166bc72a4a7ebce9830779 blob 8196 8210 408902
852ba0cf084474c1b0b48052606ae27346a5b1a1 blob 8196 8210 417112
15ff79f644a0596529eba0592017dce39e222b8e blob 8196 8210 425322
75f67c0c230f8923db5831094b1cc67f61bf1734 blob 8196 8210 433532
95b51158cd6365da9b10f1d8b06ba76dc5d5c5f1 blob 8196 8210 441742
5217ce416b26a3d76191d873490110746d0e8a04 blob 8196 8210 449952
c16eb68827fa5d6da73b320b431cf736c7a6a4af blob 8196 8210 458162
57983aab7f7384626a6a1f9ec08fba1902dd11e5 blob 8196 8210 466372
84e4d2ce637781776791c8e2cf4a9312a2783ceb blob 8196 8210 474582
2175a1a9d8757b3836f5cc44c6af0297aea36709 blob 8196 8210 482792
9b655d54faaf0a737a03731852f27cf6b552bcaf blob 8196 8210 491002
a3233ba1323f07a0d68f6020e7209025819cfa13 blob 8196 8210 499212
5a65a213ee0ebdc285c8e8eca24e9eda97f8a384 blob 8196 8210 507422
de1679ebb44d3fe59e8d2378471b56db384fb181 blob 8196 8210 515632
d2e455cc03081911f9ecd81245becd858d1e64ca blob 8196 8210 523842
72826d3e97bc228616e06235566a0db59c94bd74 blob 8196 8210 532052
debe389b3bdd62d96748db592e99cb0cc7b1b0f2 blob 8196 8210 540262
e572e59eee8119f8fb58e8595ecd0c622f2d6e29 blob 8196 8210 548472
197f45d948a36ac3762e5daf6ef4d43a5d969503 blob 8196 8210 556682
fb294d29a9d045d5a46a9c00e53777b394ceb346 blob 8196 8210 564892
10f7133774acbc162f5f79804744d64747eee380 blob 8196 8210 573102
16b9dea85eab6d7e452bdea4889e24a8ad79afd5 blob 8196 8210 581312
08a8cf223e5dc57504da3cd8eb56d33f276dc1b9 blob 8196 8210 589522
e3332ff9a2540b45e599be0c7bca8bbe28af2b43 blob 8196 8210 597732
5e1b961ae623672df764f64b737f332318d43baa blob 8196 8210 605942
14caba1bc2835573f3c20b7f2e5fb638a08e12ee blob 8196 8210 614152
84d1369c26d187b24dffe9029e81e119e4a374f5 blob 8196 8210 622362
5ef3a0f4954ade2d5c290ccc4d791c3b219d89ea blob 8196 8210 630572
610d16151ceb1dc4d5138f63ed410819a8b9161c blob 8196 8210 638782
3545eb1f5549261267ab0577b94372e88b49731d blob 8196 8210 646992
0d6e5c0388744cf82463ce1283ff99e863e9b26e blob 8196 8210 655202
611261b75bd720d3433ea8975d555b1ac3e692bd blob 8196 8210 663412
e25dc2ac80f9f78aa2809b5cd254ce47a51efbe5 blob 8196 8210 671622
ea5a4b4fed0bab7beffd3c7fc6cc549df47017d7 blob 8196 8210 679832
d68756996794df8c00dfcbf520662b14cb06958e blob 8196 8210 688042
b5b44a475116c2d0054edf54c699909d5d583aac blob 8196 8210 696252
99ff18078623c32b85a49cc8a03e3c58ee94eecb blob 8196 8210 704462
159fdc73e63cf90624d128d87b8185154727714e blob 8196 8210 712672
1f0ca97497381a196e53a7639ee769ed019469a3 blob 8196 8210 720882
6dbed45fde708bb67e6b21bd55976483305f9e74 blob 8196 8210 729092
b5ec32ad29b65e5742cd1857d17e92c2efc5da96 blob 8196 8210 737302
cf823d111604e8a014e0702b5e15b242bb961c78 blob 8196 8210 745512
72528baaeeba0d9c01da36a7a0add1ac49d860f2 blob 8196 8210 753722
b976a8fd346486d78cdebeaa0b0ac200befca629 blob 8196 8210 761932
e652cd97e9aae1523d892c1f417274dd26c3bcd3 blob 8196 8210 770142
aa82432626cc08fb818a20aa62b607aa52e7b35d blob 8196 8210 778352
d67069815168092ee0eadeab8177002bd0376b6f blob 8196 8210 786562
fa7ca115eb82e14f0263990362d4fc27591e1143 blob 8196 8210 794772
5cadb04c4d4ec953dffc528bf75561a6ae1c5820 blob 8196 8210 802982
a769ce6dfe1abe1b6162627b2b5df89f4f7d4317 blob 8196 8210 811192
bf265906aab0df90b6a4bdb1fe6f8088a9038435 blob 8196 8210 819402
b302b77fd5595784b5e85e91f8b4314fff49a6a1 blob 8196 8210 827612
3927444e44b49dfa6cdc768298ae879ec298c45d blob 8196 8210 835822
0b968294884af115eb5a1b941b3dabd48470c3bb blob 12 41 844032 1 3927444e44b49dfa6cdc768298ae879ec298c45d
34a68de99f94f6f9e437a288349602768eae4b92 blob 250 263 844073
8517d36660dffb896fb4e283ad110023aaebaf1b blob 57 90 844336 1 34a68de99f94f6f9e437a288349602768eae4b92
e3fc6633c069c8e246d77a408e4747c2852ba44a blob 57 90 844426 1 34a68de99f94f6f9e437a288349602768eae4b92
37a071e55d1f2e07af146ca6017d98dd85beae68 blob 57 90 844516 1 34a68de99f94f6f9e437a288349602768eae4b92
a8179a233b7aeeb7a450c5d321d4b73df936b64b blob 57 90 844606 1 34a68de99f94f6f9e437a288349602768eae4b92
99e0b239888c8b71671fb948e41111876e61a3c2 blob 57 90 844696 1 34a68de99f94f6f9e437a288349602768eae4b92
e26e04b4786bf6b0ec3c5d528e7002cd58e2401b blob 57 90 844786 1 34a68de99f94f6f9e437a288349602768eae4b92
a6106f10ea80724dbc32b328d9892111589a2111 blob 57 90 844876 1 34a68de99f94f6f9e437a288349602768eae4b92
d1669a170780865ccd7645211c2e1cebdfb28aad blob 57 90 844966 1 34a68de99f94f6f9e437a288349602768eae4b92
53a19e0c2c34ef1a4e1bbc9aa1cba4cb9bc2dd80 blob 57 90 845056 1 34a68de99f94f6f9e437a288349602768eae4b92
26ff29a62e7a6359d3975813fd645af871576125 blob 57 90 845146 1 34a68de99f94f6f9e437a288349602768eae4b92
c1d6b9953613f5732cd40d8cffbb2b746a71fb92 blob 57 90 845236 1 34a68de99f94f6f9e437a288349602768eae4b92
a2bfcc19d1592c43af33617500394e1ac09e968c blob 57 90 845326 1 34a68de99f94f6f9e437a288349602768eae4b92
36c0479c58cef0b9a10b56934ed42a862e1dcfe2 blob 57 90 845416 1 34a68de99f94f6f9e437a288349602768eae4b92
642aa265517d66c88f030a2230eb97e77c973905 blob 57 90 845506 1 34a68de99f94f6f9e437a288349602768eae4b92
29cd4721cd3cef7f5a2e032d6c2d6908427cd5af blob 57 90 845596 1 34a68de99f94f6f9e437a288349602768eae4b92
ae5ccb1578fbc399571f4f0132edd18c55b19ef0 blob 57 90 845686 1 34a68de99f94f6f9e437a288349602768eae4b92
d22feecdd32e57af8fd88bda0fbde8fbb96d4f1c blob 57 90 845776 1 34a68de99f94f6f9e437a288349602768eae4b92
ab2acc4bd273e799b56effc7e208a01814432ba5 blob 57 90 845866 1 34a68de99f94f6f9e437a288349602768eae4b92
2d5f83c6857691045da554091b8f2d82477d9baf blob 57 90 845956 1 34a68de99f94f6f9e437a288349602768eae4b92
fac99cd6f9219ee888b9382ee44a3b7932723b12 blob 57 90 846046 1 34a68de99f94f6f9e437a288349602768eae4b92
b32b0ed27f34e4a9d7c4aab24dfa2d6c51b1c2eb blob 57 90 846136 1 34a68de99f94f6f9e437a288349602768eae4b92
a3f38fbdbe8f34acc61f3a325104e739a875a4b6 blob 57 90 846226 1 34a68de99f94f6f9e437a288349602768eae4b92
6bc5c86eeb3dfcc3ca2343e39cc91dec35ddc90b blob 57 90 846316 1 34a68de99f94f6f9e437a288349602768eae4b92
38897be9103dbc6aff7d1ecd15c1dc6c6d18b0a7 blob 57 90 846406 1 34a68de99f94f6f9e437a288349602768eae4b92
69e0b8ef8cda369575b6801c6ed47daf09aa3c62 blob 57 90 846496 1 34a68de99f94f6f9e437a288349602768eae4b92
c3e6c8cf465113a74926f3d5c73a3b400970643c blob 57 90 846586 1 34a68de99f94f6f9e437a288349602768eae4b92
a31a03a60bad0896133e6e52982da2e7e22832ff blob 57 90 846676 1 34a68de99f94f6f9e437a288349602768eae4b92
735fe835bee0cfa2d7ecc2f195c22de3e7b208b3 blob 57 90 846766 1 34a68de99f94f6f9e437a288349602768eae4b92
84705bfd7a24eb59137fdc26c070c4329eee46a7 blob 57 90 846856 1 34a68de99f94f6f9e437a288349602768eae4b92
5090e761c398db8c0b3fe1c0069535c3b7a9a575 blob 57 90 846946 1 34a68de99f94f6f9e437a288349602768eae4b92
c5c8cc3525a17842c2e668d1499c7c2518202a87 blob 57 90 847036 1 34a68de99f94f6f9e437a288349602768eae4b92
441d41902c4ccb987a866663ebbcc729fbcc4072 blob 57 90 847126 1 34a68de99f94f6f9e437a288349602768eae4b92
55bc16727ba8a63a31eabd811cfc740dc423bab6 blob 57 90 847216 1 34a68de99f94f6f9e437a288349602768eae4b92
86c6bd761eacb8a021246263994bf02d1163c7b5 blob 57 90 847306 1 34a68de99f94f6f9e437a288349602768eae4b92
8812057b6f2583732f83db5bac543549cc621783 blob 57 90 847396 1 34a68de99f94f6f9e437a288349602768eae4b92
c8043aaa6a70318be94ef87be98ea2c7de7f23f5 blob 57 90 847486 1 34a68de99f94f6f9e437a288349602768eae4b92
9d48f3c2e700d81fbe46fbccc400bedc8666221a blob 57 90 847576 1 34a68de99f94f6f9e437a288349602768eae4b92
fd68f118bfc99562e08bd153a3f1c604f1ac0124 blob 57 90 847666 1 34a68de99f94f6f9e437a288349602768eae4b92
879bc6e196323012740d55b1e5bbd9937632ecf3 blob 57 90 847756 1 34a68de99f94f6f9e437a288349602768eae4b92
a3ed4b758faeca44e89792c3f1b0536b685d0552 blob 57 90 847846 1 34a68de99f94f6f9e437a288349602768eae4b92
d9dd72f666a9d30dee5cdd894ca365a82e965594 blob 57 90 847936 1 34a68de99f94f6f9e437a288349602768eae4b92
088ddcb945af72c47348b65a63992c71b6b9dbe8 blob 57 90 848026 1 34a68de99f94f6f9e437a288349602768eae4b92
9e7b55d50c530d08c120379e19bb1c1653bb3063 blob 57 90 848116 1 34a68de99f94f6f9e437a288349602768eae4b92
2dfd9df0b22049f88e22ae86e4370155ecb23271 blob 57 90 848206 1 34a68de99f94f6f9e437a288349602768eae4b92
9de2bb387fc8bf63dbc7a68cb22b9e8439896326 blob 57 90 848296 1 34a68de99f94f6f9e437a288349602768eae4b92
a7eacc2c62dfd538c2948cce08cd217cc72a7140 blob 57 90 848386 1 34a68de99f94f6f9e437a288349602768eae4b92
291b2d8c01a9bc50bc4605bc479a183193de2e45 blob 57 90 848476 1 34a68de99f94f6f9e437a288349602768eae4b92
464adf43722b49bca34d8727d70db33c9ec70097 blob 57 90 848566 1 34a68de99f94f6f9e437a288349602768eae4b92
aa6095774c04683081cad47f300324a88ea95f2e blob 57 90 848656 1 34a68de99f94f6f9e437a288349602768eae4b92
896562b116d22c48f8872854123c523b76928061 blob 57 90 848746 1 34a68de99f94f6f9e437a288349602768eae4b92
f01eb69ea9caabb9fe801ef0f1bfdfa4477e0e34 blob 57 90 848836 1 34a68de99f94f6f9e437a288349602768eae4b92
d8603740ffe28d592c9d10ae2d6ec9dd0cf71949 blob 57 90 848926 1 34a68de99f94f6f9e437a288349602768eae4b92
8eb88090ce51c8ce838b12302c761bbf806c3fcc blob 57 90 849016 1 34a68de99f94f6f9e437a288349602768eae4b92
e961d288a95c209fe01ba42f01a18605eb5a85d3 blob 57 90 849106 1 34a68de99f94f6f9e437a288349602768eae4b92
abd14d13fada2545825fdf71c5d4a22ebb60f697 blob 57 90 849196 1 34a68de99f94f6f9e437a288349602768eae4b92
6a54ffedf41f419c66f6cd734a27ec5968f79b5a blob 57 90 849286 1 34a68de99f94f6f9e437a288349602768eae4b92
b6fa6c3c025c4f875c78423ab993a9349cd964c5 blob 57 90 849376 1 34a68de99f94f6f9e437a288349602768eae4b92
088e69e7ab273e35b4f63ecb1b915a3997f13dff blob 57 90 849466 1 34a68de99f94f6f9e437a288349602768eae4b92
609652080c31409406c828cb996e41fa6a286654 blob 57 90 849556 1 34a68de99f94f6f9e437a288349602768eae4b92
90d3d9b65a2f0c939f45a86f65192846e8066e7f blob 57 90 849646 1 34a68de99f94f6f9e437a288349602768eae4b92
05b4f18d9841f7abb271e81accadea31c5416a71 blob 57 90 849736 1 34a68de99f94f6f9e437a288349602768eae4b92
cfdd1e216211554d586bb3be233190457c5f5c0d blob 57 90 849826 1 34a68de99f94f6f9e437a288349602768eae4b92
73375ca0591d6c17f37b9f287a7c19f368fc644f blob 57 90 849916 1 34a68de99f94f6f9e437a288349602768eae4b92
46cd94a7854b7360f8f8a7e637e2575e707f7b04 blob 57 90 850006 1 34a68de99f94f6f9e437a288349602768eae4b92
ec35852188f9e88aa67849934b0c50bd698fafef blob 57 90 850096 1 34a68de99f94f6f9e437a288349602768eae4b92
0106e17481932f5c223fafadc1d26abc6adf40d6 blob 57 90 850186 1 34a68de99f94f6f9e437a288349602768eae4b92
f846f988e45d97ac0163885e65920643f0029922 blob 57 90 850276 1 34a68de99f94f6f9e437a288349602768eae4b92
636d415b097ff0c103e63d09d96aeb07fdad2045 blob 57 90 850366 1 34a68de99f94f6f9e437a288349602768eae4b92
497017bb8901086d3120553a384f3500ceb86f2e blob 57 90 850456 1 34a68de99f94f6f9e437a288349602768eae4b92
c50bc0b26b2336dbe90b9c7bdaa8d4cfb8f65638 blob 57 90 850546 1 34a68de99f94f6f9e437a288349602768eae4b92
921538e73389e99e294938d8580ababdb639f140 blob 57 90 850636 1 34a68de99f94f6f9e437a288349602768eae4b92
9ede1b01ec1751bf9ca9d5845ac005edc6935601 blob 57 90 850726 1 34a68de99f94f6f9e437a288349602768eae4b92
1ba5df91f11a1011f4788bc4cc067743828dda41 blob 57 90 850816 1 34a68de99f94f6f9e437a288349602768eae4b92
188728c24ca8cf687133dd0a5782e8819cee10a6 blob 57 90 850906 1 34a68de99f94f6f9e437a288349602768eae4b92
cb0d0270d7c50e33aacd9a4247333622c62846a4 blob 57 90 850996 1 34a68de99f94f6f9e437a288349602768eae4b92
dd39f8544a79066c925baca19ddc02623970efd1 blob 57 90 851086 1 34a68de99f94f6f9e437a288349602768eae4b92
d0b35a20e2ffaa46d895d6296f555dd98956d536 blob 57 90 851176 1 34a68de99f94f6f9e437a288349602768eae4b92
ae274e8cd31f35d743e68b3c8420e604386fc514 blob 57 90 851266 1 34a68de99f94f6f9e437a288349602768eae4b92
d1ede5db04b30c10d395c13dec020c90320498b8 blob 57 90 851356 1 34a68de99f94f6f9e437a288349602768eae4b92
2adace6c3082b12f42112482372696d66c36e4ae blob 57 90 851446 1 34a68de99f94f6f9e437a288349602768eae4b92
035e7e54cee9eb197af435b6b6dcced489c233f6 blob 57 90 851536 1 34a68de99f94f6f9e437a288349602768eae4b92
74aced6a3316fd8d726932ed908b035cd33afef6 blob 57 90 851626 1 34a68de99f94f6f9e437a288349602768eae4b92
efbbfa01b16e997301bb440aad9c885321bb13d2 blob 57 90 851716 1 34a68de99f94f6f9e437a288349602768eae4b92
92433746fe3340a5d4bc3f5487545f5167eaeaad blob 57 90 851806 1 34a68de99f94f6f9e437a288349602768eae4b92
da7b351a2560fd44fe89fc6288c3efa72eace9eb blob 57 90 851896 1 34a68de99f94f6f9e437a288349602768eae4b92
63176d3a0ae88aee86fa1b2b4390ed0850e67a9b blob 57 90 851986 1 34a68de99f94f6f9e437a288349602768eae4b92
5e10cf16f2bf33110cf59f53d583527d676820e1 blob 57 90 852076 1 34a68de99f94f6f9e437a288349602768eae4b92
aeb87caeb18972ad237d4c5628bfedb2dca51d47 blob 57 90 852166 1 34a68de99f94f6f9e437a288349602768eae4b92
141df301ab1d7f9e40b90fb4435ec4ac40ae544d blob 57 90 852256 1 34a68de99f94f6f9e437a288349602768eae4b92
e7172196f3fd2742cbe382daa02fd9641b9f6ffb blob 57 90 852346 1 34a68de99f94f6f9e437a288349602768eae4b92
4e78d6c905bc6d0c06ad066400f0570a391f9385 blob 57 90 852436 1 34a68de99f94f6f9e437a288349602768eae4b92
c096ccf827c047c3a20cfb1dd3fd5b0485ec2a0b blob 57 90 852526 1 34a68de99f94f6f9e437a288349602768eae4b92
91c4bc3b3c200535d88f76e9e3566658cb7b2bfd blob 57 90 852616 1 34a68de99f94f6f9e437a288349602768eae4b92
0b7888c3e508fe256fe859ba46c77d100abbce3f blob 57 90 852706 1 34a68de99f94f6f9e437a288349602768eae4b92
36cfe418f3038689cd47b64845c6f24886f9ec73 blob 57 90 852796 1 34a68de99f94f6f9e437a288349602768eae4b92
54c9d6ab199e99bdbba483ef1287e0cc31fc84b3 blob 57 90 852886 1 34a68de99f94f6f9e437a288349602768eae4b92
8b64b7aafc16c177bcc58813c7a853f622feb10f blob 57 90 852976 1 34a68de99f94f6f9e437a288349602768eae4b92
6ff2ccef89b04f0539f51c0ffcbe5f7bcf108ced blob 57 90 853066 1 34a68de99f94f6f9e437a288349602768eae4b92
7b419ded53760b5dbe136c1ec83ef3f338fab544 blob 57 90 853156 1 34a68de99f94f6f9e437a288349602768eae4b92
non delta: 112 objects
chain length = 1: 110 objects
chain length = 2: 10 objects
chain length = 3: 10 objects
chain length = 4: 10 objects
chain length = 5: 10 objects
chain length = 6: 10 objects
chain length = 7: 10 objects
chain length = 8: 10 objects
chain length = 9: 10 objects
test-2-1c54d893dd9bf6645ecee2886ea72f2c2030bea1.pack: ok
ok 3 - pack-objects with index version 2
expecting success: cmp "test-1-${pack1}.pack" "test-2-${pack2}.pack"
ok 4 - both packs should be identical
expecting success: ! cmp "test-1-${pack1}.idx" "test-2-${pack2}.idx"
test-1-1c54d893dd9bf6645ecee2886ea72f2c2030bea1.idx test-2-1c54d893dd9bf6645ecee2886ea72f2c2030bea1.idx differ: char 1, line 1
ok 5 - index v1 and index v2 should be different
expecting success: git index-pack --index-version=1 -o 1.idx "test-1-${pack1}.pack"
1c54d893dd9bf6645ecee2886ea72f2c2030bea1
ok 6 - index-pack with index version 1
expecting success: git index-pack --index-version=2 -o 2.idx "test-1-${pack1}.pack"
1c54d893dd9bf6645ecee2886ea72f2c2030bea1
ok 7 - index-pack with index version 2
expecting success: cmp "test-1-${pack1}.idx" "1.idx" &&
cmp "test-2-${pack2}.idx" "2.idx"
ok 8 - index-pack results should match pack-objects ones
expecting success:
git index-pack --verify "test-1-${pack1}.pack"
ok 9 - index-pack --verify on index version 1
expecting success:
git index-pack --verify "test-2-${pack2}.pack"
ok 10 - index-pack --verify on index version 2
expecting success: test_must_fail git pack-objects --index-version=2, test-3 <obj-list
fatal: bad index version '2,'
ok 11 - pack-objects --index-version=2, is not accepted
expecting success: pack3=$(git pack-objects --index-version=2,0x40000 test-3 <obj-list)
ok 12 - index v2: force some 64-bit offsets with pack-objects
expecting success: git verify-pack -v "test-3-${pack3}.pack"
4307528f01beff143cd36a903cb8c9a9983a4c27 tree 12036 7200 12
e43b5801e4ac39a512e5d9423fc272cf5c3343f9 blob 300 313 7212
78fcb2fa30f448929fae32736f0fb56733d08746 blob 108 141 7525 1 e43b5801e4ac39a512e5d9423fc272cf5c3343f9
1c547eac61c40965963e85a56c24991ab1a0e3ef blob 108 141 7666 2 78fcb2fa30f448929fae32736f0fb56733d08746
571c7b54485960a9820927983c702eec1b41e91a blob 108 141 7807 3 1c547eac61c40965963e85a56c24991ab1a0e3ef
671d8800ae6936f107d70de2dbec536afb47d89a blob 108 141 7948 4 571c7b54485960a9820927983c702eec1b41e91a
f2377b316d0d92e3c29a2d6dba598ca02fb80e9c blob 108 141 8089 5 671d8800ae6936f107d70de2dbec536afb47d89a
0483297992ed4cd5ab3b5790912b1f03598ea660 blob 108 141 8230 6 f2377b316d0d92e3c29a2d6dba598ca02fb80e9c
1ddb0e1ff0db350df93807fda44ef75358d7ddb0 blob 108 141 8371 7 0483297992ed4cd5ab3b5790912b1f03598ea660
19dec2e189cd33584d2173979aecea01b3c59904 blob 108 141 8512 8 1ddb0e1ff0db350df93807fda44ef75358d7ddb0
2bc95d3b86ed1808b73d84f5c0287a61df979063 blob 108 141 8653 9 19dec2e189cd33584d2173979aecea01b3c59904
b8f11d512203fd0260eb79edd5cfca416ca404cb blob 300 313 8794
ef790963bda7ffd9e3556cf4211492680b34c2bf blob 108 141 9107 1 b8f11d512203fd0260eb79edd5cfca416ca404cb
a854bd2ad779f987395c790d0aa378277a7d3216 blob 108 141 9248 2 ef790963bda7ffd9e3556cf4211492680b34c2bf
b750a0431df80025eff766f0811e6a85e1dbc32a blob 108 141 9389 3 a854bd2ad779f987395c790d0aa378277a7d3216
9e793c3eeb7402e17eafb61928b96648a54a8789 blob 108 141 9530 4 b750a0431df80025eff766f0811e6a85e1dbc32a
35691bb59cfc8e5f0749a3c2df2d236150d7f7d1 blob 108 141 9671 5 9e793c3eeb7402e17eafb61928b96648a54a8789
0df5edef6dcc6452cf814984a4d4ea23a8e41e3c blob 108 141 9812 6 35691bb59cfc8e5f0749a3c2df2d236150d7f7d1
305f923c2d2e1fff9ec067b42443fff88aeebc67 blob 108 141 9953 7 0df5edef6dcc6452cf814984a4d4ea23a8e41e3c
67db08cb82e0053ee51773fbf4bdc50094e03767 blob 108 141 10094 8 305f923c2d2e1fff9ec067b42443fff88aeebc67
61a87ea87b8af074a75d0af78e77f2ed6141922c blob 108 141 10235 9 67db08cb82e0053ee51773fbf4bdc50094e03767
5e69af01a42867f9be8213089efc57c6a1517976 blob 300 313 10376
1280048552e2ee86127654132148d3c2e208b397 blob 108 141 10689 1 5e69af01a42867f9be8213089efc57c6a1517976
ec86b748af33306ff620ebe591da28ed622c1b4d blob 108 141 10830 2 1280048552e2ee86127654132148d3c2e208b397
ce83a0772693235f137100863f4217f9c6398a53 blob 108 141 10971 3 ec86b748af33306ff620ebe591da28ed622c1b4d
ebd5d1af0d246aa4f8e288c539b906eb765d48e1 blob 108 141 11112 4 ce83a0772693235f137100863f4217f9c6398a53
ef99659edf6a12a9320e29453d1e17054863c3d1 blob 108 141 11253 5 ebd5d1af0d246aa4f8e288c539b906eb765d48e1
17dc4d50c25440e569d3c4dabf41bb562c9013fc blob 108 141 11394 6 ef99659edf6a12a9320e29453d1e17054863c3d1
36a0964d29672133cea581290233bae77c3b8cca blob 108 141 11535 7 17dc4d50c25440e569d3c4dabf41bb562c9013fc
60a658626764685c980311c6325263eabdbe0547 blob 108 141 11676 8 36a0964d29672133cea581290233bae77c3b8cca
a7b6688d2a6f15e6f91d1701f64ca7da42a5a73a blob 108 141 11817 9 60a658626764685c980311c6325263eabdbe0547
ef1259b944f1b0c4ade62c049c2ea41daf63ccc7 blob 300 313 11958
612f382c01ffd0ea89c2a840cc683cfd1108628e blob 108 141 12271 1 ef1259b944f1b0c4ade62c049c2ea41daf63ccc7
ba0b924be466e9d85f8ba5563211e570d12d2841 blob 108 141 12412 2 612f382c01ffd0ea89c2a840cc683cfd1108628e
d05e80ce75fe6189e1b08dfc5fb9bf0a1a6e544e blob 108 141 12553 3 ba0b924be466e9d85f8ba5563211e570d12d2841
e80b417ea517c993f906556a00fa8acaceb559b4 blob 108 141 12694 4 d05e80ce75fe6189e1b08dfc5fb9bf0a1a6e544e
8cc2e1974c339c43bd481c205ea0024b54dbcb83 blob 108 141 12835 5 e80b417ea517c993f906556a00fa8acaceb559b4
8e57f0560c1135c5cdaca2c69094489ad6ddcdb0 blob 108 141 12976 6 8cc2e1974c339c43bd481c205ea0024b54dbcb83
416013a155571063a96f1e443ee44a8ac3f09c1b blob 108 141 13117 7 8e57f0560c1135c5cdaca2c69094489ad6ddcdb0
8dc7c392787f4ec7bb28c57bc6744a2b5f3122ed blob 108 141 13258 8 416013a155571063a96f1e443ee44a8ac3f09c1b
beb699952b6a188a54675c11696cb6a2652b5249 blob 108 141 13399 9 8dc7c392787f4ec7bb28c57bc6744a2b5f3122ed
0f66db930e6ce643852ad45eb91dc203575fb5f4 blob 300 313 13540
9a3a619d26a6e19b556d119d760b40a6397a9df4 blob 108 141 13853 1 0f66db930e6ce643852ad45eb91dc203575fb5f4
66336af04f97cfd40474e8aa4cea2e25275b5f94 blob 108 141 13994 2 9a3a619d26a6e19b556d119d760b40a6397a9df4
bf8886056d3abf37690115bfee10bf14ef5e4db9 blob 108 141 14135 3 66336af04f97cfd40474e8aa4cea2e25275b5f94
2c1120aee9298045837641feab263b3655725aa3 blob 108 141 14276 4 bf8886056d3abf37690115bfee10bf14ef5e4db9
f47f0d90220589a45dbccd06c8468eca7c04d70a blob 108 141 14417 5 2c1120aee9298045837641feab263b3655725aa3
add63edc5ce2dd58ff7d66b153f44d03b0d93df2 blob 108 141 14558 6 f47f0d90220589a45dbccd06c8468eca7c04d70a
75642e5399f1b51a33f0c6430af2fd997e4db578 blob 108 141 14699 7 add63edc5ce2dd58ff7d66b153f44d03b0d93df2
64e473488413d66fe6e464b3f09827501eb353fe blob 108 141 14840 8 75642e5399f1b51a33f0c6430af2fd997e4db578
597244daf249731fc922a26acfe6fb9ea3baca7f blob 108 141 14981 9 64e473488413d66fe6e464b3f09827501eb353fe
8d5f6b41255c60ea8f44892b918a38eebe43de6b blob 300 313 15122
c26e8fbe6bd52d34b340f61780b6e3dd3b9bed94 blob 108 141 15435 1 8d5f6b41255c60ea8f44892b918a38eebe43de6b
0246ff570c396c37ff08c0f5f9d88c84fc21a297 blob 108 141 15576 2 c26e8fbe6bd52d34b340f61780b6e3dd3b9bed94
cff9bb4b47c1bc50205d6a793d8d02bee852a229 blob 108 141 15717 3 0246ff570c396c37ff08c0f5f9d88c84fc21a297
2096ec927d087ee1076f1118e8fe48ab21a27bd7 blob 108 141 15858 4 cff9bb4b47c1bc50205d6a793d8d02bee852a229
0ff6b3e6f0b0957b5b05a06d9b4580f0e1798501 blob 108 141 15999 5 2096ec927d087ee1076f1118e8fe48ab21a27bd7
633de7a70fe29cecb721bb5033573fbf175b31fc blob 108 141 16140 6 0ff6b3e6f0b0957b5b05a06d9b4580f0e1798501
76db9ca0f1afa9c247d4c5a2fe60ca95154fd465 blob 108 141 16281 7 633de7a70fe29cecb721bb5033573fbf175b31fc
df4c5c8e8e25621bba74f233d59c76e5810f8677 blob 108 141 16422 8 76db9ca0f1afa9c247d4c5a2fe60ca95154fd465
9fc4cce844af6ed26932eb84045df0ab4a79f0b7 blob 108 141 16563 9 df4c5c8e8e25621bba74f233d59c76e5810f8677
ef3ddda4c2922f10089dfed6436267b445d5b118 blob 300 313 16704
1bdedd473270eef5c2c67c968ba1d5ee081013ee blob 108 141 17017 1 ef3ddda4c2922f10089dfed6436267b445d5b118
9d28c1ea0790ee28b8c35bc3fe88629980708730 blob 108 141 17158 2 1bdedd473270eef5c2c67c968ba1d5ee081013ee
a3264a35996ccaf722f869be8e379864e28ef561 blob 108 141 17299 3 9d28c1ea0790ee28b8c35bc3fe88629980708730
cd6f1b15bb20b9c706f8f80c77b7c210921f0b26 blob 108 141 17440 4 a3264a35996ccaf722f869be8e379864e28ef561
60601746c22df38cc0bcbce68f359fb2796d7569 blob 108 141 17581 5 cd6f1b15bb20b9c706f8f80c77b7c210921f0b26
f15a3f5dae93709cce491d407dad343f9577d8c5 blob 108 141 17722 6 60601746c22df38cc0bcbce68f359fb2796d7569
5dd384bbc7186571a9cccdba2ebaa794e87bfbdd blob 108 141 17863 7 f15a3f5dae93709cce491d407dad343f9577d8c5
d18475904b78554f1fd6f96b4c1ad44e84edf873 blob 108 141 18004 8 5dd384bbc7186571a9cccdba2ebaa794e87bfbdd
67728c76be3b7d5319ff2a93fc78aca0ff3824eb blob 108 141 18145 9 d18475904b78554f1fd6f96b4c1ad44e84edf873
c1ec14f204e244f32aa93c66e3fb6a7d4f58c081 blob 300 313 18286
258424ed6e5c4377a2aa55fb6d4818a3580291ad blob 108 141 18599 1 c1ec14f204e244f32aa93c66e3fb6a7d4f58c081
fcaa7a21cb9d0b0aa84d2cbac5115d7c300739a2 blob 108 141 18740 2 258424ed6e5c4377a2aa55fb6d4818a3580291ad
e1bfca166c2ff676f665fd3c58d7dea896ec48d7 blob 108 141 18881 3 fcaa7a21cb9d0b0aa84d2cbac5115d7c300739a2
383c3c67e93cfd05d272b187e3af5c1e00bcae5c blob 108 141 19022 4 e1bfca166c2ff676f665fd3c58d7dea896ec48d7
ad6a3267a9e0d49014eec133a5e968315e8ce834 blob 108 141 19163 5 383c3c67e93cfd05d272b187e3af5c1e00bcae5c
9dfc592085bb14371890b41e48c98b220420669b blob 108 141 19304 6 ad6a3267a9e0d49014eec133a5e968315e8ce834
c872afc7539f689178b7385010010ca7aef8f09a blob 108 141 19445 7 9dfc592085bb14371890b41e48c98b220420669b
1bc038b18c5039a05e173da2fd2b65b3d34ccd2b blob 108 141 19586 8 c872afc7539f689178b7385010010ca7aef8f09a
bdd7bd883f75c1726538851757168dc0dc33e222 blob 108 141 19727 9 1bc038b18c5039a05e173da2fd2b65b3d34ccd2b
71529d6ca58922aa05603b6f2784f87cad8703cf blob 300 313 19868
2bebfa6240e319a1c31951d05c8135f089fbbd29 blob 108 141 20181 1 71529d6ca58922aa05603b6f2784f87cad8703cf
83fcb919ae7bc9a80912c9bfd5731acd36666480 blob 108 141 20322 2 2bebfa6240e319a1c31951d05c8135f089fbbd29
b97506df40bbd212b52062b851cd88f04abb59b3 blob 108 141 20463 3 83fcb919ae7bc9a80912c9bfd5731acd36666480
298dc4942c3b3db53d484ffa86b451755cd2125f blob 108 141 20604 4 b97506df40bbd212b52062b851cd88f04abb59b3
ba11c807afc9699e7ea1cab791699bfd698c7e7d blob 108 141 20745 5 298dc4942c3b3db53d484ffa86b451755cd2125f
b1281e620292c2e74d8770eb99f0b6871e4cca59 blob 108 141 20886 6 ba11c807afc9699e7ea1cab791699bfd698c7e7d
368cd4d02a420764e0d31b35576f73b777c34604 blob 108 141 21027 7 b1281e620292c2e74d8770eb99f0b6871e4cca59
16d1323e84e3d5b058ab2ac8245db85bc4606c88 blob 108 141 21168 8 368cd4d02a420764e0d31b35576f73b777c34604
711d5e6b0d21b3aa205dcc960ec51475be8a25a5 blob 108 141 21309 9 16d1323e84e3d5b058ab2ac8245db85bc4606c88
d174d532539487c9aedbbaf38d556061b5acf826 blob 300 313 21450
bf5dcb9013df15ff0ae10e0682a92a7688a7720b blob 108 141 21763 1 d174d532539487c9aedbbaf38d556061b5acf826
fb214b786310655bc8ee46d89ca9a04ec9aed0c3 blob 108 141 21904 2 bf5dcb9013df15ff0ae10e0682a92a7688a7720b
b94140f4006d05e7e3822f5db19adc2b73a2cc05 blob 108 141 22045 3 fb214b786310655bc8ee46d89ca9a04ec9aed0c3
4019b50c838197ca4b8d664a4164a183cac8ad11 blob 108 141 22186 4 b94140f4006d05e7e3822f5db19adc2b73a2cc05
2826157afde0e74742115842ac2dddf5c3b5e23e blob 108 141 22327 5 4019b50c838197ca4b8d664a4164a183cac8ad11
99556fcde6a0be62a72c8b0c6682576a1d596bea blob 108 141 22468 6 2826157afde0e74742115842ac2dddf5c3b5e23e
8f5e7974c287b07f1cf8116485c4135340b807f3 blob 108 141 22609 7 99556fcde6a0be62a72c8b0c6682576a1d596bea
f9982291dfe87a9def1b12d24f9ca9a024a9dd8e blob 108 141 22750 8 8f5e7974c287b07f1cf8116485c4135340b807f3
3c5c0be699798d2f4fbe651051b9f17156f133c1 blob 108 141 22891 9 f9982291dfe87a9def1b12d24f9ca9a024a9dd8e
1297547aab30f952af805d38f6f1c1930cb3117b blob 8196 8210 23032
862f6954d9afd549b48fa2ef8e2f8ab96e309916 blob 8196 8210 31242
0471b3b8ab8da19f3968dc238e9555f4e48ce858 blob 8196 8210 39452
c80092496b80b5f21503b8c838dccfc1f2e2ddde blob 8196 8210 47662
e5a12c79cec70d52817054c4b9ef321003c6755f blob 8196 8210 55872
bf96a31446f37d8e57bb38a00797aa3af1f99370 blob 8196 8210 64082
0508b858e01f0367552fb14722388ba48dbd36f7 blob 8196 8210 72292
359017d1534767455090901a260985de1658d752 blob 8196 8210 80502
8d06001a3d38390afa66576caa6c55c796e33835 blob 8196 8210 88712
8162ceb825c07e3b1e17f5775665085da9b1e855 blob 8196 8210 96922
6910c5a645c9fe7f6b728034566b1668f0677a8e blob 8196 8210 105132
09ba511a995b8ea75067036d5c046f39052a3bd8 blob 8196 8210 113342
f45d142313c7a5270a60c664bb463cddadc467c1 blob 8196 8210 121552
964e51bf7d344bda71ea5e12dbd7bfb90120fcf0 blob 8196 8210 129762
408dd031138139f6ac6f402988f960527871f71a blob 8196 8210 137972
912fa0ec5536f31122e34577a4baf3b22d40de2a blob 8196 8210 146182
f02359c44ca04a542cc5bf59aa5f1de6cd1d5a4c blob 8196 8210 154392
b0566dd5d479c80c278bd5455c92aca689328471 blob 8196 8210 162602
49d17d605f042c1e978a68f625be6ab6294fa8fa blob 8196 8210 170812
8f744480abe8ad05bc419d1ab2e375b9c0fa3978 blob 8196 8210 179022
fff3a3a92d2268a464dbdcd00fc055885ee3cba9 blob 8196 8210 187232
f5fc0ff4afc14d9dfcb2580d3f438edd4cd8130a blob 8196 8210 195442
01179d82b18c252824e20e190543e0e84950d820 blob 8196 8210 203652
de3ed457f973b7ffb20edc36002c47a6e4b41066 blob 8196 8210 211862
9c4e1f8c16d04d90a2217279240996276d617067 blob 8196 8210 220072
816f18d19f433f5df9edbfb5547684b519fdeb3b blob 8196 8210 228282
72e7428e5ee3797ca0bf955f723b915bee919c48 blob 8196 8210 236492
41adb5af8e7f9737b16261fb0c224c7550c82f23 blob 8196 8210 244702
94f5d368a7c4ea294c463dc45cf15d387fa83c4e blob 8196 8210 252912
85fdf2eed169dbc1fe2d71439b589b0326dad12b blob 8196 8210 261122
bab18d872e9183c6d450b326477205bb0cc081cb blob 8196 8210 269332
b31fb3fb181512bc608b58cb33323d97ad6eac2f blob 8196 8210 277542
20a9519106ab64bf043456a58b6bfb04f1c7b39d blob 8196 8210 285752
94a015b2b6053f7a1d541969919e879bb2b75eef blob 8196 8210 293962
7353550b9b0e1da4f68b9484dfad2634100a00cc blob 8196 8210 302172
e28a360bcbd69ca1a0bb47834e640069c6672a8d blob 8196 8210 310382
8e6ffc05856460c2e08c8e9d824bbf510d3c1b52 blob 8196 8210 318592
ceade5760b1ba0bc11d4e4db6982ddf671495e58 blob 8196 8210 326802
92534f38b94c1da321d88c9ab5af8c3e804c2507 blob 8196 8210 335012
f5577acbfd83dddf90b2054d6cb5dce2df6d06ee blob 8196 8210 343222
59a27076dc0a8989215a160d61ac401e41c05126 blob 8196 8210 351432
2db6b919f253444b5437d8251e5d101d5a34e1b3 blob 8196 8210 359642
c1c35c36d4300da28c0570746adaf2f5b0b015a3 blob 8196 8210 367852
03a6f56dbbb556425ef8c43c31519b32eb5629a4 blob 8196 8210 376062
dd6209d4c0c5d4f210a8d1bb4a4d314cf284dea9 blob 8196 8210 384272
8c04fa425f4dfb4555b376e73d8f28d56b97a569 blob 8196 8210 392482
614e235cd8ca8af7ccf402a92eb34baadaaa3f18 blob 8196 8210 400692
b2f07ee5771d9e0de7166bc72a4a7ebce9830779 blob 8196 8210 408902
852ba0cf084474c1b0b48052606ae27346a5b1a1 blob 8196 8210 417112
15ff79f644a0596529eba0592017dce39e222b8e blob 8196 8210 425322
75f67c0c230f8923db5831094b1cc67f61bf1734 blob 8196 8210 433532
95b51158cd6365da9b10f1d8b06ba76dc5d5c5f1 blob 8196 8210 441742
5217ce416b26a3d76191d873490110746d0e8a04 blob 8196 8210 449952
c16eb68827fa5d6da73b320b431cf736c7a6a4af blob 8196 8210 458162
57983aab7f7384626a6a1f9ec08fba1902dd11e5 blob 8196 8210 466372
84e4d2ce637781776791c8e2cf4a9312a2783ceb blob 8196 8210 474582
2175a1a9d8757b3836f5cc44c6af0297aea36709 blob 8196 8210 482792
9b655d54faaf0a737a03731852f27cf6b552bcaf blob 8196 8210 491002
a3233ba1323f07a0d68f6020e7209025819cfa13 blob 8196 8210 499212
5a65a213ee0ebdc285c8e8eca24e9eda97f8a384 blob 8196 8210 507422
de1679ebb44d3fe59e8d2378471b56db384fb181 blob 8196 8210 515632
d2e455cc03081911f9ecd81245becd858d1e64ca blob 8196 8210 523842
72826d3e97bc228616e06235566a0db59c94bd74 blob 8196 8210 532052
debe389b3bdd62d96748db592e99cb0cc7b1b0f2 blob 8196 8210 540262
e572e59eee8119f8fb58e8595ecd0c622f2d6e29 blob 8196 8210 548472
197f45d948a36ac3762e5daf6ef4d43a5d969503 blob 8196 8210 556682
fb294d29a9d045d5a46a9c00e53777b394ceb346 blob 8196 8210 564892
10f7133774acbc162f5f79804744d64747eee380 blob 8196 8210 573102
16b9dea85eab6d7e452bdea4889e24a8ad79afd5 blob 8196 8210 581312
08a8cf223e5dc57504da3cd8eb56d33f276dc1b9 blob 8196 8210 589522
e3332ff9a2540b45e599be0c7bca8bbe28af2b43 blob 8196 8210 597732
5e1b961ae623672df764f64b737f332318d43baa blob 8196 8210 605942
14caba1bc2835573f3c20b7f2e5fb638a08e12ee blob 8196 8210 614152
84d1369c26d187b24dffe9029e81e119e4a374f5 blob 8196 8210 622362
5ef3a0f4954ade2d5c290ccc4d791c3b219d89ea blob 8196 8210 630572
610d16151ceb1dc4d5138f63ed410819a8b9161c blob 8196 8210 638782
3545eb1f5549261267ab0577b94372e88b49731d blob 8196 8210 646992
0d6e5c0388744cf82463ce1283ff99e863e9b26e blob 8196 8210 655202
611261b75bd720d3433ea8975d555b1ac3e692bd blob 8196 8210 663412
e25dc2ac80f9f78aa2809b5cd254ce47a51efbe5 blob 8196 8210 671622
ea5a4b4fed0bab7beffd3c7fc6cc549df47017d7 blob 8196 8210 679832
d68756996794df8c00dfcbf520662b14cb06958e blob 8196 8210 688042
b5b44a475116c2d0054edf54c699909d5d583aac blob 8196 8210 696252
99ff18078623c32b85a49cc8a03e3c58ee94eecb blob 8196 8210 704462
159fdc73e63cf90624d128d87b8185154727714e blob 8196 8210 712672
1f0ca97497381a196e53a7639ee769ed019469a3 blob 8196 8210 720882
6dbed45fde708bb67e6b21bd55976483305f9e74 blob 8196 8210 729092
b5ec32ad29b65e5742cd1857d17e92c2efc5da96 blob 8196 8210 737302
cf823d111604e8a014e0702b5e15b242bb961c78 blob 8196 8210 745512
72528baaeeba0d9c01da36a7a0add1ac49d860f2 blob 8196 8210 753722
b976a8fd346486d78cdebeaa0b0ac200befca629 blob 8196 8210 761932
e652cd97e9aae1523d892c1f417274dd26c3bcd3 blob 8196 8210 770142
aa82432626cc08fb818a20aa62b607aa52e7b35d blob 8196 8210 778352
d67069815168092ee0eadeab8177002bd0376b6f blob 8196 8210 786562
fa7ca115eb82e14f0263990362d4fc27591e1143 blob 8196 8210 794772
5cadb04c4d4ec953dffc528bf75561a6ae1c5820 blob 8196 8210 802982
a769ce6dfe1abe1b6162627b2b5df89f4f7d4317 blob 8196 8210 811192
bf265906aab0df90b6a4bdb1fe6f8088a9038435 blob 8196 8210 819402
b302b77fd5595784b5e85e91f8b4314fff49a6a1 blob 8196 8210 827612
3927444e44b49dfa6cdc768298ae879ec298c45d blob 8196 8210 835822
0b968294884af115eb5a1b941b3dabd48470c3bb blob 12 41 844032 1 3927444e44b49dfa6cdc768298ae879ec298c45d
34a68de99f94f6f9e437a288349602768eae4b92 blob 250 263 844073
8517d36660dffb896fb4e283ad110023aaebaf1b blob 57 90 844336 1 34a68de99f94f6f9e437a288349602768eae4b92
e3fc6633c069c8e246d77a408e4747c2852ba44a blob 57 90 844426 1 34a68de99f94f6f9e437a288349602768eae4b92
37a071e55d1f2e07af146ca6017d98dd85beae68 blob 57 90 844516 1 34a68de99f94f6f9e437a288349602768eae4b92
a8179a233b7aeeb7a450c5d321d4b73df936b64b blob 57 90 844606 1 34a68de99f94f6f9e437a288349602768eae4b92
99e0b239888c8b71671fb948e41111876e61a3c2 blob 57 90 844696 1 34a68de99f94f6f9e437a288349602768eae4b92
e26e04b4786bf6b0ec3c5d528e7002cd58e2401b blob 57 90 844786 1 34a68de99f94f6f9e437a288349602768eae4b92
a6106f10ea80724dbc32b328d9892111589a2111 blob 57 90 844876 1 34a68de99f94f6f9e437a288349602768eae4b92
d1669a170780865ccd7645211c2e1cebdfb28aad blob 57 90 844966 1 34a68de99f94f6f9e437a288349602768eae4b92
53a19e0c2c34ef1a4e1bbc9aa1cba4cb9bc2dd80 blob 57 90 845056 1 34a68de99f94f6f9e437a288349602768eae4b92
26ff29a62e7a6359d3975813fd645af871576125 blob 57 90 845146 1 34a68de99f94f6f9e437a288349602768eae4b92
c1d6b9953613f5732cd40d8cffbb2b746a71fb92 blob 57 90 845236 1 34a68de99f94f6f9e437a288349602768eae4b92
a2bfcc19d1592c43af33617500394e1ac09e968c blob 57 90 845326 1 34a68de99f94f6f9e437a288349602768eae4b92
36c0479c58cef0b9a10b56934ed42a862e1dcfe2 blob 57 90 845416 1 34a68de99f94f6f9e437a288349602768eae4b92
642aa265517d66c88f030a2230eb97e77c973905 blob 57 90 845506 1 34a68de99f94f6f9e437a288349602768eae4b92
29cd4721cd3cef7f5a2e032d6c2d6908427cd5af blob 57 90 845596 1 34a68de99f94f6f9e437a288349602768eae4b92
ae5ccb1578fbc399571f4f0132edd18c55b19ef0 blob 57 90 845686 1 34a68de99f94f6f9e437a288349602768eae4b92
d22feecdd32e57af8fd88bda0fbde8fbb96d4f1c blob 57 90 845776 1 34a68de99f94f6f9e437a288349602768eae4b92
ab2acc4bd273e799b56effc7e208a01814432ba5 blob 57 90 845866 1 34a68de99f94f6f9e437a288349602768eae4b92
2d5f83c6857691045da554091b8f2d82477d9baf blob 57 90 845956 1 34a68de99f94f6f9e437a288349602768eae4b92
fac99cd6f9219ee888b9382ee44a3b7932723b12 blob 57 90 846046 1 34a68de99f94f6f9e437a288349602768eae4b92
b32b0ed27f34e4a9d7c4aab24dfa2d6c51b1c2eb blob 57 90 846136 1 34a68de99f94f6f9e437a288349602768eae4b92
a3f38fbdbe8f34acc61f3a325104e739a875a4b6 blob 57 90 846226 1 34a68de99f94f6f9e437a288349602768eae4b92
6bc5c86eeb3dfcc3ca2343e39cc91dec35ddc90b blob 57 90 846316 1 34a68de99f94f6f9e437a288349602768eae4b92
38897be9103dbc6aff7d1ecd15c1dc6c6d18b0a7 blob 57 90 846406 1 34a68de99f94f6f9e437a288349602768eae4b92
69e0b8ef8cda369575b6801c6ed47daf09aa3c62 blob 57 90 846496 1 34a68de99f94f6f9e437a288349602768eae4b92
c3e6c8cf465113a74926f3d5c73a3b400970643c blob 57 90 846586 1 34a68de99f94f6f9e437a288349602768eae4b92
a31a03a60bad0896133e6e52982da2e7e22832ff blob 57 90 846676 1 34a68de99f94f6f9e437a288349602768eae4b92
735fe835bee0cfa2d7ecc2f195c22de3e7b208b3 blob 57 90 846766 1 34a68de99f94f6f9e437a288349602768eae4b92
84705bfd7a24eb59137fdc26c070c4329eee46a7 blob 57 90 846856 1 34a68de99f94f6f9e437a288349602768eae4b92
5090e761c398db8c0b3fe1c0069535c3b7a9a575 blob 57 90 846946 1 34a68de99f94f6f9e437a288349602768eae4b92
c5c8cc3525a17842c2e668d1499c7c2518202a87 blob 57 90 847036 1 34a68de99f94f6f9e437a288349602768eae4b92
441d41902c4ccb987a866663ebbcc729fbcc4072 blob 57 90 847126 1 34a68de99f94f6f9e437a288349602768eae4b92
55bc16727ba8a63a31eabd811cfc740dc423bab6 blob 57 90 847216 1 34a68de99f94f6f9e437a288349602768eae4b92
86c6bd761eacb8a021246263994bf02d1163c7b5 blob 57 90 847306 1 34a68de99f94f6f9e437a288349602768eae4b92
8812057b6f2583732f83db5bac543549cc621783 blob 57 90 847396 1 34a68de99f94f6f9e437a288349602768eae4b92
c8043aaa6a70318be94ef87be98ea2c7de7f23f5 blob 57 90 847486 1 34a68de99f94f6f9e437a288349602768eae4b92
9d48f3c2e700d81fbe46fbccc400bedc8666221a blob 57 90 847576 1 34a68de99f94f6f9e437a288349602768eae4b92
fd68f118bfc99562e08bd153a3f1c604f1ac0124 blob 57 90 847666 1 34a68de99f94f6f9e437a288349602768eae4b92
879bc6e196323012740d55b1e5bbd9937632ecf3 blob 57 90 847756 1 34a68de99f94f6f9e437a288349602768eae4b92
a3ed4b758faeca44e89792c3f1b0536b685d0552 blob 57 90 847846 1 34a68de99f94f6f9e437a288349602768eae4b92
d9dd72f666a9d30dee5cdd894ca365a82e965594 blob 57 90 847936 1 34a68de99f94f6f9e437a288349602768eae4b92
088ddcb945af72c47348b65a63992c71b6b9dbe8 blob 57 90 848026 1 34a68de99f94f6f9e437a288349602768eae4b92
9e7b55d50c530d08c120379e19bb1c1653bb3063 blob 57 90 848116 1 34a68de99f94f6f9e437a288349602768eae4b92
2dfd9df0b22049f88e22ae86e4370155ecb23271 blob 57 90 848206 1 34a68de99f94f6f9e437a288349602768eae4b92
9de2bb387fc8bf63dbc7a68cb22b9e8439896326 blob 57 90 848296 1 34a68de99f94f6f9e437a288349602768eae4b92
a7eacc2c62dfd538c2948cce08cd217cc72a7140 blob 57 90 848386 1 34a68de99f94f6f9e437a288349602768eae4b92
291b2d8c01a9bc50bc4605bc479a183193de2e45 blob 57 90 848476 1 34a68de99f94f6f9e437a288349602768eae4b92
464adf43722b49bca34d8727d70db33c9ec70097 blob 57 90 848566 1 34a68de99f94f6f9e437a288349602768eae4b92
aa6095774c04683081cad47f300324a88ea95f2e blob 57 90 848656 1 34a68de99f94f6f9e437a288349602768eae4b92
896562b116d22c48f8872854123c523b76928061 blob 57 90 848746 1 34a68de99f94f6f9e437a288349602768eae4b92
f01eb69ea9caabb9fe801ef0f1bfdfa4477e0e34 blob 57 90 848836 1 34a68de99f94f6f9e437a288349602768eae4b92
d8603740ffe28d592c9d10ae2d6ec9dd0cf71949 blob 57 90 848926 1 34a68de99f94f6f9e437a288349602768eae4b92
8eb88090ce51c8ce838b12302c761bbf806c3fcc blob 57 90 849016 1 34a68de99f94f6f9e437a288349602768eae4b92
e961d288a95c209fe01ba42f01a18605eb5a85d3 blob 57 90 849106 1 34a68de99f94f6f9e437a288349602768eae4b92
abd14d13fada2545825fdf71c5d4a22ebb60f697 blob 57 90 849196 1 34a68de99f94f6f9e437a288349602768eae4b92
6a54ffedf41f419c66f6cd734a27ec5968f79b5a blob 57 90 849286 1 34a68de99f94f6f9e437a288349602768eae4b92
b6fa6c3c025c4f875c78423ab993a9349cd964c5 blob 57 90 849376 1 34a68de99f94f6f9e437a288349602768eae4b92
088e69e7ab273e35b4f63ecb1b915a3997f13dff blob 57 90 849466 1 34a68de99f94f6f9e437a288349602768eae4b92
609652080c31409406c828cb996e41fa6a286654 blob 57 90 849556 1 34a68de99f94f6f9e437a288349602768eae4b92
90d3d9b65a2f0c939f45a86f65192846e8066e7f blob 57 90 849646 1 34a68de99f94f6f9e437a288349602768eae4b92
05b4f18d9841f7abb271e81accadea31c5416a71 blob 57 90 849736 1 34a68de99f94f6f9e437a288349602768eae4b92
cfdd1e216211554d586bb3be233190457c5f5c0d blob 57 90 849826 1 34a68de99f94f6f9e437a288349602768eae4b92
73375ca0591d6c17f37b9f287a7c19f368fc644f blob 57 90 849916 1 34a68de99f94f6f9e437a288349602768eae4b92
46cd94a7854b7360f8f8a7e637e2575e707f7b04 blob 57 90 850006 1 34a68de99f94f6f9e437a288349602768eae4b92
ec35852188f9e88aa67849934b0c50bd698fafef blob 57 90 850096 1 34a68de99f94f6f9e437a288349602768eae4b92
0106e17481932f5c223fafadc1d26abc6adf40d6 blob 57 90 850186 1 34a68de99f94f6f9e437a288349602768eae4b92
f846f988e45d97ac0163885e65920643f0029922 blob 57 90 850276 1 34a68de99f94f6f9e437a288349602768eae4b92
636d415b097ff0c103e63d09d96aeb07fdad2045 blob 57 90 850366 1 34a68de99f94f6f9e437a288349602768eae4b92
497017bb8901086d3120553a384f3500ceb86f2e blob 57 90 850456 1 34a68de99f94f6f9e437a288349602768eae4b92
c50bc0b26b2336dbe90b9c7bdaa8d4cfb8f65638 blob 57 90 850546 1 34a68de99f94f6f9e437a288349602768eae4b92
921538e73389e99e294938d8580ababdb639f140 blob 57 90 850636 1 34a68de99f94f6f9e437a288349602768eae4b92
9ede1b01ec1751bf9ca9d5845ac005edc6935601 blob 57 90 850726 1 34a68de99f94f6f9e437a288349602768eae4b92
1ba5df91f11a1011f4788bc4cc067743828dda41 blob 57 90 850816 1 34a68de99f94f6f9e437a288349602768eae4b92
188728c24ca8cf687133dd0a5782e8819cee10a6 blob 57 90 850906 1 34a68de99f94f6f9e437a288349602768eae4b92
cb0d0270d7c50e33aacd9a4247333622c62846a4 blob 57 90 850996 1 34a68de99f94f6f9e437a288349602768eae4b92
dd39f8544a79066c925baca19ddc02623970efd1 blob 57 90 851086 1 34a68de99f94f6f9e437a288349602768eae4b92
d0b35a20e2ffaa46d895d6296f555dd98956d536 blob 57 90 851176 1 34a68de99f94f6f9e437a288349602768eae4b92
ae274e8cd31f35d743e68b3c8420e604386fc514 blob 57 90 851266 1 34a68de99f94f6f9e437a288349602768eae4b92
d1ede5db04b30c10d395c13dec020c90320498b8 blob 57 90 851356 1 34a68de99f94f6f9e437a288349602768eae4b92
2adace6c3082b12f42112482372696d66c36e4ae blob 57 90 851446 1 34a68de99f94f6f9e437a288349602768eae4b92
035e7e54cee9eb197af435b6b6dcced489c233f6 blob 57 90 851536 1 34a68de99f94f6f9e437a288349602768eae4b92
74aced6a3316fd8d726932ed908b035cd33afef6 blob 57 90 851626 1 34a68de99f94f6f9e437a288349602768eae4b92
efbbfa01b16e997301bb440aad9c885321bb13d2 blob 57 90 851716 1 34a68de99f94f6f9e437a288349602768eae4b92
92433746fe3340a5d4bc3f5487545f5167eaeaad blob 57 90 851806 1 34a68de99f94f6f9e437a288349602768eae4b92
da7b351a2560fd44fe89fc6288c3efa72eace9eb blob 57 90 851896 1 34a68de99f94f6f9e437a288349602768eae4b92
63176d3a0ae88aee86fa1b2b4390ed0850e67a9b blob 57 90 851986 1 34a68de99f94f6f9e437a288349602768eae4b92
5e10cf16f2bf33110cf59f53d583527d676820e1 blob 57 90 852076 1 34a68de99f94f6f9e437a288349602768eae4b92
aeb87caeb18972ad237d4c5628bfedb2dca51d47 blob 57 90 852166 1 34a68de99f94f6f9e437a288349602768eae4b92
141df301ab1d7f9e40b90fb4435ec4ac40ae544d blob 57 90 852256 1 34a68de99f94f6f9e437a288349602768eae4b92
e7172196f3fd2742cbe382daa02fd9641b9f6ffb blob 57 90 852346 1 34a68de99f94f6f9e437a288349602768eae4b92
4e78d6c905bc6d0c06ad066400f0570a391f9385 blob 57 90 852436 1 34a68de99f94f6f9e437a288349602768eae4b92
c096ccf827c047c3a20cfb1dd3fd5b0485ec2a0b blob 57 90 852526 1 34a68de99f94f6f9e437a288349602768eae4b92
91c4bc3b3c200535d88f76e9e3566658cb7b2bfd blob 57 90 852616 1 34a68de99f94f6f9e437a288349602768eae4b92
0b7888c3e508fe256fe859ba46c77d100abbce3f blob 57 90 852706 1 34a68de99f94f6f9e437a288349602768eae4b92
36cfe418f3038689cd47b64845c6f24886f9ec73 blob 57 90 852796 1 34a68de99f94f6f9e437a288349602768eae4b92
54c9d6ab199e99bdbba483ef1287e0cc31fc84b3 blob 57 90 852886 1 34a68de99f94f6f9e437a288349602768eae4b92
8b64b7aafc16c177bcc58813c7a853f622feb10f blob 57 90 852976 1 34a68de99f94f6f9e437a288349602768eae4b92
6ff2ccef89b04f0539f51c0ffcbe5f7bcf108ced blob 57 90 853066 1 34a68de99f94f6f9e437a288349602768eae4b92
7b419ded53760b5dbe136c1ec83ef3f338fab544 blob 57 90 853156 1 34a68de99f94f6f9e437a288349602768eae4b92
non delta: 112 objects
chain length = 1: 110 objects
chain length = 2: 10 objects
chain length = 3: 10 objects
chain length = 4: 10 objects
chain length = 5: 10 objects
chain length = 6: 10 objects
chain length = 7: 10 objects
chain length = 8: 10 objects
chain length = 9: 10 objects
test-3-1c54d893dd9bf6645ecee2886ea72f2c2030bea1.pack: ok
ok 13 - index v2: verify a pack with some 64-bit offsets
expecting success: ! cmp "test-2-${pack2}.idx" "test-3-${pack3}.idx"
test-2-1c54d893dd9bf6645ecee2886ea72f2c2030bea1.idx test-3-1c54d893dd9bf6645ecee2886ea72f2c2030bea1.idx differ: char 8281, line 24
ok 14 - 64-bit offsets: should be different from previous index v2 results
expecting success: git index-pack --index-version=2,0x40000 -o 3.idx "test-1-${pack1}.pack"
1c54d893dd9bf6645ecee2886ea72f2c2030bea1
ok 15 - index v2: force some 64-bit offsets with index-pack
expecting success: cmp "test-3-${pack3}.idx" "3.idx"
ok 16 - 64-bit offsets: index-pack result should match pack-objects one
expecting success:
# This cheats by knowing which lower offset should still be encoded
# in 64-bit representation.
git index-pack --verify --index-version=2,0x40000 "test-3-${pack3}.pack"
ok 17 - index-pack --verify on 64-bit offset v2 (cheat)
expecting success:
git index-pack --verify "test-3-${pack3}.pack"
ok 18 - index-pack --verify on 64-bit offset v2
expecting success: git index-pack --index-version=1 --stdin < "test-1-${pack1}.pack" &&
git prune-packed &&
git count-objects | ( read nr rest && test "$nr" -eq 1 ) &&
cmp "test-1-${pack1}.pack" ".git/objects/pack/pack-${pack1}.pack" &&
cmp "test-1-${pack1}.idx" ".git/objects/pack/pack-${pack1}.idx"
pack 1c54d893dd9bf6645ecee2886ea72f2c2030bea1
ok 19 - [index v1] 1) stream pack to repository
expecting success: # This test assumes file_101 is a delta smaller than 16 bytes.
# It should be against file_100 but we substitute its base for file_099
sha1_101=$(git hash-object file_101) &&
sha1_099=$(git hash-object file_099) &&
offs_101=$(index_obj_offset 1.idx $sha1_101) &&
nr_099=$(index_obj_nr 1.idx $sha1_099) &&
chmod +w ".git/objects/pack/pack-${pack1}.pack" &&
dd of=".git/objects/pack/pack-${pack1}.pack" seek=$(($offs_101 + 1)) \
if=".git/objects/pack/pack-${pack1}.idx" \
skip=$((4 + 256 * 4 + $nr_099 * 24)) \
bs=1 count=20 conv=notrunc &&
git cat-file blob $sha1_101 > file_101_foo1
20+0 records in
20+0 records out
20 bytes copied, 0.000234983 s, 85.1 kB/s
ok 20 - [index v1] 2) create a stealth corruption in a delta base reference
expecting success: test -f file_101_foo1 && ! cmp file_101 file_101_foo1
file_101 file_101_foo1 differ: char 5, line 2
ok 21 - [index v1] 3) corrupted delta happily returned wrong data
expecting success: test_must_fail git fsck --full $commit
error: .git/objects/pack/pack-1c54d893dd9bf6645ecee2886ea72f2c2030bea1.pack pack checksum mismatch
error: packed 0b968294884af115eb5a1b941b3dabd48470c3bb from .git/objects/pack/pack-1c54d893dd9bf6645ecee2886ea72f2c2030bea1.pack is corrupt
ok 22 - [index v1] 4) confirm that the pack is actually corrupted
expecting success: pack4=$(git pack-objects test-4 <obj-list) &&
test -f "test-4-${pack4}.pack"
ok 23 - [index v1] 5) pack-objects happily reuses corrupted data
expecting success: test_must_fail git verify-pack -v "test-4-${pack4}.pack"
4307528f01beff143cd36a903cb8c9a9983a4c27 tree 12036 7200 12
e43b5801e4ac39a512e5d9423fc272cf5c3343f9 blob 300 313 7212
78fcb2fa30f448929fae32736f0fb56733d08746 blob 108 141 7525 1 e43b5801e4ac39a512e5d9423fc272cf5c3343f9
1c547eac61c40965963e85a56c24991ab1a0e3ef blob 108 141 7666 2 78fcb2fa30f448929fae32736f0fb56733d08746
571c7b54485960a9820927983c702eec1b41e91a blob 108 141 7807 3 1c547eac61c40965963e85a56c24991ab1a0e3ef
671d8800ae6936f107d70de2dbec536afb47d89a blob 108 141 7948 4 571c7b54485960a9820927983c702eec1b41e91a
f2377b316d0d92e3c29a2d6dba598ca02fb80e9c blob 108 141 8089 5 671d8800ae6936f107d70de2dbec536afb47d89a
0483297992ed4cd5ab3b5790912b1f03598ea660 blob 108 141 8230 6 f2377b316d0d92e3c29a2d6dba598ca02fb80e9c
1ddb0e1ff0db350df93807fda44ef75358d7ddb0 blob 108 141 8371 7 0483297992ed4cd5ab3b5790912b1f03598ea660
19dec2e189cd33584d2173979aecea01b3c59904 blob 108 141 8512 8 1ddb0e1ff0db350df93807fda44ef75358d7ddb0
2bc95d3b86ed1808b73d84f5c0287a61df979063 blob 108 141 8653 9 19dec2e189cd33584d2173979aecea01b3c59904
b8f11d512203fd0260eb79edd5cfca416ca404cb blob 300 313 8794
ef790963bda7ffd9e3556cf4211492680b34c2bf blob 108 141 9107 1 b8f11d512203fd0260eb79edd5cfca416ca404cb
a854bd2ad779f987395c790d0aa378277a7d3216 blob 108 141 9248 2 ef790963bda7ffd9e3556cf4211492680b34c2bf
b750a0431df80025eff766f0811e6a85e1dbc32a blob 108 141 9389 3 a854bd2ad779f987395c790d0aa378277a7d3216
9e793c3eeb7402e17eafb61928b96648a54a8789 blob 108 141 9530 4 b750a0431df80025eff766f0811e6a85e1dbc32a
35691bb59cfc8e5f0749a3c2df2d236150d7f7d1 blob 108 141 9671 5 9e793c3eeb7402e17eafb61928b96648a54a8789
0df5edef6dcc6452cf814984a4d4ea23a8e41e3c blob 108 141 9812 6 35691bb59cfc8e5f0749a3c2df2d236150d7f7d1
305f923c2d2e1fff9ec067b42443fff88aeebc67 blob 108 141 9953 7 0df5edef6dcc6452cf814984a4d4ea23a8e41e3c
67db08cb82e0053ee51773fbf4bdc50094e03767 blob 108 141 10094 8 305f923c2d2e1fff9ec067b42443fff88aeebc67
61a87ea87b8af074a75d0af78e77f2ed6141922c blob 108 141 10235 9 67db08cb82e0053ee51773fbf4bdc50094e03767
5e69af01a42867f9be8213089efc57c6a1517976 blob 300 313 10376
1280048552e2ee86127654132148d3c2e208b397 blob 108 141 10689 1 5e69af01a42867f9be8213089efc57c6a1517976
ec86b748af33306ff620ebe591da28ed622c1b4d blob 108 141 10830 2 1280048552e2ee86127654132148d3c2e208b397
ce83a0772693235f137100863f4217f9c6398a53 blob 108 141 10971 3 ec86b748af33306ff620ebe591da28ed622c1b4d
ebd5d1af0d246aa4f8e288c539b906eb765d48e1 blob 108 141 11112 4 ce83a0772693235f137100863f4217f9c6398a53
ef99659edf6a12a9320e29453d1e17054863c3d1 blob 108 141 11253 5 ebd5d1af0d246aa4f8e288c539b906eb765d48e1
17dc4d50c25440e569d3c4dabf41bb562c9013fc blob 108 141 11394 6 ef99659edf6a12a9320e29453d1e17054863c3d1
36a0964d29672133cea581290233bae77c3b8cca blob 108 141 11535 7 17dc4d50c25440e569d3c4dabf41bb562c9013fc
60a658626764685c980311c6325263eabdbe0547 blob 108 141 11676 8 36a0964d29672133cea581290233bae77c3b8cca
a7b6688d2a6f15e6f91d1701f64ca7da42a5a73a blob 108 141 11817 9 60a658626764685c980311c6325263eabdbe0547
ef1259b944f1b0c4ade62c049c2ea41daf63ccc7 blob 300 313 11958
612f382c01ffd0ea89c2a840cc683cfd1108628e blob 108 141 12271 1 ef1259b944f1b0c4ade62c049c2ea41daf63ccc7
ba0b924be466e9d85f8ba5563211e570d12d2841 blob 108 141 12412 2 612f382c01ffd0ea89c2a840cc683cfd1108628e
d05e80ce75fe6189e1b08dfc5fb9bf0a1a6e544e blob 108 141 12553 3 ba0b924be466e9d85f8ba5563211e570d12d2841
e80b417ea517c993f906556a00fa8acaceb559b4 blob 108 141 12694 4 d05e80ce75fe6189e1b08dfc5fb9bf0a1a6e544e
8cc2e1974c339c43bd481c205ea0024b54dbcb83 blob 108 141 12835 5 e80b417ea517c993f906556a00fa8acaceb559b4
8e57f0560c1135c5cdaca2c69094489ad6ddcdb0 blob 108 141 12976 6 8cc2e1974c339c43bd481c205ea0024b54dbcb83
416013a155571063a96f1e443ee44a8ac3f09c1b blob 108 141 13117 7 8e57f0560c1135c5cdaca2c69094489ad6ddcdb0
8dc7c392787f4ec7bb28c57bc6744a2b5f3122ed blob 108 141 13258 8 416013a155571063a96f1e443ee44a8ac3f09c1b
beb699952b6a188a54675c11696cb6a2652b5249 blob 108 141 13399 9 8dc7c392787f4ec7bb28c57bc6744a2b5f3122ed
0f66db930e6ce643852ad45eb91dc203575fb5f4 blob 300 313 13540
9a3a619d26a6e19b556d119d760b40a6397a9df4 blob 108 141 13853 1 0f66db930e6ce643852ad45eb91dc203575fb5f4
66336af04f97cfd40474e8aa4cea2e25275b5f94 blob 108 141 13994 2 9a3a619d26a6e19b556d119d760b40a6397a9df4
bf8886056d3abf37690115bfee10bf14ef5e4db9 blob 108 141 14135 3 66336af04f97cfd40474e8aa4cea2e25275b5f94
2c1120aee9298045837641feab263b3655725aa3 blob 108 141 14276 4 bf8886056d3abf37690115bfee10bf14ef5e4db9
f47f0d90220589a45dbccd06c8468eca7c04d70a blob 108 141 14417 5 2c1120aee9298045837641feab263b3655725aa3
add63edc5ce2dd58ff7d66b153f44d03b0d93df2 blob 108 141 14558 6 f47f0d90220589a45dbccd06c8468eca7c04d70a
75642e5399f1b51a33f0c6430af2fd997e4db578 blob 108 141 14699 7 add63edc5ce2dd58ff7d66b153f44d03b0d93df2
64e473488413d66fe6e464b3f09827501eb353fe blob 108 141 14840 8 75642e5399f1b51a33f0c6430af2fd997e4db578
597244daf249731fc922a26acfe6fb9ea3baca7f blob 108 141 14981 9 64e473488413d66fe6e464b3f09827501eb353fe
8d5f6b41255c60ea8f44892b918a38eebe43de6b blob 300 313 15122
c26e8fbe6bd52d34b340f61780b6e3dd3b9bed94 blob 108 141 15435 1 8d5f6b41255c60ea8f44892b918a38eebe43de6b
0246ff570c396c37ff08c0f5f9d88c84fc21a297 blob 108 141 15576 2 c26e8fbe6bd52d34b340f61780b6e3dd3b9bed94
cff9bb4b47c1bc50205d6a793d8d02bee852a229 blob 108 141 15717 3 0246ff570c396c37ff08c0f5f9d88c84fc21a297
2096ec927d087ee1076f1118e8fe48ab21a27bd7 blob 108 141 15858 4 cff9bb4b47c1bc50205d6a793d8d02bee852a229
0ff6b3e6f0b0957b5b05a06d9b4580f0e1798501 blob 108 141 15999 5 2096ec927d087ee1076f1118e8fe48ab21a27bd7
633de7a70fe29cecb721bb5033573fbf175b31fc blob 108 141 16140 6 0ff6b3e6f0b0957b5b05a06d9b4580f0e1798501
76db9ca0f1afa9c247d4c5a2fe60ca95154fd465 blob 108 141 16281 7 633de7a70fe29cecb721bb5033573fbf175b31fc
df4c5c8e8e25621bba74f233d59c76e5810f8677 blob 108 141 16422 8 76db9ca0f1afa9c247d4c5a2fe60ca95154fd465
9fc4cce844af6ed26932eb84045df0ab4a79f0b7 blob 108 141 16563 9 df4c5c8e8e25621bba74f233d59c76e5810f8677
ef3ddda4c2922f10089dfed6436267b445d5b118 blob 300 313 16704
1bdedd473270eef5c2c67c968ba1d5ee081013ee blob 108 141 17017 1 ef3ddda4c2922f10089dfed6436267b445d5b118
9d28c1ea0790ee28b8c35bc3fe88629980708730 blob 108 141 17158 2 1bdedd473270eef5c2c67c968ba1d5ee081013ee
a3264a35996ccaf722f869be8e379864e28ef561 blob 108 141 17299 3 9d28c1ea0790ee28b8c35bc3fe88629980708730
cd6f1b15bb20b9c706f8f80c77b7c210921f0b26 blob 108 141 17440 4 a3264a35996ccaf722f869be8e379864e28ef561
60601746c22df38cc0bcbce68f359fb2796d7569 blob 108 141 17581 5 cd6f1b15bb20b9c706f8f80c77b7c210921f0b26
f15a3f5dae93709cce491d407dad343f9577d8c5 blob 108 141 17722 6 60601746c22df38cc0bcbce68f359fb2796d7569
5dd384bbc7186571a9cccdba2ebaa794e87bfbdd blob 108 141 17863 7 f15a3f5dae93709cce491d407dad343f9577d8c5
d18475904b78554f1fd6f96b4c1ad44e84edf873 blob 108 141 18004 8 5dd384bbc7186571a9cccdba2ebaa794e87bfbdd
67728c76be3b7d5319ff2a93fc78aca0ff3824eb blob 108 141 18145 9 d18475904b78554f1fd6f96b4c1ad44e84edf873
c1ec14f204e244f32aa93c66e3fb6a7d4f58c081 blob 300 313 18286
258424ed6e5c4377a2aa55fb6d4818a3580291ad blob 108 141 18599 1 c1ec14f204e244f32aa93c66e3fb6a7d4f58c081
fcaa7a21cb9d0b0aa84d2cbac5115d7c300739a2 blob 108 141 18740 2 258424ed6e5c4377a2aa55fb6d4818a3580291ad
e1bfca166c2ff676f665fd3c58d7dea896ec48d7 blob 108 141 18881 3 fcaa7a21cb9d0b0aa84d2cbac5115d7c300739a2
383c3c67e93cfd05d272b187e3af5c1e00bcae5c blob 108 141 19022 4 e1bfca166c2ff676f665fd3c58d7dea896ec48d7
ad6a3267a9e0d49014eec133a5e968315e8ce834 blob 108 141 19163 5 383c3c67e93cfd05d272b187e3af5c1e00bcae5c
9dfc592085bb14371890b41e48c98b220420669b blob 108 141 19304 6 ad6a3267a9e0d49014eec133a5e968315e8ce834
c872afc7539f689178b7385010010ca7aef8f09a blob 108 141 19445 7 9dfc592085bb14371890b41e48c98b220420669b
1bc038b18c5039a05e173da2fd2b65b3d34ccd2b blob 108 141 19586 8 c872afc7539f689178b7385010010ca7aef8f09a
bdd7bd883f75c1726538851757168dc0dc33e222 blob 108 141 19727 9 1bc038b18c5039a05e173da2fd2b65b3d34ccd2b
71529d6ca58922aa05603b6f2784f87cad8703cf blob 300 313 19868
2bebfa6240e319a1c31951d05c8135f089fbbd29 blob 108 141 20181 1 71529d6ca58922aa05603b6f2784f87cad8703cf
83fcb919ae7bc9a80912c9bfd5731acd36666480 blob 108 141 20322 2 2bebfa6240e319a1c31951d05c8135f089fbbd29
b97506df40bbd212b52062b851cd88f04abb59b3 blob 108 141 20463 3 83fcb919ae7bc9a80912c9bfd5731acd36666480
298dc4942c3b3db53d484ffa86b451755cd2125f blob 108 141 20604 4 b97506df40bbd212b52062b851cd88f04abb59b3
ba11c807afc9699e7ea1cab791699bfd698c7e7d blob 108 141 20745 5 298dc4942c3b3db53d484ffa86b451755cd2125f
b1281e620292c2e74d8770eb99f0b6871e4cca59 blob 108 141 20886 6 ba11c807afc9699e7ea1cab791699bfd698c7e7d
368cd4d02a420764e0d31b35576f73b777c34604 blob 108 141 21027 7 b1281e620292c2e74d8770eb99f0b6871e4cca59
16d1323e84e3d5b058ab2ac8245db85bc4606c88 blob 108 141 21168 8 368cd4d02a420764e0d31b35576f73b777c34604
711d5e6b0d21b3aa205dcc960ec51475be8a25a5 blob 108 141 21309 9 16d1323e84e3d5b058ab2ac8245db85bc4606c88
d174d532539487c9aedbbaf38d556061b5acf826 blob 300 313 21450
bf5dcb9013df15ff0ae10e0682a92a7688a7720b blob 108 141 21763 1 d174d532539487c9aedbbaf38d556061b5acf826
fb214b786310655bc8ee46d89ca9a04ec9aed0c3 blob 108 141 21904 2 bf5dcb9013df15ff0ae10e0682a92a7688a7720b
b94140f4006d05e7e3822f5db19adc2b73a2cc05 blob 108 141 22045 3 fb214b786310655bc8ee46d89ca9a04ec9aed0c3
4019b50c838197ca4b8d664a4164a183cac8ad11 blob 108 141 22186 4 b94140f4006d05e7e3822f5db19adc2b73a2cc05
2826157afde0e74742115842ac2dddf5c3b5e23e blob 108 141 22327 5 4019b50c838197ca4b8d664a4164a183cac8ad11
99556fcde6a0be62a72c8b0c6682576a1d596bea blob 108 141 22468 6 2826157afde0e74742115842ac2dddf5c3b5e23e
8f5e7974c287b07f1cf8116485c4135340b807f3 blob 108 141 22609 7 99556fcde6a0be62a72c8b0c6682576a1d596bea
f9982291dfe87a9def1b12d24f9ca9a024a9dd8e blob 108 141 22750 8 8f5e7974c287b07f1cf8116485c4135340b807f3
3c5c0be699798d2f4fbe651051b9f17156f133c1 blob 108 141 22891 9 f9982291dfe87a9def1b12d24f9ca9a024a9dd8e
1297547aab30f952af805d38f6f1c1930cb3117b blob 8196 8210 23032
862f6954d9afd549b48fa2ef8e2f8ab96e309916 blob 8196 8210 31242
0471b3b8ab8da19f3968dc238e9555f4e48ce858 blob 8196 8210 39452
c80092496b80b5f21503b8c838dccfc1f2e2ddde blob 8196 8210 47662
e5a12c79cec70d52817054c4b9ef321003c6755f blob 8196 8210 55872
bf96a31446f37d8e57bb38a00797aa3af1f99370 blob 8196 8210 64082
0508b858e01f0367552fb14722388ba48dbd36f7 blob 8196 8210 72292
359017d1534767455090901a260985de1658d752 blob 8196 8210 80502
8d06001a3d38390afa66576caa6c55c796e33835 blob 8196 8210 88712
8162ceb825c07e3b1e17f5775665085da9b1e855 blob 8196 8210 96922
6910c5a645c9fe7f6b728034566b1668f0677a8e blob 8196 8210 105132
09ba511a995b8ea75067036d5c046f39052a3bd8 blob 8196 8210 113342
f45d142313c7a5270a60c664bb463cddadc467c1 blob 8196 8210 121552
964e51bf7d344bda71ea5e12dbd7bfb90120fcf0 blob 8196 8210 129762
408dd031138139f6ac6f402988f960527871f71a blob 8196 8210 137972
912fa0ec5536f31122e34577a4baf3b22d40de2a blob 8196 8210 146182
f02359c44ca04a542cc5bf59aa5f1de6cd1d5a4c blob 8196 8210 154392
b0566dd5d479c80c278bd5455c92aca689328471 blob 8196 8210 162602
49d17d605f042c1e978a68f625be6ab6294fa8fa blob 8196 8210 170812
8f744480abe8ad05bc419d1ab2e375b9c0fa3978 blob 8196 8210 179022
fff3a3a92d2268a464dbdcd00fc055885ee3cba9 blob 8196 8210 187232
f5fc0ff4afc14d9dfcb2580d3f438edd4cd8130a blob 8196 8210 195442
01179d82b18c252824e20e190543e0e84950d820 blob 8196 8210 203652
de3ed457f973b7ffb20edc36002c47a6e4b41066 blob 8196 8210 211862
9c4e1f8c16d04d90a2217279240996276d617067 blob 8196 8210 220072
816f18d19f433f5df9edbfb5547684b519fdeb3b blob 8196 8210 228282
72e7428e5ee3797ca0bf955f723b915bee919c48 blob 8196 8210 236492
41adb5af8e7f9737b16261fb0c224c7550c82f23 blob 8196 8210 244702
94f5d368a7c4ea294c463dc45cf15d387fa83c4e blob 8196 8210 252912
85fdf2eed169dbc1fe2d71439b589b0326dad12b blob 8196 8210 261122
bab18d872e9183c6d450b326477205bb0cc081cb blob 8196 8210 269332
b31fb3fb181512bc608b58cb33323d97ad6eac2f blob 8196 8210 277542
20a9519106ab64bf043456a58b6bfb04f1c7b39d blob 8196 8210 285752
94a015b2b6053f7a1d541969919e879bb2b75eef blob 8196 8210 293962
7353550b9b0e1da4f68b9484dfad2634100a00cc blob 8196 8210 302172
e28a360bcbd69ca1a0bb47834e640069c6672a8d blob 8196 8210 310382
8e6ffc05856460c2e08c8e9d824bbf510d3c1b52 blob 8196 8210 318592
ceade5760b1ba0bc11d4e4db6982ddf671495e58 blob 8196 8210 326802
92534f38b94c1da321d88c9ab5af8c3e804c2507 blob 8196 8210 335012
f5577acbfd83dddf90b2054d6cb5dce2df6d06ee blob 8196 8210 343222
59a27076dc0a8989215a160d61ac401e41c05126 blob 8196 8210 351432
2db6b919f253444b5437d8251e5d101d5a34e1b3 blob 8196 8210 359642
c1c35c36d4300da28c0570746adaf2f5b0b015a3 blob 8196 8210 367852
03a6f56dbbb556425ef8c43c31519b32eb5629a4 blob 8196 8210 376062
dd6209d4c0c5d4f210a8d1bb4a4d314cf284dea9 blob 8196 8210 384272
8c04fa425f4dfb4555b376e73d8f28d56b97a569 blob 8196 8210 392482
614e235cd8ca8af7ccf402a92eb34baadaaa3f18 blob 8196 8210 400692
b2f07ee5771d9e0de7166bc72a4a7ebce9830779 blob 8196 8210 408902
852ba0cf084474c1b0b48052606ae27346a5b1a1 blob 8196 8210 417112
15ff79f644a0596529eba0592017dce39e222b8e blob 8196 8210 425322
75f67c0c230f8923db5831094b1cc67f61bf1734 blob 8196 8210 433532
95b51158cd6365da9b10f1d8b06ba76dc5d5c5f1 blob 8196 8210 441742
5217ce416b26a3d76191d873490110746d0e8a04 blob 8196 8210 449952
c16eb68827fa5d6da73b320b431cf736c7a6a4af blob 8196 8210 458162
57983aab7f7384626a6a1f9ec08fba1902dd11e5 blob 8196 8210 466372
84e4d2ce637781776791c8e2cf4a9312a2783ceb blob 8196 8210 474582
2175a1a9d8757b3836f5cc44c6af0297aea36709 blob 8196 8210 482792
9b655d54faaf0a737a03731852f27cf6b552bcaf blob 8196 8210 491002
a3233ba1323f07a0d68f6020e7209025819cfa13 blob 8196 8210 499212
5a65a213ee0ebdc285c8e8eca24e9eda97f8a384 blob 8196 8210 507422
de1679ebb44d3fe59e8d2378471b56db384fb181 blob 8196 8210 515632
d2e455cc03081911f9ecd81245becd858d1e64ca blob 8196 8210 523842
72826d3e97bc228616e06235566a0db59c94bd74 blob 8196 8210 532052
debe389b3bdd62d96748db592e99cb0cc7b1b0f2 blob 8196 8210 540262
e572e59eee8119f8fb58e8595ecd0c622f2d6e29 blob 8196 8210 548472
197f45d948a36ac3762e5daf6ef4d43a5d969503 blob 8196 8210 556682
fb294d29a9d045d5a46a9c00e53777b394ceb346 blob 8196 8210 564892
10f7133774acbc162f5f79804744d64747eee380 blob 8196 8210 573102
16b9dea85eab6d7e452bdea4889e24a8ad79afd5 blob 8196 8210 581312
08a8cf223e5dc57504da3cd8eb56d33f276dc1b9 blob 8196 8210 589522
e3332ff9a2540b45e599be0c7bca8bbe28af2b43 blob 8196 8210 597732
5e1b961ae623672df764f64b737f332318d43baa blob 8196 8210 605942
14caba1bc2835573f3c20b7f2e5fb638a08e12ee blob 8196 8210 614152
84d1369c26d187b24dffe9029e81e119e4a374f5 blob 8196 8210 622362
5ef3a0f4954ade2d5c290ccc4d791c3b219d89ea blob 8196 8210 630572
610d16151ceb1dc4d5138f63ed410819a8b9161c blob 8196 8210 638782
3545eb1f5549261267ab0577b94372e88b49731d blob 8196 8210 646992
0d6e5c0388744cf82463ce1283ff99e863e9b26e blob 8196 8210 655202
611261b75bd720d3433ea8975d555b1ac3e692bd blob 8196 8210 663412
e25dc2ac80f9f78aa2809b5cd254ce47a51efbe5 blob 8196 8210 671622
ea5a4b4fed0bab7beffd3c7fc6cc549df47017d7 blob 8196 8210 679832
d68756996794df8c00dfcbf520662b14cb06958e blob 8196 8210 688042
b5b44a475116c2d0054edf54c699909d5d583aac blob 8196 8210 696252
99ff18078623c32b85a49cc8a03e3c58ee94eecb blob 8196 8210 704462
159fdc73e63cf90624d128d87b8185154727714e blob 8196 8210 712672
1f0ca97497381a196e53a7639ee769ed019469a3 blob 8196 8210 720882
6dbed45fde708bb67e6b21bd55976483305f9e74 blob 8196 8210 729092
b5ec32ad29b65e5742cd1857d17e92c2efc5da96 blob 8196 8210 737302
cf823d111604e8a014e0702b5e15b242bb961c78 blob 8196 8210 745512
72528baaeeba0d9c01da36a7a0add1ac49d860f2 blob 8196 8210 753722
b976a8fd346486d78cdebeaa0b0ac200befca629 blob 8196 8210 761932
e652cd97e9aae1523d892c1f417274dd26c3bcd3 blob 8196 8210 770142
aa82432626cc08fb818a20aa62b607aa52e7b35d blob 8196 8210 778352
d67069815168092ee0eadeab8177002bd0376b6f blob 8196 8210 786562
fa7ca115eb82e14f0263990362d4fc27591e1143 blob 8196 8210 794772
5cadb04c4d4ec953dffc528bf75561a6ae1c5820 blob 8196 8210 802982
a769ce6dfe1abe1b6162627b2b5df89f4f7d4317 blob 8196 8210 811192
bf265906aab0df90b6a4bdb1fe6f8088a9038435 blob 8196 8210 819402
b302b77fd5595784b5e85e91f8b4314fff49a6a1 blob 8196 8210 827612
3927444e44b49dfa6cdc768298ae879ec298c45d blob 8196 8210 835822
51e0bb44b17501c6803ca30f299ad8e69b21c8c4 blob 12 41 844032 1 b302b77fd5595784b5e85e91f8b4314fff49a6a1
34a68de99f94f6f9e437a288349602768eae4b92 blob 250 263 844073
8517d36660dffb896fb4e283ad110023aaebaf1b blob 57 90 844336 1 34a68de99f94f6f9e437a288349602768eae4b92
e3fc6633c069c8e246d77a408e4747c2852ba44a blob 57 90 844426 1 34a68de99f94f6f9e437a288349602768eae4b92
37a071e55d1f2e07af146ca6017d98dd85beae68 blob 57 90 844516 1 34a68de99f94f6f9e437a288349602768eae4b92
a8179a233b7aeeb7a450c5d321d4b73df936b64b blob 57 90 844606 1 34a68de99f94f6f9e437a288349602768eae4b92
99e0b239888c8b71671fb948e41111876e61a3c2 blob 57 90 844696 1 34a68de99f94f6f9e437a288349602768eae4b92
e26e04b4786bf6b0ec3c5d528e7002cd58e2401b blob 57 90 844786 1 34a68de99f94f6f9e437a288349602768eae4b92
a6106f10ea80724dbc32b328d9892111589a2111 blob 57 90 844876 1 34a68de99f94f6f9e437a288349602768eae4b92
d1669a170780865ccd7645211c2e1cebdfb28aad blob 57 90 844966 1 34a68de99f94f6f9e437a288349602768eae4b92
53a19e0c2c34ef1a4e1bbc9aa1cba4cb9bc2dd80 blob 57 90 845056 1 34a68de99f94f6f9e437a288349602768eae4b92
26ff29a62e7a6359d3975813fd645af871576125 blob 57 90 845146 1 34a68de99f94f6f9e437a288349602768eae4b92
c1d6b9953613f5732cd40d8cffbb2b746a71fb92 blob 57 90 845236 1 34a68de99f94f6f9e437a288349602768eae4b92
a2bfcc19d1592c43af33617500394e1ac09e968c blob 57 90 845326 1 34a68de99f94f6f9e437a288349602768eae4b92
36c0479c58cef0b9a10b56934ed42a862e1dcfe2 blob 57 90 845416 1 34a68de99f94f6f9e437a288349602768eae4b92
642aa265517d66c88f030a2230eb97e77c973905 blob 57 90 845506 1 34a68de99f94f6f9e437a288349602768eae4b92
29cd4721cd3cef7f5a2e032d6c2d6908427cd5af blob 57 90 845596 1 34a68de99f94f6f9e437a288349602768eae4b92
ae5ccb1578fbc399571f4f0132edd18c55b19ef0 blob 57 90 845686 1 34a68de99f94f6f9e437a288349602768eae4b92
d22feecdd32e57af8fd88bda0fbde8fbb96d4f1c blob 57 90 845776 1 34a68de99f94f6f9e437a288349602768eae4b92
ab2acc4bd273e799b56effc7e208a01814432ba5 blob 57 90 845866 1 34a68de99f94f6f9e437a288349602768eae4b92
2d5f83c6857691045da554091b8f2d82477d9baf blob 57 90 845956 1 34a68de99f94f6f9e437a288349602768eae4b92
fac99cd6f9219ee888b9382ee44a3b7932723b12 blob 57 90 846046 1 34a68de99f94f6f9e437a288349602768eae4b92
b32b0ed27f34e4a9d7c4aab24dfa2d6c51b1c2eb blob 57 90 846136 1 34a68de99f94f6f9e437a288349602768eae4b92
a3f38fbdbe8f34acc61f3a325104e739a875a4b6 blob 57 90 846226 1 34a68de99f94f6f9e437a288349602768eae4b92
6bc5c86eeb3dfcc3ca2343e39cc91dec35ddc90b blob 57 90 846316 1 34a68de99f94f6f9e437a288349602768eae4b92
38897be9103dbc6aff7d1ecd15c1dc6c6d18b0a7 blob 57 90 846406 1 34a68de99f94f6f9e437a288349602768eae4b92
69e0b8ef8cda369575b6801c6ed47daf09aa3c62 blob 57 90 846496 1 34a68de99f94f6f9e437a288349602768eae4b92
c3e6c8cf465113a74926f3d5c73a3b400970643c blob 57 90 846586 1 34a68de99f94f6f9e437a288349602768eae4b92
a31a03a60bad0896133e6e52982da2e7e22832ff blob 57 90 846676 1 34a68de99f94f6f9e437a288349602768eae4b92
735fe835bee0cfa2d7ecc2f195c22de3e7b208b3 blob 57 90 846766 1 34a68de99f94f6f9e437a288349602768eae4b92
84705bfd7a24eb59137fdc26c070c4329eee46a7 blob 57 90 846856 1 34a68de99f94f6f9e437a288349602768eae4b92
5090e761c398db8c0b3fe1c0069535c3b7a9a575 blob 57 90 846946 1 34a68de99f94f6f9e437a288349602768eae4b92
c5c8cc3525a17842c2e668d1499c7c2518202a87 blob 57 90 847036 1 34a68de99f94f6f9e437a288349602768eae4b92
441d41902c4ccb987a866663ebbcc729fbcc4072 blob 57 90 847126 1 34a68de99f94f6f9e437a288349602768eae4b92
55bc16727ba8a63a31eabd811cfc740dc423bab6 blob 57 90 847216 1 34a68de99f94f6f9e437a288349602768eae4b92
86c6bd761eacb8a021246263994bf02d1163c7b5 blob 57 90 847306 1 34a68de99f94f6f9e437a288349602768eae4b92
8812057b6f2583732f83db5bac543549cc621783 blob 57 90 847396 1 34a68de99f94f6f9e437a288349602768eae4b92
c8043aaa6a70318be94ef87be98ea2c7de7f23f5 blob 57 90 847486 1 34a68de99f94f6f9e437a288349602768eae4b92
9d48f3c2e700d81fbe46fbccc400bedc8666221a blob 57 90 847576 1 34a68de99f94f6f9e437a288349602768eae4b92
fd68f118bfc99562e08bd153a3f1c604f1ac0124 blob 57 90 847666 1 34a68de99f94f6f9e437a288349602768eae4b92
879bc6e196323012740d55b1e5bbd9937632ecf3 blob 57 90 847756 1 34a68de99f94f6f9e437a288349602768eae4b92
a3ed4b758faeca44e89792c3f1b0536b685d0552 blob 57 90 847846 1 34a68de99f94f6f9e437a288349602768eae4b92
d9dd72f666a9d30dee5cdd894ca365a82e965594 blob 57 90 847936 1 34a68de99f94f6f9e437a288349602768eae4b92
088ddcb945af72c47348b65a63992c71b6b9dbe8 blob 57 90 848026 1 34a68de99f94f6f9e437a288349602768eae4b92
9e7b55d50c530d08c120379e19bb1c1653bb3063 blob 57 90 848116 1 34a68de99f94f6f9e437a288349602768eae4b92
2dfd9df0b22049f88e22ae86e4370155ecb23271 blob 57 90 848206 1 34a68de99f94f6f9e437a288349602768eae4b92
9de2bb387fc8bf63dbc7a68cb22b9e8439896326 blob 57 90 848296 1 34a68de99f94f6f9e437a288349602768eae4b92
a7eacc2c62dfd538c2948cce08cd217cc72a7140 blob 57 90 848386 1 34a68de99f94f6f9e437a288349602768eae4b92
291b2d8c01a9bc50bc4605bc479a183193de2e45 blob 57 90 848476 1 34a68de99f94f6f9e437a288349602768eae4b92
464adf43722b49bca34d8727d70db33c9ec70097 blob 57 90 848566 1 34a68de99f94f6f9e437a288349602768eae4b92
aa6095774c04683081cad47f300324a88ea95f2e blob 57 90 848656 1 34a68de99f94f6f9e437a288349602768eae4b92
896562b116d22c48f8872854123c523b76928061 blob 57 90 848746 1 34a68de99f94f6f9e437a288349602768eae4b92
f01eb69ea9caabb9fe801ef0f1bfdfa4477e0e34 blob 57 90 848836 1 34a68de99f94f6f9e437a288349602768eae4b92
d8603740ffe28d592c9d10ae2d6ec9dd0cf71949 blob 57 90 848926 1 34a68de99f94f6f9e437a288349602768eae4b92
8eb88090ce51c8ce838b12302c761bbf806c3fcc blob 57 90 849016 1 34a68de99f94f6f9e437a288349602768eae4b92
e961d288a95c209fe01ba42f01a18605eb5a85d3 blob 57 90 849106 1 34a68de99f94f6f9e437a288349602768eae4b92
abd14d13fada2545825fdf71c5d4a22ebb60f697 blob 57 90 849196 1 34a68de99f94f6f9e437a288349602768eae4b92
6a54ffedf41f419c66f6cd734a27ec5968f79b5a blob 57 90 849286 1 34a68de99f94f6f9e437a288349602768eae4b92
b6fa6c3c025c4f875c78423ab993a9349cd964c5 blob 57 90 849376 1 34a68de99f94f6f9e437a288349602768eae4b92
088e69e7ab273e35b4f63ecb1b915a3997f13dff blob 57 90 849466 1 34a68de99f94f6f9e437a288349602768eae4b92
609652080c31409406c828cb996e41fa6a286654 blob 57 90 849556 1 34a68de99f94f6f9e437a288349602768eae4b92
90d3d9b65a2f0c939f45a86f65192846e8066e7f blob 57 90 849646 1 34a68de99f94f6f9e437a288349602768eae4b92
05b4f18d9841f7abb271e81accadea31c5416a71 blob 57 90 849736 1 34a68de99f94f6f9e437a288349602768eae4b92
cfdd1e216211554d586bb3be233190457c5f5c0d blob 57 90 849826 1 34a68de99f94f6f9e437a288349602768eae4b92
73375ca0591d6c17f37b9f287a7c19f368fc644f blob 57 90 849916 1 34a68de99f94f6f9e437a288349602768eae4b92
46cd94a7854b7360f8f8a7e637e2575e707f7b04 blob 57 90 850006 1 34a68de99f94f6f9e437a288349602768eae4b92
ec35852188f9e88aa67849934b0c50bd698fafef blob 57 90 850096 1 34a68de99f94f6f9e437a288349602768eae4b92
0106e17481932f5c223fafadc1d26abc6adf40d6 blob 57 90 850186 1 34a68de99f94f6f9e437a288349602768eae4b92
f846f988e45d97ac0163885e65920643f0029922 blob 57 90 850276 1 34a68de99f94f6f9e437a288349602768eae4b92
636d415b097ff0c103e63d09d96aeb07fdad2045 blob 57 90 850366 1 34a68de99f94f6f9e437a288349602768eae4b92
497017bb8901086d3120553a384f3500ceb86f2e blob 57 90 850456 1 34a68de99f94f6f9e437a288349602768eae4b92
c50bc0b26b2336dbe90b9c7bdaa8d4cfb8f65638 blob 57 90 850546 1 34a68de99f94f6f9e437a288349602768eae4b92
921538e73389e99e294938d8580ababdb639f140 blob 57 90 850636 1 34a68de99f94f6f9e437a288349602768eae4b92
9ede1b01ec1751bf9ca9d5845ac005edc6935601 blob 57 90 850726 1 34a68de99f94f6f9e437a288349602768eae4b92
1ba5df91f11a1011f4788bc4cc067743828dda41 blob 57 90 850816 1 34a68de99f94f6f9e437a288349602768eae4b92
188728c24ca8cf687133dd0a5782e8819cee10a6 blob 57 90 850906 1 34a68de99f94f6f9e437a288349602768eae4b92
cb0d0270d7c50e33aacd9a4247333622c62846a4 blob 57 90 850996 1 34a68de99f94f6f9e437a288349602768eae4b92
dd39ffatal: sha1 file 'test-4-48a1956df258ba8b8a12e47466ef8e10ada5d680.idx' validation error
8544a79066c925baca19ddc02623970efd1 blob 57 90 851086 1 34a68de99f94f6f9e437a288349602768eae4b92
d0b35a20e2ffaa46d895d6296f555dd98956d536 blob 57 90 851176 1 34a68de99f94f6f9e437a288349602768eae4b92
ae274e8cd31f35d743e68b3c8420e604386fc514 blob 57 90 851266 1 34a68de99f94f6f9e437a288349602768eae4b92
d1ede5db04b30c10d395c13dec020c90320498b8 blob 57 90 851356 1 34a68de99f94f6f9e437a288349602768eae4b92
2adace6c3082b12f42112482372696d66c36e4ae blob 57 90 851446 1 34a68de99f94f6f9e437a288349602768eae4b92
035e7e54cee9eb197af435b6b6dcced489c233f6 blob 57 90 851536 1 34a68de99f94f6f9e437a288349602768eae4b92
74aced6a3316fd8d726932ed908b035cd33afef6 blob 57 90 851626 1 34a68de99f94f6f9e437a288349602768eae4b92
efbbfa01b16e997301bb440aad9c885321bb13d2 blob 57 90 851716 1 34a68de99f94f6f9e437a288349602768eae4b92
92433746fe3340a5d4bc3f5487545f5167eaeaad blob 57 90 851806 1 34a68de99f94f6f9e437a288349602768eae4b92
da7b351a2560fd44fe89fc6288c3efa72eace9eb blob 57 90 851896 1 34a68de99f94f6f9e437a288349602768eae4b92
63176d3a0ae88aee86fa1b2b4390ed0850e67a9b blob 57 90 851986 1 34a68de99f94f6f9e437a288349602768eae4b92
5e10cf16f2bf33110cf59f53d583527d676820e1 blob 57 90 852076 1 34a68de99f94f6f9e437a288349602768eae4b92
aeb87caeb18972ad237d4c5628bfedb2dca51d47 blob 57 90 852166 1 34a68de99f94f6f9e437a288349602768eae4b92
141df301ab1d7f9e40b90fb4435ec4ac40ae544d blob 57 90 852256 1 34a68de99f94f6f9e437a288349602768eae4b92
e7172196f3fd2742cbe382daa02fd9641b9f6ffb blob 57 90 852346 1 34a68de99f94f6f9e437a288349602768eae4b92
4e78d6c905bc6d0c06ad066400f0570a391f9385 blob 57 90 852436 1 34a68de99f94f6f9e437a288349602768eae4b92
c096ccf827c047c3a20cfb1dd3fd5b0485ec2a0b blob 57 90 852526 1 34a68de99f94f6f9e437a288349602768eae4b92
91c4bc3b3c200535d88f76e9e3566658cb7b2bfd blob 57 90 852616 1 34a68de99f94f6f9e437a288349602768eae4b92
0b7888c3e508fe256fe859ba46c77d100abbce3f blob 57 90 852706 1 34a68de99f94f6f9e437a288349602768eae4b92
36cfe418f3038689cd47b64845c6f24886f9ec73 blob 57 90 852796 1 34a68de99f94f6f9e437a288349602768eae4b92
54c9d6ab199e99bdbba483ef1287e0cc31fc84b3 blob 57 90 852886 1 34a68de99f94f6f9e437a288349602768eae4b92
8b64b7aafc16c177bcc58813c7a853f622feb10f blob 57 90 852976 1 34a68de99f94f6f9e437a288349602768eae4b92
6ff2ccef89b04f0539f51c0ffcbe5f7bcf108ced blob 57 90 853066 1 34a68de99f94f6f9e437a288349602768eae4b92
7b419ded53760b5dbe136c1ec83ef3f338fab544 blob 57 90 853156 1 34a68de99f94f6f9e437a288349602768eae4b92
non delta: 112 objects
chain length = 1: 110 objects
chain length = 2: 10 objects
chain length = 3: 10 objects
chain length = 4: 10 objects
chain length = 5: 10 objects
chain length = 6: 10 objects
chain length = 7: 10 objects
chain length = 8: 10 objects
chain length = 9: 10 objects
test-4-48a1956df258ba8b8a12e47466ef8e10ada5d680.pack: bad
ok 24 - [index v1] 6) newly created pack is BAD !
expecting success: rm -f .git/objects/pack/* &&
git index-pack --index-version=2 --stdin < "test-1-${pack1}.pack" &&
git prune-packed &&
git count-objects | ( read nr rest && test "$nr" -eq 1 ) &&
cmp "test-1-${pack1}.pack" ".git/objects/pack/pack-${pack1}.pack" &&
cmp "test-2-${pack1}.idx" ".git/objects/pack/pack-${pack1}.idx"
pack 1c54d893dd9bf6645ecee2886ea72f2c2030bea1
ok 25 - [index v2] 1) stream pack to repository
expecting success: # This test assumes file_101 is a delta smaller than 16 bytes.
# It should be against file_100 but we substitute its base for file_099
sha1_101=$(git hash-object file_101) &&
sha1_099=$(git hash-object file_099) &&
offs_101=$(index_obj_offset 1.idx $sha1_101) &&
nr_099=$(index_obj_nr 1.idx $sha1_099) &&
chmod +w ".git/objects/pack/pack-${pack1}.pack" &&
dd of=".git/objects/pack/pack-${pack1}.pack" seek=$(($offs_101 + 1)) \
if=".git/objects/pack/pack-${pack1}.idx" \
skip=$((8 + 256 * 4 + $nr_099 * 20)) \
bs=1 count=20 conv=notrunc &&
git cat-file blob $sha1_101 > file_101_foo2
20+0 records in
20+0 records out
20 bytes copied, 0.000241122 s, 82.9 kB/s
ok 26 - [index v2] 2) create a stealth corruption in a delta base reference
expecting success: test -f file_101_foo2 && ! cmp file_101 file_101_foo2
file_101 file_101_foo2 differ: char 5, line 2
ok 27 - [index v2] 3) corrupted delta happily returned wrong data
expecting success: test_must_fail git fsck --full $commit
error: .git/objects/pack/pack-1c54d893dd9bf6645ecee2886ea72f2c2030bea1.pack pack checksum mismatch
error: index CRC mismatch for object 0b968294884af115eb5a1b941b3dabd48470c3bb from .git/objects/pack/pack-1c54d893dd9bf6645ecee2886ea72f2c2030bea1.pack at offset 844032
error: packed 0b968294884af115eb5a1b941b3dabd48470c3bb from .git/objects/pack/pack-1c54d893dd9bf6645ecee2886ea72f2c2030bea1.pack is corrupt
ok 28 - [index v2] 4) confirm that the pack is actually corrupted
expecting success: test_must_fail git pack-objects test-5 <obj-list &&
test_must_fail git pack-objects --no-reuse-object test-6 <obj-list
error: bad packed object CRC for 0b968294884af115eb5a1b941b3dabd48470c3bb
error: bad packed object CRC for 0b968294884af115eb5a1b941b3dabd48470c3bb
fatal: packed object 0b968294884af115eb5a1b941b3dabd48470c3bb (stored in .git/objects/pack/pack-1c54d893dd9bf6645ecee2886ea72f2c2030bea1.pack) is corrupt
error: bad packed object CRC for 0b968294884af115eb5a1b941b3dabd48470c3bb
fatal: packed object 0b968294884af115eb5a1b941b3dabd48470c3bb (stored in .git/objects/pack/pack-1c54d893dd9bf6645ecee2886ea72f2c2030bea1.pack) is corrupt
ok 29 - [index v2] 5) pack-objects refuses to reuse corrupted data
expecting success: rm -f .git/objects/pack/* &&
git index-pack --index-version=2 --stdin < "test-1-${pack1}.pack" &&
git verify-pack ".git/objects/pack/pack-${pack1}.pack" &&
obj=$(git hash-object file_001) &&
nr=$(index_obj_nr ".git/objects/pack/pack-${pack1}.idx" $obj) &&
chmod +w ".git/objects/pack/pack-${pack1}.idx" &&
printf xxxx | dd of=".git/objects/pack/pack-${pack1}.idx" conv=notrunc \
bs=1 count=4 seek=$((8 + 256 * 4 + $(wc -l <obj-list) * 20 + $nr * 4)) &&
( while read obj
do git cat-file -p $obj >/dev/null || exit 1
done <obj-list ) &&
test_must_fail git verify-pack ".git/objects/pack/pack-${pack1}.pack"
pack 1c54d893dd9bf6645ecee2886ea72f2c2030bea1
4+0 records in
4+0 records out
4 bytes copied, 0.000122381 s, 32.7 kB/s
fatal: sha1 file '.git/objects/pack/pack-1c54d893dd9bf6645ecee2886ea72f2c2030bea1.idx' validation error
ok 30 - [index v2] 6) verify-pack detects CRC mismatch
expecting success:
rm -f .git/objects/pack/* &&
cp test-1-${pack1}.pack .git/objects/pack/pack-${pack1}.pack &&
(
cd .git/objects/pack &&
git index-pack pack-${pack1}.pack
) &&
test -f .git/objects/pack/pack-${pack1}.idx
1c54d893dd9bf6645ecee2886ea72f2c2030bea1
ok 31 - running index-pack in the object store
expecting success:
sha=$(git rev-parse HEAD) &&
cat >wrong-tag <<EOF &&
object $sha
type commit
tag guten tag
This is an invalid tag.
EOF
tag=$(git hash-object -t tag -w --stdin <wrong-tag) &&
pack1=$(echo $tag $sha | git pack-objects tag-test) &&
echo remove tag object &&
thirtyeight=${tag#??} &&
rm -f .git/objects/${tag%$thirtyeight}/$thirtyeight &&
git index-pack --strict tag-test-${pack1}.pack 2>err &&
grep "^warning:.* expected .tagger. line" err
remove tag object
5079749f78a3f87bcd9276c8f7f2621c0fe0601c
warning: object 954a59119d420f71a30ed82499f85275e172d1b3: missingTaggerEntry: invalid format - expected 'tagger' line
ok 32 - index-pack --strict warns upon missing tagger in tag
expecting success:
git index-pack --fsck-objects tag-test-${pack1}.pack 2>err &&
grep "^warning:.* expected .tagger. line" err
5079749f78a3f87bcd9276c8f7f2621c0fe0601c
warning: object 954a59119d420f71a30ed82499f85275e172d1b3: missingTaggerEntry: invalid format - expected 'tagger' line
ok 33 - index-pack --fsck-objects also warns upon missing tagger in tag
# passed all 33 test(s)
1..33
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5312-prune-corruption.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5312-prune-corruption/.git/
expecting success:
git config core.logallrefupdates false &&
git reflog expire --expire=all --all
ok 1 - disable reflogs
expecting success:
test_tick && git commit --allow-empty -m master &&
base=$(git rev-parse HEAD) &&
test_tick && git commit --allow-empty -m bogus &&
bogus=$(git rev-parse HEAD) &&
git cat-file commit $bogus >saved &&
echo $bogus >.git/refs/heads/bogus..name &&
git reset --hard HEAD^
[master (root-commit) 080f071] master
Author: A U Thor <author@example.com>
[master f940c56] bogus
Author: A U Thor <author@example.com>
HEAD is now at 080f071 master
ok 2 - create history reachable only from a bogus-named ref
expecting success:
test_when_finished "git hash-object -w -t commit saved" &&
test_might_fail git prune --expire=now &&
verbose git cat-file -e $bogus
fatal: unable to parse object: refs/heads/bogus..name
f940c56ce42d31a4dd10ec9f28502a6ff9501fc9
ok 3 - pruning does not drop bogus object
expecting success:
git tag reachable $bogus &&
git repack -ad &&
git tag -d reachable &&
verbose git cat-file -e $bogus
Deleted tag 'reachable' (was f940c56)
ok 4 - put bogus object into pack
expecting success:
test_might_fail git repack -Ad --unpack-unreachable=now &&
verbose git cat-file -e $bogus &&
test_might_fail git repack -ad &&
verbose git cat-file -e $bogus
fatal: bad object refs/heads/bogus..name
fatal: bad object refs/heads/bogus..name
ok 5 - destructive repack keeps packed object
expecting success:
rm .git/refs/heads/bogus..name
ok 6 - clean up bogus ref
expecting success:
test_tick && git commit --allow-empty -m one &&
recoverable=$(git rev-parse HEAD) &&
git cat-file commit $recoverable >saved &&
test_tick && git commit --allow-empty -m two &&
missing=$(git rev-parse HEAD) &&
git checkout --detach $base &&
rm .git/objects/$(echo $missing | sed "s,..,&/,") &&
test_must_fail git cat-file -e $missing
[master 7dcec5b] one
Author: A U Thor <author@example.com>
[master e9fdcfa] two
Author: A U Thor <author@example.com>
HEAD is now at 080f071 master
ok 7 - create history with missing tip commit
expecting success:
test_when_finished "git hash-object -w -t commit saved" &&
test_might_fail git prune --expire=now &&
verbose git cat-file -e $recoverable
fatal: unable to parse object: refs/heads/master
7dcec5bdbc3bc472bf44c87010a4acd327683b24
ok 8 - pruning with a corrupted tip does not drop history
expecting success:
git pack-refs --all --prune &&
echo $missing >expect &&
git rev-parse refs/heads/master >actual &&
test_cmp expect actual
error: refs/heads/master does not point to a valid object!
ok 9 - pack-refs does not silently delete broken loose ref
expecting success:
rm -f .git/refs/heads/master &&
cat >.git/packed-refs <<-EOF &&
$missing refs/heads/master
$recoverable refs/heads/other
EOF
echo $missing >expect &&
git rev-parse refs/heads/master >actual &&
test_cmp expect actual
ok 10 - create packed-refs file with broken ref
expecting success:
git pack-refs --all --prune &&
git rev-parse refs/heads/master >actual &&
test_cmp expect actual
ok 11 - pack-refs does not silently delete broken packed ref
expecting success:
git update-ref -d refs/heads/other &&
git rev-parse refs/heads/master >actual &&
test_cmp expect actual
ok 12 - pack-refs does not drop broken refs during deletion
# passed all 12 test(s)
1..12
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5313-pack-bounds-checks.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5313-pack-bounds-checks/.git/
expecting success:
# the hash of this content starts with ff, which
# makes some later computations much simpler
echo 74 >file &&
git add file &&
git commit -m base &&
git repack -ad &&
base=$(echo .git/objects/pack/*) &&
chmod +w $base &&
mkdir base-backup &&
cp $base base-backup/ &&
object=$(git rev-parse HEAD:file)
[master (root-commit) 685f5d2] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 1 - set up base packfile and variables
expecting success:
do_pack $object &&
munge $pack 8 "\377\0\0\0" &&
clear_base &&
# We enumerate the objects from the completely-fine
# .idx, but notice later that the .pack is bogus
# and fail to show any data.
echo "$object missing" >expect &&
git cat-file --batch-all-objects --batch-check >actual &&
test_cmp expect actual &&
# ...and here fail to load the object (without segfaulting),
# but fallback to a good copy if available.
test_must_fail git cat-file blob $object &&
restore_base &&
git cat-file blob $object >actual &&
test_cmp file actual &&
# ...and make sure that index-pack --verify, which has its
# own reading routines, does not segfault.
test_must_fail git index-pack --verify $pack
4+0 records in
4+0 records out
4 bytes copied, 0.000123542 s, 32.4 kB/s
error: packfile .git/objects/pack/pack-67be769e2843d598c78218852612520795998892.pack claims to have 4278190080 objects while index indicates 1 objects
error: packfile .git/objects/pack/pack-67be769e2843d598c78218852612520795998892.pack claims to have 4278190080 objects while index indicates 1 objects
error: packfile .git/objects/pack/pack-67be769e2843d598c78218852612520795998892.pack claims to have 4278190080 objects while index indicates 1 objects
error: packfile .git/objects/pack/pack-67be769e2843d598c78218852612520795998892.pack claims to have 4278190080 objects while index indicates 1 objects
error: packfile .git/objects/pack/pack-67be769e2843d598c78218852612520795998892.pack claims to have 4278190080 objects while index indicates 1 objects
error: packfile .git/objects/pack/pack-67be769e2843d598c78218852612520795998892.pack claims to have 4278190080 objects while index indicates 1 objects
error: packfile .git/objects/pack/pack-67be769e2843d598c78218852612520795998892.pack claims to have 4278190080 objects while index indicates 1 objects
error: packfile .git/objects/pack/pack-67be769e2843d598c78218852612520795998892.pack claims to have 4278190080 objects while index indicates 1 objects
fatal: git cat-file fff0a2476aa5c8e60a3ef21cfc66e0cc670920be: bad file
fatal: data too large to fit into virtual memory space
ok 2 - pack/index object count mismatch
expecting success:
do_pack $object &&
munge $pack 8 "\377\0\0\0" &&
munge $idx $((255 * 4)) "\377\0\0\0" &&
clear_base &&
# Unlike above, we should notice early that the .idx is totally
# bogus, and not even enumerate its contents.
git cat-file --batch-all-objects --batch-check >actual &&
test_must_be_empty actual &&
# But as before, we can do the same object-access checks.
test_must_fail git cat-file blob $object &&
restore_base &&
git cat-file blob $object >actual &&
test_cmp file actual &&
test_must_fail git index-pack --verify $pack
4+0 records in
4+0 records out
4 bytes copied, 0.000450745 s, 8.9 kB/s
4+0 records in
4+0 records out
4 bytes copied, 0.000435465 s, 9.2 kB/s
error: non-monotonic index .git/objects/pack/pack-67be769e2843d598c78218852612520795998892.idx
error: non-monotonic index .git/objects/pack/pack-67be769e2843d598c78218852612520795998892.idx
error: non-monotonic index .git/objects/pack/pack-67be769e2843d598c78218852612520795998892.idx
error: non-monotonic index .git/objects/pack/pack-67be769e2843d598c78218852612520795998892.idx
error: non-monotonic index .git/objects/pack/pack-67be769e2843d598c78218852612520795998892.idx
error: non-monotonic index .git/objects/pack/pack-67be769e2843d598c78218852612520795998892.idx
error: non-monotonic index .git/objects/pack/pack-67be769e2843d598c78218852612520795998892.idx
fatal: git cat-file fff0a2476aa5c8e60a3ef21cfc66e0cc670920be: bad file
error: non-monotonic index .git/objects/pack/pack-67be769e2843d598c78218852612520795998892.idx
fatal: Cannot open existing pack idx file for '.git/objects/pack/pack-67be769e2843d598c78218852612520795998892.idx'
ok 3 - matched bogus object count
expecting success:
do_pack $object --index-version=1 &&
munge $idx $((4 * 256)) "\377\0\0\0" &&
clear_base &&
test_must_fail git cat-file blob $object &&
test_must_fail git index-pack --verify $pack
4+0 records in
4+0 records out
4 bytes copied, 0.000449884 s, 8.9 kB/s
fatal: offset beyond end of packfile (truncated pack?)
fatal: offset beyond end of packfile (truncated pack?)
ok 4 - bogus object offset (v1)
expecting success:
do_pack $object --index-version=2 &&
munge $idx $(ofs_table 1) "\0\377\0\0" &&
clear_base &&
test_must_fail git cat-file blob $object &&
test_must_fail git index-pack --verify $pack
4+0 records in
4+0 records out
4 bytes copied, 0.000421585 s, 9.5 kB/s
fatal: offset beyond end of packfile (truncated pack?)
fatal: offset beyond end of packfile (truncated pack?)
ok 5 - bogus object offset (v2, no msb)
expecting success:
do_pack $object --index-version=2 &&
munge $idx $(ofs_table 1) "\377\0\0\0" &&
clear_base &&
test_must_fail git cat-file blob $object &&
test_must_fail git index-pack --verify $pack
4+0 records in
4+0 records out
4 bytes copied, 0.000465905 s, 8.6 kB/s
fatal: offset before start of pack index for .git/objects/pack/pack-67be769e2843d598c78218852612520795998892.pack (corrupt index?)
fatal: offset before start of pack index for .git/objects/pack/pack-67be769e2843d598c78218852612520795998892.pack (corrupt index?)
ok 6 - bogus offset into v2 extended table
expecting success:
# We need two objects here, so we can plausibly require
# an extended table (if the first object were larger than 2^31).
#
# Note that the value is important here. We want $object as
# the second entry in sorted-sha1 order. The sha1 of 1485 starts
# with "000", which sorts before that of $object (which starts
# with "fff").
second=$(echo 1485 | git hash-object -w --stdin) &&
do_pack "$object $second" --index-version=2 &&
# We have to make extra room for the table, so we cannot
# just munge in place as usual.
{
dd if=$idx bs=1 count=$(($(ofs_table 2) + 4)) &&
printf "\200\0\0\0" &&
printf "\377\0\0\0\0\0\0\0" &&
dd if=$idx bs=1 skip=$(extended_table 2)
} >tmp &&
mv tmp "$idx" &&
clear_base &&
test_must_fail git cat-file blob $object &&
test_must_fail git index-pack --verify $pack
1084+0 records in
1084+0 records out
1084 bytes (1.1 kB, 1.1 KiB) copied, 0.0123658 s, 87.7 kB/s
40+0 records in
40+0 records out
40 bytes copied, 0.000378784 s, 106 kB/s
fatal: offset before end of packfile (broken .idx?)
fatal: offset before end of packfile (broken .idx?)
ok 7 - bogus offset inside v2 extended table
expecting success:
# Generate a pack with a delta in it.
base=$(test-tool genrandom foo 3000 | git hash-object --stdin -w) &&
delta=$(test-tool genrandom foo 2000 | git hash-object --stdin -w) &&
do_pack "$base $delta" --delta-base-offset &&
rm -f .git/objects/??/* &&
# Double check that we have the delta we expect.
echo $base >expect &&
echo $delta | git cat-file --batch-check="%(deltabase)" >actual &&
test_cmp expect actual &&
# Now corrupt it. We assume the varint size for the delta is small
# enough to fit in the first byte (which it should be, since it
# is a pure deletion from the base), and that original ofs_delta
# takes 2 bytes (which it should, as it should be ~3000).
ofs=$(git show-index <$idx | grep $delta | cut -d" " -f1) &&
munge $pack $(($ofs + 1)) "\177\377" &&
test_must_fail git cat-file blob $delta >/dev/null
2+0 records in
2+0 records out
2 bytes copied, 0.000424704 s, 4.7 kB/s
error: bad offset for revindex
fatal: packed object 49fca29a258fafab9eb7e08a4325c335fa999cb6 (stored in .git/objects/pack/pack-8b2bcfe25ac8b931c950b271f97a8d767c427364.pack) is corrupt
ok 8 - bogus OFS_DELTA in packfile
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5314-pack-cycle-detection.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5314-pack-cycle-detection/.git/
expecting success:
test-tool genrandom base 4096 >base &&
for i in one two
do
# we want shared content here to encourage deltas...
cp base file &&
echo $i >>file &&
# ...whereas dummy should be short, because we do not want
# deltas that would create duplicates when we --fix-thin
echo $i >dummy &&
git add file dummy &&
test_tick &&
git commit -m $i ||
return 1
done &&
make_pack HEAD^ HEAD &&
make_pack HEAD HEAD^
[master (root-commit) e98f41e] one
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 100644 dummy
create mode 100644 file
[master 1d543a7] two
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
pack 86885ae86429a2983f8a2824647f8b7773ff8e16
pack 8a63be3313e6a04258b6d166a5abfb3005aac8f8
ok 1 - setup
expecting success:
# We first want to check that we do not have any internal errors,
# and also that we do not hit the last-ditch cycle-breaking code
# in write_object(), which will issue a warning to stderr.
git repack -ad 2>stderr &&
test_must_be_empty stderr &&
# And then double-check that the resulting pack is usable (i.e.,
# we did not fail to notice any cycles). We know we are accessing
# the objects via the new pack here, because "repack -d" will have
# removed the others.
git cat-file blob HEAD:file >/dev/null &&
git cat-file blob HEAD^:file >/dev/null
ok 2 - repack
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t4255-am-submodule.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/.git/
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
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1/.git/
[master (root-commit) 726717a] Base inside first submodule
Author: A U Thor <author@example.com>
3 files changed, 4 insertions(+)
create mode 100644 .gitignore
create mode 100644 file1
create mode 100644 file2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub2/.git/
[master (root-commit) 9d9d27a] nested submodule 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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_repo/.git/
[master (root-commit) 27971cc] 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
Switched to a new branch 'add_sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_repo/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_repo/uninitialized_sub'...
done.
[add_sub1 6b49b56] Add sub1
Author: A U Thor <author@example.com>
2 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 uninitialized_sub
Switched to a new branch 'remove_sub1'
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
[remove_sub1 2130322] Revert "Add sub1"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:29:44 2019 +0000
3 files changed, 9 deletions(-)
delete mode 100644 .gitmodules
delete mode 160000 sub1
delete mode 160000 uninitialized_sub
Switched to a new branch 'modify_sub1'
Switched to a new branch 'modifications'
[modifications f12bb96] modified file2 and added file3
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 file3
To /<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1
* [new branch] modifications -> modifications
[modify_sub1 22d63f7] Modify sub1
Author: A U Thor <author@example.com>
Switched to a new branch 'add_nested_sub'
Switched to a new branch 'add_nested_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_repo/sub1/sub2'...
done.
[add_nested_sub b9192a5] add a nested submodule
Author: A U Thor <author@example.com>
2 files changed, 5 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub2
[add_nested_sub de3987e] update submodule, that updates a nested submodule
Author: A U Thor <author@example.com>
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
[modify_sub1_recursively df5fe46] make a change in nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
[modify_sub1_recursively 6cc8c82] update nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[modify_sub1_recursively 3d31d54] update sub1, that updates nested sub
Author: A U Thor <author@example.com>
To /<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
To /<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub2
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
Cleared directory 'sub2'
Submodule 'sub2' (../submodule_update_sub2) unregistered for path 'sub2'
Switched to a new branch 'replace_sub1_with_directory'
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Previous HEAD position was 726717a Base inside first submodule
Switched to branch 'modifications'
rm 'sub1'
[replace_sub1_with_directory 5018206] 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
Switched to a new branch 'replace_directory_with_sub1'
Removing sub1/file3
Removing sub1/file2
Removing sub1/file1
Adding sub1
[replace_directory_with_sub1 6f43806] Revert "Replace sub1 with directory"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:29:47 2019 +0000
4 files changed, 4 insertions(+), 3 deletions(-)
delete mode 100644 sub1/file1
delete mode 100644 sub1/file2
delete mode 100644 sub1/file3
Switched to a new branch 'replace_sub1_with_file'
rm 'sub1'
[replace_sub1_with_file d06bda3] 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'
[replace_file_with_sub1 99e212d] Revert "Replace sub1 with file"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:29:47 2019 +0000
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
Switched to a new branch 'invalid_sub1'
[invalid_sub1 3912276] Invalid sub1 commit
Author: A U Thor <author@example.com>
Switched to a new branch 'valid_sub1'
[valid_sub1 ea421c4] Revert "Invalid sub1 commit"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:29:47 2019 +0000
warning: unable to rmdir 'uninitialized_sub': Directory not empty
Switched to branch 'master'
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Applying: Add sub1
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Submodule path 'uninitialized_sub': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
ok 1 - am: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Applying: Add sub1
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Submodule path 'uninitialized_sub': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
ok 2 - am: added submodule leaves existing empty directory alone
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
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Applying: Revert "Replace sub1 with file"
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Submodule path 'uninitialized_sub': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
ok 3 - am: 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
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Applying: Revert "Replace sub1 with directory"
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Submodule path 'uninitialized_sub': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
ok 4 - am: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Applying: Revert "Add sub1"
ok 5 - am: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Applying: Revert "Add sub1"
ok 6 - am: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: sub1/file1: already exists in working directory
error: sub1/file2: already exists in working directory
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: Replace sub1 with directory
Patch failed at 0001 Replace sub1 with directory
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 7 - am: replace submodule with a directory must fail
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: sub1/file1: already exists in working directory
error: sub1/file2: already exists in working directory
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: Replace sub1 with directory
Patch failed at 0001 Replace sub1 with directory
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 8 - am: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
error: unable to write file 'sub1' mode 100644: Directory not empty
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: Replace sub1 with file
Patch failed at 0001 Replace sub1 with file
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
'actual' is not empty, it contains:
:100644 100644 af3a0c56edfba1a28f50ada5ec2832a7f2f9b907 0000000000000000000000000000000000000000 M .gitmodules
not ok 9 - am: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
error: unable to write file 'sub1' mode 100644: Directory not empty
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: Replace sub1 with file
Patch failed at 0001 Replace sub1 with file
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
'actual' is not empty, it contains:
:100644 100644 af3a0c56edfba1a28f50ada5ec2832a7f2f9b907 0000000000000000000000000000000000000000 M .gitmodules
not ok 10 - am: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Applying: Modify sub1
Submodule path 'sub1': checked out 'f12bb9600412cfcc73c6051ce270afa445fc5f58'
ok 11 - am: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Applying: Invalid sub1 commit
error: Server does not allow request for unadvertised object 0123456789012345678901234567890123456789
Fetched in submodule path 'sub1', but it did not contain 0123456789012345678901234567890123456789. Direct fetching of that commit failed.
ok 12 - am: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Applying: Revert "Invalid sub1 commit"
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Submodule path 'uninitialized_sub': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
ok 13 - am: 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 &&
>sub1 &&
test_must_fail $command add_sub1 &&
test_superproject_content origin/no_submodule &&
test_must_be_empty sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
error: sub1: already exists in working directory
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: Add sub1
Patch failed at 0001 Add sub1
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 14 - am: added submodule doesn't remove untracked unignored file with same name
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Applying: Add sub1
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Submodule path 'uninitialized_sub': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
ok 15 - am_3way: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Applying: Add sub1
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Submodule path 'uninitialized_sub': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
ok 16 - am_3way: added submodule leaves existing empty directory alone
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
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Applying: Revert "Replace sub1 with file"
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Submodule path 'uninitialized_sub': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
ok 17 - am_3way: 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
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Applying: Revert "Replace sub1 with directory"
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Submodule path 'uninitialized_sub': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
ok 18 - am_3way: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Applying: Revert "Add sub1"
ok 19 - am_3way: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Applying: Revert "Add sub1"
ok 20 - am_3way: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Applying: Replace sub1 with directory
error: refusing to lose untracked file at 'sub1/file2'
error: refusing to lose untracked file at 'sub1/file1'
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
6b49b56 Add sub1
virtual Replace sub1 with directory
found 1 common ancestor:
virtual 58f57a5bf4b8c54d23df6084ccd737d5abcd9aef
Adding sub1/file3
Adding sub1/file2
Adding sub1/file1
Removing sub1
test_must_fail: command succeeded: am_3way replace_sub1_with_directory
not ok 21 - am_3way: replace submodule with a directory must fail # TODO known breakage
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 &&
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Applying: Replace sub1 with directory
error: refusing to lose untracked file at 'sub1/file2'
error: refusing to lose untracked file at 'sub1/file1'
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
6b49b56 Add sub1
virtual Replace sub1 with directory
found 1 common ancestor:
virtual 58f57a5bf4b8c54d23df6084ccd737d5abcd9aef
Adding sub1/file3
Adding sub1/file2
Adding sub1/file1
Removing sub1
test_must_fail: command succeeded: am_3way replace_sub1_with_directory
not ok 22 - am_3way: replace submodule containing a .git directory with a directory 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 &&
test_must_fail $command replace_sub1_with_file &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Applying: Replace sub1 with file
error: Your local changes to the following files would be overwritten by merge:
.gitmodules
Please commit your changes or stash them before you merge.
Aborting
error: merging of trees ff112720fdf4eaac298b40aa9223793cbce50779 and 0c5fb3d7a7f38842873e1ae04f0d84f622ff7d20 failed
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
6b49b56 Add sub1
virtual Replace sub1 with file
found 1 common ancestor:
virtual 58f57a5bf4b8c54d23df6084ccd737d5abcd9aef
Patch failed at 0001 Replace sub1 with file
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
'actual' is not empty, it contains:
:100644 100644 af3a0c56edfba1a28f50ada5ec2832a7f2f9b907 0000000000000000000000000000000000000000 M .gitmodules
not ok 23 - am_3way: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Applying: Replace sub1 with file
error: Your local changes to the following files would be overwritten by merge:
.gitmodules
Please commit your changes or stash them before you merge.
Aborting
error: merging of trees ff112720fdf4eaac298b40aa9223793cbce50779 and 0c5fb3d7a7f38842873e1ae04f0d84f622ff7d20 failed
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
6b49b56 Add sub1
virtual Replace sub1 with file
found 1 common ancestor:
virtual 58f57a5bf4b8c54d23df6084ccd737d5abcd9aef
Patch failed at 0001 Replace sub1 with file
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
'actual' is not empty, it contains:
:100644 100644 af3a0c56edfba1a28f50ada5ec2832a7f2f9b907 0000000000000000000000000000000000000000 M .gitmodules
not ok 24 - am_3way: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Applying: Modify sub1
Submodule path 'sub1': checked out 'f12bb9600412cfcc73c6051ce270afa445fc5f58'
ok 25 - am_3way: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
Applying: Invalid sub1 commit
error: Server does not allow request for unadvertised object 0123456789012345678901234567890123456789
Fetched in submodule path 'sub1', but it did not contain 0123456789012345678901234567890123456789. Direct fetching of that commit failed.
ok 26 - am_3way: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Applying: Revert "Invalid sub1 commit"
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
Submodule path 'uninitialized_sub': checked out '726717a4df0d4e9f565805678eebfbd1e259aac8'
ok 27 - am_3way: 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 &&
>sub1 &&
test_must_fail $command add_sub1 &&
test_superproject_content origin/no_submodule &&
test_must_be_empty sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Applying: Add sub1
error: The following untracked working tree files would be overwritten by merge:
sub1
Please move or remove them before you merge.
Aborting
error: merging of trees ec38489b3f8eda08fda17055ad272abc24bdf929 and 7ed94163b752621c9c332b7430f403d9415e98bd failed
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Merging:
27971cc Base
virtual Add sub1
found 1 common ancestor:
virtual 4b825dc642cb6eb9a060e54bf8d69288fbee4904
Patch failed at 0001 Add sub1
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
ok 28 - am_3way: added submodule doesn't remove untracked unignored file with same name
expecting success:
test_commit one &&
INITIAL=$(git rev-parse HEAD) &&
git init submodule &&
(
cd submodule &&
test_commit two &&
git rev-parse HEAD >../initial-submodule
) &&
git submodule add ./submodule &&
git commit -m first &&
(
cd submodule &&
test_commit three &&
git rev-parse HEAD >../first-submodule
) &&
git add submodule &&
git commit -m second &&
SECOND=$(git rev-parse HEAD) &&
(
cd submodule &&
git mv two.t four.t &&
git commit -m "second submodule" &&
git rev-parse HEAD >../second-submodule
) &&
test_commit four &&
git add submodule &&
git commit --amend --no-edit &&
THIRD=$(git rev-parse HEAD) &&
git submodule update --init
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t4255-am-submodule/submodule/.git/
[master (root-commit) 274aeeb] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
Adding existing repo at 'submodule' to the index
[master 8fb6b7a] first
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 submodule
[master 2b16875] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
[master 7cdc426] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master a623af5] second submodule
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename two.t => four.t (100%)
[master d6b9f1d] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 four.t
[master be614db] four
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 four.t
ok 29 - setup diff.submodule
expecting success:
test_unconfig diff.submodule &&
run_test $SECOND first-submodule
fatal: Resolve operation not in progress, we are not resuming.
HEAD is now at 7cdc426 second
0001-second.patch
HEAD is now at 8fb6b7a first
Submodule path 'submodule': checked out '274aeebc83e7f26e680862996e9bd5ecc327019b'
warning: unable to rmdir 'submodule': Directory not empty
Applying: second
Submodule path 'submodule': checked out '2b16875140fdb3b4aae24b2015fe1bcc27aafb37'
ok 30 - diff.submodule unset
expecting success:
test_unconfig diff.submodule &&
run_test $THIRD second-submodule
fatal: Resolve operation not in progress, we are not resuming.
HEAD is now at be614db four
0001-four.patch
HEAD is now at 7cdc426 second
warning: unable to rmdir 'submodule': Directory not empty
Applying: four
Submodule path 'submodule': checked out 'a623af53832974aedda72512f4fa27b05b513dee'
ok 31 - diff.submodule unset with extra file
expecting success:
test_config diff.submodule log &&
run_test $SECOND first-submodule
fatal: Resolve operation not in progress, we are not resuming.
HEAD is now at 7cdc426 second
0001-second.patch
HEAD is now at 8fb6b7a first
Submodule path 'submodule': checked out '274aeebc83e7f26e680862996e9bd5ecc327019b'
warning: unable to rmdir 'submodule': Directory not empty
Applying: second
Submodule path 'submodule': checked out '2b16875140fdb3b4aae24b2015fe1bcc27aafb37'
ok 32 - diff.submodule=log
expecting success:
test_config diff.submodule log &&
run_test $THIRD second-submodule
fatal: Resolve operation not in progress, we are not resuming.
HEAD is now at be614db four
0001-four.patch
HEAD is now at 7cdc426 second
warning: unable to rmdir 'submodule': Directory not empty
Applying: four
Submodule path 'submodule': checked out 'a623af53832974aedda72512f4fa27b05b513dee'
ok 33 - diff.submodule=log with extra file
# still have 6 known breakage(s)
# passed all remaining 27 test(s)
1..33
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5315-pack-objects-compression.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5315-pack-objects-compression/.git/
expecting success:
printf "%2000000s" X |
git hash-object -w --stdin >object-name &&
# make sure it resulted in a loose object
ob=$(sed -e "s/\(..\).*/\1/" object-name) &&
ject=$(sed -e "s/..\(.*\)/\1/" object-name) &&
test -f .git/objects/$ob/$ject
ok 1 - setup
expecting success:
test_when_finished "rm -f pack-*.*" &&
git $config pack-objects pack <object-name &&
sz=$(file_size pack-*.pack) &&
case "$expect" in
small) test "$sz" -le 100000 ;;
large) test "$sz" -ge 100000 ;;
esac
914337c67e9cd1ab74ffb73c96318b9e5409e0b1
ok 2 - pack-objects with -c core.compression=0
expecting success:
test_when_finished "rm -f pack-*.*" &&
git $config pack-objects pack <object-name &&
sz=$(file_size pack-*.pack) &&
case "$expect" in
small) test "$sz" -le 100000 ;;
large) test "$sz" -ge 100000 ;;
esac
deee478811b863f9bb7b87717ddca65a1d6c6e18
ok 3 - pack-objects with -c core.compression=9
expecting success:
test_when_finished "rm -f pack-*.*" &&
git $config pack-objects pack <object-name &&
sz=$(file_size pack-*.pack) &&
case "$expect" in
small) test "$sz" -le 100000 ;;
large) test "$sz" -ge 100000 ;;
esac
914337c67e9cd1ab74ffb73c96318b9e5409e0b1
ok 4 - pack-objects with -c core.compression=0 -c pack.compression=0
expecting success:
test_when_finished "rm -f pack-*.*" &&
git $config pack-objects pack <object-name &&
sz=$(file_size pack-*.pack) &&
case "$expect" in
small) test "$sz" -le 100000 ;;
large) test "$sz" -ge 100000 ;;
esac
914337c67e9cd1ab74ffb73c96318b9e5409e0b1
ok 5 - pack-objects with -c core.compression=9 -c pack.compression=0
expecting success:
test_when_finished "rm -f pack-*.*" &&
git $config pack-objects pack <object-name &&
sz=$(file_size pack-*.pack) &&
case "$expect" in
small) test "$sz" -le 100000 ;;
large) test "$sz" -ge 100000 ;;
esac
deee478811b863f9bb7b87717ddca65a1d6c6e18
ok 6 - pack-objects with -c core.compression=0 -c pack.compression=9
expecting success:
test_when_finished "rm -f pack-*.*" &&
git $config pack-objects pack <object-name &&
sz=$(file_size pack-*.pack) &&
case "$expect" in
small) test "$sz" -le 100000 ;;
large) test "$sz" -ge 100000 ;;
esac
deee478811b863f9bb7b87717ddca65a1d6c6e18
ok 7 - pack-objects with -c core.compression=9 -c pack.compression=9
expecting success:
test_when_finished "rm -f pack-*.*" &&
git $config pack-objects pack <object-name &&
sz=$(file_size pack-*.pack) &&
case "$expect" in
small) test "$sz" -le 100000 ;;
large) test "$sz" -ge 100000 ;;
esac
914337c67e9cd1ab74ffb73c96318b9e5409e0b1
ok 8 - pack-objects with -c pack.compression=0
expecting success:
test_when_finished "rm -f pack-*.*" &&
git $config pack-objects pack <object-name &&
sz=$(file_size pack-*.pack) &&
case "$expect" in
small) test "$sz" -le 100000 ;;
large) test "$sz" -ge 100000 ;;
esac
deee478811b863f9bb7b87717ddca65a1d6c6e18
ok 9 - pack-objects with -c pack.compression=9
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5316-pack-delta-depth.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5316-pack-delta-depth/.git/
expecting success:
test-tool genrandom foo 4096 >content &&
prev= &&
for i in $(test_seq 1 10)
do
cat content >file &&
echo $i >>file &&
git add file &&
git commit -m $i &&
cur=$(git rev-parse HEAD^{tree}) &&
{
test -n "$prev" && echo "-$prev"
echo $cur
echo "$(git rev-parse :file) file"
} | git pack-objects --stdout >tmp &&
git index-pack --stdin --fix-thin <tmp || return 1
prev=$cur
done
[master (root-commit) 0b26ea0] 1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
pack 88638646d0a7f1051038ae78ad0195c19aa7c5c8
[master 5992480] 2
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
pack 711435b7279aca4d33efb91db771f9cf7725ff05
[master 4b9aa9b] 3
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
pack 46e7d03099b67170a542956fe351ceef9e70ff92
[master ed11943] 4
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
pack 30ce91502db16f0438633eccad0bf358e5ade542
[master 3d95125] 5
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
pack 8cab6f2a4762ee6565a978b114f2cc3b20dbb987
[master d560aa7] 6
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
pack 36e62c0a922f9fdd0eaa885dbbd08ea34de4ecc9
[master 2e23716] 7
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
pack 07f2e882a14adf7568f1e390177bbf8f9731ef78
[master 5f0d3f1] 8
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
pack 9514d2d071de63aee58c0b845108590565255b15
[master ba8b7c8] 9
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
pack b604d4190b1d2a96d6304eb045f3fbc6f2f9ab97
[master 9c6d189] 10
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
pack 83f4c28b023cb2892e2574bcca33931b75bc600a
ok 1 - create series of packs
expecting success:
# Use --window=0 to make sure we are seeing reused deltas,
# not computing a new long chain.
pack=$(git pack-objects --all --window=0 </dev/null pack) &&
echo 9 >expect &&
max_chain pack-$pack.pack >actual &&
test_i18ncmp expect actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 2 - packing produces a long delta
expecting success:
pack=$(git pack-objects --all --depth=5 </dev/null pack) &&
echo 5 >expect &&
max_chain pack-$pack.pack >actual &&
test_i18ncmp expect actual
ok 3 - --depth limits depth
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5317-pack-objects-filter-objects.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5317-pack-objects-filter-objects/.git/
expecting success:
echo "{print \$1}" >print_1.awk &&
echo "{print \$2}" >print_2.awk &&
git init r1 &&
for n in 1 2 3 4 5
do
echo "This is file: $n" > r1/file.$n
git -C r1 add file.$n
git -C r1 commit -m "$n"
done
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5317-pack-objects-filter-objects/r1/.git/
[master (root-commit) 962cf2b] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.1
[master c706542] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.2
[master 45ff0ba] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.3
[master 35f3ff3] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.4
[master edaa8df] 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.5
ok 1 - setup r1
expecting success:
git -C r1 ls-files -s file.1 file.2 file.3 file.4 file.5 \
>ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
git -C r1 pack-objects --revs --stdout >all.pack <<-EOF &&
HEAD
EOF
git -C r1 index-pack ../all.pack &&
git -C r1 verify-pack -v ../all.pack >verify_result &&
grep blob verify_result |
awk -f print_1.awk |
sort >observed &&
test_cmp expected observed
c7ae8f9019371cf94b49727199219bde1266bc7a
ok 2 - verify blob count in normal packfile
expecting success:
git -C r1 pack-objects --revs --stdout --filter=blob:none >filter.pack <<-EOF &&
HEAD
EOF
git -C r1 index-pack ../filter.pack &&
git -C r1 verify-pack -v ../filter.pack >verify_result &&
grep blob verify_result |
awk -f print_1.awk |
sort >observed &&
nr=$(wc -l <observed) &&
test 0 -eq $nr
a96c955f5708c2ea79301a4281e5f929919b81f3
ok 3 - verify blob:none packfile has no blobs
expecting success:
git -C r1 verify-pack -v ../all.pack >verify_result &&
grep -E "commit|tree" verify_result |
awk -f print_1.awk |
sort >expected &&
git -C r1 verify-pack -v ../filter.pack >verify_result &&
grep -E "commit|tree" verify_result |
awk -f print_1.awk |
sort >observed &&
test_cmp expected observed
ok 4 - verify normal and blob:none packfiles have same commits/trees
expecting success:
git init r5 &&
echo foo >r5/foo &&
git -C r5 add foo &&
git -C r5 commit -m "foo" &&
del=$(git -C r5 rev-parse HEAD^{tree} | sed "s|..|&/|") &&
rm r5/.git/objects/$del &&
test_must_fail git -C r5 pack-objects --revs --stdout 2>bad_tree <<-EOF &&
HEAD
EOF
grep "bad tree object" bad_tree
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5317-pack-objects-filter-objects/r5/.git/
[master (root-commit) 8636a4b] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
fatal: bad tree object 205f6b799e7d5c2524468ca006a0131aa57ecce7
ok 5 - get an error for missing tree object
expecting success:
mkdir r1/subtree &&
echo "This is a file in a subtree" >r1/subtree/file &&
git -C r1 add subtree/file &&
git -C r1 commit -m subtree
[master 741159c] subtree
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subtree/file
ok 6 - setup for tests of tree:0
expecting success:
git -C r1 pack-objects --revs --stdout --filter=tree:0 >commitsonly.pack <<-EOF &&
HEAD
EOF
git -C r1 index-pack ../commitsonly.pack &&
git -C r1 verify-pack -v ../commitsonly.pack >objs &&
! grep -E "tree|blob" objs
f86550dbd62a6c39dfc4281b0583a9a44a2e47b0
ok 7 - verify tree:0 packfile has no blobs or trees
expecting success:
# We should get the tree specified directly but not its blobs or subtrees.
git -C r1 pack-objects --revs --stdout --filter=tree:0 >commitsonly.pack <<-EOF &&
HEAD:
EOF
git -C r1 index-pack ../commitsonly.pack &&
git -C r1 verify-pack -v ../commitsonly.pack >objs &&
awk "/tree|blob/{print \$1}" objs >trees_and_blobs &&
git -C r1 rev-parse HEAD: >expected &&
test_cmp expected trees_and_blobs
2abcb6db3990fe53c59fd41f9590643ae34427f0
ok 8 - grab tree directly when using tree:0
expecting success:
git init r2 &&
for n in 1000 10000
do
printf "%"$n"s" X > r2/large.$n
git -C r2 add large.$n
git -C r2 commit -m "$n"
done
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5317-pack-objects-filter-objects/r2/.git/
[master (root-commit) 25dcee9] 1000
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 large.1000
[master 9819620] 10000
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 large.10000
ok 9 - setup r2
expecting success:
git -C r2 ls-files -s large.1000 large.10000 >ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
git -C r2 pack-objects --revs --stdout >all.pack <<-EOF &&
HEAD
EOF
git -C r2 index-pack ../all.pack &&
git -C r2 verify-pack -v ../all.pack >verify_result &&
grep blob verify_result |
awk -f print_1.awk |
sort >observed &&
test_cmp expected observed
d9433823f3e6eda85aeb3aeebe48e81944ed9141
ok 10 - verify blob count in normal packfile
expecting success:
git -C r2 pack-objects --revs --stdout --filter=blob:limit=500 >filter.pack <<-EOF &&
HEAD
EOF
git -C r2 index-pack ../filter.pack &&
git -C r2 verify-pack -v ../filter.pack >verify_result &&
grep blob verify_result |
awk -f print_1.awk |
sort >observed &&
nr=$(wc -l <observed) &&
test 0 -eq $nr
bb1399e2ee0dffdee8abdce47250c5f99f81a331
ok 11 - verify blob:limit=500 omits all blobs
expecting success:
git -C r2 pack-objects --revs --stdout --filter=blob:limit=1000 >filter.pack <<-EOF &&
HEAD
EOF
git -C r2 index-pack ../filter.pack &&
git -C r2 verify-pack -v ../filter.pack >verify_result &&
grep blob verify_result |
awk -f print_1.awk |
sort >observed &&
nr=$(wc -l <observed) &&
test 0 -eq $nr
bb1399e2ee0dffdee8abdce47250c5f99f81a331
ok 12 - verify blob:limit=1000
expecting success:
git -C r2 ls-files -s large.1000 >ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
git -C r2 pack-objects --revs --stdout --filter=blob:limit=1001 >filter.pack <<-EOF &&
HEAD
EOF
git -C r2 index-pack ../filter.pack &&
git -C r2 verify-pack -v ../filter.pack >verify_result &&
grep blob verify_result |
awk -f print_1.awk |
sort >observed &&
test_cmp expected observed
c9b6b130baaef0a95b17818b0324d1493575e221
ok 13 - verify blob:limit=1001
expecting success:
git -C r2 ls-files -s large.1000 large.10000 >ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
git -C r2 pack-objects --revs --stdout --filter=blob:limit=10001 >filter.pack <<-EOF &&
HEAD
EOF
git -C r2 index-pack ../filter.pack &&
git -C r2 verify-pack -v ../filter.pack >verify_result &&
grep blob verify_result |
awk -f print_1.awk |
sort >observed &&
test_cmp expected observed
d9433823f3e6eda85aeb3aeebe48e81944ed9141
ok 14 - verify blob:limit=10001
expecting success:
git -C r2 ls-files -s large.1000 >ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
git -C r2 pack-objects --revs --stdout --filter=blob:limit=1k >filter.pack <<-EOF &&
HEAD
EOF
git -C r2 index-pack ../filter.pack &&
git -C r2 verify-pack -v ../filter.pack >verify_result &&
grep blob verify_result |
awk -f print_1.awk |
sort >observed &&
test_cmp expected observed
c9b6b130baaef0a95b17818b0324d1493575e221
ok 15 - verify blob:limit=1k
expecting success:
git -C r2 ls-files -s large.1000 large.10000 >ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
git -C r2 pack-objects --revs --stdout --filter=blob:limit=1k >filter.pack <<-EOF &&
HEAD
$(git -C r2 rev-parse HEAD:large.10000)
EOF
git -C r2 index-pack ../filter.pack &&
git -C r2 verify-pack -v ../filter.pack >verify_result &&
grep blob verify_result |
awk -f print_1.awk |
sort >observed &&
test_cmp expected observed
14e7d72301fd9db6763cff364325d8f83b35adc9
ok 16 - verify explicitly specifying oversized blob in input
expecting success:
git -C r2 ls-files -s large.1000 large.10000 >ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
git -C r2 pack-objects --revs --stdout --filter=blob:limit=1m >filter.pack <<-EOF &&
HEAD
EOF
git -C r2 index-pack ../filter.pack &&
git -C r2 verify-pack -v ../filter.pack >verify_result &&
grep blob verify_result |
awk -f print_1.awk |
sort >observed &&
test_cmp expected observed
d9433823f3e6eda85aeb3aeebe48e81944ed9141
ok 17 - verify blob:limit=1m
expecting success:
git -C r2 verify-pack -v ../all.pack >verify_result &&
grep -E "commit|tree" verify_result |
awk -f print_1.awk |
sort >expected &&
git -C r2 verify-pack -v ../filter.pack >verify_result &&
grep -E "commit|tree" verify_result |
awk -f print_1.awk |
sort >observed &&
test_cmp expected observed
ok 18 - verify normal and blob:limit packfiles have same commits/trees
expecting success:
git init r3 &&
mkdir r3/dir1 &&
for n in sparse1 sparse2
do
echo "This is file: $n" > r3/$n
git -C r3 add $n
echo "This is file: dir1/$n" > r3/dir1/$n
git -C r3 add dir1/$n
done &&
git -C r3 commit -m "sparse" &&
echo dir1/ >pattern1 &&
echo sparse1 >pattern2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5317-pack-objects-filter-objects/r3/.git/
[master (root-commit) def0464] sparse
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 dir1/sparse1
create mode 100644 dir1/sparse2
create mode 100644 sparse1
create mode 100644 sparse2
ok 19 - setup r3
expecting success:
git -C r3 ls-files -s sparse1 sparse2 dir1/sparse1 dir1/sparse2 \
>ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
git -C r3 pack-objects --revs --stdout >all.pack <<-EOF &&
HEAD
EOF
git -C r3 index-pack ../all.pack &&
git -C r3 verify-pack -v ../all.pack >verify_result &&
grep blob verify_result |
awk -f print_1.awk |
sort >observed &&
test_cmp expected observed
e75c781abb8cf9bc7f7309a8588772bda84e7590
ok 20 - verify blob count in normal packfile
expecting success:
test_must_fail git -C r3 pack-objects --revs --stdout \
--filter=sparse:path=../pattern1 <<-EOF
HEAD
EOF
fatal: sparse:path filters support has been dropped
ok 21 - verify sparse:path=pattern1 fails
expecting success:
test_must_fail git -C r3 pack-objects --revs --stdout \
--filter=sparse:path=../pattern2 <<-EOF
HEAD
EOF
fatal: sparse:path filters support has been dropped
ok 22 - verify sparse:path=pattern2 fails
expecting success:
git init r4 &&
mkdir r4/dir1 &&
for n in sparse1 sparse2
do
echo "This is file: $n" > r4/$n
git -C r4 add $n
echo "This is file: dir1/$n" > r4/dir1/$n
git -C r4 add dir1/$n
done &&
echo dir1/ >r4/pattern &&
git -C r4 add pattern &&
git -C r4 commit -m "pattern"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5317-pack-objects-filter-objects/r4/.git/
[master (root-commit) 734efbe] pattern
Author: A U Thor <author@example.com>
5 files changed, 5 insertions(+)
create mode 100644 dir1/sparse1
create mode 100644 dir1/sparse2
create mode 100644 pattern
create mode 100644 sparse1
create mode 100644 sparse2
ok 23 - setup r4
expecting success:
git -C r4 ls-files -s pattern sparse1 sparse2 dir1/sparse1 dir1/sparse2 \
>ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
git -C r4 pack-objects --revs --stdout >all.pack <<-EOF &&
HEAD
EOF
git -C r4 index-pack ../all.pack &&
git -C r4 verify-pack -v ../all.pack >verify_result &&
grep blob verify_result |
awk -f print_1.awk |
sort >observed &&
test_cmp expected observed
6a5112b2614f689e5093611b063f61adb81454c5
ok 24 - verify blob count in normal packfile
expecting success:
git -C r4 ls-files -s dir1/sparse1 dir1/sparse2 >ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
oid=$(git -C r4 ls-files -s pattern | awk -f print_2.awk) &&
git -C r4 pack-objects --revs --stdout --filter=sparse:oid=$oid >filter.pack <<-EOF &&
HEAD
EOF
git -C r4 index-pack ../filter.pack &&
git -C r4 verify-pack -v ../filter.pack >verify_result &&
grep blob verify_result |
awk -f print_1.awk |
sort >observed &&
test_cmp expected observed
35ac8de65abf86ebf7edd3eb14f24e6b33d00b00
ok 25 - verify sparse:oid=OID
expecting success:
git -C r4 ls-files -s dir1/sparse1 dir1/sparse2 >ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
git -C r4 pack-objects --revs --stdout --filter=sparse:oid=master:pattern >filter.pack <<-EOF &&
HEAD
EOF
git -C r4 index-pack ../filter.pack &&
git -C r4 verify-pack -v ../filter.pack >verify_result &&
grep blob verify_result |
awk -f print_1.awk |
sort >observed &&
test_cmp expected observed
35ac8de65abf86ebf7edd3eb14f24e6b33d00b00
ok 26 - verify sparse:oid=oid-ish
expecting success:
git -C r1 ls-files -s file.1 file.2 file.3 file.4 file.5 \
>ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
for id in `cat expected | sed "s|..|&/|"`
do
rm r1/.git/objects/$id
done
ok 27 - setup r1 - delete loose blobs
expecting success:
test_must_fail git -C r1 pack-objects --revs --stdout >miss.pack <<-EOF
HEAD
EOF
fatal: unable to read 54ff69bde100bd29db945c2fc62010675d3b5b14
ok 28 - verify pack-objects fails w/ missing objects
expecting success:
test_must_fail git -C r1 pack-objects --revs --stdout --missing=error >miss.pack <<-EOF
HEAD
EOF
fatal: unable to read 54ff69bde100bd29db945c2fc62010675d3b5b14
ok 29 - verify pack-objects fails w/ --missing=error
expecting success:
git -C r1 pack-objects --revs --stdout --missing=allow-any >miss.pack <<-EOF
HEAD
EOF
ok 30 - verify pack-objects w/ --missing=allow-any
# passed all 30 test(s)
1..30
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5310-pack-bitmaps.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5310-pack-bitmaps/.git/
expecting success:
test_commit_bulk --id=file 100 &&
git checkout -b other HEAD~5 &&
test_commit_bulk --id=side 10 &&
git checkout master &&
bitmaptip=$(git rev-parse master) &&
blob=$(echo tagged-blob | git hash-object -w --stdin) &&
git tag tagged-blob $blob &&
git config repack.writebitmaps true
fatal: Needed a single revision
/<<PKGBUILDDIR>>/git-fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects: 5000
Total objects: 300 ( 0 duplicates )
blobs : 100 ( 0 duplicates 0 deltas of 0 attempts)
trees : 100 ( 0 duplicates 98 deltas of 98 attempts)
commits: 100 ( 0 duplicates 0 deltas of 0 attempts)
tags : 0 ( 0 duplicates 0 deltas of 0 attempts)
Total branches: 1 ( 1 loads )
marks: 1024 ( 0 unique )
atoms: 100
Memory total: 2395 KiB
pools: 2122 KiB
objects: 273 KiB
---------------------------------------------------------------------
pack_report: getpagesize() = 4096
pack_report: core.packedGitWindowSize = 33554432
pack_report: core.packedGitLimit = 268435456
pack_report: pack_used_ctr = 2
pack_report: pack_mmap_calls = 1
pack_report: pack_open_windows = 1 / 1
pack_report: pack_mapped = 23968 / 23968
---------------------------------------------------------------------
Switched to a new branch 'other'
80e28224bf38f5c9e1ddab44f0a25eb060f5755c
/<<PKGBUILDDIR>>/git-fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects: 5000
Total objects: 30 ( 0 duplicates )
blobs : 10 ( 0 duplicates 0 deltas of 0 attempts)
trees : 10 ( 0 duplicates 9 deltas of 9 attempts)
commits: 10 ( 0 duplicates 0 deltas of 0 attempts)
tags : 0 ( 0 duplicates 0 deltas of 0 attempts)
Total branches: 1 ( 1 loads )
marks: 1024 ( 0 unique )
atoms: 105
Memory total: 2395 KiB
pools: 2122 KiB
objects: 273 KiB
---------------------------------------------------------------------
pack_report: getpagesize() = 4096
pack_report: core.packedGitWindowSize = 33554432
pack_report: core.packedGitLimit = 268435456
pack_report: pack_used_ctr = 16
pack_report: pack_mmap_calls = 2
pack_report: pack_open_windows = 2 / 2
pack_report: pack_mapped = 28624 / 28624
---------------------------------------------------------------------
Switched to branch 'master'
ok 1 - setup repo with moderate-sized history
expecting success:
git repack -ad &&
ls .git/objects/pack/ | grep bitmap >output &&
test_line_count = 1 output
ok 2 - full repack creates bitmaps
expecting success:
git rev-list --test-bitmap HEAD
Bitmap v1 test (103 entries loaded)
Found bitmap for 3d18bea0b3240535842b946b287bfe4de3cfae34. 384 bits / 7413a676 checksum
Verifying bitmap entries: 0% (1/300)
Verifying bitmap entries: 1% (3/300)
Verifying bitmap entries: 2% (6/300)
Verifying bitmap entries: 3% (9/300)
Verifying bitmap entries: 4% (12/300)
Verifying bitmap entries: 5% (15/300)
Verifying bitmap entries: 6% (18/300)
Verifying bitmap entries: 7% (21/300)
Verifying bitmap entries: 8% (24/300)
Verifying bitmap entries: 9% (27/300)
Verifying bitmap entries: 10% (30/300)
Verifying bitmap entries: 11% (33/300)
Verifying bitmap entries: 12% (36/300)
Verifying bitmap entries: 13% (39/300)
Verifying bitmap entries: 14% (42/300)
Verifying bitmap entries: 15% (45/300)
Verifying bitmap entries: 16% (48/300)
Verifying bitmap entries: 17% (51/300)
Verifying bitmap entries: 18% (54/300)
Verifying bitmap entries: 19% (57/300)
Verifying bitmap entries: 20% (60/300)
Verifying bitmap entries: 21% (63/300)
Verifying bitmap entries: 22% (66/300)
Verifying bitmap entries: 23% (69/300)
Verifying bitmap entries: 24% (72/300)
Verifying bitmap entries: 25% (75/300)
Verifying bitmap entries: 26% (78/300)
Verifying bitmap entries: 27% (81/300)
Verifying bitmap entries: 28% (84/300)
Verifying bitmap entries: 29% (87/300)
Verifying bitmap entries: 30% (90/300)
Verifying bitmap entries: 31% (93/300)
Verifying bitmap entries: 32% (96/300)
Verifying bitmap entries: 33% (99/300)
Verifying bitmap entries: 34% (102/300)
Verifying bitmap entries: 35% (105/300)
Verifying bitmap entries: 36% (108/300)
Verifying bitmap entries: 37% (111/300)
Verifying bitmap entries: 38% (114/300)
Verifying bitmap entries: 39% (117/300)
Verifying bitmap entries: 40% (120/300)
Verifying bitmap entries: 41% (123/300)
Verifying bitmap entries: 42% (126/300)
Verifying bitmap entries: 43% (129/300)
Verifying bitmap entries: 44% (132/300)
Verifying bitmap entries: 45% (135/300)
Verifying bitmap entries: 46% (138/300)
Verifying bitmap entries: 47% (141/300)
Verifying bitmap entries: 48% (144/300)
Verifying bitmap entries: 49% (147/300)
Verifying bitmap entries: 50% (150/300)
Verifying bitmap entries: 51% (153/300)
Verifying bitmap entries: 52% (156/300)
Verifying bitmap entries: 53% (159/300)
Verifying bitmap entries: 54% (162/300)
Verifying bitmap entries: 55% (165/300)
Verifying bitmap entries: 56% (168/300)
Verifying bitmap entries: 57% (171/300)
Verifying bitmap entries: 58% (174/300)
Verifying bitmap entries: 59% (177/300)
Verifying bitmap entries: 60% (180/300)
Verifying bitmap entries: 61% (183/300)
Verifying bitmap entries: 62% (186/300)
Verifying bitmap entries: 63% (189/300)
Verifying bitmap entries: 64% (192/300)
Verifying bitmap entries: 65% (195/300)
Verifying bitmap entries: 66% (198/300)
Verifying bitmap entries: 67% (201/300)
Verifying bitmap entries: 68% (204/300)
Verifying bitmap entries: 69% (207/300)
Verifying bitmap entries: 70% (210/300)
Verifying bitmap entries: 71% (213/300)
Verifying bitmap entries: 72% (216/300)
Verifying bitmap entries: 73% (219/300)
Verifying bitmap entries: 74% (222/300)
Verifying bitmap entries: 75% (225/300)
Verifying bitmap entries: 76% (228/300)
Verifying bitmap entries: 77% (231/300)
Verifying bitmap entries: 78% (234/300)
Verifying bitmap entries: 79% (237/300)
Verifying bitmap entries: 80% (240/300)
Verifying bitmap entries: 81% (243/300)
Verifying bitmap entries: 82% (246/300)
Verifying bitmap entries: 83% (249/300)
Verifying bitmap entries: 84% (252/300)
Verifying bitmap entries: 85% (255/300)
Verifying bitmap entries: 86% (258/300)
Verifying bitmap entries: 87% (261/300)
Verifying bitmap entries: 88% (264/300)
Verifying bitmap entries: 89% (267/300)
Verifying bitmap entries: 90% (270/300)
Verifying bitmap entries: 91% (273/300)
Verifying bitmap entries: 92% (276/300)
Verifying bitmap entries: 93% (279/300)
Verifying bitmap entries: 94% (282/300)
Verifying bitmap entries: 95% (285/300)
Verifying bitmap entries: 96% (288/300)
Verifying bitmap entries: 97% (291/300)
Verifying bitmap entries: 98% (294/300)
Verifying bitmap entries: 99% (297/300)
Verifying bitmap entries: 100% (300/300)
Verifying bitmap entries: 100% (300/300), done.
OK!
ok 3 - rev-list --test-bitmap verifies bitmaps
expecting success:
git rev-list --count HEAD >expect &&
git rev-list --use-bitmap-index --count HEAD >actual &&
test_cmp expect actual
ok 4 - counting commits via bitmap (full bitmap)
expecting success:
git rev-list --count HEAD~5..HEAD >expect &&
git rev-list --use-bitmap-index --count HEAD~5..HEAD >actual &&
test_cmp expect actual
ok 5 - counting partial commits via bitmap (full bitmap)
expecting success:
git rev-list --count -n 1 HEAD >expect &&
git rev-list --use-bitmap-index --count -n 1 HEAD >actual &&
test_cmp expect actual
ok 6 - counting commits with limit (full bitmap)
expecting success:
git rev-list --count other...master >expect &&
git rev-list --use-bitmap-index --count other...master >actual &&
test_cmp expect actual
ok 7 - counting non-linear history (full bitmap)
expecting success:
git rev-list --count HEAD -- 1.t >expect &&
git rev-list --use-bitmap-index --count HEAD -- 1.t >actual &&
test_cmp expect actual
ok 8 - counting commits with limiting (full bitmap)
expecting success:
git rev-list --objects --use-bitmap-index HEAD >tmp &&
cut -d" " -f1 <tmp >tmp2 &&
sort <tmp2 >actual &&
git rev-list --objects HEAD >tmp &&
cut -d" " -f1 <tmp >tmp2 &&
sort <tmp2 >expect &&
test_cmp expect actual
ok 9 - enumerate --objects (full bitmap)
expecting success:
git rev-list --objects --use-bitmap-index HEAD tagged-blob >actual &&
grep $blob actual
782f60206c837dcd3d441e106549ad6f58de55b5
ok 10 - bitmap --objects handles non-commit objects (full bitmap)
expecting success:
git clone --no-local --bare . clone.git &&
git rev-parse HEAD >expect &&
git --git-dir=clone.git rev-parse HEAD >actual &&
test_cmp expect actual
Cloning into bare repository 'clone.git'...
ok 11 - clone from bitmapped repository
expecting success:
test_commit_bulk --id=further 10
3d18bea0b3240535842b946b287bfe4de3cfae34
/<<PKGBUILDDIR>>/git-fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects: 5000
Total objects: 30 ( 0 duplicates )
blobs : 10 ( 0 duplicates 0 deltas of 0 attempts)
trees : 10 ( 0 duplicates 9 deltas of 9 attempts)
commits: 10 ( 0 duplicates 0 deltas of 0 attempts)
tags : 0 ( 0 duplicates 0 deltas of 0 attempts)
Total branches: 1 ( 1 loads )
marks: 1024 ( 0 unique )
atoms: 110
Memory total: 2395 KiB
pools: 2122 KiB
objects: 273 KiB
---------------------------------------------------------------------
pack_report: getpagesize() = 4096
pack_report: core.packedGitWindowSize = 33554432
pack_report: core.packedGitLimit = 268435456
pack_report: pack_used_ctr = 16
pack_report: pack_mmap_calls = 2
pack_report: pack_open_windows = 2 / 2
pack_report: pack_mapped = 32057 / 32057
---------------------------------------------------------------------
ok 12 - setup further non-bitmapped commits
expecting success:
git rev-list --count HEAD >expect &&
git rev-list --use-bitmap-index --count HEAD >actual &&
test_cmp expect actual
ok 13 - counting commits via bitmap (partial bitmap)
expecting success:
git rev-list --count HEAD~5..HEAD >expect &&
git rev-list --use-bitmap-index --count HEAD~5..HEAD >actual &&
test_cmp expect actual
ok 14 - counting partial commits via bitmap (partial bitmap)
expecting success:
git rev-list --count -n 1 HEAD >expect &&
git rev-list --use-bitmap-index --count -n 1 HEAD >actual &&
test_cmp expect actual
ok 15 - counting commits with limit (partial bitmap)
expecting success:
git rev-list --count other...master >expect &&
git rev-list --use-bitmap-index --count other...master >actual &&
test_cmp expect actual
ok 16 - counting non-linear history (partial bitmap)
expecting success:
git rev-list --count HEAD -- 1.t >expect &&
git rev-list --use-bitmap-index --count HEAD -- 1.t >actual &&
test_cmp expect actual
ok 17 - counting commits with limiting (partial bitmap)
expecting success:
git rev-list --objects --use-bitmap-index HEAD >tmp &&
cut -d" " -f1 <tmp >tmp2 &&
sort <tmp2 >actual &&
git rev-list --objects HEAD >tmp &&
cut -d" " -f1 <tmp >tmp2 &&
sort <tmp2 >expect &&
test_cmp expect actual
ok 18 - enumerate --objects (partial bitmap)
expecting success:
git rev-list --objects --use-bitmap-index HEAD tagged-blob >actual &&
grep $blob actual
782f60206c837dcd3d441e106549ad6f58de55b5
ok 19 - bitmap --objects handles non-commit objects (partial bitmap)
expecting success:
git --git-dir=clone.git fetch origin master:master &&
git rev-parse HEAD >expect &&
git --git-dir=clone.git rev-parse HEAD >actual &&
test_cmp expect actual
From /<<PKGBUILDDIR>>/t/trash directory.t5310-pack-bitmaps/.
3d18bea..144470b master -> master
ok 20 - fetch (partial bitmap)
expecting success:
test_commit more-1 &&
test_must_fail git repack -d 2>err &&
test_i18ngrep "Incremental repacks are incompatible with bitmap" err
[master b4ed250] more-1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 more-1.t
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: Incremental repacks are incompatible with bitmap indexes. Use
ok 21 - incremental repack fails when bitmaps are requested
expecting success:
test_commit more-2 &&
git repack -d --no-write-bitmap-index
[master d580316] more-2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 more-2.t
ok 22 - incremental repack can disable bitmaps
expecting success:
git init --bare alt.git &&
echo $(pwd)/alt.git/objects >.git/objects/info/alternates &&
echo content1 >file1 &&
# non-local loose object which is not present in bitmapped pack
altblob=$(GIT_DIR=alt.git git hash-object -w file1) &&
# non-local loose object which is also present in bitmapped pack
git cat-file blob $blob | GIT_DIR=alt.git git hash-object -w --stdin &&
git add file1 &&
test_tick &&
git commit -m commit_file1 &&
echo HEAD | git pack-objects --local --stdout --revs >1.pack &&
git index-pack 1.pack &&
list_packed_objects 1.idx >1.objects &&
printf "%s\n" "$altblob" "$blob" >nonlocal-loose &&
! has_any nonlocal-loose 1.objects
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5310-pack-bitmaps/alt.git/
782f60206c837dcd3d441e106549ad6f58de55b5
[master 95e0885] commit_file1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1
ef32666341da405abd1022f801f7f79f201e4b35
ok 23 - pack-objects respects --local (non-local loose)
expecting success:
echo content2 >file2 &&
blob2=$(git hash-object -w file2) &&
git add file2 &&
test_tick &&
git commit -m commit_file2 &&
printf "%s\n" "$blob2" "$bitmaptip" >keepobjects &&
pack2=$(git pack-objects pack2 <keepobjects) &&
mv pack2-$pack2.* .git/objects/pack/ &&
>.git/objects/pack/pack2-$pack2.keep &&
rm $(objpath $blob2) &&
echo HEAD | git pack-objects --honor-pack-keep --stdout --revs >2a.pack &&
git index-pack 2a.pack &&
list_packed_objects 2a.idx >2a.objects &&
! has_any keepobjects 2a.objects
[master 6c76b90] commit_file2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
695a8c6a21332861f55c7afbf46593c5479d4984
ok 24 - pack-objects respects --honor-pack-keep (local non-bitmapped pack)
expecting success:
mv .git/objects/pack/pack2-$pack2.* alt.git/objects/pack/ &&
echo HEAD | git pack-objects --local --stdout --revs >2b.pack &&
git index-pack 2b.pack &&
list_packed_objects 2b.idx >2b.objects &&
! has_any keepobjects 2b.objects
ac8b9d41d7e5c339935860f260d513ed74d0abc3
ok 25 - pack-objects respects --local (non-local pack)
expecting success:
ls .git/objects/pack/ | grep bitmap >output &&
test_line_count = 1 output &&
packbitmap=$(basename $(cat output) .bitmap) &&
list_packed_objects .git/objects/pack/$packbitmap.idx >packbitmap.objects &&
test_when_finished "rm -f .git/objects/pack/$packbitmap.keep" &&
>.git/objects/pack/$packbitmap.keep &&
echo HEAD | git pack-objects --honor-pack-keep --stdout --revs >3a.pack &&
git index-pack 3a.pack &&
list_packed_objects 3a.idx >3a.objects &&
! has_any packbitmap.objects 3a.objects
1174422856453c06b0af51e54ed7b90ee9a62e8b
ok 26 - pack-objects respects --honor-pack-keep (local bitmapped pack)
expecting success:
mv .git/objects/pack/$packbitmap.* alt.git/objects/pack/ &&
rm -f .git/objects/pack/multi-pack-index &&
test_when_finished "mv alt.git/objects/pack/$packbitmap.* .git/objects/pack/" &&
echo HEAD | git pack-objects --local --stdout --revs >3b.pack &&
git index-pack 3b.pack &&
list_packed_objects 3b.idx >3b.objects &&
! has_any packbitmap.objects 3b.objects
2b0b41cdb9d9b5aa25b7798ca7ea61af68c42c98
ok 27 - pack-objects respects --local (non-local bitmapped pack)
expecting success:
# make sure we still have 1 bitmap index from previous tests
ls .git/objects/pack/ | grep bitmap >output &&
test_line_count = 1 output &&
# verify equivalent packs are generated with/without using bitmap index
packasha1=$(git pack-objects --no-use-bitmap-index --all packa </dev/null) &&
packbsha1=$(git pack-objects --use-bitmap-index --all packb </dev/null) &&
list_packed_objects packa-$packasha1.idx >packa.objects &&
list_packed_objects packb-$packbsha1.idx >packb.objects &&
test_cmp packa.objects packb.objects
ok 28 - pack-objects to file can use bitmap
expecting success:
git repack -ad &&
ls .git/objects/pack/ | grep bitmap >output &&
test_line_count = 1 output
ok 29 - full repack, reusing previous bitmaps
expecting success:
git --git-dir=clone.git fetch origin master:master &&
git rev-parse HEAD >expect &&
git --git-dir=clone.git rev-parse HEAD >actual &&
test_cmp expect actual
From /<<PKGBUILDDIR>>/t/trash directory.t5310-pack-bitmaps/.
144470b..6c76b90 master -> master
* [new tag] more-1 -> more-1
* [new tag] more-2 -> more-2
ok 30 - fetch (full bitmap)
expecting success:
blob=$(echo "missing have" | git hash-object -w --stdin) &&
tree=$(printf "100644 blob $blob\tfile\n" | git mktree) &&
parent=$(echo parent | git commit-tree $tree) &&
commit=$(echo commit | git commit-tree $tree -p $parent) &&
cat >revs <<-EOF
HEAD
^HEAD^
^$commit
EOF
ok 31 - create objects for missing-HAVE tests
expecting success:
cat >revs2 <<-EOF &&
HEAD
$commit
EOF
git pack-objects --incremental --stdout --revs <revs2 >4.pack &&
git index-pack 4.pack &&
list_packed_objects 4.idx >4.objects &&
test_line_count = 4 4.objects &&
git rev-list --objects $commit >revlist &&
cut -d" " -f1 revlist |sort >objects &&
test_cmp 4.objects objects
b8593dcd3903279f194e777a655055aa2d393815
ok 32 - pack-objects respects --incremental
expecting success:
rm $(objpath $blob) &&
git pack-objects --stdout --revs <revs >/dev/null
ok 33 - pack with missing blob
expecting success:
rm $(objpath $tree) &&
git pack-objects --stdout --revs <revs >/dev/null
ok 34 - pack with missing tree
expecting success:
rm $(objpath $parent) &&
git pack-objects --stdout --revs <revs >/dev/null
ok 35 - pack with missing parent
checking prerequisite: JGIT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
jgit --version
)
t5310-pack-bitmaps.sh: 7: eval: jgit: not found
prerequisite JGIT not satisfied
skipping test: we can read jgit bitmaps
git clone --bare . compat-jgit.git &&
(
cd compat-jgit.git &&
rm -f objects/pack/*.bitmap &&
jgit gc &&
git rev-list --test-bitmap HEAD
)
ok 36 # skip we can read jgit bitmaps (missing JGIT)
skipping test: jgit can read our bitmaps
git clone --bare . compat-us.git &&
(
cd compat-us.git &&
git repack -adb &&
# jgit gc will barf if it does not like our bitmaps
jgit gc
)
ok 37 # skip jgit can read our bitmaps (missing JGIT)
expecting success:
test-tool genrandom foo $((1024 * 1024)) >rand &&
git add rand &&
git commit -m "commit with big file" &&
git -c pack.packSizeLimit=500k repack -adb &&
git init --bare no-bitmaps.git &&
git -C no-bitmaps.git fetch .. HEAD
[master 42108c3] commit with big file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 rand
warning: minimum pack size limit is 1 MiB
warning: disabling bitmap writing, packs are split due to pack.packSizeLimit
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5310-pack-bitmaps/no-bitmaps.git/
From ..
* branch HEAD -> FETCH_HEAD
ok 38 - splitting packs does not generate bogus bitmaps
expecting success:
rm -f .git/objects/pack/*.keep &&
git repack -adb &&
reusable_pack () {
git for-each-ref --format="%(objectname)" |
git pack-objects --delta-base-offset --revs --stdout "$@"
}
ok 39 - set up reusable pack
expecting success:
test_when_finished "rm -f .git/objects/pack/*.keep" &&
for i in .git/objects/pack/*.pack
do
>${i%.pack}.keep
done &&
reusable_pack --honor-pack-keep >empty.pack &&
git index-pack empty.pack &&
git show-index <empty.idx >actual &&
test_must_be_empty actual
029d08823bd8a8eab510ad6ac75c823cfd3ed31e
ok 40 - pack reuse respects --honor-pack-keep
expecting success:
mv .git/objects/pack/* alt.git/objects/pack/ &&
test_when_finished "mv alt.git/objects/pack/* .git/objects/pack/" &&
reusable_pack --local >empty.pack &&
git index-pack empty.pack &&
git show-index <empty.idx >actual &&
test_must_be_empty actual
029d08823bd8a8eab510ad6ac75c823cfd3ed31e
ok 41 - pack reuse respects --local
expecting success:
reusable_pack --incremental >empty.pack &&
git index-pack empty.pack &&
git show-index <empty.idx >actual &&
test_must_be_empty actual
029d08823bd8a8eab510ad6ac75c823cfd3ed31e
ok 42 - pack reuse respects --incremental
expecting success:
git repack -ad &&
git rev-list --use-bitmap-index --count --all >expect &&
bitmap=$(ls .git/objects/pack/*.bitmap) &&
test_when_finished "rm -f $bitmap" &&
test_copy_bytes 512 <$bitmap >$bitmap.tmp &&
mv -f $bitmap.tmp $bitmap &&
git rev-list --use-bitmap-index --count --all >actual 2>stderr &&
test_cmp expect actual &&
test_i18ngrep corrupt stderr
error: corrupt ewah bitmap: eof in data (14 bytes short)
error: Failed to load bitmap index (corrupted?)
ok 43 - truncated bitmap fails gracefully
expecting success:
# This first commit contains the buried base object.
test-tool genrandom delta 16384 >file &&
git add file &&
git commit -m "delta base" &&
base=$(git rev-parse --verify HEAD:file) &&
# These intermediate commits bury the base back in history.
# This becomes the "old" state.
for i in 1 2 3 4 5
do
echo $i >file &&
git commit -am "intermediate $i" || return 1
done &&
git branch delta-reuse-old &&
# And now our new history has a delta against the buried base. Note
# that this must be smaller than the original file, since pack-objects
# prefers to create deltas from smaller objects to larger.
test-tool genrandom delta 16300 >file &&
git commit -am "delta result" &&
delta=$(git rev-parse --verify HEAD:file) &&
git branch delta-reuse-new &&
# Repack with bitmaps and double check that we have the expected delta
# relationship.
git repack -adb &&
have_delta $delta $base
[master b455f39] delta base
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
[master cfdfdef] intermediate 1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rewrite file (100%)
[master 99c78fc] intermediate 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 4c3bf1d] intermediate 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master bdfb406] intermediate 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 8c2b70c] intermediate 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 6db2817] delta result
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rewrite file (100%)
ok 44 - set up thin delta-reuse parent
expecting success:
test_config pack.usebitmaps false &&
test_when_finished "rm -rf client.git" &&
git init --bare client.git &&
(
cd client.git &&
git config transfer.unpackLimit 1 &&
git fetch .. delta-reuse-old:delta-reuse-old &&
git fetch .. delta-reuse-new:delta-reuse-new &&
have_delta $delta $ZERO_OID
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5310-pack-bitmaps/client.git/
From ..
* [new branch] delta-reuse-old -> delta-reuse-old
* [new tag] more-1 -> more-1
* [new tag] more-2 -> more-2
From ..
* [new branch] delta-reuse-new -> delta-reuse-new
ok 45 - fetch without bitmaps ignores delta against old base
expecting success:
test_config pack.usebitmaps true &&
test_when_finished "rm -rf client.git" &&
git init --bare client.git &&
(
cd client.git &&
git config transfer.unpackLimit 1 &&
git fetch .. delta-reuse-old:delta-reuse-old &&
git fetch .. delta-reuse-new:delta-reuse-new &&
have_delta $delta $base
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5310-pack-bitmaps/client.git/
From ..
* [new branch] delta-reuse-old -> delta-reuse-old
* [new tag] more-1 -> more-1
* [new tag] more-2 -> more-2
From ..
* [new branch] delta-reuse-new -> delta-reuse-new
ok 46 - fetch with bitmaps can reuse old base
# passed all 46 test(s)
1..46
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5320-delta-islands.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5320-delta-islands/.git/
expecting success:
commit one seed 1 &&
commit two seed 12
one=babc1f87e2baa9f6ad764af981fccdd2da48016e
two=ce1aaaff2e8846bd2f36b1a0317cacaec6fc257e
ok 1 - setup commits
expecting success:
git repack -adf &&
is_delta_base $one $two
babc1f87e2baa9f6ad764af981fccdd2da48016e has base ce1aaaff2e8846bd2f36b1a0317cacaec6fc257e
ok 2 - vanilla repack deltas one against two
expecting success:
git repack -adfi &&
is_delta_base $one $two
babc1f87e2baa9f6ad764af981fccdd2da48016e has base ce1aaaff2e8846bd2f36b1a0317cacaec6fc257e
ok 3 - island repack with no island definition is vanilla
expecting success:
git -c "pack.island=refs/foo" repack -adfi &&
is_delta_base $one $two
babc1f87e2baa9f6ad764af981fccdd2da48016e has base ce1aaaff2e8846bd2f36b1a0317cacaec6fc257e
ok 4 - island repack with no matches is vanilla
expecting success:
git -c "pack.island=refs/heads/(.*)" repack -adfi &&
! is_delta_base $one $two &&
! is_delta_base $two $one
babc1f87e2baa9f6ad764af981fccdd2da48016e has base 0000000000000000000000000000000000000000
ce1aaaff2e8846bd2f36b1a0317cacaec6fc257e has base 0000000000000000000000000000000000000000
ok 5 - separate islands disallows delta
expecting success:
git -c "pack.island=refs/heads" repack -adfi &&
is_delta_base $one $two
babc1f87e2baa9f6ad764af981fccdd2da48016e has base ce1aaaff2e8846bd2f36b1a0317cacaec6fc257e
ok 6 - same island allows delta
expecting success:
git \
-c "pack.island=refs/(.*)/one" \
-c "pack.island=refs/(.*)/two" \
repack -adfi &&
is_delta_base $one $two
babc1f87e2baa9f6ad764af981fccdd2da48016e has base ce1aaaff2e8846bd2f36b1a0317cacaec6fc257e
ok 7 - coalesce same-named islands
expecting success:
git repack -adfi &&
is_delta_base $one $two &&
git -c "pack.island=refs/heads/(.*)" repack -adi &&
! is_delta_base $one $two &&
! is_delta_base $two $one
babc1f87e2baa9f6ad764af981fccdd2da48016e has base ce1aaaff2e8846bd2f36b1a0317cacaec6fc257e
babc1f87e2baa9f6ad764af981fccdd2da48016e has base 0000000000000000000000000000000000000000
ce1aaaff2e8846bd2f36b1a0317cacaec6fc257e has base 0000000000000000000000000000000000000000
ok 8 - island restrictions drop reused deltas
expecting success:
git -c "pack.island=heads/(.*)" repack -adfi &&
is_delta_base $one $two
babc1f87e2baa9f6ad764af981fccdd2da48016e has base ce1aaaff2e8846bd2f36b1a0317cacaec6fc257e
ok 9 - island regexes are left-anchored
expecting success:
git \
-c "pack.island=refs/heads/(.*)" \
-c "pack.island=refs/heads/" \
repack -adfi &&
is_delta_base $one $two
babc1f87e2baa9f6ad764af981fccdd2da48016e has base ce1aaaff2e8846bd2f36b1a0317cacaec6fc257e
ok 10 - island regexes follow last-one-wins scheme
expecting success:
commit root shared root &&
commit one shared 1 root &&
commit two shared 12-long root
root=2399f35d1d9acc612cefa2f7983f510fbd6b24e9
one=1db8b3605f452b4a89b403abb2ae905f0a7ffaf6
two=c160aaeae55c91b198ce651c8fc1d4e09dd97b4b
ok 11 - setup shared history
expecting success:
git repack -adf &&
is_delta_base $one $two &&
is_delta_base $root $two
1db8b3605f452b4a89b403abb2ae905f0a7ffaf6 has base c160aaeae55c91b198ce651c8fc1d4e09dd97b4b
2399f35d1d9acc612cefa2f7983f510fbd6b24e9 has base c160aaeae55c91b198ce651c8fc1d4e09dd97b4b
ok 12 - vanilla delta goes between branches
expecting success:
git -c "pack.island=refs/heads/(.*)" repack -adfi &&
is_delta_base $one $root &&
is_delta_base $two $root
1db8b3605f452b4a89b403abb2ae905f0a7ffaf6 has base 2399f35d1d9acc612cefa2f7983f510fbd6b24e9
c160aaeae55c91b198ce651c8fc1d4e09dd97b4b has base 2399f35d1d9acc612cefa2f7983f510fbd6b24e9
ok 13 - deltas allowed against superset islands
expecting success:
cat >expect <<-EOF &&
$root
$two
EOF
git -c "pack.island=refs/heads/(.*)" \
-c "pack.islandcore=one" \
repack -adfi &&
git verify-pack -v .git/objects/pack/*.pack |
cut -d" " -f1 |
egrep "$root|$two" >actual &&
test_cmp expect actual
ok 14 - island core places core objects first
expecting success:
git -c "pack.islandcore=one" repack -adfi
ok 15 - unmatched island core is not fatal
# passed all 15 test(s)
1..15
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5321-pack-large-objects.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5321-pack-large-objects/.git/
expecting success:
clear_packs &&
{
pack_header 2 &&
pack_obj $A $B &&
pack_obj $B
} >ab.pack &&
pack_trailer ab.pack &&
git index-pack --stdin <ab.pack
pack 8af524300e46c11647862073e882d467bc0dd22d
ok 1 - setup
expecting success:
printf "%s\\n" $A $B |
GIT_TEST_OE_DELTA_SIZE=2 git pack-objects tmp-pack
aee080dc5b8a48f951541c0ad63f65af48847a6f
ok 2 - repack large deltas
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5322-pack-objects-sparse.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5322-pack-objects-sparse/.git/
expecting success:
test_commit initial &&
for i in $(test_seq 1 3)
do
mkdir f$i &&
for j in $(test_seq 1 3)
do
mkdir f$i/f$j &&
echo $j >f$i/f$j/data.txt
done
done &&
git add . &&
git commit -m "Initialized trees" &&
for i in $(test_seq 1 3)
do
git checkout -b topic$i master &&
echo change-$i >f$i/f$i/data.txt &&
git commit -a -m "Changed f$i/f$i/data.txt"
done &&
cat >packinput.txt <<-EOF &&
topic1
^topic2
^topic3
EOF
git rev-parse \
topic1 \
topic1^{tree} \
topic1:f1 \
topic1:f1/f1 \
topic1:f1/f1/data.txt | sort >expect_objects.txt
[master (root-commit) 24b24cf] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
[master 8ccf85b] Initialized trees
Author: A U Thor <author@example.com>
9 files changed, 9 insertions(+)
create mode 100644 f1/f1/data.txt
create mode 100644 f1/f2/data.txt
create mode 100644 f1/f3/data.txt
create mode 100644 f2/f1/data.txt
create mode 100644 f2/f2/data.txt
create mode 100644 f2/f3/data.txt
create mode 100644 f3/f1/data.txt
create mode 100644 f3/f2/data.txt
create mode 100644 f3/f3/data.txt
Switched to a new branch 'topic1'
[topic1 32cf0ab] Changed f1/f1/data.txt
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'topic2'
[topic2 2b44896] Changed f2/f2/data.txt
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'topic3'
[topic3 48a532e] Changed f3/f3/data.txt
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup repo
expecting success:
git pack-objects --stdout --revs --no-sparse <packinput.txt >nonsparse.pack &&
git index-pack -o nonsparse.idx nonsparse.pack &&
git show-index <nonsparse.idx | awk "{print \$2}" >nonsparse_objects.txt &&
test_cmp expect_objects.txt nonsparse_objects.txt
d614884b9b2195861f9f3410ae24b1c2fdc0c831
ok 2 - non-sparse pack-objects
expecting success:
git pack-objects --stdout --revs --sparse <packinput.txt >sparse.pack &&
git index-pack -o sparse.idx sparse.pack &&
git show-index <sparse.idx | awk "{print \$2}" >sparse_objects.txt &&
test_cmp expect_objects.txt sparse_objects.txt
d614884b9b2195861f9f3410ae24b1c2fdc0c831
ok 3 - sparse pack-objects
expecting success:
git checkout topic1 &&
echo change-3 >f3/f3/data.txt &&
git commit -a -m "Changed f3/f3/data.txt" &&
git rev-parse \
topic1~1 \
topic1~1^{tree} \
topic1^{tree} \
topic1 \
topic1:f1 \
topic1:f1/f1 \
topic1:f1/f1/data.txt | sort >required_objects.txt
Switched to branch 'topic1'
[topic1 200bcc4] Changed f3/f3/data.txt
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 4 - duplicate a folder from f3 and commit to topic1
expecting success:
git pack-objects --stdout --revs --no-sparse <packinput.txt >nonsparse.pack &&
git index-pack -o nonsparse.idx nonsparse.pack &&
git show-index <nonsparse.idx | awk "{print \$2}" >nonsparse_objects.txt &&
comm -1 -2 required_objects.txt nonsparse_objects.txt >nonsparse_required_objects.txt &&
test_cmp required_objects.txt nonsparse_required_objects.txt
46a30e027f51c2ad758015d56bda1ee6d4c8c84c
ok 5 - non-sparse pack-objects
expecting success:
git pack-objects --stdout --revs --sparse <packinput.txt >sparse.pack &&
git index-pack -o sparse.idx sparse.pack &&
git show-index <sparse.idx | awk "{print \$2}" >sparse_objects.txt &&
comm -1 -2 required_objects.txt sparse_objects.txt >sparse_required_objects.txt &&
test_cmp required_objects.txt sparse_required_objects.txt
46a30e027f51c2ad758015d56bda1ee6d4c8c84c
ok 6 - sparse pack-objects
expecting success:
mkdir f3/f4 &&
cp -r f1/f1/* f3/f4 &&
git add f3/f4 &&
git commit -m "Copied f1/f1 to f3/f4" &&
cat >packinput.txt <<-EOF &&
topic1
^topic1~1
EOF
git rev-parse \
topic1 \
topic1^{tree} \
topic1:f3 | sort >required_objects.txt
[topic1 b9b902e] Copied f1/f1 to f3/f4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 f3/f4/data.txt
ok 7 - duplicate a folder from f1 into f3
expecting success:
git pack-objects --stdout --revs --no-sparse <packinput.txt >nonsparse.pack &&
git index-pack -o nonsparse.idx nonsparse.pack &&
git show-index <nonsparse.idx | awk "{print \$2}" >nonsparse_objects.txt &&
comm -1 -2 required_objects.txt nonsparse_objects.txt >nonsparse_required_objects.txt &&
test_cmp required_objects.txt nonsparse_required_objects.txt
3b547739f421b9a4f5fc24410679e4e1f7de71cf
ok 8 - non-sparse pack-objects
expecting success:
git rev-parse \
topic1 \
topic1^{tree} \
topic1:f3 \
topic1:f3/f4 \
topic1:f3/f4/data.txt | sort >expect_sparse_objects.txt &&
git pack-objects --stdout --revs --sparse <packinput.txt >sparse.pack &&
git index-pack -o sparse.idx sparse.pack &&
git show-index <sparse.idx | awk "{print \$2}" >sparse_objects.txt &&
test_cmp expect_sparse_objects.txt sparse_objects.txt
9f747802011a9f66e260a2ddb27f222338b37741
ok 9 - sparse pack-objects
expecting success:
git config pack.useSparse true &&
git pack-objects --stdout --revs <packinput.txt >sparse.pack &&
git index-pack -o sparse.idx sparse.pack &&
git show-index <sparse.idx | awk "{print \$2}" >sparse_objects.txt &&
test_cmp expect_sparse_objects.txt sparse_objects.txt
9f747802011a9f66e260a2ddb27f222338b37741
ok 10 - pack.useSparse enables algorithm
expecting success:
git pack-objects --stdout --revs --no-sparse <packinput.txt >sparse.pack &&
git index-pack -o sparse.idx sparse.pack &&
git show-index <sparse.idx | awk "{print \$2}" >sparse_objects.txt &&
test_cmp required_objects.txt sparse_objects.txt
3b547739f421b9a4f5fc24410679e4e1f7de71cf
ok 11 - pack.useSparse overridden
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5323-pack-redundant.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5323-pack-redundant/.git/
expecting success:
git init --bare "$master_repo" &&
create_commits_in "$master_repo" A B C D E F G H I J K L M N O P Q R
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5323-pack-redundant/master.git/
ok 1 - setup master repo
expecting success:
create_pack_in "$master_repo" P1 <<-EOF &&
$T
$A
$B
$C
$D
$E
$F
$R
EOF
create_pack_in "$master_repo" P2 <<-EOF &&
$B
$C
$D
$E
$G
$H
$I
EOF
create_pack_in "$master_repo" P3 <<-EOF &&
$F
$I
$J
$K
$L
$M
EOF
(
cd "$master_repo" &&
git pack-redundant --all >out &&
test_must_be_empty out
)
ok 2 - master: no redundant for pack 1, 2, 3
expecting success:
create_pack_in "$master_repo" P4 <<-EOF &&
$J
$K
$L
$M
$P
EOF
create_pack_in "$master_repo" P5 <<-EOF &&
$G
$H
$N
$O
EOF
(
cd "$master_repo" &&
cat >expect <<-EOF &&
P3:$P3
EOF
git pack-redundant --all >out &&
format_packfiles <out >actual &&
test_cmp expect actual
)
ok 3 - master: one of pack-2/pack-3 is redundant
expecting success:
create_pack_in "$master_repo" P6 <<-EOF &&
$N
$O
$Q
EOF
create_pack_in "$master_repo" P7 <<-EOF &&
$P
$Q
EOF
(
cd "$master_repo" &&
cat >expect <<-EOF &&
P2:$P2
P4:$P4
P6:$P6
EOF
git pack-redundant --all >out &&
format_packfiles <out >actual &&
test_cmp expect actual
)
ok 4 - master: pack 2, 4, and 6 are redundant
expecting success:
create_pack_in "$master_repo" P8 <<-EOF &&
$A
EOF
(
cd "$master_repo" &&
cat >expect <<-EOF &&
P2:$P2
P4:$P4
P6:$P6
P8:$P8
EOF
git pack-redundant --all >out &&
format_packfiles <out >actual &&
test_cmp expect actual
)
ok 5 - master: pack-8 (subset of pack-1) is also redundant
expecting success:
(
cd "$master_repo" &&
git prune-packed &&
find objects -type f | sed -e "/objects\/pack\//d" >out &&
test_must_be_empty out
)
ok 6 - master: clean loose objects
expecting success:
(
cd "$master_repo" &&
git pack-redundant --all | xargs rm &&
git fsck &&
git pack-redundant --all >out &&
test_must_be_empty out
)
ok 7 - master: remove redundant packs and pass fsck
expecting success:
git clone --mirror "$master_repo" "$shared_repo" &&
(
cd "$shared_repo" &&
printf "../../$master_repo/objects\n" >objects/info/alternates
)
Cloning into bare repository 'shared.git'...
done.
ok 8 - setup shared.git
expecting success:
(
cd "$shared_repo" &&
git pack-redundant --all >out &&
test_must_be_empty out
)
ok 9 - shared: all packs are redundant, but no output without --alt-odb
expecting success:
(
cd "$shared_repo" &&
cat >expect <<-EOF &&
P1:$P1
P3:$P3
P5:$P5
P7:$P7
EOF
git pack-redundant --all --verbose >out 2>out.err &&
test_must_be_empty out &&
grep "pack$" out.err | format_packfiles >actual &&
test_cmp expect actual
)
ok 10 - shared: show redundant packs in stderr for verbose mode
expecting success:
(
cd "$shared_repo" &&
cat >expect <<-EOF &&
fatal: Zero packs found!
EOF
git pack-redundant --all --alt-odb | xargs rm &&
git fsck &&
test_must_fail git pack-redundant --all --alt-odb >actual 2>&1 &&
test_cmp expect actual
)
ok 11 - shared: remove redundant packs, no packs left
expecting success:
create_commits_in "$shared_repo" X Y Z &&
create_pack_in "$shared_repo" Px1 <<-EOF &&
$X
$Y
$Z
$A
$B
$C
EOF
create_pack_in "$shared_repo" Px2 <<-EOF
$X
$Y
$Z
$D
$E
$F
EOF
ok 12 - shared: create new objects and packs
expecting success:
(
cd "$shared_repo" &&
git pack-redundant --all >out &&
test_must_be_empty out
)
ok 13 - shared: no redundant without --alt-odb
expecting success:
(
cd "$shared_repo" &&
git pack-redundant --all --alt-odb >out &&
format_packfiles <out >actual &&
test_line_count = 1 actual
)
ok 14 - shared: one pack is redundant with --alt-odb
expecting success:
(
cd "$shared_repo" &&
cat >expect <<-EOF &&
Px1:$Px1
Px2:$Px2
EOF
git pack-redundant --all --alt-odb >out <<-EOF &&
$X
$Y
$Z
EOF
format_packfiles <out >actual &&
test_cmp expect actual
)
ok 15 - shared: ignore unique objects and all two packs are redundant
# passed all 15 test(s)
1..15
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5319-multi-pack-index.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5319-multi-pack-index/.git/
expecting success:
test_when_finished rm -f pack/multi-pack-index &&
git multi-pack-index --object-dir=. write &&
midx_read_expect 0 0 4 .
ok 1 - write midx with no packs
expecting success:
test_commit initial &&
for i in $(test_seq 1 5)
do
generate_objects $i
done &&
commit_and_list_objects
[master (root-commit) 24b24cf] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
HEAD is now at cd0747a
ok 2 - create objects
expecting success:
pack=$(git pack-objects --index-version=1 $objdir/pack/test <obj-list) &&
test_when_finished rm $objdir/pack/test-$pack.pack \
$objdir/pack/test-$pack.idx $objdir/pack/multi-pack-index &&
git multi-pack-index --object-dir=$objdir write &&
midx_read_expect 1 18 4 $objdir
ok 3 - write midx with one v1 pack
expecting success:
git pack-objects --index-version=2,0x40 $objdir/pack/test <obj-list &&
git multi-pack-index --object-dir=$objdir write &&
midx_read_expect 1 18 4 $objdir
a10c8cef352773b1f1b38ecc868f417f3d6029c9
ok 4 - write midx with one v2 pack
expecting success:
midx_git_two_modes "rev-list --objects --all" &&
midx_git_two_modes "log --raw" &&
midx_git_two_modes "count-objects --verbose" &&
midx_git_two_modes "cat-file --batch-all-objects --batch-check" &&
midx_git_two_modes "cat-file --batch-all-objects --batch-check --unordered" sorted
ok 5 - check normal git operations: one v2 pack
expecting success:
idx=$(test-tool read-midx $objdir | grep "\.idx\$") &&
mv $objdir/pack/$idx backup-$idx &&
test_when_finished "mv backup-\$idx \$objdir/pack/\$idx" &&
# This is the minimum size for a sha-1 based .idx; this lets
# us pass perfunctory tests, but anything that actually opens and reads
# the idx file will complain.
test_copy_bytes 1064 <backup-$idx >$objdir/pack/$idx &&
git -c core.multiPackIndex=true rev-list --objects --all 2>err &&
test_must_be_empty err
cd0747a9352b58d112f0010134351efc7bbad4a6
24b24cf8a829f5b8c30dfc018b0a459a2ccaf380
e061f8d30c18afc392ff4b8b0c727a743806ceb8
e43b5801e4ac39a512e5d9423fc272cf5c3343f9 deep_delta_001
78fcb2fa30f448929fae32736f0fb56733d08746 deep_delta_002
1c547eac61c40965963e85a56c24991ab1a0e3ef deep_delta_003
571c7b54485960a9820927983c702eec1b41e91a deep_delta_004
671d8800ae6936f107d70de2dbec536afb47d89a deep_delta_005
1297547aab30f952af805d38f6f1c1930cb3117b file_001
862f6954d9afd549b48fa2ef8e2f8ab96e309916 file_002
0471b3b8ab8da19f3968dc238e9555f4e48ce858 file_003
c80092496b80b5f21503b8c838dccfc1f2e2ddde file_004
e5a12c79cec70d52817054c4b9ef321003c6755f file_005
0b968294884af115eb5a1b941b3dabd48470c3bb file_101
e79c5e8f964493290a409888d5413a737e8e5dd5 initial.t
34a68de99f94f6f9e437a288349602768eae4b92 wide_delta_001
8517d36660dffb896fb4e283ad110023aaebaf1b wide_delta_002
e3fc6633c069c8e246d77a408e4747c2852ba44a wide_delta_003
37a071e55d1f2e07af146ca6017d98dd85beae68 wide_delta_004
a8179a233b7aeeb7a450c5d321d4b73df936b64b wide_delta_005
9351ffa1fbcc36d9afdb297abc55b9e0239739d0
ok 6 - corrupt idx not opened
expecting success:
for i in $(test_seq 6 10)
do
generate_objects $i
done &&
commit_and_list_objects
HEAD is now at 9650f03
ok 7 - add more objects
expecting success:
git pack-objects --index-version=1 $objdir/pack/test-2 <obj-list &&
git multi-pack-index --object-dir=$objdir write &&
midx_read_expect 2 34 4 $objdir
0994129a102d56705c119b91822cbd6ef1599f8f
ok 8 - write midx with two packs
expecting success:
midx_git_two_modes "rev-list --objects --all" &&
midx_git_two_modes "log --raw" &&
midx_git_two_modes "count-objects --verbose" &&
midx_git_two_modes "cat-file --batch-all-objects --batch-check" &&
midx_git_two_modes "cat-file --batch-all-objects --batch-check --unordered" sorted
ok 9 - check normal git operations: two packs
expecting success:
for j in $(test_seq 11 20)
do
generate_objects $j &&
commit_and_list_objects &&
git pack-objects --index-version=2 $objdir/pack/test-pack <obj-list
done
HEAD is now at b415cb4
4c6d8ddb029b2809c9258616e15d919036135381
HEAD is now at 3e2c62c
1d8476b3e6c9041b953f8d970be906a61d86e9b3
HEAD is now at 07c6d1f
d2e5559686bb7fa03381e06d89e575c002e7877a
HEAD is now at e2467d3
4885e9566d4b7767d46a2de15594b706a00227ad
HEAD is now at 047779e
711553cae61e2a02b26974c7b6367f9dd8a2dd9e
HEAD is now at 449cf21
44a23559d57770dcd870b620d9c90b83b8b1dd7d
HEAD is now at c4c6a87
0329a72b9cac741e369a25111f9a7141e7af5809
HEAD is now at 66c7cd9
481644606c70ac050f24a3f7a78d1d12407e24cd
HEAD is now at 523abe2
1b5ae1b8c7f825dd70c1b2bd9d38143b8d9093e8
HEAD is now at 552d56d
283663f1cf4f2bfdb8d263c035369396648a8162
ok 10 - add more packs
expecting success:
midx_git_two_modes "rev-list --objects --all" &&
midx_git_two_modes "log --raw" &&
midx_git_two_modes "count-objects --verbose" &&
midx_git_two_modes "cat-file --batch-all-objects --batch-check" &&
midx_git_two_modes "cat-file --batch-all-objects --batch-check --unordered" sorted
ok 11 - check normal git operations: mixed mode (two packs + extra)
expecting success:
git multi-pack-index --object-dir=$objdir write &&
midx_read_expect 12 74 4 $objdir
ok 12 - write midx with twelve packs
expecting success:
midx_git_two_modes "rev-list --objects --all" &&
midx_git_two_modes "log --raw" &&
midx_git_two_modes "count-objects --verbose" &&
midx_git_two_modes "cat-file --batch-all-objects --batch-check" &&
midx_git_two_modes "cat-file --batch-all-objects --batch-check --unordered" sorted
ok 13 - check normal git operations: twelve packs
expecting success:
git multi-pack-index verify --object-dir=$objdir
Looking for referenced packfiles: 8% (1/12)
Looking for referenced packfiles: 16% (2/12)
Looking for referenced packfiles: 25% (3/12)
Looking for referenced packfiles: 33% (4/12)
Looking for referenced packfiles: 41% (5/12)
Looking for referenced packfiles: 50% (6/12)
Looking for referenced packfiles: 58% (7/12)
Looking for referenced packfiles: 66% (8/12)
Looking for referenced packfiles: 75% (9/12)
Looking for referenced packfiles: 83% (10/12)
Looking for referenced packfiles: 91% (11/12)
Looking for referenced packfiles: 100% (12/12)
Looking for referenced packfiles: 100% (12/12), done.
Verifying OID order in MIDX: 100% (73/73)
Verifying OID order in MIDX: 100% (73/73), done.
Sorting objects by packfile: 0% (0/74)
Sorting objects by packfile: 100% (74/74)
Sorting objects by packfile: 100% (74/74), done.
Verifying object offsets: 100% (74/74)
Verifying object offsets: 100% (74/74), done.
ok 14 - verify multi-pack-index success
expecting success:
corrupt_midx_and_verify 0 "\00" $objdir \
"multi-pack-index signature"
1+0 records in
1+0 records out
1 byte copied, 0.000391465 s, 2.6 kB/s
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: multi-pack-index signature 0x00494458 does not match signature 0x4d494458
ok 15 - verify bad signature
expecting success:
corrupt_midx_and_verify $MIDX_BYTE_VERSION "\00" $objdir \
"multi-pack-index version"
1+0 records in
1+0 records out
1 byte copied, 0.000404964 s, 2.5 kB/s
fatal: multi-pack-index version 0 not recognized
ok 16 - verify bad version
expecting success:
corrupt_midx_and_verify $MIDX_BYTE_OID_VERSION "\02" $objdir \
"hash version"
1+0 records in
1+0 records out
1 byte copied, 0.000396244 s, 2.5 kB/s
fatal: hash version 2 does not match
ok 17 - verify bad OID version
expecting success:
corrupt_midx_and_verify $MIDX_BYTE_CHUNK_COUNT "\01" $objdir \
"missing required"
1+0 records in
1+0 records out
1 byte copied, 0.000395724 s, 2.5 kB/s
fatal: multi-pack-index missing required OID fanout chunk
ok 18 - verify truncated chunk count
expecting success:
corrupt_midx_and_verify $MIDX_BYTE_CHUNK_COUNT "\07" $objdir \
"terminating multi-pack-index chunk id appears earlier than expected"
1+0 records in
1+0 records out
1 byte copied, 0.000405924 s, 2.5 kB/s
fatal: terminating multi-pack-index chunk id appears earlier than expected
ok 19 - verify extended chunk count
expecting success:
corrupt_midx_and_verify $MIDX_BYTE_CHUNK_ID "\01" $objdir \
"missing required"
1+0 records in
1+0 records out
1 byte copied, 0.000400945 s, 2.5 kB/s
fatal: multi-pack-index missing required pack-name chunk
ok 20 - verify missing required chunk
expecting success:
corrupt_midx_and_verify $MIDX_BYTE_CHUNK_OFFSET "\01" $objdir \
"invalid chunk offset (too large)"
1+0 records in
1+0 records out
1 byte copied, 0.000102741 s, 9.7 kB/s
fatal: invalid chunk offset (too large)
ok 21 - verify invalid chunk offset
expecting success:
corrupt_midx_and_verify $MIDX_BYTE_PACKNAME_ORDER "z" $objdir \
"pack names out of order"
1+0 records in
1+0 records out
1 byte copied, 0.000396785 s, 2.5 kB/s
fatal: multi-pack-index pack names out of order: 'tezt-2-0994129a102d56705c119b91822cbd6ef1599f8f.idx' before 'test-a10c8cef352773b1f1b38ecc868f417f3d6029c9.idx'
ok 22 - verify packnames out of order
expecting success:
corrupt_midx_and_verify $MIDX_BYTE_PACKNAME_ORDER "a" $objdir \
"failed to load pack"
1+0 records in
1+0 records out
1 byte copied, 0.000394064 s, 2.5 kB/s
failed to load pack in position 0
ok 23 - verify packnames out of order
expecting success:
corrupt_midx_and_verify $MIDX_BYTE_OID_FANOUT_ORDER "\01" $objdir \
"oid fanout out of order"
1+0 records in
1+0 records out
1 byte copied, 0.000101581 s, 9.8 kB/s
oid fanout out of order: fanout[250] = 1004a > 4a = fanout[251]
ok 24 - verify oid fanout out of order
expecting success:
corrupt_midx_and_verify $MIDX_BYTE_OID_LOOKUP "\00" $objdir \
"oid lookup out of order"
1+0 records in
1+0 records out
1 byte copied, 0.000394084 s, 2.5 kB/s
oid lookup out of order: oid[15] = 2f695f39a9ae90106abc3a1efc22b6cfe2522e89 >= 005f923c2d2e1fff9ec067b42443fff88aeebc67 = oid[16]
ok 25 - verify oid lookup out of order
expecting success:
corrupt_midx_and_verify $MIDX_BYTE_PACK_INT_ID "\07" $objdir \
"bad pack-int-id"
1+0 records in
1+0 records out
1 byte copied, 0.000416165 s, 2.4 kB/s
fatal: bad pack-int-id: 1799 (12 total packs)
ok 26 - verify incorrect pack-int-id
expecting success:
corrupt_midx_and_verify $MIDX_BYTE_OFFSET "\07" $objdir \
"incorrect object offset"
1+0 records in
1+0 records out
1 byte copied, 0.000140302 s, 7.1 kB/s
incorrect object offset for oid[16] = 305f923c2d2e1fff9ec067b42443fff88aeebc67: 700 != 1300
ok 27 - verify incorrect offset
expecting success:
corrupt_midx_and_verify $MIDX_BYTE_OFFSET "\07" $objdir \
"incorrect object offset" \
"git -c core.multipackindex=true fsck"
1+0 records in
1+0 records out
1 byte copied, 0.000397024 s, 2.5 kB/s
incorrect object offset for oid[16] = 305f923c2d2e1fff9ec067b42443fff88aeebc67: 700 != 1300
ok 28 - git-fsck incorrect offset
expecting success:
test_path_is_file $objdir/pack/multi-pack-index &&
GIT_TEST_MULTI_PACK_INDEX=0 git repack -adf &&
test_path_is_missing $objdir/pack/multi-pack-index
ok 29 - repack removes multi-pack-index
expecting success:
midx_git_two_modes "rev-list --objects --all" &&
midx_git_two_modes "log --raw" &&
midx_git_two_modes "count-objects --verbose" &&
midx_git_two_modes "cat-file --batch-all-objects --batch-check" &&
midx_git_two_modes "cat-file --batch-all-objects --batch-check --unordered" sorted
ok 30 - check normal git operations: after repack
expecting success:
git -c repack.writeBitmaps=true repack -ad &&
git multi-pack-index write &&
git rev-list --test-bitmap HEAD
Bitmap v1 test (13 entries loaded)
Found bitmap for 552d56d6820f11b3931f91152c2ecf1a11fc074f. 128 bits / e6cc631c checksum
Verifying bitmap entries: 1% (1/88)
Verifying bitmap entries: 2% (2/88)
Verifying bitmap entries: 3% (3/88)
Verifying bitmap entries: 4% (4/88)
Verifying bitmap entries: 5% (5/88)
Verifying bitmap entries: 6% (6/88)
Verifying bitmap entries: 7% (7/88)
Verifying bitmap entries: 9% (8/88)
Verifying bitmap entries: 10% (9/88)
Verifying bitmap entries: 11% (10/88)
Verifying bitmap entries: 12% (11/88)
Verifying bitmap entries: 13% (12/88)
Verifying bitmap entries: 14% (13/88)
Verifying bitmap entries: 15% (14/88)
Verifying bitmap entries: 17% (15/88)
Verifying bitmap entries: 18% (16/88)
Verifying bitmap entries: 19% (17/88)
Verifying bitmap entries: 20% (18/88)
Verifying bitmap entries: 21% (19/88)
Verifying bitmap entries: 22% (20/88)
Verifying bitmap entries: 23% (21/88)
Verifying bitmap entries: 25% (22/88)
Verifying bitmap entries: 26% (23/88)
Verifying bitmap entries: 27% (24/88)
Verifying bitmap entries: 28% (25/88)
Verifying bitmap entries: 29% (26/88)
Verifying bitmap entries: 30% (27/88)
Verifying bitmap entries: 31% (28/88)
Verifying bitmap entries: 32% (29/88)
Verifying bitmap entries: 34% (30/88)
Verifying bitmap entries: 35% (31/88)
Verifying bitmap entries: 36% (32/88)
Verifying bitmap entries: 37% (33/88)
Verifying bitmap entries: 38% (34/88)
Verifying bitmap entries: 39% (35/88)
Verifying bitmap entries: 40% (36/88)
Verifying bitmap entries: 42% (37/88)
Verifying bitmap entries: 43% (38/88)
Verifying bitmap entries: 44% (39/88)
Verifying bitmap entries: 45% (40/88)
Verifying bitmap entries: 46% (41/88)
Verifying bitmap entries: 47% (42/88)
Verifying bitmap entries: 48% (43/88)
Verifying bitmap entries: 50% (44/88)
Verifying bitmap entries: 51% (45/88)
Verifying bitmap entries: 52% (46/88)
Verifying bitmap entries: 53% (47/88)
Verifying bitmap entries: 54% (48/88)
Verifying bitmap entries: 55% (49/88)
Verifying bitmap entries: 56% (50/88)
Verifying bitmap entries: 57% (51/88)
Verifying bitmap entries: 59% (52/88)
Verifying bitmap entries: 60% (53/88)
Verifying bitmap entries: 61% (54/88)
Verifying bitmap entries: 62% (55/88)
Verifying bitmap entries: 63% (56/88)
Verifying bitmap entries: 64% (57/88)
Verifying bitmap entries: 65% (58/88)
Verifying bitmap entries: 67% (59/88)
Verifying bitmap entries: 68% (60/88)
Verifying bitmap entries: 69% (61/88)
Verifying bitmap entries: 70% (62/88)
Verifying bitmap entries: 71% (63/88)
Verifying bitmap entries: 72% (64/88)
Verifying bitmap entries: 73% (65/88)
Verifying bitmap entries: 75% (66/88)
Verifying bitmap entries: 76% (67/88)
Verifying bitmap entries: 77% (68/88)
Verifying bitmap entries: 78% (69/88)
Verifying bitmap entries: 79% (70/88)
Verifying bitmap entries: 80% (71/88)
Verifying bitmap entries: 81% (72/88)
Verifying bitmap entries: 82% (73/88)
Verifying bitmap entries: 84% (74/88)
Verifying bitmap entries: 85% (75/88)
Verifying bitmap entries: 86% (76/88)
Verifying bitmap entries: 87% (77/88)
Verifying bitmap entries: 88% (78/88)
Verifying bitmap entries: 89% (79/88)
Verifying bitmap entries: 90% (80/88)
Verifying bitmap entries: 92% (81/88)
Verifying bitmap entries: 93% (82/88)
Verifying bitmap entries: 94% (83/88)
Verifying bitmap entries: 95% (84/88)
Verifying bitmap entries: 96% (85/88)
Verifying bitmap entries: 97% (86/88)
Verifying bitmap entries: 98% (87/88)
Verifying bitmap entries: 100% (88/88)
Verifying bitmap entries: 100% (88/88), done.
OK!
ok 31 - multi-pack-index and pack-bitmap
expecting success:
git init --bare alt.git &&
echo $(pwd)/alt.git/objects >.git/objects/info/alternates &&
echo content1 >file1 &&
altblob=$(GIT_DIR=alt.git git hash-object -w file1) &&
git cat-file blob $altblob &&
git rev-list --all
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5319-multi-pack-index/alt.git/
content1
552d56d6820f11b3931f91152c2ecf1a11fc074f
24b24cf8a829f5b8c30dfc018b0a459a2ccaf380
523abe232fb4b7b686a145aa302ea4a19e94f75f
66c7cd909447f8f29bd3553b0fb2f6512d8e6752
c4c6a878655615fb0e9fa97b0473c1fbdb0b298b
449cf2153bd5dd5a5dad8bbc707653502e036576
047779e14850a36f69fefa6343e0f8a567e1a73e
e2467d303a5f701dd2748207035e3d6fb96f865b
07c6d1f0c163edff34bac6da1fea4dcf321e55fa
3e2c62cf4a31af79719533e93d0acbbaf3a77688
b415cb40170102eb11cb275c506470a89d8cd0e5
9650f031c9f135ac62532bbe0d0c31c73d1bb7fb
cd0747a9352b58d112f0010134351efc7bbad4a6
ok 32 - multi-pack-index and alternates
expecting success:
midx_git_two_modes "rev-list --objects --all" &&
midx_git_two_modes "log --raw" &&
midx_git_two_modes "count-objects --verbose" &&
midx_git_two_modes "cat-file --batch-all-objects --batch-check" &&
midx_git_two_modes "cat-file --batch-all-objects --batch-check --unordered" sorted
ok 33 - check normal git operations: with alternate (local midx)
expecting success:
mv .git/objects/pack/* alt.git/objects/pack &&
test_commit add_local_objects &&
git repack --local &&
git multi-pack-index write &&
midx_read_expect 1 3 4 $objdir &&
git reset --hard HEAD~1 &&
rm -f .git/objects/pack/*
[master 705a1ea] add_local_objects
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 add_local_objects.t
HEAD is now at 552d56d
ok 34 - multi-pack-index in an alternate
expecting success:
midx_git_two_modes "rev-list --objects --all" &&
midx_git_two_modes "log --raw" &&
midx_git_two_modes "count-objects --verbose" &&
midx_git_two_modes "cat-file --batch-all-objects --batch-check" &&
midx_git_two_modes "cat-file --batch-all-objects --batch-check --unordered" sorted
ok 35 - check normal git operations: with alternate (remote midx)
expecting success:
mkdir objects64 &&
mkdir objects64/pack &&
for i in $(test_seq 1 11)
do
generate_objects 11
done &&
commit_and_list_objects &&
pack64=$(git pack-objects --index-version=2,0x40 objects64/pack/test-64 <obj-list) &&
idx64=objects64/pack/test-64-$pack64.idx &&
chmod u+w $idx64 &&
corrupt_data $idx64 2999 "\02" &&
midx64=$(git multi-pack-index --object-dir=objects64 write) &&
midx_read_expect 1 63 5 objects64 " large-offsets"
HEAD is now at 287f5d9
1+0 records in
1+0 records out
1 byte copied, 0.000401424 s, 2.5 kB/s
ok 36 - force some 64-bit offsets with pack-objects
expecting success:
git multi-pack-index verify --object-dir=objects64
Looking for referenced packfiles: 100% (1/1)
Looking for referenced packfiles: 100% (1/1), done.
Verifying OID order in MIDX: 100% (62/62)
Verifying OID order in MIDX: 100% (62/62), done.
Sorting objects by packfile: 0% (0/63)
Sorting objects by packfile: 100% (63/63)
Sorting objects by packfile: 100% (63/63), done.
Verifying object offsets: 100% (63/63)
Verifying object offsets: 100% (63/63), done.
ok 37 - verify multi-pack-index with 64-bit offsets
expecting success:
corrupt_midx_and_verify $MIDX_BYTE_LARGE_OFFSET "\07" objects64 \
"incorrect object offset"
1+0 records in
1+0 records out
1 byte copied, 0.000395665 s, 2.5 kB/s
incorrect object offset for oid[61] = f2377b316d0d92e3c29a2d6dba598ca02fb80e9c: 70be4 != be4
ok 38 - verify incorrect 64-bit offset
expecting success:
mkdir dup &&
(
cd dup &&
git init &&
test-tool genrandom "data" 4096 >large_file.txt &&
git update-index --add large_file.txt &&
for i in $(test_seq 1 20)
do
test_commit $i
done &&
git branch A HEAD &&
git branch B HEAD~8 &&
git branch C HEAD~13 &&
git branch D HEAD~16 &&
git branch E HEAD~18 &&
git pack-objects --revs .git/objects/pack/pack-A <<-EOF &&
refs/heads/A
^refs/heads/B
EOF
git pack-objects --revs .git/objects/pack/pack-B <<-EOF &&
refs/heads/B
^refs/heads/C
EOF
git pack-objects --revs .git/objects/pack/pack-C <<-EOF &&
refs/heads/C
^refs/heads/D
EOF
git pack-objects --revs .git/objects/pack/pack-D <<-EOF &&
refs/heads/D
^refs/heads/E
EOF
git pack-objects --revs .git/objects/pack/pack-E <<-EOF &&
refs/heads/E
EOF
git multi-pack-index write &&
cp -r .git/objects/pack .git/objects/pack-backup
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5319-multi-pack-index/dup/.git/
[master (root-commit) fc900d7] 1
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 100644 1.t
create mode 100644 large_file.txt
[master 3d95ce8] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2.t
[master e7fa9d0] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 3.t
[master 5f5c1a3] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 4.t
[master 291575a] 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 5.t
[master 21de077] 6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 6.t
[master 8d319c4] 7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 7.t
[master 555b618] 8
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 8.t
[master f83fa44] 9
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 9.t
[master d476b4f] 10
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 10.t
[master c177bfa] 11
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 11.t
[master f27c05e] 12
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 12.t
[master 0946b81] 13
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 13.t
[master 5442449] 14
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 14.t
[master 58961b9] 15
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 15.t
[master 0a09718] 16
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 16.t
[master f471ae1] 17
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 17.t
[master 93bed9f] 18
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 18.t
[master d0cf3fc] 19
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 19.t
[master c2adbd0] 20
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 20.t
40289997979ee9f2d7198a5b4ac9fe14e27cbe4b
926e20b0e641003b2f6bcddd6ccf53e7741c8642
b33c048d7202659249bb0cea7bbc997ce448c75d
49ca36507a52bbba6d1768e28666eb0f4e5f7d95
31ea0966bb15206fbfd1b4c2f5be4b24a03050f5
ok 39 - setup expire tests
expecting success:
(
cd dup &&
ls .git/objects/pack >expect &&
git multi-pack-index expire &&
ls .git/objects/pack >actual &&
test_cmp expect actual
)
ok 40 - expire does not remove any packs
expecting success:
(
cd dup &&
git pack-objects --revs .git/objects/pack/pack-combined <<-EOF &&
refs/heads/A
^refs/heads/C
EOF
git multi-pack-index write &&
ls .git/objects/pack | grep -v -e pack-[AB] >expect &&
git multi-pack-index expire &&
ls .git/objects/pack >actual &&
test_cmp expect actual &&
ls .git/objects/pack/ | grep idx >expect-idx &&
test-tool read-midx .git/objects | grep idx >actual-midx &&
test_cmp expect-idx actual-midx &&
git multi-pack-index verify &&
git fsck
)
5bd21ad967ccd59e40bf8287b28891d4bf7e0d08
Looking for referenced packfiles: 25% (1/4)
Looking for referenced packfiles: 50% (2/4)
Looking for referenced packfiles: 75% (3/4)
Looking for referenced packfiles: 100% (4/4)
Looking for referenced packfiles: 100% (4/4), done.
Verifying OID order in MIDX: 100% (60/60)
Verifying OID order in MIDX: 100% (60/60), done.
Sorting objects by packfile: 0% (0/61)
Sorting objects by packfile: 100% (61/61)
Sorting objects by packfile: 100% (61/61), done.
Verifying object offsets: 100% (61/61)
Verifying object offsets: 100% (61/61), done.
ok 41 - expire removes unreferenced packs
expecting success:
(
cd dup &&
rm -rf .git/objects/pack &&
mv .git/objects/pack-backup .git/objects/pack &&
touch -m -t 201901010000 .git/objects/pack/pack-D* &&
touch -m -t 201901010001 .git/objects/pack/pack-C* &&
touch -m -t 201901010002 .git/objects/pack/pack-B* &&
touch -m -t 201901010003 .git/objects/pack/pack-A* &&
ls .git/objects/pack >expect &&
MINSIZE=$(test-tool path-utils file-size .git/objects/pack/*pack | sort -n | head -n 1) &&
git multi-pack-index repack --batch-size=$MINSIZE &&
ls .git/objects/pack >actual &&
test_cmp expect actual
)
ok 42 - repack with minimum size does not alter existing packs
expecting success:
(
cd dup &&
ls .git/objects/pack/*idx >idx-list &&
test_line_count = 5 idx-list &&
THIRD_SMALLEST_SIZE=$(test-tool path-utils file-size .git/objects/pack/*pack | sort -n | head -n 3 | tail -n 1) &&
BATCH_SIZE=$(($THIRD_SMALLEST_SIZE + 1)) &&
git multi-pack-index repack --batch-size=$BATCH_SIZE &&
ls .git/objects/pack/*idx >idx-list &&
test_line_count = 6 idx-list &&
test-tool read-midx .git/objects | grep idx >midx-list &&
test_line_count = 6 midx-list
)
ok 43 - repack creates a new pack
expecting success:
(
cd dup &&
ls -al .git/objects/pack/*pack &&
ls -S .git/objects/pack/*pack | head -n 4 >expect &&
git multi-pack-index expire &&
ls -S .git/objects/pack/*pack >actual &&
test_cmp expect actual &&
test-tool read-midx .git/objects | grep idx >midx-list &&
test_line_count = 4 midx-list
)
-r--r--r-- 1 buildd buildd 2239 Jan 1 2019 .git/objects/pack/pack-A-40289997979ee9f2d7198a5b4ac9fe14e27cbe4b.pack
-r--r--r-- 1 buildd buildd 1385 Jan 1 2019 .git/objects/pack/pack-B-926e20b0e641003b2f6bcddd6ccf53e7741c8642.pack
-r--r--r-- 1 buildd buildd 838 Jan 1 2019 .git/objects/pack/pack-C-b33c048d7202659249bb0cea7bbc997ce448c75d.pack
-r--r--r-- 1 buildd buildd 560 Jan 1 2019 .git/objects/pack/pack-D-49ca36507a52bbba6d1768e28666eb0f4e5f7d95.pack
-r--r--r-- 1 buildd buildd 4587 Aug 14 07:30 .git/objects/pack/pack-E-31ea0966bb15206fbfd1b4c2f5be4b24a03050f5.pack
-r--r--r-- 1 buildd buildd 1246 Aug 14 07:30 .git/objects/pack/pack-e416024445aa570c79c4a3a7cf0cf010c897fae4.pack
ok 44 - expire removes repacked packs
expecting success:
(
cd dup &&
git pack-objects --revs .git/objects/pack/pack-combined <<-EOF &&
refs/heads/A
^refs/heads/B
EOF
git pack-objects --revs .git/objects/pack/pack-combined <<-EOF &&
refs/heads/B
^refs/heads/C
EOF
git pack-objects --revs .git/objects/pack/pack-combined <<-EOF &&
refs/heads/C
^refs/heads/D
EOF
git multi-pack-index write &&
git pack-objects --revs .git/objects/pack/a-pack <<-EOF &&
refs/heads/D
^refs/heads/E
EOF
git multi-pack-index write &&
git pack-objects --revs .git/objects/pack/z-pack <<-EOF &&
refs/heads/E
EOF
git multi-pack-index expire &&
ls .git/objects/pack/ | grep idx >expect &&
test-tool read-midx .git/objects | grep idx >actual &&
test_cmp expect actual &&
git multi-pack-index verify
)
348c87eb5e213b53e50d0b6eacebe04eade12a18
90d004df1df6cf488dfc3270b1b202b295f9c75b
5acb7aff49a8f459157ac9d3a2345fff25821b54
3a2e5fa9ee472302522e6baaa741491ca6a7adfd
5ef015aac533aaf0dd1017012117b7e99994c9c0
Looking for referenced packfiles: 16% (1/6)
Looking for referenced packfiles: 33% (2/6)
Looking for referenced packfiles: 50% (3/6)
Looking for referenced packfiles: 66% (4/6)
Looking for referenced packfiles: 83% (5/6)
Looking for referenced packfiles: 100% (6/6)
Looking for referenced packfiles: 100% (6/6), done.
Verifying OID order in MIDX: 100% (60/60)
Verifying OID order in MIDX: 100% (60/60), done.
Sorting objects by packfile: 0% (0/61)
Sorting objects by packfile: 100% (61/61)
Sorting objects by packfile: 100% (61/61), done.
Verifying object offsets: 100% (61/61)
Verifying object offsets: 100% (61/61), done.
ok 45 - expire works when adding new packs
expecting success:
(
cd dup &&
git pack-objects --revs .git/objects/pack/pack-all <<-EOF &&
refs/heads/A
EOF
git multi-pack-index write &&
PACKA=$(ls .git/objects/pack/a-pack*\.pack | sed s/\.pack\$//) &&
touch $PACKA.keep &&
git multi-pack-index expire &&
ls -S .git/objects/pack/a-pack* | grep $PACKA >a-pack-files &&
test_line_count = 3 a-pack-files &&
test-tool read-midx .git/objects | grep idx >midx-list &&
test_line_count = 2 midx-list
)
0ed4766d77c6153368eddf98d92fcedd000b7718
ok 46 - expire respects .keep files
expecting success:
(
cd dup &&
rm .git/objects/pack/*.keep &&
ls .git/objects/pack/*idx >idx-list &&
test_line_count = 2 idx-list &&
git multi-pack-index repack --batch-size=0 &&
ls .git/objects/pack/*idx >idx-list &&
test_line_count = 3 idx-list &&
test-tool read-midx .git/objects | grep idx >midx-list &&
test_line_count = 3 midx-list &&
git multi-pack-index expire &&
ls -al .git/objects/pack/*idx >idx-list &&
test_line_count = 1 idx-list &&
git multi-pack-index repack --batch-size=0 &&
ls -al .git/objects/pack/*idx >new-idx-list &&
test_cmp idx-list new-idx-list
)
ok 47 - repack --batch-size=0 repacks everything
# passed all 47 test(s)
1..47
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5318-commit-graph.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5318-commit-graph/.git/
expecting success:
mkdir full &&
cd "$TRASH_DIRECTORY/full" &&
git init &&
git config core.commitGraph true &&
objdir=".git/objects" &&
test_oid_init
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5318-commit-graph/full/.git/
ok 1 - setup full repo
expecting success:
cd "$TRASH_DIRECTORY/full" &&
git commit-graph verify
ok 2 - verify graph with no graph file
expecting success:
cd "$TRASH_DIRECTORY/full" &&
git commit-graph write --object-dir . &&
test_path_is_missing info/commit-graph
ok 3 - write graph with no packs
expecting success:
cd "$TRASH_DIRECTORY/full" &&
echo doesnotexist >in &&
{ git commit-graph write --stdin-packs <in 2>stderr; ret=$?; } &&
test "$ret" = 1 &&
test_i18ngrep "error adding pack" stderr
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: error adding pack .git/objects/pack/doesnotexist
ok 4 - close with correct error on bad input
expecting success:
cd "$TRASH_DIRECTORY/full" &&
for i in $(test_seq 3)
do
test_commit $i &&
git branch commits/$i
done &&
git repack
[master (root-commit) d0dcf97] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1.t
[master 82335b2] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2.t
[master ddc8575] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 3.t
ok 5 - create commits and repack
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 6 - check normal git operations: no graph
expecting success:
cd "$TRASH_DIRECTORY/full" &&
git commit-graph write &&
test_path_is_file $objdir/info/commit-graph &&
graph_read_expect "3"
Computing commit graph generation numbers: 33% (1/3)
Computing commit graph generation numbers: 66% (2/3)
Computing commit graph generation numbers: 100% (3/3)
Computing commit graph generation numbers: 100% (3/3), done.
ok 7 - write graph
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 8 - check normal git operations: graph exists
expecting success:
cd "$TRASH_DIRECTORY/full" &&
git reset --hard commits/1 &&
for i in $(test_seq 4 5)
do
test_commit $i &&
git branch commits/$i
done &&
git reset --hard commits/2 &&
for i in $(test_seq 6 7)
do
test_commit $i &&
git branch commits/$i
done &&
git reset --hard commits/2 &&
git merge commits/4 &&
git branch merge/1 &&
git reset --hard commits/4 &&
git merge commits/6 &&
git branch merge/2 &&
git reset --hard commits/3 &&
git merge commits/5 commits/7 &&
git branch merge/3 &&
git repack
HEAD is now at d0dcf97 1
[master 6efda21] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 4.t
[master 7ec8a1d] 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 5.t
HEAD is now at 82335b2 2
[master 76c4cb0] 6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 6.t
[master 12a06f3] 7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 7.t
HEAD is now at 82335b2 2
Merging:
82335b2 2
virtual commits/4
found 1 common ancestor:
d0dcf97 1
Merge made by the 'recursive' strategy.
4.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 4.t
HEAD is now at 6efda21 4
Merging:
6efda21 4
virtual commits/6
found 1 common ancestor:
d0dcf97 1
Merge made by the 'recursive' strategy.
2.t | 1 +
6.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 2.t
create mode 100644 6.t
HEAD is now at ddc8575 3
Trying simple merge with commits/5
Trying simple merge with commits/7
Merge made by the 'octopus' strategy.
4.t | 1 +
5.t | 1 +
6.t | 1 +
7.t | 1 +
4 files changed, 4 insertions(+)
create mode 100644 4.t
create mode 100644 5.t
create mode 100644 6.t
create mode 100644 7.t
ok 9 - Add more commits
expecting success:
cd "$TRASH_DIRECTORY/full" &&
git commit-graph write &&
test_path_is_file $objdir/info/commit-graph &&
graph_read_expect "10" "extra_edges"
Computing commit graph generation numbers: 10% (1/10)
Computing commit graph generation numbers: 20% (2/10)
Computing commit graph generation numbers: 30% (3/10)
Computing commit graph generation numbers: 40% (4/10)
Computing commit graph generation numbers: 50% (5/10)
Computing commit graph generation numbers: 60% (6/10)
Computing commit graph generation numbers: 70% (7/10)
Computing commit graph generation numbers: 80% (8/10)
Computing commit graph generation numbers: 90% (9/10)
Computing commit graph generation numbers: 100% (10/10)
Computing commit graph generation numbers: 100% (10/10), done.
ok 10 - write graph with merges
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 11 - check normal git operations: merge 1 vs 2
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 12 - check normal git operations: merge 1 vs 3
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 13 - check normal git operations: merge 2 vs 3
expecting success:
cd "$TRASH_DIRECTORY/full" &&
test_commit 8 &&
git branch commits/8 &&
ls $objdir/pack | grep idx >existing-idx &&
git repack &&
ls $objdir/pack| grep idx | grep -v -f existing-idx >new-idx
[master 2c45687] 8
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 8.t
ok 14 - Add one more commit
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 15 - check normal git operations: mixed mode, commit 8 vs merge 1
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 16 - check normal git operations: mixed mode, commit 8 vs merge 2
expecting success:
cd "$TRASH_DIRECTORY/full" &&
git commit-graph write &&
test_path_is_file $objdir/info/commit-graph &&
graph_read_expect "11" "extra_edges"
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
ok 17 - write graph with new commit
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 18 - check normal git operations: full graph, commit 8 vs merge 1
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 19 - check normal git operations: full graph, commit 8 vs merge 2
expecting success:
cd "$TRASH_DIRECTORY/full" &&
git commit-graph write &&
test_path_is_file $objdir/info/commit-graph &&
graph_read_expect "11" "extra_edges"
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
ok 20 - write graph with nothing new
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 21 - check normal git operations: cleared graph, commit 8 vs merge 1
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 22 - check normal git operations: cleared graph, commit 8 vs merge 2
expecting success:
cd "$TRASH_DIRECTORY/full" &&
cat new-idx | git commit-graph write --stdin-packs &&
test_path_is_file $objdir/info/commit-graph &&
graph_read_expect "9" "extra_edges"
Computing commit graph generation numbers: 11% (1/9)
Computing commit graph generation numbers: 22% (2/9)
Computing commit graph generation numbers: 33% (3/9)
Computing commit graph generation numbers: 44% (4/9)
Computing commit graph generation numbers: 55% (5/9)
Computing commit graph generation numbers: 66% (6/9)
Computing commit graph generation numbers: 77% (7/9)
Computing commit graph generation numbers: 88% (8/9)
Computing commit graph generation numbers: 100% (9/9)
Computing commit graph generation numbers: 100% (9/9), done.
ok 23 - build graph from latest pack with closure
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 24 - check normal git operations: graph from pack, commit 8 vs merge 1
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 25 - check normal git operations: graph from pack, commit 8 vs merge 2
expecting success:
cd "$TRASH_DIRECTORY/full" &&
git tag -a -m "merge" tag/merge merge/2 &&
git rev-parse tag/merge >commits-in &&
git rev-parse merge/1 >>commits-in &&
cat commits-in | git commit-graph write --stdin-commits &&
test_path_is_file $objdir/info/commit-graph &&
graph_read_expect "6"
Computing commit graph generation numbers: 16% (1/6)
Computing commit graph generation numbers: 33% (2/6)
Computing commit graph generation numbers: 50% (3/6)
Computing commit graph generation numbers: 66% (4/6)
Computing commit graph generation numbers: 83% (5/6)
Computing commit graph generation numbers: 100% (6/6)
Computing commit graph generation numbers: 100% (6/6), done.
ok 26 - build graph from commits with closure
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 27 - check normal git operations: graph from commits, commit 8 vs merge 1
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 28 - check normal git operations: graph from commits, commit 8 vs merge 2
expecting success:
cd "$TRASH_DIRECTORY/full" &&
git rev-parse merge/3 | git commit-graph write --stdin-commits --append &&
test_path_is_file $objdir/info/commit-graph &&
graph_read_expect "10" "extra_edges"
Computing commit graph generation numbers: 10% (1/10)
Computing commit graph generation numbers: 20% (2/10)
Computing commit graph generation numbers: 30% (3/10)
Computing commit graph generation numbers: 40% (4/10)
Computing commit graph generation numbers: 50% (5/10)
Computing commit graph generation numbers: 60% (6/10)
Computing commit graph generation numbers: 70% (7/10)
Computing commit graph generation numbers: 80% (8/10)
Computing commit graph generation numbers: 90% (9/10)
Computing commit graph generation numbers: 100% (10/10)
Computing commit graph generation numbers: 100% (10/10), done.
ok 29 - build graph from commits with append
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 30 - check normal git operations: append graph, commit 8 vs merge 1
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 31 - check normal git operations: append graph, commit 8 vs merge 2
expecting success:
cd "$TRASH_DIRECTORY/full" &&
git commit-graph write --reachable &&
test_path_is_file $objdir/info/commit-graph &&
graph_read_expect "11" "extra_edges"
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
ok 32 - build graph using --reachable
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 33 - check normal git operations: append graph, commit 8 vs merge 1
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 34 - check normal git operations: append graph, commit 8 vs merge 2
expecting success:
cd "$TRASH_DIRECTORY" &&
git clone --bare --no-local full bare &&
cd bare &&
git config core.commitGraph true &&
baredir="./objects"
Cloning into bare repository 'bare'...
ok 35 - setup bare repo
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 36 - check normal git operations: bare repo, commit 8 vs merge 1
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 37 - check normal git operations: bare repo, commit 8 vs merge 2
expecting success:
cd "$TRASH_DIRECTORY/bare" &&
git commit-graph write &&
test_path_is_file $baredir/info/commit-graph &&
graph_read_expect "11" "extra_edges"
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
ok 38 - write graph in bare repo
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 39 - check normal git operations: bare repo with graph, commit 8 vs merge 1
expecting success:
cd "$TRASH_DIRECTORY/$DIR" &&
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 40 - check normal git operations: bare repo with graph, commit 8 vs merge 2
expecting success:
cd "$TRASH_DIRECTORY/full" &&
git checkout -b merge-5-to-8 commits/5 &&
git merge commits/8 &&
git show-ref -s merge-5-to-8 >output &&
git show-ref -s commits/8 >expect &&
test_cmp expect output
Switched to a new branch 'merge-5-to-8'
Updating 7ec8a1d..2c45687
Fast-forward
2.t | 1 +
3.t | 1 +
6.t | 1 +
7.t | 1 +
8.t | 1 +
5 files changed, 5 insertions(+)
create mode 100644 2.t
create mode 100644 3.t
create mode 100644 6.t
create mode 100644 7.t
create mode 100644 8.t
ok 41 - perform fast-forward merge in full repo
expecting success:
cd "$TRASH_DIRECTORY/full" &&
git commit --allow-empty -m "blank" &&
git commit-graph write --reachable &&
cp $objdir/info/commit-graph commit-graph-before-gc &&
git reset --hard HEAD~1 &&
git config gc.writeCommitGraph true &&
git gc &&
cp $objdir/info/commit-graph commit-graph-after-gc &&
! test_cmp_bin commit-graph-before-gc commit-graph-after-gc &&
git commit-graph write --reachable &&
test_cmp_bin commit-graph-after-gc $objdir/info/commit-graph
[merge-5-to-8 63d6d79] blank
Author: A U Thor <author@example.com>
Computing commit graph generation numbers: 8% (1/12)
Computing commit graph generation numbers: 16% (2/12)
Computing commit graph generation numbers: 25% (3/12)
Computing commit graph generation numbers: 33% (4/12)
Computing commit graph generation numbers: 41% (5/12)
Computing commit graph generation numbers: 50% (6/12)
Computing commit graph generation numbers: 58% (7/12)
Computing commit graph generation numbers: 66% (8/12)
Computing commit graph generation numbers: 75% (9/12)
Computing commit graph generation numbers: 83% (10/12)
Computing commit graph generation numbers: 91% (11/12)
Computing commit graph generation numbers: 100% (12/12)
Computing commit graph generation numbers: 100% (12/12), done.
HEAD is now at 2c45687 8
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
commit-graph-before-gc commit-graph-after-gc differ: char 44, line 1
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
ok 42 - check that gc computes commit-graph
expecting success:
cd "$TRASH_DIRECTORY" &&
test_when_finished rm -rf replace &&
git clone full replace &&
(
cd replace &&
git commit-graph write --reachable &&
test_path_is_file .git/objects/info/commit-graph &&
git replace HEAD~1 HEAD~2 &&
git -c core.commitGraph=false log >expect &&
git -c core.commitGraph=true log >actual &&
test_cmp expect actual &&
git commit-graph write --reachable &&
git -c core.commitGraph=false --no-replace-objects log >expect &&
git -c core.commitGraph=true --no-replace-objects log >actual &&
test_cmp expect actual &&
rm -rf .git/objects/info/commit-graph &&
git commit-graph write --reachable &&
test_path_is_file .git/objects/info/commit-graph
)
Cloning into 'replace'...
done.
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
ok 43 - replace-objects invalidates commit-graph
expecting success:
cd "$TRASH_DIRECTORY" &&
test_when_finished rm -rf graft &&
git clone full graft &&
(
cd graft &&
git commit-graph write --reachable &&
test_path_is_file .git/objects/info/commit-graph &&
H1=$(git rev-parse --verify HEAD~1) &&
H3=$(git rev-parse --verify HEAD~3) &&
echo "$H1 $H3" >.git/info/grafts &&
git -c core.commitGraph=false log >expect &&
git -c core.commitGraph=true log >actual &&
test_cmp expect actual &&
git commit-graph write --reachable &&
git -c core.commitGraph=false --no-replace-objects log >expect &&
git -c core.commitGraph=true --no-replace-objects log >actual &&
test_cmp expect actual &&
rm -rf .git/objects/info/commit-graph &&
git commit-graph write --reachable &&
test_path_is_missing .git/objects/info/commit-graph
)
Cloning into 'graft'...
done.
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 44 - commit grafts invalidate commit-graph
expecting success:
cd "$TRASH_DIRECTORY" &&
test_when_finished rm -rf shallow &&
git clone --depth 2 "file://$TRASH_DIRECTORY/full" shallow &&
(
cd shallow &&
git commit-graph write --reachable &&
test_path_is_missing .git/objects/info/commit-graph &&
git fetch origin --unshallow &&
git commit-graph write --reachable &&
test_path_is_file .git/objects/info/commit-graph
)
Cloning into 'shallow'...
From file:///<<PKGBUILDDIR>>/t/trash directory.t5318-commit-graph/full
* [new tag] 1 -> 1
* [new tag] 2 -> 2
* [new tag] 3 -> 3
* [new tag] 4 -> 4
* [new tag] 5 -> 5
* [new tag] 6 -> 6
* [new tag] 7 -> 7
Computing commit graph generation numbers: 11% (1/9)
Computing commit graph generation numbers: 22% (2/9)
Computing commit graph generation numbers: 33% (3/9)
Computing commit graph generation numbers: 44% (4/9)
Computing commit graph generation numbers: 55% (5/9)
Computing commit graph generation numbers: 66% (6/9)
Computing commit graph generation numbers: 77% (7/9)
Computing commit graph generation numbers: 88% (8/9)
Computing commit graph generation numbers: 100% (9/9)
Computing commit graph generation numbers: 100% (9/9), done.
ok 45 - replace-objects invalidates commit-graph
expecting success:
cd "$TRASH_DIRECTORY/full" &&
git rev-parse commits/8 | git commit-graph write --stdin-commits &&
git commit-graph verify >output
Computing commit graph generation numbers: 11% (1/9)
Computing commit graph generation numbers: 22% (2/9)
Computing commit graph generation numbers: 33% (3/9)
Computing commit graph generation numbers: 44% (4/9)
Computing commit graph generation numbers: 55% (5/9)
Computing commit graph generation numbers: 66% (6/9)
Computing commit graph generation numbers: 77% (7/9)
Computing commit graph generation numbers: 88% (8/9)
Computing commit graph generation numbers: 100% (9/9)
Computing commit graph generation numbers: 100% (9/9), done.
Verifying commits in commit graph: 11% (1/9)
Verifying commits in commit graph: 22% (2/9)
Verifying commits in commit graph: 33% (3/9)
Verifying commits in commit graph: 44% (4/9)
Verifying commits in commit graph: 55% (5/9)
Verifying commits in commit graph: 66% (6/9)
Verifying commits in commit graph: 77% (7/9)
Verifying commits in commit graph: 88% (8/9)
Verifying commits in commit graph: 100% (9/9)
Verifying commits in commit graph: 100% (9/9), done.
ok 46 - git commit-graph verify
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 -r SANETESTD.1/x &&
chmod -rx SANETESTD.2 ||
BUG "cannot prepare SANETESTD"
! test -r SANETESTD.1/x &&
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
BUG "cannot clean SANETESTD"
return $status
)
rm: cannot remove 'SANETESTD.1/x': Permission denied
prerequisite SANITY ok
expecting success:
corrupt_graph_setup &&
chmod 000 $objdir/info/commit-graph &&
corrupt_graph_verify "Could not open" "no-copy"
fatal: Could not open commit-graph '.git/objects/info/commit-graph': Permission denied
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 47 - detect permission problem
expecting success:
corrupt_graph_setup &&
echo "a small graph" >$objdir/info/commit-graph &&
corrupt_graph_verify "too small"
error: commit-graph file is too small
error: commit-graph file is too small
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 48 - detect too small
expecting success:
corrupt_graph_and_verify 0 "\0" \
"graph signature"
1+0 records in
1+0 records out
1 byte copied, 9.1021e-05 s, 11.0 kB/s
0+0 records in
0+0 records out
0 bytes copied, 6.8481e-05 s, 0.0 kB/s
error: commit-graph signature 475048 does not match signature 43475048
error: commit-graph signature 475048 does not match signature 43475048
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 49 - detect bad signature
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_VERSION "\02" \
"graph version"
1+0 records in
1+0 records out
1 byte copied, 0.000103601 s, 9.7 kB/s
0+0 records in
0+0 records out
0 bytes copied, 8.2321e-05 s, 0.0 kB/s
error: commit-graph version 2 does not match version 1
error: commit-graph version 2 does not match version 1
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 50 - detect bad version
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_HASH "\02" \
"hash version"
1+0 records in
1+0 records out
1 byte copied, 0.000106122 s, 9.4 kB/s
0+0 records in
0+0 records out
0 bytes copied, 7.8641e-05 s, 0.0 kB/s
error: commit-graph hash version 2 does not match version 1
error: commit-graph hash version 2 does not match version 1
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 51 - detect bad hash version
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_CHUNK_COUNT "\02" \
"missing the .* chunk"
1+0 records in
1+0 records out
1 byte copied, 0.000413925 s, 2.4 kB/s
0+0 records in
0+0 records out
0 bytes copied, 7.6301e-05 s, 0.0 kB/s
error: commit-graph is missing the Commit Data chunk
error: commit-graph is missing the Commit Data chunk
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 52 - detect low chunk count
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_OID_FANOUT_ID "\0" \
"missing the OID Fanout chunk"
1+0 records in
1+0 records out
1 byte copied, 0.000433305 s, 2.3 kB/s
0+0 records in
0+0 records out
0 bytes copied, 7.0501e-05 s, 0.0 kB/s
error: commit-graph is missing the OID Fanout chunk
error: commit-graph is missing the OID Fanout chunk
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 53 - detect missing OID fanout chunk
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_OID_LOOKUP_ID "\0" \
"missing the OID Lookup chunk"
1+0 records in
1+0 records out
1 byte copied, 0.000415124 s, 2.4 kB/s
0+0 records in
0+0 records out
0 bytes copied, 7.9661e-05 s, 0.0 kB/s
error: commit-graph is missing the OID Lookup chunk
error: commit-graph is missing the OID Lookup chunk
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 54 - detect missing OID lookup chunk
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_COMMIT_DATA_ID "\0" \
"missing the Commit Data chunk"
1+0 records in
1+0 records out
1 byte copied, 0.000102881 s, 9.7 kB/s
0+0 records in
0+0 records out
0 bytes copied, 7.0981e-05 s, 0.0 kB/s
error: commit-graph is missing the Commit Data chunk
error: commit-graph is missing the Commit Data chunk
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 55 - detect missing commit data chunk
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_FANOUT1 "\01" \
"fanout value"
1+0 records in
1+0 records out
1 byte copied, 0.000108922 s, 9.2 kB/s
0+0 records in
0+0 records out
0 bytes copied, 7.4461e-05 s, 0.0 kB/s
commit-graph has incorrect fanout value: fanout[4] = 16777216 != 0
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 56 - detect incorrect fanout
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_FANOUT2 "\01" \
"fanout value"
1+0 records in
1+0 records out
1 byte copied, 0.000389084 s, 2.6 kB/s
0+0 records in
0+0 records out
0 bytes copied, 6.932e-05 s, 0.0 kB/s
commit-graph has incorrect fanout value: fanout[255] = 16777225 != 9
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 57 - detect incorrect fanout final value
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_OID_LOOKUP_ORDER "\01" \
"incorrect OID order"
1+0 records in
1+0 records out
1 byte copied, 0.000406404 s, 2.5 kB/s
0+0 records in
0+0 records out
0 bytes copied, 6.6801e-05 s, 0.0 kB/s
commit-graph has incorrect OID order: d0dcf978085b712ac89a73020e40fb8b7e540ec4 then 01c8575ed6fc205127629848895ac35ba7529ace
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 58 - detect incorrect OID order
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_OID_LOOKUP_MISSING "\01" \
"from object database"
1+0 records in
1+0 records out
1 byte copied, 0.00469409 s, 0.2 kB/s
0+0 records in
0+0 records out
0 bytes copied, 7.1981e-05 s, 0.0 kB/s
failed to parse commit 76c4cb0cede3ceaca44a01b27edce46ba498dfad from object database for commit-graph
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 59 - detect OID not in object database
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_COMMIT_TREE "\01" \
"root tree OID for commit"
1+0 records in
1+0 records out
1 byte copied, 0.000111241 s, 9.0 kB/s
0+0 records in
0+0 records out
0 bytes copied, 7.5901e-05 s, 0.0 kB/s
Verifying commits in commit graph: 11% (1/9)
root tree OID for commit 12a06f3a2c235980d878903e940b0570ddda4359 in commit-graph is 016f0284c84f93b3e8df8c402054b760afac7e76 != 566f0284c84f93b3e8df8c402054b760afac7e76
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 60 - detect incorrect tree OID
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_COMMIT_PARENT "\01" \
"invalid parent"
1+0 records in
1+0 records out
1 byte copied, 0.000418044 s, 2.4 kB/s
0+0 records in
0+0 records out
0 bytes copied, 8.3661e-05 s, 0.0 kB/s
fatal: invalid parent position 16777220
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 61 - detect incorrect parent int-id
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_COMMIT_EXTRA_PARENT "\00" \
"is too long"
1+0 records in
1+0 records out
1 byte copied, 0.000417944 s, 2.4 kB/s
0+0 records in
0+0 records out
0 bytes copied, 7.5581e-05 s, 0.0 kB/s
Verifying commits in commit graph: 11% (1/9)
commit-graph parent list for commit 12a06f3a2c235980d878903e940b0570ddda4359 is too long
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 62 - detect extra parent int-id
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_COMMIT_WRONG_PARENT "\01" \
"commit-graph parent for"
1+0 records in
1+0 records out
1 byte copied, 0.000388724 s, 2.6 kB/s
0+0 records in
0+0 records out
0 bytes copied, 7.802e-05 s, 0.0 kB/s
Verifying commits in commit graph: 11% (1/9)
commit-graph parent for 12a06f3a2c235980d878903e940b0570ddda4359 is 2c45687afab8ea0442fe2feb61881deac6f37339 != 76c4cb0cede3ceaca44a1bb27edce46ba498dfad
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 63 - detect wrong parent
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_COMMIT_GENERATION "\070" \
"generation for commit"
1+0 records in
1+0 records out
1 byte copied, 0.000400685 s, 2.5 kB/s
0+0 records in
0+0 records out
0 bytes copied, 7.0021e-05 s, 0.0 kB/s
Verifying commits in commit graph: 11% (1/9)
commit-graph generation for commit 12a06f3a2c235980d878903e940b0570ddda4359 is 14 != 4
Verifying commits in commit graph: 22% (2/9)
Verifying commits in commit graph: 33% (3/9)
commit-graph generation for commit 2ff07863aadb0941159dda60d980783f6b7c6213 is 5 != 15
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 64 - detect incorrect generation number
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_COMMIT_GENERATION "\01" \
"non-zero generation number"
1+0 records in
1+0 records out
1 byte copied, 0.000390044 s, 2.6 kB/s
0+0 records in
0+0 records out
0 bytes copied, 7.6781e-05 s, 0.0 kB/s
Verifying commits in commit graph: 11% (1/9)
Verifying commits in commit graph: 22% (2/9)
commit-graph has non-zero generation number for commit 2c45687afab8ea0442fe2feb61881deac6f37339, but zero elsewhere
Verifying commits in commit graph: 33% (3/9)
commit-graph has non-zero generation number for commit 2ff07863aadb0941159dda60d980783f6b7c6213, but zero elsewhere
Verifying commits in commit graph: 44% (4/9)
commit-graph has non-zero generation number for commit 6efda21b208586f8c4843ba0dac4f2717254a2fc, but zero elsewhere
Verifying commits in commit graph: 55% (5/9)
commit-graph has non-zero generation number for commit 76c4cb0cede3ceaca44a1bb27edce46ba498dfad, but zero elsewhere
Verifying commits in commit graph: 66% (6/9)
commit-graph has non-zero generation number for commit 7ec8a1d4f529d11ee65aa86406a3bd9771e573b7, but zero elsewhere
Verifying commits in commit graph: 77% (7/9)
commit-graph has non-zero generation number for commit 82335b23aa7234320d6f8055243c852e4b6a5ca3, but zero elsewhere
Verifying commits in commit graph: 88% (8/9)
commit-graph has non-zero generation number for commit d0dcf978085b712ac89a73020e40fb8b7e540ec4, but zero elsewhere
Verifying commits in commit graph: 100% (9/9)
commit-graph has non-zero generation number for commit ddc8575ed6fc205127629848895ac35ba7529ace, but zero elsewhere
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 65 - detect incorrect generation number
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_COMMIT_DATE "\01" \
"commit date"
1+0 records in
1+0 records out
1 byte copied, 0.000398804 s, 2.5 kB/s
0+0 records in
0+0 records out
0 bytes copied, 6.518e-05 s, 0.0 kB/s
Verifying commits in commit graph: 11% (1/9)
commit date for commit 12a06f3a2c235980d878903e940b0570ddda4359 in commit-graph is 22393313 != 1112912353
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 66 - detect incorrect commit date
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_OCTOPUS "\01" \
"invalid parent"
1+0 records in
1+0 records out
1 byte copied, 0.000391384 s, 2.6 kB/s
0+0 records in
0+0 records out
0 bytes copied, 7.3961e-05 s, 0.0 kB/s
fatal: invalid parent position 16777216
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 67 - detect incorrect parent for octopus merge
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_FOOTER "\00" \
"incorrect checksum"
1+0 records in
1+0 records out
1 byte copied, 0.00571424 s, 0.2 kB/s
0+0 records in
0+0 records out
0 bytes copied, 6.8901e-05 s, 0.0 kB/s
the commit-graph file has incorrect checksum and is likely corrupt
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 68 - detect invalid checksum hash
expecting success:
corrupt_graph_and_verify $GRAPH_BYTE_CHUNK_COUNT "\377" \
"chunk lookup table entry missing" $GRAPH_CHUNK_LOOKUP_OFFSET
1+0 records in
1+0 records out
1 byte copied, 0.000394484 s, 2.5 kB/s
0+0 records in
0+0 records out
0 bytes copied, 7.4481e-05 s, 0.0 kB/s
error: commit-graph chunk lookup table entry missing; file may be incomplete
error: commit-graph chunk lookup table entry missing; file may be incomplete
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
ok 69 - detect incorrect chunk count
expecting success:
cd "$TRASH_DIRECTORY/full" &&
git fsck &&
corrupt_graph_and_verify $GRAPH_BYTE_FOOTER "\00" \
"incorrect checksum" &&
cp commit-graph-pre-write-test $objdir/info/commit-graph &&
test_must_fail git fsck
dangling tree 40771367e5b0a0c62eafabaac4494d311c5834b7
dangling commit 63d6d7935dc7a26dbeede4b52105dd78e9a0c6c9
Verifying commits in commit graph: 11% (1/9)
Verifying commits in commit graph: 22% (2/9)
Verifying commits in commit graph: 33% (3/9)
Verifying commits in commit graph: 44% (4/9)
Verifying commits in commit graph: 55% (5/9)
Verifying commits in commit graph: 66% (6/9)
Verifying commits in commit graph: 77% (7/9)
Verifying commits in commit graph: 88% (8/9)
Verifying commits in commit graph: 100% (9/9)
Verifying commits in commit graph: 100% (9/9), done.
1+0 records in
1+0 records out
1 byte copied, 0.000102521 s, 9.8 kB/s
0+0 records in
0+0 records out
0 bytes copied, 8.0221e-05 s, 0.0 kB/s
the commit-graph file has incorrect checksum and is likely corrupt
?? commit-graph-after-gc
?? commit-graph-backup
?? commit-graph-before-gc
?? commit-graph-pre-write-test
?? commits-in
?? err
?? existing-idx
?? expect
?? in
?? new-idx
?? output
?? stderr
?? test_err
Computing commit graph generation numbers: 9% (1/11)
Computing commit graph generation numbers: 18% (2/11)
Computing commit graph generation numbers: 27% (3/11)
Computing commit graph generation numbers: 36% (4/11)
Computing commit graph generation numbers: 45% (5/11)
Computing commit graph generation numbers: 54% (6/11)
Computing commit graph generation numbers: 63% (7/11)
Computing commit graph generation numbers: 72% (8/11)
Computing commit graph generation numbers: 81% (9/11)
Computing commit graph generation numbers: 90% (10/11)
Computing commit graph generation numbers: 100% (11/11)
Computing commit graph generation numbers: 100% (11/11), done.
Verifying commits in commit graph: 9% (1/11)
Verifying commits in commit graph: 18% (2/11)
Verifying commits in commit graph: 27% (3/11)
Verifying commits in commit graph: 36% (4/11)
Verifying commits in commit graph: 45% (5/11)
Verifying commits in commit graph: 54% (6/11)
Verifying commits in commit graph: 63% (7/11)
Verifying commits in commit graph: 72% (8/11)
Verifying commits in commit graph: 81% (9/11)
Verifying commits in commit graph: 90% (10/11)
Verifying commits in commit graph: 100% (11/11)
Verifying commits in commit graph: 100% (11/11), done.
dangling tree 40771367e5b0a0c62eafabaac4494d311c5834b7
dangling commit 63d6d7935dc7a26dbeede4b52105dd78e9a0c6c9
the commit-graph file has incorrect checksum and is likely corrupt
Verifying commits in commit graph: 11% (1/9)
Verifying commits in commit graph: 22% (2/9)
Verifying commits in commit graph: 33% (3/9)
Verifying commits in commit graph: 44% (4/9)
Verifying commits in commit graph: 55% (5/9)
Verifying commits in commit graph: 66% (6/9)
Verifying commits in commit graph: 77% (7/9)
Verifying commits in commit graph: 88% (8/9)
Verifying commits in commit graph: 100% (9/9)
Verifying commits in commit graph: 100% (9/9), done.
ok 70 - git fsck (checks commit-graph)
expecting success:
rm -rf repo &&
git init repo &&
test_commit -C repo one &&
test_commit -C repo two &&
git -C repo config core.commitGraph true &&
git -C repo rev-parse two | \
git -C repo commit-graph write --stdin-commits
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5318-commit-graph/full/repo/.git/
[master (root-commit) 0ba3da9] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 9f92fa5] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
Computing commit graph generation numbers: 50% (1/2)
Computing commit graph generation numbers: 100% (2/2)
Computing commit graph generation numbers: 100% (2/2), done.
ok 71 - setup non-the_repository tests
expecting success:
test-tool repository parse_commit_in_graph \
repo/.git repo "$(git -C repo rev-parse two)" >actual &&
{
git -C repo log --pretty=format:"%ct " -1 &&
git -C repo rev-parse one
} >expect &&
test_cmp expect actual &&
test-tool repository parse_commit_in_graph \
repo/.git repo "$(git -C repo rev-parse one)" >actual &&
git -C repo log --pretty="%ct" -1 one >expect &&
test_cmp expect actual
ok 72 - parse_commit_in_graph works for non-the_repository
expecting success:
test-tool repository get_commit_tree_in_graph \
repo/.git repo "$(git -C repo rev-parse two)" >actual &&
git -C repo rev-parse two^{tree} >expect &&
test_cmp expect actual &&
test-tool repository get_commit_tree_in_graph \
repo/.git repo "$(git -C repo rev-parse one)" >actual &&
git -C repo rev-parse one^{tree} >expect &&
test_cmp expect actual
ok 73 - get_commit_tree_in_graph works for non-the_repository
# passed all 73 test(s)
1..73
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5402-post-merge-hook.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5402-post-merge-hook/.git/
expecting success:
echo Data for commit0. >a &&
git update-index --add a &&
tree0=$(git write-tree) &&
commit0=$(echo setup | git commit-tree $tree0) &&
echo Changed data for commit1. >a &&
git update-index a &&
tree1=$(git write-tree) &&
commit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&
git update-ref refs/heads/master $commit0 &&
git clone ./. clone1 &&
GIT_DIR=clone1/.git git update-index --add a &&
git clone ./. clone2 &&
GIT_DIR=clone2/.git git update-index --add a
Cloning into 'clone1'...
done.
Cloning into 'clone2'...
done.
ok 1 - setup
expecting success:
GIT_DIR=clone1/.git git merge $commit0 &&
! test -f clone1/.git/post-merge.args
Already up to date.
ok 2 - post-merge does not run for up-to-date
expecting success:
GIT_DIR=clone1/.git git merge $commit1 &&
test -e clone1/.git/post-merge.args
Updating 96a9772..8dd0c66
Fast-forward
a | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ok 3 - post-merge runs as expected
expecting success:
grep 0 clone1/.git/post-merge.args
0
ok 4 - post-merge from normal merge receives the right argument
expecting success:
GIT_DIR=clone2/.git git merge --squash $commit1 &&
test -e clone2/.git/post-merge.args
Updating 96a9772..8dd0c66
Fast-forward
Squash commit -- not updating HEAD
a | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ok 5 - post-merge from squash merge runs as expected
expecting success:
grep 1 clone2/.git/post-merge.args
1
ok 6 - post-merge from squash merge receives the right argument
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5324-split-commit-graph.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5324-split-commit-graph/.git/
expecting success:
git init &&
git config core.commitGraph true &&
infodir=".git/objects/info" &&
graphdir="$infodir/commit-graphs" &&
test_oid_init
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5324-split-commit-graph/.git/
ok 1 - setup repo
expecting success:
for i in $(test_seq 3)
do
test_commit $i &&
git branch commits/$i || return 1
done &&
git commit-graph write --reachable &&
test_path_is_file $infodir/commit-graph &&
graph_read_expect 3
[master (root-commit) d0dcf97] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1.t
[master 82335b2] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2.t
[master ddc8575] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 3.t
Computing commit graph generation numbers: 33% (1/3)
Computing commit graph generation numbers: 66% (2/3)
Computing commit graph generation numbers: 100% (3/3)
Computing commit graph generation numbers: 100% (3/3), done.
ok 2 - create commits and write commit-graph
expecting success:
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 3 - check normal git operations: graph exists
expecting success:
git reset --hard commits/1 &&
for i in $(test_seq 4 5)
do
test_commit $i &&
git branch commits/$i || return 1
done &&
git reset --hard commits/2 &&
for i in $(test_seq 6 10)
do
test_commit $i &&
git branch commits/$i || return 1
done &&
git reset --hard commits/2 &&
git merge commits/4 &&
git branch merge/1 &&
git reset --hard commits/4 &&
git merge commits/6 &&
git branch merge/2 &&
git commit-graph write --reachable &&
graph_read_expect 12
HEAD is now at d0dcf97 1
[master 6efda21] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 4.t
[master 7ec8a1d] 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 5.t
HEAD is now at 82335b2 2
[master 76c4cb0] 6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 6.t
[master 12a06f3] 7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 7.t
[master 1883fab] 8
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 8.t
[master 8ccfcf8] 9
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 9.t
[master f52fba2] 10
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 10.t
HEAD is now at 82335b2 2
Merging:
82335b2 2
virtual commits/4
found 1 common ancestor:
d0dcf97 1
Merge made by the 'recursive' strategy.
4.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 4.t
HEAD is now at 6efda21 4
Merging:
6efda21 4
virtual commits/6
found 1 common ancestor:
d0dcf97 1
Merge made by the 'recursive' strategy.
2.t | 1 +
6.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 2.t
create mode 100644 6.t
Computing commit graph generation numbers: 8% (1/12)
Computing commit graph generation numbers: 16% (2/12)
Computing commit graph generation numbers: 25% (3/12)
Computing commit graph generation numbers: 33% (4/12)
Computing commit graph generation numbers: 41% (5/12)
Computing commit graph generation numbers: 50% (6/12)
Computing commit graph generation numbers: 58% (7/12)
Computing commit graph generation numbers: 66% (8/12)
Computing commit graph generation numbers: 75% (9/12)
Computing commit graph generation numbers: 83% (10/12)
Computing commit graph generation numbers: 91% (11/12)
Computing commit graph generation numbers: 100% (12/12)
Computing commit graph generation numbers: 100% (12/12), done.
ok 4 - add more commits, and write a new base graph
expecting success:
test_when_finished rm -rf fork &&
git clone . fork &&
(
cd fork &&
rm .git/objects/info/commit-graph &&
echo "$(pwd)/../.git/objects" >.git/objects/info/alternates &&
test_commit new-commit &&
git commit-graph write --reachable --split &&
test_path_is_file $graphdir/commit-graph-chain &&
test_line_count = 1 $graphdir/commit-graph-chain &&
verify_chain_files_exist $graphdir
)
Cloning into 'fork'...
done.
[master aca87dd] new-commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 new-commit.t
Computing commit graph generation numbers: 7% (1/13)
Computing commit graph generation numbers: 15% (2/13)
Computing commit graph generation numbers: 23% (3/13)
Computing commit graph generation numbers: 30% (4/13)
Computing commit graph generation numbers: 38% (5/13)
Computing commit graph generation numbers: 46% (6/13)
Computing commit graph generation numbers: 53% (7/13)
Computing commit graph generation numbers: 61% (8/13)
Computing commit graph generation numbers: 69% (9/13)
Computing commit graph generation numbers: 76% (10/13)
Computing commit graph generation numbers: 84% (11/13)
Computing commit graph generation numbers: 92% (12/13)
Computing commit graph generation numbers: 100% (13/13)
Computing commit graph generation numbers: 100% (13/13), done.
ok 5 - fork and fail to base a chain on a commit-graph file
expecting success:
git reset --hard commits/3 &&
git merge merge/1 &&
git merge commits/5 &&
git merge merge/2 &&
git branch merge/3 &&
git commit-graph write --reachable --split &&
test_path_is_missing $infodir/commit-graph &&
test_path_is_file $graphdir/commit-graph-chain &&
ls $graphdir/graph-*.graph >graph-files &&
test_line_count = 2 graph-files &&
verify_chain_files_exist $graphdir
HEAD is now at ddc8575 3
Merging:
ddc8575 3
virtual merge/1
found 1 common ancestor:
82335b2 2
Merge made by the 'recursive' strategy.
4.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 4.t
Merging:
e7d6186 Merge branch 'merge/1'
virtual commits/5
found 1 common ancestor:
6efda21 4
Merge made by the 'recursive' strategy.
5.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 5.t
Merging:
25a3a79 Merge branch 'commits/5'
virtual merge/2
found 2 common ancestors:
82335b2 2
6efda21 4
Merging:
82335b2 2
6efda21 4
found 1 common ancestor:
d0dcf97 1
Merge made by the 'recursive' strategy.
6.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 6.t
Computing commit graph generation numbers: 33% (1/3)
Computing commit graph generation numbers: 66% (2/3)
Computing commit graph generation numbers: 100% (3/3)
Computing commit graph generation numbers: 100% (3/3), done.
ok 6 - add three more commits, write a tip graph
expecting success:
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 7 - check normal git operations: split commit-graph: merge 3 vs 2
expecting success:
test_commit 11 &&
git branch commits/11 &&
git commit-graph write --reachable --split &&
test_path_is_missing $infodir/commit-graph &&
test_path_is_file $graphdir/commit-graph-chain &&
ls $graphdir/graph-*.graph >graph-files &&
test_line_count = 3 graph-files &&
verify_chain_files_exist $graphdir
[master 4942c62] 11
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 11.t
Computing commit graph generation numbers: 100% (1/1)
Computing commit graph generation numbers: 100% (1/1), done.
ok 8 - add one commit, write a tip graph
expecting success:
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 9 - check normal git operations: three-layer commit-graph: commit 11 vs 6
expecting success:
test_commit 12 &&
git branch commits/12 &&
git commit-graph write --reachable --split &&
test_path_is_file $graphdir/commit-graph-chain &&
test_line_count = 2 $graphdir/commit-graph-chain &&
ls $graphdir/graph-*.graph >graph-files &&
test_line_count = 2 graph-files &&
verify_chain_files_exist $graphdir
[master 281f121] 12
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 12.t
Computing commit graph generation numbers: 20% (1/5)
Computing commit graph generation numbers: 40% (2/5)
Computing commit graph generation numbers: 60% (3/5)
Computing commit graph generation numbers: 80% (4/5)
Computing commit graph generation numbers: 100% (5/5)
Computing commit graph generation numbers: 100% (5/5), done.
ok 10 - add one commit, write a merged graph
expecting success:
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
ok 11 - check normal git operations: merged commit-graph: commit 12 vs 6
expecting success:
git clone . fork &&
(
cd fork &&
git config core.commitGraph true &&
rm -rf $graphdir &&
echo "$(pwd)/../.git/objects" >.git/objects/info/alternates &&
test_commit 13 &&
git branch commits/13 &&
git commit-graph write --reachable --split &&
test_path_is_file $graphdir/commit-graph-chain &&
test_line_count = 3 $graphdir/commit-graph-chain &&
ls $graphdir/graph-*.graph >graph-files &&
test_line_count = 1 graph-files &&
git -c core.commitGraph=true rev-list HEAD >expect &&
git -c core.commitGraph=false rev-list HEAD >actual &&
test_cmp expect actual &&
test_commit 14 &&
git commit-graph write --reachable --split --object-dir=.git/objects/ &&
test_line_count = 3 $graphdir/commit-graph-chain &&
ls $graphdir/graph-*.graph >graph-files &&
test_line_count = 1 graph-files
)
Cloning into 'fork'...
done.
[master f92bfb4] 13
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 13.t
Computing commit graph generation numbers: 100% (1/1)
Computing commit graph generation numbers: 100% (1/1), done.
[master 77a503a] 14
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 14.t
Computing commit graph generation numbers: 50% (1/2)
Computing commit graph generation numbers: 100% (2/2)
Computing commit graph generation numbers: 100% (2/2), done.
ok 12 - create fork and chain across alternate
expecting success:
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
fatal: ambiguous argument 'commits/13': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'commits/13': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'commits/13': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'commits/13': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'commits/6..commits/13': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'commits/6..commits/13': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: Not a valid object name commits/13
fatal: Not a valid object name commits/13
ok 13 - check normal git operations: alternate: commit 13 vs 6
expecting success:
git clone . merge-2 &&
(
cd merge-2 &&
git config core.commitGraph true &&
test_line_count = 2 $graphdir/commit-graph-chain &&
test_commit 14 &&
git commit-graph write --reachable --split --size-multiple=2 &&
test_line_count = 3 $graphdir/commit-graph-chain
) &&
git clone . merge-10 &&
(
cd merge-10 &&
git config core.commitGraph true &&
test_line_count = 2 $graphdir/commit-graph-chain &&
test_commit 14 &&
git commit-graph write --reachable --split --size-multiple=10 &&
test_line_count = 1 $graphdir/commit-graph-chain &&
ls $graphdir/graph-*.graph >graph-files &&
test_line_count = 1 graph-files
) &&
git clone . merge-10-expire &&
(
cd merge-10-expire &&
git config core.commitGraph true &&
test_line_count = 2 $graphdir/commit-graph-chain &&
test_commit 15 &&
git commit-graph write --reachable --split --size-multiple=10 --expire-time=1980-01-01 &&
test_line_count = 1 $graphdir/commit-graph-chain &&
ls $graphdir/graph-*.graph >graph-files &&
test_line_count = 3 graph-files
) &&
git clone --no-hardlinks . max-commits &&
(
cd max-commits &&
git config core.commitGraph true &&
test_line_count = 2 $graphdir/commit-graph-chain &&
test_commit 16 &&
test_commit 17 &&
git commit-graph write --reachable --split --max-commits=1 &&
test_line_count = 1 $graphdir/commit-graph-chain &&
ls $graphdir/graph-*.graph >graph-files &&
test_line_count = 1 graph-files
)
Cloning into 'merge-2'...
done.
[master dff8101] 14
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 14.t
Computing commit graph generation numbers: 100% (1/1)
Computing commit graph generation numbers: 100% (1/1), done.
Cloning into 'merge-10'...
done.
[master dff8101] 14
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 14.t
Computing commit graph generation numbers: 5% (1/18)
Computing commit graph generation numbers: 11% (2/18)
Computing commit graph generation numbers: 16% (3/18)
Computing commit graph generation numbers: 22% (4/18)
Computing commit graph generation numbers: 27% (5/18)
Computing commit graph generation numbers: 33% (6/18)
Computing commit graph generation numbers: 38% (7/18)
Computing commit graph generation numbers: 44% (8/18)
Computing commit graph generation numbers: 50% (9/18)
Computing commit graph generation numbers: 55% (10/18)
Computing commit graph generation numbers: 61% (11/18)
Computing commit graph generation numbers: 66% (12/18)
Computing commit graph generation numbers: 72% (13/18)
Computing commit graph generation numbers: 77% (14/18)
Computing commit graph generation numbers: 83% (15/18)
Computing commit graph generation numbers: 88% (16/18)
Computing commit graph generation numbers: 94% (17/18)
Computing commit graph generation numbers: 100% (18/18)
Computing commit graph generation numbers: 100% (18/18), done.
Cloning into 'merge-10-expire'...
done.
[master b16d1f7] 15
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 15.t
Computing commit graph generation numbers: 5% (1/18)
Computing commit graph generation numbers: 11% (2/18)
Computing commit graph generation numbers: 16% (3/18)
Computing commit graph generation numbers: 22% (4/18)
Computing commit graph generation numbers: 27% (5/18)
Computing commit graph generation numbers: 33% (6/18)
Computing commit graph generation numbers: 38% (7/18)
Computing commit graph generation numbers: 44% (8/18)
Computing commit graph generation numbers: 50% (9/18)
Computing commit graph generation numbers: 55% (10/18)
Computing commit graph generation numbers: 61% (11/18)
Computing commit graph generation numbers: 66% (12/18)
Computing commit graph generation numbers: 72% (13/18)
Computing commit graph generation numbers: 77% (14/18)
Computing commit graph generation numbers: 83% (15/18)
Computing commit graph generation numbers: 88% (16/18)
Computing commit graph generation numbers: 94% (17/18)
Computing commit graph generation numbers: 100% (18/18)
Computing commit graph generation numbers: 100% (18/18), done.
Cloning into 'max-commits'...
done.
[master ffa95d4] 16
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 16.t
[master 5167fe2] 17
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 17.t
Computing commit graph generation numbers: 5% (1/19)
Computing commit graph generation numbers: 10% (2/19)
Computing commit graph generation numbers: 15% (3/19)
Computing commit graph generation numbers: 21% (4/19)
Computing commit graph generation numbers: 26% (5/19)
Computing commit graph generation numbers: 31% (6/19)
Computing commit graph generation numbers: 36% (7/19)
Computing commit graph generation numbers: 42% (8/19)
Computing commit graph generation numbers: 47% (9/19)
Computing commit graph generation numbers: 52% (10/19)
Computing commit graph generation numbers: 57% (11/19)
Computing commit graph generation numbers: 63% (12/19)
Computing commit graph generation numbers: 68% (13/19)
Computing commit graph generation numbers: 73% (14/19)
Computing commit graph generation numbers: 78% (15/19)
Computing commit graph generation numbers: 84% (16/19)
Computing commit graph generation numbers: 89% (17/19)
Computing commit graph generation numbers: 94% (18/19)
Computing commit graph generation numbers: 100% (19/19)
Computing commit graph generation numbers: 100% (19/19), done.
ok 14 - test merge stragety constants
expecting success:
git clone . flatten &&
(
cd flatten &&
test_line_count = 2 $graphdir/commit-graph-chain &&
git commit-graph write --reachable &&
test_path_is_missing $graphdir/commit-graph-chain &&
ls $graphdir >graph-files &&
test_line_count = 0 graph-files
)
Cloning into 'flatten'...
done.
Computing commit graph generation numbers: 5% (1/17)
Computing commit graph generation numbers: 11% (2/17)
Computing commit graph generation numbers: 17% (3/17)
Computing commit graph generation numbers: 23% (4/17)
Computing commit graph generation numbers: 29% (5/17)
Computing commit graph generation numbers: 35% (6/17)
Computing commit graph generation numbers: 41% (7/17)
Computing commit graph generation numbers: 47% (8/17)
Computing commit graph generation numbers: 52% (9/17)
Computing commit graph generation numbers: 58% (10/17)
Computing commit graph generation numbers: 64% (11/17)
Computing commit graph generation numbers: 70% (12/17)
Computing commit graph generation numbers: 76% (13/17)
Computing commit graph generation numbers: 82% (14/17)
Computing commit graph generation numbers: 88% (15/17)
Computing commit graph generation numbers: 94% (16/17)
Computing commit graph generation numbers: 100% (17/17)
Computing commit graph generation numbers: 100% (17/17), done.
ok 15 - remove commit-graph-chain file after flattening
expecting success:
git clone --no-hardlinks . verify &&
(
cd verify &&
git commit-graph verify &&
base_file=$graphdir/graph-$(head -n 1 $graphdir/commit-graph-chain).graph &&
corrupt_file "$base_file" 1760 "\01" &&
test_must_fail git commit-graph verify --shallow 2>test_err &&
grep -v "^+" test_err >err &&
test_i18ngrep "incorrect checksum" err
)
Cloning into 'verify'...
done.
Verifying commits in commit graph: 20% (1/5)
Verifying commits in commit graph: 40% (2/5)
Verifying commits in commit graph: 60% (3/5)
Verifying commits in commit graph: 80% (4/5)
Verifying commits in commit graph: 100% (5/5)
Verifying commits in commit graph: 100% (5/5), done.
Verifying commits in commit graph: 8% (1/12)
Verifying commits in commit graph: 16% (2/12)
Verifying commits in commit graph: 25% (3/12)
Verifying commits in commit graph: 33% (4/12)
Verifying commits in commit graph: 41% (5/12)
Verifying commits in commit graph: 50% (6/12)
Verifying commits in commit graph: 58% (7/12)
Verifying commits in commit graph: 66% (8/12)
Verifying commits in commit graph: 75% (9/12)
Verifying commits in commit graph: 83% (10/12)
Verifying commits in commit graph: 91% (11/12)
Verifying commits in commit graph: 100% (12/12)
Verifying commits in commit graph: 100% (12/12), done.
1+0 records in
1+0 records out
1 byte copied, 0.000405785 s, 2.5 kB/s
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
the commit-graph file has incorrect checksum and is likely corrupt
ok 16 - verify hashes along chain, even in shallow
expecting success:
git clone --no-hardlinks . verify-shallow &&
(
cd verify-shallow &&
git commit-graph verify &&
base_file=$graphdir/graph-$(head -n 1 $graphdir/commit-graph-chain).graph &&
corrupt_file "$base_file" 1000 "\01" &&
git commit-graph verify --shallow &&
test_must_fail git commit-graph verify 2>test_err &&
grep -v "^+" test_err >err &&
test_i18ngrep "incorrect checksum" err
)
Cloning into 'verify-shallow'...
done.
Verifying commits in commit graph: 20% (1/5)
Verifying commits in commit graph: 40% (2/5)
Verifying commits in commit graph: 60% (3/5)
Verifying commits in commit graph: 80% (4/5)
Verifying commits in commit graph: 100% (5/5)
Verifying commits in commit graph: 100% (5/5), done.
Verifying commits in commit graph: 8% (1/12)
Verifying commits in commit graph: 16% (2/12)
Verifying commits in commit graph: 25% (3/12)
Verifying commits in commit graph: 33% (4/12)
Verifying commits in commit graph: 41% (5/12)
Verifying commits in commit graph: 50% (6/12)
Verifying commits in commit graph: 58% (7/12)
Verifying commits in commit graph: 66% (8/12)
Verifying commits in commit graph: 75% (9/12)
Verifying commits in commit graph: 83% (10/12)
Verifying commits in commit graph: 91% (11/12)
Verifying commits in commit graph: 100% (12/12)
Verifying commits in commit graph: 100% (12/12), done.
1+0 records in
1+0 records out
1 byte copied, 9.6041e-05 s, 10.4 kB/s
Verifying commits in commit graph: 20% (1/5)
Verifying commits in commit graph: 40% (2/5)
Verifying commits in commit graph: 60% (3/5)
Verifying commits in commit graph: 80% (4/5)
Verifying commits in commit graph: 100% (5/5)
Verifying commits in commit graph: 100% (5/5), done.
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
the commit-graph file has incorrect checksum and is likely corrupt
ok 17 - verify --shallow does not check base contents
expecting success:
git clone --no-hardlinks . base-chunk &&
(
cd base-chunk &&
git commit-graph verify &&
base_file=$graphdir/graph-$(tail -n 1 $graphdir/commit-graph-chain).graph &&
corrupt_file "$base_file" 1376 "\01" &&
git commit-graph verify --shallow 2>test_err &&
grep -v "^+" test_err >err &&
test_i18ngrep "commit-graph chain does not match" err
)
Cloning into 'base-chunk'...
done.
Verifying commits in commit graph: 20% (1/5)
Verifying commits in commit graph: 40% (2/5)
Verifying commits in commit graph: 60% (3/5)
Verifying commits in commit graph: 80% (4/5)
Verifying commits in commit graph: 100% (5/5)
Verifying commits in commit graph: 100% (5/5), done.
Verifying commits in commit graph: 8% (1/12)
Verifying commits in commit graph: 16% (2/12)
Verifying commits in commit graph: 25% (3/12)
Verifying commits in commit graph: 33% (4/12)
Verifying commits in commit graph: 41% (5/12)
Verifying commits in commit graph: 50% (6/12)
Verifying commits in commit graph: 58% (7/12)
Verifying commits in commit graph: 66% (8/12)
Verifying commits in commit graph: 75% (9/12)
Verifying commits in commit graph: 83% (10/12)
Verifying commits in commit graph: 91% (11/12)
Verifying commits in commit graph: 100% (12/12)
Verifying commits in commit graph: 100% (12/12), done.
1+0 records in
1+0 records out
1 byte copied, 0.000378684 s, 2.6 kB/s
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
warning: commit-graph chain does not match
ok 18 - warn on base graph chunk incorrect
expecting success:
git clone --no-hardlinks . verify-chain &&
(
cd verify-chain &&
corrupt_file "$graphdir/commit-graph-chain" 60 "G" &&
git commit-graph verify 2>test_err &&
grep -v "^+" test_err >err &&
test_i18ngrep "invalid commit-graph chain" err &&
corrupt_file "$graphdir/commit-graph-chain" 60 "A" &&
git commit-graph verify 2>test_err &&
grep -v "^+" test_err >err &&
test_i18ngrep "unable to find all commit-graph files" err
)
Cloning into 'verify-chain'...
done.
1+0 records in
1+0 records out
1 byte copied, 0.000395064 s, 2.5 kB/s
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
warning: invalid commit-graph chain: line 'ccc8b5b5c7f62520f56G90492a9b0aafc3d56060' not a hash
1+0 records in
1+0 records out
1 byte copied, 9.7222e-05 s, 10.3 kB/s
warning: unable to find all commit-graph files
ok 19 - verify after commit-graph-chain corruption
expecting success:
git clone --no-hardlinks . verify-alt &&
(
cd verify-alt &&
rm -rf $graphdir &&
altdir="$(pwd)/../.git/objects" &&
echo "$altdir" >.git/objects/info/alternates &&
git commit-graph verify --object-dir="$altdir/" &&
test_commit extra &&
git commit-graph write --reachable --split &&
tip_file=$graphdir/graph-$(tail -n 1 $graphdir/commit-graph-chain).graph &&
corrupt_file "$tip_file" 100 "\01" &&
test_must_fail git commit-graph verify --shallow 2>test_err &&
grep -v "^+" test_err >err &&
test_i18ngrep "commit-graph has incorrect fanout value" err
)
Cloning into 'verify-alt'...
done.
Verifying commits in commit graph: 20% (1/5)
Verifying commits in commit graph: 40% (2/5)
Verifying commits in commit graph: 60% (3/5)
Verifying commits in commit graph: 80% (4/5)
Verifying commits in commit graph: 100% (5/5)
Verifying commits in commit graph: 100% (5/5), done.
Verifying commits in commit graph: 8% (1/12)
Verifying commits in commit graph: 16% (2/12)
Verifying commits in commit graph: 25% (3/12)
Verifying commits in commit graph: 33% (4/12)
Verifying commits in commit graph: 41% (5/12)
Verifying commits in commit graph: 50% (6/12)
Verifying commits in commit graph: 58% (7/12)
Verifying commits in commit graph: 66% (8/12)
Verifying commits in commit graph: 75% (9/12)
Verifying commits in commit graph: 83% (10/12)
Verifying commits in commit graph: 91% (11/12)
Verifying commits in commit graph: 100% (12/12)
Verifying commits in commit graph: 100% (12/12), done.
[master bcff7a4] extra
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 extra.t
Computing commit graph generation numbers: 5% (1/18)
Computing commit graph generation numbers: 11% (2/18)
Computing commit graph generation numbers: 16% (3/18)
Computing commit graph generation numbers: 22% (4/18)
Computing commit graph generation numbers: 27% (5/18)
Computing commit graph generation numbers: 33% (6/18)
Computing commit graph generation numbers: 38% (7/18)
Computing commit graph generation numbers: 44% (8/18)
Computing commit graph generation numbers: 50% (9/18)
Computing commit graph generation numbers: 55% (10/18)
Computing commit graph generation numbers: 61% (11/18)
Computing commit graph generation numbers: 66% (12/18)
Computing commit graph generation numbers: 72% (13/18)
Computing commit graph generation numbers: 77% (14/18)
Computing commit graph generation numbers: 83% (15/18)
Computing commit graph generation numbers: 88% (16/18)
Computing commit graph generation numbers: 94% (17/18)
Computing commit graph generation numbers: 100% (18/18)
Computing commit graph generation numbers: 100% (18/18), done.
1+0 records in
1+0 records out
1 byte copied, 0.000118741 s, 8.4 kB/s
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
commit-graph has incorrect fanout value: fanout[11] = 16777216 != 0
ok 20 - verify across alternates
expecting success:
git reset --hard commits/10 &&
git merge commits/3 commits/4 &&
git branch merge/octopus &&
git commit-graph write --reachable --split &&
git commit-graph verify &&
test_line_count = 3 $graphdir/commit-graph-chain
HEAD is now at f52fba2 10
Trying simple merge with commits/3
Trying simple merge with commits/4
Merge made by the 'octopus' strategy.
3.t | 1 +
4.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 3.t
create mode 100644 4.t
Computing commit graph generation numbers: 100% (1/1)
Computing commit graph generation numbers: 100% (1/1), done.
warning: commit-graph chain does not match
warning: unable to find all commit-graph files
Verifying commits in commit graph: 20% (1/5)
Verifying commits in commit graph: 40% (2/5)
Verifying commits in commit graph: 60% (3/5)
Verifying commits in commit graph: 80% (4/5)
Verifying commits in commit graph: 100% (5/5)
Verifying commits in commit graph: 100% (5/5), done.
Verifying commits in commit graph: 8% (1/12)
Verifying commits in commit graph: 16% (2/12)
Verifying commits in commit graph: 25% (3/12)
Verifying commits in commit graph: 33% (4/12)
Verifying commits in commit graph: 41% (5/12)
Verifying commits in commit graph: 50% (6/12)
Verifying commits in commit graph: 58% (7/12)
Verifying commits in commit graph: 66% (8/12)
Verifying commits in commit graph: 75% (9/12)
Verifying commits in commit graph: 83% (10/12)
Verifying commits in commit graph: 91% (11/12)
Verifying commits in commit graph: 100% (12/12)
Verifying commits in commit graph: 100% (12/12), done.
ok 21 - add octopus merge
expecting success:
graph_git_two_modes "log --oneline $BRANCH" &&
graph_git_two_modes "log --topo-order $BRANCH" &&
graph_git_two_modes "log --graph $COMPARE..$BRANCH" &&
graph_git_two_modes "branch -vv" &&
graph_git_two_modes "merge-base -a $BRANCH $COMPARE"
warning: commit-graph chain does not match
warning: unable to find all commit-graph files
warning: commit-graph chain does not match
warning: unable to find all commit-graph files
warning: commit-graph chain does not match
warning: unable to find all commit-graph files
warning: commit-graph chain does not match
warning: unable to find all commit-graph files
warning: commit-graph chain does not match
warning: unable to find all commit-graph files
ok 22 - check normal git operations: graph exists
expecting success:
git commit-graph write --reachable &&
test_path_is_file .git/objects/info/commit-graph &&
cp .git/objects/info/commit-graph . &&
git clone --no-hardlinks . alt-split &&
(
cd alt-split &&
echo "$(pwd)"/../.git/objects >.git/objects/info/alternates &&
test_commit 18 &&
git commit-graph write --reachable --split &&
test_line_count = 1 $graphdir/commit-graph-chain
) &&
test_cmp commit-graph .git/objects/info/commit-graph
warning: commit-graph chain does not match
warning: unable to find all commit-graph files
Computing commit graph generation numbers: 5% (1/18)
Computing commit graph generation numbers: 11% (2/18)
Computing commit graph generation numbers: 16% (3/18)
Computing commit graph generation numbers: 22% (4/18)
Computing commit graph generation numbers: 27% (5/18)
Computing commit graph generation numbers: 33% (6/18)
Computing commit graph generation numbers: 38% (7/18)
Computing commit graph generation numbers: 44% (8/18)
Computing commit graph generation numbers: 50% (9/18)
Computing commit graph generation numbers: 55% (10/18)
Computing commit graph generation numbers: 61% (11/18)
Computing commit graph generation numbers: 66% (12/18)
Computing commit graph generation numbers: 72% (13/18)
Computing commit graph generation numbers: 77% (14/18)
Computing commit graph generation numbers: 83% (15/18)
Computing commit graph generation numbers: 88% (16/18)
Computing commit graph generation numbers: 94% (17/18)
Computing commit graph generation numbers: 100% (18/18)
Computing commit graph generation numbers: 100% (18/18), done.
Cloning into 'alt-split'...
done.
[master e793b7e] 18
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 18.t
Computing commit graph generation numbers: 5% (1/19)
Computing commit graph generation numbers: 10% (2/19)
Computing commit graph generation numbers: 15% (3/19)
Computing commit graph generation numbers: 21% (4/19)
Computing commit graph generation numbers: 26% (5/19)
Computing commit graph generation numbers: 31% (6/19)
Computing commit graph generation numbers: 36% (7/19)
Computing commit graph generation numbers: 42% (8/19)
Computing commit graph generation numbers: 47% (9/19)
Computing commit graph generation numbers: 52% (10/19)
Computing commit graph generation numbers: 57% (11/19)
Computing commit graph generation numbers: 63% (12/19)
Computing commit graph generation numbers: 68% (13/19)
Computing commit graph generation numbers: 73% (14/19)
Computing commit graph generation numbers: 78% (15/19)
Computing commit graph generation numbers: 84% (16/19)
Computing commit graph generation numbers: 89% (17/19)
Computing commit graph generation numbers: 94% (18/19)
Computing commit graph generation numbers: 100% (19/19)
Computing commit graph generation numbers: 100% (19/19), done.
ok 23 - split across alternate where alternate is not split
# passed all 23 test(s)
1..23
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5403-post-checkout-hook.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5403-post-checkout-hook/.git/
expecting success:
mkdir -p .git/hooks &&
write_script .git/hooks/post-checkout <<-\EOF &&
echo "$@" >.git/post-checkout.args
EOF
test_commit one &&
test_commit two &&
test_commit rebase-on-me &&
git reset --hard HEAD^ &&
test_commit three
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[master a193130] rebase-on-me
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 rebase-on-me.t
HEAD is now at 139b20d two
[master a6f6257] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
ok 1 - setup
expecting success:
test_when_finished "rm -f .git/post-checkout.args" &&
git checkout master &&
read old new flag <.git/post-checkout.args &&
test $old = $new && test $flag = 1
Already on 'master'
ok 2 - post-checkout receives the right arguments with HEAD unchanged
expecting success:
test_when_finished "rm -f .git/post-checkout.args" &&
git checkout -b new1 &&
read old new flag <.git/post-checkout.args &&
test $old = $new && test $flag = 1
Switched to a new branch 'new1'
ok 3 - post-checkout args are correct with git checkout -b
expecting success:
test_when_finished "rm -f .git/post-checkout.args" &&
git checkout two &&
read old new flag <.git/post-checkout.args &&
test $old != $new && test $flag = 1
Note: switching to 'two'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 139b20d two
ok 4 - post-checkout receives the right args with HEAD changed
expecting success:
test_when_finished "rm -f .git/post-checkout.args" &&
git checkout master -- three.t &&
read old new flag <.git/post-checkout.args &&
test $old = $new && test $flag = 0
ok 5 - post-checkout receives the right args when not switching branches
expecting success:
test_when_finished "rm -f .git/post-checkout.args" &&
git checkout -b rebase-test master &&
rm -f .git/post-checkout.args &&
git rebase rebase-on-me &&
read old new flag <.git/post-checkout.args &&
test $old != $new && test $flag = 1
Previous HEAD position was 139b20d two
Switched to a new branch 'rebase-test'
First, rewinding head to replay your work on top of it...
Applying: three
ok 6 - post-checkout is triggered on rebase
expecting success:
test_when_finished "rm -f .git/post-checkout.args" &&
git checkout -b ff-rebase-test rebase-on-me^ &&
rm -f .git/post-checkout.args &&
git rebase rebase-on-me &&
read old new flag <.git/post-checkout.args &&
test $old != $new && test $flag = 1
Switched to a new branch 'ff-rebase-test'
First, rewinding head to replay your work on top of it...
Fast-forwarded ff-rebase-test to rebase-on-me.
ok 7 - post-checkout is triggered on rebase with fast-forward
expecting success:
mkdir -p templates/hooks &&
write_script templates/hooks/post-checkout <<-\EOF &&
echo "$@" >"$GIT_DIR/post-checkout.args"
EOF
git clone --template=templates . clone3 &&
test -f clone3/.git/post-checkout.args
Cloning into 'clone3'...
done.
ok 8 - post-checkout hook is triggered by clone
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5404-tracking-branches.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5404-tracking-branches/.git/
expecting success:
echo 1 >file &&
git add file &&
git commit -m 1 &&
git branch b1 &&
git branch b2 &&
git branch b3 &&
git clone . aa &&
git checkout b1 &&
echo b1 >>file &&
git commit -a -m b1 &&
git checkout b2 &&
echo b2 >>file &&
git commit -a -m b2
[master (root-commit) 360dd49] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Cloning into 'aa'...
done.
Switched to branch 'b1'
[b1 2eb8a72] b1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'b2'
[b2 11a87a1] b2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
cd aa &&
b1=$(git rev-parse origin/b1) &&
b2=$(git rev-parse origin/b2) &&
git checkout -b b1 origin/b1 &&
echo aa-b1 >>file &&
git commit -a -m aa-b1 &&
git checkout -b b2 origin/b2 &&
echo aa-b2 >>file &&
git commit -a -m aa-b2 &&
git checkout master &&
echo aa-master >>file &&
git commit -a -m aa-master
Switched to a new branch 'b1'
Branch 'b1' set up to track remote branch 'b1' from 'origin'.
[b1 0388f0a] aa-b1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to a new branch 'b2'
Branch 'b2' set up to track remote branch 'b2' from 'origin'.
[b2 b0c574f] aa-b2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
[master cb280c9] aa-master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 2 - prepare pushable branches
expecting success:
test_must_fail git push origin :
To /<<PKGBUILDDIR>>/t/trash directory.t5404-tracking-branches/.
360dd49..cb280c9 master -> master
! [rejected] b1 -> b1 (fetch first)
! [rejected] b2 -> b2 (fetch first)
error: failed to push some refs to '/<<PKGBUILDDIR>>/t/trash directory.t5404-tracking-branches/.'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
ok 3 - mixed-success push returns error
expecting success:
test "$(git rev-parse origin/master)" = "$(git rev-parse master)"
ok 4 - check tracking branches updated correctly after push
expecting success:
test "$(git rev-parse origin/b1)" = "$b1" &&
test "$(git rev-parse origin/b2)" = "$b2"
ok 5 - check tracking branches not updated for failed refs
expecting success:
git push origin :b1 &&
test "$(git rev-parse origin/b1)" = "origin/b1"
To /<<PKGBUILDDIR>>/t/trash directory.t5404-tracking-branches/.
- [deleted] b1
fatal: ambiguous argument 'origin/b1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ok 6 - deleted branches have their tracking branches removed
expecting success:
git branch -d -r origin/b3 &&
git push origin :b3 >output 2>&1 &&
! grep "^error: " output
Deleted remote-tracking branch origin/b3 (was 360dd49).
ok 7 - already deleted tracking branches ignored
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5405-send-pack-rewind.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5405-send-pack-rewind/.git/
expecting success:
>file1 && git add file1 && test_tick &&
git commit -m Initial &&
git config receive.denyCurrentBranch warn &&
mkdir another && (
cd another &&
git init &&
git fetch --update-head-ok .. master:master
) &&
>file2 && git add file2 && test_tick &&
git commit -m Second
[master (root-commit) de5945f] 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.t5405-send-pack-rewind/another/.git/
From ..
* [new branch] master -> master
[master 3dc47c1] Second
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file2
ok 1 - setup
expecting success:
(
cd another &&
test_must_fail git push .. master:master
)
To ..
! [rejected] master -> master (fetch first)
error: failed to push some refs to '..'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
ok 2 - non forced push should die not segfault
expecting success:
(
cd another &&
git push .. +master:master
)
remote: warning: updating the current branch
To ..
+ 3dc47c1...de5945f master -> master (forced update)
ok 3 - forced push should succeed
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5406-remote-rejects.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5406-remote-rejects/.git/
expecting success:
mkdir .git/hooks &&
write_script .git/hooks/update <<-\EOF &&
exit 1
EOF
echo 1 >file &&
git add file &&
git commit -m 1 &&
git clone . child &&
cd child &&
echo 2 >file &&
git commit -a -m 2
[master (root-commit) 7ee8f41] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Cloning into 'child'...
done.
[master 9516a47] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success: test_must_fail git push 2>stderr
ok 2 - push reports error
expecting success: grep rejected stderr
! [remote rejected] master -> master (branch is currently checked out)
ok 3 - individual ref reports error
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5408-send-pack-stdin.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5408-send-pack-stdin/.git/
expecting success:
cat >refs <<-\EOF &&
refs/heads/A
refs/heads/C
refs/tags/D
refs/heads/B
refs/tags/E
EOF
for i in $(cat refs); do
create_ref $i || return 1
done
ok 1 - setup refs
expecting success:
clear_remote &&
git send-pack remote.git $(cat refs) &&
for i in $(cat refs); do
verify_push $i || return 1
done
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5408-send-pack-stdin/remote.git/
To remote.git
* [new branch] A -> A
* [new branch] C -> C
* [new tag] D -> D
* [new branch] B -> B
* [new tag] E -> E
ok 2 - refs on cmdline
expecting success:
clear_remote &&
git send-pack remote.git --stdin <refs &&
for i in $(cat refs); do
verify_push $i || return 1
done
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5408-send-pack-stdin/remote.git/
To remote.git
* [new branch] A -> A
* [new branch] C -> C
* [new tag] D -> D
* [new branch] B -> B
* [new tag] E -> E
ok 3 - refs over stdin
expecting success:
clear_remote &&
echo "A:other" >input &&
git send-pack remote.git --stdin <input &&
verify_push refs/heads/A refs/heads/other
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5408-send-pack-stdin/remote.git/
To remote.git
* [new branch] A -> other
ok 4 - stdin lines are full refspecs
expecting success:
clear_remote &&
echo A >input &&
git send-pack remote.git --stdin B <input &&
verify_push A &&
verify_push B
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5408-send-pack-stdin/remote.git/
To remote.git
* [new branch] B -> B
* [new branch] A -> A
ok 5 - stdin mixed with cmdline
expecting success:
clear_remote &&
test_must_fail git send-pack remote.git A:foo B:foo &&
verify_push A foo
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5408-send-pack-stdin/remote.git/
remote: error: cannot lock ref 'refs/heads/foo': reference already exists
To remote.git
* [new branch] A -> foo
! [remote rejected] B -> foo (failed to update ref)
ok 6 - cmdline refs written in order
expecting success:
clear_remote &&
echo A:foo >input &&
test_must_fail git send-pack remote.git --stdin B:foo <input &&
verify_push B foo
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5408-send-pack-stdin/remote.git/
remote: error: cannot lock ref 'refs/heads/foo': reference already exists
To remote.git
* [new branch] B -> foo
! [remote rejected] A -> foo (failed to update ref)
ok 7 - --stdin refs come after cmdline
expecting success:
clear_remote &&
test_must_fail git send-pack remote.git --mirror $(cat refs)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5408-send-pack-stdin/remote.git/
usage: git send-pack [--all | --mirror] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [--atomic] [<host>:]<directory> [<ref>...]
--all and explicit <ref> specification are mutually exclusive.
-v, --verbose be more verbose
-q, --quiet be more quiet
--receive-pack <receive-pack>
receive pack program
--exec <receive-pack>
receive pack program
--remote <remote> remote name
--all push all refs
-n, --dry-run dry run
--mirror mirror all refs
-f, --force force updates
--signed[=(yes|no|if-asked)]
GPG sign the push
--push-option <server-specific>
option to transmit
--progress force progress reporting
--thin use thin pack
--atomic request atomic transaction on remote side
--stateless-rpc use stateless RPC protocol
--stdin read refs from stdin
--helper-status print status from remote helper
--force-with-lease[=<refname>:<expect>]
require old value of ref to be at this value
ok 8 - refspecs and --mirror do not mix (cmdline)
expecting success:
clear_remote &&
test_must_fail git send-pack remote.git --mirror --stdin <refs
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5408-send-pack-stdin/remote.git/
usage: git send-pack [--all | --mirror] [--dry-run] [--force] [--receive-pack=<git-receive-pack>] [--verbose] [--thin] [--atomic] [<host>:]<directory> [<ref>...]
--all and explicit <ref> specification are mutually exclusive.
-v, --verbose be more verbose
-q, --quiet be more quiet
--receive-pack <receive-pack>
receive pack program
--exec <receive-pack>
receive pack program
--remote <remote> remote name
--all push all refs
-n, --dry-run dry run
--mirror mirror all refs
-f, --force force updates
--signed[=(yes|no|if-asked)]
GPG sign the push
--push-option <server-specific>
option to transmit
--progress force progress reporting
--thin use thin pack
--atomic request atomic transaction on remote side
--stateless-rpc use stateless RPC protocol
--stdin read refs from stdin
--helper-status print status from remote helper
--force-with-lease[=<refname>:<expect>]
require old value of ref to be at this value
ok 9 - refspecs and --mirror do not mix (stdin)
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5409-colorize-remote-messages.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5409-colorize-remote-messages/.git/
expecting success:
mkdir .git/hooks &&
write_script .git/hooks/update <<-\EOF &&
echo error: error
echo ERROR: also highlighted
echo hint: hint
echo hinting: not highlighted
echo success: success
echo warning: warning
echo prefixerror: error
echo " " "error: leading space"
echo " "
echo Err
echo SUCCESS
exit 0
EOF
echo 1 >file &&
git add file &&
git commit -m 1 &&
git clone . child &&
(
cd child &&
test_commit message2 file content2
)
[master (root-commit) 29ffa39] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Cloning into 'child'...
done.
[master 26d6f50] message2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
git --git-dir child/.git -c color.remote=always push -f origin HEAD:refs/heads/keywords 2>output &&
test_decode_color <output >decoded &&
grep "<BOLD;RED>error<RESET>: error" decoded &&
grep "<YELLOW>hint<RESET>:" decoded &&
grep "<BOLD;GREEN>success<RESET>:" decoded &&
grep "<BOLD;GREEN>SUCCESS<RESET>" decoded &&
grep "<BOLD;YELLOW>warning<RESET>:" decoded
remote: <BOLD;RED>error<RESET>: error
remote: <YELLOW>hint<RESET>: hint
remote: <BOLD;GREEN>success<RESET>: success
remote: <BOLD;GREEN>SUCCESS<RESET>
remote: <BOLD;YELLOW>warning<RESET>: warning
ok 2 - keywords
expecting success:
git --git-dir child/.git -c color.remote=always push -f origin HEAD:refs/heads/whole-words 2>output &&
test_decode_color <output >decoded &&
grep "<YELLOW>hint<RESET>:" decoded &&
grep "hinting: not highlighted" decoded &&
grep "prefixerror: error" decoded
remote: <YELLOW>hint<RESET>: hint
remote: hinting: not highlighted
remote: prefixerror: error
ok 3 - whole words at line start
expecting success:
git -C child -c color.remote=always push -f origin HEAD:short-line 2>output &&
test_decode_color <output >decoded &&
grep "remote: Err" decoded
remote: Err
ok 4 - short line
expecting success:
git --git-dir child/.git -c color.remote=always push -f origin HEAD:refs/heads/case-insensitive 2>output &&
cat output &&
test_decode_color <output >decoded &&
grep "<BOLD;RED>error<RESET>: error" decoded &&
grep "<BOLD;RED>ERROR<RESET>: also highlighted" decoded
remote: [1;31merror[m: error
remote: [1;31mERROR[m: also highlighted
remote: [33mhint[m: hint
remote: hinting: not highlighted
remote: [1;32msuccess[m: success
remote: [1;33mwarning[m: warning
remote: prefixerror: error
remote: [1;31merror[m: leading space
remote:
remote: Err
remote: [1;32mSUCCESS[m
To /<<PKGBUILDDIR>>/t/trash directory.t5409-colorize-remote-messages/.
* [new branch] HEAD -> case-insensitive
remote: <BOLD;RED>error<RESET>: error
remote: <BOLD;RED>ERROR<RESET>: also highlighted
ok 5 - case-insensitive
expecting success:
git --git-dir child/.git -c color.remote=always push -f origin HEAD:refs/heads/leading-space 2>output && cat output &&
test_decode_color <output >decoded &&
grep " <BOLD;RED>error<RESET>: leading space" decoded
remote: [1;31merror[m: error
remote: [1;31mERROR[m: also highlighted
remote: [33mhint[m: hint
remote: hinting: not highlighted
remote: [1;32msuccess[m: success
remote: [1;33mwarning[m: warning
remote: prefixerror: error
remote: [1;31merror[m: leading space
remote:
remote: Err
remote: [1;32mSUCCESS[m
To /<<PKGBUILDDIR>>/t/trash directory.t5409-colorize-remote-messages/.
* [new branch] HEAD -> leading-space
remote: <BOLD;RED>error<RESET>: leading space
ok 6 - leading space
expecting success:
git -C child -c color.remote=always push -f origin HEAD:only-space 2>output &&
test_decode_color <output >decoded &&
grep "remote: " decoded
remote:
ok 7 - spaces only
expecting success:
git --git-dir child/.git push -f origin HEAD:refs/heads/redirected-output 2>output &&
test_decode_color <output >decoded &&
grep "error: error" decoded
remote: error: error
remote: prefixerror: error
ok 8 - no coloring for redirected output
expecting success:
git --git-dir child/.git -c color.remote=always -c color.remote.error=blue push -f origin HEAD:refs/heads/customized-color 2>output &&
test_decode_color <output >decoded &&
grep "<BLUE>error<RESET>:" decoded &&
grep "<BOLD;GREEN>success<RESET>:" decoded
remote: <BLUE>error<RESET>: error
remote: <BLUE>error<RESET>: leading space
remote: <BOLD;GREEN>success<RESET>: success
ok 9 - push with customized color
expecting success:
git --git-dir child/.git -c color.remote=always -c color.remote.error=i-am-not-a-color push -f origin HEAD:refs/heads/error-customized-color 2>output &&
test_decode_color <output >decoded &&
grep "<BOLD;GREEN>success<RESET>:" decoded
remote: <BOLD;GREEN>success<RESET>: success
ok 10 - error in customized color
expecting success:
git --git-dir child/.git -c color.ui=always push -f origin HEAD:refs/heads/fallback-color-ui 2>output &&
test_decode_color <output >decoded &&
grep "<BOLD;RED>error<RESET>: error" decoded
remote: <BOLD;RED>error<RESET>: error
ok 11 - fallback to color.ui
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5410-receive-pack-alternates.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5410-receive-pack-alternates/.git/
expecting success:
test_commit base &&
git clone -s --bare . fork &&
git checkout -b public/branch master &&
test_commit public &&
git checkout -b private/branch master &&
test_commit private
[master (root-commit) d1ff1c9] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 base.t
Cloning into bare repository 'fork'...
done.
Switched to a new branch 'public/branch'
[public/branch d7bb355] public
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 public.t
Switched to a new branch 'private/branch'
[private/branch 9725dbe] private
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 private.t
ok 1 - setup
expecting success:
write_script fork/alternate-refs <<-\EOF &&
git --git-dir="$1" for-each-ref \
--format="%(objectname)" \
refs/heads/public/
EOF
test_config -C fork core.alternateRefsCommand ./alternate-refs &&
git rev-parse public/branch >expect &&
printf "0000" | git receive-pack fork >actual &&
extract_haves <actual >actual.haves &&
test_cmp expect actual.haves
ok 2 - with core.alternateRefsCommand
expecting success:
test_config -C fork core.alternateRefsPrefixes "refs/heads/private" &&
git rev-parse private/branch >expect &&
printf "0000" | git receive-pack fork >actual &&
extract_haves <actual >actual.haves &&
test_cmp expect actual.haves
ok 3 - with core.alternateRefsPrefixes
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5407-post-rewrite-hook.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5407-post-rewrite-hook/.git/
expecting success:
test_commit A foo A &&
test_commit B foo B &&
test_commit C foo C &&
test_commit D foo D &&
git checkout A^0 &&
test_commit E bar E &&
test_commit F foo F &&
git checkout master
[master (root-commit) be6e19b] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
[master df02547] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 2362ae8] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master babc8a4] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at be6e19b A
[detached HEAD 5baa167] E
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
[detached HEAD 38c24e8] F
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Previous HEAD position was 38c24e8 F
Switched to branch 'master'
ok 1 - setup
expecting success:
clear_hook_input &&
echo "D new message" > newmsg &&
oldsha=$(git rev-parse HEAD^0) &&
git commit -Fnewmsg --amend &&
echo amend > expected.args &&
echo $oldsha $(git rev-parse HEAD^0) > expected.data &&
verify_hook_input
[master 1333da2] D new message
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 2 - git commit --amend
expecting success:
clear_hook_input &&
echo "D new message again" > newmsg &&
git commit --no-post-rewrite -Fnewmsg --amend &&
test ! -f post-rewrite.args &&
test ! -f post-rewrite.data
[master 18a65a5] D new message again
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
ok 3 - git commit --amend --no-post-rewrite
expecting success:
git reset --hard D &&
clear_hook_input &&
test_must_fail git rebase --onto A B &&
echo C > foo &&
git add foo &&
git rebase --continue &&
echo rebase >expected.args &&
cat >expected.data <<-EOF &&
$(git rev-parse C) $(git rev-parse HEAD^)
$(git rev-parse D) $(git rev-parse HEAD)
EOF
verify_hook_input
HEAD is now at babc8a4 D
First, rewinding head to replay your work on top of it...
Applying: C
Using index info to reconstruct a base tree...
M foo
Falling back to patching base and 3-way merge...
Merging:
be6e19b A
virtual C
found 1 common ancestor:
virtual e6a635ee70776f6585de405639ebebd74da5c390
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 C
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Applying: C
Applying: D
ok 4 - git rebase
expecting success:
git reset --hard D &&
clear_hook_input &&
test_must_fail git rebase --onto A B &&
test_must_fail git rebase --skip &&
echo D > foo &&
git add foo &&
git rebase --continue &&
echo rebase >expected.args &&
cat >expected.data <<-EOF &&
$(git rev-parse C) $(git rev-parse HEAD^)
$(git rev-parse D) $(git rev-parse HEAD)
EOF
verify_hook_input
HEAD is now at babc8a4 D
First, rewinding head to replay your work on top of it...
Applying: C
Using index info to reconstruct a base tree...
M foo
Falling back to patching base and 3-way merge...
Merging:
be6e19b A
virtual C
found 1 common ancestor:
virtual e6a635ee70776f6585de405639ebebd74da5c390
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 C
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Applying: D
Using index info to reconstruct a base tree...
M foo
Falling back to patching base and 3-way merge...
Merging:
be6e19b A
virtual D
found 1 common ancestor:
virtual a0d64960e32dc5d0cf8eff7ded11a413a31c0891
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0002 D
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Applying: D
ok 5 - git rebase --skip
expecting success:
git reset --hard F &&
clear_hook_input &&
test_must_fail git rebase --onto D A &&
git rebase --skip &&
echo rebase >expected.args &&
cat >expected.data <<-EOF &&
$(git rev-parse E) $(git rev-parse HEAD)
$(git rev-parse F) $(git rev-parse HEAD)
EOF
verify_hook_input
HEAD is now at 38c24e8 F
First, rewinding head to replay your work on top of it...
Applying: E
Applying: F
Using index info to reconstruct a base tree...
M foo
Falling back to patching base and 3-way merge...
Merging:
726c769 E
virtual F
found 1 common ancestor:
virtual bdb58bd8ea55127260d069a5e7ee2995726633f9
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0002 F
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
ok 6 - git rebase --skip the last one
expecting success:
git reset --hard D &&
clear_hook_input &&
test_must_fail git rebase -m --onto A B &&
echo C > foo &&
git add foo &&
git rebase --continue &&
echo rebase >expected.args &&
cat >expected.data <<-EOF &&
$(git rev-parse C) $(git rev-parse HEAD^)
$(git rev-parse D) $(git rev-parse HEAD)
EOF
verify_hook_input
HEAD is now at babc8a4 D
Rebasing (1/2)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 2362ae8... C
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 2362ae8... C
[detached HEAD bd57595] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
Successfully rebased and updated refs/heads/master.
ok 7 - git rebase -m
expecting success:
git reset --hard D &&
clear_hook_input &&
test_must_fail git rebase -m --onto A B &&
test_must_fail git rebase --skip &&
echo D > foo &&
git add foo &&
git rebase --continue &&
echo rebase >expected.args &&
cat >expected.data <<-EOF &&
$(git rev-parse C) $(git rev-parse HEAD^)
$(git rev-parse D) $(git rev-parse HEAD)
EOF
verify_hook_input
HEAD is now at babc8a4 D
Rebasing (1/2)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 2362ae8... C
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 2362ae8... C
Rebasing (2/2)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply babc8a4... D
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply babc8a4... D
[detached HEAD a087d55] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/master.
ok 8 - git rebase -m --skip
expecting success:
git reset --hard D &&
clear_hook_input &&
test_must_fail git rebase --keep-empty --onto A B &&
echo C > foo &&
git add foo &&
git rebase --continue &&
echo rebase >expected.args &&
cat >expected.data <<-EOF &&
$(git rev-parse C) $(git rev-parse HEAD^)
$(git rev-parse D) $(git rev-parse HEAD)
EOF
verify_hook_input
HEAD is now at babc8a4 D
Rebasing (1/2)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 2362ae8... C
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 2362ae8... C
[detached HEAD bd57595] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
Successfully rebased and updated refs/heads/master.
ok 9 - git rebase with implicit use of interactive backend
expecting success:
git reset --hard D &&
clear_hook_input &&
test_must_fail git rebase --keep-empty --onto A B &&
test_must_fail git rebase --skip &&
echo D > foo &&
git add foo &&
git rebase --continue &&
echo rebase >expected.args &&
cat >expected.data <<-EOF &&
$(git rev-parse C) $(git rev-parse HEAD^)
$(git rev-parse D) $(git rev-parse HEAD)
EOF
verify_hook_input
HEAD is now at babc8a4 D
Rebasing (1/2)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 2362ae8... C
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 2362ae8... C
Rebasing (2/2)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply babc8a4... D
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply babc8a4... D
[detached HEAD a087d55] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/master.
ok 10 - git rebase --skip with implicit use of interactive backend
expecting success:
git reset --hard D &&
clear_hook_input &&
test_fail_interactive_rebase "1 2" --onto A B &&
echo C > foo &&
git add foo &&
git rebase --continue &&
echo rebase >expected.args &&
cat >expected.data <<-EOF &&
$(git rev-parse C) $(git rev-parse HEAD^)
$(git rev-parse D) $(git rev-parse HEAD)
EOF
verify_hook_input
HEAD is now at babc8a4 D
rebase -i script before editing:
pick 2362ae8 C
pick babc8a4 D
rebase -i script after editing:
pick 2362ae8 C
pick babc8a4 D
Rebasing (1/2)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 2362ae8... C
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 2362ae8... C
[detached HEAD bd57595] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
Successfully rebased and updated refs/heads/master.
ok 11 - git rebase -i (unchanged)
expecting success:
git reset --hard D &&
clear_hook_input &&
test_fail_interactive_rebase "2" --onto A B &&
echo D > foo &&
git add foo &&
git rebase --continue &&
echo rebase >expected.args &&
cat >expected.data <<-EOF &&
$(git rev-parse D) $(git rev-parse HEAD)
EOF
verify_hook_input
HEAD is now at babc8a4 D
rebase -i script before editing:
pick 2362ae8 C
pick babc8a4 D
rebase -i script after editing:
pick babc8a4 D
Rebasing (1/1)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply babc8a4... D
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply babc8a4... D
[detached HEAD a087d55] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/master.
ok 12 - git rebase -i (skip)
expecting success:
git reset --hard D &&
clear_hook_input &&
test_fail_interactive_rebase "1 squash 2" --onto A B &&
echo C > foo &&
git add foo &&
git rebase --continue &&
echo rebase >expected.args &&
cat >expected.data <<-EOF &&
$(git rev-parse C) $(git rev-parse HEAD)
$(git rev-parse D) $(git rev-parse HEAD)
EOF
verify_hook_input
HEAD is now at babc8a4 D
rebase -i script before editing:
pick 2362ae8 C
pick babc8a4 D
rebase -i script after editing:
pick 2362ae8 C
squash babc8a4 D
Rebasing (1/2)
Auto-merging foo
CONFLICT (content): Merge conflict in foo
error: could not apply 2362ae8... C
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 2362ae8... C
[detached HEAD bd57595] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rebasing (2/2)
[detached HEAD 341a9e4] C
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/master.
ok 13 - git rebase -i (squash)
expecting success:
git reset --hard D &&
clear_hook_input &&
FAKE_LINES="1 fixup 2" git rebase -i B &&
echo rebase >expected.args &&
cat >expected.data <<-EOF &&
$(git rev-parse C) $(git rev-parse HEAD)
$(git rev-parse D) $(git rev-parse HEAD)
EOF
verify_hook_input
HEAD is now at babc8a4 D
rebase -i script before editing:
pick 2362ae8 C
pick babc8a4 D
rebase -i script after editing:
pick 2362ae8 C
fixup babc8a4 D
Rebasing (2/2)
Successfully rebased and updated refs/heads/master.
ok 14 - git rebase -i (fixup without conflict)
expecting success:
git reset --hard D &&
clear_hook_input &&
FAKE_LINES="edit 1 edit 2" git rebase -i B &&
git rebase --continue &&
echo something > foo &&
git add foo &&
git rebase --continue &&
echo rebase >expected.args &&
cat >expected.data <<-EOF &&
$(git rev-parse C) $(git rev-parse HEAD^)
$(git rev-parse D) $(git rev-parse HEAD)
EOF
verify_hook_input
HEAD is now at babc8a4 D
rebase -i script before editing:
pick 2362ae8 C
pick babc8a4 D
rebase -i script after editing:
edit 2362ae8 C
edit babc8a4 D
Rebasing (1/2)
Stopped at 2362ae8... C
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
Rebasing (2/2)
Stopped at babc8a4... D
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
[detached HEAD 4d045be] D
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/master.
ok 15 - git rebase -i (double edit)
expecting success:
git reset --hard D &&
clear_hook_input &&
FAKE_LINES="edit 1 exec_false 2" git rebase -i B &&
echo something >bar &&
git add bar &&
# Fails because of exec false
test_must_fail git rebase --continue &&
git rebase --continue &&
echo rebase >expected.args &&
cat >expected.data <<-EOF &&
$(git rev-parse C) $(git rev-parse HEAD^)
$(git rev-parse D) $(git rev-parse HEAD)
EOF
verify_hook_input
HEAD is now at babc8a4 D
rebase -i script before editing:
pick 2362ae8 C
pick babc8a4 D
rebase -i script after editing:
edit 2362ae8 C
exec false
pick babc8a4 D
Rebasing (1/3)
Stopped at 2362ae8... C
You can amend the commit now, with
git commit --amend
Once you are satisfied with your changes, run
git rebase --continue
[detached HEAD 488028e] C
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 bar
Rebasing (2/3)
Executing: false
warning: execution failed: false
You can fix the problem, and then run
git rebase --continue
Rebasing (3/3)
Successfully rebased and updated refs/heads/master.
ok 16 - git rebase -i (exec)
# passed all 16 test(s)
1..16
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5400-send-pack.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5400-send-pack/.git/
expecting success:
test_tick &&
mkdir mozart mozart/is &&
echo "Commit #0" >mozart/is/pink &&
git update-index --add mozart/is/pink &&
tree=$(git write-tree) &&
commit=$(echo "Commit #0" | git commit-tree $tree) &&
zero=$commit &&
parent=$zero &&
i=0 &&
while test $i -le $cnt
do
i=$(($i+1)) &&
test_tick &&
echo "Commit #$i" >mozart/is/pink &&
git update-index --add mozart/is/pink &&
tree=$(git write-tree) &&
commit=$(echo "Commit #$i" | git commit-tree $tree -p $parent) &&
git update-ref refs/tags/commit$i $commit &&
parent=$commit || return 1
done &&
git update-ref HEAD "$commit" &&
git clone ./. victim &&
( cd victim && git config receive.denyCurrentBranch warn && git log ) &&
git update-ref HEAD "$zero" &&
parent=$zero &&
i=0 &&
while test $i -le $cnt
do
i=$(($i+1)) &&
test_tick &&
echo "Rebase #$i" >mozart/is/pink &&
git update-index --add mozart/is/pink &&
tree=$(git write-tree) &&
commit=$(echo "Rebase #$i" | git commit-tree $tree -p $parent) &&
git update-ref refs/tags/rebase$i $commit &&
parent=$commit || return 1
done &&
git update-ref HEAD "$commit" &&
echo Rebase &&
git log
Cloning into 'victim'...
done.
commit fbc850672173770f17d48f9f2dfcb286d30b70cb
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:18:13 2005 -0700
Commit #65
commit 940af75942cf34a9fc156d9dc79c8c370e4c3247
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:17:13 2005 -0700
Commit #64
commit 1fe3a3ebbeaddd1e503ee516a5433a8ebe097112
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:16:13 2005 -0700
Commit #63
commit 0c78ec36deec72f8c6d458db5b753249a5447dec
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:15:13 2005 -0700
Commit #62
commit 0ad1da14d02ef96f2c1cb8403952ffddeaaca439
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:14:13 2005 -0700
Commit #61
commit 15278e4b9b51ca8e00785fff5592d9ba7b8012ea
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:13:13 2005 -0700
Commit #60
commit d92539d97407cae3ac62cdd1992188ce96a04699
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:12:13 2005 -0700
Commit #59
commit eeddc69755cde0046432203191b431846124c36d
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:11:13 2005 -0700
Commit #58
commit 9481eb1cebd4e35080a85eaac0a389e436d174d9
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:10:13 2005 -0700
Commit #57
commit 9ab7d0c3f85908c1624cc58f67c236b2e5d53c5d
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:09:13 2005 -0700
Commit #56
commit 070f3c8d7d43c5b9df69498416664b994a36a3e7
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:08:13 2005 -0700
Commit #55
commit a2f3e1ffc14adb111494e37e857de5428da7230e
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:07:13 2005 -0700
Commit #54
commit 373ca332c114a8af8262474c0b750133d11c3467
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:06:13 2005 -0700
Commit #53
commit abddf6c6693561aed51ed7308754360720399450
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:05:13 2005 -0700
Commit #52
commit e9dc99c35123a1d9dd416eb32975f518f7e52776
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:04:13 2005 -0700
Commit #51
commit 3efc54f7bd18addc186e565f051c1f57ae499205
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:03:13 2005 -0700
Commit #50
commit 288f90defdf9f8fe6cafb95c4a53d41e3d2914bc
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:02:13 2005 -0700
Commit #49
commit 1dfae6503af0ff1c353be39162beb34744556d2d
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:01:13 2005 -0700
Commit #48
commit c21493faada856b0f2ac0b85de568ffd9f21ad09
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:00:13 2005 -0700
Commit #47
commit 0e48e7bf42f7c84d1039794461501f4d3e6bef59
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:59:13 2005 -0700
Commit #46
commit bb0ff093c62b37247e4b570e41e57fa123962ee8
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:58:13 2005 -0700
Commit #45
commit a2d17f74bfdf7acc0c40e3b228d57a4d68a9c01b
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:57:13 2005 -0700
Commit #44
commit cbac9fdcb0113800bc9ff62d8c1a0cfd61815b11
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:56:13 2005 -0700
Commit #43
commit 13eff776535a4d90e14a5ba1239e3bb094fce3ef
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:55:13 2005 -0700
Commit #42
commit b7592bd14654cc3f437db49791a176d29d3aa8f0
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:54:13 2005 -0700
Commit #41
commit 83b8bfc7c90441063b251721278b7e8f9c5a201a
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:53:13 2005 -0700
Commit #40
commit 0b9d55bbcb1a6033be38cb93b03d75e5a78f9c3f
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:52:13 2005 -0700
Commit #39
commit d453237bfb3140a104f4c3946b562e8b8e9cda13
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:51:13 2005 -0700
Commit #38
commit 63c4e0264b89e227660dc2fbd7fc8077627ab28e
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:50:13 2005 -0700
Commit #37
commit 5df897dfd4814feea01849f65e8fc3e81d72728f
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:49:13 2005 -0700
Commit #36
commit 5e2d0ff7bcf7c8973b325689dd3604bd01d6b075
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:48:13 2005 -0700
Commit #35
commit cbf881eb049d21325ff0fba1e98746e36f1d46a8
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:47:13 2005 -0700
Commit #34
commit b8a9eb0e7c8cff2ab2d65d53f5a568dc7b54d5b0
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:46:13 2005 -0700
Commit #33
commit 20db8c933b4ca134652d077a7a59a12f7653c3a4
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:45:13 2005 -0700
Commit #32
commit 738136f07b8bf1cff560dc0dbf4a18eee3b1de94
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:44:13 2005 -0700
Commit #31
commit dd3f1b3396477b30b131d10831090cd58add8a2f
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:43:13 2005 -0700
Commit #30
commit e7bbe70cb14feebd4d4ceada22d700e1bdcb301f
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:42:13 2005 -0700
Commit #29
commit 7c932743e94bd2239c435bf5645dccb051f3c5fe
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:41:13 2005 -0700
Commit #28
commit c3cca0936c775de13190616bf109b3992732f2e1
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:40:13 2005 -0700
Commit #27
commit 2eb3c6ccb3b91269a09de0d742aecfd52817f72f
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:39:13 2005 -0700
Commit #26
commit 0f219719c1472626b844e140343f904fa4972bcc
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:38:13 2005 -0700
Commit #25
commit 03c8ac629a12338cc02e81b17da6d7cb0e1a802b
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:37:13 2005 -0700
Commit #24
commit 99b081ae6f13358b2cff7faad1b3f2a4c347edad
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:36:13 2005 -0700
Commit #23
commit 7206ff76323748a074c19dacc097d2ed3b96bfb2
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:35:13 2005 -0700
Commit #22
commit 490ddb36dddfeffa7779829333c151cbbe9e7366
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:34:13 2005 -0700
Commit #21
commit a73206b2f61cdf7bf21c8138c9900794f0eab9a5
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:33:13 2005 -0700
Commit #20
commit 01e16b5ab9e14247c98de5452a4be588930371be
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:32:13 2005 -0700
Commit #19
commit 9c803e03a40e955e599e8ecb9131651832083f57
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:31:13 2005 -0700
Commit #18
commit 6fc6ec72c6ce78e654a775f4f659411294f1d4e6
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:30:13 2005 -0700
Commit #17
commit b601a967eeee6cb91b552c6e43b4bafdf2b1c7ac
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:29:13 2005 -0700
Commit #16
commit 1747235a5c3fa673cab96b05b46dd97adb0c00c8
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:28:13 2005 -0700
Commit #15
commit 26bc6342db340ab762645b0b3b83517623b4c675
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:27:13 2005 -0700
Commit #14
commit b2f646eca1878e3000b6ceabd81b60ce604cb41e
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:26:13 2005 -0700
Commit #13
commit be3e57a8ad8950e367abdb48fe904d3f965e96fa
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:25:13 2005 -0700
Commit #12
commit 838c59d0f1f2160aa980e1c58db52403effc9dc6
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:24:13 2005 -0700
Commit #11
commit 2d04f66a08825b9bd9631a379768ee94d9e35c94
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:23:13 2005 -0700
Commit #10
commit 3b4907bf685c7f5694fd51989e990218a5844ee6
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:22:13 2005 -0700
Commit #9
commit e87f17a34ce327a5cef1309626784bc0bcc74743
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:21:13 2005 -0700
Commit #8
commit b1248b7697c5ba5bd2099f38eee5728f05a07a2c
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:20:13 2005 -0700
Commit #7
commit a69e0e75ae4b3c7d5954f52f3dc1666d7facf114
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:19:13 2005 -0700
Commit #6
commit d2559a7d1598c17fb8259ed9c923a40f242edbd7
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:18:13 2005 -0700
Commit #5
commit c45f8a131dd92e17228868c96e1b0b0b07693331
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
Commit #4
commit 758f634f1b1a066097ec1ee3c9a4aedc0bfb3d46
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
Commit #3
commit 2285e440694323e1c325d1838d97abdecada8ade
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
Commit #2
commit b86cdba23d2682dd459133f2efac8ea660f1dd5b
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
Commit #1
commit e8d9fe63116478156180f7026f6c181cc60432c5
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
Commit #0
Rebase
commit b1a1c97e94b6388c108e195d28a3e89f00c81698
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:23:13 2005 -0700
Rebase #65
commit b1a473533f3c7654e6aabe20b868f403cc4542c4
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:22:13 2005 -0700
Rebase #64
commit b44d0fc2fa543aae48a3e88ca2d4bb69b0808618
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:21:13 2005 -0700
Rebase #63
commit bdb72969f88d60418acc3c5cb69f94a9254e4069
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:20:13 2005 -0700
Rebase #62
commit f4846c914d90426d0aa7d9ae8c617e23aeb7aadc
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:19:13 2005 -0700
Rebase #61
commit 5513d6a596bf3937f715bf4c4fa240dae08c1183
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:18:13 2005 -0700
Rebase #60
commit c17d7284cf4910e76deb07380fdb38db71d239c7
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:17:13 2005 -0700
Rebase #59
commit 61c422e7618c96824dffec2cbb0cc7ec1933e48e
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:16:13 2005 -0700
Rebase #58
commit 2d32b535df82e1d77ee22da27287e3a676723ef8
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:15:13 2005 -0700
Rebase #57
commit d8638fd41e1699aa201527ace01d2ba19815aceb
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:14:13 2005 -0700
Rebase #56
commit 04fe055c82dc9923f2be842c62ddf3325ed7e4c3
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:13:13 2005 -0700
Rebase #55
commit 8b3228b708d50b5e797bb375d97082ec7afeace4
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:12:13 2005 -0700
Rebase #54
commit 5f4c3fe8ed7e4d32b60d7abb0e2af50d1343cca0
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:11:13 2005 -0700
Rebase #53
commit 7f88d5e9d36769f5c9c65bcdd6b74456be65794b
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:10:13 2005 -0700
Rebase #52
commit 54fa0318009bc334ce8aa9a83e559582a15df921
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:09:13 2005 -0700
Rebase #51
commit 874533e6395fa245e3aad590c5b29b113c993d88
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:08:13 2005 -0700
Rebase #50
commit dc1211213cf96c29abb9e65856f42adb8ae87f44
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:07:13 2005 -0700
Rebase #49
commit ecc16305000cbf7e0e28eaefa037380923f54f2b
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:06:13 2005 -0700
Rebase #48
commit 22eb8b0dd79fa78df505878adb615b382c819795
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:05:13 2005 -0700
Rebase #47
commit e658f744975d593f1d768ae6a252466f3d6f542e
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:04:13 2005 -0700
Rebase #46
commit 927e9cfe3212295919b60727098c2bcba986c37e
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:03:13 2005 -0700
Rebase #45
commit 8c6450200d3f0d8d334e87e0d8a8277a2f791251
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:02:13 2005 -0700
Rebase #44
commit 63e19d3641a395e0933a71af193c8dab5ddf587a
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:01:13 2005 -0700
Rebase #43
commit dea9ca7996241bf8d256a6207334ab6cb0a2f16d
Author: A U Thor <author@example.com>
Date: Thu Apr 7 17:00:13 2005 -0700
Rebase #42
commit 026648f873caf2683546bb4a0bffc8293d8c2a73
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:59:13 2005 -0700
Rebase #41
commit 614287fbf62149f243db150a29195ddd2552620e
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:58:13 2005 -0700
Rebase #40
commit 796c2f217a5f8738534fbb7febc3879590747fc2
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:57:13 2005 -0700
Rebase #39
commit 5aaad3995be7c0de7d694ab11b764a400a4df57f
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:56:13 2005 -0700
Rebase #38
commit 313b77b49a4baf7c7fe8055753a71c38bdd38b47
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:55:13 2005 -0700
Rebase #37
commit a59332167314137eb8af8837e16115c9680e018e
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:54:13 2005 -0700
Rebase #36
commit 0ab0d27b1668006e073534c69e62685f0f9fc4ab
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:53:13 2005 -0700
Rebase #35
commit 43f966630635e7421592b1564d06becd4329fb7f
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:52:13 2005 -0700
Rebase #34
commit fe710d4f0305ee6cfcc29f08823ccc6a8eb2e78a
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:51:13 2005 -0700
Rebase #33
commit 58465df8a64cc8cf28c98afc18e920e03dad9ec8
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:50:13 2005 -0700
Rebase #32
commit 559f5ec230a71724d6ea3399c0216e52938cba74
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:49:13 2005 -0700
Rebase #31
commit 423868ae9fccf8a50212b69677d9fe252065eb3b
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:48:13 2005 -0700
Rebase #30
commit d02b87bdc1b8e96ed634d52ddefb6b7db693b84b
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:47:13 2005 -0700
Rebase #29
commit 04e55758ac35dc63f899b6c3d526b2b802cee7c9
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:46:13 2005 -0700
Rebase #28
commit be5fbd2f45796936f2cfa86bb4dffe5b95013f0e
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:45:13 2005 -0700
Rebase #27
commit 213212c4ff3f0e681db0e061ed02dcc2e3902374
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:44:13 2005 -0700
Rebase #26
commit 61a890331f2ecf786d50fa8248d4f86345569421
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:43:13 2005 -0700
Rebase #25
commit a1bfffeeeb67da7d9433dd5d4dcc2876badda7de
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:42:13 2005 -0700
Rebase #24
commit ade5cf07bd9f8a623762be2b83d5200fd4c23e78
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:41:13 2005 -0700
Rebase #23
commit 541aba44d5797d319874b1d242c491aecd70072e
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:40:13 2005 -0700
Rebase #22
commit 8ef186d480959ba1c1950497155e9db2bb5cf262
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:39:13 2005 -0700
Rebase #21
commit dd1cc8a79dd40f7d83223b2b2293062a17ed60ee
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:38:13 2005 -0700
Rebase #20
commit 60c8d8288c55de0f0dadd7f570f69a5bd9023e54
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:37:13 2005 -0700
Rebase #19
commit 2720bed4e6e3a6011714b76356527f5626a8b7bf
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:36:13 2005 -0700
Rebase #18
commit e4946f6736764ebcc7b4392c98b1916f37a8151c
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:35:13 2005 -0700
Rebase #17
commit f2a50e2577f679dd6edf5afa77fb0d331cf0e487
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:34:13 2005 -0700
Rebase #16
commit ba62d05c67970ca150478a6e204c07876eb45310
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:33:13 2005 -0700
Rebase #15
commit 16bbc537388506c6aa3568aec7a1c295ff664ad8
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:32:13 2005 -0700
Rebase #14
commit 8ae96d45eca9358820adedc310a2bc6ff331a3e7
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:31:13 2005 -0700
Rebase #13
commit 2557a8c044e16526b8261947e17623841a0d5a91
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:30:13 2005 -0700
Rebase #12
commit 3f1275e3115a421a76f0ccbd5dea35b7cf227ce9
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:29:13 2005 -0700
Rebase #11
commit 6d31feb4517418400c8f76a834f7cff206a2b1ab
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:28:13 2005 -0700
Rebase #10
commit 054728ce53143ed538a80cc1db2f91642848d9d8
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:27:13 2005 -0700
Rebase #9
commit dbee1ce0dbeb64756fba483e99628287182a0be1
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:26:13 2005 -0700
Rebase #8
commit d174cc1075a864f5db77014609f7f9af0240ed0c
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:25:13 2005 -0700
Rebase #7
commit 18b56d78fb5f32acd1d2a027c139cb14df278e1c
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:24:13 2005 -0700
Rebase #6
commit 754de5100e6921cb300704183c76e1c65e301beb
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:23:13 2005 -0700
Rebase #5
commit 9fe752390a117faf8d6f239358fa821b464ff14d
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:22:13 2005 -0700
Rebase #4
commit 3e9bfb9468271e1707c357a5018af569c2a676d4
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:21:13 2005 -0700
Rebase #3
commit d15adbaa5fdd6b03140db45c714342b2023152fa
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:20:13 2005 -0700
Rebase #2
commit 82c2bc152fd9f785c269098549562d289347b2f8
Author: A U Thor <author@example.com>
Date: Thu Apr 7 16:19:13 2005 -0700
Rebase #1
commit e8d9fe63116478156180f7026f6c181cc60432c5
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
Commit #0
ok 1 - setup
expecting success:
git repack -a -d &&
git prune
ok 2 - pack the source repository
expecting success:
(
cd victim &&
git repack -a -d &&
git prune
)
ok 3 - pack the destination repository
expecting success:
pushed_head=$(git rev-parse --verify master) &&
victim_orig=$(cd victim && git rev-parse --verify master) &&
test_must_fail git send-pack ./victim master &&
victim_head=$(cd victim && git rev-parse --verify master) &&
test "$victim_head" = "$victim_orig" &&
# this should update
git send-pack --force ./victim master &&
victim_head=$(cd victim && git rev-parse --verify master) &&
test "$victim_head" = "$pushed_head"
To ./victim
! [rejected] master -> master (non-fast-forward)
remote: warning: updating the current branch
To ./victim
+ fbc8506...b1a1c97 master -> master (forced update)
ok 4 - refuse pushing rewound head without --force
expecting success:
( cd victim && git branch extra master ) &&
git send-pack ./victim :extra master &&
( cd victim &&
test_must_fail git rev-parse --verify extra )
To ./victim
- [deleted] extra
fatal: Needed a single revision
ok 5 - push can be used to delete a ref
expecting success:
(
cd victim &&
test_might_fail git branch -D extra &&
git config receive.denyDeletes true &&
git branch extra master
) &&
test_must_fail git send-pack ./victim :extra master
error: branch 'extra' not found.
remote: error: denying ref deletion for refs/heads/extra
To ./victim
! [remote rejected] extra (deletion prohibited)
ok 6 - refuse deleting push with denyDeletes
expecting success:
(
cd victim &&
test_might_fail git branch -D extra &&
git config receive.denyDeletes true &&
git branch extra master
) &&
test_must_fail git -c receive.denyDeletes=false \
send-pack ./victim :extra master
Deleted branch extra (was b1a1c97).
remote: error: denying ref deletion for refs/heads/extra
To ./victim
! [remote rejected] extra (deletion prohibited)
ok 7 - cannot override denyDeletes with git -c send-pack
expecting success:
(
cd victim &&
test_might_fail git branch -D extra &&
git config receive.denyDeletes true &&
git branch extra master
) &&
git send-pack \
--receive-pack="git -c receive.denyDeletes=false receive-pack" \
./victim :extra master
Deleted branch extra (was b1a1c97).
To ./victim
- [deleted] extra
ok 8 - override denyDeletes with git -c receive-pack
expecting success:
(
cd victim &&
test_might_fail git branch -D extra &&
git config receive.denyNonFastforwards true
) &&
victim_orig=$(cd victim && git rev-parse --verify master) &&
test_must_fail git send-pack --force ./victim master^:master &&
victim_head=$(cd victim && git rev-parse --verify master) &&
test "$victim_orig" = "$victim_head"
error: branch 'extra' not found.
remote: warning: updating the current branch
remote: error: denying non-fast-forward refs/heads/master (you should pull first)
To ./victim
! [remote rejected] master^ -> master (non-fast-forward)
ok 9 - denyNonFastforwards trumps --force
expecting success:
# make sure we have at least 2 branches with different
# values, just to be thorough
git branch other-branch HEAD^ &&
git init --bare all.git &&
git send-pack --all all.git &&
git for-each-ref refs/heads >expect &&
git -C all.git for-each-ref refs/heads >actual &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5400-send-pack/all.git/
To all.git
* [new branch] master -> master
* [new branch] other-branch -> other-branch
ok 10 - send-pack --all sends all branches
expecting success:
mkdir parent &&
(
cd parent &&
git init && : >file && git add file && git commit -m add
) &&
git clone parent child &&
(
cd child && git push --all
) &&
(
cd parent &&
test -z "$(git for-each-ref refs/remotes/origin)"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5400-send-pack/parent/.git/
[master (root-commit) 9addffa] add
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
Cloning into 'child'...
done.
Everything up-to-date
ok 11 - push --all excludes remote-tracking hierarchy
expecting success:
rm -rf parent child &&
git init parent &&
(
# Setup a repo with 2 packs
cd parent &&
echo "Some text" >file.txt &&
git add . &&
git commit -m "Initial commit" &&
git repack -adl &&
echo "Some more text" >>file.txt &&
git commit -a -m "Second commit" &&
git repack
) &&
cp -R parent child &&
(
# Set the child to auto-pack if more than one pack exists
cd child &&
git config gc.autopacklimit 1 &&
git config gc.autodetach false &&
git branch test_auto_gc &&
# And create a file that follows the temporary object naming
# convention for the auto-gc to remove
: >.git/objects/tmp_test_object &&
test-tool chmtime =-1209601 .git/objects/tmp_test_object
) &&
(
cd parent &&
echo "Even more text" >>file.txt &&
git commit -a -m "Third commit" &&
git send-pack ../child HEAD:refs/heads/test_auto_gc
) &&
test ! -e child/.git/objects/tmp_test_object
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5400-send-pack/parent/.git/
[master (root-commit) bdeab67] Initial commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.txt
[master 5404fd0] Second commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 1f665f1] Third commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
To ../child
5404fd0..1f665f1 HEAD -> test_auto_gc
ok 12 - receive-pack runs auto-gc in remote repo
expecting success:
rewound_push_setup &&
parent_orig=$(cd parent && git rev-parse --verify master) &&
(
cd child &&
test_must_fail git send-pack ../parent \
refs/heads/master:refs/heads/master
) &&
parent_head=$(cd parent && git rev-parse --verify master) &&
test "$parent_orig" = "$parent_head" &&
(
cd child &&
git send-pack ../parent \
+refs/heads/master:refs/heads/master
) &&
parent_head=$(cd parent && git rev-parse --verify master) &&
child_head=$(cd child && git rev-parse --verify master) &&
test "$parent_head" = "$child_head"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5400-send-pack/parent/.git/
[master (root-commit) 14eeca9] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 43ab524] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Cloning into 'child'...
done.
HEAD is now at 14eeca9 one
To ../parent
! [rejected] master -> master (non-fast-forward)
remote: warning: updating the current branch
To ../parent
+ 43ab524...14eeca9 master -> master (forced update)
ok 13 - pushing explicit refspecs respects forcing
expecting success:
rewound_push_setup &&
parent_orig=$(cd parent && git rev-parse --verify master) &&
(
cd child &&
test_must_fail git send-pack ../parent \
"refs/heads/*:refs/heads/*"
) &&
parent_head=$(cd parent && git rev-parse --verify master) &&
test "$parent_orig" = "$parent_head" &&
(
cd child &&
git send-pack ../parent \
"+refs/heads/*:refs/heads/*"
) &&
parent_head=$(cd parent && git rev-parse --verify master) &&
child_head=$(cd child && git rev-parse --verify master) &&
test "$parent_head" = "$child_head"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5400-send-pack/parent/.git/
[master (root-commit) 14eeca9] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 43ab524] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Cloning into 'child'...
done.
HEAD is now at 14eeca9 one
To ../parent
! [rejected] master -> master (non-fast-forward)
remote: warning: updating the current branch
To ../parent
+ 43ab524...14eeca9 master -> master (forced update)
ok 14 - pushing wildcard refspecs respects forcing
expecting success:
rewound_push_setup &&
(
cd child &&
test_must_fail git send-pack ../parent :refs/heads/master 2>errs
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5400-send-pack/parent/.git/
[master (root-commit) 14eeca9] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 43ab524] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Cloning into 'child'...
done.
HEAD is now at 14eeca9 one
ok 15 - deny pushing to delete current branch
expecting success:
git init shared &&
git -C shared commit --allow-empty -m both &&
git clone -s shared fork &&
(
cd shared &&
git checkout -b only-shared &&
git commit --allow-empty -m only-shared &&
git update-ref refs/heads/foo HEAD
) &&
# Notable things in this expectation:
# - local refs are not de-duped
# - .have does not duplicate locals
# - .have does not duplicate itself
local=$(git -C fork rev-parse HEAD) &&
shared=$(git -C shared rev-parse only-shared) &&
cat >expect <<-EOF &&
$local refs/heads/master
$local refs/remotes/origin/HEAD
$local refs/remotes/origin/master
$shared .have
EOF
GIT_TRACE_PACKET=$(pwd)/trace GIT_TEST_PROTOCOL_VERSION= \
git push \
--receive-pack="unset GIT_TRACE_PACKET; git-receive-pack" \
fork HEAD:foo &&
extract_ref_advertisement <trace >refs &&
test_cmp expect refs
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5400-send-pack/shared/.git/
[master (root-commit) 5285e17] both
Author: A U Thor <author@example.com>
Cloning into 'fork'...
done.
Switched to a new branch 'only-shared'
[only-shared 53d9066] only-shared
Author: A U Thor <author@example.com>
To fork
* [new branch] HEAD -> foo
ok 16 - receive-pack de-dupes .have lines
# passed all 16 test(s)
1..16
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5501-fetch-push-alternates.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5501-fetch-push-alternates/.git/
expecting success:
(
git init original &&
cd original &&
i=0 &&
while test $i -le 100
do
echo "$i" >count &&
git add count &&
git commit -m "$i" || exit
i=$(($i + 1))
done
) &&
(
git clone --reference=original "file://$(pwd)/original" one &&
cd one &&
echo Z >count &&
git add count &&
git commit -m Z &&
count_objects >../one.count
) &&
A=$(pwd)/original/.git/objects &&
git init receiver &&
echo "$A" >receiver/.git/objects/info/alternates &&
git init fetcher &&
echo "$A" >fetcher/.git/objects/info/alternates
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5501-fetch-push-alternates/original/.git/
[master (root-commit) 9ce4e11] 0
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 count
[master a2067dc] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 2d6b3f4] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master d31be4c] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 58fe6b4] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 4397123] 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master ea24cdf] 6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master eb6fc92] 7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 0b7592c] 8
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master a18f13e] 9
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master e4affb5] 10
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 2809a08] 11
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 21db951] 12
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master d330582] 13
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master da9cd37] 14
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 9bf0565] 15
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 4521715] 16
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master f2e9d4d] 17
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 1850d10] 18
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master c6282cd] 19
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master cee7275] 20
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 9545c02] 21
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master a9ec2e0] 22
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 7b42aee] 23
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 1aac89d] 24
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master c6974f7] 25
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 022f7df] 26
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 96cdfd6] 27
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master b6531e5] 28
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 64ffc54] 29
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master f21dddf] 30
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master efa814c] 31
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 56425a2] 32
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 95a796f] 33
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 8324487] 34
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 330b4a9] 35
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 8515ca1] 36
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 5035967] 37
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 87b6774] 38
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 9f764ff] 39
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 19fbeba] 40
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master f820e7c] 41
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 5eb576a] 42
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 7cf0408] 43
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 4a6f3af] 44
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 3a4a7b2] 45
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 5fed5d2] 46
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 53bb7b5] 47
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master a54436e] 48
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master b3f7a3c] 49
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master a73bdb1] 50
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 2a61a5c] 51
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master a0b9e74] 52
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 48a26c8] 53
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 2fe91f3] 54
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 137762e] 55
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 11fcd14] 56
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 79608ca] 57
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master d2d37f0] 58
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master ee0e9cb] 59
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 63ee23e] 60
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master ca3deef] 61
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master fdc6346] 62
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master db4a24c] 63
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master a514bef] 64
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 7ad88cf] 65
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 85eb00f] 66
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 8da0e15] 67
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 1cffca1] 68
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 6dec867] 69
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 90e9181] 70
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master e7f2d4a] 71
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 203c538] 72
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master da9901e] 73
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 555e9f7] 74
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 504acc3] 75
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master f9e943f] 76
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master ad140d3] 77
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master f5b3b18] 78
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 86860e4] 79
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master e230a1f] 80
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 01656be] 81
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 015dc05] 82
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master eb072b2] 83
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 89d9ce9] 84
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 7ddf33c] 85
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 47175a6] 86
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 34d94ac] 87
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 4886dbc] 88
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 9ad03e3] 89
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 49857c0] 90
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master b61e003] 91
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 8b5b8dc] 92
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master f1000f5] 93
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 651fb73] 94
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master e7b9690] 95
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 56f2152] 96
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master b5fff08] 97
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 5f6f01f] 98
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master d69ed27] 99
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 292c812] 100
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Cloning into 'one'...
[master 807319b] Z
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5501-fetch-push-alternates/receiver/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5501-fetch-push-alternates/fetcher/.git/
ok 1 - setup
expecting success:
(
cd one &&
git push ../receiver master:refs/heads/it
) &&
(
cd receiver &&
count_objects >../receiver.count
) &&
test_cmp one.count receiver.count
To ../receiver
* [new branch] master -> it
ok 2 - pushing into a repository with the same alternate
expecting success:
(
cd fetcher &&
git fetch ../one master:refs/heads/it &&
count_objects >../fetcher.count
) &&
test_cmp one.count fetcher.count
From ../one
* [new branch] master -> it
ok 3 - fetching from a repository with the same alternate
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5502-quickfetch.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5502-quickfetch/.git/
expecting success:
test_tick &&
echo ichi >file &&
git add file &&
git commit -m initial &&
cnt=$( (
git count-objects | sed -e "s/ *objects,.*//"
) ) &&
test $cnt -eq 3
[master (root-commit) f3b89bf] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 1 - setup
expecting success:
(
mkdir cloned &&
cd cloned &&
git init-db &&
git remote add -f origin ..
) &&
cnt=$( (
cd cloned &&
git count-objects | sed -e "s/ *objects,.*//"
) ) &&
test $cnt -eq 3
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5502-quickfetch/cloned/.git/
Updating origin
From ..
* [new branch] master -> origin/master
ok 2 - clone without alternate
expecting success:
test_tick &&
echo ni >file &&
git commit -a -m second &&
cnt=$( (
git count-objects | sed -e "s/ *objects,.*//"
) ) &&
test $cnt -eq 6
[master 12e0958] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 3 - further commits in the original
expecting success:
git rev-list --objects HEAD |
git pack-objects --stdout |
(
cd cloned &&
git unpack-objects
) &&
cnt=$( (
cd cloned &&
git count-objects | sed -e "s/ *objects,.*//"
) ) &&
test $cnt -eq 6 &&
blob=$(git rev-parse HEAD:file | sed -e "s|..|&/|") &&
test -f "cloned/.git/objects/$blob" &&
rm -f "cloned/.git/objects/$blob" &&
cnt=$( (
cd cloned &&
git count-objects | sed -e "s/ *objects,.*//"
) ) &&
test $cnt -eq 5
ok 4 - copy commit and tree but not blob by hand
expecting success:
(
cd cloned &&
git fetch
) &&
cnt=$( (
cd cloned &&
git count-objects | sed -e "s/ *objects,.*//"
) ) &&
test $cnt -eq 6
From ..
f3b89bf..12e0958 master -> origin/master
ok 5 - quickfetch should not leave a corrupted repository
expecting success:
(
mkdir quickclone &&
cd quickclone &&
git init-db &&
(cd ../.git/objects && pwd) >.git/objects/info/alternates &&
git remote add origin .. &&
git fetch -k -k
) &&
obj_cnt=$( (
cd quickclone &&
git count-objects | sed -e "s/ *objects,.*//"
) ) &&
pck_cnt=$( (
cd quickclone &&
git count-objects -v | sed -n -e "/packs:/{
s/packs://
p
q
}"
) ) &&
origin_master=$( (
cd quickclone &&
git rev-parse origin/master
) ) &&
echo "loose objects: $obj_cnt, packfiles: $pck_cnt" &&
test $obj_cnt -eq 0 &&
test $pck_cnt -eq 0 &&
test z$origin_master = z$(git rev-parse master)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5502-quickfetch/quickclone/.git/
From ..
* [new branch] master -> origin/master
loose objects: 0, packfiles: 0
ok 6 - quickfetch should not copy from alternate
expecting success:
git gc &&
head=$(git rev-parse HEAD) &&
branchprefix="$head refs/heads/branch" &&
for i in 0 1 2 3 4 5 6 7 8 9; do
for j in 0 1 2 3 4 5 6 7 8 9; do
for k in 0 1 2 3 4 5 6 7 8 9; do
echo "$branchprefix$i$j$k" >> .git/packed-refs
done
done
done &&
(
cd cloned &&
git fetch &&
git fetch
)
From ..
* [new branch] branch000 -> origin/branch000
* [new branch] branch001 -> origin/branch001
* [new branch] branch002 -> origin/branch002
* [new branch] branch003 -> origin/branch003
* [new branch] branch004 -> origin/branch004
* [new branch] branch005 -> origin/branch005
* [new branch] branch006 -> origin/branch006
* [new branch] branch007 -> origin/branch007
* [new branch] branch008 -> origin/branch008
* [new branch] branch009 -> origin/branch009
* [new branch] branch010 -> origin/branch010
* [new branch] branch011 -> origin/branch011
* [new branch] branch012 -> origin/branch012
* [new branch] branch013 -> origin/branch013
* [new branch] branch014 -> origin/branch014
* [new branch] branch015 -> origin/branch015
* [new branch] branch016 -> origin/branch016
* [new branch] branch017 -> origin/branch017
* [new branch] branch018 -> origin/branch018
* [new branch] branch019 -> origin/branch019
* [new branch] branch020 -> origin/branch020
* [new branch] branch021 -> origin/branch021
* [new branch] branch022 -> origin/branch022
* [new branch] branch023 -> origin/branch023
* [new branch] branch024 -> origin/branch024
* [new branch] branch025 -> origin/branch025
* [new branch] branch026 -> origin/branch026
* [new branch] branch027 -> origin/branch027
* [new branch] branch028 -> origin/branch028
* [new branch] branch029 -> origin/branch029
* [new branch] branch030 -> origin/branch030
* [new branch] branch031 -> origin/branch031
* [new branch] branch032 -> origin/branch032
* [new branch] branch033 -> origin/branch033
* [new branch] branch034 -> origin/branch034
* [new branch] branch035 -> origin/branch035
* [new branch] branch036 -> origin/branch036
* [new branch] branch037 -> origin/branch037
* [new branch] branch038 -> origin/branch038
* [new branch] branch039 -> origin/branch039
* [new branch] branch040 -> origin/branch040
* [new branch] branch041 -> origin/branch041
* [new branch] branch042 -> origin/branch042
* [new branch] branch043 -> origin/branch043
* [new branch] branch044 -> origin/branch044
* [new branch] branch045 -> origin/branch045
* [new branch] branch046 -> origin/branch046
* [new branch] branch047 -> origin/branch047
* [new branch] branch048 -> origin/branch048
* [new branch] branch049 -> origin/branch049
* [new branch] branch050 -> origin/branch050
* [new branch] branch051 -> origin/branch051
* [new branch] branch052 -> origin/branch052
* [new branch] branch053 -> origin/branch053
* [new branch] branch054 -> origin/branch054
* [new branch] branch055 -> origin/branch055
* [new branch] branch056 -> origin/branch056
* [new branch] branch057 -> origin/branch057
* [new branch] branch058 -> origin/branch058
* [new branch] branch059 -> origin/branch059
* [new branch] branch060 -> origin/branch060
* [new branch] branch061 -> origin/branch061
* [new branch] branch062 -> origin/branch062
* [new branch] branch063 -> origin/branch063
* [new branch] branch064 -> origin/branch064
* [new branch] branch065 -> origin/branch065
* [new branch] branch066 -> origin/branch066
* [new branch] branch067 -> origin/branch067
* [new branch] branch068 -> origin/branch068
* [new branch] branch069 -> origin/branch069
* [new branch] branch070 -> origin/branch070
* [new branch] branch071 -> origin/branch071
* [new branch] branch072 -> origin/branch072
* [new branch] branch073 -> origin/branch073
* [new branch] branch074 -> origin/branch074
* [new branch] branch075 -> origin/branch075
* [new branch] branch076 -> origin/branch076
* [new branch] branch077 -> origin/branch077
* [new branch] branch078 -> origin/branch078
* [new branch] branch079 -> origin/branch079
* [new branch] branch080 -> origin/branch080
* [new branch] branch081 -> origin/branch081
* [new branch] branch082 -> origin/branch082
* [new branch] branch083 -> origin/branch083
* [new branch] branch084 -> origin/branch084
* [new branch] branch085 -> origin/branch085
* [new branch] branch086 -> origin/branch086
* [new branch] branch087 -> origin/branch087
* [new branch] branch088 -> origin/branch088
* [new branch] branch089 -> origin/branch089
* [new branch] branch090 -> origin/branch090
* [new branch] branch091 -> origin/branch091
* [new branch] branch092 -> origin/branch092
* [new branch] branch093 -> origin/branch093
* [new branch] branch094 -> origin/branch094
* [new branch] branch095 -> origin/branch095
* [new branch] branch096 -> origin/branch096
* [new branch] branch097 -> origin/branch097
* [new branch] branch098 -> origin/branch098
* [new branch] branch099 -> origin/branch099
* [new branch] branch100 -> origin/branch100
* [new branch] branch101 -> origin/branch101
* [new branch] branch102 -> origin/branch102
* [new branch] branch103 -> origin/branch103
* [new branch] branch104 -> origin/branch104
* [new branch] branch105 -> origin/branch105
* [new branch] branch106 -> origin/branch106
* [new branch] branch107 -> origin/branch107
* [new branch] branch108 -> origin/branch108
* [new branch] branch109 -> origin/branch109
* [new branch] branch110 -> origin/branch110
* [new branch] branch111 -> origin/branch111
* [new branch] branch112 -> origin/branch112
* [new branch] branch113 -> origin/branch113
* [new branch] branch114 -> origin/branch114
* [new branch] branch115 -> origin/branch115
* [new branch] branch116 -> origin/branch116
* [new branch] branch117 -> origin/branch117
* [new branch] branch118 -> origin/branch118
* [new branch] branch119 -> origin/branch119
* [new branch] branch120 -> origin/branch120
* [new branch] branch121 -> origin/branch121
* [new branch] branch122 -> origin/branch122
* [new branch] branch123 -> origin/branch123
* [new branch] branch124 -> origin/branch124
* [new branch] branch125 -> origin/branch125
* [new branch] branch126 -> origin/branch126
* [new branch] branch127 -> origin/branch127
* [new branch] branch128 -> origin/branch128
* [new branch] branch129 -> origin/branch129
* [new branch] branch130 -> origin/branch130
* [new branch] branch131 -> origin/branch131
* [new branch] branch132 -> origin/branch132
* [new branch] branch133 -> origin/branch133
* [new branch] branch134 -> origin/branch134
* [new branch] branch135 -> origin/branch135
* [new branch] branch136 -> origin/branch136
* [new branch] branch137 -> origin/branch137
* [new branch] branch138 -> origin/branch138
* [new branch] branch139 -> origin/branch139
* [new branch] branch140 -> origin/branch140
* [new branch] branch141 -> origin/branch141
* [new branch] branch142 -> origin/branch142
* [new branch] branch143 -> origin/branch143
* [new branch] branch144 -> origin/branch144
* [new branch] branch145 -> origin/branch145
* [new branch] branch146 -> origin/branch146
* [new branch] branch147 -> origin/branch147
* [new branch] branch148 -> origin/branch148
* [new branch] branch149 -> origin/branch149
* [new branch] branch150 -> origin/branch150
* [new branch] branch151 -> origin/branch151
* [new branch] branch152 -> origin/branch152
* [new branch] branch153 -> origin/branch153
* [new branch] branch154 -> origin/branch154
* [new branch] branch155 -> origin/branch155
* [new branch] branch156 -> origin/branch156
* [new branch] branch157 -> origin/branch157
* [new branch] branch158 -> origin/branch158
* [new branch] branch159 -> origin/branch159
* [new branch] branch160 -> origin/branch160
* [new branch] branch161 -> origin/branch161
* [new branch] branch162 -> origin/branch162
* [new branch] branch163 -> origin/branch163
* [new branch] branch164 -> origin/branch164
* [new branch] branch165 -> origin/branch165
* [new branch] branch166 -> origin/branch166
* [new branch] branch167 -> origin/branch167
* [new branch] branch168 -> origin/branch168
* [new branch] branch169 -> origin/branch169
* [new branch] branch170 -> origin/branch170
* [new branch] branch171 -> origin/branch171
* [new branch] branch172 -> origin/branch172
* [new branch] branch173 -> origin/branch173
* [new branch] branch174 -> origin/branch174
* [new branch] branch175 -> origin/branch175
* [new branch] branch176 -> origin/branch176
* [new branch] branch177 -> origin/branch177
* [new branch] branch178 -> origin/branch178
* [new branch] branch179 -> origin/branch179
* [new branch] branch180 -> origin/branch180
* [new branch] branch181 -> origin/branch181
* [new branch] branch182 -> origin/branch182
* [new branch] branch183 -> origin/branch183
* [new branch] branch184 -> origin/branch184
* [new branch] branch185 -> origin/branch185
* [new branch] branch186 -> origin/branch186
* [new branch] branch187 -> origin/branch187
* [new branch] branch188 -> origin/branch188
* [new branch] branch189 -> origin/branch189
* [new branch] branch190 -> origin/branch190
* [new branch] branch191 -> origin/branch191
* [new branch] branch192 -> origin/branch192
* [new branch] branch193 -> origin/branch193
* [new branch] branch194 -> origin/branch194
* [new branch] branch195 -> origin/branch195
* [new branch] branch196 -> origin/branch196
* [new branch] branch197 -> origin/branch197
* [new branch] branch198 -> origin/branch198
* [new branch] branch199 -> origin/branch199
* [new branch] branch200 -> origin/branch200
* [new branch] branch201 -> origin/branch201
* [new branch] branch202 -> origin/branch202
* [new branch] branch203 -> origin/branch203
* [new branch] branch204 -> origin/branch204
* [new branch] branch205 -> origin/branch205
* [new branch] branch206 -> origin/branch206
* [new branch] branch207 -> origin/branch207
* [new branch] branch208 -> origin/branch208
* [new branch] branch209 -> origin/branch209
* [new branch] branch210 -> origin/branch210
* [new branch] branch211 -> origin/branch211
* [new branch] branch212 -> origin/branch212
* [new branch] branch213 -> origin/branch213
* [new branch] branch214 -> origin/branch214
* [new branch] branch215 -> origin/branch215
* [new branch] branch216 -> origin/branch216
* [new branch] branch217 -> origin/branch217
* [new branch] branch218 -> origin/branch218
* [new branch] branch219 -> origin/branch219
* [new branch] branch220 -> origin/branch220
* [new branch] branch221 -> origin/branch221
* [new branch] branch222 -> origin/branch222
* [new branch] branch223 -> origin/branch223
* [new branch] branch224 -> origin/branch224
* [new branch] branch225 -> origin/branch225
* [new branch] branch226 -> origin/branch226
* [new branch] branch227 -> origin/branch227
* [new branch] branch228 -> origin/branch228
* [new branch] branch229 -> origin/branch229
* [new branch] branch230 -> origin/branch230
* [new branch] branch231 -> origin/branch231
* [new branch] branch232 -> origin/branch232
* [new branch] branch233 -> origin/branch233
* [new branch] branch234 -> origin/branch234
* [new branch] branch235 -> origin/branch235
* [new branch] branch236 -> origin/branch236
* [new branch] branch237 -> origin/branch237
* [new branch] branch238 -> origin/branch238
* [new branch] branch239 -> origin/branch239
* [new branch] branch240 -> origin/branch240
* [new branch] branch241 -> origin/branch241
* [new branch] branch242 -> origin/branch242
* [new branch] branch243 -> origin/branch243
* [new branch] branch244 -> origin/branch244
* [new branch] branch245 -> origin/branch245
* [new branch] branch246 -> origin/branch246
* [new branch] branch247 -> origin/branch247
* [new branch] branch248 -> origin/branch248
* [new branch] branch249 -> origin/branch249
* [new branch] branch250 -> origin/branch250
* [new branch] branch251 -> origin/branch251
* [new branch] branch252 -> origin/branch252
* [new branch] branch253 -> origin/branch253
* [new branch] branch254 -> origin/branch254
* [new branch] branch255 -> origin/branch255
* [new branch] branch256 -> origin/branch256
* [new branch] branch257 -> origin/branch257
* [new branch] branch258 -> origin/branch258
* [new branch] branch259 -> origin/branch259
* [new branch] branch260 -> origin/branch260
* [new branch] branch261 -> origin/branch261
* [new branch] branch262 -> origin/branch262
* [new branch] branch263 -> origin/branch263
* [new branch] branch264 -> origin/branch264
* [new branch] branch265 -> origin/branch265
* [new branch] branch266 -> origin/branch266
* [new branch] branch267 -> origin/branch267
* [new branch] branch268 -> origin/branch268
* [new branch] branch269 -> origin/branch269
* [new branch] branch270 -> origin/branch270
* [new branch] branch271 -> origin/branch271
* [new branch] branch272 -> origin/branch272
* [new branch] branch273 -> origin/branch273
* [new branch] branch274 -> origin/branch274
* [new branch] branch275 -> origin/branch275
* [new branch] branch276 -> origin/branch276
* [new branch] branch277 -> origin/branch277
* [new branch] branch278 -> origin/branch278
* [new branch] branch279 -> origin/branch279
* [new branch] branch280 -> origin/branch280
* [new branch] branch281 -> origin/branch281
* [new branch] branch282 -> origin/branch282
* [new branch] branch283 -> origin/branch283
* [new branch] branch284 -> origin/branch284
* [new branch] branch285 -> origin/branch285
* [new branch] branch286 -> origin/branch286
* [new branch] branch287 -> origin/branch287
* [new branch] branch288 -> origin/branch288
* [new branch] branch289 -> origin/branch289
* [new branch] branch290 -> origin/branch290
* [new branch] branch291 -> origin/branch291
* [new branch] branch292 -> origin/branch292
* [new branch] branch293 -> origin/branch293
* [new branch] branch294 -> origin/branch294
* [new branch] branch295 -> origin/branch295
* [new branch] branch296 -> origin/branch296
* [new branch] branch297 -> origin/branch297
* [new branch] branch298 -> origin/branch298
* [new branch] branch299 -> origin/branch299
* [new branch] branch300 -> origin/branch300
* [new branch] branch301 -> origin/branch301
* [new branch] branch302 -> origin/branch302
* [new branch] branch303 -> origin/branch303
* [new branch] branch304 -> origin/branch304
* [new branch] branch305 -> origin/branch305
* [new branch] branch306 -> origin/branch306
* [new branch] branch307 -> origin/branch307
* [new branch] branch308 -> origin/branch308
* [new branch] branch309 -> origin/branch309
* [new branch] branch310 -> origin/branch310
* [new branch] branch311 -> origin/branch311
* [new branch] branch312 -> origin/branch312
* [new branch] branch313 -> origin/branch313
* [new branch] branch314 -> origin/branch314
* [new branch] branch315 -> origin/branch315
* [new branch] branch316 -> origin/branch316
* [new branch] branch317 -> origin/branch317
* [new branch] branch318 -> origin/branch318
* [new branch] branch319 -> origin/branch319
* [new branch] branch320 -> origin/branch320
* [new branch] branch321 -> origin/branch321
* [new branch] branch322 -> origin/branch322
* [new branch] branch323 -> origin/branch323
* [new branch] branch324 -> origin/branch324
* [new branch] branch325 -> origin/branch325
* [new branch] branch326 -> origin/branch326
* [new branch] branch327 -> origin/branch327
* [new branch] branch328 -> origin/branch328
* [new branch] branch329 -> origin/branch329
* [new branch] branch330 -> origin/branch330
* [new branch] branch331 -> origin/branch331
* [new branch] branch332 -> origin/branch332
* [new branch] branch333 -> origin/branch333
* [new branch] branch334 -> origin/branch334
* [new branch] branch335 -> origin/branch335
* [new branch] branch336 -> origin/branch336
* [new branch] branch337 -> origin/branch337
* [new branch] branch338 -> origin/branch338
* [new branch] branch339 -> origin/branch339
* [new branch] branch340 -> origin/branch340
* [new branch] branch341 -> origin/branch341
* [new branch] branch342 -> origin/branch342
* [new branch] branch343 -> origin/branch343
* [new branch] branch344 -> origin/branch344
* [new branch] branch345 -> origin/branch345
* [new branch] branch346 -> origin/branch346
* [new branch] branch347 -> origin/branch347
* [new branch] branch348 -> origin/branch348
* [new branch] branch349 -> origin/branch349
* [new branch] branch350 -> origin/branch350
* [new branch] branch351 -> origin/branch351
* [new branch] branch352 -> origin/branch352
* [new branch] branch353 -> origin/branch353
* [new branch] branch354 -> origin/branch354
* [new branch] branch355 -> origin/branch355
* [new branch] branch356 -> origin/branch356
* [new branch] branch357 -> origin/branch357
* [new branch] branch358 -> origin/branch358
* [new branch] branch359 -> origin/branch359
* [new branch] branch360 -> origin/branch360
* [new branch] branch361 -> origin/branch361
* [new branch] branch362 -> origin/branch362
* [new branch] branch363 -> origin/branch363
* [new branch] branch364 -> origin/branch364
* [new branch] branch365 -> origin/branch365
* [new branch] branch366 -> origin/branch366
* [new branch] branch367 -> origin/branch367
* [new branch] branch368 -> origin/branch368
* [new branch] branch369 -> origin/branch369
* [new branch] branch370 -> origin/branch370
* [new branch] branch371 -> origin/branch371
* [new branch] branch372 -> origin/branch372
* [new branch] branch373 -> origin/branch373
* [new branch] branch374 -> origin/branch374
* [new branch] branch375 -> origin/branch375
* [new branch] branch376 -> origin/branch376
* [new branch] branch377 -> origin/branch377
* [new branch] branch378 -> origin/branch378
* [new branch] branch379 -> origin/branch379
* [new branch] branch380 -> origin/branch380
* [new branch] branch381 -> origin/branch381
* [new branch] branch382 -> origin/branch382
* [new branch] branch383 -> origin/branch383
* [new branch] branch384 -> origin/branch384
* [new branch] branch385 -> origin/branch385
* [new branch] branch386 -> origin/branch386
* [new branch] branch387 -> origin/branch387
* [new branch] branch388 -> origin/branch388
* [new branch] branch389 -> origin/branch389
* [new branch] branch390 -> origin/branch390
* [new branch] branch391 -> origin/branch391
* [new branch] branch392 -> origin/branch392
* [new branch] branch393 -> origin/branch393
* [new branch] branch394 -> origin/branch394
* [new branch] branch395 -> origin/branch395
* [new branch] branch396 -> origin/branch396
* [new branch] branch397 -> origin/branch397
* [new branch] branch398 -> origin/branch398
* [new branch] branch399 -> origin/branch399
* [new branch] branch400 -> origin/branch400
* [new branch] branch401 -> origin/branch401
* [new branch] branch402 -> origin/branch402
* [new branch] branch403 -> origin/branch403
* [new branch] branch404 -> origin/branch404
* [new branch] branch405 -> origin/branch405
* [new branch] branch406 -> origin/branch406
* [new branch] branch407 -> origin/branch407
* [new branch] branch408 -> origin/branch408
* [new branch] branch409 -> origin/branch409
* [new branch] branch410 -> origin/branch410
* [new branch] branch411 -> origin/branch411
* [new branch] branch412 -> origin/branch412
* [new branch] branch413 -> origin/branch413
* [new branch] branch414 -> origin/branch414
* [new branch] branch415 -> origin/branch415
* [new branch] branch416 -> origin/branch416
* [new branch] branch417 -> origin/branch417
* [new branch] branch418 -> origin/branch418
* [new branch] branch419 -> origin/branch419
* [new branch] branch420 -> origin/branch420
* [new branch] branch421 -> origin/branch421
* [new branch] branch422 -> origin/branch422
* [new branch] branch423 -> origin/branch423
* [new branch] branch424 -> origin/branch424
* [new branch] branch425 -> origin/branch425
* [new branch] branch426 -> origin/branch426
* [new branch] branch427 -> origin/branch427
* [new branch] branch428 -> origin/branch428
* [new branch] branch429 -> origin/branch429
* [new branch] branch430 -> origin/branch430
* [new branch] branch431 -> origin/branch431
* [new branch] branch432 -> origin/branch432
* [new branch] branch433 -> origin/branch433
* [new branch] branch434 -> origin/branch434
* [new branch] branch435 -> origin/branch435
* [new branch] branch436 -> origin/branch436
* [new branch] branch437 -> origin/branch437
* [new branch] branch438 -> origin/branch438
* [new branch] branch439 -> origin/branch439
* [new branch] branch440 -> origin/branch440
* [new branch] branch441 -> origin/branch441
* [new branch] branch442 -> origin/branch442
* [new branch] branch443 -> origin/branch443
* [new branch] branch444 -> origin/branch444
* [new branch] branch445 -> origin/branch445
* [new branch] branch446 -> origin/branch446
* [new branch] branch447 -> origin/branch447
* [new branch] branch448 -> origin/branch448
* [new branch] branch449 -> origin/branch449
* [new branch] branch450 -> origin/branch450
* [new branch] branch451 -> origin/branch451
* [new branch] branch452 -> origin/branch452
* [new branch] branch453 -> origin/branch453
* [new branch] branch454 -> origin/branch454
* [new branch] branch455 -> origin/branch455
* [new branch] branch456 -> origin/branch456
* [new branch] branch457 -> origin/branch457
* [new branch] branch458 -> origin/branch458
* [new branch] branch459 -> origin/branch459
* [new branch] branch460 -> origin/branch460
* [new branch] branch461 -> origin/branch461
* [new branch] branch462 -> origin/branch462
* [new branch] branch463 -> origin/branch463
* [new branch] branch464 -> origin/branch464
* [new branch] branch465 -> origin/branch465
* [new branch] branch466 -> origin/branch466
* [new branch] branch467 -> origin/branch467
* [new branch] branch468 -> origin/branch468
* [new branch] branch469 -> origin/branch469
* [new branch] branch470 -> origin/branch470
* [new branch] branch471 -> origin/branch471
* [new branch] branch472 -> origin/branch472
* [new branch] branch473 -> origin/branch473
* [new branch] branch474 -> origin/branch474
* [new branch] branch475 -> origin/branch475
* [new branch] branch476 -> origin/branch476
* [new branch] branch477 -> origin/branch477
* [new branch] branch478 -> origin/branch478
* [new branch] branch479 -> origin/branch479
* [new branch] branch480 -> origin/branch480
* [new branch] branch481 -> origin/branch481
* [new branch] branch482 -> origin/branch482
* [new branch] branch483 -> origin/branch483
* [new branch] branch484 -> origin/branch484
* [new branch] branch485 -> origin/branch485
* [new branch] branch486 -> origin/branch486
* [new branch] branch487 -> origin/branch487
* [new branch] branch488 -> origin/branch488
* [new branch] branch489 -> origin/branch489
* [new branch] branch490 -> origin/branch490
* [new branch] branch491 -> origin/branch491
* [new branch] branch492 -> origin/branch492
* [new branch] branch493 -> origin/branch493
* [new branch] branch494 -> origin/branch494
* [new branch] branch495 -> origin/branch495
* [new branch] branch496 -> origin/branch496
* [new branch] branch497 -> origin/branch497
* [new branch] branch498 -> origin/branch498
* [new branch] branch499 -> origin/branch499
* [new branch] branch500 -> origin/branch500
* [new branch] branch501 -> origin/branch501
* [new branch] branch502 -> origin/branch502
* [new branch] branch503 -> origin/branch503
* [new branch] branch504 -> origin/branch504
* [new branch] branch505 -> origin/branch505
* [new branch] branch506 -> origin/branch506
* [new branch] branch507 -> origin/branch507
* [new branch] branch508 -> origin/branch508
* [new branch] branch509 -> origin/branch509
* [new branch] branch510 -> origin/branch510
* [new branch] branch511 -> origin/branch511
* [new branch] branch512 -> origin/branch512
* [new branch] branch513 -> origin/branch513
* [new branch] branch514 -> origin/branch514
* [new branch] branch515 -> origin/branch515
* [new branch] branch516 -> origin/branch516
* [new branch] branch517 -> origin/branch517
* [new branch] branch518 -> origin/branch518
* [new branch] branch519 -> origin/branch519
* [new branch] branch520 -> origin/branch520
* [new branch] branch521 -> origin/branch521
* [new branch] branch522 -> origin/branch522
* [new branch] branch523 -> origin/branch523
* [new branch] branch524 -> origin/branch524
* [new branch] branch525 -> origin/branch525
* [new branch] branch526 -> origin/branch526
* [new branch] branch527 -> origin/branch527
* [new branch] branch528 -> origin/branch528
* [new branch] branch529 -> origin/branch529
* [new branch] branch530 -> origin/branch530
* [new branch] branch531 -> origin/branch531
* [new branch] branch532 -> origin/branch532
* [new branch] branch533 -> origin/branch533
* [new branch] branch534 -> origin/branch534
* [new branch] branch535 -> origin/branch535
* [new branch] branch536 -> origin/branch536
* [new branch] branch537 -> origin/branch537
* [new branch] branch538 -> origin/branch538
* [new branch] branch539 -> origin/branch539
* [new branch] branch540 -> origin/branch540
* [new branch] branch541 -> origin/branch541
* [new branch] branch542 -> origin/branch542
* [new branch] branch543 -> origin/branch543
* [new branch] branch544 -> origin/branch544
* [new branch] branch545 -> origin/branch545
* [new branch] branch546 -> origin/branch546
* [new branch] branch547 -> origin/branch547
* [new branch] branch548 -> origin/branch548
* [new branch] branch549 -> origin/branch549
* [new branch] branch550 -> origin/branch550
* [new branch] branch551 -> origin/branch551
* [new branch] branch552 -> origin/branch552
* [new branch] branch553 -> origin/branch553
* [new branch] branch554 -> origin/branch554
* [new branch] branch555 -> origin/branch555
* [new branch] branch556 -> origin/branch556
* [new branch] branch557 -> origin/branch557
* [new branch] branch558 -> origin/branch558
* [new branch] branch559 -> origin/branch559
* [new branch] branch560 -> origin/branch560
* [new branch] branch561 -> origin/branch561
* [new branch] branch562 -> origin/branch562
* [new branch] branch563 -> origin/branch563
* [new branch] branch564 -> origin/branch564
* [new branch] branch565 -> origin/branch565
* [new branch] branch566 -> origin/branch566
* [new branch] branch567 -> origin/branch567
* [new branch] branch568 -> origin/branch568
* [new branch] branch569 -> origin/branch569
* [new branch] branch570 -> origin/branch570
* [new branch] branch571 -> origin/branch571
* [new branch] branch572 -> origin/branch572
* [new branch] branch573 -> origin/branch573
* [new branch] branch574 -> origin/branch574
* [new branch] branch575 -> origin/branch575
* [new branch] branch576 -> origin/branch576
* [new branch] branch577 -> origin/branch577
* [new branch] branch578 -> origin/branch578
* [new branch] branch579 -> origin/branch579
* [new branch] branch580 -> origin/branch580
* [new branch] branch581 -> origin/branch581
* [new branch] branch582 -> origin/branch582
* [new branch] branch583 -> origin/branch583
* [new branch] branch584 -> origin/branch584
* [new branch] branch585 -> origin/branch585
* [new branch] branch586 -> origin/branch586
* [new branch] branch587 -> origin/branch587
* [new branch] branch588 -> origin/branch588
* [new branch] branch589 -> origin/branch589
* [new branch] branch590 -> origin/branch590
* [new branch] branch591 -> origin/branch591
* [new branch] branch592 -> origin/branch592
* [new branch] branch593 -> origin/branch593
* [new branch] branch594 -> origin/branch594
* [new branch] branch595 -> origin/branch595
* [new branch] branch596 -> origin/branch596
* [new branch] branch597 -> origin/branch597
* [new branch] branch598 -> origin/branch598
* [new branch] branch599 -> origin/branch599
* [new branch] branch600 -> origin/branch600
* [new branch] branch601 -> origin/branch601
* [new branch] branch602 -> origin/branch602
* [new branch] branch603 -> origin/branch603
* [new branch] branch604 -> origin/branch604
* [new branch] branch605 -> origin/branch605
* [new branch] branch606 -> origin/branch606
* [new branch] branch607 -> origin/branch607
* [new branch] branch608 -> origin/branch608
* [new branch] branch609 -> origin/branch609
* [new branch] branch610 -> origin/branch610
* [new branch] branch611 -> origin/branch611
* [new branch] branch612 -> origin/branch612
* [new branch] branch613 -> origin/branch613
* [new branch] branch614 -> origin/branch614
* [new branch] branch615 -> origin/branch615
* [new branch] branch616 -> origin/branch616
* [new branch] branch617 -> origin/branch617
* [new branch] branch618 -> origin/branch618
* [new branch] branch619 -> origin/branch619
* [new branch] branch620 -> origin/branch620
* [new branch] branch621 -> origin/branch621
* [new branch] branch622 -> origin/branch622
* [new branch] branch623 -> origin/branch623
* [new branch] branch624 -> origin/branch624
* [new branch] branch625 -> origin/branch625
* [new branch] branch626 -> origin/branch626
* [new branch] branch627 -> origin/branch627
* [new branch] branch628 -> origin/branch628
* [new branch] branch629 -> origin/branch629
* [new branch] branch630 -> origin/branch630
* [new branch] branch631 -> origin/branch631
* [new branch] branch632 -> origin/branch632
* [new branch] branch633 -> origin/branch633
* [new branch] branch634 -> origin/branch634
* [new branch] branch635 -> origin/branch635
* [new branch] branch636 -> origin/branch636
* [new branch] branch637 -> origin/branch637
* [new branch] branch638 -> origin/branch638
* [new branch] branch639 -> origin/branch639
* [new branch] branch640 -> origin/branch640
* [new branch] branch641 -> origin/branch641
* [new branch] branch642 -> origin/branch642
* [new branch] branch643 -> origin/branch643
* [new branch] branch644 -> origin/branch644
* [new branch] branch645 -> origin/branch645
* [new branch] branch646 -> origin/branch646
* [new branch] branch647 -> origin/branch647
* [new branch] branch648 -> origin/branch648
* [new branch] branch649 -> origin/branch649
* [new branch] branch650 -> origin/branch650
* [new branch] branch651 -> origin/branch651
* [new branch] branch652 -> origin/branch652
* [new branch] branch653 -> origin/branch653
* [new branch] branch654 -> origin/branch654
* [new branch] branch655 -> origin/branch655
* [new branch] branch656 -> origin/branch656
* [new branch] branch657 -> origin/branch657
* [new branch] branch658 -> origin/branch658
* [new branch] branch659 -> origin/branch659
* [new branch] branch660 -> origin/branch660
* [new branch] branch661 -> origin/branch661
* [new branch] branch662 -> origin/branch662
* [new branch] branch663 -> origin/branch663
* [new branch] branch664 -> origin/branch664
* [new branch] branch665 -> origin/branch665
* [new branch] branch666 -> origin/branch666
* [new branch] branch667 -> origin/branch667
* [new branch] branch668 -> origin/branch668
* [new branch] branch669 -> origin/branch669
* [new branch] branch670 -> origin/branch670
* [new branch] branch671 -> origin/branch671
* [new branch] branch672 -> origin/branch672
* [new branch] branch673 -> origin/branch673
* [new branch] branch674 -> origin/branch674
* [new branch] branch675 -> origin/branch675
* [new branch] branch676 -> origin/branch676
* [new branch] branch677 -> origin/branch677
* [new branch] branch678 -> origin/branch678
* [new branch] branch679 -> origin/branch679
* [new branch] branch680 -> origin/branch680
* [new branch] branch681 -> origin/branch681
* [new branch] branch682 -> origin/branch682
* [new branch] branch683 -> origin/branch683
* [new branch] branch684 -> origin/branch684
* [new branch] branch685 -> origin/branch685
* [new branch] branch686 -> origin/branch686
* [new branch] branch687 -> origin/branch687
* [new branch] branch688 -> origin/branch688
* [new branch] branch689 -> origin/branch689
* [new branch] branch690 -> origin/branch690
* [new branch] branch691 -> origin/branch691
* [new branch] branch692 -> origin/branch692
* [new branch] branch693 -> origin/branch693
* [new branch] branch694 -> origin/branch694
* [new branch] branch695 -> origin/branch695
* [new branch] branch696 -> origin/branch696
* [new branch] branch697 -> origin/branch697
* [new branch] branch698 -> origin/branch698
* [new branch] branch699 -> origin/branch699
* [new branch] branch700 -> origin/branch700
* [new branch] branch701 -> origin/branch701
* [new branch] branch702 -> origin/branch702
* [new branch] branch703 -> origin/branch703
* [new branch] branch704 -> origin/branch704
* [new branch] branch705 -> origin/branch705
* [new branch] branch706 -> origin/branch706
* [new branch] branch707 -> origin/branch707
* [new branch] branch708 -> origin/branch708
* [new branch] branch709 -> origin/branch709
* [new branch] branch710 -> origin/branch710
* [new branch] branch711 -> origin/branch711
* [new branch] branch712 -> origin/branch712
* [new branch] branch713 -> origin/branch713
* [new branch] branch714 -> origin/branch714
* [new branch] branch715 -> origin/branch715
* [new branch] branch716 -> origin/branch716
* [new branch] branch717 -> origin/branch717
* [new branch] branch718 -> origin/branch718
* [new branch] branch719 -> origin/branch719
* [new branch] branch720 -> origin/branch720
* [new branch] branch721 -> origin/branch721
* [new branch] branch722 -> origin/branch722
* [new branch] branch723 -> origin/branch723
* [new branch] branch724 -> origin/branch724
* [new branch] branch725 -> origin/branch725
* [new branch] branch726 -> origin/branch726
* [new branch] branch727 -> origin/branch727
* [new branch] branch728 -> origin/branch728
* [new branch] branch729 -> origin/branch729
* [new branch] branch730 -> origin/branch730
* [new branch] branch731 -> origin/branch731
* [new branch] branch732 -> origin/branch732
* [new branch] branch733 -> origin/branch733
* [new branch] branch734 -> origin/branch734
* [new branch] branch735 -> origin/branch735
* [new branch] branch736 -> origin/branch736
* [new branch] branch737 -> origin/branch737
* [new branch] branch738 -> origin/branch738
* [new branch] branch739 -> origin/branch739
* [new branch] branch740 -> origin/branch740
* [new branch] branch741 -> origin/branch741
* [new branch] branch742 -> origin/branch742
* [new branch] branch743 -> origin/branch743
* [new branch] branch744 -> origin/branch744
* [new branch] branch745 -> origin/branch745
* [new branch] branch746 -> origin/branch746
* [new branch] branch747 -> origin/branch747
* [new branch] branch748 -> origin/branch748
* [new branch] branch749 -> origin/branch749
* [new branch] branch750 -> origin/branch750
* [new branch] branch751 -> origin/branch751
* [new branch] branch752 -> origin/branch752
* [new branch] branch753 -> origin/branch753
* [new branch] branch754 -> origin/branch754
* [new branch] branch755 -> origin/branch755
* [new branch] branch756 -> origin/branch756
* [new branch] branch757 -> origin/branch757
* [new branch] branch758 -> origin/branch758
* [new branch] branch759 -> origin/branch759
* [new branch] branch760 -> origin/branch760
* [new branch] branch761 -> origin/branch761
* [new branch] branch762 -> origin/branch762
* [new branch] branch763 -> origin/branch763
* [new branch] branch764 -> origin/branch764
* [new branch] branch765 -> origin/branch765
* [new branch] branch766 -> origin/branch766
* [new branch] branch767 -> origin/branch767
* [new branch] branch768 -> origin/branch768
* [new branch] branch769 -> origin/branch769
* [new branch] branch770 -> origin/branch770
* [new branch] branch771 -> origin/branch771
* [new branch] branch772 -> origin/branch772
* [new branch] branch773 -> origin/branch773
* [new branch] branch774 -> origin/branch774
* [new branch] branch775 -> origin/branch775
* [new branch] branch776 -> origin/branch776
* [new branch] branch777 -> origin/branch777
* [new branch] branch778 -> origin/branch778
* [new branch] branch779 -> origin/branch779
* [new branch] branch780 -> origin/branch780
* [new branch] branch781 -> origin/branch781
* [new branch] branch782 -> origin/branch782
* [new branch] branch783 -> origin/branch783
* [new branch] branch784 -> origin/branch784
* [new branch] branch785 -> origin/branch785
* [new branch] branch786 -> origin/branch786
* [new branch] branch787 -> origin/branch787
* [new branch] branch788 -> origin/branch788
* [new branch] branch789 -> origin/branch789
* [new branch] branch790 -> origin/branch790
* [new branch] branch791 -> origin/branch791
* [new branch] branch792 -> origin/branch792
* [new branch] branch793 -> origin/branch793
* [new branch] branch794 -> origin/branch794
* [new branch] branch795 -> origin/branch795
* [new branch] branch796 -> origin/branch796
* [new branch] branch797 -> origin/branch797
* [new branch] branch798 -> origin/branch798
* [new branch] branch799 -> origin/branch799
* [new branch] branch800 -> origin/branch800
* [new branch] branch801 -> origin/branch801
* [new branch] branch802 -> origin/branch802
* [new branch] branch803 -> origin/branch803
* [new branch] branch804 -> origin/branch804
* [new branch] branch805 -> origin/branch805
* [new branch] branch806 -> origin/branch806
* [new branch] branch807 -> origin/branch807
* [new branch] branch808 -> origin/branch808
* [new branch] branch809 -> origin/branch809
* [new branch] branch810 -> origin/branch810
* [new branch] branch811 -> origin/branch811
* [new branch] branch812 -> origin/branch812
* [new branch] branch813 -> origin/branch813
* [new branch] branch814 -> origin/branch814
* [new branch] branch815 -> origin/branch815
* [new branch] branch816 -> origin/branch816
* [new branch] branch817 -> origin/branch817
* [new branch] branch818 -> origin/branch818
* [new branch] branch819 -> origin/branch819
* [new branch] branch820 -> origin/branch820
* [new branch] branch821 -> origin/branch821
* [new branch] branch822 -> origin/branch822
* [new branch] branch823 -> origin/branch823
* [new branch] branch824 -> origin/branch824
* [new branch] branch825 -> origin/branch825
* [new branch] branch826 -> origin/branch826
* [new branch] branch827 -> origin/branch827
* [new branch] branch828 -> origin/branch828
* [new branch] branch829 -> origin/branch829
* [new branch] branch830 -> origin/branch830
* [new branch] branch831 -> origin/branch831
* [new branch] branch832 -> origin/branch832
* [new branch] branch833 -> origin/branch833
* [new branch] branch834 -> origin/branch834
* [new branch] branch835 -> origin/branch835
* [new branch] branch836 -> origin/branch836
* [new branch] branch837 -> origin/branch837
* [new branch] branch838 -> origin/branch838
* [new branch] branch839 -> origin/branch839
* [new branch] branch840 -> origin/branch840
* [new branch] branch841 -> origin/branch841
* [new branch] branch842 -> origin/branch842
* [new branch] branch843 -> origin/branch843
* [new branch] branch844 -> origin/branch844
* [new branch] branch845 -> origin/branch845
* [new branch] branch846 -> origin/branch846
* [new branch] branch847 -> origin/branch847
* [new branch] branch848 -> origin/branch848
* [new branch] branch849 -> origin/branch849
* [new branch] branch850 -> origin/branch850
* [new branch] branch851 -> origin/branch851
* [new branch] branch852 -> origin/branch852
* [new branch] branch853 -> origin/branch853
* [new branch] branch854 -> origin/branch854
* [new branch] branch855 -> origin/branch855
* [new branch] branch856 -> origin/branch856
* [new branch] branch857 -> origin/branch857
* [new branch] branch858 -> origin/branch858
* [new branch] branch859 -> origin/branch859
* [new branch] branch860 -> origin/branch860
* [new branch] branch861 -> origin/branch861
* [new branch] branch862 -> origin/branch862
* [new branch] branch863 -> origin/branch863
* [new branch] branch864 -> origin/branch864
* [new branch] branch865 -> origin/branch865
* [new branch] branch866 -> origin/branch866
* [new branch] branch867 -> origin/branch867
* [new branch] branch868 -> origin/branch868
* [new branch] branch869 -> origin/branch869
* [new branch] branch870 -> origin/branch870
* [new branch] branch871 -> origin/branch871
* [new branch] branch872 -> origin/branch872
* [new branch] branch873 -> origin/branch873
* [new branch] branch874 -> origin/branch874
* [new branch] branch875 -> origin/branch875
* [new branch] branch876 -> origin/branch876
* [new branch] branch877 -> origin/branch877
* [new branch] branch878 -> origin/branch878
* [new branch] branch879 -> origin/branch879
* [new branch] branch880 -> origin/branch880
* [new branch] branch881 -> origin/branch881
* [new branch] branch882 -> origin/branch882
* [new branch] branch883 -> origin/branch883
* [new branch] branch884 -> origin/branch884
* [new branch] branch885 -> origin/branch885
* [new branch] branch886 -> origin/branch886
* [new branch] branch887 -> origin/branch887
* [new branch] branch888 -> origin/branch888
* [new branch] branch889 -> origin/branch889
* [new branch] branch890 -> origin/branch890
* [new branch] branch891 -> origin/branch891
* [new branch] branch892 -> origin/branch892
* [new branch] branch893 -> origin/branch893
* [new branch] branch894 -> origin/branch894
* [new branch] branch895 -> origin/branch895
* [new branch] branch896 -> origin/branch896
* [new branch] branch897 -> origin/branch897
* [new branch] branch898 -> origin/branch898
* [new branch] branch899 -> origin/branch899
* [new branch] branch900 -> origin/branch900
* [new branch] branch901 -> origin/branch901
* [new branch] branch902 -> origin/branch902
* [new branch] branch903 -> origin/branch903
* [new branch] branch904 -> origin/branch904
* [new branch] branch905 -> origin/branch905
* [new branch] branch906 -> origin/branch906
* [new branch] branch907 -> origin/branch907
* [new branch] branch908 -> origin/branch908
* [new branch] branch909 -> origin/branch909
* [new branch] branch910 -> origin/branch910
* [new branch] branch911 -> origin/branch911
* [new branch] branch912 -> origin/branch912
* [new branch] branch913 -> origin/branch913
* [new branch] branch914 -> origin/branch914
* [new branch] branch915 -> origin/branch915
* [new branch] branch916 -> origin/branch916
* [new branch] branch917 -> origin/branch917
* [new branch] branch918 -> origin/branch918
* [new branch] branch919 -> origin/branch919
* [new branch] branch920 -> origin/branch920
* [new branch] branch921 -> origin/branch921
* [new branch] branch922 -> origin/branch922
* [new branch] branch923 -> origin/branch923
* [new branch] branch924 -> origin/branch924
* [new branch] branch925 -> origin/branch925
* [new branch] branch926 -> origin/branch926
* [new branch] branch927 -> origin/branch927
* [new branch] branch928 -> origin/branch928
* [new branch] branch929 -> origin/branch929
* [new branch] branch930 -> origin/branch930
* [new branch] branch931 -> origin/branch931
* [new branch] branch932 -> origin/branch932
* [new branch] branch933 -> origin/branch933
* [new branch] branch934 -> origin/branch934
* [new branch] branch935 -> origin/branch935
* [new branch] branch936 -> origin/branch936
* [new branch] branch937 -> origin/branch937
* [new branch] branch938 -> origin/branch938
* [new branch] branch939 -> origin/branch939
* [new branch] branch940 -> origin/branch940
* [new branch] branch941 -> origin/branch941
* [new branch] branch942 -> origin/branch942
* [new branch] branch943 -> origin/branch943
* [new branch] branch944 -> origin/branch944
* [new branch] branch945 -> origin/branch945
* [new branch] branch946 -> origin/branch946
* [new branch] branch947 -> origin/branch947
* [new branch] branch948 -> origin/branch948
* [new branch] branch949 -> origin/branch949
* [new branch] branch950 -> origin/branch950
* [new branch] branch951 -> origin/branch951
* [new branch] branch952 -> origin/branch952
* [new branch] branch953 -> origin/branch953
* [new branch] branch954 -> origin/branch954
* [new branch] branch955 -> origin/branch955
* [new branch] branch956 -> origin/branch956
* [new branch] branch957 -> origin/branch957
* [new branch] branch958 -> origin/branch958
* [new branch] branch959 -> origin/branch959
* [new branch] branch960 -> origin/branch960
* [new branch] branch961 -> origin/branch961
* [new branch] branch962 -> origin/branch962
* [new branch] branch963 -> origin/branch963
* [new branch] branch964 -> origin/branch964
* [new branch] branch965 -> origin/branch965
* [new branch] branch966 -> origin/branch966
* [new branch] branch967 -> origin/branch967
* [new branch] branch968 -> origin/branch968
* [new branch] branch969 -> origin/branch969
* [new branch] branch970 -> origin/branch970
* [new branch] branch971 -> origin/branch971
* [new branch] branch972 -> origin/branch972
* [new branch] branch973 -> origin/branch973
* [new branch] branch974 -> origin/branch974
* [new branch] branch975 -> origin/branch975
* [new branch] branch976 -> origin/branch976
* [new branch] branch977 -> origin/branch977
* [new branch] branch978 -> origin/branch978
* [new branch] branch979 -> origin/branch979
* [new branch] branch980 -> origin/branch980
* [new branch] branch981 -> origin/branch981
* [new branch] branch982 -> origin/branch982
* [new branch] branch983 -> origin/branch983
* [new branch] branch984 -> origin/branch984
* [new branch] branch985 -> origin/branch985
* [new branch] branch986 -> origin/branch986
* [new branch] branch987 -> origin/branch987
* [new branch] branch988 -> origin/branch988
* [new branch] branch989 -> origin/branch989
* [new branch] branch990 -> origin/branch990
* [new branch] branch991 -> origin/branch991
* [new branch] branch992 -> origin/branch992
* [new branch] branch993 -> origin/branch993
* [new branch] branch994 -> origin/branch994
* [new branch] branch995 -> origin/branch995
* [new branch] branch996 -> origin/branch996
* [new branch] branch997 -> origin/branch997
* [new branch] branch998 -> origin/branch998
* [new branch] branch999 -> origin/branch999
ok 7 - quickfetch should handle ~1000 refs (on Windows)
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5503-tagfollow.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5503-tagfollow/.git/
expecting success:
test_tick &&
echo ichi >file &&
git add file &&
git commit -m L &&
L=$(git rev-parse --verify HEAD) &&
(
mkdir cloned &&
cd cloned &&
git init-db &&
git remote add -f origin ..
) &&
test_tick &&
echo A >file &&
git add file &&
git commit -m A &&
A=$(git rev-parse --verify HEAD)
[master (root-commit) 6a9c5e4] L
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.t5503-tagfollow/cloned/.git/
Updating origin
From ..
* [new branch] master -> origin/master
[master c06aaaf] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
cat - <<EOF >expect
want $A
EOF
ok 2 - setup expect
expecting success:
rm -f $U &&
(
cd cloned &&
GIT_TRACE_PACKET=$UPATH git fetch &&
test $A = $(git rev-parse --verify origin/master)
) &&
get_needs $U >actual &&
test_cmp expect actual
From ..
6a9c5e4..c06aaaf master -> origin/master
ok 3 - fetch A (new commit : 1 connection)
expecting success:
git tag -a -m tag1 tag1 $A &&
T=$(git rev-parse --verify tag1) &&
git checkout -b cat &&
echo C >file &&
git add file &&
git commit -m C &&
C=$(git rev-parse --verify HEAD) &&
git checkout master
Switched to a new branch 'cat'
[cat f888ed6] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'master'
ok 4 - create tag T on A, create C on branch cat
expecting success:
cat - <<EOF >expect
want $C
want $T
EOF
ok 5 - setup expect
expecting success:
rm -f $U &&
(
cd cloned &&
GIT_TRACE_PACKET=$UPATH git fetch &&
test $C = $(git rev-parse --verify origin/cat) &&
test $T = $(git rev-parse --verify tag1) &&
test $A = $(git rev-parse --verify tag1^0)
) &&
get_needs $U >actual &&
test_cmp expect actual
From ..
* [new branch] cat -> origin/cat
* [new tag] tag1 -> tag1
ok 6 - fetch C, T (new branch, tag : 1 connection)
expecting success:
test_tick &&
echo O >file &&
git add file &&
git commit -m O &&
test_tick &&
echo B >file &&
git add file &&
git commit -m B &&
B=$(git rev-parse --verify HEAD) &&
git tag -a -m tag2 tag2 $B &&
S=$(git rev-parse --verify tag2)
[master 0129221] O
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 8e10cf4] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 7 - create commits O, B, tag S on B
expecting success:
cat - <<EOF >expect
want $B
want $S
EOF
ok 8 - setup expect
expecting success:
rm -f $U &&
(
cd cloned &&
GIT_TRACE_PACKET=$UPATH git fetch &&
test $B = $(git rev-parse --verify origin/master) &&
test $B = $(git rev-parse --verify tag2^0) &&
test $S = $(git rev-parse --verify tag2)
) &&
get_needs $U >actual &&
test_cmp expect actual
From ..
c06aaaf..8e10cf4 master -> origin/master
* [new tag] tag2 -> tag2
ok 9 - fetch B, S (commit and tag : 1 connection)
expecting success:
cat - <<EOF >expect
want $B
want $S
EOF
ok 10 - setup expect
expecting success:
test_might_fail git branch -D cat &&
rm -f $U &&
(
mkdir clone2 &&
cd clone2 &&
git init &&
git remote add origin .. &&
GIT_TRACE_PACKET=$UPATH git fetch &&
test $B = $(git rev-parse --verify origin/master) &&
test $S = $(git rev-parse --verify tag2) &&
test $B = $(git rev-parse --verify tag2^0) &&
test $T = $(git rev-parse --verify tag1) &&
test $A = $(git rev-parse --verify tag1^0)
) &&
get_needs $U >actual &&
test_cmp expect actual
Deleted branch cat (was f888ed6).
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5503-tagfollow/clone2/.git/
From ..
* [new branch] master -> origin/master
* [new tag] tag2 -> tag2
* [new tag] tag1 -> tag1
ok 11 - new clone fetch master and tags
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5401-update-hooks.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5401-update-hooks/.git/
expecting success:
echo This is a test. >a &&
git update-index --add a &&
tree0=$(git write-tree) &&
commit0=$(echo setup | git commit-tree $tree0) &&
echo We hope it works. >a &&
git update-index a &&
tree1=$(git write-tree) &&
commit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&
git update-ref refs/heads/master $commit0 &&
git update-ref refs/heads/tofail $commit1 &&
git clone --bare ./. victim.git &&
GIT_DIR=victim.git git update-ref refs/heads/tofail $commit1 &&
git update-ref refs/heads/master $commit1 &&
git update-ref refs/heads/tofail $commit0
Cloning into bare repository 'victim.git'...
done.
ok 1 - setup
expecting success:
test_must_fail git send-pack --force ./victim.git \
master tofail >send.out 2>send.err
ok 2 - push
expecting success:
test $(GIT_DIR=victim.git git rev-parse master) = $commit1 &&
test $(GIT_DIR=victim.git git rev-parse tofail) = $commit1
ok 3 - updated as expected
expecting success:
test -f victim.git/pre-receive.args &&
test -f victim.git/pre-receive.stdin &&
test -f victim.git/update.args &&
test -f victim.git/update.stdin &&
test -f victim.git/post-receive.args &&
test -f victim.git/post-receive.stdin &&
test -f victim.git/post-update.args &&
test -f victim.git/post-update.stdin
ok 4 - hooks ran
expecting success:
(echo $commit0 $commit1 refs/heads/master &&
echo $commit1 $commit0 refs/heads/tofail
) | test_cmp - victim.git/pre-receive.stdin
ok 5 - pre-receive hook input
expecting success:
(echo refs/heads/master $commit0 $commit1 &&
echo refs/heads/tofail $commit1 $commit0
) | test_cmp - victim.git/update.args
ok 6 - update hook arguments
expecting success:
echo $commit0 $commit1 refs/heads/master |
test_cmp - victim.git/post-receive.stdin
ok 7 - post-receive hook input
expecting success:
echo refs/heads/master |
test_cmp - victim.git/post-update.args
ok 8 - post-update hook arguments
expecting success:
test_must_be_empty victim.git/update.stdin &&
test_must_be_empty victim.git/post-update.stdin
ok 9 - all hook stdin is /dev/null
expecting success:
test_must_be_empty victim.git/pre-receive.args &&
test_must_be_empty victim.git/post-receive.args
ok 10 - all *-receive hook args are empty
expecting success:
test_must_be_empty send.out
ok 11 - send-pack produced no output
expecting success:
grep ^remote: send.err | sed "s/ *\$//" >actual &&
test_cmp expect actual
ok 12 - send-pack stderr contains hook messages
expecting success:
write_script victim.git/hooks/pre-receive <<-\EOF &&
exit 0
EOF
rm -f victim.git/hooks/update victim.git/hooks/post-update &&
for v in $(test_seq 100 999)
do
git branch branch_$v master || return
done &&
git push ./victim.git "+refs/heads/*:refs/heads/*"
remote: STDOUT post-receive
remote: STDERR post-receive
To ./victim.git
+ f3a10da...c404406 tofail -> tofail (forced update)
* [new branch] branch_100 -> branch_100
* [new branch] branch_101 -> branch_101
* [new branch] branch_102 -> branch_102
* [new branch] branch_103 -> branch_103
* [new branch] branch_104 -> branch_104
* [new branch] branch_105 -> branch_105
* [new branch] branch_106 -> branch_106
* [new branch] branch_107 -> branch_107
* [new branch] branch_108 -> branch_108
* [new branch] branch_109 -> branch_109
* [new branch] branch_110 -> branch_110
* [new branch] branch_111 -> branch_111
* [new branch] branch_112 -> branch_112
* [new branch] branch_113 -> branch_113
* [new branch] branch_114 -> branch_114
* [new branch] branch_115 -> branch_115
* [new branch] branch_116 -> branch_116
* [new branch] branch_117 -> branch_117
* [new branch] branch_118 -> branch_118
* [new branch] branch_119 -> branch_119
* [new branch] branch_120 -> branch_120
* [new branch] branch_121 -> branch_121
* [new branch] branch_122 -> branch_122
* [new branch] branch_123 -> branch_123
* [new branch] branch_124 -> branch_124
* [new branch] branch_125 -> branch_125
* [new branch] branch_126 -> branch_126
* [new branch] branch_127 -> branch_127
* [new branch] branch_128 -> branch_128
* [new branch] branch_129 -> branch_129
* [new branch] branch_130 -> branch_130
* [new branch] branch_131 -> branch_131
* [new branch] branch_132 -> branch_132
* [new branch] branch_133 -> branch_133
* [new branch] branch_134 -> branch_134
* [new branch] branch_135 -> branch_135
* [new branch] branch_136 -> branch_136
* [new branch] branch_137 -> branch_137
* [new branch] branch_138 -> branch_138
* [new branch] branch_139 -> branch_139
* [new branch] branch_140 -> branch_140
* [new branch] branch_141 -> branch_141
* [new branch] branch_142 -> branch_142
* [new branch] branch_143 -> branch_143
* [new branch] branch_144 -> branch_144
* [new branch] branch_145 -> branch_145
* [new branch] branch_146 -> branch_146
* [new branch] branch_147 -> branch_147
* [new branch] branch_148 -> branch_148
* [new branch] branch_149 -> branch_149
* [new branch] branch_150 -> branch_150
* [new branch] branch_151 -> branch_151
* [new branch] branch_152 -> branch_152
* [new branch] branch_153 -> branch_153
* [new branch] branch_154 -> branch_154
* [new branch] branch_155 -> branch_155
* [new branch] branch_156 -> branch_156
* [new branch] branch_157 -> branch_157
* [new branch] branch_158 -> branch_158
* [new branch] branch_159 -> branch_159
* [new branch] branch_160 -> branch_160
* [new branch] branch_161 -> branch_161
* [new branch] branch_162 -> branch_162
* [new branch] branch_163 -> branch_163
* [new branch] branch_164 -> branch_164
* [new branch] branch_165 -> branch_165
* [new branch] branch_166 -> branch_166
* [new branch] branch_167 -> branch_167
* [new branch] branch_168 -> branch_168
* [new branch] branch_169 -> branch_169
* [new branch] branch_170 -> branch_170
* [new branch] branch_171 -> branch_171
* [new branch] branch_172 -> branch_172
* [new branch] branch_173 -> branch_173
* [new branch] branch_174 -> branch_174
* [new branch] branch_175 -> branch_175
* [new branch] branch_176 -> branch_176
* [new branch] branch_177 -> branch_177
* [new branch] branch_178 -> branch_178
* [new branch] branch_179 -> branch_179
* [new branch] branch_180 -> branch_180
* [new branch] branch_181 -> branch_181
* [new branch] branch_182 -> branch_182
* [new branch] branch_183 -> branch_183
* [new branch] branch_184 -> branch_184
* [new branch] branch_185 -> branch_185
* [new branch] branch_186 -> branch_186
* [new branch] branch_187 -> branch_187
* [new branch] branch_188 -> branch_188
* [new branch] branch_189 -> branch_189
* [new branch] branch_190 -> branch_190
* [new branch] branch_191 -> branch_191
* [new branch] branch_192 -> branch_192
* [new branch] branch_193 -> branch_193
* [new branch] branch_194 -> branch_194
* [new branch] branch_195 -> branch_195
* [new branch] branch_196 -> branch_196
* [new branch] branch_197 -> branch_197
* [new branch] branch_198 -> branch_198
* [new branch] branch_199 -> branch_199
* [new branch] branch_200 -> branch_200
* [new branch] branch_201 -> branch_201
* [new branch] branch_202 -> branch_202
* [new branch] branch_203 -> branch_203
* [new branch] branch_204 -> branch_204
* [new branch] branch_205 -> branch_205
* [new branch] branch_206 -> branch_206
* [new branch] branch_207 -> branch_207
* [new branch] branch_208 -> branch_208
* [new branch] branch_209 -> branch_209
* [new branch] branch_210 -> branch_210
* [new branch] branch_211 -> branch_211
* [new branch] branch_212 -> branch_212
* [new branch] branch_213 -> branch_213
* [new branch] branch_214 -> branch_214
* [new branch] branch_215 -> branch_215
* [new branch] branch_216 -> branch_216
* [new branch] branch_217 -> branch_217
* [new branch] branch_218 -> branch_218
* [new branch] branch_219 -> branch_219
* [new branch] branch_220 -> branch_220
* [new branch] branch_221 -> branch_221
* [new branch] branch_222 -> branch_222
* [new branch] branch_223 -> branch_223
* [new branch] branch_224 -> branch_224
* [new branch] branch_225 -> branch_225
* [new branch] branch_226 -> branch_226
* [new branch] branch_227 -> branch_227
* [new branch] branch_228 -> branch_228
* [new branch] branch_229 -> branch_229
* [new branch] branch_230 -> branch_230
* [new branch] branch_231 -> branch_231
* [new branch] branch_232 -> branch_232
* [new branch] branch_233 -> branch_233
* [new branch] branch_234 -> branch_234
* [new branch] branch_235 -> branch_235
* [new branch] branch_236 -> branch_236
* [new branch] branch_237 -> branch_237
* [new branch] branch_238 -> branch_238
* [new branch] branch_239 -> branch_239
* [new branch] branch_240 -> branch_240
* [new branch] branch_241 -> branch_241
* [new branch] branch_242 -> branch_242
* [new branch] branch_243 -> branch_243
* [new branch] branch_244 -> branch_244
* [new branch] branch_245 -> branch_245
* [new branch] branch_246 -> branch_246
* [new branch] branch_247 -> branch_247
* [new branch] branch_248 -> branch_248
* [new branch] branch_249 -> branch_249
* [new branch] branch_250 -> branch_250
* [new branch] branch_251 -> branch_251
* [new branch] branch_252 -> branch_252
* [new branch] branch_253 -> branch_253
* [new branch] branch_254 -> branch_254
* [new branch] branch_255 -> branch_255
* [new branch] branch_256 -> branch_256
* [new branch] branch_257 -> branch_257
* [new branch] branch_258 -> branch_258
* [new branch] branch_259 -> branch_259
* [new branch] branch_260 -> branch_260
* [new branch] branch_261 -> branch_261
* [new branch] branch_262 -> branch_262
* [new branch] branch_263 -> branch_263
* [new branch] branch_264 -> branch_264
* [new branch] branch_265 -> branch_265
* [new branch] branch_266 -> branch_266
* [new branch] branch_267 -> branch_267
* [new branch] branch_268 -> branch_268
* [new branch] branch_269 -> branch_269
* [new branch] branch_270 -> branch_270
* [new branch] branch_271 -> branch_271
* [new branch] branch_272 -> branch_272
* [new branch] branch_273 -> branch_273
* [new branch] branch_274 -> branch_274
* [new branch] branch_275 -> branch_275
* [new branch] branch_276 -> branch_276
* [new branch] branch_277 -> branch_277
* [new branch] branch_278 -> branch_278
* [new branch] branch_279 -> branch_279
* [new branch] branch_280 -> branch_280
* [new branch] branch_281 -> branch_281
* [new branch] branch_282 -> branch_282
* [new branch] branch_283 -> branch_283
* [new branch] branch_284 -> branch_284
* [new branch] branch_285 -> branch_285
* [new branch] branch_286 -> branch_286
* [new branch] branch_287 -> branch_287
* [new branch] branch_288 -> branch_288
* [new branch] branch_289 -> branch_289
* [new branch] branch_290 -> branch_290
* [new branch] branch_291 -> branch_291
* [new branch] branch_292 -> branch_292
* [new branch] branch_293 -> branch_293
* [new branch] branch_294 -> branch_294
* [new branch] branch_295 -> branch_295
* [new branch] branch_296 -> branch_296
* [new branch] branch_297 -> branch_297
* [new branch] branch_298 -> branch_298
* [new branch] branch_299 -> branch_299
* [new branch] branch_300 -> branch_300
* [new branch] branch_301 -> branch_301
* [new branch] branch_302 -> branch_302
* [new branch] branch_303 -> branch_303
* [new branch] branch_304 -> branch_304
* [new branch] branch_305 -> branch_305
* [new branch] branch_306 -> branch_306
* [new branch] branch_307 -> branch_307
* [new branch] branch_308 -> branch_308
* [new branch] branch_309 -> branch_309
* [new branch] branch_310 -> branch_310
* [new branch] branch_311 -> branch_311
* [new branch] branch_312 -> branch_312
* [new branch] branch_313 -> branch_313
* [new branch] branch_314 -> branch_314
* [new branch] branch_315 -> branch_315
* [new branch] branch_316 -> branch_316
* [new branch] branch_317 -> branch_317
* [new branch] branch_318 -> branch_318
* [new branch] branch_319 -> branch_319
* [new branch] branch_320 -> branch_320
* [new branch] branch_321 -> branch_321
* [new branch] branch_322 -> branch_322
* [new branch] branch_323 -> branch_323
* [new branch] branch_324 -> branch_324
* [new branch] branch_325 -> branch_325
* [new branch] branch_326 -> branch_326
* [new branch] branch_327 -> branch_327
* [new branch] branch_328 -> branch_328
* [new branch] branch_329 -> branch_329
* [new branch] branch_330 -> branch_330
* [new branch] branch_331 -> branch_331
* [new branch] branch_332 -> branch_332
* [new branch] branch_333 -> branch_333
* [new branch] branch_334 -> branch_334
* [new branch] branch_335 -> branch_335
* [new branch] branch_336 -> branch_336
* [new branch] branch_337 -> branch_337
* [new branch] branch_338 -> branch_338
* [new branch] branch_339 -> branch_339
* [new branch] branch_340 -> branch_340
* [new branch] branch_341 -> branch_341
* [new branch] branch_342 -> branch_342
* [new branch] branch_343 -> branch_343
* [new branch] branch_344 -> branch_344
* [new branch] branch_345 -> branch_345
* [new branch] branch_346 -> branch_346
* [new branch] branch_347 -> branch_347
* [new branch] branch_348 -> branch_348
* [new branch] branch_349 -> branch_349
* [new branch] branch_350 -> branch_350
* [new branch] branch_351 -> branch_351
* [new branch] branch_352 -> branch_352
* [new branch] branch_353 -> branch_353
* [new branch] branch_354 -> branch_354
* [new branch] branch_355 -> branch_355
* [new branch] branch_356 -> branch_356
* [new branch] branch_357 -> branch_357
* [new branch] branch_358 -> branch_358
* [new branch] branch_359 -> branch_359
* [new branch] branch_360 -> branch_360
* [new branch] branch_361 -> branch_361
* [new branch] branch_362 -> branch_362
* [new branch] branch_363 -> branch_363
* [new branch] branch_364 -> branch_364
* [new branch] branch_365 -> branch_365
* [new branch] branch_366 -> branch_366
* [new branch] branch_367 -> branch_367
* [new branch] branch_368 -> branch_368
* [new branch] branch_369 -> branch_369
* [new branch] branch_370 -> branch_370
* [new branch] branch_371 -> branch_371
* [new branch] branch_372 -> branch_372
* [new branch] branch_373 -> branch_373
* [new branch] branch_374 -> branch_374
* [new branch] branch_375 -> branch_375
* [new branch] branch_376 -> branch_376
* [new branch] branch_377 -> branch_377
* [new branch] branch_378 -> branch_378
* [new branch] branch_379 -> branch_379
* [new branch] branch_380 -> branch_380
* [new branch] branch_381 -> branch_381
* [new branch] branch_382 -> branch_382
* [new branch] branch_383 -> branch_383
* [new branch] branch_384 -> branch_384
* [new branch] branch_385 -> branch_385
* [new branch] branch_386 -> branch_386
* [new branch] branch_387 -> branch_387
* [new branch] branch_388 -> branch_388
* [new branch] branch_389 -> branch_389
* [new branch] branch_390 -> branch_390
* [new branch] branch_391 -> branch_391
* [new branch] branch_392 -> branch_392
* [new branch] branch_393 -> branch_393
* [new branch] branch_394 -> branch_394
* [new branch] branch_395 -> branch_395
* [new branch] branch_396 -> branch_396
* [new branch] branch_397 -> branch_397
* [new branch] branch_398 -> branch_398
* [new branch] branch_399 -> branch_399
* [new branch] branch_400 -> branch_400
* [new branch] branch_401 -> branch_401
* [new branch] branch_402 -> branch_402
* [new branch] branch_403 -> branch_403
* [new branch] branch_404 -> branch_404
* [new branch] branch_405 -> branch_405
* [new branch] branch_406 -> branch_406
* [new branch] branch_407 -> branch_407
* [new branch] branch_408 -> branch_408
* [new branch] branch_409 -> branch_409
* [new branch] branch_410 -> branch_410
* [new branch] branch_411 -> branch_411
* [new branch] branch_412 -> branch_412
* [new branch] branch_413 -> branch_413
* [new branch] branch_414 -> branch_414
* [new branch] branch_415 -> branch_415
* [new branch] branch_416 -> branch_416
* [new branch] branch_417 -> branch_417
* [new branch] branch_418 -> branch_418
* [new branch] branch_419 -> branch_419
* [new branch] branch_420 -> branch_420
* [new branch] branch_421 -> branch_421
* [new branch] branch_422 -> branch_422
* [new branch] branch_423 -> branch_423
* [new branch] branch_424 -> branch_424
* [new branch] branch_425 -> branch_425
* [new branch] branch_426 -> branch_426
* [new branch] branch_427 -> branch_427
* [new branch] branch_428 -> branch_428
* [new branch] branch_429 -> branch_429
* [new branch] branch_430 -> branch_430
* [new branch] branch_431 -> branch_431
* [new branch] branch_432 -> branch_432
* [new branch] branch_433 -> branch_433
* [new branch] branch_434 -> branch_434
* [new branch] branch_435 -> branch_435
* [new branch] branch_436 -> branch_436
* [new branch] branch_437 -> branch_437
* [new branch] branch_438 -> branch_438
* [new branch] branch_439 -> branch_439
* [new branch] branch_440 -> branch_440
* [new branch] branch_441 -> branch_441
* [new branch] branch_442 -> branch_442
* [new branch] branch_443 -> branch_443
* [new branch] branch_444 -> branch_444
* [new branch] branch_445 -> branch_445
* [new branch] branch_446 -> branch_446
* [new branch] branch_447 -> branch_447
* [new branch] branch_448 -> branch_448
* [new branch] branch_449 -> branch_449
* [new branch] branch_450 -> branch_450
* [new branch] branch_451 -> branch_451
* [new branch] branch_452 -> branch_452
* [new branch] branch_453 -> branch_453
* [new branch] branch_454 -> branch_454
* [new branch] branch_455 -> branch_455
* [new branch] branch_456 -> branch_456
* [new branch] branch_457 -> branch_457
* [new branch] branch_458 -> branch_458
* [new branch] branch_459 -> branch_459
* [new branch] branch_460 -> branch_460
* [new branch] branch_461 -> branch_461
* [new branch] branch_462 -> branch_462
* [new branch] branch_463 -> branch_463
* [new branch] branch_464 -> branch_464
* [new branch] branch_465 -> branch_465
* [new branch] branch_466 -> branch_466
* [new branch] branch_467 -> branch_467
* [new branch] branch_468 -> branch_468
* [new branch] branch_469 -> branch_469
* [new branch] branch_470 -> branch_470
* [new branch] branch_471 -> branch_471
* [new branch] branch_472 -> branch_472
* [new branch] branch_473 -> branch_473
* [new branch] branch_474 -> branch_474
* [new branch] branch_475 -> branch_475
* [new branch] branch_476 -> branch_476
* [new branch] branch_477 -> branch_477
* [new branch] branch_478 -> branch_478
* [new branch] branch_479 -> branch_479
* [new branch] branch_480 -> branch_480
* [new branch] branch_481 -> branch_481
* [new branch] branch_482 -> branch_482
* [new branch] branch_483 -> branch_483
* [new branch] branch_484 -> branch_484
* [new branch] branch_485 -> branch_485
* [new branch] branch_486 -> branch_486
* [new branch] branch_487 -> branch_487
* [new branch] branch_488 -> branch_488
* [new branch] branch_489 -> branch_489
* [new branch] branch_490 -> branch_490
* [new branch] branch_491 -> branch_491
* [new branch] branch_492 -> branch_492
* [new branch] branch_493 -> branch_493
* [new branch] branch_494 -> branch_494
* [new branch] branch_495 -> branch_495
* [new branch] branch_496 -> branch_496
* [new branch] branch_497 -> branch_497
* [new branch] branch_498 -> branch_498
* [new branch] branch_499 -> branch_499
* [new branch] branch_500 -> branch_500
* [new branch] branch_501 -> branch_501
* [new branch] branch_502 -> branch_502
* [new branch] branch_503 -> branch_503
* [new branch] branch_504 -> branch_504
* [new branch] branch_505 -> branch_505
* [new branch] branch_506 -> branch_506
* [new branch] branch_507 -> branch_507
* [new branch] branch_508 -> branch_508
* [new branch] branch_509 -> branch_509
* [new branch] branch_510 -> branch_510
* [new branch] branch_511 -> branch_511
* [new branch] branch_512 -> branch_512
* [new branch] branch_513 -> branch_513
* [new branch] branch_514 -> branch_514
* [new branch] branch_515 -> branch_515
* [new branch] branch_516 -> branch_516
* [new branch] branch_517 -> branch_517
* [new branch] branch_518 -> branch_518
* [new branch] branch_519 -> branch_519
* [new branch] branch_520 -> branch_520
* [new branch] branch_521 -> branch_521
* [new branch] branch_522 -> branch_522
* [new branch] branch_523 -> branch_523
* [new branch] branch_524 -> branch_524
* [new branch] branch_525 -> branch_525
* [new branch] branch_526 -> branch_526
* [new branch] branch_527 -> branch_527
* [new branch] branch_528 -> branch_528
* [new branch] branch_529 -> branch_529
* [new branch] branch_530 -> branch_530
* [new branch] branch_531 -> branch_531
* [new branch] branch_532 -> branch_532
* [new branch] branch_533 -> branch_533
* [new branch] branch_534 -> branch_534
* [new branch] branch_535 -> branch_535
* [new branch] branch_536 -> branch_536
* [new branch] branch_537 -> branch_537
* [new branch] branch_538 -> branch_538
* [new branch] branch_539 -> branch_539
* [new branch] branch_540 -> branch_540
* [new branch] branch_541 -> branch_541
* [new branch] branch_542 -> branch_542
* [new branch] branch_543 -> branch_543
* [new branch] branch_544 -> branch_544
* [new branch] branch_545 -> branch_545
* [new branch] branch_546 -> branch_546
* [new branch] branch_547 -> branch_547
* [new branch] branch_548 -> branch_548
* [new branch] branch_549 -> branch_549
* [new branch] branch_550 -> branch_550
* [new branch] branch_551 -> branch_551
* [new branch] branch_552 -> branch_552
* [new branch] branch_553 -> branch_553
* [new branch] branch_554 -> branch_554
* [new branch] branch_555 -> branch_555
* [new branch] branch_556 -> branch_556
* [new branch] branch_557 -> branch_557
* [new branch] branch_558 -> branch_558
* [new branch] branch_559 -> branch_559
* [new branch] branch_560 -> branch_560
* [new branch] branch_561 -> branch_561
* [new branch] branch_562 -> branch_562
* [new branch] branch_563 -> branch_563
* [new branch] branch_564 -> branch_564
* [new branch] branch_565 -> branch_565
* [new branch] branch_566 -> branch_566
* [new branch] branch_567 -> branch_567
* [new branch] branch_568 -> branch_568
* [new branch] branch_569 -> branch_569
* [new branch] branch_570 -> branch_570
* [new branch] branch_571 -> branch_571
* [new branch] branch_572 -> branch_572
* [new branch] branch_573 -> branch_573
* [new branch] branch_574 -> branch_574
* [new branch] branch_575 -> branch_575
* [new branch] branch_576 -> branch_576
* [new branch] branch_577 -> branch_577
* [new branch] branch_578 -> branch_578
* [new branch] branch_579 -> branch_579
* [new branch] branch_580 -> branch_580
* [new branch] branch_581 -> branch_581
* [new branch] branch_582 -> branch_582
* [new branch] branch_583 -> branch_583
* [new branch] branch_584 -> branch_584
* [new branch] branch_585 -> branch_585
* [new branch] branch_586 -> branch_586
* [new branch] branch_587 -> branch_587
* [new branch] branch_588 -> branch_588
* [new branch] branch_589 -> branch_589
* [new branch] branch_590 -> branch_590
* [new branch] branch_591 -> branch_591
* [new branch] branch_592 -> branch_592
* [new branch] branch_593 -> branch_593
* [new branch] branch_594 -> branch_594
* [new branch] branch_595 -> branch_595
* [new branch] branch_596 -> branch_596
* [new branch] branch_597 -> branch_597
* [new branch] branch_598 -> branch_598
* [new branch] branch_599 -> branch_599
* [new branch] branch_600 -> branch_600
* [new branch] branch_601 -> branch_601
* [new branch] branch_602 -> branch_602
* [new branch] branch_603 -> branch_603
* [new branch] branch_604 -> branch_604
* [new branch] branch_605 -> branch_605
* [new branch] branch_606 -> branch_606
* [new branch] branch_607 -> branch_607
* [new branch] branch_608 -> branch_608
* [new branch] branch_609 -> branch_609
* [new branch] branch_610 -> branch_610
* [new branch] branch_611 -> branch_611
* [new branch] branch_612 -> branch_612
* [new branch] branch_613 -> branch_613
* [new branch] branch_614 -> branch_614
* [new branch] branch_615 -> branch_615
* [new branch] branch_616 -> branch_616
* [new branch] branch_617 -> branch_617
* [new branch] branch_618 -> branch_618
* [new branch] branch_619 -> branch_619
* [new branch] branch_620 -> branch_620
* [new branch] branch_621 -> branch_621
* [new branch] branch_622 -> branch_622
* [new branch] branch_623 -> branch_623
* [new branch] branch_624 -> branch_624
* [new branch] branch_625 -> branch_625
* [new branch] branch_626 -> branch_626
* [new branch] branch_627 -> branch_627
* [new branch] branch_628 -> branch_628
* [new branch] branch_629 -> branch_629
* [new branch] branch_630 -> branch_630
* [new branch] branch_631 -> branch_631
* [new branch] branch_632 -> branch_632
* [new branch] branch_633 -> branch_633
* [new branch] branch_634 -> branch_634
* [new branch] branch_635 -> branch_635
* [new branch] branch_636 -> branch_636
* [new branch] branch_637 -> branch_637
* [new branch] branch_638 -> branch_638
* [new branch] branch_639 -> branch_639
* [new branch] branch_640 -> branch_640
* [new branch] branch_641 -> branch_641
* [new branch] branch_642 -> branch_642
* [new branch] branch_643 -> branch_643
* [new branch] branch_644 -> branch_644
* [new branch] branch_645 -> branch_645
* [new branch] branch_646 -> branch_646
* [new branch] branch_647 -> branch_647
* [new branch] branch_648 -> branch_648
* [new branch] branch_649 -> branch_649
* [new branch] branch_650 -> branch_650
* [new branch] branch_651 -> branch_651
* [new branch] branch_652 -> branch_652
* [new branch] branch_653 -> branch_653
* [new branch] branch_654 -> branch_654
* [new branch] branch_655 -> branch_655
* [new branch] branch_656 -> branch_656
* [new branch] branch_657 -> branch_657
* [new branch] branch_658 -> branch_658
* [new branch] branch_659 -> branch_659
* [new branch] branch_660 -> branch_660
* [new branch] branch_661 -> branch_661
* [new branch] branch_662 -> branch_662
* [new branch] branch_663 -> branch_663
* [new branch] branch_664 -> branch_664
* [new branch] branch_665 -> branch_665
* [new branch] branch_666 -> branch_666
* [new branch] branch_667 -> branch_667
* [new branch] branch_668 -> branch_668
* [new branch] branch_669 -> branch_669
* [new branch] branch_670 -> branch_670
* [new branch] branch_671 -> branch_671
* [new branch] branch_672 -> branch_672
* [new branch] branch_673 -> branch_673
* [new branch] branch_674 -> branch_674
* [new branch] branch_675 -> branch_675
* [new branch] branch_676 -> branch_676
* [new branch] branch_677 -> branch_677
* [new branch] branch_678 -> branch_678
* [new branch] branch_679 -> branch_679
* [new branch] branch_680 -> branch_680
* [new branch] branch_681 -> branch_681
* [new branch] branch_682 -> branch_682
* [new branch] branch_683 -> branch_683
* [new branch] branch_684 -> branch_684
* [new branch] branch_685 -> branch_685
* [new branch] branch_686 -> branch_686
* [new branch] branch_687 -> branch_687
* [new branch] branch_688 -> branch_688
* [new branch] branch_689 -> branch_689
* [new branch] branch_690 -> branch_690
* [new branch] branch_691 -> branch_691
* [new branch] branch_692 -> branch_692
* [new branch] branch_693 -> branch_693
* [new branch] branch_694 -> branch_694
* [new branch] branch_695 -> branch_695
* [new branch] branch_696 -> branch_696
* [new branch] branch_697 -> branch_697
* [new branch] branch_698 -> branch_698
* [new branch] branch_699 -> branch_699
* [new branch] branch_700 -> branch_700
* [new branch] branch_701 -> branch_701
* [new branch] branch_702 -> branch_702
* [new branch] branch_703 -> branch_703
* [new branch] branch_704 -> branch_704
* [new branch] branch_705 -> branch_705
* [new branch] branch_706 -> branch_706
* [new branch] branch_707 -> branch_707
* [new branch] branch_708 -> branch_708
* [new branch] branch_709 -> branch_709
* [new branch] branch_710 -> branch_710
* [new branch] branch_711 -> branch_711
* [new branch] branch_712 -> branch_712
* [new branch] branch_713 -> branch_713
* [new branch] branch_714 -> branch_714
* [new branch] branch_715 -> branch_715
* [new branch] branch_716 -> branch_716
* [new branch] branch_717 -> branch_717
* [new branch] branch_718 -> branch_718
* [new branch] branch_719 -> branch_719
* [new branch] branch_720 -> branch_720
* [new branch] branch_721 -> branch_721
* [new branch] branch_722 -> branch_722
* [new branch] branch_723 -> branch_723
* [new branch] branch_724 -> branch_724
* [new branch] branch_725 -> branch_725
* [new branch] branch_726 -> branch_726
* [new branch] branch_727 -> branch_727
* [new branch] branch_728 -> branch_728
* [new branch] branch_729 -> branch_729
* [new branch] branch_730 -> branch_730
* [new branch] branch_731 -> branch_731
* [new branch] branch_732 -> branch_732
* [new branch] branch_733 -> branch_733
* [new branch] branch_734 -> branch_734
* [new branch] branch_735 -> branch_735
* [new branch] branch_736 -> branch_736
* [new branch] branch_737 -> branch_737
* [new branch] branch_738 -> branch_738
* [new branch] branch_739 -> branch_739
* [new branch] branch_740 -> branch_740
* [new branch] branch_741 -> branch_741
* [new branch] branch_742 -> branch_742
* [new branch] branch_743 -> branch_743
* [new branch] branch_744 -> branch_744
* [new branch] branch_745 -> branch_745
* [new branch] branch_746 -> branch_746
* [new branch] branch_747 -> branch_747
* [new branch] branch_748 -> branch_748
* [new branch] branch_749 -> branch_749
* [new branch] branch_750 -> branch_750
* [new branch] branch_751 -> branch_751
* [new branch] branch_752 -> branch_752
* [new branch] branch_753 -> branch_753
* [new branch] branch_754 -> branch_754
* [new branch] branch_755 -> branch_755
* [new branch] branch_756 -> branch_756
* [new branch] branch_757 -> branch_757
* [new branch] branch_758 -> branch_758
* [new branch] branch_759 -> branch_759
* [new branch] branch_760 -> branch_760
* [new branch] branch_761 -> branch_761
* [new branch] branch_762 -> branch_762
* [new branch] branch_763 -> branch_763
* [new branch] branch_764 -> branch_764
* [new branch] branch_765 -> branch_765
* [new branch] branch_766 -> branch_766
* [new branch] branch_767 -> branch_767
* [new branch] branch_768 -> branch_768
* [new branch] branch_769 -> branch_769
* [new branch] branch_770 -> branch_770
* [new branch] branch_771 -> branch_771
* [new branch] branch_772 -> branch_772
* [new branch] branch_773 -> branch_773
* [new branch] branch_774 -> branch_774
* [new branch] branch_775 -> branch_775
* [new branch] branch_776 -> branch_776
* [new branch] branch_777 -> branch_777
* [new branch] branch_778 -> branch_778
* [new branch] branch_779 -> branch_779
* [new branch] branch_780 -> branch_780
* [new branch] branch_781 -> branch_781
* [new branch] branch_782 -> branch_782
* [new branch] branch_783 -> branch_783
* [new branch] branch_784 -> branch_784
* [new branch] branch_785 -> branch_785
* [new branch] branch_786 -> branch_786
* [new branch] branch_787 -> branch_787
* [new branch] branch_788 -> branch_788
* [new branch] branch_789 -> branch_789
* [new branch] branch_790 -> branch_790
* [new branch] branch_791 -> branch_791
* [new branch] branch_792 -> branch_792
* [new branch] branch_793 -> branch_793
* [new branch] branch_794 -> branch_794
* [new branch] branch_795 -> branch_795
* [new branch] branch_796 -> branch_796
* [new branch] branch_797 -> branch_797
* [new branch] branch_798 -> branch_798
* [new branch] branch_799 -> branch_799
* [new branch] branch_800 -> branch_800
* [new branch] branch_801 -> branch_801
* [new branch] branch_802 -> branch_802
* [new branch] branch_803 -> branch_803
* [new branch] branch_804 -> branch_804
* [new branch] branch_805 -> branch_805
* [new branch] branch_806 -> branch_806
* [new branch] branch_807 -> branch_807
* [new branch] branch_808 -> branch_808
* [new branch] branch_809 -> branch_809
* [new branch] branch_810 -> branch_810
* [new branch] branch_811 -> branch_811
* [new branch] branch_812 -> branch_812
* [new branch] branch_813 -> branch_813
* [new branch] branch_814 -> branch_814
* [new branch] branch_815 -> branch_815
* [new branch] branch_816 -> branch_816
* [new branch] branch_817 -> branch_817
* [new branch] branch_818 -> branch_818
* [new branch] branch_819 -> branch_819
* [new branch] branch_820 -> branch_820
* [new branch] branch_821 -> branch_821
* [new branch] branch_822 -> branch_822
* [new branch] branch_823 -> branch_823
* [new branch] branch_824 -> branch_824
* [new branch] branch_825 -> branch_825
* [new branch] branch_826 -> branch_826
* [new branch] branch_827 -> branch_827
* [new branch] branch_828 -> branch_828
* [new branch] branch_829 -> branch_829
* [new branch] branch_830 -> branch_830
* [new branch] branch_831 -> branch_831
* [new branch] branch_832 -> branch_832
* [new branch] branch_833 -> branch_833
* [new branch] branch_834 -> branch_834
* [new branch] branch_835 -> branch_835
* [new branch] branch_836 -> branch_836
* [new branch] branch_837 -> branch_837
* [new branch] branch_838 -> branch_838
* [new branch] branch_839 -> branch_839
* [new branch] branch_840 -> branch_840
* [new branch] branch_841 -> branch_841
* [new branch] branch_842 -> branch_842
* [new branch] branch_843 -> branch_843
* [new branch] branch_844 -> branch_844
* [new branch] branch_845 -> branch_845
* [new branch] branch_846 -> branch_846
* [new branch] branch_847 -> branch_847
* [new branch] branch_848 -> branch_848
* [new branch] branch_849 -> branch_849
* [new branch] branch_850 -> branch_850
* [new branch] branch_851 -> branch_851
* [new branch] branch_852 -> branch_852
* [new branch] branch_853 -> branch_853
* [new branch] branch_854 -> branch_854
* [new branch] branch_855 -> branch_855
* [new branch] branch_856 -> branch_856
* [new branch] branch_857 -> branch_857
* [new branch] branch_858 -> branch_858
* [new branch] branch_859 -> branch_859
* [new branch] branch_860 -> branch_860
* [new branch] branch_861 -> branch_861
* [new branch] branch_862 -> branch_862
* [new branch] branch_863 -> branch_863
* [new branch] branch_864 -> branch_864
* [new branch] branch_865 -> branch_865
* [new branch] branch_866 -> branch_866
* [new branch] branch_867 -> branch_867
* [new branch] branch_868 -> branch_868
* [new branch] branch_869 -> branch_869
* [new branch] branch_870 -> branch_870
* [new branch] branch_871 -> branch_871
* [new branch] branch_872 -> branch_872
* [new branch] branch_873 -> branch_873
* [new branch] branch_874 -> branch_874
* [new branch] branch_875 -> branch_875
* [new branch] branch_876 -> branch_876
* [new branch] branch_877 -> branch_877
* [new branch] branch_878 -> branch_878
* [new branch] branch_879 -> branch_879
* [new branch] branch_880 -> branch_880
* [new branch] branch_881 -> branch_881
* [new branch] branch_882 -> branch_882
* [new branch] branch_883 -> branch_883
* [new branch] branch_884 -> branch_884
* [new branch] branch_885 -> branch_885
* [new branch] branch_886 -> branch_886
* [new branch] branch_887 -> branch_887
* [new branch] branch_888 -> branch_888
* [new branch] branch_889 -> branch_889
* [new branch] branch_890 -> branch_890
* [new branch] branch_891 -> branch_891
* [new branch] branch_892 -> branch_892
* [new branch] branch_893 -> branch_893
* [new branch] branch_894 -> branch_894
* [new branch] branch_895 -> branch_895
* [new branch] branch_896 -> branch_896
* [new branch] branch_897 -> branch_897
* [new branch] branch_898 -> branch_898
* [new branch] branch_899 -> branch_899
* [new branch] branch_900 -> branch_900
* [new branch] branch_901 -> branch_901
* [new branch] branch_902 -> branch_902
* [new branch] branch_903 -> branch_903
* [new branch] branch_904 -> branch_904
* [new branch] branch_905 -> branch_905
* [new branch] branch_906 -> branch_906
* [new branch] branch_907 -> branch_907
* [new branch] branch_908 -> branch_908
* [new branch] branch_909 -> branch_909
* [new branch] branch_910 -> branch_910
* [new branch] branch_911 -> branch_911
* [new branch] branch_912 -> branch_912
* [new branch] branch_913 -> branch_913
* [new branch] branch_914 -> branch_914
* [new branch] branch_915 -> branch_915
* [new branch] branch_916 -> branch_916
* [new branch] branch_917 -> branch_917
* [new branch] branch_918 -> branch_918
* [new branch] branch_919 -> branch_919
* [new branch] branch_920 -> branch_920
* [new branch] branch_921 -> branch_921
* [new branch] branch_922 -> branch_922
* [new branch] branch_923 -> branch_923
* [new branch] branch_924 -> branch_924
* [new branch] branch_925 -> branch_925
* [new branch] branch_926 -> branch_926
* [new branch] branch_927 -> branch_927
* [new branch] branch_928 -> branch_928
* [new branch] branch_929 -> branch_929
* [new branch] branch_930 -> branch_930
* [new branch] branch_931 -> branch_931
* [new branch] branch_932 -> branch_932
* [new branch] branch_933 -> branch_933
* [new branch] branch_934 -> branch_934
* [new branch] branch_935 -> branch_935
* [new branch] branch_936 -> branch_936
* [new branch] branch_937 -> branch_937
* [new branch] branch_938 -> branch_938
* [new branch] branch_939 -> branch_939
* [new branch] branch_940 -> branch_940
* [new branch] branch_941 -> branch_941
* [new branch] branch_942 -> branch_942
* [new branch] branch_943 -> branch_943
* [new branch] branch_944 -> branch_944
* [new branch] branch_945 -> branch_945
* [new branch] branch_946 -> branch_946
* [new branch] branch_947 -> branch_947
* [new branch] branch_948 -> branch_948
* [new branch] branch_949 -> branch_949
* [new branch] branch_950 -> branch_950
* [new branch] branch_951 -> branch_951
* [new branch] branch_952 -> branch_952
* [new branch] branch_953 -> branch_953
* [new branch] branch_954 -> branch_954
* [new branch] branch_955 -> branch_955
* [new branch] branch_956 -> branch_956
* [new branch] branch_957 -> branch_957
* [new branch] branch_958 -> branch_958
* [new branch] branch_959 -> branch_959
* [new branch] branch_960 -> branch_960
* [new branch] branch_961 -> branch_961
* [new branch] branch_962 -> branch_962
* [new branch] branch_963 -> branch_963
* [new branch] branch_964 -> branch_964
* [new branch] branch_965 -> branch_965
* [new branch] branch_966 -> branch_966
* [new branch] branch_967 -> branch_967
* [new branch] branch_968 -> branch_968
* [new branch] branch_969 -> branch_969
* [new branch] branch_970 -> branch_970
* [new branch] branch_971 -> branch_971
* [new branch] branch_972 -> branch_972
* [new branch] branch_973 -> branch_973
* [new branch] branch_974 -> branch_974
* [new branch] branch_975 -> branch_975
* [new branch] branch_976 -> branch_976
* [new branch] branch_977 -> branch_977
* [new branch] branch_978 -> branch_978
* [new branch] branch_979 -> branch_979
* [new branch] branch_980 -> branch_980
* [new branch] branch_981 -> branch_981
* [new branch] branch_982 -> branch_982
* [new branch] branch_983 -> branch_983
* [new branch] branch_984 -> branch_984
* [new branch] branch_985 -> branch_985
* [new branch] branch_986 -> branch_986
* [new branch] branch_987 -> branch_987
* [new branch] branch_988 -> branch_988
* [new branch] branch_989 -> branch_989
* [new branch] branch_990 -> branch_990
* [new branch] branch_991 -> branch_991
* [new branch] branch_992 -> branch_992
* [new branch] branch_993 -> branch_993
* [new branch] branch_994 -> branch_994
* [new branch] branch_995 -> branch_995
* [new branch] branch_996 -> branch_996
* [new branch] branch_997 -> branch_997
* [new branch] branch_998 -> branch_998
* [new branch] branch_999 -> branch_999
ok 13 - pre-receive hook that forgets to read its input
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5504-fetch-receive-strict.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5504-fetch-receive-strict/.git/
expecting success:
echo hello >greetings &&
git add greetings &&
git commit -m greetings &&
S=$(git rev-parse :greetings | sed -e "s|^..|&/|") &&
X=$(echo bye | git hash-object -w --stdin | sed -e "s|^..|&/|") &&
echo $S >S &&
echo $X >X &&
cp .git/objects/$S .git/objects/$S.back &&
mv -f .git/objects/$X .git/objects/$S &&
test_must_fail git fsck
[master (root-commit) a041bb5] greetings
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 greetings
bad sha1 file: .git/objects/ce/013625030ba8dba906f756967f9e9ca394464a.back
error: hash mismatch for .git/objects/ce/013625030ba8dba906f756967f9e9ca394464a (expected ce013625030ba8dba906f756967f9e9ca394464a)
error: ce013625030ba8dba906f756967f9e9ca394464a: object corrupt or missing: .git/objects/ce/013625030ba8dba906f756967f9e9ca394464a
missing blob ce013625030ba8dba906f756967f9e9ca394464a
ok 1 - setup and inject "corrupt or missing" object
expecting success:
rm -rf dst &&
git init dst &&
(
cd dst &&
git config fetch.fsckobjects false &&
git config transfer.fsckobjects false &&
test_must_fail git fetch ../.git master
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5504-fetch-receive-strict/dst/.git/
fatal: missing blob object 'ce013625030ba8dba906f756967f9e9ca394464a'
error: ../.git did not send all necessary objects
ok 2 - fetch without strict
expecting success:
rm -rf dst &&
git init dst &&
(
cd dst &&
git config fetch.fsckobjects false &&
git config transfer.fsckobjects true &&
test_must_fail git fetch ../.git master
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5504-fetch-receive-strict/dst/.git/
fatal: missing blob object 'ce013625030ba8dba906f756967f9e9ca394464a'
error: ../.git did not send all necessary objects
ok 3 - fetch with !fetch.fsckobjects
expecting success:
rm -rf dst &&
git init dst &&
(
cd dst &&
git config fetch.fsckobjects true &&
git config transfer.fsckobjects false &&
test_must_fail git fetch ../.git master
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5504-fetch-receive-strict/dst/.git/
fatal: object of unexpected type
fatal: unpack-objects failed
ok 4 - fetch with fetch.fsckobjects
expecting success:
rm -rf dst &&
git init dst &&
(
cd dst &&
git config transfer.fsckobjects true &&
test_must_fail git fetch ../.git master
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5504-fetch-receive-strict/dst/.git/
fatal: object of unexpected type
fatal: unpack-objects failed
ok 5 - fetch with transfer.fsckobjects
expecting success:
rm -rf dst &&
git init dst &&
(
cd dst &&
git config fetch.fsckobjects false &&
git config transfer.fsckobjects false
) &&
test_must_fail git push --porcelain dst master:refs/heads/test >act &&
test_cmp exp act
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5504-fetch-receive-strict/dst/.git/
remote: fatal: missing blob object 'ce013625030ba8dba906f756967f9e9ca394464a'
fatal: missing blob object 'ce013625030ba8dba906f756967f9e9ca394464a'
error: failed to push some refs to 'dst'
ok 6 - push without strict
expecting success:
rm -rf dst &&
git init dst &&
(
cd dst &&
git config receive.fsckobjects false &&
git config transfer.fsckobjects true
) &&
test_must_fail git push --porcelain dst master:refs/heads/test >act &&
test_cmp exp act
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5504-fetch-receive-strict/dst/.git/
remote: fatal: missing blob object 'ce013625030ba8dba906f756967f9e9ca394464a'
fatal: missing blob object 'ce013625030ba8dba906f756967f9e9ca394464a'
error: failed to push some refs to 'dst'
ok 7 - push with !receive.fsckobjects
expecting success:
rm -rf dst &&
git init dst &&
(
cd dst &&
git config receive.fsckobjects true &&
git config transfer.fsckobjects false
) &&
test_must_fail git push --porcelain dst master:refs/heads/test >act &&
test_cmp exp act
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5504-fetch-receive-strict/dst/.git/
remote: fatal: object of unexpected type
error: remote unpack failed: unpack-objects abnormal exit
error: failed to push some refs to 'dst'
ok 8 - push with receive.fsckobjects
expecting success:
rm -rf dst &&
git init dst &&
(
cd dst &&
git config transfer.fsckobjects true
) &&
test_must_fail git push --porcelain dst master:refs/heads/test >act &&
test_cmp exp act
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5504-fetch-receive-strict/dst/.git/
remote: fatal: object of unexpected type
error: remote unpack failed: unpack-objects abnormal exit
error: failed to push some refs to 'dst'
ok 9 - push with transfer.fsckobjects
expecting success:
mv -f .git/objects/$(cat S) .git/objects/$(cat X) &&
mv .git/objects/$(cat S).back .git/objects/$(cat S) &&
rm -rf .git/objects/$(cat X) &&
git fsck
ok 10 - repair the "corrupt or missing" object
expecting success:
commit="$(git hash-object -t commit -w --stdin <bogus-commit)"
ok 11 - setup bogus commit
expecting success:
test_must_fail git fsck 2>err &&
test_i18ngrep "missingEmail" err
dangling commit 6516fe4a6d0c9202861748d549d2e2b20e5210c9
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error in commit 6516fe4a6d0c9202861748d549d2e2b20e5210c9: missingEmail: invalid author/committer line - missing email
ok 12 - fsck with no skipList input
expecting success:
cat >SKIP.unsorted <<-EOF &&
0000000000000000000000000000000000000004
0000000000000000000000000000000000000002
$commit
0000000000000000000000000000000000000001
0000000000000000000000000000000000000003
EOF
sort SKIP.unsorted >SKIP.sorted
ok 13 - setup sorted and unsorted skipLists
expecting success:
git -c fsck.skipList=SKIP.sorted fsck
dangling commit 6516fe4a6d0c9202861748d549d2e2b20e5210c9
ok 14 - fsck with sorted skipList
expecting success:
git -c fsck.skipList=SKIP.unsorted fsck
dangling commit 6516fe4a6d0c9202861748d549d2e2b20e5210c9
ok 15 - fsck with unsorted skipList
expecting success:
git -c fsck.skipList=/dev/null -c fsck.missingEmail=ignore fsck &&
test_must_fail git -c fsck.skipList=does-not-exist -c fsck.missingEmail=ignore fsck 2>err &&
test_i18ngrep "could not open.*: does-not-exist" err &&
test_must_fail git -c fsck.skipList=.git/config -c fsck.missingEmail=ignore fsck 2>err &&
test_i18ngrep "invalid object name: \[core\]" err
dangling commit 6516fe4a6d0c9202861748d549d2e2b20e5210c9
fatal: could not open object name list: does-not-exist
fatal: invalid object name: [core]
ok 16 - fsck with invalid or bogus skipList input
expecting success:
cat >SKIP.with-comment <<-EOF &&
# Some bad commit
0000000000000000000000000000000000000001
EOF
test_must_fail git -c fsck.skipList=SKIP.with-comment fsck 2>err-with-comment &&
test_i18ngrep "missingEmail" err-with-comment &&
cat >SKIP.with-empty-line <<-EOF &&
0000000000000000000000000000000000000001
0000000000000000000000000000000000000002
EOF
test_must_fail git -c fsck.skipList=SKIP.with-empty-line fsck 2>err-with-empty-line &&
test_i18ngrep "missingEmail" err-with-empty-line
dangling commit 6516fe4a6d0c9202861748d549d2e2b20e5210c9
error in commit 6516fe4a6d0c9202861748d549d2e2b20e5210c9: missingEmail: invalid author/committer line - missing email
dangling commit 6516fe4a6d0c9202861748d549d2e2b20e5210c9
error in commit 6516fe4a6d0c9202861748d549d2e2b20e5210c9: missingEmail: invalid author/committer line - missing email
ok 17 - fsck with other accepted skipList input (comments & empty lines)
expecting success:
test_line_count = 1 err-with-comment &&
test_line_count = 1 err-with-empty-line
ok 18 - fsck no garbage output from comments & empty lines errors
expecting success:
echo $commit | test_copy_bytes 20 >SKIP.abbreviated &&
test_must_fail git -c fsck.skipList=SKIP.abbreviated fsck 2>err-abbreviated &&
test_i18ngrep "^fatal: invalid object name: " err-abbreviated
fatal: invalid object name: 6516fe4a6d0c92028617
ok 19 - fsck with invalid abbreviated skipList input
expecting success:
>SKIP.exhaustive &&
echo "# A commented line" >>SKIP.exhaustive &&
echo "" >>SKIP.exhaustive &&
echo " " >>SKIP.exhaustive &&
echo " # Comment after whitespace" >>SKIP.exhaustive &&
echo "$commit # Our bad commit (with leading whitespace and trailing comment)" >>SKIP.exhaustive &&
echo "# Some bad commit (leading whitespace)" >>SKIP.exhaustive &&
echo " 0000000000000000000000000000000000000001" >>SKIP.exhaustive &&
git -c fsck.skipList=SKIP.exhaustive fsck 2>err &&
test_must_be_empty err
dangling commit 6516fe4a6d0c9202861748d549d2e2b20e5210c9
ok 20 - fsck with exhaustive accepted skipList input (various types of comments etc.)
expecting success:
git push . $commit:refs/heads/bogus &&
rm -rf dst &&
git init dst &&
git --git-dir=dst/.git config receive.fsckObjects true &&
test_must_fail git push --porcelain dst bogus &&
echo $commit >dst/.git/SKIP &&
# receive.fsck.* does not fall back on fsck.*
git --git-dir=dst/.git config fsck.skipList SKIP &&
test_must_fail git push --porcelain dst bogus &&
# Invalid and/or bogus skipList input
git --git-dir=dst/.git config receive.fsck.skipList /dev/null &&
test_must_fail git push --porcelain dst bogus &&
git --git-dir=dst/.git config receive.fsck.skipList does-not-exist &&
test_must_fail git push --porcelain dst bogus 2>err &&
test_i18ngrep "could not open.*: does-not-exist" err &&
git --git-dir=dst/.git config receive.fsck.skipList config &&
test_must_fail git push --porcelain dst bogus 2>err &&
test_i18ngrep "invalid object name: \[core\]" err &&
git --git-dir=dst/.git config receive.fsck.skipList SKIP &&
git push --porcelain dst bogus
To .
* [new branch] 6516fe4a6d0c9202861748d549d2e2b20e5210c9 -> bogus
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5504-fetch-receive-strict/dst/.git/
remote: error: object 6516fe4a6d0c9202861748d549d2e2b20e5210c9: missingEmail: invalid author/committer line - missing email
remote: fatal: fsck error in packed object
error: remote unpack failed: unpack-objects abnormal exit
error: failed to push some refs to 'dst'
To dst
! refs/heads/bogus:refs/heads/bogus [remote rejected] (unpacker error)
remote: error: object 6516fe4a6d0c9202861748d549d2e2b20e5210c9: missingEmail: invalid author/committer line - missing email
remote: fatal: fsck error in packed object
error: remote unpack failed: unpack-objects abnormal exit
error: failed to push some refs to 'dst'
To dst
! refs/heads/bogus:refs/heads/bogus [remote rejected] (unpacker error)
remote: error: object 6516fe4a6d0c9202861748d549d2e2b20e5210c9: missingEmail: invalid author/committer line - missing email
remote: fatal: fsck error in packed object
error: remote unpack failed: unpack-objects abnormal exit
error: failed to push some refs to 'dst'
To dst
! refs/heads/bogus:refs/heads/bogus [remote rejected] (unpacker error)
To dst
! refs/heads/bogus:refs/heads/bogus [remote rejected] (unpacker error)
remote: fatal: could not open object name list: does-not-exist
To dst
! refs/heads/bogus:refs/heads/bogus [remote rejected] (unpacker error)
remote: fatal: invalid object name: [core]
To dst
* refs/heads/bogus:refs/heads/bogus [new branch]
Done
ok 21 - push with receive.fsck.skipList
expecting success:
refspec=refs/heads/bogus:refs/heads/bogus &&
git push . $commit:refs/heads/bogus &&
rm -rf dst &&
git init dst &&
git --git-dir=dst/.git config fetch.fsckObjects true &&
test_must_fail git --git-dir=dst/.git fetch "file://$(pwd)" $refspec &&
git --git-dir=dst/.git config fetch.fsck.skipList /dev/null &&
test_must_fail git --git-dir=dst/.git fetch "file://$(pwd)" $refspec &&
echo $commit >dst/.git/SKIP &&
# fetch.fsck.* does not fall back on fsck.*
git --git-dir=dst/.git config fsck.skipList dst/.git/SKIP &&
test_must_fail git --git-dir=dst/.git fetch "file://$(pwd)" $refspec &&
# Invalid and/or bogus skipList input
git --git-dir=dst/.git config fetch.fsck.skipList /dev/null &&
test_must_fail git --git-dir=dst/.git fetch "file://$(pwd)" $refspec &&
git --git-dir=dst/.git config fetch.fsck.skipList does-not-exist &&
test_must_fail git --git-dir=dst/.git fetch "file://$(pwd)" $refspec 2>err &&
test_i18ngrep "could not open.*: does-not-exist" err &&
git --git-dir=dst/.git config fetch.fsck.skipList dst/.git/config &&
test_must_fail git --git-dir=dst/.git fetch "file://$(pwd)" $refspec 2>err &&
test_i18ngrep "invalid object name: \[core\]" err &&
git --git-dir=dst/.git config fetch.fsck.skipList dst/.git/SKIP &&
git --git-dir=dst/.git fetch "file://$(pwd)" $refspec
Everything up-to-date
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5504-fetch-receive-strict/dst/.git/
error: object 6516fe4a6d0c9202861748d549d2e2b20e5210c9: missingEmail: invalid author/committer line - missing email
fatal: fsck error in packed object
fatal: unpack-objects failed
error: object 6516fe4a6d0c9202861748d549d2e2b20e5210c9: missingEmail: invalid author/committer line - missing email
fatal: fsck error in packed object
fatal: unpack-objects failed
error: object 6516fe4a6d0c9202861748d549d2e2b20e5210c9: missingEmail: invalid author/committer line - missing email
fatal: fsck error in packed object
fatal: unpack-objects failed
error: object 6516fe4a6d0c9202861748d549d2e2b20e5210c9: missingEmail: invalid author/committer line - missing email
fatal: fsck error in packed object
fatal: unpack-objects failed
fatal: could not open object name list: does-not-exist
fatal: invalid object name: [core]
From file:///<<PKGBUILDDIR>>/t/trash directory.t5504-fetch-receive-strict
* [new branch] bogus -> bogus
ok 22 - fetch with fetch.fsck.skipList
expecting success:
test_must_fail git -c fsck.whatEver=ignore fsck 2>err &&
test_i18ngrep "Unhandled message id: whatever" err
fatal: Unhandled message id: whatever
ok 23 - fsck.<unknownmsg-id> dies
expecting success:
git push . $commit:refs/heads/bogus &&
rm -rf dst &&
git init dst &&
git --git-dir=dst/.git config receive.fsckobjects true &&
test_must_fail git push --porcelain dst bogus &&
# receive.fsck.<msg-id> does not fall back on fsck.<msg-id>
git --git-dir=dst/.git config fsck.missingEmail warn &&
test_must_fail git push --porcelain dst bogus &&
# receive.fsck.<unknownmsg-id> warns
git --git-dir=dst/.git config \
receive.fsck.whatEver error &&
git --git-dir=dst/.git config \
receive.fsck.missingEmail warn &&
git push --porcelain dst bogus >act 2>&1 &&
grep "missingEmail" act &&
test_i18ngrep "Skipping unknown msg id.*whatever" act &&
git --git-dir=dst/.git branch -D bogus &&
git --git-dir=dst/.git config --add \
receive.fsck.missingEmail ignore &&
git push --porcelain dst bogus >act 2>&1 &&
! grep "missingEmail" act
Everything up-to-date
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5504-fetch-receive-strict/dst/.git/
remote: error: object 6516fe4a6d0c9202861748d549d2e2b20e5210c9: missingEmail: invalid author/committer line - missing email
remote: fatal: fsck error in packed object
error: remote unpack failed: unpack-objects abnormal exit
error: failed to push some refs to 'dst'
To dst
! refs/heads/bogus:refs/heads/bogus [remote rejected] (unpacker error)
remote: error: object 6516fe4a6d0c9202861748d549d2e2b20e5210c9: missingEmail: invalid author/committer line - missing email
remote: fatal: fsck error in packed object
error: remote unpack failed: unpack-objects abnormal exit
error: failed to push some refs to 'dst'
To dst
! refs/heads/bogus:refs/heads/bogus [remote rejected] (unpacker error)
remote: warning: object 6516fe4a6d0c9202861748d549d2e2b20e5210c9: missingEmail: invalid author/committer line - missing email
warning: Skipping unknown msg id 'whatever'
Deleted branch bogus (was 6516fe4).
ok 24 - push with receive.fsck.missingEmail=warn
expecting success:
refspec=refs/heads/bogus:refs/heads/bogus &&
git push . $commit:refs/heads/bogus &&
rm -rf dst &&
git init dst &&
git --git-dir=dst/.git config fetch.fsckobjects true &&
test_must_fail git --git-dir=dst/.git fetch "file://$(pwd)" $refspec &&
# fetch.fsck.<msg-id> does not fall back on fsck.<msg-id>
git --git-dir=dst/.git config fsck.missingEmail warn &&
test_must_fail git --git-dir=dst/.git fetch "file://$(pwd)" $refspec &&
# receive.fsck.<unknownmsg-id> warns
git --git-dir=dst/.git config \
fetch.fsck.whatEver error &&
git --git-dir=dst/.git config \
fetch.fsck.missingEmail warn &&
git --git-dir=dst/.git fetch "file://$(pwd)" $refspec >act 2>&1 &&
grep "missingEmail" act &&
test_i18ngrep "Skipping unknown msg id.*whatever" act &&
rm -rf dst &&
git init dst &&
git --git-dir=dst/.git config fetch.fsckobjects true &&
git --git-dir=dst/.git config \
fetch.fsck.missingEmail ignore &&
git --git-dir=dst/.git fetch "file://$(pwd)" $refspec >act 2>&1 &&
! grep "missingEmail" act
Everything up-to-date
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5504-fetch-receive-strict/dst/.git/
error: object 6516fe4a6d0c9202861748d549d2e2b20e5210c9: missingEmail: invalid author/committer line - missing email
fatal: fsck error in packed object
fatal: unpack-objects failed
error: object 6516fe4a6d0c9202861748d549d2e2b20e5210c9: missingEmail: invalid author/committer line - missing email
fatal: fsck error in packed object
fatal: unpack-objects failed
warning: object 6516fe4a6d0c9202861748d549d2e2b20e5210c9: missingEmail: invalid author/committer line - missing email
warning: Skipping unknown msg id 'whatever'
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5504-fetch-receive-strict/dst/.git/
ok 25 - fetch with fetch.fsck.missingEmail=warn
expecting success:
rm -rf dst &&
git init dst &&
git --git-dir=dst/.git config receive.fsckobjects true &&
git --git-dir=dst/.git config \
receive.fsck.unterminatedheader warn &&
test_must_fail git push --porcelain dst HEAD >act 2>&1 &&
grep "Cannot demote unterminatedheader" act
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5504-fetch-receive-strict/dst/.git/
remote: fatal: Cannot demote unterminatedheader to warn
ok 26 - receive.fsck.unterminatedHeader=warn triggers error
expecting success:
rm -rf dst &&
git init dst &&
git --git-dir=dst/.git config fetch.fsckobjects true &&
git --git-dir=dst/.git config \
fetch.fsck.unterminatedheader warn &&
test_must_fail git --git-dir=dst/.git fetch "file://$(pwd)" HEAD &&
grep "Cannot demote unterminatedheader" act
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5504-fetch-receive-strict/dst/.git/
fatal: Cannot demote unterminatedheader to warn
fatal: unpack-objects failed
remote: fatal: Cannot demote unterminatedheader to warn
ok 27 - fetch.fsck.unterminatedHeader=warn triggers error
# passed all 27 test(s)
1..27
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5506-remote-groups.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5506-remote-groups/.git/
expecting success:
mkdir one && (cd one && git init) &&
mkdir two && (cd two && git init) &&
git remote add -m master one one &&
git remote add -m master two two
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5506-remote-groups/one/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5506-remote-groups/two/.git/
ok 1 - setup
expecting success:
mark update-all &&
update_repos &&
git remote update &&
repo_fetched one &&
repo_fetched two
[master (root-commit) ce1b32c] update-all
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master (root-commit) ce1b32c] update-all
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Fetching one
From one
* [new branch] master -> one/master
Fetching two
From two
* [new branch] master -> two/master
repo was fetched: one
repo was fetched: two
ok 2 - no group updates all
expecting success:
mark nonexistent &&
update_repos &&
test_must_fail git remote update nonexistent &&
! repo_fetched one &&
! repo_fetched two
[master 3f67f52] nonexistent
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 3f67f52] nonexistent
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
fatal: No such remote or remote group: nonexistent
repo was not fetched: one
repo was not fetched: two
ok 3 - nonexistent group produces error
expecting success:
mark group-all &&
update_repos &&
git config --add remotes.all one &&
git config --add remotes.all two &&
git remote update all &&
repo_fetched one &&
repo_fetched two
[master bbe4595] group-all
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master bbe4595] group-all
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Fetching one
From one
ce1b32c..bbe4595 master -> one/master
Fetching two
From two
ce1b32c..bbe4595 master -> two/master
repo was fetched: one
repo was fetched: two
ok 4 - updating group updates all members (remote update)
expecting success:
mark fetch-group-all &&
update_repos &&
git fetch all &&
repo_fetched one &&
repo_fetched two
[master 0f19bb5] fetch-group-all
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 0f19bb5] fetch-group-all
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Fetching one
From one
bbe4595..0f19bb5 master -> one/master
Fetching two
From two
bbe4595..0f19bb5 master -> two/master
repo was fetched: one
repo was fetched: two
ok 5 - updating group updates all members (fetch)
expecting success:
mark group-some &&
update_repos &&
git config --add remotes.some one &&
git remote update some &&
repo_fetched one &&
! repo_fetched two
[master 6e514b3] group-some
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 6e514b3] group-some
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Fetching one
From one
0f19bb5..6e514b3 master -> one/master
repo was fetched: one
repo was not fetched: two
ok 6 - updating group does not update non-members (remote update)
expecting success:
mark fetch-group-some &&
update_repos &&
git config --add remotes.some one &&
git remote update some &&
repo_fetched one &&
! repo_fetched two
[master ac4cad0] fetch-group-some
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master ac4cad0] fetch-group-some
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Fetching one
From one
6e514b3..ac4cad0 master -> one/master
Fetching one
repo was fetched: one
repo was not fetched: two
ok 7 - updating group does not update non-members (fetch)
expecting success:
mark remote-name &&
update_repos &&
git remote update one &&
repo_fetched one &&
! repo_fetched two
[master 51f0a24] remote-name
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 51f0a24] remote-name
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Fetching one
From one
ac4cad0..51f0a24 master -> one/master
repo was fetched: one
repo was not fetched: two
ok 8 - updating remote name updates that remote
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5507-remote-environment.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5507-remote-environment/.git/
expecting success:
test_commit one &&
git config push.default current &&
git init remote
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5507-remote-environment/remote/.git/
ok 1 - set up "remote" push situation
expecting success:
GIT_SSH_COMMAND="f() {
cd \"\$TRASH_DIRECTORY\" &&
eval \"\$2\"
}; f" &&
export GIT_SSH_COMMAND &&
export TRASH_DIRECTORY
ok 2 - set up fake ssh
expecting success:
test_must_fail git push remote
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: is denied, because it will make the index and work tree inconsistent
remote: with what you pushed, and will require 'git reset --hard' to match
remote: the work tree to HEAD.
remote:
remote: You can set the 'receive.denyCurrentBranch' configuration variable
remote: to 'ignore' or 'warn' in the remote repository to allow pushing into
remote: its current branch; however, this is not recommended unless you
remote: arranged to update its work tree to match what you pushed in some
remote: other way.
remote:
remote: To squelch this message and still keep the default behaviour, set
remote: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To remote
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'remote'
ok 3 - confirm default push fails
expecting success:
test_must_fail git -c receive.denyCurrentBranch=false push remote
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: is denied, because it will make the index and work tree inconsistent
remote: with what you pushed, and will require 'git reset --hard' to match
remote: the work tree to HEAD.
remote:
remote: You can set the 'receive.denyCurrentBranch' configuration variable
remote: to 'ignore' or 'warn' in the remote repository to allow pushing into
remote: its current branch; however, this is not recommended unless you
remote: arranged to update its work tree to match what you pushed in some
remote: other way.
remote:
remote: To squelch this message and still keep the default behaviour, set
remote: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To remote
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'remote'
ok 4 - config does not travel over same-machine push
expecting success:
test_must_fail git -c receive.denyCurrentBranch=false push host:remote
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: is denied, because it will make the index and work tree inconsistent
remote: with what you pushed, and will require 'git reset --hard' to match
remote: the work tree to HEAD.
remote:
remote: You can set the 'receive.denyCurrentBranch' configuration variable
remote: to 'ignore' or 'warn' in the remote repository to allow pushing into
remote: its current branch; however, this is not recommended unless you
remote: arranged to update its work tree to match what you pushed in some
remote: other way.
remote:
remote: To squelch this message and still keep the default behaviour, set
remote: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To host:remote
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'host:remote'
ok 5 - config does not travel over ssh push
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5509-fetch-push-namespaces.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5509-fetch-push-namespaces/.git/
expecting success:
git config --global protocol.ext.allow user &&
test_tick &&
git init original &&
(
cd original &&
echo 0 >count &&
git add count &&
test_commit 0 &&
echo 1 >count &&
git add count &&
test_commit 1 &&
git remote add pushee-namespaced "ext::git --namespace=namespace %s ../pushee" &&
git remote add pushee-unnamespaced ../pushee
) &&
commit0=$(cd original && git rev-parse HEAD^) &&
commit1=$(cd original && git rev-parse HEAD) &&
git init pushee &&
git init puller
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5509-fetch-push-namespaces/original/.git/
[master (root-commit) fbdf431] 0
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 0.t
create mode 100644 count
[master dc65a2e] 1
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 1.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5509-fetch-push-namespaces/pushee/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5509-fetch-push-namespaces/puller/.git/
ok 1 - setup
expecting success:
(
cd original &&
git push pushee-namespaced master &&
git ls-remote pushee-namespaced >actual &&
printf "$commit1\trefs/heads/master\n" >expected &&
test_cmp expected actual &&
git push pushee-namespaced --tags &&
git ls-remote pushee-namespaced >actual &&
printf "$commit0\trefs/tags/0\n" >>expected &&
printf "$commit1\trefs/tags/1\n" >>expected &&
test_cmp expected actual &&
# Verify that the GIT_NAMESPACE environment variable works as well
GIT_NAMESPACE=namespace git ls-remote "ext::git %s ../pushee" >actual &&
test_cmp expected actual &&
# Verify that --namespace overrides GIT_NAMESPACE
GIT_NAMESPACE=garbage git ls-remote pushee-namespaced >actual &&
test_cmp expected actual &&
# Try a namespace with no content
git ls-remote "ext::git --namespace=garbage %s ../pushee" >actual &&
test_must_be_empty actual &&
git ls-remote pushee-unnamespaced >actual &&
sed -e "s|refs/|refs/namespaces/namespace/refs/|" expected >expected.unnamespaced &&
test_cmp expected.unnamespaced actual
)
To ext::git --namespace=namespace %s ../pushee
* [new branch] master -> master
To ext::git --namespace=namespace %s ../pushee
* [new tag] 0 -> 0
* [new tag] 1 -> 1
ok 2 - pushing into a repository using a ref namespace
expecting success:
(
cd puller &&
git remote add -f pushee-namespaced "ext::git --namespace=namespace %s ../pushee" &&
git for-each-ref refs/ >actual &&
printf "$commit1 commit\trefs/remotes/pushee-namespaced/master\n" >expected &&
printf "$commit0 commit\trefs/tags/0\n" >>expected &&
printf "$commit1 commit\trefs/tags/1\n" >>expected &&
test_cmp expected actual
)
Updating pushee-namespaced
From ext::git --namespace=namespace %s ../pushee
* [new branch] master -> pushee-namespaced/master
* [new tag] 1 -> 1
* [new tag] 0 -> 0
Bad commandok 3 - pulling from a repository using a ref namespace
expecting success:
git clone --mirror pushee mirror &&
(
cd mirror &&
git for-each-ref refs/ >actual &&
printf "$commit1 commit\trefs/namespaces/namespace/refs/heads/master\n" >expected &&
printf "$commit0 commit\trefs/namespaces/namespace/refs/tags/0\n" >>expected &&
printf "$commit1 commit\trefs/namespaces/namespace/refs/tags/1\n" >>expected &&
test_cmp expected actual
)
Cloning into bare repository 'mirror'...
done.
ok 4 - mirroring a repository using a ref namespace
expecting success:
GIT_NAMESPACE=namespace \
git -C pushee -c transfer.hideRefs=refs/tags \
ls-remote "ext::git %s ." >actual &&
printf "$commit1\trefs/heads/master\n" >expected &&
test_cmp expected actual
ok 5 - hide namespaced refs with transfer.hideRefs
expecting success:
GIT_NAMESPACE=namespace \
git -C pushee -c transfer.hideRefs=refs/namespaces/namespace/refs/tags \
ls-remote "ext::git %s ." >actual &&
printf "$commit1\trefs/heads/master\n" >expected &&
printf "$commit0\trefs/tags/0\n" >>expected &&
printf "$commit1\trefs/tags/1\n" >>expected &&
test_cmp expected actual
ok 6 - check that transfer.hideRefs does not match unstripped refs
expecting success:
GIT_NAMESPACE=namespace \
git -C pushee -c transfer.hideRefs="^refs/namespaces/namespace/refs/tags" \
ls-remote "ext::git %s ." >actual &&
printf "$commit1\trefs/heads/master\n" >expected &&
test_cmp expected actual
ok 7 - hide full refs with transfer.hideRefs
expecting success:
test_config -C pushee transfer.hideRefs refs/heads/master &&
test_must_fail git -C original push pushee-namespaced master
To ext::git --namespace=namespace %s ../pushee
! [remote rejected] master -> master (deny updating a hidden ref)
error: failed to push some refs to 'ext::git --namespace=namespace %s ../pushee'
ok 8 - try to update a hidden ref
expecting success:
test_config -C pushee transfer.hideRefs refs/namespaces/namespace/refs/heads/master &&
git -C original push pushee-namespaced master
Everything up-to-date
ok 9 - try to update a ref that is not hidden
expecting success:
test_config -C pushee transfer.hideRefs "^refs/namespaces/namespace/refs/heads/master" &&
test_must_fail git -C original push pushee-namespaced master
To ext::git --namespace=namespace %s ../pushee
! [remote rejected] master -> master (deny updating a hidden ref)
error: failed to push some refs to 'ext::git --namespace=namespace %s ../pushee'
ok 10 - try to update a hidden full ref
expecting success:
git init ambiguous &&
(
cd ambiguous &&
git commit --allow-empty -m foo &&
git update-ref refs/namespaces/ns/refs/heads/one HEAD &&
git update-ref refs/namespaces/ns/refs/heads/two HEAD &&
git symbolic-ref refs/namespaces/ns/HEAD \
refs/namespaces/ns/refs/heads/two
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5509-fetch-push-namespaces/ambiguous/.git/
[master (root-commit) cbc461b] foo
Author: A U Thor <author@example.com>
ok 11 - set up ambiguous HEAD
expecting success:
GIT_NAMESPACE=ns git -c protocol.version=0 \
clone ambiguous ambiguous-v0 &&
echo refs/heads/two >expect &&
git -C ambiguous-v0 symbolic-ref HEAD >actual &&
test_cmp expect actual
Cloning into 'ambiguous-v0'...
done.
ok 12 - clone chooses correct HEAD (v0)
expecting success:
GIT_NAMESPACE=ns git -c protocol.version=2 \
clone ambiguous ambiguous-v2 &&
echo refs/heads/two >expect &&
git -C ambiguous-v2 symbolic-ref HEAD >actual &&
test_cmp expect actual
Cloning into 'ambiguous-v2'...
done.
ok 13 - clone chooses correct HEAD (v2)
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5511-refspec.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5511-refspec/.git/
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec ''
ok 1 - push (invalid)
expecting success: git ls-remote frotz
ok 2 - push :
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec '::'
ok 3 - push :: (invalid)
expecting success: git ls-remote frotz
ok 4 - push +:
expecting success: git ls-remote frotz
ok 5 - fetch
expecting success: git ls-remote frotz
ok 6 - fetch :
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec '::'
ok 7 - fetch :: (invalid)
expecting success: git ls-remote frotz
ok 8 - push refs/heads/*:refs/remotes/frotz/*
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec 'refs/heads/*:refs/remotes/frotz'
ok 9 - push refs/heads/*:refs/remotes/frotz (invalid)
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec 'refs/heads:refs/remotes/frotz/*'
ok 10 - push refs/heads:refs/remotes/frotz/* (invalid)
expecting success: git ls-remote frotz
ok 11 - push refs/heads/master:refs/remotes/frotz/xyzzy
expecting success: git ls-remote frotz
ok 12 - fetch refs/heads/*:refs/remotes/frotz/*
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec 'refs/heads/*:refs/remotes/frotz'
ok 13 - fetch refs/heads/*:refs/remotes/frotz (invalid)
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec 'refs/heads:refs/remotes/frotz/*'
ok 14 - fetch refs/heads:refs/remotes/frotz/* (invalid)
expecting success: git ls-remote frotz
ok 15 - fetch refs/heads/master:refs/remotes/frotz/xyzzy
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec 'refs/heads/master::refs/remotes/frotz/xyzzy'
ok 16 - fetch refs/heads/master::refs/remotes/frotz/xyzzy (invalid)
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec 'refs/heads/maste :refs/remotes/frotz/xyzzy'
ok 17 - fetch refs/heads/maste :refs/remotes/frotz/xyzzy (invalid)
expecting success: git ls-remote frotz
ok 18 - push master~1:refs/remotes/frotz/backup
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec 'master~1:refs/remotes/frotz/backup'
ok 19 - fetch master~1:refs/remotes/frotz/backup (invalid)
expecting success: git ls-remote frotz
ok 20 - push HEAD~4:refs/remotes/frotz/new
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec 'HEAD~4:refs/remotes/frotz/new'
ok 21 - fetch HEAD~4:refs/remotes/frotz/new (invalid)
expecting success: git ls-remote frotz
ok 22 - push HEAD
expecting success: git ls-remote frotz
ok 23 - fetch HEAD
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec 'refs/heads/ nitfol'
ok 24 - push refs/heads/ nitfol (invalid)
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec 'refs/heads/ nitfol'
ok 25 - fetch refs/heads/ nitfol (invalid)
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec 'HEAD:'
ok 26 - push HEAD: (invalid)
expecting success: git ls-remote frotz
ok 27 - fetch HEAD:
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec 'refs/heads/ nitfol:'
ok 28 - push refs/heads/ nitfol: (invalid)
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec 'refs/heads/ nitfol:'
ok 29 - fetch refs/heads/ nitfol: (invalid)
expecting success: git ls-remote frotz
ok 30 - push :refs/remotes/frotz/deleteme
expecting success: git ls-remote frotz
ok 31 - fetch :refs/remotes/frotz/HEAD-to-me
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec ':refs/remotes/frotz/delete me'
ok 32 - push :refs/remotes/frotz/delete me (invalid)
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec ':refs/remotes/frotz/HEAD to me'
ok 33 - fetch :refs/remotes/frotz/HEAD to me (invalid)
expecting success: git ls-remote frotz
ok 34 - fetch refs/heads/*/for-linus:refs/remotes/mine/*-blah
expecting success: git ls-remote frotz
ok 35 - push refs/heads/*/for-linus:refs/remotes/mine/*-blah
expecting success: git ls-remote frotz
ok 36 - fetch refs/heads*/for-linus:refs/remotes/mine/*
expecting success: git ls-remote frotz
ok 37 - push refs/heads*/for-linus:refs/remotes/mine/*
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec 'refs/heads/*/*/for-linus:refs/remotes/mine/*'
ok 38 - fetch refs/heads/*/*/for-linus:refs/remotes/mine/* (invalid)
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec 'refs/heads/*/*/for-linus:refs/remotes/mine/*'
ok 39 - push refs/heads/*/*/for-linus:refs/remotes/mine/* (invalid)
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec 'refs/heads/*g*/for-linus:refs/remotes/mine/*'
ok 40 - fetch refs/heads/*g*/for-linus:refs/remotes/mine/* (invalid)
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec 'refs/heads/*g*/for-linus:refs/remotes/mine/*'
ok 41 - push refs/heads/*g*/for-linus:refs/remotes/mine/* (invalid)
expecting success: git ls-remote frotz
ok 42 - fetch refs/heads/*/for-linus:refs/remotes/mine/*
expecting success: git ls-remote frotz
ok 43 - push refs/heads/*/for-linus:refs/remotes/mine/*
expecting success: git ls-remote frotz
ok 44 - fetch refs/heads/Ä
expecting success: test_must_fail git ls-remote frotz
fatal: invalid refspec 'refs/heads/ tab'
ok 45 - fetch refs/heads/ tab (invalid)
# passed all 45 test(s)
1..45
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5512-ls-remote.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5512-ls-remote/.git/
expecting success:
>file &&
git add file &&
test_tick &&
git commit -m initial &&
git tag mark &&
git tag mark1.1 &&
git tag mark1.2 &&
git tag mark1.10 &&
git show-ref --tags -d | sed -e "s/ / /" >expected.tag &&
(
echo "$(git rev-parse HEAD) HEAD" &&
git show-ref -d | sed -e "s/ / /"
) >expected.all &&
git remote add self "$(pwd)/.git"
[master (root-commit) 1bd44cb] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
ok 1 - setup
expecting success:
git ls-remote --tags .git >actual &&
test_cmp expected.tag actual
ok 2 - ls-remote --tags .git
expecting success:
git ls-remote .git >actual &&
test_cmp expected.all actual
ok 3 - ls-remote .git
expecting success:
git ls-remote --tags self >actual &&
test_cmp expected.tag actual
ok 4 - ls-remote --tags self
expecting success:
git ls-remote self >actual &&
test_cmp expected.all actual
ok 5 - ls-remote self
expecting success:
cat >expect <<-EOF &&
$(git rev-parse mark) refs/tags/mark
$(git rev-parse mark1.1) refs/tags/mark1.1
$(git rev-parse mark1.2) refs/tags/mark1.2
$(git rev-parse mark1.10) refs/tags/mark1.10
EOF
git ls-remote --sort="version:refname" --tags self >actual &&
test_cmp expect actual
ok 6 - ls-remote --sort="version:refname" --tags self
expecting success:
cat >expect <<-EOF &&
$(git rev-parse mark1.10) refs/tags/mark1.10
$(git rev-parse mark1.2) refs/tags/mark1.2
$(git rev-parse mark1.1) refs/tags/mark1.1
$(git rev-parse mark) refs/tags/mark
EOF
git ls-remote --sort="-version:refname" --tags self >actual &&
test_cmp expect actual
ok 7 - ls-remote --sort="-version:refname" --tags self
expecting success:
cat >expect <<-EOF &&
$(git rev-parse mark1.2) refs/tags/mark1.2
$(git rev-parse mark1.10) refs/tags/mark1.10
$(git rev-parse mark1.1) refs/tags/mark1.1
$(git rev-parse mark) refs/tags/mark
EOF
git ls-remote --sort="-refname" --tags self >actual &&
test_cmp expect actual
ok 8 - ls-remote --sort="-refname" --tags self
expecting success:
test_must_fail git ls-remote
fatal: No remote configured to list refs from.
ok 9 - dies when no remote specified and no default remotes found
expecting success:
URL="$(pwd)/.git" &&
echo "From $URL" >exp_err &&
git remote add origin "$URL" &&
git ls-remote 2>actual_err >actual &&
test_cmp exp_err actual_err &&
test_cmp expected.all actual
ok 10 - use "origin" when no remote specified
expecting success:
git ls-remote -q 2>actual_err &&
test_must_fail test_cmp exp_err actual_err
1bd44cb9d13204b0fe1958db0082f5028a16eb3a HEAD
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/heads/master
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/tags/mark
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/tags/mark1.1
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/tags/mark1.10
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/tags/mark1.2
--- exp_err 2019-08-14 07:31:01.849663616 +0000
+++ actual_err 2019-08-14 07:31:01.921664531 +0000
@@ -1 +0,0 @@
-From /<<PKGBUILDDIR>>/t/trash directory.t5512-ls-remote/.git
ok 11 - suppress "From <url>" with -q
expecting success:
#
# Test that we are indeed using branch.<name>.remote, not "origin", even
# though the "origin" remote has been set.
#
# setup a new remote to differentiate from "origin"
git clone . other.git &&
(
cd other.git &&
echo "$(git rev-parse HEAD) HEAD" &&
git show-ref | sed -e "s/ / /"
) >exp &&
URL="other.git" &&
echo "From $URL" >exp_err &&
git remote add other $URL &&
git config branch.master.remote other &&
git ls-remote 2>actual_err >actual &&
test_cmp exp_err actual_err &&
test_cmp exp actual
Cloning into 'other.git'...
done.
ok 12 - use branch.<name>.remote if possible
expecting success:
if test_have_prereq MINGW
then
# Windows does not like asterisks in pathname
does_not_exist=master
else
does_not_exist="refs*master"
fi &&
cat >exp <<-EOF &&
fatal: '$does_not_exist' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
EOF
#
# Do not expect "git ls-remote <pattern>" to work; ls-remote needs
# <remote> if you want to feed <pattern>, just like you cannot say
# fetch <branch>.
# We could just as easily have used "master"; the "*" emphasizes its
# role as a pattern.
test_must_fail git ls-remote "$does_not_exist" >actual 2>&1 &&
test_i18ncmp exp actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 13 - confuses pattern as remote when no remote specified
expecting success:
{
git ls-remote --exit-code ./no-such-repository
status=$?
} &&
test $status != 2 && test $status != 0
fatal: './no-such-repository' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 14 - die with non-2 for wrong repository even with --exit-code
expecting success:
git ls-remote other.git "refs/nsn/*" >actual &&
test_must_be_empty actual
ok 15 - Report success even when nothing matches
expecting success:
test_expect_code 2 git ls-remote --exit-code other.git "refs/nsn/*" >actual &&
test_must_be_empty actual
ok 16 - Report no-match with --exit-code
expecting success:
git ls-remote --exit-code other.git "refs/tags/*" >actual &&
git ls-remote . tags/mark* >expect &&
test_cmp expect actual
ok 17 - Report match with --exit-code
expecting success:
git tag magic/one &&
git tag magic/two
ok 18 - set up some extra tags for ref hiding
expecting success:
test_config $configsection.hiderefs refs/tags &&
git ls-remote . >actual &&
test_unconfig $configsection.hiderefs &&
git ls-remote . |
sed -e "/ refs\/tags\//d" >expect &&
test_cmp expect actual
ok 19 - Hide some refs with transfer.hiderefs
expecting success:
test_when_finished "test_unconfig $configsection.hiderefs" &&
git config --add $configsection.hiderefs refs/tags &&
git config --add $configsection.hiderefs "!refs/tags/magic" &&
git config --add $configsection.hiderefs refs/tags/magic/one &&
git ls-remote . >actual &&
grep refs/tags/magic/two actual &&
! grep refs/tags/magic/one actual
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/tags/magic/two
ok 20 - Override hiding of transfer.hiderefs
expecting success:
test_config $configsection.hiderefs refs/tags &&
git ls-remote . >actual &&
test_unconfig $configsection.hiderefs &&
git ls-remote . |
sed -e "/ refs\/tags\//d" >expect &&
test_cmp expect actual
ok 21 - Hide some refs with uploadpack.hiderefs
expecting success:
test_when_finished "test_unconfig $configsection.hiderefs" &&
git config --add $configsection.hiderefs refs/tags &&
git config --add $configsection.hiderefs "!refs/tags/magic" &&
git config --add $configsection.hiderefs refs/tags/magic/one &&
git ls-remote . >actual &&
grep refs/tags/magic/two actual &&
! grep refs/tags/magic/one actual
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/tags/magic/two
ok 22 - Override hiding of uploadpack.hiderefs
expecting success:
test_config uploadpack.hiderefs refs/tags &&
test_config transfer.hiderefs "!refs/tags/magic" &&
git ls-remote . >actual &&
grep refs/tags/magic actual
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/tags/magic/one
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/tags/magic/two
ok 23 - overrides work between mixed transfer/upload-pack hideRefs
expecting success:
test_config uploadpack.hiderefs refs/tags &&
git -c protocol.version=2 ls-remote . >actual &&
! grep refs/tags actual
ok 24 - protocol v2 supports hiderefs
expecting success:
git fetch origin &&
cat >expect <<-EOF &&
ref: refs/heads/master HEAD
$(git rev-parse HEAD) HEAD
$(git rev-parse refs/heads/master) refs/heads/master
$(git rev-parse HEAD) refs/remotes/origin/HEAD
$(git rev-parse refs/remotes/origin/master) refs/remotes/origin/master
$(git rev-parse refs/tags/mark) refs/tags/mark
$(git rev-parse refs/tags/mark1.1) refs/tags/mark1.1
$(git rev-parse refs/tags/mark1.10) refs/tags/mark1.10
$(git rev-parse refs/tags/mark1.2) refs/tags/mark1.2
EOF
# Protocol v2 supports sending symrefs for refs other than HEAD, so use
# protocol v0 here.
GIT_TEST_PROTOCOL_VERSION= git ls-remote --symref >actual &&
test_cmp expect actual
From /<<PKGBUILDDIR>>/t/trash directory.t5512-ls-remote/
* [new branch] master -> origin/master
From other.git
ok 25 - ls-remote --symref
expecting success:
cat >expect <<-\EOF &&
ref: refs/heads/master HEAD
1bd44cb9d13204b0fe1958db0082f5028a16eb3a HEAD
EOF
# Protocol v2 supports sending symrefs for refs other than HEAD, so use
# protocol v0 here.
GIT_TEST_PROTOCOL_VERSION= git ls-remote --symref . HEAD >actual &&
test_cmp expect actual
ok 26 - ls-remote with filtered symref (refname)
checking known breakage:
git symbolic-ref refs/heads/foo refs/tags/mark &&
cat >expect <<-\EOF &&
ref: refs/tags/mark refs/heads/foo
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/heads/foo
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/heads/master
EOF
# Protocol v2 supports sending symrefs for refs other than HEAD, so use
# protocol v0 here.
GIT_TEST_PROTOCOL_VERSION= git ls-remote --symref --heads . >actual &&
test_cmp expect actual
--- expect 2019-08-14 07:31:03.665686600 +0000
+++ actual 2019-08-14 07:31:03.689686903 +0000
@@ -1,3 +1,2 @@
-ref: refs/tags/mark refs/heads/foo
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/heads/foo
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/heads/master
not ok 27 - ls-remote with filtered symref (--heads) # TODO known breakage
expecting success:
cat >expect <<-\EOF &&
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/heads/foo
1bd44cb9d13204b0fe1958db0082f5028a16eb3a refs/heads/master
EOF
# Protocol v2 supports sending symrefs for refs other than HEAD, so use
# protocol v0 here.
GIT_TEST_PROTOCOL_VERSION= git ls-remote --symref --heads . >actual &&
test_cmp expect actual &&
GIT_TEST_PROTOCOL_VERSION= git ls-remote --symref . "refs/heads/*" >actual &&
test_cmp expect actual
ok 28 - ls-remote --symref omits filtered-out matches
checking prerequisite: PIPE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports FIFOs
test_have_prereq !MINGW,!CYGWIN &&
rm -f testfifo && mkfifo testfifo
)
prerequisite PIPE ok
checking prerequisite: JGIT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
jgit --version
)
t5512-ls-remote.sh: 7: eval: jgit: not found
prerequisite JGIT not satisfied
checking prerequisite: GIT_DAEMON
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
git env--helper --type=bool --default=true --exit-code GIT_TEST_GIT_DAEMON
)
prerequisite GIT_DAEMON ok
skipping test: indicate no refs in standards-compliant empty remote
test_set_port JGIT_DAEMON_PORT &&
JGIT_DAEMON_PID= &&
git init --bare empty.git &&
>empty.git/git-daemon-export-ok &&
mkfifo jgit_daemon_output &&
{
jgit daemon --port="$JGIT_DAEMON_PORT" . >jgit_daemon_output &
JGIT_DAEMON_PID=$!
} &&
test_when_finished kill "$JGIT_DAEMON_PID" &&
{
read line &&
case $line in
Exporting*)
;;
*)
echo "Expected: Exporting" &&
false;;
esac &&
read line &&
case $line in
"Listening on"*)
;;
*)
echo "Expected: Listening on" &&
false;;
esac
} <jgit_daemon_output &&
# --exit-code asks the command to exit with 2 when no
# matching refs are found.
test_expect_code 2 git ls-remote --exit-code git://localhost:$JGIT_DAEMON_PORT/empty.git
ok 29 # skip indicate no refs in standards-compliant empty remote (missing JGIT of PIPE,JGIT,GIT_DAEMON)
expecting success:
# It is important for this repo to be inside the nongit
# area, as we want a repo name that does not include
# slashes (because those inhibit some of our configuration
# lookups).
nongit git init --bare dst.git &&
nongit git ls-remote dst.git
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5512-ls-remote/non-repo/dst.git/
ok 30 - ls-remote works outside repository
expecting success:
# Use a sort key that requires access to the referenced objects.
nongit test_must_fail git ls-remote --sort=authordate "$TRASH_DIRECTORY" 2>err &&
test_i18ngrep "^fatal: not a git repository, but the field 'authordate' requires access to object data" err
fatal: not a git repository, but the field 'authordate' requires access to object data
ok 31 - ls-remote --sort fails gracefully outside repository
expecting success:
git for-each-ref --format="%(objectname) %(refname)" \
refs/heads/master refs/remotes/origin/master >expect &&
git -c protocol.version=1 ls-remote . master >actual.v1 &&
test_cmp expect actual.v1 &&
git -c protocol.version=2 ls-remote . master >actual.v2 &&
test_cmp expect actual.v2
ok 32 - ls-remote patterns work with all protocol versions
expecting success:
git for-each-ref --format="%(objectname) %(refname)" \
refs/heads/ refs/tags/ >expect &&
git -c protocol.version=1 ls-remote --heads --tags . >actual.v1 &&
test_cmp expect actual.v1 &&
git -c protocol.version=2 ls-remote --heads --tags . >actual.v2 &&
test_cmp expect actual.v2
ok 33 - ls-remote prefixes work with all protocol versions
# still have 1 known breakage(s)
# passed all remaining 32 test(s)
1..33
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5513-fetch-track.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5513-fetch-track/.git/
expecting success:
>file &&
git add . &&
test_tick &&
git commit -m Initial &&
git branch b-0 &&
git branch b1 &&
git branch b/one &&
test_create_repo other &&
(
cd other &&
git config remote.origin.url .. &&
git config remote.origin.fetch "+refs/heads/b/*:refs/remotes/b/*"
)
[master (root-commit) 9d34b14] 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.t5513-fetch-track/other/.git/
ok 1 - setup
expecting success:
(
cd other && git fetch origin &&
test "$(git for-each-ref --format="%(refname)")" = refs/remotes/b/one
)
From ..
* [new branch] b/one -> b/one
ok 2 - fetch
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5505-remote.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/.git/
expecting success:
setup_repository one &&
setup_repository two &&
(
cd two &&
git branch another
) &&
git clone one test
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/one/.git/
[master (root-commit) 9d34b14] Initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
Switched to a new branch 'side'
[side 2ce9c50] Second
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 elif
Switched to branch 'master'
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/two/.git/
[master (root-commit) 9d34b14] Initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
Switched to a new branch 'side'
[side 2ce9c50] Second
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 elif
Switched to branch 'master'
Cloning into 'test'...
done.
ok 1 - setup
expecting success:
test_config url.git@host.com:team/repo.git.insteadOf myremote &&
git remote add myremote git@host.com:team/repo.git
ok 2 - add remote whose URL agrees with url.<...>.insteadOf
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
expecting success:
(
cd test &&
tokens_match origin "$(git remote)" &&
check_remote_track origin master side &&
check_tracking_branch origin HEAD master side
)
ok 3 - remote information for the origin
expecting success:
(
cd test &&
git remote add -f second ../two &&
tokens_match "origin second" "$(git remote)" &&
check_tracking_branch second master side another &&
git for-each-ref "--format=%(refname)" refs/remotes |
sed -e "/^refs\/remotes\/origin\//d" \
-e "/^refs\/remotes\/second\//d" >actual &&
test_must_be_empty actual
)
Updating second
From ../two
* [new branch] another -> second/another
* [new branch] master -> second/master
* [new branch] side -> second/side
ok 4 - add another remote
expecting success:
(
cd test &&
check_remote_track origin master side &&
check_remote_track second master side another
)
ok 5 - check remote-tracking
expecting success:
(
cd test &&
case $(git config remote.second.fetch) in
+*) true ;;
*) false ;;
esac
)
ok 6 - remote forces tracking branches
expecting success:
(
cd test &&
git symbolic-ref refs/remotes/second/HEAD refs/remotes/second/master &&
git remote rm second
)
ok 7 - remove remote
expecting success:
(
cd test &&
tokens_match origin "$(git remote)" &&
check_remote_track origin master side &&
git for-each-ref "--format=%(refname)" refs/remotes |
sed -e "/^refs\/remotes\/origin\//d" >actual &&
test_must_be_empty actual
)
ok 8 - remove remote
expecting success:
(
cd test &&
cat >expect1 <<-\EOF &&
Note: A branch outside the refs/remotes/ hierarchy was not removed;
to delete it, use:
git branch -d master
EOF
cat >expect2 <<-\EOF &&
Note: Some branches outside the refs/remotes/ hierarchy were not removed;
to delete them, use:
git branch -d foobranch
git branch -d master
EOF
git tag footag &&
git config --add remote.oops.fetch "+refs/*:refs/*" &&
git remote remove oops 2>actual1 &&
git branch foobranch &&
git config --add remote.oops.fetch "+refs/*:refs/*" &&
git remote rm oops 2>actual2 &&
git branch -d foobranch &&
git tag -d footag &&
test_i18ncmp expect1 actual1 &&
test_i18ncmp expect2 actual2
)
Deleted branch foobranch (was 9d34b14).
Deleted tag 'footag' (was 9d34b14)
ok 9 - remove remote protects local branches
expecting success:
(
cd test &&
echo "fatal: No such remote: 'foo'" >expect &&
test_must_fail git remote rm foo 2>actual &&
test_i18ncmp expect actual
)
ok 10 - remove errors out early when deleting non-existent branch
expecting success:
test_when_finished "(
git -C test checkout master;
git -C test branch -D two;
git -C test config --remove-section remote.two;
git -C test config --remove-section branch.second;
true
)" &&
(
cd test &&
git remote add two ../two &&
git fetch two &&
git checkout -b second two/master^0 &&
git config branch.second.remote two &&
git checkout master &&
git remote rm two
)
From ../two
* [new branch] another -> two/another
* [new branch] master -> two/master
* [new branch] side -> two/side
Switched to a new branch 'second'
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
Already on 'master'
Your branch is up to date with 'origin/master'.
error: branch 'two' not found.
fatal: no such section: remote.two
fatal: no such section: branch.second
ok 11 - remove remote with a branch without configured merge
expecting success:
(
cd test &&
echo "fatal: No such remote: 'foo'" >expect &&
test_must_fail git remote rename foo bar 2>actual &&
test_i18ncmp expect actual
)
ok 12 - rename errors out early when deleting non-existent branch
expecting success:
test_config remote.foo.vcs bar &&
echo "fatal: remote foo already exists." >expect &&
test_must_fail git remote add foo bar 2>actual &&
test_i18ncmp expect actual
ok 13 - add existing foreign_vcs remote
expecting success:
test_config remote.foo.vcs bar &&
test_config remote.bar.vcs bar &&
echo "fatal: remote bar already exists." >expect &&
test_must_fail git remote rename foo bar 2>actual &&
test_i18ncmp expect actual
ok 14 - add existing foreign_vcs remote
expecting success:
(
cd test &&
git config --add remote.origin.fetch refs/heads/master:refs/heads/upstream &&
git fetch &&
git checkout -b ahead origin/master &&
echo 1 >>file &&
test_tick &&
git commit -m update file &&
git checkout master &&
git branch --track octopus origin/master &&
git branch --track rebase origin/master &&
git branch -d -r origin/master &&
git config --add remote.two.url ../two &&
git config --add remote.two.pushurl ../three &&
git config branch.rebase.rebase true &&
git config branch.octopus.merge "topic-a topic-b topic-c" &&
(
cd ../one &&
echo 1 >file &&
test_tick &&
git commit -m update file
) &&
git config --add remote.origin.push : &&
git config --add remote.origin.push refs/heads/master:refs/heads/upstream &&
git config --add remote.origin.push +refs/tags/lastbackup &&
git config --add remote.two.push +refs/heads/ahead:refs/heads/master &&
git config --add remote.two.push refs/heads/master:refs/heads/another &&
git remote show origin two >output &&
git branch -d rebase octopus &&
test_i18ncmp expect output
)
From /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/one
* [new branch] master -> upstream
Switched to a new branch 'ahead'
Branch 'ahead' set up to track remote branch 'master' from 'origin'.
[ahead 847549e] update
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
Branch 'octopus' set up to track remote branch 'master' from 'origin'.
Branch 'rebase' set up to track remote branch 'master' from 'origin'.
Deleted remote-tracking branch origin/master (was 9d34b14).
[master 6329a3c] update
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
error: src refspec refs/tags/lastbackup does not match any
Deleted branch rebase (was 9d34b14).
Deleted branch octopus (was 9d34b14).
ok 15 - show
expecting success:
mv one one.unreachable &&
(
cd test &&
git remote show -n origin >output &&
mv ../one.unreachable ../one &&
test_i18ncmp expect output
)
ok 16 - show -n
expecting success:
(
cd one &&
git branch -m side side2
) &&
(
cd test &&
git fetch origin &&
git remote prune origin &&
git rev-parse refs/remotes/origin/side2 &&
test_must_fail git rev-parse refs/remotes/origin/side
)
From /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/one
* [new branch] master -> origin/master
* [new branch] side2 -> origin/side2
9d34b14..6329a3c master -> upstream
Pruning origin
URL: /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/one
* [pruned] origin/side
2ce9c504874e3f0ce77f83c0bb0b1024c7a6387f
fatal: ambiguous argument 'refs/remotes/origin/side': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
refs/remotes/origin/side
ok 17 - prune
expecting success:
(
cd test &&
git symbolic-ref refs/remotes/origin/HEAD &&
git remote set-head --delete origin &&
test_must_fail git symbolic-ref refs/remotes/origin/HEAD
)
refs/remotes/origin/master
fatal: ref refs/remotes/origin/HEAD is not a symbolic ref
ok 18 - set-head --delete
expecting success:
(
cd test &&
git remote set-head --auto origin &&
echo refs/remotes/origin/master >expect &&
git symbolic-ref refs/remotes/origin/HEAD >output &&
test_cmp expect output
)
origin/HEAD set to master
ok 19 - set-head --auto
expecting success:
(
cd test &&
git fetch two "refs/heads/*:refs/remotes/two/*" &&
git remote set-head --auto two >output 2>&1 &&
echo "two/HEAD set to master" >expect &&
test_i18ncmp expect output
)
From ../two
* [new branch] another -> two/another
* [new branch] master -> two/master
* [new branch] side -> two/side
ok 20 - set-head --auto has no problem w/multiple HEADs
expecting success:
(
cd test &&
git remote set-head origin side2 &&
git symbolic-ref refs/remotes/origin/HEAD >output &&
git remote set-head origin master &&
test_cmp expect output
)
ok 21 - set-head explicit
expecting success:
git -C one branch -m side2 side &&
test_when_finished "git -C one branch -m side side2" &&
(
cd test &&
git remote prune --dry-run origin >output &&
git rev-parse refs/remotes/origin/side2 &&
test_must_fail git rev-parse refs/remotes/origin/side &&
test_i18ncmp expect output
)
2ce9c504874e3f0ce77f83c0bb0b1024c7a6387f
fatal: ambiguous argument 'refs/remotes/origin/side': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
refs/remotes/origin/side
ok 22 - prune --dry-run
expecting success:
mkdir mirror &&
(
cd mirror &&
git init --bare &&
git remote add --mirror -f origin ../one
) &&
(
cd one &&
git branch -m side2 side
) &&
(
cd mirror &&
git rev-parse --verify refs/heads/side2 &&
test_must_fail git rev-parse --verify refs/heads/side &&
git fetch origin &&
git remote prune origin &&
test_must_fail git rev-parse --verify refs/heads/side2 &&
git rev-parse --verify refs/heads/side
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/mirror/
warning: --mirror is dangerous and deprecated; please
use --mirror=fetch or --mirror=push instead
Updating origin
From ../one
* [new branch] master -> master
* [new branch] side2 -> side2
2ce9c504874e3f0ce77f83c0bb0b1024c7a6387f
fatal: Needed a single revision
From ../one
* [new branch] side -> side
Pruning origin
URL: ../one
* [pruned] refs/heads/side2
fatal: Needed a single revision
2ce9c504874e3f0ce77f83c0bb0b1024c7a6387f
ok 23 - add --mirror && prune
expecting success:
mkdir mirror-fetch &&
git init mirror-fetch/parent &&
(
cd mirror-fetch/parent &&
test_commit one
) &&
git init --bare mirror-fetch/child &&
(
cd mirror-fetch/child &&
git remote add --mirror=fetch -f parent ../parent
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/mirror-fetch/parent/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/mirror-fetch/child/
Updating parent
From ../parent
* [new branch] master -> master
* [new tag] one -> one
ok 24 - add --mirror=fetch
expecting success:
(
cd mirror-fetch/parent &&
git branch new &&
git branch -m master renamed
) &&
(
cd mirror-fetch/child &&
git fetch parent &&
git rev-parse --verify refs/heads/new &&
git rev-parse --verify refs/heads/renamed
)
From ../parent
* [new branch] new -> new
* [new branch] renamed -> renamed
d79ce1670bdcb76e6d1da2ae095e890ccb326ae9
d79ce1670bdcb76e6d1da2ae095e890ccb326ae9
ok 25 - fetch mirrors act as mirrors during fetch
expecting success:
(
cd mirror-fetch/child &&
git remote prune parent &&
test_must_fail git rev-parse --verify refs/heads/master
)
Pruning parent
URL: ../parent
* [pruned] refs/heads/master
fatal: Needed a single revision
ok 26 - fetch mirrors can prune
expecting success:
(
cd mirror-fetch/parent &&
git checkout HEAD^0
) &&
(
cd mirror-fetch/child &&
git branch -m renamed renamed2 &&
git push parent :
) &&
(
cd mirror-fetch/parent &&
git rev-parse --verify renamed &&
test_must_fail git rev-parse --verify refs/heads/renamed2
)
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d79ce16 one
Everything up-to-date
d79ce1670bdcb76e6d1da2ae095e890ccb326ae9
fatal: Needed a single revision
ok 27 - fetch mirrors do not act as mirrors during push
expecting success:
git init --bare mirror-fetch/track &&
(
cd mirror-fetch/track &&
git remote add --mirror=fetch -t heads/new parent ../parent
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/mirror-fetch/track/
ok 28 - add fetch mirror with specific branches
expecting success:
(
cd mirror-fetch/track &&
git fetch parent &&
git rev-parse --verify refs/heads/new &&
test_must_fail git rev-parse --verify refs/heads/renamed
)
From ../parent
* [new branch] new -> new
* [new tag] one -> one
d79ce1670bdcb76e6d1da2ae095e890ccb326ae9
fatal: Needed a single revision
ok 29 - fetch mirror respects specific branches
expecting success:
mkdir mirror-push &&
git init --bare mirror-push/public &&
git init mirror-push/private &&
(
cd mirror-push/private &&
test_commit one &&
git remote add --mirror=push public ../public
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/mirror-push/public/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/mirror-push/private/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 30 - add --mirror=push
expecting success:
(
cd mirror-push/private &&
git branch new &&
git branch -m master renamed &&
git push public
) &&
(
cd mirror-push/private &&
git rev-parse --verify refs/heads/new &&
git rev-parse --verify refs/heads/renamed &&
test_must_fail git rev-parse --verify refs/heads/master
)
To ../public
* [new branch] new -> new
* [new branch] renamed -> renamed
* [new tag] one -> one
d79ce1670bdcb76e6d1da2ae095e890ccb326ae9
d79ce1670bdcb76e6d1da2ae095e890ccb326ae9
fatal: Needed a single revision
ok 31 - push mirrors act as mirrors during push
expecting success:
(
cd mirror-push/public &&
git branch -m renamed renamed2 &&
git symbolic-ref HEAD refs/heads/renamed2
) &&
(
cd mirror-push/private &&
git fetch public &&
git rev-parse --verify refs/heads/renamed &&
test_must_fail git rev-parse --verify refs/heads/renamed2
)
From ../public
* branch HEAD -> FETCH_HEAD
d79ce1670bdcb76e6d1da2ae095e890ccb326ae9
fatal: Needed a single revision
ok 32 - push mirrors do not act as mirrors during fetch
expecting success:
git init mirror-push/track &&
(
cd mirror-push/track &&
test_must_fail git remote add --mirror=push -t new public ../public
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/mirror-push/track/.git/
fatal: specifying branches to track makes sense only with fetch mirrors
ok 33 - push mirrors do not allow you to specify refs
expecting success:
mkdir alttst &&
(
cd alttst &&
git init &&
git remote add -f origin ../one &&
git config remote.alt.url ../one &&
git config remote.alt.fetch "+refs/heads/*:refs/remotes/origin/*"
) &&
(
cd one &&
git branch -m side side2
) &&
(
cd alttst &&
git rev-parse --verify refs/remotes/origin/side &&
test_must_fail git rev-parse --verify refs/remotes/origin/side2 &&
git fetch alt &&
git remote prune alt &&
test_must_fail git rev-parse --verify refs/remotes/origin/side &&
git rev-parse --verify refs/remotes/origin/side2
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/alttst/.git/
Updating origin
From ../one
* [new branch] master -> origin/master
* [new branch] side -> origin/side
2ce9c504874e3f0ce77f83c0bb0b1024c7a6387f
fatal: Needed a single revision
From ../one
* [new branch] side2 -> origin/side2
Pruning alt
URL: ../one
* [pruned] origin/side
fatal: Needed a single revision
2ce9c504874e3f0ce77f83c0bb0b1024c7a6387f
ok 34 - add alt && prune
expecting success:
(
cd one &&
>foobar &&
git add foobar &&
git commit -m "Foobar" &&
git tag -a -m "Foobar tag" foobar-tag &&
git reset --hard HEAD~1 &&
git tag -a -m "Some tag" some-tag
) &&
mkdir add-tags &&
(
cd add-tags &&
git init &&
git remote add -f origin ../one &&
git tag -l some-tag >../test/output &&
git tag -l foobar-tag >>../test/output &&
test_must_fail git config remote.origin.tagopt
) &&
test_cmp test/expect test/output
[master 52ead37] Foobar
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 foobar
HEAD is now at 6329a3c update
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/add-tags/.git/
Updating origin
From ../one
* [new branch] master -> origin/master
* [new branch] side2 -> origin/side2
* [new tag] some-tag -> some-tag
ok 35 - add with reachable tags (default)
expecting success:
rm -rf add-tags &&
(
mkdir add-tags &&
cd add-tags &&
git init &&
git remote add -f --tags origin ../one &&
git tag -l some-tag >../test/output &&
git tag -l foobar-tag >>../test/output &&
git config remote.origin.tagopt >>../test/output
) &&
test_cmp test/expect test/output
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/add-tags/.git/
Updating origin
From ../one
* [new branch] master -> origin/master
* [new branch] side2 -> origin/side2
* [new tag] foobar-tag -> foobar-tag
* [new tag] some-tag -> some-tag
ok 36 - add --tags
expecting success:
rm -rf add-tags &&
(
mkdir add-no-tags &&
cd add-no-tags &&
git init &&
git remote add -f --no-tags origin ../one &&
git tag -l some-tag >../test/output &&
git tag -l foobar-tag >../test/output &&
git config remote.origin.tagopt >>../test/output
) &&
(
cd one &&
git tag -d some-tag foobar-tag
) &&
test_cmp test/expect test/output
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/add-no-tags/.git/
Updating origin
From ../one
* [new branch] master -> origin/master
* [new branch] side2 -> origin/side2
Deleted tag 'some-tag' (was 953f501)
Deleted tag 'foobar-tag' (was ec7d5f5)
ok 37 - add --no-tags
expecting success:
(
cd add-no-tags &&
test_must_fail git remote add -f --no-no-tags neworigin ../one
)
error: unknown option `no-no-tags'
usage: git remote add [<options>] <name> <url>
-f, --fetch fetch the remote branches
--tags import all tags and associated objects when fetching
or do not fetch any tag at all (--no-tags)
-t, --track <branch> branch(es) to track
-m, --master <branch>
master branch
--mirror[=(push|fetch)]
set up remote as a mirror to push to or fetch from
ok 38 - reject --no-no-tags
expecting success:
(
cd one &&
git remote add drosophila ../two &&
git remote add apis ../mirror &&
git remote update &&
git branch -r >output &&
test_cmp expect output
)
Fetching drosophila
From ../two
* [new branch] another -> drosophila/another
* [new branch] master -> drosophila/master
* [new branch] side -> drosophila/side
Fetching apis
From ../mirror
* [new branch] master -> apis/master
* [new branch] side -> apis/side
ok 39 - update
expecting success:
(
cd one &&
for b in $(git branch -r)
do
git branch -r -d $b || exit 1
done &&
git remote add manduca ../mirror &&
git remote add megaloprepus ../mirror &&
git config remotes.phobaeticus "drosophila megaloprepus" &&
git config remotes.titanus manduca &&
git remote update phobaeticus titanus &&
git branch -r >output &&
test_cmp expect output
)
Deleted remote-tracking branch apis/master (was 6329a3c).
Deleted remote-tracking branch apis/side (was 2ce9c50).
Deleted remote-tracking branch drosophila/another (was 9d34b14).
Deleted remote-tracking branch drosophila/master (was 9d34b14).
Deleted remote-tracking branch drosophila/side (was 2ce9c50).
Fetching drosophila
From ../two
* [new branch] another -> drosophila/another
* [new branch] master -> drosophila/master
* [new branch] side -> drosophila/side
Fetching megaloprepus
From ../mirror
* [new branch] master -> megaloprepus/master
* [new branch] side -> megaloprepus/side
Fetching manduca
From ../mirror
* [new branch] master -> manduca/master
* [new branch] side -> manduca/side
ok 40 - update with arguments
expecting success:
(
cd one &&
git branch -m side2 side3
) &&
(
cd test &&
git remote update --prune &&
(
cd ../one &&
git branch -m side3 side2
) &&
git rev-parse refs/remotes/origin/side3 &&
test_must_fail git rev-parse refs/remotes/origin/side2
)
Fetching origin
From /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/one
- [deleted] (none) -> origin/side2
* [new branch] side3 -> origin/side3
Fetching two
From ../two
* branch HEAD -> FETCH_HEAD
2ce9c504874e3f0ce77f83c0bb0b1024c7a6387f
fatal: ambiguous argument 'refs/remotes/origin/side2': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
refs/remotes/origin/side2
ok 41 - update --prune
expecting success:
(
cd one &&
for b in $(git branch -r)
do
git branch -r -d $b || exit 1
done &&
git config remote.drosophila.skipDefaultUpdate true &&
git remote update default &&
git branch -r >output &&
test_cmp expect output
)
Deleted remote-tracking branch drosophila/another (was 9d34b14).
Deleted remote-tracking branch drosophila/master (was 9d34b14).
Deleted remote-tracking branch drosophila/side (was 2ce9c50).
Deleted remote-tracking branch manduca/master (was 6329a3c).
Deleted remote-tracking branch manduca/side (was 2ce9c50).
Deleted remote-tracking branch megaloprepus/master (was 6329a3c).
Deleted remote-tracking branch megaloprepus/side (was 2ce9c50).
Fetching apis
From ../mirror
* [new branch] master -> apis/master
* [new branch] side -> apis/side
Fetching manduca
From ../mirror
* [new branch] master -> manduca/master
* [new branch] side -> manduca/side
Fetching megaloprepus
From ../mirror
* [new branch] master -> megaloprepus/master
* [new branch] side -> megaloprepus/side
ok 42 - update default
expecting success:
(
cd one &&
for b in $(git branch -r)
do
git branch -r -d $b || exit 1
done &&
git config remotes.default "$(printf "\t drosophila \n")" &&
git remote update default &&
git branch -r >output &&
test_cmp expect output
)
Deleted remote-tracking branch apis/master (was 6329a3c).
Deleted remote-tracking branch apis/side (was 2ce9c50).
Deleted remote-tracking branch manduca/master (was 6329a3c).
Deleted remote-tracking branch manduca/side (was 2ce9c50).
Deleted remote-tracking branch megaloprepus/master (was 6329a3c).
Deleted remote-tracking branch megaloprepus/side (was 2ce9c50).
Fetching drosophila
From ../two
* [new branch] another -> drosophila/another
* [new branch] master -> drosophila/master
* [new branch] side -> drosophila/side
ok 43 - update default (overridden, with funny whitespace)
expecting success:
(
cd one &&
for b in $(git branch -r)
do
git branch -r -d $b || exit 1
done &&
git config remotes.default "drosophila" &&
git remote update &&
git branch -r >output &&
test_cmp expect output
)
Deleted remote-tracking branch drosophila/another (was 9d34b14).
Deleted remote-tracking branch drosophila/master (was 9d34b14).
Deleted remote-tracking branch drosophila/side (was 2ce9c50).
Fetching drosophila
From ../two
* [new branch] another -> drosophila/another
* [new branch] master -> drosophila/master
* [new branch] side -> drosophila/side
ok 44 - update (with remotes.default defined)
expecting success:
git clone one three &&
(
cd three &&
git remote show origin >output &&
! grep "^ *HEAD$" < output &&
! grep -i stale < output
)
Cloning into 'three'...
done.
ok 45 - "remote show" does not show symbolic refs
expecting success:
test_must_fail git remote add some:url desired-name
fatal: 'some:url' is not a valid remote name
ok 46 - reject adding remote with an invalid name
expecting success:
git clone one four &&
(
cd four &&
git remote rename origin upstream &&
test -z "$(git for-each-ref refs/remotes/origin)" &&
test "$(git symbolic-ref refs/remotes/upstream/HEAD)" = "refs/remotes/upstream/master" &&
test "$(git rev-parse upstream/master)" = "$(git rev-parse master)" &&
test "$(git config remote.upstream.fetch)" = "+refs/heads/*:refs/remotes/upstream/*" &&
test "$(git config branch.master.remote)" = "upstream"
)
Cloning into 'four'...
done.
ok 47 - rename a remote
expecting success:
git clone one four.one &&
(
cd four.one &&
git config remote.origin.fetch +refs/heads/*:refs/heads/origin/* &&
git remote rename origin upstream &&
test "$(git config remote.upstream.fetch)" = "+refs/heads/*:refs/heads/origin/*" &&
git rev-parse -q origin/master
)
Cloning into 'four.one'...
done.
warning: Not updating non-default fetch refspec
+refs/heads/*:refs/heads/origin/*
Please update the configuration manually if necessary.
6329a3ca5268a0b28a1dc29b602e8b72a0bc1b37
ok 48 - rename does not update a non-default fetch refspec
expecting success:
git clone one four.two &&
(
cd four.two &&
git remote rename origin remote &&
git remote rename remote upstream &&
test "$(git config remote.upstream.fetch)" = "+refs/heads/*:refs/remotes/upstream/*"
)
Cloning into 'four.two'...
done.
ok 49 - rename a remote with name part of fetch spec
expecting success:
git clone one four.three &&
(
cd four.three &&
git remote add o git://example.com/repo.git &&
git remote rename o upstream &&
test "$(git rev-parse origin/master)" = "$(git rev-parse master)"
)
Cloning into 'four.three'...
done.
ok 50 - rename a remote with name prefix of other remote
expecting success:
git clone one four.four &&
test_when_finished git config --global --unset remote.upstream.prune &&
git config --global remote.upstream.prune true &&
git -C four.four remote rename origin upstream
Cloning into 'four.four'...
done.
ok 51 - rename succeeds with existing remote.<target>.prune
expecting success:
git clone one five &&
origin_url=$(pwd)/one &&
(
cd five &&
git remote remove origin &&
mkdir -p .git/remotes &&
cat ../remotes_origin >.git/remotes/origin &&
git remote rename origin origin &&
test_path_is_missing .git/remotes/origin &&
test "$(git config remote.origin.url)" = "$origin_url" &&
cat >push_expected <<-\EOF &&
refs/heads/master:refs/heads/upstream
refs/heads/next:refs/heads/upstream2
EOF
cat >fetch_expected <<-\EOF &&
refs/heads/master:refs/heads/origin
refs/heads/next:refs/heads/origin2
EOF
git config --get-all remote.origin.push >push_actual &&
git config --get-all remote.origin.fetch >fetch_actual &&
test_cmp push_expected push_actual &&
test_cmp fetch_expected fetch_actual
)
Cloning into 'five'...
done.
ok 52 - migrate a remote from named file in $GIT_DIR/remotes
expecting success:
git clone one six &&
origin_url=$(pwd)/one &&
(
cd six &&
git remote rm origin &&
echo "$origin_url" >.git/branches/origin &&
git remote rename origin origin &&
test_path_is_missing .git/branches/origin &&
test "$(git config remote.origin.url)" = "$origin_url" &&
test "$(git config remote.origin.fetch)" = "refs/heads/master:refs/heads/origin" &&
test "$(git config remote.origin.push)" = "HEAD:refs/heads/master"
)
Cloning into 'six'...
done.
ok 53 - migrate a remote from named file in $GIT_DIR/branches
expecting success:
git clone one seven &&
(
cd seven &&
git remote rm origin &&
echo "quux#foom" > .git/branches/origin &&
git remote rename origin origin &&
test_path_is_missing .git/branches/origin &&
test "$(git config remote.origin.url)" = "quux" &&
test "$(git config remote.origin.fetch)" = "refs/heads/foom:refs/heads/origin" &&
test "$(git config remote.origin.push)" = "HEAD:refs/heads/foom"
)
Cloning into 'seven'...
done.
ok 54 - migrate a remote from named file in $GIT_DIR/branches (2)
expecting success:
git clone one eight &&
(
cd one &&
git checkout side2 &&
git branch -D master
) &&
(
cd eight &&
git remote prune origin
) >err 2>&1 &&
test_i18ngrep "has become dangling" err &&
: And the dangling symref will not cause other annoying errors &&
(
cd eight &&
git branch -a
) 2>err &&
! grep "points nowhere" err &&
(
cd eight &&
test_must_fail git branch nomore origin
) 2>err &&
test_i18ngrep "dangling symref" err
Cloning into 'eight'...
done.
Switched to branch 'side2'
Deleted branch master (was 6329a3c).
refs/remotes/origin/HEAD has become dangling!
* master
remotes/origin/side2
warning: ignoring dangling symref refs/remotes/origin/HEAD
ok 55 - remote prune to cause a dangling symref
expecting success:
test_create_repo empty &&
git clone empty empty-clone &&
(
cd empty-clone &&
git remote show origin
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/empty/.git/
Cloning into 'empty-clone'...
warning: You appear to have cloned an empty repository.
done.
* remote origin
Fetch URL: /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/empty
Push URL: /<<PKGBUILDDIR>>/t/trash directory.t5505-remote/empty
HEAD branch: (unknown)
Local branch configured for 'git pull':
master merges with remote master
ok 56 - show empty remote
expecting success:
test_must_fail git remote set-branches &&
test_must_fail git remote set-branches --add
error: no remote specified
usage: git remote set-branches <name> <branch>...
or: git remote set-branches --add <name> <branch>...
--add add branch
error: no remote specified
usage: git remote set-branches <name> <branch>...
or: git remote set-branches --add <name> <branch>...
--add add branch
ok 57 - remote set-branches requires a remote
expecting success:
echo "+refs/heads/*:refs/remotes/scratch/*" >expect.initial &&
sort <<-\EOF >expect.add &&
+refs/heads/*:refs/remotes/scratch/*
+refs/heads/other:refs/remotes/scratch/other
EOF
sort <<-\EOF >expect.replace &&
+refs/heads/maint:refs/remotes/scratch/maint
+refs/heads/master:refs/remotes/scratch/master
+refs/heads/next:refs/remotes/scratch/next
EOF
sort <<-\EOF >expect.add-two &&
+refs/heads/maint:refs/remotes/scratch/maint
+refs/heads/master:refs/remotes/scratch/master
+refs/heads/next:refs/remotes/scratch/next
+refs/heads/pu:refs/remotes/scratch/pu
+refs/heads/t/topic:refs/remotes/scratch/t/topic
EOF
sort <<-\EOF >expect.setup-ffonly &&
refs/heads/master:refs/remotes/scratch/master
+refs/heads/next:refs/remotes/scratch/next
EOF
sort <<-\EOF >expect.respect-ffonly &&
refs/heads/master:refs/remotes/scratch/master
+refs/heads/next:refs/remotes/scratch/next
+refs/heads/pu:refs/remotes/scratch/pu
EOF
git clone .git/ setbranches &&
(
cd setbranches &&
git remote rename origin scratch &&
git config --get-all remote.scratch.fetch >config-result &&
sort <config-result >../actual.initial &&
git remote set-branches scratch --add other &&
git config --get-all remote.scratch.fetch >config-result &&
sort <config-result >../actual.add &&
git remote set-branches scratch maint master next &&
git config --get-all remote.scratch.fetch >config-result &&
sort <config-result >../actual.replace &&
git remote set-branches --add scratch pu t/topic &&
git config --get-all remote.scratch.fetch >config-result &&
sort <config-result >../actual.add-two &&
git config --unset-all remote.scratch.fetch &&
git config remote.scratch.fetch \
refs/heads/master:refs/remotes/scratch/master &&
git config --add remote.scratch.fetch \
+refs/heads/next:refs/remotes/scratch/next &&
git config --get-all remote.scratch.fetch >config-result &&
sort <config-result >../actual.setup-ffonly &&
git remote set-branches --add scratch pu &&
git config --get-all remote.scratch.fetch >config-result &&
sort <config-result >../actual.respect-ffonly
) &&
test_cmp expect.initial actual.initial &&
test_cmp expect.add actual.add &&
test_cmp expect.replace actual.replace &&
test_cmp expect.add-two actual.add-two &&
test_cmp expect.setup-ffonly actual.setup-ffonly &&
test_cmp expect.respect-ffonly actual.respect-ffonly
Cloning into 'setbranches'...
warning: You appear to have cloned an empty repository.
done.
ok 58 - remote set-branches
expecting success:
echo "+refs/*:refs/*" >expect.initial &&
echo "+refs/heads/master:refs/heads/master" >expect.replace &&
git clone --mirror .git/ setbranches-mirror &&
(
cd setbranches-mirror &&
git remote rename origin scratch &&
git config --get-all remote.scratch.fetch >../actual.initial &&
git remote set-branches scratch heads/master &&
git config --get-all remote.scratch.fetch >../actual.replace
) &&
test_cmp expect.initial actual.initial &&
test_cmp expect.replace actual.replace
Cloning into bare repository 'setbranches-mirror'...
warning: You appear to have cloned an empty repository.
done.
warning: Not updating non-default fetch refspec
+refs/*:refs/*
Please update the configuration manually if necessary.
ok 59 - remote set-branches with --mirror
expecting success:
git remote add someremote foo &&
echo foo >expect &&
git config --get-all remote.someremote.url >actual &&
cmp expect actual
ok 60 - new remote
expecting success:
echo foo | get_url_test someremote &&
echo foo | get_url_test --all someremote &&
echo foo | get_url_test --push someremote &&
echo foo | get_url_test --push --all someremote
ok 61 - get-url on new remote
expecting success:
test_when_finished "rm -f .git/config.lock" &&
git config --get-all remote.someremote.url >expect &&
>.git/config.lock &&
test_must_fail git remote set-url someremote baz &&
git config --get-all remote.someremote.url >actual &&
cmp expect actual
error: could not lock config file .git/config: File exists
fatal: could not set 'remote.someremote.url' to 'baz'
ok 62 - remote set-url with locked config
expecting success:
git remote set-url someremote bar &&
echo bar >expect &&
git config --get-all remote.someremote.url >actual &&
cmp expect actual
ok 63 - remote set-url bar
expecting success:
git remote set-url someremote baz bar &&
echo baz >expect &&
git config --get-all remote.someremote.url >actual &&
cmp expect actual
ok 64 - remote set-url baz bar
expecting success:
test_must_fail git remote set-url someremote zot bar &&
echo baz >expect &&
git config --get-all remote.someremote.url >actual &&
cmp expect actual
fatal: No such URL found: bar
ok 65 - remote set-url zot bar
expecting success:
test_must_fail git remote set-url --push someremote zot baz &&
echo "YYY" >expect &&
echo baz >>expect &&
test_must_fail git config --get-all remote.someremote.pushurl >actual &&
echo "YYY" >>actual &&
git config --get-all remote.someremote.url >>actual &&
cmp expect actual
fatal: No such URL found: baz
ok 66 - remote set-url --push zot baz
expecting success:
git remote set-url --push someremote zot &&
echo zot >expect &&
echo "YYY" >>expect &&
echo baz >>expect &&
git config --get-all remote.someremote.pushurl >actual &&
echo "YYY" >>actual &&
git config --get-all remote.someremote.url >>actual &&
cmp expect actual
ok 67 - remote set-url --push zot
expecting success:
echo baz | get_url_test someremote &&
echo baz | get_url_test --all someremote &&
echo zot | get_url_test --push someremote &&
echo zot | get_url_test --push --all someremote
ok 68 - get-url with different urls
expecting success:
git remote set-url --push someremote qux zot &&
echo qux >expect &&
echo "YYY" >>expect &&
echo baz >>expect &&
git config --get-all remote.someremote.pushurl >actual &&
echo "YYY" >>actual &&
git config --get-all remote.someremote.url >>actual &&
cmp expect actual
ok 69 - remote set-url --push qux zot
expecting success:
git remote set-url --push someremote foo qu+x &&
echo foo >expect &&
echo "YYY" >>expect &&
echo baz >>expect &&
git config --get-all remote.someremote.pushurl >actual &&
echo "YYY" >>actual &&
git config --get-all remote.someremote.url >>actual &&
cmp expect actual
ok 70 - remote set-url --push foo qu+x
expecting success:
git remote set-url --push --add someremote aaa &&
echo foo >expect &&
echo aaa >>expect &&
echo "YYY" >>expect &&
echo baz >>expect &&
git config --get-all remote.someremote.pushurl >actual &&
echo "YYY" >>actual &&
git config --get-all remote.someremote.url >>actual &&
cmp expect actual
ok 71 - remote set-url --push --add aaa
expecting success:
echo foo | get_url_test --push someremote &&
get_url_test --push --all someremote <<-\EOF
foo
aaa
EOF
ok 72 - get-url on multi push remote
expecting success:
git remote set-url --push someremote bar aaa &&
echo foo >expect &&
echo bar >>expect &&
echo "YYY" >>expect &&
echo baz >>expect &&
git config --get-all remote.someremote.pushurl >actual &&
echo "YYY" >>actual &&
git config --get-all remote.someremote.url >>actual &&
cmp expect actual
ok 73 - remote set-url --push bar aaa
expecting success:
git remote set-url --push --delete someremote bar &&
echo foo >expect &&
echo "YYY" >>expect &&
echo baz >>expect &&
git config --get-all remote.someremote.pushurl >actual &&
echo "YYY" >>actual &&
git config --get-all remote.someremote.url >>actual &&
cmp expect actual
ok 74 - remote set-url --push --delete bar
expecting success:
git remote set-url --push --delete someremote foo &&
echo "YYY" >expect &&
echo baz >>expect &&
test_must_fail git config --get-all remote.someremote.pushurl >actual &&
echo "YYY" >>actual &&
git config --get-all remote.someremote.url >>actual &&
cmp expect actual
ok 75 - remote set-url --push --delete foo
expecting success:
git remote set-url --add someremote bbb &&
echo "YYY" >expect &&
echo baz >>expect &&
echo bbb >>expect &&
test_must_fail git config --get-all remote.someremote.pushurl >actual &&
echo "YYY" >>actual &&
git config --get-all remote.someremote.url >>actual &&
cmp expect actual
ok 76 - remote set-url --add bbb
expecting success:
echo baz | get_url_test someremote &&
get_url_test --all someremote <<-\EOF
baz
bbb
EOF
ok 77 - get-url on multi fetch remote
expecting success:
test_must_fail git remote set-url --delete someremote .\* &&
echo "YYY" >expect &&
echo baz >>expect &&
echo bbb >>expect &&
test_must_fail git config --get-all remote.someremote.pushurl >actual &&
echo "YYY" >>actual &&
git config --get-all remote.someremote.url >>actual &&
cmp expect actual
fatal: Will not delete all non-push URLs
ok 78 - remote set-url --delete .*
expecting success:
git remote set-url --delete someremote bbb &&
echo "YYY" >expect &&
echo baz >>expect &&
test_must_fail git config --get-all remote.someremote.pushurl >actual &&
echo "YYY" >>actual &&
git config --get-all remote.someremote.url >>actual &&
cmp expect actual
ok 79 - remote set-url --delete bbb
expecting success:
test_must_fail git remote set-url --delete someremote baz &&
echo "YYY" >expect &&
echo baz >>expect &&
test_must_fail git config --get-all remote.someremote.pushurl >actual &&
echo "YYY" >>actual &&
git config --get-all remote.someremote.url >>actual &&
cmp expect actual
fatal: Will not delete all non-push URLs
ok 80 - remote set-url --delete baz
expecting success:
git remote set-url --add someremote ccc &&
echo "YYY" >expect &&
echo baz >>expect &&
echo ccc >>expect &&
test_must_fail git config --get-all remote.someremote.pushurl >actual &&
echo "YYY" >>actual &&
git config --get-all remote.someremote.url >>actual &&
cmp expect actual
ok 81 - remote set-url --add ccc
expecting success:
git remote set-url --delete someremote baz &&
echo "YYY" >expect &&
echo ccc >>expect &&
test_must_fail git config --get-all remote.someremote.pushurl >actual &&
echo "YYY" >>actual &&
git config --get-all remote.someremote.url >>actual &&
cmp expect actual
ok 82 - remote set-url --delete baz
expecting success:
# add a dummy origin so that this does not trigger failure
git remote add origin .
ok 83 - extra args: setup
expecting success:
test_must_fail git remote add nick url bogus_extra_arg 2>actual &&
test_i18ngrep '^usage:' actual
usage: git remote add [<options>] <name> <url>
ok 84 - extra args: add nick url
expecting success:
test_must_fail git remote rename origin newname bogus_extra_arg 2>actual &&
test_i18ngrep '^usage:' actual
usage: git remote rename <old> <new>
ok 85 - extra args: rename origin newname
expecting success:
test_must_fail git remote remove origin bogus_extra_arg 2>actual &&
test_i18ngrep '^usage:' actual
usage: git remote remove <name>
ok 86 - extra args: remove origin
expecting success:
test_must_fail git remote set-head origin master bogus_extra_arg 2>actual &&
test_i18ngrep '^usage:' actual
usage: git remote set-head <name> (-a | --auto | -d | --delete | <branch>)
ok 87 - extra args: set-head origin master
expecting success:
test_must_fail git remote get-url origin newurl bogus_extra_arg 2>actual &&
test_i18ngrep '^usage:' actual
usage: git remote get-url [--push] [--all] <name>
ok 88 - extra args: get-url origin newurl
expecting success:
test_must_fail git remote set-url origin newurl oldurl bogus_extra_arg 2>actual &&
test_i18ngrep '^usage:' actual
usage: git remote set-url [--push] <name> <newurl> [<oldurl>]
ok 89 - extra args: set-url origin newurl oldurl
expecting success:
git config url.xyz@example.com.insteadOf backup &&
git remote add backup xyz@example.com
ok 90 - add remote matching the "insteadOf" URL
expecting success:
test_when_finished "(cd test && git tag -d some-tag)" &&
(
cd test &&
git tag -a -m "Some tag" some-tag master &&
exit_with=true &&
for type in commit tag tree blob
do
if test "$type" = "blob"
then
oid=$(git rev-parse some-tag:file)
else
oid=$(git rev-parse some-tag^{$type})
fi &&
test_must_fail git push origin $oid:dst 2>err &&
test_i18ngrep "error: The destination you" err &&
test_i18ngrep "hint: Did you mean" err &&
test_must_fail git -c advice.pushUnqualifiedRefName=false \
push origin $oid:dst 2>err &&
test_i18ngrep "error: The destination you" err &&
test_i18ngrep ! "hint: Did you mean" err ||
exit_with=false
done &&
$exit_with
)
error: The destination you provided is not a full refname (i.e.,
hint: Did you mean to create a new branch by pushing to
error: The destination you provided is not a full refname (i.e.,
error: The destination you provided is not a full refname (i.e.,
hint: Did you mean to create a new tag by pushing to
error: The destination you provided is not a full refname (i.e.,
error: The destination you provided is not a full refname (i.e.,
hint: Did you mean to tag a new tree by pushing to
error: The destination you provided is not a full refname (i.e.,
error: The destination you provided is not a full refname (i.e.,
hint: Did you mean to tag a new blob by pushing to
error: The destination you provided is not a full refname (i.e.,
Deleted tag 'some-tag' (was 8969e1d)
ok 91 - unqualified <dst> refspec DWIM and advice
expecting success:
(
cd two &&
git tag -a -m "Some tag" my-tag master &&
git update-ref refs/trees/my-head-tree HEAD^{tree} &&
git update-ref refs/blobs/my-file-blob HEAD:file
) &&
(
cd test &&
git config --add remote.two.fetch "+refs/tags/*:refs/remotes/tags-from-two/*" &&
git config --add remote.two.fetch "+refs/trees/*:refs/remotes/trees-from-two/*" &&
git config --add remote.two.fetch "+refs/blobs/*:refs/remotes/blobs-from-two/*" &&
git fetch --no-tags two &&
test_must_fail git push origin refs/remotes/two/another:dst 2>err &&
test_i18ngrep "error: The destination you" err &&
test_must_fail git push origin refs/remotes/tags-from-two/my-tag:dst-tag 2>err &&
test_i18ngrep "error: The destination you" err &&
test_must_fail git push origin refs/remotes/trees-from-two/my-head-tree:dst-tree 2>err &&
test_i18ngrep "error: The destination you" err &&
test_must_fail git push origin refs/remotes/blobs-from-two/my-file-blob:dst-blob 2>err &&
test_i18ngrep "error: The destination you" err
)
From ../two
* [new tag] my-tag -> tags-from-two/my-tag
* [new ref] refs/trees/my-head-tree -> trees-from-two/my-head-tree
* [new ref] refs/blobs/my-file-blob -> blobs-from-two/my-file-blob
error: The destination you provided is not a full refname (i.e.,
error: The destination you provided is not a full refname (i.e.,
error: The destination you provided is not a full refname (i.e.,
error: The destination you provided is not a full refname (i.e.,
ok 92 - refs/remotes/* <src> refspec and unqualified <dst> DWIM and advice
# passed all 92 test(s)
1..92
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5514-fetch-multiple.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5514-fetch-multiple/.git/
expecting success:
setup_repository one &&
setup_repository two &&
(
cd two && git branch another
) &&
git clone --mirror two three &&
git clone one test
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5514-fetch-multiple/one/.git/
[master (root-commit) 9d34b14] Initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
Switched to a new branch 'side'
[side 2ce9c50] Second
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 elif
Switched to branch 'master'
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5514-fetch-multiple/two/.git/
[master (root-commit) 9d34b14] Initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
Switched to a new branch 'side'
[side 2ce9c50] Second
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 elif
Switched to branch 'master'
Cloning into bare repository 'three'...
done.
Cloning into 'test'...
done.
ok 1 - setup
expecting success:
(cd test &&
git remote add one ../one &&
git remote add two ../two &&
git remote add three ../three &&
git fetch --all &&
git branch -r > output &&
test_cmp expect output)
Fetching origin
Fetching one
From ../one
* [new branch] master -> one/master
* [new branch] side -> one/side
Fetching two
From ../two
* [new branch] another -> two/another
* [new branch] master -> two/master
* [new branch] side -> two/side
Fetching three
From ../three
* [new branch] another -> three/another
* [new branch] master -> three/master
* [new branch] side -> three/side
ok 2 - git fetch --all
expecting success:
(git clone one test2 &&
cd test2 &&
git remote add bad ../non-existing &&
git remote add one ../one &&
git remote add two ../two &&
git remote add three ../three &&
test_must_fail git fetch --all &&
git branch -r > output &&
test_cmp ../test/expect output)
Cloning into 'test2'...
done.
Fetching origin
Fetching bad
fatal: '../non-existing' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error: Could not fetch bad
Fetching one
From ../one
* [new branch] master -> one/master
* [new branch] side -> one/side
Fetching two
From ../two
* [new branch] another -> two/another
* [new branch] master -> two/master
* [new branch] side -> two/side
Fetching three
From ../three
* [new branch] another -> three/another
* [new branch] master -> three/master
* [new branch] side -> three/side
ok 3 - git fetch --all should continue if a remote has errors
expecting success:
(cd test &&
test_must_fail git fetch --all origin &&
test_must_fail git fetch --all origin master)
fatal: fetch --all does not take a repository argument
fatal: fetch --all does not make sense with refspecs
ok 4 - git fetch --all does not allow non-option arguments
expecting success:
(git clone one test3 &&
cd test3 &&
git remote add three ../three &&
git fetch --multiple three &&
git branch -r > output &&
test_cmp ../expect output)
Cloning into 'test3'...
done.
Fetching three
From ../three
* [new branch] another -> three/another
* [new branch] master -> three/master
* [new branch] side -> three/side
ok 5 - git fetch --multiple (but only one remote)
expecting success:
(git clone one test4 &&
cd test4 &&
git remote rm origin &&
git remote add one ../one &&
git remote add two ../two &&
GIT_TRACE=1 git fetch --multiple one two 2>trace &&
git branch -r > output &&
test_cmp ../expect output &&
grep "built-in: git gc" trace >gc &&
test_line_count = 1 gc
)
Cloning into 'test4'...
done.
Fetching one
Fetching two
ok 6 - git fetch --multiple (two remotes)
expecting success:
(cd test4 &&
test_must_fail git fetch --multiple four)
fatal: No such remote or remote group: four
ok 7 - git fetch --multiple (bad remote names)
expecting success:
(cd test4 &&
for b in $(git branch -r)
do
git branch -r -d $b || exit 1
done &&
git remote add three ../three &&
git config remote.three.skipFetchAll true &&
git fetch --all &&
git branch -r > output &&
test_cmp ../expect output)
Deleted remote-tracking branch one/master (was 9d34b14).
Deleted remote-tracking branch one/side (was 2ce9c50).
Deleted remote-tracking branch two/another (was 9d34b14).
Deleted remote-tracking branch two/master (was 9d34b14).
Deleted remote-tracking branch two/side (was 2ce9c50).
Fetching one
From ../one
* [new branch] master -> one/master
* [new branch] side -> one/side
Fetching two
From ../two
* [new branch] another -> two/another
* [new branch] master -> two/master
* [new branch] side -> two/side
ok 8 - git fetch --all (skipFetchAll)
expecting success:
(cd test4 &&
for b in $(git branch -r)
do
git branch -r -d $b || exit 1
done &&
git fetch --multiple one two three &&
git branch -r > output &&
test_cmp ../expect output)
Deleted remote-tracking branch one/master (was 9d34b14).
Deleted remote-tracking branch one/side (was 2ce9c50).
Deleted remote-tracking branch two/another (was 9d34b14).
Deleted remote-tracking branch two/master (was 9d34b14).
Deleted remote-tracking branch two/side (was 2ce9c50).
Fetching one
From ../one
* [new branch] master -> one/master
* [new branch] side -> one/side
Fetching two
From ../two
* [new branch] another -> two/another
* [new branch] master -> two/master
* [new branch] side -> two/side
Fetching three
From ../three
* [new branch] another -> three/another
* [new branch] master -> three/master
* [new branch] side -> three/side
ok 9 - git fetch --multiple (ignoring skipFetchAll)
expecting success:
git clone one test5 &&
git clone test5 test6 &&
(cd test5 && git tag test-tag) &&
(
cd test6 &&
git fetch --all --no-tags &&
git tag >output
) &&
test_must_be_empty test6/output
Cloning into 'test5'...
done.
Cloning into 'test6'...
done.
Fetching origin
ok 10 - git fetch --all --no-tags
expecting success:
echo test-tag >expect &&
git clone one test7 &&
git clone test7 test8 &&
(
cd test7 &&
test_commit test-tag &&
git reset --hard HEAD^
) &&
(
cd test8 &&
git fetch --all --tags &&
git tag >output
) &&
test_cmp expect test8/output
Cloning into 'test7'...
done.
Cloning into 'test8'...
done.
[master 09d3cd3] test-tag
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 test-tag.t
HEAD is now at 9d34b14 Initial
Fetching origin
From /<<PKGBUILDDIR>>/t/trash directory.t5514-fetch-multiple/test7
* [new tag] test-tag -> test-tag
ok 11 - git fetch --all --tags
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5500-fetch-pack.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/.git/
expecting success:
mkdir client &&
(
cd client &&
git init &&
git config transfer.unpacklimit 0
) &&
add A1 &&
prev=1 &&
cur=2 &&
while [ $cur -le 10 ]; do
add A$cur $(eval echo \$A$prev) &&
prev=$cur &&
cur=$(($cur+1))
done &&
add B1 $A1 &&
git update-ref refs/heads/A "$ATIP" &&
git update-ref refs/heads/B "$BTIP" &&
git symbolic-ref HEAD refs/heads/B
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/client/.git/
ok 1 - setup
expecting success:
(
cd client &&
git fetch-pack -k -v .. $heads &&
case "$heads" in
*A*)
git update-ref refs/heads/A "$ATIP";;
esac &&
case "$heads" in *B*)
git update-ref refs/heads/B "$BTIP";;
esac &&
git symbolic-ref HEAD refs/heads/$(
echo $heads |
sed -e "s/^\(.\).*$/\1/"
) &&
git fsck --full &&
mv .git/objects/pack/pack-* . &&
p=$(ls -1 pack-*.pack) &&
git unpack-objects <$p &&
git fsck --full &&
idx=$(echo pack-*.idx) &&
pack_count=$(git show-index <$idx | wc -l) &&
test $pack_count = $count &&
rm -f pack-*
)
Server version is git/2.23.0.rc1
Server supports shallow
Server supports multi_ack_detailed
Server supports side-band-64k
Server supports thin-pack
Server supports no-progress
Server supports include-tag
Server supports ofs-delta
Server supports deepen-since
Server supports deepen-not
Server supports deepen-relative
want 9980fc7e97f06bbd7341f45d570f0c5eb2a954f1 (refs/heads/A)
want ed6d498dac4948371a8c2a3954eef783312857f5 (refs/heads/B)
done
remote:
remote:
remote: Enumerating objects: 33, done.
remote:
remote:
remote: Counting objects: 3% (1/33)
remote:
remote:
remote: Counting objects: 6% (2/33)
remote:
remote:
remote: Counting objects: 9% (3/33)
remote:
remote:
remote: Counting objects: 12% (4/33)
remote:
remote:
remote: Counting objects: 15% (5/33)
remote:
remote:
remote: Counting objects: 18% (6/33)
remote:
remote:
remote: Counting objects: 21% (7/33)
remote:
remote:
remote: Counting objects: 24% (8/33)
remote:
remote:
remote: Counting objects: 27% (9/33)
remote:
remote:
remote: Counting objects: 30% (10/33)
remote:
remote:
remote: Counting objects: 33% (11/33)
remote:
remote:
remote: Counting objects: 36% (12/33)
remote:
remote:
remote: Counting objects: 39% (13/33)
remote:
remote:
remote: Counting objects: 42% (14/33)
remote:
remote:
remote: Counting objects: 45% (15/33)
remote:
remote:
remote: Counting objects: 48% (16/33)
remote:
remote:
remote: Counting objects: 51% (17/33)
remote:
remote:
remote: Counting objects: 54% (18/33)
remote:
remote:
remote: Counting objects: 57% (19/33)
remote:
remote:
remote: Counting objects: 60% (20/33)
remote:
remote:
remote: Counting objects: 63% (21/33)
remote:
remote:
remote: Counting objects: 66% (22/33)
remote:
remote:
remote: Counting objects: 69% (23/33)
remote:
remote:
remote: Counting objects: 72% (24/33)
remote:
remote:
remote: Counting objects: 75% (25/33)
remote:
remote:
remote: Counting objects: 78% (26/33)
remote:
remote:
remote: Counting objects: 81% (27/33)
remote:
remote:
remote: Counting objects: 84% (28/33)
remote:
remote:
remote: Counting objects: 87% (29/33)
remote:
remote:
remote: Counting objects: 90% (30/33)
remote:
remote:
remote: Counting objects: 93% (31/33)
remote:
remote:
remote: Counting objects: 96% (32/33)
remote:
remote:
remote: Counting objects: 100% (33/33)
remote:
remote:
remote: Counting objects: 100% (33/33), done.
remote:
remote:
remote: Compressing objects: 9% (1/11)
remote:
remote:
remote: Compressing objects: 18% (2/11)
remote:
remote:
remote: Compressing objects: 27% (3/11)
remote:
remote:
remote: Compressing objects: 36% (4/11)
remote:
remote:
remote: Compressing objects: 45% (5/11)
remote:
remote:
remote: Compressing objects: 54% (6/11)
remote:
remote:
remote: Compressing objects: 63% (7/11)
remote:
remote:
remote: Compressing objects: 72% (8/11)
remote:
remote:
remote: Compressing objects: 81% (9/11)
remote:
remote:
remote: Compressing objects: 90% (10/11)
remote:
remote:
remote: Compressing objects: 100% (11/11)
remote:
remote:
remote: Compressing objects: 100% (11/11), done.
remote: Total 33 (delta 1), reused 0 (delta 0)
Receiving objects: 3% (1/33)
Receiving objects: 6% (2/33)
Receiving objects: 9% (3/33)
Receiving objects: 12% (4/33)
Receiving objects: 15% (5/33)
Receiving objects: 18% (6/33)
Receiving objects: 21% (7/33)
Receiving objects: 24% (8/33)
Receiving objects: 27% (9/33)
Receiving objects: 30% (10/33)
Receiving objects: 33% (11/33)
Receiving objects: 36% (12/33)
Receiving objects: 39% (13/33)
Receiving objects: 42% (14/33)
Receiving objects: 45% (15/33)
Receiving objects: 48% (16/33)
Receiving objects: 51% (17/33)
Receiving objects: 54% (18/33)
Receiving objects: 57% (19/33)
Receiving objects: 60% (20/33)
Receiving objects: 63% (21/33)
Receiving objects: 66% (22/33)
Receiving objects: 69% (23/33)
Receiving objects: 72% (24/33)
Receiving objects: 75% (25/33)
Receiving objects: 78% (26/33)
Receiving objects: 81% (27/33)
Receiving objects: 84% (28/33)
Receiving objects: 87% (29/33)
Receiving objects: 90% (30/33)
Receiving objects: 93% (31/33)
Receiving objects: 96% (32/33)
Receiving objects: 100% (33/33)
Receiving objects: 100% (33/33), 2.67 KiB | 1.34 MiB/s, done.
Resolving deltas: 0% (0/1)
Resolving deltas: 100% (1/1)
Resolving deltas: 100% (1/1), done.
pack 3791170b8839b1bcb89a066d52633bc8b213dcdf
9980fc7e97f06bbd7341f45d570f0c5eb2a954f1 refs/heads/A
ed6d498dac4948371a8c2a3954eef783312857f5 refs/heads/B
notice: HEAD points to an unborn branch (r)
notice: HEAD points to an unborn branch (r)
ok 2 - 1st pull
expecting success:
add A11 $A10 &&
prev=1 &&
cur=2 &&
while [ $cur -le 65 ]; do
add B$cur $(eval echo \$B$prev) &&
prev=$cur &&
cur=$(($cur+1))
done
ok 3 - post 1st pull setup
expecting success:
(
cd client &&
git fetch-pack -k -v .. $heads &&
case "$heads" in
*A*)
git update-ref refs/heads/A "$ATIP";;
esac &&
case "$heads" in *B*)
git update-ref refs/heads/B "$BTIP";;
esac &&
git symbolic-ref HEAD refs/heads/$(
echo $heads |
sed -e "s/^\(.\).*$/\1/"
) &&
git fsck --full &&
mv .git/objects/pack/pack-* . &&
p=$(ls -1 pack-*.pack) &&
git unpack-objects <$p &&
git fsck --full &&
idx=$(echo pack-*.idx) &&
pack_count=$(git show-index <$idx | wc -l) &&
test $pack_count = $count &&
rm -f pack-*
)
Server version is git/2.23.0.rc1
Server supports shallow
Server supports multi_ack_detailed
Server supports side-band-64k
Server supports thin-pack
Server supports no-progress
Server supports include-tag
Server supports ofs-delta
Server supports deepen-since
Server supports deepen-not
Server supports deepen-relative
want 27f494dfb7e67d2f9cd2282404adf1d97581aa34 (refs/heads/B)
have ed6d498dac4948371a8c2a3954eef783312857f5
have 9980fc7e97f06bbd7341f45d570f0c5eb2a954f1
have 47efdca58ae7f1fde501a06f1d57df26917b26b3
have ba87c301b81383c24349363a6bb39b6111abf78b
have 602f04194f3675f02accdfbf8e6291386b0f4e97
have 6e148f1d228e32d605c1881b1adbd357d61dc835
have 17e73716ce6121eb708bfb31fba1d4734d567834
have 858fd03f424cf6017e764d3239da1f6b9584ee4b
have 3911f7110bed898c8916759e9788b6ac72f052f4
have c1e2732633d64f4deb9d97137237b2769d6e29f5
have 3ac3ef48e6a300496e8466ad8a80df7f37503a7e
done
got ack (3) ed6d498dac4948371a8c2a3954eef783312857f5
got ack (3) 9980fc7e97f06bbd7341f45d570f0c5eb2a954f1
got ack (3) 47efdca58ae7f1fde501a06f1d57df26917b26b3
got ack (3) ba87c301b81383c24349363a6bb39b6111abf78b
got ack (3) 602f04194f3675f02accdfbf8e6291386b0f4e97
got ack (3) 6e148f1d228e32d605c1881b1adbd357d61dc835
got ack (3) 17e73716ce6121eb708bfb31fba1d4734d567834
got ack (3) 858fd03f424cf6017e764d3239da1f6b9584ee4b
got ack (3) 3911f7110bed898c8916759e9788b6ac72f052f4
got ack (3) c1e2732633d64f4deb9d97137237b2769d6e29f5
got ack (3) 3ac3ef48e6a300496e8466ad8a80df7f37503a7e
got ack (1) 3ac3ef48e6a300496e8466ad8a80df7f37503a7e
remote:
remote:
remote: Enumerating objects: 192, done.
remote:
remote:
remote: Counting objects: 0% (1/192)
remote:
remote:
remote: Counting objects: 1% (2/192)
remote:
remote:
remote: Counting objects: 2% (4/192)
remote:
remote:
remote: Counting objects: 3% (6/192)
remote:
remote:
remote: Counting objects: 4% (8/192)
remote:
remote:
remote: Counting objects: 5% (10/192)
remote:
remote:
remote: Counting objects: 6% (12/192)
remote:
remote:
remote: Counting objects: 7% (14/192)
remote:
remote:
remote: Counting objects: 8% (16/192)
remote:
remote:
remote: Counting objects: 9% (18/192)
remote:
remote:
remote: Counting objects: 10% (20/192)
remote:
remote:
remote: Counting objects: 11% (22/192)
remote:
remote:
remote: Counting objects: 12% (24/192)
remote:
remote:
remote: Counting objects: 13% (25/192)
remote:
remote:
remote: Counting objects: 14% (27/192)
remote:
remote:
remote: Counting objects: 15% (29/192)
remote:
remote:
remote: Counting objects: 16% (31/192)
remote:
remote:
remote: Counting objects: 17% (33/192)
remote:
remote:
remote: Counting objects: 18% (35/192)
remote:
remote:
remote: Counting objects: 19% (37/192)
remote:
remote:
remote: Counting objects: 20% (39/192)
remote:
remote:
remote: Counting objects: 21% (41/192)
remote:
remote:
remote: Counting objects: 22% (43/192)
remote:
remote:
remote: Counting objects: 23% (45/192)
remote:
remote:
remote: Counting objects: 24% (47/192)
remote:
remote:
remote: Counting objects: 25% (48/192)
remote:
remote:
remote: Counting objects: 26% (50/192)
remote:
remote:
remote: Counting objects: 27% (52/192)
remote:
remote:
remote: Counting objects: 28% (54/192)
remote:
remote:
remote: Counting objects: 29% (56/192)
remote:
remote:
remote: Counting objects: 30% (58/192)
remote:
remote:
remote: Counting objects: 31% (60/192)
remote:
remote:
remote: Counting objects: 32% (62/192)
remote:
remote:
remote: Counting objects: 33% (64/192)
remote:
remote:
remote: Counting objects: 34% (66/192)
remote:
remote:
remote: Counting objects: 35% (68/192)
remote:
remote:
remote: Counting objects: 36% (70/192)
remote:
remote:
remote: Counting objects: 37% (72/192)
remote:
remote:
remote: Counting objects: 38% (73/192)
remote:
remote:
remote: Counting objects: 39% (75/192)
remote:
remote:
remote: Counting objects: 40% (77/192)
remote:
remote:
remote: Counting objects: 41% (79/192)
remote:
remote:
remote: Counting objects: 42% (81/192)
remote:
remote:
remote: Counting objects: 43% (83/192)
remote:
remote:
remote: Counting objects: 44% (85/192)
remote:
remote:
remote: Counting objects: 45% (87/192)
remote:
remote:
remote: Counting objects: 46% (89/192)
remote:
remote:
remote: Counting objects: 47% (91/192)
remote:
remote:
remote: Counting objects: 48% (93/192)
remote:
remote:
remote: Counting objects: 49% (95/192)
remote:
remote:
remote: Counting objects: 50% (96/192)
remote:
remote:
remote: Counting objects: 51% (98/192)
remote:
remote:
remote: Counting objects: 52% (100/192)
remote:
remote:
remote: Counting objects: 53% (102/192)
remote:
remote:
remote: Counting objects: 54% (104/192)
remote:
remote:
remote: Counting objects: 55% (106/192)
remote:
remote:
remote: Counting objects: 56% (108/192)
remote:
remote:
remote: Counting objects: 57% (110/192)
remote:
remote:
remote: Counting objects: 58% (112/192)
remote:
remote:
remote: Counting objects: 59% (114/192)
remote:
remote:
remote: Counting objects: 60% (116/192)
remote:
remote:
remote: Counting objects: 61% (118/192)
remote:
remote:
remote: Counting objects: 62% (120/192)
remote:
remote:
remote: Counting objects: 63% (121/192)
remote:
remote:
remote: Counting objects: 64% (123/192)
remote:
remote:
remote: Counting objects: 65% (125/192)
remote:
remote:
remote: Counting objects: 66% (127/192)
remote:
remote:
remote: Counting objects: 67% (129/192)
remote:
remote:
remote: Counting objects: 68% (131/192)
remote:
remote:
remote: Counting objects: 69% (133/192)
remote:
remote:
remote: Counting objects: 70% (135/192)
remote:
remote:
remote: Counting objects: 71% (137/192)
remote:
remote:
remote: Counting objects: 72% (139/192)
remote:
remote:
remote: Counting objects: 73% (141/192)
remote:
remote:
remote: Counting objects: 74% (143/192)
remote:
remote:
remote: Counting objects: 75% (144/192)
remote:
remote:
remote: Counting objects: 76% (146/192)
remote:
remote:
remote: Counting objects: 77% (148/192)
remote:
remote:
remote: Counting objects: 78% (150/192)
remote:
remote:
remote: Counting objects: 79% (152/192)
remote:
remote:
remote: Counting objects: 80% (154/192)
remote:
remote:
remote: Counting objects: 81% (156/192)
remote:
remote:
remote: Counting objects: 82% (158/192)
remote:
remote:
remote: Counting objects: 83% (160/192)
remote:
remote:
remote: Counting objects: 84% (162/192)
remote:
remote:
remote: Counting objects: 85% (164/192)
remote:
remote:
remote: Counting objects: 86% (166/192)
remote:
remote:
remote: Counting objects: 87% (168/192)
remote:
remote:
remote: Counting objects: 88% (169/192)
remote:
remote:
remote: Counting objects: 89% (171/192)
remote:
remote:
remote: Counting objects: 90% (173/192)
remote:
remote:
remote: Counting objects: 91% (175/192)
remote:
remote:
remote: Counting objects: 92% (177/192)
remote:
remote:
remote: Counting objects: 93% (179/192)
remote:
remote:
remote: Counting objects: 94% (181/192)
remote:
remote:
remote: Counting objects: 95% (183/192)
remote:
remote:
remote: Counting objects: 96% (185/192)
remote:
remote:
remote: Counting objects: 97% (187/192)
remote:
remote:
remote: Counting objects: 98% (189/192)
remote:
remote:
remote: Counting objects: 99% (191/192)
remote:
remote:
remote: Counting objects: 100% (192/192)
remote:
remote:
remote: Counting objects: 100% (192/192), done.
remote:
remote:
remote: Compressing objects: 1% (1/64)
remote:
remote:
remote: Compressing objects: 3% (2/64)
remote:
remote:
remote: Compressing objects: 4% (3/64)
remote:
remote:
remote: Compressing objects: 6% (4/64)
remote:
remote:
remote: Compressing objects: 7% (5/64)
remote:
remote:
remote: Compressing objects: 9% (6/64)
remote:
remote:
remote: Compressing objects: 10% (7/64)
remote:
remote:
remote: Compressing objects: 12% (8/64)
remote:
remote:
remote: Compressing objects: 14% (9/64)
remote:
remote:
remote: Compressing objects: 15% (10/64)
remote:
remote:
remote: Compressing objects: 17% (11/64)
remote:
remote:
remote: Compressing objects: 18% (12/64)
remote:
remote:
remote: Compressing objects: 20% (13/64)
remote:
remote:
remote: Compressing objects: 21% (14/64)
remote:
remote:
remote: Compressing objects: 23% (15/64)
remote:
remote:
remote: Compressing objects: 25% (16/64)
remote:
remote:
remote: Compressing objects: 26% (17/64)
remote:
remote:
remote: Compressing objects: 28% (18/64)
remote:
remote:
remote: Compressing objects: 29% (19/64)
remote:
remote:
remote: Compressing objects: 31% (20/64)
remote:
remote:
remote: Compressing objects: 32% (21/64)
remote:
remote:
remote: Compressing objects: 34% (22/64)
remote:
remote:
remote: Compressing objects: 35% (23/64)
remote:
remote:
remote: Compressing objects: 37% (24/64)
remote:
remote:
remote: Compressing objects: 39% (25/64)
remote:
remote:
remote: Compressing objects: 40% (26/64)
remote:
remote:
remote: Compressing objects: 42% (27/64)
remote:
remote:
remote: Compressing objects: 43% (28/64)
remote:
remote:
remote: Compressing objects: 45% (29/64)
remote:
remote:
remote: Compressing objects: 46% (30/64)
remote:
remote:
remote: Compressing objects: 48% (31/64)
remote:
remote:
remote: Compressing objects: 50% (32/64)
remote:
remote:
remote: Compressing objects: 51% (33/64)
remote:
remote:
remote: Compressing objects: 53% (34/64)
remote:
remote:
remote: Compressing objects: 54% (35/64)
remote:
remote:
remote: Compressing objects: 56% (36/64)
remote:
remote:
remote: Compressing objects: 57% (37/64)
remote:
remote:
remote: Compressing objects: 59% (38/64)
remote:
remote:
remote: Compressing objects: 60% (39/64)
remote:
remote:
remote: Compressing objects: 62% (40/64)
remote:
remote:
remote: Compressing objects: 64% (41/64)
remote:
remote:
remote: Compressing objects: 65% (42/64)
remote:
remote:
remote: Compressing objects: 67% (43/64)
remote:
remote:
remote: Compressing objects: 68% (44/64)
remote:
remote:
remote: Compressing objects: 70% (45/64)
remote:
remote:
remote: Compressing objects: 71% (46/64)
remote:
remote:
remote: Compressing objects: 73% (47/64)
remote:
remote:
remote: Compressing objects: 75% (48/64)
remote:
remote:
remote: Compressing objects: 76% (49/64)
remote:
remote:
remote: Compressing objects: 78% (50/64)
remote:
remote:
remote: Compressing objects: 79% (51/64)
remote:
remote:
remote: Compressing objects: 81% (52/64)
remote:
remote:
remote: Compressing objects: 82% (53/64)
remote:
remote:
remote: Compressing objects: 84% (54/64)
remote:
remote:
remote: Compressing objects: 85% (55/64)
remote:
remote:
remote: Compressing objects: 87% (56/64)
remote:
remote:
remote: Compressing objects: 89% (57/64)
remote:
remote:
remote: Compressing objects: 90% (58/64)
remote:
remote:
remote: Compressing objects: 92% (59/64)
remote:
remote:
remote: Compressing objects: 93% (60/64)
remote:
remote:
remote: Compressing objects: 95% (61/64)
remote:
remote:
remote: Compressing objects: 96% (62/64)
remote:
remote:
remote: Compressing objects: 98% (63/64)
remote:
remote:
remote: Compressing objects: 100% (64/64)
remote:
remote:
remote: Compressing objects: 100% (64/64), done.
Receiving objects: 0% (1/192)
Receiving objects: 1% (2/192)
Receiving objects: 2% (4/192)
Receiving objects: 3% (6/192)
Receiving objects: 4% (8/192)
Receiving objects: 5% (10/192)
Receiving objects: 6% (12/192)
Receiving objects: 7% (14/192)
Receiving objects: 8% (16/192)
Receiving objects: 9% (18/192)
Receiving objects: 10% (20/192)
Receiving objects: 11% (22/192)
Receiving objects: 12% (24/192)
Receiving objects: 13% (25/192)
Receiving objects: 14% (27/192)
Receiving objects: 15% (29/192)
Receiving objects: 16% (31/192)
Receiving objects: 17% (33/192)
Receiving objects: 18% (35/192)
Receiving objects: 19% (37/192)
Receiving objects: 20% (39/192)
Receiving objects: 21% (41/192)
Receiving objects: 22% (43/192)
Receiving objects: 23% (45/192)
Receiving objects: 24% (47/192)
Receiving objects: 25% (48/192)
Receiving objects: 26% (50/192)
Receiving objects: 27% (52/192)
Receiving objects: 28% (54/192)
Receiving objects: 29% (56/192)
Receiving objects: 30% (58/192)
Receiving objects: 31% (60/192)
Receiving objects: 32% (62/192)
Receiving objects: 33% (64/192)
Receiving objects: 34% (66/192)
Receiving objects: 35% (68/192)
Receiving objects: 36% (70/192)
Receiving objects: 37% (72/192)
Receiving objects: 38% (73/192)
Receiving objects: 39% (75/192)
Receiving objects: 40% (77/192)
Receiving objects: 41% (79/192)
Receiving objects: 42% (81/192)
Receiving objects: 43% (83/192)
Receiving objects: 44% (85/192)
Receiving objects: 45% (87/192)
Receiving objects: 46% (89/192)
Receiving objects: 47% (91/192)
Receiving objects: 48% (93/192)
Receiving objects: 49% (95/192)
Receiving objects: 50% (96/192)
Receiving objects: 51% (98/192)
Receiving objects: 52% (100/192)
Receiving objects: 53% (102/192)
Receiving objects: 54% (104/192)
Receiving objects: 55% (106/192)
Receiving objects: 56% (108/192)
Receiving objects: 57% (110/192)
Receiving objects: 58% (112/192)
Receiving objects: 59% (114/192)
Receiving objects: 60% (116/192)
Receiving objects: 61% (118/192)
Receiving objects: 62% (120/192)
Receiving objects: 63% (121/192)
Receiving objects: 64% (123/192)
Receiving objects: 65% (125/192)
Receiving objects: 66% (127/192)
Receiving objects: 67% (129/192)
Receiving objects: 68% (131/192)
Receiving objects: 69% (133/192)
Receiving objects: 70% (135/192)
Receiving objects: 71% (137/192)
Receiving objects: 72% (139/192)
Receiving objects: 73% (141/192)
Receiving objects: 74% (143/192)
Receiving objects: 75% (144/192)
Receiving objects: 76% (146/192)
Receiving objects: 77% (148/192)
Receiving objects: 78% (150/192)
Receiving objects: 79% (152/192)
Receiving objects: 80% (154/192)
Receiving objects: 81% (156/192)
Receiving objects: 82% (158/192)
Receiving objects: 83% (160/192)
Receiving objects: 84% (162/192)
Receiving objects: 85% (164/192)
Receiving objects: 86% (166/192)
Receiving objects: 87% (168/192)
Receiving objects: 88% (169/192)
Receiving objects: 89% (171/192)
Receiving objects: 90% (173/192)
Receiving objects: 91% (175/192)
Receiving objects: 92% (177/192)
Receiving objects: 93% (179/192)
Receiving objects: 94% (181/192)
Receiving objects: 95% (183/192)
Receiving objects: 96% (185/192)
Receiving objects: 97% (187/192)
Receiving objects: 98% (189/192)
Receiving objects: 99% (191/192)
Receiving objects: 100% (192/192)
Receiving objects: 100% (192/192), 16.29 KiB | 150.00 KiB/s, done.
remote: Total 192 (delta 0), reused 0 (delta 0)
pack d6698cfcaf6e075007fcb2123d8a138210d6d911
27f494dfb7e67d2f9cd2282404adf1d97581aa34 refs/heads/B
notice: HEAD points to an unborn branch (r)
notice: HEAD points to an unborn branch (r)
ok 4 - 2nd pull
expecting success:
(
cd client &&
git fetch-pack -k -v .. $heads &&
case "$heads" in
*A*)
git update-ref refs/heads/A "$ATIP";;
esac &&
case "$heads" in *B*)
git update-ref refs/heads/B "$BTIP";;
esac &&
git symbolic-ref HEAD refs/heads/$(
echo $heads |
sed -e "s/^\(.\).*$/\1/"
) &&
git fsck --full &&
mv .git/objects/pack/pack-* . &&
p=$(ls -1 pack-*.pack) &&
git unpack-objects <$p &&
git fsck --full &&
idx=$(echo pack-*.idx) &&
pack_count=$(git show-index <$idx | wc -l) &&
test $pack_count = $count &&
rm -f pack-*
)
Server version is git/2.23.0.rc1
Server supports shallow
Server supports multi_ack_detailed
Server supports side-band-64k
Server supports thin-pack
Server supports no-progress
Server supports include-tag
Server supports ofs-delta
Server supports deepen-since
Server supports deepen-not
Server supports deepen-relative
Marking 27f494dfb7e67d2f9cd2282404adf1d97581aa34 as complete
want f85e353c1b377970afbb804118d9135948598eea (refs/heads/A)
have 27f494dfb7e67d2f9cd2282404adf1d97581aa34
have 9980fc7e97f06bbd7341f45d570f0c5eb2a954f1
have 47efdca58ae7f1fde501a06f1d57df26917b26b3
have ba87c301b81383c24349363a6bb39b6111abf78b
have 602f04194f3675f02accdfbf8e6291386b0f4e97
have 6e148f1d228e32d605c1881b1adbd357d61dc835
have 17e73716ce6121eb708bfb31fba1d4734d567834
have 858fd03f424cf6017e764d3239da1f6b9584ee4b
have 3911f7110bed898c8916759e9788b6ac72f052f4
have c1e2732633d64f4deb9d97137237b2769d6e29f5
done
got ack (3) 27f494dfb7e67d2f9cd2282404adf1d97581aa34
got ack (3) 9980fc7e97f06bbd7341f45d570f0c5eb2a954f1
got ack (3) 47efdca58ae7f1fde501a06f1d57df26917b26b3
got ack (3) ba87c301b81383c24349363a6bb39b6111abf78b
got ack (3) 602f04194f3675f02accdfbf8e6291386b0f4e97
got ack (3) 6e148f1d228e32d605c1881b1adbd357d61dc835
got ack (3) 17e73716ce6121eb708bfb31fba1d4734d567834
got ack (3) 858fd03f424cf6017e764d3239da1f6b9584ee4b
got ack (3) 3911f7110bed898c8916759e9788b6ac72f052f4
got ack (3) c1e2732633d64f4deb9d97137237b2769d6e29f5
got ack (1) c1e2732633d64f4deb9d97137237b2769d6e29f5
remote:
remote:
remote: Enumerating objects: 3, done.
remote:
remote:
remote: Counting objects: 33% (1/3)
remote:
remote:
remote: Counting objects: 66% (2/3)
remote:
remote:
remote: Counting objects: 100% (3/3)
remote:
remote:
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 33% (1/3)
Receiving objects: 66% (2/3)
Receiving objects: 100% (3/3)
Receiving objects: 100% (3/3), done.
pack 8c2aba64d976b4b0893650f8d05017eac7cd6e21
f85e353c1b377970afbb804118d9135948598eea refs/heads/A
notice: HEAD points to an unborn branch (r)
notice: HEAD points to an unborn branch (r)
ok 5 - 3rd pull
expecting success:
git clone --single-branch "file://$(pwd)/." singlebranch
Cloning into 'singlebranch'...
ok 6 - single branch clone
expecting success:
GIT_DIR=singlebranch/.git git count-objects -v |
grep "^in-pack:" > count.singlebranch &&
echo "in-pack: 198" >expected &&
test_cmp expected count.singlebranch
ok 7 - single branch object count
expecting success:
git clone --single-branch --branch A "file://$(pwd)/." branch-a &&
test_must_fail git --git-dir=branch-a/.git rev-parse origin/B
Cloning into 'branch-a'...
fatal: ambiguous argument 'origin/B': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
origin/B
ok 8 - single given branch clone
expecting success:
git clone --no-single-branch --depth 1 "file://$(pwd)/." shallow0 &&
test "$(git --git-dir=shallow0/.git rev-list --count HEAD)" = 1
Cloning into 'shallow0'...
ok 9 - clone shallow depth 1
expecting success:
git config --global fetch.fsckobjects true &&
git clone --no-single-branch --depth 1 "file://$(pwd)/." shallow0fsck &&
test "$(git --git-dir=shallow0fsck/.git rev-list --count HEAD)" = 1 &&
git config --global --unset fetch.fsckobjects
Cloning into 'shallow0fsck'...
ok 10 - clone shallow depth 1 with fsck
expecting success:
git clone --no-single-branch --depth 2 "file://$(pwd)/." shallow
Cloning into 'shallow'...
ok 11 - clone shallow
expecting success:
test "$(git --git-dir=shallow/.git rev-list --count HEAD)" = 2
ok 12 - clone shallow depth count
expecting success:
(
cd shallow &&
git count-objects -v
) > count.shallow &&
grep "^in-pack: 12" count.shallow
in-pack: 12
ok 13 - clone shallow object count
expecting success:
sed -e "/^in-pack:/d" -e "/^packs:/d" -e "/^size-pack:/d" \
-e "/: 0$/d" count.shallow > count_output &&
test_must_be_empty count_output
ok 14 - clone shallow object count (part 2)
expecting success:
(
cd shallow &&
git fsck --full
)
ok 15 - fsck in shallow repo
expecting success:
(
cd shallow &&
git fetch
)
ok 16 - simple fetch in shallow repo
expecting success:
(
cd shallow &&
git count-objects -v
) > count.shallow.2 &&
cmp count.shallow count.shallow.2
ok 17 - no changes expected
expecting success:
(
cd shallow &&
git fetch --depth=2
)
ok 18 - fetch same depth in shallow repo
expecting success:
(
cd shallow &&
git count-objects -v
) > count.shallow.3 &&
cmp count.shallow count.shallow.3
ok 19 - no changes expected
expecting success:
add B66 $B65 &&
add B67 $B66
ok 20 - add two more
expecting success:
(
cd shallow &&
git pull .. B
)
From ..
* branch B -> FETCH_HEAD
Updating 27f494d..437bc54
Fast-forward
test.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ok 21 - pull in shallow repo
expecting success:
(
cd shallow &&
git count-objects -v
) > count.shallow &&
grep "^count: 6" count.shallow
count: 6
ok 22 - clone shallow object count
expecting success:
add B68 $B67 &&
add B69 $B68
ok 23 - add two more (part 2)
expecting success:
(
cd shallow &&
git pull --depth 4 .. B
)
From ..
* branch B -> FETCH_HEAD
Updating 437bc54..9ca64d8
Fast-forward
test.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ok 24 - deepening pull in shallow repo
expecting success:
(
cd shallow &&
git count-objects -v
) > count.shallow &&
grep "^count: 12" count.shallow
count: 12
ok 25 - clone shallow object count
expecting success:
(
cd shallow &&
git fetch --depth 4 .. A:A
)
From ..
* [new branch] A -> A
ok 26 - deepening fetch in shallow repo
expecting success:
(
cd shallow &&
git count-objects -v
) > count.shallow &&
grep "^count: 18" count.shallow
count: 18
ok 27 - clone shallow object count
expecting success:
(
cd shallow &&
git fetch --depth 4 .. A &&
test_must_fail git merge --allow-unrelated-histories FETCH_HEAD
)
From ..
* branch A -> FETCH_HEAD
Merging:
9ca64d8 B69 12506236f9d4e4c1150d951940e54aa6ef43c8d3
virtual f85e353c1b377970afbb804118d9135948598eea
found 0 common ancestors:
CONFLICT (add/add): Merge conflict in test.txt
Auto-merging test.txt
Automatic merge failed; fix conflicts and then commit the result.
ok 28 - pull in shallow repo with missing merge base
expecting success:
(
cd shallow &&
git fetch --depth=8 &&
git fetch --depth=10 &&
git fetch --depth=11
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/.
+ 27f494d...9ca64d8 B -> origin/B (forced update)
ok 29 - additional simple shallow deepenings
expecting success:
test "$(git --git-dir=shallow/.git rev-list --count HEAD)" = 11
ok 30 - clone shallow depth count
expecting success:
(
cd shallow &&
git prune &&
git count-objects -v
) > count.shallow &&
grep "^count: 54" count.shallow
count: 54
ok 31 - clone shallow object count
expecting success:
test_must_fail git fetch --noshallow
error: unknown option `noshallow'
usage: git fetch [<options>] [<repository> [<refspec>...]]
or: git fetch [<options>] <group>
or: git fetch --multiple [<options>] [(<repository> | <group>)...]
or: git fetch --all [<options>]
-v, --verbose be more verbose
-q, --quiet be more quiet
--all fetch from all remotes
-a, --append append to .git/FETCH_HEAD instead of overwriting
--upload-pack <path> path to upload pack on remote end
-f, --force force overwrite of local reference
-m, --multiple fetch from multiple remotes
-t, --tags fetch all tags and associated objects
-n do not fetch all tags (--no-tags)
-j, --jobs <n> number of submodules fetched in parallel
-p, --prune prune remote-tracking branches no longer on remote
-P, --prune-tags prune local tags no longer on remote and clobber changed tags
--recurse-submodules[=<on-demand>]
control recursive fetching of submodules
--dry-run dry run
-k, --keep keep downloaded pack
-u, --update-head-ok allow updating of HEAD ref
--progress force progress reporting
--depth <depth> deepen history of shallow clone
--shallow-since <time>
deepen history of shallow repository based on time
--shallow-exclude <revision>
deepen history of shallow clone, excluding rev
--deepen <n> deepen history of shallow clone
--unshallow convert to a complete repository
--update-shallow accept refs that update .git/shallow
--refmap <refmap> specify fetch refmap
-o, --server-option <server-specific>
option to transmit
-4, --ipv4 use IPv4 addresses only
-6, --ipv6 use IPv6 addresses only
--negotiation-tip <revision>
report that we have only objects reachable from this object
--filter <args> object filtering
--auto-gc run 'gc --auto' after fetching
--show-forced-updates
check for forced-updates on all updated branches
ok 32 - fetch --no-shallow on full repo
expecting success:
(
cd shallow &&
test_must_fail git fetch --depth=1 --noshallow
)
error: unknown option `noshallow'
usage: git fetch [<options>] [<repository> [<refspec>...]]
or: git fetch [<options>] <group>
or: git fetch --multiple [<options>] [(<repository> | <group>)...]
or: git fetch --all [<options>]
-v, --verbose be more verbose
-q, --quiet be more quiet
--all fetch from all remotes
-a, --append append to .git/FETCH_HEAD instead of overwriting
--upload-pack <path> path to upload pack on remote end
-f, --force force overwrite of local reference
-m, --multiple fetch from multiple remotes
-t, --tags fetch all tags and associated objects
-n do not fetch all tags (--no-tags)
-j, --jobs <n> number of submodules fetched in parallel
-p, --prune prune remote-tracking branches no longer on remote
-P, --prune-tags prune local tags no longer on remote and clobber changed tags
--recurse-submodules[=<on-demand>]
control recursive fetching of submodules
--dry-run dry run
-k, --keep keep downloaded pack
-u, --update-head-ok allow updating of HEAD ref
--progress force progress reporting
--depth <depth> deepen history of shallow clone
--shallow-since <time>
deepen history of shallow repository based on time
--shallow-exclude <revision>
deepen history of shallow clone, excluding rev
--deepen <n> deepen history of shallow clone
--unshallow convert to a complete repository
--update-shallow accept refs that update .git/shallow
--refmap <refmap> specify fetch refmap
-o, --server-option <server-specific>
option to transmit
-4, --ipv4 use IPv4 addresses only
-6, --ipv6 use IPv6 addresses only
--negotiation-tip <revision>
report that we have only objects reachable from this object
--filter <args> object filtering
--auto-gc run 'gc --auto' after fetching
--show-forced-updates
check for forced-updates on all updated branches
ok 33 - fetch --depth --no-shallow
expecting success:
(
cd shallow &&
git fetch --unshallow &&
! test -f .git/shallow &&
git fsck --full
)
ok 34 - turn shallow to complete repository
expecting success:
git clone --depth 1 "file://$(pwd)/." shallow2
Cloning into 'shallow2'...
ok 35 - clone shallow without --no-single-branch
expecting success:
(
cd shallow2 &&
git count-objects -v
) > count.shallow2 &&
grep "^in-pack: 3" count.shallow2
in-pack: 3
ok 36 - clone shallow object count
expecting success:
git clone --depth 1 --branch A "file://$(pwd)/." shallow3
Cloning into 'shallow3'...
ok 37 - clone shallow with --branch
expecting success:
echo "in-pack: 3" > count3.expected &&
GIT_DIR=shallow3/.git git count-objects -v |
grep "^in-pack" > count3.actual &&
test_cmp count3.expected count3.actual
ok 38 - clone shallow object count
expecting success:
git checkout HEAD^ &&
git clone --depth 1 "file://$(pwd)/." shallow5 &&
git checkout - &&
GIT_DIR=shallow5/.git git rev-parse HEAD >actual &&
git rev-parse HEAD^ >expected &&
test_cmp expected actual
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 1250623 B68 437bc546da4e1741a26c6bfb6b7eeb6e56e2677f
Cloning into 'shallow5'...
Note: switching to '12506236f9d4e4c1150d951940e54aa6ef43c8d3'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
Previous HEAD position was 1250623 B68 437bc546da4e1741a26c6bfb6b7eeb6e56e2677f
Switched to branch 'B'
ok 39 - clone shallow with detached HEAD
expecting success:
git tag -a -m A TAGA1 A &&
git tag -a -m B TAGB1 B &&
git tag TAGA2 A &&
git tag TAGB2 B &&
git clone --depth 1 "file://$(pwd)/." shallow6 &&
cat >taglist.expected <<\EOF &&
TAGB1
TAGB2
EOF
GIT_DIR=shallow6/.git git tag -l >taglist.actual &&
test_cmp taglist.expected taglist.actual &&
echo "in-pack: 4" > count6.expected &&
GIT_DIR=shallow6/.git git count-objects -v |
grep "^in-pack" > count6.actual &&
test_cmp count6.expected count6.actual
Cloning into 'shallow6'...
ok 40 - shallow clone pulling tags
expecting success:
git clone --depth 1 --branch=TAGB1 "file://$(pwd)/." shallow7 &&
cat >taglist.expected <<\EOF &&
TAGB1
TAGB2
EOF
GIT_DIR=shallow7/.git git tag -l >taglist.actual &&
test_cmp taglist.expected taglist.actual &&
echo "in-pack: 4" > count7.expected &&
GIT_DIR=shallow7/.git git count-objects -v |
grep "^in-pack" > count7.actual &&
test_cmp count7.expected count7.actual
Cloning into 'shallow7'...
Note: switching to '9ca64d8fd8038b086badca1d11ccd8bbcfdeace1'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
ok 41 - shallow cloning single tag
expecting success:
git pack-refs --all &&
git clone --depth 1 --branch A "file://$(pwd)/." shallow8 &&
echo "in-pack: 4" > count8.expected &&
GIT_DIR=shallow8/.git git count-objects -v |
grep "^in-pack" > count8.actual &&
test_cmp count8.expected count8.actual
Cloning into 'shallow8'...
ok 42 - clone shallow with packed refs
expecting success:
(
git clone --bare --branch B --single-branch "file://$(pwd)/." no-reflog &&
git clone --depth 1 "file://$(pwd)/no-reflog" shallow9 &&
cd no-reflog &&
git tag -d TAGB1 TAGB2 &&
git update-ref refs/heads/B B~~ &&
git gc --prune=now &&
cd ../shallow9 &&
git fetch origin &&
git fsck --no-dangling
)
Cloning into bare repository 'no-reflog'...
Cloning into 'shallow9'...
Deleted tag 'TAGB1' (was a540a4d)
Deleted tag 'TAGB2' (was 9ca64d8)
warning: no common commits
From file:///<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/no-reflog
+ 9ca64d8...437bc54 B -> origin/B (forced update)
ok 43 - fetch in shallow repo unreachable shallow objects
expecting success:
(
git clone "file://$(pwd)/." shallow10 &&
git commit --allow-empty -m empty &&
cd shallow10 &&
git fetch --depth=1 --progress 2>actual &&
# This should fetch only the empty commit, no tree or
# blob objects
test_i18ngrep "remote: Total 1" actual
)
Cloning into 'shallow10'...
[B 4408587] empty
Author: A U Thor <author@example.com>
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
remote: Total 1 (delta 0), reused 0 (delta 0)
ok 44 - fetch creating new shallow root
expecting success:
for head in C D E F
do
add $head
done &&
for head in A B C D E F
do
git tag $head $head
done &&
cat >input <<-\EOF &&
refs/heads/C
refs/heads/A
refs/heads/D
refs/tags/C
refs/heads/B
refs/tags/A
refs/heads/E
refs/tags/B
refs/tags/E
refs/tags/D
EOF
sort <input >expect &&
(
echo refs/heads/E &&
echo refs/tags/E &&
cat input
) >input.dup
ok 45 - setup tests for the --stdin parameter
expecting success:
cp -r client client1 &&
cp -r client client2
ok 46 - setup fetch refs from cmdline v[12]
expecting success:
(
cd client &&
GIT_TEST_PROTOCOL_VERSION= git fetch-pack --no-progress .. $(cat ../input)
) >output &&
cut -d ' ' -f 2 <output | sort >actual &&
test_cmp expect actual
ok 47 - protocol.version= fetch refs from cmdline
expecting success:
(
cd client1 &&
GIT_TEST_PROTOCOL_VERSION=1 git fetch-pack --no-progress .. $(cat ../input)
) >output &&
cut -d ' ' -f 2 <output | sort >actual &&
test_cmp expect actual
ok 48 - protocol.version=1 fetch refs from cmdline
expecting success:
(
cd client2 &&
GIT_TEST_PROTOCOL_VERSION=2 git fetch-pack --no-progress .. $(cat ../input)
) >output &&
cut -d ' ' -f 2 <output | sort >actual &&
test_cmp expect actual
ok 49 - protocol.version=2 fetch refs from cmdline
expecting success:
(
cd client &&
git fetch-pack --stdin --no-progress .. <../input
) >output &&
cut -d " " -f 2 <output | sort >actual &&
test_cmp expect actual
ok 50 - fetch refs from stdin
expecting success:
(
cd client &&
tail -n +5 ../input |
git fetch-pack --stdin --no-progress .. $(head -n 4 ../input)
) >output &&
cut -d " " -f 2 <output | sort >actual &&
test_cmp expect actual
ok 51 - fetch mixed refs from cmdline and stdin
expecting success:
(
cd client &&
git fetch-pack --stdin --no-progress .. <../input.dup
) >output &&
cut -d " " -f 2 <output | sort >actual &&
test_cmp expect actual
ok 52 - test duplicate refs from stdin
expecting success:
cat >expect-error <<-\EOF
error: no such remote ref refs/heads/xyzzy
EOF
ok 53 - set up tests of missing reference
expecting success:
(
cd client &&
test_must_fail git fetch-pack --no-progress .. refs/heads/xyzzy 2>../error-m
) &&
test_i18ncmp expect-error error-m
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 54 - test lonely missing ref
expecting success:
(
cd client &&
test_must_fail git fetch-pack --no-progress .. refs/heads/A refs/heads/xyzzy 2>../error-em
) &&
test_i18ncmp expect-error error-em
f85e353c1b377970afbb804118d9135948598eea refs/heads/A
ok 55 - test missing ref after existing
expecting success:
(
cd client &&
test_must_fail git fetch-pack --no-progress .. refs/heads/xyzzy refs/heads/A 2>../error-me
) &&
test_i18ncmp expect-error error-me
f85e353c1b377970afbb804118d9135948598eea refs/heads/A
ok 56 - test missing ref before existing
expecting success:
(
cd client &&
git fetch-pack --no-progress --all --depth=1 .. refs/heads/A
) >out-adh 2>error-adh
ok 57 - test --all, --depth, and explicit head
expecting success:
git tag OLDTAG refs/heads/B~5 &&
(
cd client &&
git fetch-pack --no-progress --all --depth=1 .. refs/tags/OLDTAG
) >out-adt 2>error-adt
ok 58 - test --all, --depth, and explicit tag
expecting success:
git commit --allow-empty -m non-tip &&
git commit --allow-empty -m tip &&
git tag -m "annotated" non-tip HEAD^ &&
(
cd client &&
git fetch-pack --all ..
)
[B 1d07427] non-tip
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[B 3a06f77] tip
Author: A U Thor <author@example.com>
remote:
remote:
remote: Enumerating objects: 30, done.
remote:
remote:
remote: Counting objects: 3% (1/30)
remote:
remote:
remote: Counting objects: 6% (2/30)
remote:
remote:
remote: Counting objects: 10% (3/30)
remote:
remote:
remote: Counting objects: 13% (4/30)
remote:
remote:
remote: Counting objects: 16% (5/30)
remote:
remote:
remote: Counting objects: 20% (6/30)
remote:
remote:
remote: Counting objects: 23% (7/30)
remote:
remote:
remote: Counting objects: 26% (8/30)
remote:
remote:
remote: Counting objects: 30% (9/30)
remote:
remote:
remote: Counting objects: 33% (10/30)
remote:
remote:
remote: Counting objects: 36% (11/30)
remote:
remote:
remote: Counting objects: 40% (12/30)
remote:
remote:
remote: Counting objects: 43% (13/30)
remote:
remote:
remote: Counting objects: 46% (14/30)
remote:
remote:
remote: Counting objects: 50% (15/30)
remote:
remote:
remote: Counting objects: 53% (16/30)
remote:
remote:
remote: Counting objects: 56% (17/30)
remote:
remote:
remote: Counting objects: 60% (18/30)
remote:
remote:
remote: Counting objects: 63% (19/30)
remote:
remote:
remote: Counting objects: 66% (20/30)
remote:
remote:
remote: Counting objects: 70% (21/30)
remote:
remote:
remote: Counting objects: 73% (22/30)
remote:
remote:
remote: Counting objects: 76% (23/30)
remote:
remote:
remote: Counting objects: 80% (24/30)
remote:
remote:
remote: Counting objects: 83% (25/30)
remote:
remote:
remote: Counting objects: 86% (26/30)
remote:
remote:
remote: Counting objects: 90% (27/30)
remote:
remote:
remote: Counting objects: 93% (28/30)
remote:
remote:
remote: Counting objects: 96% (29/30)
remote:
remote:
remote: Counting objects: 100% (30/30)
remote:
remote:
remote: Counting objects: 100% (30/30), done.
remote:
remote:
remote: Compressing objects: 7% (1/14)
remote:
remote:
remote: Compressing objects: 14% (2/14)
remote:
remote:
remote: Compressing objects: 21% (3/14)
remote:
remote:
remote: Compressing objects: 28% (4/14)
remote:
remote:
remote: Compressing objects: 35% (5/14)
remote:
remote:
remote: Compressing objects: 42% (6/14)
remote:
remote:
remote: Compressing objects: 50% (7/14)
remote:
remote:
remote: Compressing objects: 57% (8/14)
remote:
remote:
remote: Compressing objects: 64% (9/14)
remote:
remote:
remote: Compressing objects: 71% (10/14)
remote:
remote:
remote: Compressing objects: 78% (11/14)
remote:
remote:
remote: Compressing objects: 85% (12/14)
remote:
remote:
remote: Compressing objects: 92% (13/14)
remote:
remote:
remote: Compressing objects: 100% (14/14)
remote:
remote:
remote: Compressing objects: 100% (14/14), done.
remote: Total 30 (delta 3), reused 0 (delta 0)
3a06f778373fecb61b87d7844d150a48c6a65020 HEAD
f85e353c1b377970afbb804118d9135948598eea refs/heads/A
3a06f778373fecb61b87d7844d150a48c6a65020 refs/heads/B
7f3cb539fbce926dd99233cfc9b6966f1d69747e refs/heads/C
b3401427a9637a35f6a203d635e5677e76ad409d refs/heads/D
4928b093c801d36be5cdb3ed3ab572fa0d4c93bf refs/heads/E
c1375be492d3716839043d7f7e9a593f8e80c668 refs/heads/F
f85e353c1b377970afbb804118d9135948598eea refs/tags/A
440858748ae905d48259d4fb67a12a7aa1520cf7 refs/tags/B
7f3cb539fbce926dd99233cfc9b6966f1d69747e refs/tags/C
b3401427a9637a35f6a203d635e5677e76ad409d refs/tags/D
4928b093c801d36be5cdb3ed3ab572fa0d4c93bf refs/tags/E
c1375be492d3716839043d7f7e9a593f8e80c668 refs/tags/F
27f494dfb7e67d2f9cd2282404adf1d97581aa34 refs/tags/OLDTAG
10e1d7b51cacf2f0478498681177f0e6f1e8392d refs/tags/TAGA1
f85e353c1b377970afbb804118d9135948598eea refs/tags/TAGA2
a540a4ddd2b16a9fe66e9539d5ec103c68052eaa refs/tags/TAGB1
9ca64d8fd8038b086badca1d11ccd8bbcfdeace1 refs/tags/TAGB2
7320dc4fe233d0a538cb65e800368e0453974d22 refs/tags/non-tip
ok 59 - test --all with tag to non-tip
expecting success:
# create tag-to-{blob,tree,commit,tag}, making sure all tagged objects
# are reachable only via created tag references.
blob=$(echo "hello blob" | git hash-object -t blob -w --stdin) &&
git tag -a -m "tag -> blob" tag-to-blob $blob &&
tree=$(printf "100644 blob $blob\tfile" | git mktree) &&
git tag -a -m "tag -> tree" tag-to-tree $tree &&
tree2=$(printf "100644 blob $blob\tfile2" | git mktree) &&
commit=$(git commit-tree -m "hello commit" $tree) &&
git tag -a -m "tag -> commit" tag-to-commit $commit &&
blob2=$(echo "hello blob2" | git hash-object -t blob -w --stdin) &&
tag=$(git mktag <<-EOF
object $blob2
type blob
tag tag-to-blob2
tagger author A U Thor <author@example.com> 0 +0000
hello tag
EOF
) &&
git tag -a -m "tag -> tag" tag-to-tag $tag &&
# `fetch-pack --all` should succeed fetching all those objects.
mkdir fetchall &&
(
cd fetchall &&
git init &&
git fetch-pack --all .. &&
git cat-file blob $blob >/dev/null &&
git cat-file tree $tree >/dev/null &&
git cat-file commit $commit >/dev/null &&
git cat-file tag $tag >/dev/null
)
hint: You have created a nested tag. The object referred to by your new tag is
hint: already a tag. If you meant to tag the object that it points to, use:
hint:
hint: git tag -f tag-to-tag 6b6a38641966e26d650cce323e028ca7e3083903^{}
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/fetchall/.git/
remote:
remote:
remote: Enumerating objects: 267, done.
remote:
remote:
remote: Counting objects: 0% (1/267)
remote:
remote:
remote: Counting objects: 1% (3/267)
remote:
remote:
remote: Counting objects: 2% (6/267)
remote:
remote:
remote: Counting objects: 3% (9/267)
remote:
remote:
remote: Counting objects: 4% (11/267)
remote:
remote:
remote: Counting objects: 5% (14/267)
remote:
remote:
remote: Counting objects: 6% (17/267)
remote:
remote:
remote: Counting objects: 7% (19/267)
remote:
remote:
remote: Counting objects: 8% (22/267)
remote:
remote:
remote: Counting objects: 9% (25/267)
remote:
remote:
remote: Counting objects: 10% (27/267)
remote:
remote:
remote: Counting objects: 11% (30/267)
remote:
remote:
remote: Counting objects: 12% (33/267)
remote:
remote:
remote: Counting objects: 13% (35/267)
remote:
remote:
remote: Counting objects: 14% (38/267)
remote:
remote:
remote: Counting objects: 15% (41/267)
remote:
remote:
remote: Counting objects: 16% (43/267)
remote:
remote:
remote: Counting objects: 17% (46/267)
remote:
remote:
remote: Counting objects: 18% (49/267)
remote:
remote:
remote: Counting objects: 19% (51/267)
remote:
remote:
remote: Counting objects: 20% (54/267)
remote:
remote:
remote: Counting objects: 21% (57/267)
remote:
remote:
remote: Counting objects: 22% (59/267)
remote:
remote:
remote: Counting objects: 23% (62/267)
remote:
remote:
remote: Counting objects: 24% (65/267)
remote:
remote:
remote: Counting objects: 25% (67/267)
remote:
remote:
remote: Counting objects: 26% (70/267)
remote:
remote:
remote: Counting objects: 27% (73/267)
remote:
remote:
remote: Counting objects: 28% (75/267)
remote:
remote:
remote: Counting objects: 29% (78/267)
remote:
remote:
remote: Counting objects: 30% (81/267)
remote:
remote:
remote: Counting objects: 31% (83/267)
remote:
remote:
remote: Counting objects: 32% (86/267)
remote:
remote:
remote: Counting objects: 33% (89/267)
remote:
remote:
remote: Counting objects: 34% (91/267)
remote:
remote:
remote: Counting objects: 35% (94/267)
remote:
remote:
remote: Counting objects: 36% (97/267)
remote:
remote:
remote: Counting objects: 37% (99/267)
remote:
remote:
remote: Counting objects: 38% (102/267)
remote:
remote:
remote: Counting objects: 39% (105/267)
remote:
remote:
remote: Counting objects: 40% (107/267)
remote:
remote:
remote: Counting objects: 41% (110/267)
remote:
remote:
remote: Counting objects: 42% (113/267)
remote:
remote:
remote: Counting objects: 43% (115/267)
remote:
remote:
remote: Counting objects: 44% (118/267)
remote:
remote:
remote: Counting objects: 45% (121/267)
remote:
remote:
remote: Counting objects: 46% (123/267)
remote:
remote:
remote: Counting objects: 47% (126/267)
remote:
remote:
remote: Counting objects: 48% (129/267)
remote:
remote:
remote: Counting objects: 49% (131/267)
remote:
remote:
remote: Counting objects: 50% (134/267)
remote:
remote:
remote: Counting objects: 51% (137/267)
remote:
remote:
remote: Counting objects: 52% (139/267)
remote:
remote:
remote: Counting objects: 53% (142/267)
remote:
remote:
remote: Counting objects: 54% (145/267)
remote:
remote:
remote: Counting objects: 55% (147/267)
remote:
remote:
remote: Counting objects: 56% (150/267)
remote:
remote:
remote: Counting objects: 57% (153/267)
remote:
remote:
remote: Counting objects: 58% (155/267)
remote:
remote:
remote: Counting objects: 59% (158/267)
remote:
remote:
remote: Counting objects: 60% (161/267)
remote:
remote:
remote: Counting objects: 61% (163/267)
remote:
remote:
remote: Counting objects: 62% (166/267)
remote:
remote:
remote: Counting objects: 63% (169/267)
remote:
remote:
remote: Counting objects: 64% (171/267)
remote:
remote:
remote: Counting objects: 65% (174/267)
remote:
remote:
remote: Counting objects: 66% (177/267)
remote:
remote:
remote: Counting objects: 67% (179/267)
remote:
remote:
remote: Counting objects: 68% (182/267)
remote:
remote:
remote: Counting objects: 69% (185/267)
remote:
remote:
remote: Counting objects: 70% (187/267)
remote:
remote:
remote: Counting objects: 71% (190/267)
remote:
remote:
remote: Counting objects: 72% (193/267)
remote:
remote:
remote: Counting objects: 73% (195/267)
remote:
remote:
remote: Counting objects: 74% (198/267)
remote:
remote:
remote: Counting objects: 75% (201/267)
remote:
remote:
remote: Counting objects: 76% (203/267)
remote:
remote:
remote: Counting objects: 77% (206/267)
remote:
remote:
remote: Counting objects: 78% (209/267)
remote:
remote:
remote: Counting objects: 79% (211/267)
remote:
remote:
remote: Counting objects: 80% (214/267)
remote:
remote:
remote: Counting objects: 81% (217/267)
remote:
remote:
remote: Counting objects: 82% (219/267)
remote:
remote:
remote: Counting objects: 83% (222/267)
remote:
remote:
remote: Counting objects: 84% (225/267)
remote:
remote:
remote: Counting objects: 85% (227/267)
remote:
remote:
remote: Counting objects: 86% (230/267)
remote:
remote:
remote: Counting objects: 87% (233/267)
remote:
remote:
remote: Counting objects: 88% (235/267)
remote:
remote:
remote: Counting objects: 89% (238/267)
remote:
remote:
remote: Counting objects: 90% (241/267)
remote:
remote:
remote: Counting objects: 91% (243/267)
remote:
remote:
remote: Counting objects: 92% (246/267)
remote:
remote:
remote: Counting objects: 93% (249/267)
remote:
remote:
remote: Counting objects: 94% (251/267)
remote:
remote:
remote: Counting objects: 95% (254/267)
remote:
remote:
remote: Counting objects: 96% (257/267)
remote:
remote:
remote: Counting objects: 97% (259/267)
remote:
remote:
remote: Counting objects: 98% (262/267)
remote:
remote:
remote: Counting objects: 99% (265/267)
remote:
remote:
remote: Counting objects: 100% (267/267)
remote:
remote:
remote: Counting objects: 100% (267/267), done.
remote:
remote:
remote: Compressing objects: 1% (1/96)
remote:
remote:
remote: Compressing objects: 2% (2/96)
remote:
remote:
remote: Compressing objects: 3% (3/96)
remote:
remote:
remote: Compressing objects: 4% (4/96)
remote:
remote:
remote: Compressing objects: 5% (5/96)
remote:
remote:
remote: Compressing objects: 6% (6/96)
remote:
remote:
remote: Compressing objects: 7% (7/96)
remote:
remote:
remote: Compressing objects: 8% (8/96)
remote:
remote:
remote: Compressing objects: 9% (9/96)
remote:
remote:
remote: Compressing objects: 10% (10/96)
remote:
remote:
remote: Compressing objects: 11% (11/96)
remote:
remote:
remote: Compressing objects: 12% (12/96)
remote:
remote:
remote: Compressing objects: 13% (13/96)
remote:
remote:
remote: Compressing objects: 14% (14/96)
remote:
remote:
remote: Compressing objects: 15% (15/96)
remote:
remote:
remote: Compressing objects: 16% (16/96)
remote:
remote:
remote: Compressing objects: 17% (17/96)
remote:
remote:
remote: Compressing objects: 18% (18/96)
remote:
remote:
remote: Compressing objects: 19% (19/96)
remote:
remote:
remote: Compressing objects: 20% (20/96)
remote:
remote:
remote: Compressing objects: 21% (21/96)
remote:
remote:
remote: Compressing objects: 22% (22/96)
remote:
remote:
remote: Compressing objects: 23% (23/96)
remote:
remote:
remote: Compressing objects: 25% (24/96)
remote:
remote:
remote: Compressing objects: 26% (25/96)
remote:
remote:
remote: Compressing objects: 27% (26/96)
remote:
remote:
remote: Compressing objects: 28% (27/96)
remote:
remote:
remote: Compressing objects: 29% (28/96)
remote:
remote:
remote: Compressing objects: 30% (29/96)
remote:
remote:
remote: Compressing objects: 31% (30/96)
remote:
remote:
remote: Compressing objects: 32% (31/96)
remote:
remote:
remote: Compressing objects: 33% (32/96)
remote:
remote:
remote: Compressing objects: 34% (33/96)
remote:
remote:
remote: Compressing objects: 35% (34/96)
remote:
remote:
remote: Compressing objects: 36% (35/96)
remote:
remote:
remote: Compressing objects: 37% (36/96)
remote:
remote:
remote: Compressing objects: 38% (37/96)
remote:
remote:
remote: Compressing objects: 39% (38/96)
remote:
remote:
remote: Compressing objects: 40% (39/96)
remote:
remote:
remote: Compressing objects: 41% (40/96)
remote:
remote:
remote: Compressing objects: 42% (41/96)
remote:
remote:
remote: Compressing objects: 43% (42/96)
remote:
remote:
remote: Compressing objects: 44% (43/96)
remote:
remote:
remote: Compressing objects: 45% (44/96)
remote:
remote:
remote: Compressing objects: 46% (45/96)
remote:
remote:
remote: Compressing objects: 47% (46/96)
remote:
remote:
remote: Compressing objects: 48% (47/96)
remote:
remote:
remote: Compressing objects: 50% (48/96)
remote:
remote:
remote: Compressing objects: 51% (49/96)
remote:
remote:
remote: Compressing objects: 52% (50/96)
remote:
remote:
remote: Compressing objects: 53% (51/96)
remote:
remote:
remote: Compressing objects: 54% (52/96)
remote:
remote:
remote: Compressing objects: 55% (53/96)
remote:
remote:
remote: Compressing objects: 56% (54/96)
remote:
remote:
remote: Compressing objects: 57% (55/96)
remote:
remote:
remote: Compressing objects: 58% (56/96)
remote:
remote:
remote: Compressing objects: 59% (57/96)
remote:
remote:
remote: Compressing objects: 60% (58/96)
remote:
remote:
remote: Compressing objects: 61% (59/96)
remote:
remote:
remote: Compressing objects: 62% (60/96)
remote:
remote:
remote: Compressing objects: 63% (61/96)
remote:
remote:
remote: Compressing objects: 64% (62/96)
remote:
remote:
remote: Compressing objects: 65% (63/96)
remote:
remote:
remote: Compressing objects: 66% (64/96)
remote:
remote:
remote: Compressing objects: 67% (65/96)
remote:
remote:
remote: Compressing objects: 68% (66/96)
remote:
remote:
remote: Compressing objects: 69% (67/96)
remote:
remote:
remote: Compressing objects: 70% (68/96)
remote:
remote:
remote: Compressing objects: 71% (69/96)
remote:
remote:
remote: Compressing objects: 72% (70/96)
remote:
remote:
remote: Compressing objects: 73% (71/96)
remote:
remote:
remote: Compressing objects: 75% (72/96)
remote:
remote:
remote: Compressing objects: 76% (73/96)
remote:
remote:
remote: Compressing objects: 77% (74/96)
remote:
remote:
remote: Compressing objects: 78% (75/96)
remote:
remote:
remote: Compressing objects: 79% (76/96)
remote:
remote:
remote: Compressing objects: 80% (77/96)
remote:
remote:
remote: Compressing objects: 81% (78/96)
remote:
remote:
remote: Compressing objects: 82% (79/96)
remote:
remote:
remote: Compressing objects: 83% (80/96)
remote:
remote:
remote: Compressing objects: 84% (81/96)
remote:
remote:
remote: Compressing objects: 85% (82/96)
remote:
remote:
remote: Compressing objects: 86% (83/96)
remote:
remote:
remote: Compressing objects: 87% (84/96)
remote:
remote:
remote: Compressing objects: 88% (85/96)
remote:
remote:
remote: Compressing objects: 89% (86/96)
remote:
remote:
remote: Compressing objects: 90% (87/96)
remote:
remote:
remote: Compressing objects: 91% (88/96)
remote:
remote:
remote: Compressing objects: 92% (89/96)
remote:
remote:
remote: Compressing objects: 93% (90/96)
remote:
remote:
remote: Compressing objects: 94% (91/96)
remote:
remote:
remote: Compressing objects: 95% (92/96)
remote:
remote:
remote: Compressing objects: 96% (93/96)
remote:
remote:
remote: Compressing objects: 97% (94/96)
remote:
remote:
remote: Compressing objects: 98% (95/96)
remote:
remote:
remote: Compressing objects: 100% (96/96)
remote:
remote:
remote: Compressing objects: 100% (96/96), done.
Receiving objects: 0% (1/267)
Receiving objects: 1% (3/267)
Receiving objects: 2% (6/267)
Receiving objects: 3% (9/267)
Receiving objects: 4% (11/267)
Receiving objects: 5% (14/267)
Receiving objects: 6% (17/267)
Receiving objects: 7% (19/267)
Receiving objects: 8% (22/267)
Receiving objects: 9% (25/267)
Receiving objects: 10% (27/267)
Receiving objects: 11% (30/267)
Receiving objects: 12% (33/267)
Receiving objects: 13% (35/267)
Receiving objects: 14% (38/267)
Receiving objects: 15% (41/267)
Receiving objects: 16% (43/267)
Receiving objects: 17% (46/267)
Receiving objects: 18% (49/267)
Receiving objects: 19% (51/267)
Receiving objects: 20% (54/267)
Receiving objects: 21% (57/267)
Receiving objects: 22% (59/267)
Receiving objects: 23% (62/267)
Receiving objects: 24% (65/267)
Receiving objects: 25% (67/267)
Receiving objects: 26% (70/267)
Receiving objects: 27% (73/267)
Receiving objects: 28% (75/267)
Receiving objects: 29% (78/267)
Receiving objects: 30% (81/267)
Receiving objects: 31% (83/267)
Receiving objects: 32% (86/267)
Receiving objects: 33% (89/267)
Receiving objects: 34% (91/267)
Receiving objects: 35% (94/267)
Receiving objects: 36% (97/267)
Receiving objects: 37% (99/267)
Receiving objects: 38% (102/267)
Receiving objects: 39% (105/267)
Receiving objects: 40% (107/267)
Receiving objects: 41% (110/267)
Receiving objects: 42% (113/267)
Receiving objects: 43% (115/267)
Receiving objects: 44% (118/267)
Receiving objects: 45% (121/267)
Receiving objects: 46% (123/267)
Receiving objects: 47% (126/267)
Receiving objects: 48% (129/267)
Receiving objects: 49% (131/267)
Receiving objects: 50% (134/267)
Receiving objects: 51% (137/267)
remote: Total 267 (delta 3), reused 0 (delta 0)
Receiving objects: 52% (139/267)
Receiving objects: 53% (142/267)
Receiving objects: 54% (145/267)
Receiving objects: 55% (147/267)
Receiving objects: 56% (150/267)
Receiving objects: 57% (153/267)
Receiving objects: 58% (155/267)
Receiving objects: 59% (158/267)
Receiving objects: 60% (161/267)
Receiving objects: 61% (163/267)
Receiving objects: 62% (166/267)
Receiving objects: 63% (169/267)
Receiving objects: 64% (171/267)
Receiving objects: 65% (174/267)
Receiving objects: 66% (177/267)
Receiving objects: 67% (179/267)
Receiving objects: 68% (182/267)
Receiving objects: 69% (185/267)
Receiving objects: 70% (187/267)
Receiving objects: 71% (190/267)
Receiving objects: 72% (193/267)
Receiving objects: 73% (195/267)
Receiving objects: 74% (198/267)
Receiving objects: 75% (201/267)
Receiving objects: 76% (203/267)
Receiving objects: 77% (206/267)
Receiving objects: 78% (209/267)
Receiving objects: 79% (211/267)
Receiving objects: 80% (214/267)
Receiving objects: 81% (217/267)
Receiving objects: 82% (219/267)
Receiving objects: 83% (222/267)
Receiving objects: 84% (225/267)
Receiving objects: 85% (227/267)
Receiving objects: 86% (230/267)
Receiving objects: 87% (233/267)
Receiving objects: 88% (235/267)
Receiving objects: 89% (238/267)
Receiving objects: 90% (241/267)
Receiving objects: 91% (243/267)
Receiving objects: 92% (246/267)
Receiving objects: 93% (249/267)
Receiving objects: 94% (251/267)
Receiving objects: 95% (254/267)
Receiving objects: 96% (257/267)
Receiving objects: 97% (259/267)
Receiving objects: 98% (262/267)
Receiving objects: 99% (265/267)
Receiving objects: 100% (267/267)
Receiving objects: 100% (267/267), 22.41 KiB | 332.00 KiB/s, done.
Resolving deltas: 0% (0/3)
Resolving deltas: 66% (2/3)
Resolving deltas: 100% (3/3)
Resolving deltas: 100% (3/3), done.
keep 55a6b9f51c169aff63cc8c51f1ca095e13b105b5
3a06f778373fecb61b87d7844d150a48c6a65020 HEAD
f85e353c1b377970afbb804118d9135948598eea refs/heads/A
3a06f778373fecb61b87d7844d150a48c6a65020 refs/heads/B
7f3cb539fbce926dd99233cfc9b6966f1d69747e refs/heads/C
b3401427a9637a35f6a203d635e5677e76ad409d refs/heads/D
4928b093c801d36be5cdb3ed3ab572fa0d4c93bf refs/heads/E
c1375be492d3716839043d7f7e9a593f8e80c668 refs/heads/F
f85e353c1b377970afbb804118d9135948598eea refs/tags/A
440858748ae905d48259d4fb67a12a7aa1520cf7 refs/tags/B
7f3cb539fbce926dd99233cfc9b6966f1d69747e refs/tags/C
b3401427a9637a35f6a203d635e5677e76ad409d refs/tags/D
4928b093c801d36be5cdb3ed3ab572fa0d4c93bf refs/tags/E
c1375be492d3716839043d7f7e9a593f8e80c668 refs/tags/F
27f494dfb7e67d2f9cd2282404adf1d97581aa34 refs/tags/OLDTAG
10e1d7b51cacf2f0478498681177f0e6f1e8392d refs/tags/TAGA1
f85e353c1b377970afbb804118d9135948598eea refs/tags/TAGA2
a540a4ddd2b16a9fe66e9539d5ec103c68052eaa refs/tags/TAGB1
9ca64d8fd8038b086badca1d11ccd8bbcfdeace1 refs/tags/TAGB2
7320dc4fe233d0a538cb65e800368e0453974d22 refs/tags/non-tip
bc4e9e1fa80662b449805b1ac29fc9b1e4c49187 refs/tags/tag-to-blob
88e8b0aecb9ecfa3843d314f6fa9be9e98ba2c7f refs/tags/tag-to-commit
18297eb48e4cc9e07c70e1c535e9722dd04040e2 refs/tags/tag-to-tag
520db1f5e1afeaa12b1a8d73ce82db72ca036ee1 refs/tags/tag-to-tree
ok 60 - test --all wrt tag to non-commits
expecting success:
mkdir repo1 &&
(
cd repo1 &&
git init &&
test_commit 1 &&
test_commit 2 &&
test_commit 3 &&
mkdir repo2 &&
cd repo2 &&
git init &&
git fetch --depth=2 ../.git master:branch &&
git fsck
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/repo1/.git/
[master (root-commit) 509138d] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1.t
[master e67c205] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2.t
[master 76e17df] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 3.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/repo1/repo2/.git/
From ../
* [new branch] master -> branch
* [new tag] 3 -> 3
* [new tag] 2 -> 2
notice: HEAD points to an unborn branch (master)
ok 61 - shallow fetch with tags does not break the repository
expecting success:
git init hidden &&
(
cd hidden &&
test_commit 1 &&
test_commit 2 &&
git update-ref refs/hidden/one HEAD^ &&
git config transfer.hiderefs refs/hidden &&
git config uploadpack.allowtipsha1inwant true
) &&
git fetch-pack hidden $(git -C hidden rev-parse refs/hidden/one)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/hidden/.git/
[master (root-commit) 509138d] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1.t
[master e67c205] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2.t
warning: no common commits
remote:
remote:
remote: Enumerating objects: 3, done.
remote:
remote:
remote: Counting objects: 33% (1/3)
remote:
remote:
remote: Counting objects: 66% (2/3)
remote:
remote:
remote: Counting objects: 100% (3/3)
remote:
remote:
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
509138df2de30839788389993242abc5aedccaee 509138df2de30839788389993242abc5aedccaee
ok 62 - fetch-pack can fetch a raw sha1
expecting success:
rm -rf server client &&
git init server &&
test_commit -C server 1 &&
git init client &&
git -C client fetch-pack ../server \
$(git -C server rev-parse refs/heads/master)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/server/.git/
[master (root-commit) 509138d] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/client/.git/
remote:
remote:
remote: Enumerating objects: 3, done.
remote:
remote:
remote: Counting objects: 33% (1/3)
remote:
remote:
remote: Counting objects: 66% (2/3)
remote:
remote:
remote: Counting objects: 100% (3/3)
remote:
remote:
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
509138df2de30839788389993242abc5aedccaee 509138df2de30839788389993242abc5aedccaee
ok 63 - fetch-pack can fetch a raw sha1 that is advertised as a ref
expecting success:
rm -rf server client &&
git init server &&
test_commit -C server 1 &&
test_commit -C server 2 &&
git init client &&
git -C client fetch-pack ../server \
$(git -C server rev-parse refs/tags/1) refs/tags/1
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/server/.git/
[master (root-commit) efb0279] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1.t
[master b220c3b] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/client/.git/
remote:
remote:
remote: Enumerating objects: 3, done.
remote:
remote:
remote: Counting objects: 33% (1/3)
remote:
remote:
remote: Counting objects: 66% (2/3)
remote:
remote:
remote: Counting objects: 100% (3/3)
remote:
remote:
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
efb02796edfa33f50cc55734302c0e60cffcaec8 refs/tags/1
efb02796edfa33f50cc55734302c0e60cffcaec8 efb02796edfa33f50cc55734302c0e60cffcaec8
ok 64 - fetch-pack can fetch a raw sha1 overlapping a named ref
expecting success:
rm -rf server &&
git init server &&
test_commit -C server 5 &&
git -C server tag -d 5 &&
test_commit -C server 6 &&
git init client &&
# Some protocol versions (e.g. 2) support fetching
# unadvertised objects, so restrict this test to v0.
test_must_fail env GIT_TEST_PROTOCOL_VERSION= git -C client fetch-pack ../server \
$(git -C server rev-parse refs/heads/master^) 2>err &&
test_i18ngrep "Server does not allow request for unadvertised object" err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/server/.git/
[master (root-commit) ed1968c] 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 5.t
Deleted tag '5' (was ed1968c)
[master 4cd6864] 6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 6.t
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/client/.git/
error: Server does not allow request for unadvertised object ed1968c30f652125a9443f5cad41c2c1208a501d
ok 65 - fetch-pack cannot fetch a raw sha1 that is not advertised as a ref
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 66 - fetch-pack --diag-url ssh+git://host/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 67 - fetch-pack --diag-url ssh+git://host/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 68 - fetch-pack --diag-url ssh+git://host:/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 69 - fetch-pack --diag-url ssh+git://host:/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 70 - fetch-pack --diag-url ssh+git://user@host/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 71 - fetch-pack --diag-url ssh+git://user@host/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 72 - fetch-pack --diag-url ssh+git://user@host:/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 73 - fetch-pack --diag-url ssh+git://user@host:/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 74 - fetch-pack --diag-url ssh+git://user@[::1]/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 75 - fetch-pack --diag-url ssh+git://user@[::1]/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 76 - fetch-pack --diag-url ssh+git://user@[::1]:/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 77 - fetch-pack --diag-url ssh+git://user@[::1]:/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 78 - fetch-pack --diag-url ssh+git://user@::1/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 79 - fetch-pack --diag-url ssh+git://user@::1/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 80 - fetch-pack --diag-url ssh+git://user@::1:/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 81 - fetch-pack --diag-url ssh+git://user@::1:/~repo
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 82 - fetch-pack --diag-url ssh+git://host:22/repo
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 83 - fetch-pack --diag-url ssh+git://User@host:22/repo
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 84 - fetch-pack --diag-url ssh+git://User@[::1]:22/repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 85 - fetch-pack --diag-url git+ssh://host/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 86 - fetch-pack --diag-url git+ssh://host/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 87 - fetch-pack --diag-url git+ssh://host:/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 88 - fetch-pack --diag-url git+ssh://host:/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 89 - fetch-pack --diag-url git+ssh://user@host/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 90 - fetch-pack --diag-url git+ssh://user@host/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 91 - fetch-pack --diag-url git+ssh://user@host:/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 92 - fetch-pack --diag-url git+ssh://user@host:/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 93 - fetch-pack --diag-url git+ssh://user@[::1]/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 94 - fetch-pack --diag-url git+ssh://user@[::1]/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 95 - fetch-pack --diag-url git+ssh://user@[::1]:/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 96 - fetch-pack --diag-url git+ssh://user@[::1]:/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 97 - fetch-pack --diag-url git+ssh://user@::1/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 98 - fetch-pack --diag-url git+ssh://user@::1/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 99 - fetch-pack --diag-url git+ssh://user@::1:/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 100 - fetch-pack --diag-url git+ssh://user@::1:/~repo
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 101 - fetch-pack --diag-url git+ssh://host:22/repo
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 102 - fetch-pack --diag-url git+ssh://User@host:22/repo
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 103 - fetch-pack --diag-url git+ssh://User@[::1]:22/repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 104 - fetch-pack --diag-url git://host/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 105 - fetch-pack --diag-url git://host/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 106 - fetch-pack --diag-url git://host:/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 107 - fetch-pack --diag-url git://host:/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 108 - fetch-pack --diag-url git://user@host/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 109 - fetch-pack --diag-url git://user@host/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 110 - fetch-pack --diag-url git://user@host:/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 111 - fetch-pack --diag-url git://user@host:/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 112 - fetch-pack --diag-url git://user@[::1]/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 113 - fetch-pack --diag-url git://user@[::1]/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 114 - fetch-pack --diag-url git://user@[::1]:/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 115 - fetch-pack --diag-url git://user@[::1]:/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 116 - fetch-pack --diag-url git://user@::1/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 117 - fetch-pack --diag-url git://user@::1/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 118 - fetch-pack --diag-url git://user@::1:/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 119 - fetch-pack --diag-url git://user@::1:/~repo
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 120 - fetch-pack --diag-url git://host:22/repo
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 121 - fetch-pack --diag-url git://User@host:22/repo
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 122 - fetch-pack --diag-url git://User@[::1]:22/repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 123 - fetch-pack --diag-url ssh://host/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 124 - fetch-pack --diag-url ssh://host/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 125 - fetch-pack --diag-url ssh://host:/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 126 - fetch-pack --diag-url ssh://host:/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 127 - fetch-pack --diag-url ssh://user@host/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 128 - fetch-pack --diag-url ssh://user@host/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 129 - fetch-pack --diag-url ssh://user@host:/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 130 - fetch-pack --diag-url ssh://user@host:/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 131 - fetch-pack --diag-url ssh://user@[::1]/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 132 - fetch-pack --diag-url ssh://user@[::1]/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 133 - fetch-pack --diag-url ssh://user@[::1]:/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 134 - fetch-pack --diag-url ssh://user@[::1]:/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 135 - fetch-pack --diag-url ssh://user@::1/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 136 - fetch-pack --diag-url ssh://user@::1/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 137 - fetch-pack --diag-url ssh://user@::1:/repo
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 138 - fetch-pack --diag-url ssh://user@::1:/~repo
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 139 - fetch-pack --diag-url ssh://host:22/repo
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 140 - fetch-pack --diag-url ssh://User@host:22/repo
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 141 - fetch-pack --diag-url ssh://User@[::1]:22/repo
expecting success:
check_prot_path $p://$h/$r $p "/$r"
ok 142 - fetch-pack --diag-url file://User@[::1]/repo
expecting success:
check_prot_path $p://$h/~$r $p "/~$r"
ok 143 - fetch-pack --diag-url file://User@[::1]/~repo
expecting success:
check_prot_path ./$h:$r $p "./$h:$r"
ok 144 - fetch-pack --diag-url ./nohost:repo
expecting success:
check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
ok 145 - fetch-pack --diag-url ./file:nohost/~repo
expecting success:
check_prot_path ./$h:$r $p "./$h:$r"
ok 146 - fetch-pack --diag-url ./nohost:12:repo
expecting success:
check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
ok 147 - fetch-pack --diag-url ./file:nohost:12/~repo
expecting success:
check_prot_path ./$h:$r $p "./$h:$r"
ok 148 - fetch-pack --diag-url ./[::1]:repo
expecting success:
check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
ok 149 - fetch-pack --diag-url ./file:[::1]/~repo
expecting success:
check_prot_path ./$h:$r $p "./$h:$r"
ok 150 - fetch-pack --diag-url ./[::1]:23:repo
expecting success:
check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
ok 151 - fetch-pack --diag-url ./file:[::1]:23/~repo
expecting success:
check_prot_path ./$h:$r $p "./$h:$r"
ok 152 - fetch-pack --diag-url ./[:repo
expecting success:
check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
ok 153 - fetch-pack --diag-url ./file:[/~repo
expecting success:
check_prot_path ./$h:$r $p "./$h:$r"
ok 154 - fetch-pack --diag-url ./[:aa:repo
expecting success:
check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
ok 155 - fetch-pack --diag-url ./file:[:aa/~repo
expecting success:
check_prot_host_port_path $h:$r $p "$h" NONE "$r"
ok 156 - fetch-pack --diag-url host:repo
expecting success:
check_prot_host_port_path $h:/~$r $p "$h" NONE "~$r"
ok 157 - fetch-pack --diag-url host:/~repo
expecting success:
check_prot_host_port_path $h:$r $p "$h" NONE "$r"
ok 158 - fetch-pack --diag-url [::1]:repo
expecting success:
check_prot_host_port_path $h:/~$r $p "$h" NONE "~$r"
ok 159 - fetch-pack --diag-url [::1]:/~repo
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 160 - fetch-pack --diag-url ssh+git://host/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 161 - fetch-pack --diag-url ssh+git://host/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 162 - fetch-pack --diag-url ssh+git://host:/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 163 - fetch-pack --diag-url ssh+git://host:/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 164 - fetch-pack --diag-url ssh+git://user@host/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 165 - fetch-pack --diag-url ssh+git://user@host/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 166 - fetch-pack --diag-url ssh+git://user@host:/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 167 - fetch-pack --diag-url ssh+git://user@host:/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 168 - fetch-pack --diag-url ssh+git://user@[::1]/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 169 - fetch-pack --diag-url ssh+git://user@[::1]/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 170 - fetch-pack --diag-url ssh+git://user@[::1]:/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 171 - fetch-pack --diag-url ssh+git://user@[::1]:/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 172 - fetch-pack --diag-url ssh+git://user@::1/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 173 - fetch-pack --diag-url ssh+git://user@::1/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 174 - fetch-pack --diag-url ssh+git://user@::1:/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 175 - fetch-pack --diag-url ssh+git://user@::1:/~re:po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 176 - fetch-pack --diag-url ssh+git://host:22/re:po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 177 - fetch-pack --diag-url ssh+git://User@host:22/re:po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 178 - fetch-pack --diag-url ssh+git://User@[::1]:22/re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 179 - fetch-pack --diag-url git+ssh://host/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 180 - fetch-pack --diag-url git+ssh://host/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 181 - fetch-pack --diag-url git+ssh://host:/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 182 - fetch-pack --diag-url git+ssh://host:/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 183 - fetch-pack --diag-url git+ssh://user@host/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 184 - fetch-pack --diag-url git+ssh://user@host/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 185 - fetch-pack --diag-url git+ssh://user@host:/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 186 - fetch-pack --diag-url git+ssh://user@host:/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 187 - fetch-pack --diag-url git+ssh://user@[::1]/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 188 - fetch-pack --diag-url git+ssh://user@[::1]/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 189 - fetch-pack --diag-url git+ssh://user@[::1]:/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 190 - fetch-pack --diag-url git+ssh://user@[::1]:/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 191 - fetch-pack --diag-url git+ssh://user@::1/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 192 - fetch-pack --diag-url git+ssh://user@::1/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 193 - fetch-pack --diag-url git+ssh://user@::1:/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 194 - fetch-pack --diag-url git+ssh://user@::1:/~re:po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 195 - fetch-pack --diag-url git+ssh://host:22/re:po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 196 - fetch-pack --diag-url git+ssh://User@host:22/re:po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 197 - fetch-pack --diag-url git+ssh://User@[::1]:22/re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 198 - fetch-pack --diag-url git://host/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 199 - fetch-pack --diag-url git://host/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 200 - fetch-pack --diag-url git://host:/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 201 - fetch-pack --diag-url git://host:/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 202 - fetch-pack --diag-url git://user@host/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 203 - fetch-pack --diag-url git://user@host/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 204 - fetch-pack --diag-url git://user@host:/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 205 - fetch-pack --diag-url git://user@host:/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 206 - fetch-pack --diag-url git://user@[::1]/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 207 - fetch-pack --diag-url git://user@[::1]/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 208 - fetch-pack --diag-url git://user@[::1]:/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 209 - fetch-pack --diag-url git://user@[::1]:/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 210 - fetch-pack --diag-url git://user@::1/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 211 - fetch-pack --diag-url git://user@::1/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 212 - fetch-pack --diag-url git://user@::1:/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 213 - fetch-pack --diag-url git://user@::1:/~re:po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 214 - fetch-pack --diag-url git://host:22/re:po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 215 - fetch-pack --diag-url git://User@host:22/re:po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 216 - fetch-pack --diag-url git://User@[::1]:22/re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 217 - fetch-pack --diag-url ssh://host/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 218 - fetch-pack --diag-url ssh://host/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 219 - fetch-pack --diag-url ssh://host:/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 220 - fetch-pack --diag-url ssh://host:/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 221 - fetch-pack --diag-url ssh://user@host/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 222 - fetch-pack --diag-url ssh://user@host/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 223 - fetch-pack --diag-url ssh://user@host:/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 224 - fetch-pack --diag-url ssh://user@host:/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 225 - fetch-pack --diag-url ssh://user@[::1]/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 226 - fetch-pack --diag-url ssh://user@[::1]/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 227 - fetch-pack --diag-url ssh://user@[::1]:/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 228 - fetch-pack --diag-url ssh://user@[::1]:/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 229 - fetch-pack --diag-url ssh://user@::1/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 230 - fetch-pack --diag-url ssh://user@::1/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 231 - fetch-pack --diag-url ssh://user@::1:/re:po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 232 - fetch-pack --diag-url ssh://user@::1:/~re:po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 233 - fetch-pack --diag-url ssh://host:22/re:po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 234 - fetch-pack --diag-url ssh://User@host:22/re:po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 235 - fetch-pack --diag-url ssh://User@[::1]:22/re:po
expecting success:
check_prot_path $p://$h/$r $p "/$r"
ok 236 - fetch-pack --diag-url file://User@[::1]/re:po
expecting success:
check_prot_path $p://$h/~$r $p "/~$r"
ok 237 - fetch-pack --diag-url file://User@[::1]/~re:po
expecting success:
check_prot_path ./$h:$r $p "./$h:$r"
ok 238 - fetch-pack --diag-url ./nohost:re:po
expecting success:
check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
ok 239 - fetch-pack --diag-url ./file:nohost/~re:po
expecting success:
check_prot_path ./$h:$r $p "./$h:$r"
ok 240 - fetch-pack --diag-url ./nohost:12:re:po
expecting success:
check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
ok 241 - fetch-pack --diag-url ./file:nohost:12/~re:po
expecting success:
check_prot_path ./$h:$r $p "./$h:$r"
ok 242 - fetch-pack --diag-url ./[::1]:re:po
expecting success:
check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
ok 243 - fetch-pack --diag-url ./file:[::1]/~re:po
expecting success:
check_prot_path ./$h:$r $p "./$h:$r"
ok 244 - fetch-pack --diag-url ./[::1]:23:re:po
expecting success:
check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
ok 245 - fetch-pack --diag-url ./file:[::1]:23/~re:po
expecting success:
check_prot_path ./$h:$r $p "./$h:$r"
ok 246 - fetch-pack --diag-url ./[:re:po
expecting success:
check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
ok 247 - fetch-pack --diag-url ./file:[/~re:po
expecting success:
check_prot_path ./$h:$r $p "./$h:$r"
ok 248 - fetch-pack --diag-url ./[:aa:re:po
expecting success:
check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
ok 249 - fetch-pack --diag-url ./file:[:aa/~re:po
expecting success:
check_prot_host_port_path $h:$r $p "$h" NONE "$r"
ok 250 - fetch-pack --diag-url host:re:po
expecting success:
check_prot_host_port_path $h:/~$r $p "$h" NONE "~$r"
ok 251 - fetch-pack --diag-url host:/~re:po
expecting success:
check_prot_host_port_path $h:$r $p "$h" NONE "$r"
ok 252 - fetch-pack --diag-url [::1]:re:po
expecting success:
check_prot_host_port_path $h:/~$r $p "$h" NONE "~$r"
ok 253 - fetch-pack --diag-url [::1]:/~re:po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 254 - fetch-pack --diag-url ssh+git://host/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 255 - fetch-pack --diag-url ssh+git://host/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 256 - fetch-pack --diag-url ssh+git://host:/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 257 - fetch-pack --diag-url ssh+git://host:/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 258 - fetch-pack --diag-url ssh+git://user@host/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 259 - fetch-pack --diag-url ssh+git://user@host/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 260 - fetch-pack --diag-url ssh+git://user@host:/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 261 - fetch-pack --diag-url ssh+git://user@host:/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 262 - fetch-pack --diag-url ssh+git://user@[::1]/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 263 - fetch-pack --diag-url ssh+git://user@[::1]/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 264 - fetch-pack --diag-url ssh+git://user@[::1]:/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 265 - fetch-pack --diag-url ssh+git://user@[::1]:/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 266 - fetch-pack --diag-url ssh+git://user@::1/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 267 - fetch-pack --diag-url ssh+git://user@::1/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 268 - fetch-pack --diag-url ssh+git://user@::1:/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 269 - fetch-pack --diag-url ssh+git://user@::1:/~re/po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 270 - fetch-pack --diag-url ssh+git://host:22/re/po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 271 - fetch-pack --diag-url ssh+git://User@host:22/re/po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 272 - fetch-pack --diag-url ssh+git://User@[::1]:22/re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 273 - fetch-pack --diag-url git+ssh://host/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 274 - fetch-pack --diag-url git+ssh://host/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 275 - fetch-pack --diag-url git+ssh://host:/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 276 - fetch-pack --diag-url git+ssh://host:/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 277 - fetch-pack --diag-url git+ssh://user@host/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 278 - fetch-pack --diag-url git+ssh://user@host/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 279 - fetch-pack --diag-url git+ssh://user@host:/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 280 - fetch-pack --diag-url git+ssh://user@host:/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 281 - fetch-pack --diag-url git+ssh://user@[::1]/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 282 - fetch-pack --diag-url git+ssh://user@[::1]/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 283 - fetch-pack --diag-url git+ssh://user@[::1]:/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 284 - fetch-pack --diag-url git+ssh://user@[::1]:/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 285 - fetch-pack --diag-url git+ssh://user@::1/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 286 - fetch-pack --diag-url git+ssh://user@::1/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 287 - fetch-pack --diag-url git+ssh://user@::1:/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 288 - fetch-pack --diag-url git+ssh://user@::1:/~re/po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 289 - fetch-pack --diag-url git+ssh://host:22/re/po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 290 - fetch-pack --diag-url git+ssh://User@host:22/re/po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 291 - fetch-pack --diag-url git+ssh://User@[::1]:22/re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 292 - fetch-pack --diag-url git://host/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 293 - fetch-pack --diag-url git://host/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 294 - fetch-pack --diag-url git://host:/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 295 - fetch-pack --diag-url git://host:/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 296 - fetch-pack --diag-url git://user@host/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 297 - fetch-pack --diag-url git://user@host/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 298 - fetch-pack --diag-url git://user@host:/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 299 - fetch-pack --diag-url git://user@host:/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 300 - fetch-pack --diag-url git://user@[::1]/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 301 - fetch-pack --diag-url git://user@[::1]/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 302 - fetch-pack --diag-url git://user@[::1]:/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 303 - fetch-pack --diag-url git://user@[::1]:/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 304 - fetch-pack --diag-url git://user@::1/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 305 - fetch-pack --diag-url git://user@::1/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 306 - fetch-pack --diag-url git://user@::1:/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 307 - fetch-pack --diag-url git://user@::1:/~re/po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 308 - fetch-pack --diag-url git://host:22/re/po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 309 - fetch-pack --diag-url git://User@host:22/re/po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 310 - fetch-pack --diag-url git://User@[::1]:22/re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 311 - fetch-pack --diag-url ssh://host/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 312 - fetch-pack --diag-url ssh://host/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 313 - fetch-pack --diag-url ssh://host:/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 314 - fetch-pack --diag-url ssh://host:/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 315 - fetch-pack --diag-url ssh://user@host/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 316 - fetch-pack --diag-url ssh://user@host/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 317 - fetch-pack --diag-url ssh://user@host:/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 318 - fetch-pack --diag-url ssh://user@host:/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 319 - fetch-pack --diag-url ssh://user@[::1]/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 320 - fetch-pack --diag-url ssh://user@[::1]/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 321 - fetch-pack --diag-url ssh://user@[::1]:/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 322 - fetch-pack --diag-url ssh://user@[::1]:/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 323 - fetch-pack --diag-url ssh://user@::1/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 324 - fetch-pack --diag-url ssh://user@::1/~re/po
expecting success:
check_prot_host_port_path $p://$h/$r $p "$h" NONE "/$r"
ok 325 - fetch-pack --diag-url ssh://user@::1:/re/po
expecting success:
check_prot_host_port_path $p://$h/~$r $p "$h" NONE "~$r"
ok 326 - fetch-pack --diag-url ssh://user@::1:/~re/po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 327 - fetch-pack --diag-url ssh://host:22/re/po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 328 - fetch-pack --diag-url ssh://User@host:22/re/po
expecting success:
check_prot_host_port_path $p://$h:22/$r $p "$h" 22 "/$r"
ok 329 - fetch-pack --diag-url ssh://User@[::1]:22/re/po
expecting success:
check_prot_path $p://$h/$r $p "/$r"
ok 330 - fetch-pack --diag-url file://User@[::1]/re/po
expecting success:
check_prot_path $p://$h/~$r $p "/~$r"
ok 331 - fetch-pack --diag-url file://User@[::1]/~re/po
expecting success:
check_prot_path ./$h:$r $p "./$h:$r"
ok 332 - fetch-pack --diag-url ./nohost:re/po
expecting success:
check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
ok 333 - fetch-pack --diag-url ./file:nohost/~re/po
expecting success:
check_prot_path ./$h:$r $p "./$h:$r"
ok 334 - fetch-pack --diag-url ./nohost:12:re/po
expecting success:
check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
ok 335 - fetch-pack --diag-url ./file:nohost:12/~re/po
expecting success:
check_prot_path ./$h:$r $p "./$h:$r"
ok 336 - fetch-pack --diag-url ./[::1]:re/po
expecting success:
check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
ok 337 - fetch-pack --diag-url ./file:[::1]/~re/po
expecting success:
check_prot_path ./$h:$r $p "./$h:$r"
ok 338 - fetch-pack --diag-url ./[::1]:23:re/po
expecting success:
check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
ok 339 - fetch-pack --diag-url ./file:[::1]:23/~re/po
expecting success:
check_prot_path ./$h:$r $p "./$h:$r"
ok 340 - fetch-pack --diag-url ./[:re/po
expecting success:
check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
ok 341 - fetch-pack --diag-url ./file:[/~re/po
expecting success:
check_prot_path ./$h:$r $p "./$h:$r"
ok 342 - fetch-pack --diag-url ./[:aa:re/po
expecting success:
check_prot_path ./$p:$h/~$r $p "./$p:$h/~$r"
ok 343 - fetch-pack --diag-url ./file:[:aa/~re/po
expecting success:
check_prot_host_port_path $h:$r $p "$h" NONE "$r"
ok 344 - fetch-pack --diag-url host:re/po
expecting success:
check_prot_host_port_path $h:/~$r $p "$h" NONE "~$r"
ok 345 - fetch-pack --diag-url host:/~re/po
expecting success:
check_prot_host_port_path $h:$r $p "$h" NONE "$r"
ok 346 - fetch-pack --diag-url [::1]:re/po
expecting success:
check_prot_host_port_path $h:/~$r $p "$h" NONE "~$r"
ok 347 - fetch-pack --diag-url [::1]:/~re/po
skipping test: fetch-pack --diag-url file://c:/repo
check_prot_path file://c:/repo file c:/repo
ok 348 # skip fetch-pack --diag-url file://c:/repo (missing MINGW)
skipping test: fetch-pack --diag-url c:repo
check_prot_path c:repo file c:repo
ok 349 # skip fetch-pack --diag-url c:repo (missing MINGW)
expecting success:
test_create_repo shallow-since &&
(
cd shallow-since &&
GIT_COMMITTER_DATE="100000000 +0700" git commit --allow-empty -m one &&
GIT_COMMITTER_DATE="200000000 +0700" git commit --allow-empty -m two &&
GIT_COMMITTER_DATE="300000000 +0700" git commit --allow-empty -m three &&
git clone --shallow-since "300000000 +0700" "file://$(pwd)/." ../shallow11 &&
git -C ../shallow11 log --pretty=tformat:%s HEAD >actual &&
echo three >expected &&
test_cmp expected actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/shallow-since/.git/
[master (root-commit) b8f2519] one
Author: A U Thor <author@example.com>
[master 980412c] two
Author: A U Thor <author@example.com>
[master a1205f6] three
Author: A U Thor <author@example.com>
Cloning into '../shallow11'...
ok 350 - clone shallow since ...
expecting success:
git -C shallow11 fetch --shallow-since "200000000 +0700" origin &&
git -C shallow11 log --pretty=tformat:%s origin/master >actual &&
cat >expected <<-\EOF &&
three
two
EOF
test_cmp expected actual
ok 351 - fetch shallow since ...
expecting success:
test_create_repo shallow-since-the-future &&
(
cd shallow-since-the-future &&
GIT_COMMITTER_DATE="100000000 +0700" git commit --allow-empty -m one &&
GIT_COMMITTER_DATE="200000000 +0700" git commit --allow-empty -m two &&
GIT_COMMITTER_DATE="300000000 +0700" git commit --allow-empty -m three &&
test_must_fail git clone --shallow-since "900000000 +0700" "file://$(pwd)/." ../shallow111
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/shallow-since-the-future/.git/
[master (root-commit) b8f2519] one
Author: A U Thor <author@example.com>
[master 980412c] two
Author: A U Thor <author@example.com>
[master a1205f6] three
Author: A U Thor <author@example.com>
Cloning into '../shallow111'...
fatal: no commits selected for shallow requests
fatal: the remote end hung up unexpectedly
ok 352 - clone shallow since selects no commits
expecting success:
test_create_repo shallow-exclude &&
(
cd shallow-exclude &&
test_commit one &&
test_commit two &&
test_commit three &&
git clone --shallow-exclude two "file://$(pwd)/." ../shallow12 &&
git -C ../shallow12 log --pretty=tformat:%s HEAD >actual &&
echo three >expected &&
test_cmp expected actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/shallow-exclude/.git/
[master (root-commit) 95bedbf] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 992918e] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[master acecc1b] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
Cloning into '../shallow12'...
ok 353 - shallow clone exclude tag two
expecting success:
git -C shallow12 fetch --shallow-exclude one origin &&
git -C shallow12 log --pretty=tformat:%s origin/master >actual &&
test_write_lines three two >expected &&
test_cmp expected actual
From file:///<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/shallow-exclude/.
* [new tag] two -> two
ok 354 - fetch exclude tag one
expecting success:
test_create_repo shallow-deepen &&
(
cd shallow-deepen &&
test_commit one &&
test_commit two &&
test_commit three &&
git clone --depth 1 "file://$(pwd)/." deepen &&
test_commit four &&
git -C deepen log --pretty=tformat:%s master >actual &&
echo three >expected &&
test_cmp expected actual &&
git -C deepen fetch --deepen=1 &&
git -C deepen log --pretty=tformat:%s origin/master >actual &&
cat >expected <<-\EOF &&
four
three
two
EOF
test_cmp expected actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/shallow-deepen/.git/
[master (root-commit) 95bedbf] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 992918e] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[master acecc1b] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
Cloning into 'deepen'...
[master fbf5e51] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 four.t
From file:///<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/shallow-deepen/.
acecc1b..fbf5e51 master -> origin/master
* [new tag] four -> four
* [new tag] two -> two
ok 355 - fetching deepen
expecting success:
rm -rf server client &&
git init server &&
test_commit -C server both_have_1 &&
git -C server tag -d both_have_1 &&
test_commit -C server both_have_2 &&
git clone server client &&
test_commit -C server server_has &&
test_commit -C client client_has &&
# In both protocol v0 and v2, ensure that the parent of both_have_2 is
# not sent as a "have" line. The client should know that the server has
# both_have_2, so it only needs to inform the server that it has
# both_have_2, and the server can infer the rest.
rm -f trace &&
cp -r client clientv0 &&
GIT_TRACE_PACKET="$(pwd)/trace" git -C clientv0 \
fetch origin server_has both_have_2 &&
grep "have $(git -C client rev-parse client_has)" trace &&
grep "have $(git -C client rev-parse both_have_2)" trace &&
! grep "have $(git -C client rev-parse both_have_2^)" trace &&
rm -f trace &&
cp -r client clientv2 &&
GIT_TRACE_PACKET="$(pwd)/trace" git -C clientv2 -c protocol.version=2 \
fetch origin server_has both_have_2 &&
grep "have $(git -C client rev-parse client_has)" trace &&
grep "have $(git -C client rev-parse both_have_2)" trace &&
! grep "have $(git -C client rev-parse both_have_2^)" trace
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/server/.git/
[master (root-commit) de52c8b] both_have_1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 both_have_1.t
Deleted tag 'both_have_1' (was de52c8b)
[master 9f62eef] both_have_2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 both_have_2.t
Cloning into 'client'...
done.
[master e0569be] server_has
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 server_has.t
[master 99dcb77] client_has
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 client_has.t
From /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/server
* tag server_has -> FETCH_HEAD
* tag both_have_2 -> FETCH_HEAD
packet: fetch> have 99dcb77ea3f96683a3ba0ff2a637b207da06692f
packet: upload-pack< have 99dcb77ea3f96683a3ba0ff2a637b207da06692f
packet: fetch> have 9f62eef9ddb9b6230e0df600c6d2e9bbff4bbd2d
packet: upload-pack< have 9f62eef9ddb9b6230e0df600c6d2e9bbff4bbd2d
From /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/server
* tag server_has -> FETCH_HEAD
* tag both_have_2 -> FETCH_HEAD
packet: fetch> have 99dcb77ea3f96683a3ba0ff2a637b207da06692f
packet: upload-pack< have 99dcb77ea3f96683a3ba0ff2a637b207da06692f
packet: fetch> have 9f62eef9ddb9b6230e0df600c6d2e9bbff4bbd2d
packet: upload-pack< have 9f62eef9ddb9b6230e0df600c6d2e9bbff4bbd2d
ok 356 - use ref advertisement to prune "have" lines sent
expecting success:
rm -rf server client &&
test_create_repo server &&
test_commit -C server one &&
test_config -C server uploadpack.allowfilter 1 &&
test_create_repo client &&
git -C client fetch-pack --filter=blob:limit=0 ../server HEAD &&
# Ensure that object is not inadvertently fetched
test_must_fail git -C client cat-file -e $(git hash-object server/one.t)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/server/.git/
[master (root-commit) db55443] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/client/.git/
remote:
remote:
remote: Enumerating objects: 2, done.
remote:
remote:
remote: Counting objects: 50% (1/2)
remote:
remote:
remote: Counting objects: 100% (2/2)
remote:
remote:
remote: Counting objects: 100% (2/2), done.
remote: Total 2 (delta 0), reused 0 (delta 0)
db55443273f7321d542e488ac683200b90461cb0 HEAD
ok 357 - filtering by size
expecting success:
rm -rf server client &&
test_create_repo server &&
test_commit -C server one &&
test_create_repo client &&
git -C client fetch-pack --filter=blob:limit=0 ../server HEAD 2> err &&
# Ensure that object is fetched
git -C client cat-file -e $(git hash-object server/one.t) &&
test_i18ngrep "filtering not recognized by server" err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/server/.git/
[master (root-commit) fbf00d8] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/client/.git/
fbf00d802f921e3383bd7fade55c8f79adbeb415 HEAD
warning: filtering not recognized by server, ignoring
ok 358 - filtering by size has no effect if support for it is not advertised
expecting success:
fetch_filter_blob_limit_zero server server
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/server/.git/
[master (root-commit) 2678c92] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Cloning into 'client'...
done.
[master 09e64f9] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
From /<<PKGBUILDDIR>>/t/trash directory.t5500-fetch-pack/server
* [new ref] -> somewhere
* [new tag] two -> two
fatal: 'arbitrary string' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 359 - fetch with --filter=blob:limit=0
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
# passed all 359 test(s)
# SKIP no web server found at '/usr/sbin/apache2'
1..359
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5515-fetch-merge-logic.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5515-fetch-merge-logic/.git/
expecting success:
GIT_AUTHOR_DATE="2006-06-26 00:00:00 +0000" &&
GIT_COMMITTER_DATE="2006-06-26 00:00:00 +0000" &&
export GIT_AUTHOR_DATE GIT_COMMITTER_DATE &&
echo >file original &&
git add file &&
git commit -a -m One &&
git tag tag-one &&
git tag tag-one-tree HEAD^{tree} &&
git branch one &&
echo two >> file &&
git commit -a -m Two &&
git tag -a -m "Tag Two" tag-two &&
git branch two &&
echo three >> file &&
git commit -a -m Three &&
git tag -a -m "Tag Three" tag-three &&
git tag -a -m "Tag Three file" tag-three-file HEAD^{tree}:file &&
git branch three &&
echo master >> file &&
git commit -a -m Master &&
git tag -a -m "Tag Master" tag-master &&
git checkout three &&
git clone . cloned &&
cd cloned &&
git config remote.origin.url ../.git/ &&
git config remote.config-explicit.url ../.git/ &&
git config remote.config-explicit.fetch refs/heads/master:remotes/rem/master &&
git config --add remote.config-explicit.fetch refs/heads/one:remotes/rem/one &&
git config --add remote.config-explicit.fetch two:remotes/rem/two &&
git config --add remote.config-explicit.fetch refs/heads/three:remotes/rem/three &&
remotes="config-explicit" &&
git config remote.config-glob.url ../.git/ &&
git config remote.config-glob.fetch refs/heads/*:refs/remotes/rem/* &&
remotes="$remotes config-glob" &&
mkdir -p .git/remotes &&
{
echo "URL: ../.git/"
echo "Pull: refs/heads/master:remotes/rem/master"
echo "Pull: refs/heads/one:remotes/rem/one"
echo "Pull: two:remotes/rem/two"
echo "Pull: refs/heads/three:remotes/rem/three"
} >.git/remotes/remote-explicit &&
remotes="$remotes remote-explicit" &&
{
echo "URL: ../.git/"
echo "Pull: refs/heads/*:refs/remotes/rem/*"
} >.git/remotes/remote-glob &&
remotes="$remotes remote-glob" &&
mkdir -p .git/branches &&
echo "../.git" > .git/branches/branches-default &&
remotes="$remotes branches-default" &&
echo "../.git#one" > .git/branches/branches-one &&
remotes="$remotes branches-one" &&
for remote in $remotes ; do
git config branch.br-$remote.remote $remote &&
git config branch.br-$remote-merge.remote $remote &&
git config branch.br-$remote-merge.merge refs/heads/three &&
git config branch.br-$remote-octopus.remote $remote &&
git config branch.br-$remote-octopus.merge refs/heads/one &&
git config --add branch.br-$remote-octopus.merge two
done
[master (root-commit) 8e32a6d] One
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 6134ee8] Two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 0567da4] Three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 754b754] Master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'three'
Cloning into 'cloned'...
done.
ok 1 - setup
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new branch] three -> rem/three
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 2 - br-config-explicit
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new branch] three -> rem/three
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 3 - br-config-explicit config-explicit
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] three -> rem/three
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 4 - br-config-explicit-merge
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] three -> rem/three
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 5 - br-config-explicit-merge config-explicit
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new branch] master -> rem/master
* [new branch] three -> rem/three
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 6 - br-config-explicit-octopus
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new branch] master -> rem/master
* [new branch] three -> rem/three
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 7 - br-config-explicit-octopus config-explicit
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] three -> rem/three
* [new branch] two -> rem/two
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 8 - br-config-glob
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] three -> rem/three
* [new branch] two -> rem/two
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 9 - br-config-glob config-glob
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] three -> rem/three
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 10 - br-config-glob-merge
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] three -> rem/three
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 11 - br-config-glob-merge config-glob
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new branch] master -> rem/master
* [new branch] three -> rem/three
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 12 - br-config-glob-octopus
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new branch] master -> rem/master
* [new branch] three -> rem/three
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 13 - br-config-glob-octopus config-glob
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new branch] three -> rem/three
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 14 - br-remote-explicit
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new branch] three -> rem/three
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 15 - br-remote-explicit remote-explicit
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] three -> rem/three
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 16 - br-remote-explicit-merge
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] three -> rem/three
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 17 - br-remote-explicit-merge remote-explicit
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new branch] master -> rem/master
* [new branch] three -> rem/three
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 18 - br-remote-explicit-octopus
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new branch] master -> rem/master
* [new branch] three -> rem/three
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 19 - br-remote-explicit-octopus remote-explicit
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] three -> rem/three
* [new branch] two -> rem/two
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 20 - br-remote-glob
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] three -> rem/three
* [new branch] two -> rem/two
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 21 - br-remote-glob remote-glob
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] three -> rem/three
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 22 - br-remote-glob-merge
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] three -> rem/three
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 23 - br-remote-glob-merge remote-glob
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new branch] master -> rem/master
* [new branch] three -> rem/three
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 24 - br-remote-glob-octopus
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new branch] master -> rem/master
* [new branch] three -> rem/three
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 25 - br-remote-glob-octopus remote-glob
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> branches-default
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 26 - br-branches-default
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> branches-default
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 27 - br-branches-default branches-default
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* branch three -> FETCH_HEAD
* [new branch] master -> branches-default
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 28 - br-branches-default-merge
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* branch three -> FETCH_HEAD
* [new branch] master -> branches-default
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 29 - br-branches-default-merge branches-default
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* branch one -> FETCH_HEAD
* branch two -> FETCH_HEAD
* [new branch] master -> branches-default
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 30 - br-branches-default-octopus
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* branch one -> FETCH_HEAD
* branch two -> FETCH_HEAD
* [new branch] master -> branches-default
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 31 - br-branches-default-octopus branches-default
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] one -> branches-one
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 32 - br-branches-one
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] one -> branches-one
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 33 - br-branches-one branches-one
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* branch three -> FETCH_HEAD
* [new branch] one -> branches-one
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 34 - br-branches-one-merge
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* branch three -> FETCH_HEAD
* [new branch] one -> branches-one
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 35 - br-branches-one-merge branches-one
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] one -> branches-one
* branch two -> FETCH_HEAD
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 36 - br-branches-one-octopus
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] one -> branches-one
* branch two -> FETCH_HEAD
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 37 - br-branches-one-octopus branches-one
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 38 - master
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new branch] three -> rem/three
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 39 - master config-explicit
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] three -> rem/three
* [new branch] two -> rem/two
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 40 - master config-glob
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new branch] three -> rem/three
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 41 - master remote-explicit
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] three -> rem/three
* [new branch] two -> rem/two
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 42 - master remote-glob
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> branches-default
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 43 - master branches-default
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] one -> branches-one
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 44 - master branches-one
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 45 - br-unconfig
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new branch] three -> rem/three
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 46 - br-unconfig config-explicit
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] three -> rem/three
* [new branch] two -> rem/two
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 47 - br-unconfig config-glob
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] two -> rem/two
* [new branch] three -> rem/three
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 48 - br-unconfig remote-explicit
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> rem/master
* [new branch] one -> rem/one
* [new branch] three -> rem/three
* [new branch] two -> rem/two
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 49 - br-unconfig remote-glob
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] master -> branches-default
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 50 - br-unconfig branches-default
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new branch] one -> branches-one
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 51 - br-unconfig branches-one
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* branch HEAD -> FETCH_HEAD
ok 52 - master ../.git
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* branch one -> FETCH_HEAD
ok 53 - master ../.git one
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* branch one -> FETCH_HEAD
* branch two -> FETCH_HEAD
ok 54 - master ../.git one two
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* branch HEAD -> FETCH_HEAD
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 55 - master --tags ../.git
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new tag] tag-one -> tag-one
* [new tag] tag-three -> tag-three
* [new tag] tag-master -> tag-master
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 56 - master ../.git tag tag-one tag tag-three
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-three -> tag-three
* [new tag] tag-two -> tag-two
ok 57 - master ../.git tag tag-one-tree tag tag-three-file
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* branch one -> FETCH_HEAD
* [new tag] tag-one -> tag-one
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-master -> tag-master
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-two -> tag-two
ok 58 - master ../.git one tag tag-one tag tag-three-file
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* branch HEAD -> FETCH_HEAD
ok 59 - br-unconfig ../.git
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* branch one -> FETCH_HEAD
ok 60 - br-unconfig ../.git one
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* branch one -> FETCH_HEAD
* branch two -> FETCH_HEAD
ok 61 - br-unconfig ../.git one two
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* branch HEAD -> FETCH_HEAD
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 62 - br-unconfig --tags ../.git
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new tag] tag-one -> tag-one
* [new tag] tag-three -> tag-three
* [new tag] tag-master -> tag-master
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-two -> tag-two
ok 63 - br-unconfig ../.git tag tag-one tag tag-three
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-master -> tag-master
* [new tag] tag-one -> tag-one
* [new tag] tag-three -> tag-three
* [new tag] tag-two -> tag-two
ok 64 - br-unconfig ../.git tag tag-one-tree tag tag-three-file
expecting success:
{
echo "# $cmd"
set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
git for-each-ref \
refs/heads refs/remotes/rem refs/tags |
while read val type refname
do
git update-ref -d "$refname" "$val"
done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
cp "$actual_f" "$expect_f"
false
fi &&
if test -f "$expect_r"
then
test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.
cp "$actual_r" "$expect_r"
false
fi
From ../
* branch one -> FETCH_HEAD
* [new tag] tag-one -> tag-one
* [new tag] tag-three-file -> tag-three-file
* [new tag] tag-master -> tag-master
* [new tag] tag-one-tree -> tag-one-tree
* [new tag] tag-three -> tag-three
* [new tag] tag-two -> tag-two
ok 65 - br-unconfig ../.git one tag tag-one tag tag-three-file
# passed all 65 test(s)
1..65
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5518-fetch-exit-status.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5518-fetch-exit-status/.git/
expecting success:
>file &&
git add file &&
git commit -m initial &&
git checkout -b side &&
echo side >file &&
git commit -a -m side &&
git checkout master &&
echo next >file &&
git commit -a -m next
[master (root-commit) 3f27441] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
Switched to a new branch 'side'
[side f2d5630] side
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'master'
[master c1a3bd9] next
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
test_must_fail git fetch . master:side
From .
! [rejected] master -> side (non-fast-forward)
ok 2 - non-fast-forward fetch
expecting success:
git fetch . +master:side
From .
+ f2d5630...c1a3bd9 master -> side (forced update)
ok 3 - forced update
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5519-push-alternates.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5519-push-alternates/.git/
expecting success:
mkdir alice-pub &&
(
cd alice-pub &&
GIT_DIR=. git init
) &&
mkdir alice-work &&
(
cd alice-work &&
git init &&
>file &&
git add . &&
git commit -m initial &&
git push ../alice-pub master
) &&
# Project Bob is a fork of project Alice
mkdir bob-pub &&
(
cd bob-pub &&
GIT_DIR=. git init &&
mkdir -p objects/info &&
echo ../../alice-pub/objects >objects/info/alternates
) &&
git clone alice-pub bob-work &&
(
cd bob-work &&
git push ../bob-pub master
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5519-push-alternates/alice-pub/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5519-push-alternates/alice-work/.git/
[master (root-commit) bef2dc2] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
To ../alice-pub
* [new branch] master -> master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5519-push-alternates/bob-pub/
Cloning into 'bob-work'...
done.
To ../bob-pub
* [new branch] master -> master
ok 1 - setup
expecting success:
(
cd alice-work &&
echo more >file &&
git commit -a -m second &&
git push ../alice-pub :
)
[master ba1543a] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
To ../alice-pub
bef2dc2..ba1543a master -> master
ok 2 - alice works and pushes
expecting success:
(
# Bob acquires what Alice did in his work tree first.
# Even though these objects are not directly in
# the public repository of Bob, this push does not
# need to send the commit Bob received from Alice
# to his public repository, as all the object Alice
# has at her public repository are available to it
# via its alternates.
cd bob-work &&
git pull ../alice-pub master &&
echo more bob >file &&
git commit -a -m third &&
git push ../bob-pub :
) &&
# Check that the second commit by Alice is not sent
# to ../bob-pub
(
cd bob-pub &&
second=$(git rev-parse HEAD^) &&
rm -f objects/info/alternates &&
test_must_fail git cat-file -t $second &&
echo ../../alice-pub/objects >objects/info/alternates
)
From ../alice-pub
* branch master -> FETCH_HEAD
Updating bef2dc2..ba1543a
Fast-forward
file | 1 +
1 file changed, 1 insertion(+)
[master d774b4f] third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
To ../bob-pub
bef2dc2..d774b4f master -> master
fatal: git cat-file: could not get object info
ok 3 - bob fetches from alice, works and pushes
expecting success:
(
cd bob-pub &&
echo ../../alice-pub/objects >objects/info/alternates
)
ok 4 - clean-up in case the previous failed
expecting success:
(
# Alice does not care what Bob does. She does not
# even have to be aware of his existence. She just
# keeps working and pushing
cd alice-work &&
echo more alice >file &&
git commit -a -m fourth &&
git push ../alice-pub :
)
[master 66981b5] fourth
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
To ../alice-pub
ba1543a..66981b5 master -> master
ok 5 - alice works and pushes again
expecting success:
(
# This time Bob does not pull from Alice, and
# the master branch at her public repository points
# at a commit Bob does not know about. This should
# not prevent the push by Bob from succeeding.
cd bob-work &&
echo yet more bob >file &&
git commit -a -m fifth &&
git push ../bob-pub :
)
[master d832b7b] fifth
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
To ../bob-pub
d774b4f..d832b7b master -> master
ok 6 - bob works and pushes
expecting success:
(
# Alice does not care what Bob does. She does not
# even have to be aware of his existence. She just
# keeps working and pushing
cd alice-work &&
echo more and more alice >file &&
git commit -a -m sixth.1 &&
echo more and more alice >>file &&
git commit -a -m sixth.2 &&
echo more and more alice >>file &&
git commit -a -m sixth.3 &&
git push ../alice-pub :
)
[master bf63d1e] sixth.1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master decf2a7] sixth.2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 9d455a2] sixth.3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
To ../alice-pub
66981b5..9d455a2 master -> master
ok 7 - alice works and pushes yet again
expecting success:
(
cd alice-pub &&
git cat-file commit master >../bob-work/commit
) &&
(
# This time Bob does not pull from Alice, and
# the master branch at her public repository points
# at a commit Bob does not fully know about, but
# he happens to have the commit object (but not the
# necessary tree) in his repository from Alice.
# This should not prevent the push by Bob from
# succeeding.
cd bob-work &&
git hash-object -t commit -w commit &&
echo even more bob >file &&
git commit -a -m seventh &&
git push ../bob-pub :
)
9d455a2d16cc89baacf922e9be039860991d387a
[master e325a46] seventh
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
To ../bob-pub
d832b7b..e325a46 master -> master
ok 8 - bob works and pushes again
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5517-push-mirror.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/.git/
expecting success:
mk_repo_pair &&
(
cd master &&
echo one >foo && git add foo && git commit -m one &&
git push --mirror up
) &&
master_master=$(cd master && git show-ref -s --verify refs/heads/master) &&
mirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&
test "$master_master" = "$mirror_master"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/mirror/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/master/.git/
[master (root-commit) 34e8166] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
remote: warning: updating the current branch
To ../mirror
* [new branch] master -> master
ok 1 - push mirror creates new branches
expecting success:
mk_repo_pair &&
(
cd master &&
echo one >foo && git add foo && git commit -m one &&
git push --mirror up &&
echo two >foo && git add foo && git commit -m two &&
git push --mirror up
) &&
master_master=$(cd master && git show-ref -s --verify refs/heads/master) &&
mirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&
test "$master_master" = "$mirror_master"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/mirror/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/master/.git/
[master (root-commit) 34e8166] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
remote: warning: updating the current branch
To ../mirror
* [new branch] master -> master
[master 9e9324a] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
remote: warning: updating the current branch
To ../mirror
34e8166..9e9324a master -> master
* [new branch] up/master -> up/master
ok 2 - push mirror updates existing branches
expecting success:
mk_repo_pair &&
(
cd master &&
echo one >foo && git add foo && git commit -m one &&
git push --mirror up &&
echo two >foo && git add foo && git commit -m two &&
git push --mirror up &&
git reset --hard HEAD^ &&
git push --mirror up
) &&
master_master=$(cd master && git show-ref -s --verify refs/heads/master) &&
mirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&
test "$master_master" = "$mirror_master"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/mirror/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/master/.git/
[master (root-commit) 34e8166] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
remote: warning: updating the current branch
To ../mirror
* [new branch] master -> master
[master f2065b8] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
remote: warning: updating the current branch
To ../mirror
34e8166..f2065b8 master -> master
* [new branch] up/master -> up/master
HEAD is now at 34e8166 one
remote: warning: updating the current branch
To ../mirror
+ f2065b8...34e8166 master -> master (forced update)
34e8166..f2065b8 up/master -> up/master
ok 3 - push mirror force updates existing branches
expecting success:
mk_repo_pair &&
(
cd master &&
echo one >foo && git add foo && git commit -m one &&
git branch remove master &&
git push --mirror up &&
git branch -D remove &&
git push --mirror up
) &&
(
cd mirror &&
invert git show-ref -s --verify refs/heads/remove
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/mirror/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/master/.git/
[master (root-commit) e502e59] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
remote: warning: updating the current branch
To ../mirror
* [new branch] master -> master
* [new branch] remove -> remove
Deleted branch remove (was e502e59).
To ../mirror
- [deleted] remove
* [new branch] up/master -> up/master
* [new branch] up/remove -> up/remove
fatal: 'refs/heads/remove' - not a valid ref
ok 4 - push mirror removes branches
expecting success:
mk_repo_pair &&
(
cd master &&
echo one >foo && git add foo && git commit -m one &&
git branch remove master &&
git push --mirror up &&
git branch -D remove &&
git branch add master &&
echo two >foo && git add foo && git commit -m two &&
git push --mirror up
) &&
master_master=$(cd master && git show-ref -s --verify refs/heads/master) &&
master_add=$(cd master && git show-ref -s --verify refs/heads/add) &&
mirror_master=$(cd mirror && git show-ref -s --verify refs/heads/master) &&
mirror_add=$(cd mirror && git show-ref -s --verify refs/heads/add) &&
test "$master_master" = "$mirror_master" &&
test "$master_add" = "$mirror_add" &&
(
cd mirror &&
invert git show-ref -s --verify refs/heads/remove
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/mirror/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/master/.git/
[master (root-commit) e502e59] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
remote: warning: updating the current branch
To ../mirror
* [new branch] master -> master
* [new branch] remove -> remove
Deleted branch remove (was e502e59).
[master 7a48fdc] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
remote: warning: updating the current branch
To ../mirror
e502e59..7a48fdc master -> master
- [deleted] remove
* [new branch] add -> add
* [new branch] up/master -> up/master
* [new branch] up/remove -> up/remove
fatal: 'refs/heads/remove' - not a valid ref
ok 5 - push mirror adds, updates and removes branches together
expecting success:
mk_repo_pair &&
(
cd master &&
echo one >foo && git add foo && git commit -m one &&
git tag -f tmaster master &&
git push --mirror up
) &&
master_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&
mirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&
test "$master_master" = "$mirror_master"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/mirror/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/master/.git/
[master (root-commit) dd10505] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
remote: warning: updating the current branch
To ../mirror
* [new branch] master -> master
* [new tag] tmaster -> tmaster
ok 6 - push mirror creates new tags
expecting success:
mk_repo_pair &&
(
cd master &&
echo one >foo && git add foo && git commit -m one &&
git tag -f tmaster master &&
git push --mirror up &&
echo two >foo && git add foo && git commit -m two &&
git tag -f tmaster master &&
git push --mirror up
) &&
master_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&
mirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&
test "$master_master" = "$mirror_master"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/mirror/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/master/.git/
[master (root-commit) dd10505] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
remote: warning: updating the current branch
To ../mirror
* [new branch] master -> master
* [new tag] tmaster -> tmaster
[master 1dc0f90] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Updated tag 'tmaster' (was dd10505)
remote: warning: updating the current branch
To ../mirror
dd10505..1dc0f90 master -> master
+ dd10505...1dc0f90 tmaster -> tmaster (forced update)
* [new branch] up/master -> up/master
ok 7 - push mirror updates existing tags
expecting success:
mk_repo_pair &&
(
cd master &&
echo one >foo && git add foo && git commit -m one &&
git tag -f tmaster master &&
git push --mirror up &&
echo two >foo && git add foo && git commit -m two &&
git tag -f tmaster master &&
git push --mirror up &&
git reset --hard HEAD^ &&
git tag -f tmaster master &&
git push --mirror up
) &&
master_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&
mirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&
test "$master_master" = "$mirror_master"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/mirror/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/master/.git/
[master (root-commit) 62779a5] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
remote: warning: updating the current branch
To ../mirror
* [new branch] master -> master
* [new tag] tmaster -> tmaster
[master e348e53] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Updated tag 'tmaster' (was 62779a5)
remote: warning: updating the current branch
To ../mirror
62779a5..e348e53 master -> master
+ 62779a5...e348e53 tmaster -> tmaster (forced update)
* [new branch] up/master -> up/master
HEAD is now at 62779a5 one
Updated tag 'tmaster' (was e348e53)
remote: warning: updating the current branch
To ../mirror
+ e348e53...62779a5 master -> master (forced update)
62779a5..e348e53 up/master -> up/master
+ e348e53...62779a5 tmaster -> tmaster (forced update)
ok 8 - push mirror force updates existing tags
expecting success:
mk_repo_pair &&
(
cd master &&
echo one >foo && git add foo && git commit -m one &&
git tag -f tremove master &&
git push --mirror up &&
git tag -d tremove &&
git push --mirror up
) &&
(
cd mirror &&
invert git show-ref -s --verify refs/tags/tremove
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/mirror/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/master/.git/
[master (root-commit) b6bfbf9] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
remote: warning: updating the current branch
To ../mirror
* [new branch] master -> master
* [new tag] tremove -> tremove
Deleted tag 'tremove' (was b6bfbf9)
To ../mirror
- [deleted] tremove
* [new branch] up/master -> up/master
fatal: 'refs/tags/tremove' - not a valid ref
ok 9 - push mirror removes tags
expecting success:
mk_repo_pair &&
(
cd master &&
echo one >foo && git add foo && git commit -m one &&
git tag -f tmaster master &&
git tag -f tremove master &&
git push --mirror up &&
git tag -d tremove &&
git tag tadd master &&
echo two >foo && git add foo && git commit -m two &&
git tag -f tmaster master &&
git push --mirror up
) &&
master_master=$(cd master && git show-ref -s --verify refs/tags/tmaster) &&
master_add=$(cd master && git show-ref -s --verify refs/tags/tadd) &&
mirror_master=$(cd mirror && git show-ref -s --verify refs/tags/tmaster) &&
mirror_add=$(cd mirror && git show-ref -s --verify refs/tags/tadd) &&
test "$master_master" = "$mirror_master" &&
test "$master_add" = "$mirror_add" &&
(
cd mirror &&
invert git show-ref -s --verify refs/tags/tremove
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/mirror/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/master/.git/
[master (root-commit) b6bfbf9] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
remote: warning: updating the current branch
To ../mirror
* [new branch] master -> master
* [new tag] tmaster -> tmaster
* [new tag] tremove -> tremove
Deleted tag 'tremove' (was b6bfbf9)
[master 0b474c0] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Updated tag 'tmaster' (was b6bfbf9)
remote: warning: updating the current branch
To ../mirror
b6bfbf9..0b474c0 master -> master
+ b6bfbf9...0b474c0 tmaster -> tmaster (forced update)
- [deleted] tremove
* [new branch] up/master -> up/master
* [new tag] tadd -> tadd
fatal: 'refs/tags/tremove' - not a valid ref
ok 10 - push mirror adds, updates and removes tags together
expecting success:
mk_repo_pair --mirror &&
(
cd master &&
echo one >foo && git add foo && git commit -m one &&
git branch keep master &&
git branch remove master &&
git push up &&
git branch -D remove &&
git push up
) &&
(
cd mirror &&
git show-ref -s --verify refs/heads/keep &&
invert git show-ref -s --verify refs/heads/remove
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/mirror/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/master/.git/
warning: --mirror is dangerous and deprecated; please
use --mirror=fetch or --mirror=push instead
[master (root-commit) ac18553] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
Branch 'keep' set up to track remote branch 'master' from 'up'.
Branch 'remove' set up to track remote branch 'master' from 'up'.
remote: warning: updating the current branch
To ../mirror
* [new branch] keep -> keep
* [new branch] master -> master
* [new branch] remove -> remove
Deleted branch remove (was ac18553).
To ../mirror
- [deleted] remove
ac18553afef3a0d4152991390d6255096b7c3996
fatal: 'refs/heads/remove' - not a valid ref
ok 11 - remote.foo.mirror adds and removes branches
expecting success:
mk_repo_pair &&
(
cd master &&
echo one >foo && git add foo && git commit -m one &&
git config --add remote.up.mirror no &&
git branch keep master &&
git push --mirror up &&
git branch -D keep &&
git push up :
) &&
(
cd mirror &&
git show-ref -s --verify refs/heads/keep
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/mirror/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5517-push-mirror/master/.git/
[master (root-commit) ac18553] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
remote: warning: updating the current branch
To ../mirror
* [new branch] keep -> keep
* [new branch] master -> master
Deleted branch keep (was ac18553).
Everything up-to-date
ac18553afef3a0d4152991390d6255096b7c3996
ok 12 - remote.foo.mirror=no has no effect
# passed all 12 test(s)
1..12
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5521-pull-options.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/.git/
expecting success:
mkdir parent &&
(cd parent && git init &&
echo one >file && git add file &&
git commit -m one)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/parent/.git/
[master (root-commit) 316ef31] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 1 - setup
expecting success:
mkdir clonedq &&
(cd clonedq && git init &&
git pull -q "../parent" >out 2>err &&
test_must_be_empty err &&
test_must_be_empty out)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/clonedq/.git/
ok 2 - git pull -q
expecting success:
mkdir clonedqrb &&
(cd clonedqrb && git init &&
git pull -q --rebase "../parent" >out 2>err &&
test_must_be_empty err &&
test_must_be_empty out &&
git pull -q --rebase "../parent" >out 2>err &&
test_must_be_empty err &&
test_must_be_empty out)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/clonedqrb/.git/
ok 3 - git pull -q --rebase
expecting success:
mkdir cloned &&
(cd cloned && git init &&
git pull "../parent" >out 2>err &&
test -s err &&
test_must_be_empty out)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/cloned/.git/
ok 4 - git pull
expecting success:
mkdir clonedrb &&
(cd clonedrb && git init &&
git pull --rebase "../parent" >out 2>err &&
test -s err &&
test_must_be_empty out)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/clonedrb/.git/
ok 5 - git pull --rebase
expecting success:
mkdir clonedv &&
(cd clonedv && git init &&
git pull -v "../parent" >out 2>err &&
test -s err &&
test_must_be_empty out)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/clonedv/.git/
ok 6 - git pull -v
expecting success:
mkdir clonedvrb &&
(cd clonedvrb && git init &&
git pull -v --rebase "../parent" >out 2>err &&
test -s err &&
test_must_be_empty out)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/clonedvrb/.git/
ok 7 - git pull -v --rebase
expecting success:
mkdir clonedvq &&
(cd clonedvq && git init &&
git pull -v -q "../parent" >out 2>err &&
test_must_be_empty out &&
test_must_be_empty err)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/clonedvq/.git/
ok 8 - git pull -v -q
expecting success:
mkdir clonedqv &&
(cd clonedqv && git init &&
git pull -q -v "../parent" >out 2>err &&
test_must_be_empty out &&
test -s err)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/clonedqv/.git/
ok 9 - git pull -q -v
expecting success:
mkdir clonedcleanup &&
(cd clonedcleanup && git init &&
test_must_fail git pull --cleanup invalid "../parent" >out 2>err &&
test_must_be_empty out &&
test -s err)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/clonedcleanup/.git/
ok 10 - git pull --cleanup errors early on invalid argument
expecting success:
mkdir clonedoldstyle &&
(cd clonedoldstyle && git init &&
cat >>.git/config <<-\EOF &&
[remote "one"]
url = ../parent
fetch = refs/heads/master:refs/heads/mirror
[remote "two"]
url = ../parent
fetch = refs/heads/master:refs/heads/origin
[branch "master"]
remote = two
merge = refs/heads/master
EOF
git pull two &&
test_commit A &&
git branch -f origin &&
git pull --all --force
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/clonedoldstyle/.git/
From ../parent
* [new branch] master -> origin
[master 7c07224] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
Fetching one
From ../parent
* [new branch] master -> mirror
Fetching two
From ../parent
+ 7c07224...316ef31 master -> origin (forced update)
Already up to date.
ok 11 - git pull --force
expecting success:
mkdir clonedmulti &&
(cd clonedmulti && git init &&
cat >>.git/config <<-\EOF &&
[remote "one"]
url = ../parent
fetch = refs/heads/*:refs/remotes/one/*
[remote "two"]
url = ../parent
fetch = refs/heads/*:refs/remotes/two/*
[branch "master"]
remote = one
merge = refs/heads/master
EOF
git pull --all
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/clonedmulti/.git/
Fetching one
From ../parent
* [new branch] master -> one/master
Fetching two
From ../parent
* [new branch] master -> two/master
ok 12 - git pull --all
expecting success:
test_when_finished "rm -rf clonedry" &&
git init clonedry &&
(
cd clonedry &&
git pull --dry-run ../parent &&
test_path_is_missing .git/FETCH_HEAD &&
test_path_is_missing .git/refs/heads/master &&
test_path_is_missing .git/index &&
test_path_is_missing file
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/clonedry/.git/
From ../parent
* branch HEAD -> FETCH_HEAD
ok 13 - git pull --dry-run
expecting success:
test_when_finished "rm -rf cloneddry" &&
git init clonedry &&
(
cd clonedry &&
git remote add origin ../parent &&
git pull --all --dry-run &&
test_path_is_missing .git/FETCH_HEAD &&
test_path_is_missing .git/refs/remotes/origin/master &&
test_path_is_missing .git/index &&
test_path_is_missing file
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/clonedry/.git/
Fetching origin
From ../parent
* [new branch] master -> origin/master
ok 14 - git pull --all --dry-run
expecting success:
test_when_finished "rm -fr src dst" &&
git init src &&
(
cd src &&
test_commit one &&
test_commit two
) &&
git clone src dst &&
(
cd src &&
git checkout --orphan side HEAD^ &&
test_commit three
) &&
(
cd dst &&
test_must_fail git pull ../src side &&
git pull --allow-unrelated-histories ../src side
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/src/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
Cloning into 'dst'...
done.
Switched to a new branch 'side'
[side (root-commit) d8f6b98] three
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 one.t
create mode 100644 three.t
From ../src
* branch side -> FETCH_HEAD
fatal: refusing to merge unrelated histories
From ../src
* branch side -> FETCH_HEAD
Merging:
139b20d two
virtual d8f6b98c5bc40120fe1ddffe1273920e5c69e25a
found 0 common ancestors:
Merge made by the 'recursive' strategy.
three.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 three.t
ok 15 - git pull --allow-unrelated-histories
expecting success:
test_when_finished "rm -fr src dst actual" &&
git init src &&
test_commit -C src one &&
git clone src dst &&
test_commit -C src two &&
git -C dst pull --no-ff &&
git -C dst show -s --pretty="format:%(trailers)" HEAD >actual &&
test_must_be_empty actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/src/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Cloning into 'dst'...
done.
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
From /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/src
d79ce16..139b20d master -> origin/master
* [new tag] two -> two
Merging:
d79ce16 one
virtual 139b20d8e6c5b496de61f033f642d0e3dbff528d
found 1 common ancestor:
d79ce16 one
Merge made by the 'recursive' strategy.
two.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 two.t
ok 16 - git pull does not add a sign-off line
expecting success:
test_when_finished "rm -fr src dst actual" &&
git init src &&
test_commit -C src one &&
git clone src dst &&
test_commit -C src two &&
git -C dst pull --no-signoff --no-ff &&
git -C dst show -s --pretty="format:%(trailers)" HEAD >actual &&
test_must_be_empty actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/src/.git/
[master (root-commit) 4331c28] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Cloning into 'dst'...
done.
[master 00bbe3d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
From /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/src
4331c28..00bbe3d master -> origin/master
* [new tag] two -> two
Merging:
4331c28 one
virtual 00bbe3d52a615188595aba57d395b47d615da292
found 1 common ancestor:
4331c28 one
Merge made by the 'recursive' strategy.
two.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 two.t
ok 17 - git pull --no-signoff does not add sign-off line
expecting success:
test_when_finished "rm -fr src dst expected actual" &&
echo "Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" >expected &&
git init src &&
test_commit -C src one &&
git clone src dst &&
test_commit -C src two &&
git -C dst pull --signoff --no-ff &&
git -C dst show -s --pretty="format:%(trailers)" HEAD >actual &&
test_cmp expected actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/src/.git/
[master (root-commit) 6f4b17f] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Cloning into 'dst'...
done.
[master 5c4888c] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
From /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/src
6f4b17f..5c4888c master -> origin/master
* [new tag] two -> two
Merging:
6f4b17f one
virtual 5c4888cac74c75058200514819ab8e90d13458bd
found 1 common ancestor:
6f4b17f one
Merge made by the 'recursive' strategy.
two.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 two.t
ok 18 - git pull --signoff add a sign-off line
expecting success:
test_when_finished "rm -fr src dst actual" &&
git init src &&
test_commit -C src one &&
git clone src dst &&
test_commit -C src two &&
git -C dst pull --signoff --no-signoff --no-ff &&
git -C dst show -s --pretty="format:%(trailers)" HEAD >actual &&
test_must_be_empty actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/src/.git/
[master (root-commit) 06e07da] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Cloning into 'dst'...
done.
[master 738d2f7] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
From /<<PKGBUILDDIR>>/t/trash directory.t5521-pull-options/src
06e07da..738d2f7 master -> origin/master
* [new tag] two -> two
Merging:
06e07da one
virtual 738d2f784bbb25d033fc0ad76d55de89c24d19ad
found 1 common ancestor:
06e07da one
Merge made by the 'recursive' strategy.
two.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 two.t
ok 19 - git pull --no-signoff flag cancels --signoff flag
# passed all 19 test(s)
1..19
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5522-pull-symlink.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5522-pull-symlink/.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
)
prerequisite SYMLINKS ok
expecting success:
mkdir subdir &&
echo file >subdir/file &&
git add subdir/file &&
git commit -q -m file &&
git clone -q . clone-repo &&
ln -s clone-repo/subdir/ subdir-link &&
(
cd clone-repo &&
git config receive.denyCurrentBranch warn
) &&
git config receive.denyCurrentBranch warn
ok 1 - setup
expecting success:
(
echo real >subdir/file &&
git commit -m real subdir/file &&
cd clone-repo/subdir/ &&
git pull &&
test real = $(cat file)
)
[master e0900c2] real
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
From /<<PKGBUILDDIR>>/t/trash directory.t5522-pull-symlink/.
2856b1b..e0900c2 master -> origin/master
Updating 2856b1b..e0900c2
Fast-forward
subdir/file | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ok 2 - pulling from real subdir
expecting success:
(
echo link >subdir/file &&
git commit -m link subdir/file &&
cd subdir-link/ &&
git pull &&
test link = $(cat file)
)
[master 6c136e2] link
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
From /<<PKGBUILDDIR>>/t/trash directory.t5522-pull-symlink/.
e0900c2..6c136e2 master -> origin/master
Updating e0900c2..6c136e2
Fast-forward
subdir/file | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ok 3 - pulling from symlinked subdir
expecting success:
(
cd subdir-link/ &&
echo push >file &&
git commit -m push ./file &&
git push
) &&
test push = $(git show HEAD:subdir/file)
[master 0d67a4c] push
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
remote: warning: updating the current branch
To /<<PKGBUILDDIR>>/t/trash directory.t5522-pull-symlink/.
6c136e2..0d67a4c master -> master
ok 4 - pushing from symlinked subdir
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5523-push-upstream.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5523-push-upstream/.git/
expecting success:
ensure_fresh_upstream &&
git remote add upstream parent
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5523-push-upstream/parent/
ok 1 - setup bare parent
expecting success:
echo content >file &&
git add file &&
git commit -m one
[master (root-commit) eae1063] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 2 - setup local commit
expecting success:
git push -u upstream master:master &&
check_config master upstream refs/heads/master
To parent
* [new branch] master -> master
Branch 'master' set up to track remote branch 'master' from 'upstream'.
ok 3 - push -u master:master
expecting success:
git push -u upstream master:other &&
check_config master upstream refs/heads/other
To parent
* [new branch] master -> other
Branch 'master' set up to track remote branch 'other' from 'upstream'.
ok 4 - push -u master:other
expecting success:
git push -u --dry-run upstream master:otherX &&
check_config master upstream refs/heads/other
To parent
* [new branch] master -> otherX
Would set upstream of 'master' to 'otherX' of 'upstream'
ok 5 - push -u --dry-run master:otherX
expecting success:
git branch master2 &&
git push -u upstream master2:master2 &&
check_config master2 upstream refs/heads/master2
To parent
* [new branch] master2 -> master2
Branch 'master2' set up to track remote branch 'master2' from 'upstream'.
ok 6 - push -u master2:master2
expecting success:
git push -u upstream master2:other2 &&
check_config master2 upstream refs/heads/other2
To parent
* [new branch] master2 -> other2
Branch 'master2' set up to track remote branch 'other2' from 'upstream'.
ok 7 - push -u master2:other2
expecting success:
git push -u upstream :master2 &&
check_config master2 upstream refs/heads/other2
To parent
- [deleted] master2
ok 8 - push -u :master2
expecting success:
git branch all1 &&
git branch all2 &&
git push -u --all &&
check_config all1 upstream refs/heads/all1 &&
check_config all2 upstream refs/heads/all2
To parent
* [new branch] all1 -> all1
* [new branch] all2 -> all2
* [new branch] master2 -> master2
Branch 'master' set up to track remote branch 'master' from 'upstream'.
Branch 'all1' set up to track remote branch 'all1' from 'upstream'.
Branch 'all2' set up to track remote branch 'all2' from 'upstream'.
Branch 'master2' set up to track remote branch 'master2' from 'upstream'.
ok 9 - push -u --all
expecting success:
git checkout -b headbranch &&
git push -u upstream HEAD &&
check_config headbranch upstream refs/heads/headbranch
Switched to a new branch 'headbranch'
To parent
* [new branch] HEAD -> headbranch
Branch 'headbranch' set up to track remote branch 'headbranch' from 'upstream'.
ok 10 - push -u HEAD
checking prerequisite: TTY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq PERL &&
# Reading from the pty master seems to get stuck _sometimes_
# on Mac OS X 10.5.0, using Perl 5.10.0 or 5.8.9.
#
# Reproduction recipe: run
#
# i=0
# while ./test-terminal.perl echo hi $i
# do
# : $((i = $i + 1))
# done
#
# After 2000 iterations or so it hangs.
# https://rt.cpan.org/Ticket/Display.html?id=65692
#
test "$(uname -s)" != Darwin &&
perl "$TEST_DIRECTORY"/test-terminal.perl \
sh -c "test -t 1 && test -t 2"
)
prerequisite TTY ok
expecting success:
ensure_fresh_upstream &&
test_terminal git push -u upstream master >out 2>err &&
test_i18ngrep "Writing objects" err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5523-push-upstream/parent/
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
[KWriting objects: 33% (1/3)
[KWriting objects: 66% (2/3)
[KWriting objects: 100% (3/3)
[KWriting objects: 100% (3/3), 219 bytes | 31.00 KiB/s, done.
ok 11 - progress messages go to tty
expecting success:
ensure_fresh_upstream &&
# skip progress messages, since stderr is non-tty
git push -u upstream master >out 2>err &&
test_i18ngrep ! "Writing objects" err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5523-push-upstream/parent/
ok 12 - progress messages do not go to non-tty
expecting success:
ensure_fresh_upstream &&
# force progress messages to stderr, even though it is non-tty
git push -u --progress upstream master >out 2>err &&
test_i18ngrep "Writing objects" err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5523-push-upstream/parent/
Writing objects: 33% (1/3)
Writing objects: 66% (2/3)
Writing objects: 100% (3/3)
Writing objects: 100% (3/3), 219 bytes | 73.00 KiB/s, done.
ok 13 - progress messages go to non-tty (forced)
expecting success:
ensure_fresh_upstream &&
test_terminal git push -u -q upstream master >out 2>err &&
test_i18ngrep ! "Writing objects" err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5523-push-upstream/parent/
ok 14 - push -q suppresses progress
expecting success:
ensure_fresh_upstream &&
test_terminal git push -u --no-progress upstream master >out 2>err &&
test_i18ngrep ! "Unpacking objects" err &&
test_i18ngrep ! "Writing objects" err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5523-push-upstream/parent/
ok 15 - push --no-progress suppresses progress
expecting success:
ensure_fresh_upstream &&
test_terminal git push --quiet --no-progress upstream master 2>&1 | tee output &&
test_must_be_empty output
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5523-push-upstream/parent/
ok 16 - quiet push
# passed all 16 test(s)
1..16
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5524-pull-msg.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5524-pull-msg/.git/
expecting success:
test_commit initial afile original &&
git clone . cloned &&
(
cd cloned &&
echo added >bfile &&
git add bfile &&
test_tick &&
git commit -m "add bfile"
) &&
test_tick && test_tick &&
echo "second" >afile &&
git add afile &&
git commit -m "second commit" &&
echo "original $dollar" >afile &&
git add afile &&
git commit -m "do not clobber $dollar signs"
[master (root-commit) f176df3] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 afile
Cloning into 'cloned'...
done.
[master 1facbb5] add bfile
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bfile
[master 4db85b7] second commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 8393f95] do not clobber $Dollar signs
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
(
cd cloned &&
git pull --log &&
git log -2 &&
git cat-file commit HEAD >result &&
grep Dollar result
)
From /<<PKGBUILDDIR>>/t/trash directory.t5524-pull-msg/.
f176df3..8393f95 master -> origin/master
Merging:
1facbb5 add bfile
virtual 8393f95971e86cb10f5e23411fa764a2751859f1
found 1 common ancestor:
f176df3 initial
Merge made by the 'recursive' strategy.
afile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 0601e388fcac7420c629d6f849440754a169da29
Merge: 1facbb5 8393f95
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
Merge branch 'master' of /<<PKGBUILDDIR>>/t/trash directory.t5524-pull-msg/.
* 'master' of /<<PKGBUILDDIR>>/t/trash directory.t5524-pull-msg/.:
do not clobber $Dollar signs
second commit
commit 8393f95971e86cb10f5e23411fa764a2751859f1
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
do not clobber $Dollar signs
do not clobber $Dollar signs
ok 2 - pull
expecting success:
(
cd cloned &&
git reset --hard HEAD^ &&
test "$(cat afile)" = original &&
test "$(cat bfile)" = added &&
git pull --log=1 &&
git log -3 &&
git cat-file commit HEAD >result &&
grep Dollar result &&
! grep "second commit" result
)
HEAD is now at 1facbb5 add bfile
Merging:
1facbb5 add bfile
virtual 8393f95971e86cb10f5e23411fa764a2751859f1
found 1 common ancestor:
f176df3 initial
Merge made by the 'recursive' strategy.
afile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit d21ca3bc012127751ee9eb6b8802355b5d291c82
Merge: 1facbb5 8393f95
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
Merge branch 'master' of /<<PKGBUILDDIR>>/t/trash directory.t5524-pull-msg/.
* 'master' of /<<PKGBUILDDIR>>/t/trash directory.t5524-pull-msg/.: (2 commits)
do not clobber $Dollar signs
...
commit 8393f95971e86cb10f5e23411fa764a2751859f1
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
do not clobber $Dollar signs
commit 4db85b7332a1f2dd47ed83e51fbde7f24b2baa43
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
second commit
do not clobber $Dollar signs
ok 3 - --log=1 limits shortlog length
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5525-fetch-tagopt.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5525-fetch-tagopt/.git/
expecting success:
test_commit test &&
setup_clone one &&
git config remote.remote_one.tagopt --no-tags &&
setup_clone two &&
git config remote.remote_two.tagopt --tags
[master (root-commit) 14f901a] test
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 test.t
Cloning into bare repository 'one'...
done.
Branch 'branch_one' set up to track remote branch 'master' from 'origin'.
Cloning into bare repository 'two'...
done.
Branch 'branch_two' set up to track remote branch 'master' from 'origin'.
ok 1 - setup
expecting success:
git fetch remote_one &&
test_must_fail git show-ref tag_one &&
git show-ref remote_one/branch_one
From one
* [new branch] branch_one -> remote_one/branch_one
* [new branch] master -> remote_one/master
14f901a95ebae912feb4805f40ef68f15b0192c2 refs/remotes/remote_one/branch_one
ok 2 - fetch with tagopt=--no-tags does not get tag
expecting success:
(
cd one &&
git branch second_branch_one
) &&
git fetch --tags remote_one &&
git show-ref tag_one &&
git show-ref remote_one/second_branch_one
Branch 'second_branch_one' set up to track remote branch 'master' from 'origin'.
From one
* [new branch] second_branch_one -> remote_one/second_branch_one
* [new tag] tag_one -> tag_one
14f901a95ebae912feb4805f40ef68f15b0192c2 refs/tags/tag_one
14f901a95ebae912feb4805f40ef68f15b0192c2 refs/remotes/remote_one/second_branch_one
ok 3 - fetch --tags with tagopt=--no-tags gets tag
expecting success:
git fetch --no-tags remote_two &&
test_must_fail git show-ref tag_two &&
git show-ref remote_two/branch_two
From two
* [new branch] branch_two -> remote_two/branch_two
* [new branch] master -> remote_two/master
14f901a95ebae912feb4805f40ef68f15b0192c2 refs/remotes/remote_two/branch_two
ok 4 - fetch --no-tags with tagopt=--tags does not get tag
expecting success:
(
cd two &&
git branch second_branch_two
) &&
git fetch remote_two &&
git show-ref tag_two &&
git show-ref remote_two/second_branch_two
Branch 'second_branch_two' set up to track remote branch 'master' from 'origin'.
From two
* [new branch] second_branch_two -> remote_two/second_branch_two
* [new tag] tag_two -> tag_two
14f901a95ebae912feb4805f40ef68f15b0192c2 refs/tags/tag_two
14f901a95ebae912feb4805f40ef68f15b0192c2 refs/remotes/remote_two/second_branch_two
ok 5 - fetch with tagopt=--tags gets tag
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5520-pull.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5520-pull/.git/
expecting success:
echo file >file &&
git add file &&
git commit -a -m original
[master (root-commit) 493bace] original
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 1 - setup
expecting success:
git init cloned &&
(
cd cloned &&
git pull ..
) &&
test -f file &&
test -f cloned/file &&
test_cmp file cloned/file
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5520-pull/cloned/.git/
From ..
* branch HEAD -> FETCH_HEAD
ok 2 - pulling into void
expecting success:
git init cloned-uho &&
(
cd cloned-uho &&
git pull .. master:master
) &&
test -f file &&
test -f cloned-uho/file &&
test_cmp file cloned-uho/file
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5520-pull/cloned-uho/.git/
From ..
* [new branch] master -> master
ok 3 - pulling into void using master:master
expecting success:
git init cloned-untracked &&
(
cd cloned-untracked &&
echo untracked >file &&
test_must_fail git pull .. master &&
echo untracked >expect &&
test_cmp expect file
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5520-pull/cloned-untracked/.git/
From ..
* branch master -> FETCH_HEAD
error: The following untracked working tree files would be overwritten by merge:
file
Please move or remove them before you merge.
Aborting
ok 4 - pulling into void does not overwrite untracked files
expecting success:
git init cloned-staged-colliding &&
(
cd cloned-staged-colliding &&
echo "alternate content" >file &&
git add file &&
test_must_fail git pull .. master &&
echo "alternate content" >expect &&
test_cmp expect file &&
git cat-file blob :file >file.index &&
test_cmp expect file.index
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5520-pull/cloned-staged-colliding/.git/
From ..
* branch master -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by merge:
file
Please commit your changes or stash them before you merge.
Aborting
ok 5 - pulling into void does not overwrite staged files
expecting success:
git init cloned-staged-new &&
(
cd cloned-staged-new &&
echo "new tracked file" >newfile &&
git add newfile &&
git pull .. master &&
echo "new tracked file" >expect &&
test_cmp expect newfile &&
git cat-file blob :newfile >newfile.index &&
test_cmp expect newfile.index
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5520-pull/cloned-staged-new/.git/
From ..
* branch master -> FETCH_HEAD
ok 6 - pulling into void does not remove new staged files
expecting success:
git init cloned-octopus &&
(
cd cloned-octopus &&
test_must_fail git pull .. master master &&
! test -f file
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5520-pull/cloned-octopus/.git/
From ..
* branch master -> FETCH_HEAD
* branch master -> FETCH_HEAD
fatal: Cannot merge multiple branches into empty head.
ok 7 - pulling into void must not create an octopus
expecting success:
git branch copy master &&
git config branch.copy.remote . &&
git config branch.copy.merge refs/heads/master &&
echo updated >file &&
git commit -a -m updated &&
git checkout copy &&
test "$(cat file)" = file &&
git pull &&
test "$(cat file)" = updated &&
git reflog -1 >reflog.actual &&
sed "s/^[0-9a-f][0-9a-f]*/OBJID/" reflog.actual >reflog.fuzzy &&
echo "OBJID HEAD@{0}: pull: Fast-forward" >reflog.expected &&
test_cmp reflog.expected reflog.fuzzy
[master f1d45ec] updated
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'copy'
Your branch is behind 'master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
From .
* branch master -> FETCH_HEAD
Updating 493bace..f1d45ec
Fast-forward
file | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ok 8 - test . as a remote
expecting success:
git checkout -b second master^ &&
echo modified >file &&
git commit -a -m modified &&
git checkout copy &&
git reset --hard HEAD^ &&
test "$(cat file)" = file &&
git pull . second &&
test "$(cat file)" = modified &&
git reflog -1 >reflog.actual &&
sed "s/^[0-9a-f][0-9a-f]*/OBJID/" reflog.actual >reflog.fuzzy &&
echo "OBJID HEAD@{0}: pull . second: Fast-forward" >reflog.expected &&
test_cmp reflog.expected reflog.fuzzy
Switched to a new branch 'second'
[second 3a88a4d] modified
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'copy'
Your branch is up to date with 'master'.
HEAD is now at 493bace original
From .
* branch second -> FETCH_HEAD
Updating 493bace..3a88a4d
Fast-forward
file | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ok 9 - the default remote . should not break explicit pull
expecting success:
git checkout -b test copy^ &&
test_when_finished "git checkout -f copy && git branch -D test" &&
test "$(cat file)" = file &&
test_must_fail git pull . "refs/nonexisting1/*:refs/nonexisting2/*" 2>err &&
test_i18ngrep "no candidates for merging" err &&
test "$(cat file)" = file
Switched to a new branch 'test'
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
There are no candidates for merging among the refs that you just fetched.
Switched to branch 'copy'
Your branch and 'master' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Deleted branch test (was 493bace).
ok 10 - fail if wildcard spec does not match any refs
expecting success:
git remote add test_remote . &&
test_when_finished "git remote remove test_remote" &&
git checkout -b test copy^ &&
test_when_finished "git checkout -f copy && git branch -D test" &&
test "$(cat file)" = file &&
test_config branch.test.remote origin &&
test_must_fail git pull test_remote 2>err &&
test_i18ngrep "specify a branch on the command line" err &&
test "$(cat file)" = file
Switched to a new branch 'test'
for your current branch, you must specify a branch on the command line.
Switched to branch 'copy'
Your branch and 'master' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Deleted branch test (was 493bace).
ok 11 - fail if no branches specified with non-default remote
expecting success:
git remote add origin . &&
test_when_finished "git remote remove origin" &&
git checkout HEAD^ &&
test_when_finished "git checkout -f copy" &&
test "$(cat file)" = file &&
test_must_fail git pull 2>err &&
test_i18ngrep "not currently on a branch" err &&
test "$(cat file)" = file
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 493bace original
You are not currently on a branch.
Previous HEAD position was 493bace original
Switched to branch 'copy'
Your branch and 'master' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
ok 12 - fail if not on a branch
expecting success:
git remote add test_remote . &&
test_when_finished "git remote remove test_remote" &&
git checkout -b test copy^ &&
test_when_finished "git checkout -f copy && git branch -D test" &&
test_config branch.test.remote test_remote &&
test "$(cat file)" = file &&
test_must_fail git pull 2>err &&
test_i18ngrep "no tracking information" err &&
test "$(cat file)" = file
Switched to a new branch 'test'
There is no tracking information for the current branch.
Switched to branch 'copy'
Your branch and 'master' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Deleted branch test (was 493bace).
ok 13 - fail if no configuration for current branch
expecting success:
git remote add test_remote . &&
test_when_finished "git remote remove test_remote" &&
git checkout -b test copy^ &&
test_when_finished "git checkout -f copy && git branch -D test" &&
test_config branch.test.remote test_remote &&
test "$(cat file)" = file &&
test_must_fail git pull --all 2>err &&
test_i18ngrep "There is no tracking information" err &&
test "$(cat file)" = file
Switched to a new branch 'test'
Fetching test_remote
There is no tracking information for the current branch.
Switched to branch 'copy'
Your branch and 'master' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Deleted branch test (was 493bace).
ok 14 - pull --all: fail if no configuration for current branch
expecting success:
git checkout -b test copy^ &&
test_when_finished "git checkout -f copy && git branch -D test" &&
test_config branch.test.remote . &&
test_config branch.test.merge refs/heads/nonexisting &&
test "$(cat file)" = file &&
test_must_fail git pull 2>err &&
test_i18ngrep "no such ref was fetched" err &&
test "$(cat file)" = file
Switched to a new branch 'test'
from the remote, but no such ref was fetched.
Switched to branch 'copy'
Your branch and 'master' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Deleted branch test (was 493bace).
ok 15 - fail if upstream branch does not exist
expecting success:
git checkout -b third second^ &&
test_when_finished "git checkout -f copy && git branch -D third" &&
test "$(cat file)" = file &&
test_commit modified2 file &&
test -z "$(git ls-files -u)" &&
test_must_fail git pull . second &&
test -n "$(git ls-files -u)" &&
cp file expected &&
test_must_fail git pull . second 2>err &&
test_i18ngrep "Pulling is not possible because you have unmerged files." err &&
test_cmp expected file &&
git add file &&
test -z "$(git ls-files -u)" &&
test_must_fail git pull . second 2>err &&
test_i18ngrep "You have not concluded your merge" err &&
test_cmp expected file
Switched to a new branch 'third'
[third 3b4b382] modified2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
From .
* branch second -> FETCH_HEAD
Merging:
3b4b382 modified2
virtual 3a88a4d6a2adbd0445097643d45c95b45a2249ff
found 1 common ancestor:
493bace original
Auto-merging file
CONFLICT (content): Merge conflict in file
Automatic merge failed; fix conflicts and then commit the result.
error: Pulling is not possible because you have unmerged files.
error: You have not concluded your merge (MERGE_HEAD exists).
Switched to branch 'copy'
Your branch and 'master' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Deleted branch third (was 3b4b382).
ok 16 - fail if the index has unresolved entries
expecting success:
git checkout -b third second^ &&
test_when_finished "git checkout -f copy && git branch -D third" &&
test "$(cat file)" = file &&
git pull . second:third 2>err &&
test_i18ngrep "fetch updated the current branch head" err &&
test "$(cat file)" = modified &&
test "$(git rev-parse third)" = "$(git rev-parse second)"
Switched to a new branch 'third'
Already up to date.
warning: fetch updated the current branch head.
Switched to branch 'copy'
Your branch and 'master' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Deleted branch third (was 3a88a4d).
ok 17 - fast-forwards working tree if branch head is updated
expecting success:
git checkout -b third second^ &&
test_when_finished "git checkout -f copy && git branch -D third" &&
test "$(cat file)" = file &&
echo conflict >file &&
test_must_fail git pull . second:third 2>err &&
test_i18ngrep "Cannot fast-forward your working tree" err &&
test "$(cat file)" = conflict &&
test "$(git rev-parse third)" = "$(git rev-parse second)"
Switched to a new branch 'third'
fatal: Cannot fast-forward your working tree.
Switched to branch 'copy'
Your branch and 'master' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Deleted branch third (was 3a88a4d).
ok 18 - fast-forward fails with conflicting work tree
expecting success:
git branch to-rebase &&
echo modified again > file &&
git commit -m file file &&
git checkout to-rebase &&
echo new > file2 &&
git add file2 &&
git commit -m "new file" &&
git tag before-rebase &&
git pull --rebase . copy &&
test "$(git rev-parse HEAD^)" = "$(git rev-parse copy)" &&
test new = "$(git show HEAD:file2)"
[copy 74d53fd] file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'to-rebase'
[to-rebase f5be0bf] new file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
From .
* branch copy -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
Applying: new file
ok 19 - --rebase
expecting success:
git reset --hard before-rebase &&
git checkout -b ff &&
echo another modification >file &&
git commit -m third file &&
git checkout to-rebase &&
git pull --rebase . ff &&
test "$(git rev-parse HEAD)" = "$(git rev-parse ff)" &&
# The above only validates the result. Did we actually bypass rebase?
git reflog -1 >reflog.actual &&
sed "s/^[0-9a-f][0-9a-f]*/OBJID/" reflog.actual >reflog.fuzzy &&
echo "OBJID HEAD@{0}: pull --rebase . ff: Fast-forward" >reflog.expected &&
test_cmp reflog.expected reflog.fuzzy
HEAD is now at f5be0bf new file
Switched to a new branch 'ff'
[ff 51a971f] third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'to-rebase'
From .
* branch ff -> FETCH_HEAD
Updating f5be0bf..51a971f
Fast-forward
file | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Current branch to-rebase is up to date.
ok 20 - --rebase fast forward
expecting success:
test_when_finished "
git reset --hard
git checkout to-rebase
git branch -D to-rebase-ff
git branch -D behind" &&
git branch behind &&
git checkout -b to-rebase-ff &&
echo another modification >>file &&
git add file &&
git commit -m mod &&
git checkout behind &&
echo dirty >file &&
git pull --rebase --autostash . to-rebase-ff &&
test "$(git rev-parse HEAD)" = "$(git rev-parse to-rebase-ff)"
Switched to a new branch 'to-rebase-ff'
[to-rebase-ff 70a0cc8] mod
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'behind'
From .
* branch to-rebase-ff -> FETCH_HEAD
Created autostash: 41933db
HEAD is now at 51a971f third
First, rewinding head to replay your work on top of it...
Fast-forwarded behind to 70a0cc8b0d596c401107c38c45bdd3f285f8d276.
Applying autostash resulted in conflicts.
Your changes are safe in the stash.
You can run "git stash pop" or "git stash drop" at any time.
HEAD is now at 70a0cc8 mod
Switched to branch 'to-rebase'
Deleted branch to-rebase-ff (was 70a0cc8).
Deleted branch behind (was 70a0cc8).
ok 21 - --rebase --autostash fast forward
expecting success:
test_when_finished "git rebase --abort; git checkout -f to-rebase" &&
git checkout -b seq &&
test_seq 5 >seq.txt &&
git add seq.txt &&
test_tick &&
git commit -m "Add seq.txt" &&
echo 6 >>seq.txt &&
test_tick &&
git commit -m "Append to seq.txt" seq.txt &&
git checkout -b with-conflicts HEAD^ &&
echo conflicting >>seq.txt &&
test_tick &&
git commit -m "Create conflict" seq.txt &&
test_must_fail git pull --rebase . seq 2>err >out &&
test_i18ngrep "Resolve all conflicts manually" out
Switched to a new branch 'seq'
[seq 1a03150] Add seq.txt
Author: A U Thor <author@example.com>
1 file changed, 5 insertions(+)
create mode 100644 seq.txt
[seq ddb257c] Append to seq.txt
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to a new branch 'with-conflicts'
[with-conflicts 7f698a4] Create conflict
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Resolve all conflicts manually, mark them as resolved with
Switched to branch 'to-rebase'
ok 22 - --rebase with conflicts shows advice
expecting success:
test_when_finished "git rebase --abort; git checkout -f to-rebase" &&
git checkout -b diverging &&
test_commit attributes .gitattributes "* text=auto" attrs &&
sha1="$(printf "1\\r\\n" | git hash-object -w --stdin)" &&
git update-index --cacheinfo 0644 $sha1 file &&
git commit -m v1-with-cr &&
# force checkout because `git reset --hard` will not leave clean `file`
git checkout -f -b fails-to-rebase HEAD^ &&
test_commit v2-without-cr file "2" file2-lf &&
test_must_fail git pull --rebase . diverging 2>err >out &&
test_i18ngrep "Resolve all conflicts manually" out
Switched to a new branch 'diverging'
[diverging 52b7102] attributes
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 .gitattributes
[diverging 1c4005c] v1-with-cr
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'fails-to-rebase'
[fails-to-rebase a6e69d4] v2-without-cr
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Resolve all conflicts manually, mark them as resolved with
Switched to branch 'to-rebase'
ok 23 - failed --rebase shows advice
expecting success:
git reset --hard before-rebase &&
test_must_fail git pull --rebase . copy master 2>err &&
test "$(git rev-parse HEAD)" = "$(git rev-parse before-rebase)" &&
test_i18ngrep "Cannot rebase onto multiple branches" err &&
test modified = "$(git show HEAD:file)"
HEAD is now at f5be0bf new file
fatal: Cannot rebase onto multiple branches.
ok 24 - --rebase fails with multiple branches
expecting success:
test_config rebase.autostash true &&
test_pull_autostash --rebase
HEAD is now at f5be0bf new file
From .
* branch copy -> FETCH_HEAD
Created autostash: 395cd77
HEAD is now at f5be0bf new file
First, rewinding head to replay your work on top of it...
Applying: new file
Applied autostash.
ok 25 - pull --rebase succeeds with dirty working directory and rebase.autostash set
expecting success:
test_config rebase.autostash true &&
test_pull_autostash --rebase --autostash
HEAD is now at f5be0bf new file
From .
* branch copy -> FETCH_HEAD
Created autostash: 395cd77
HEAD is now at f5be0bf new file
First, rewinding head to replay your work on top of it...
Applying: new file
Applied autostash.
ok 26 - pull --rebase --autostash & rebase.autostash=true
expecting success:
test_config rebase.autostash false &&
test_pull_autostash --rebase --autostash
HEAD is now at f5be0bf new file
From .
* branch copy -> FETCH_HEAD
Created autostash: 395cd77
HEAD is now at f5be0bf new file
First, rewinding head to replay your work on top of it...
Applying: new file
Applied autostash.
ok 27 - pull --rebase --autostash & rebase.autostash=false
expecting success:
test_unconfig rebase.autostash &&
test_pull_autostash --rebase --autostash
HEAD is now at f5be0bf new file
From .
* branch copy -> FETCH_HEAD
Created autostash: 395cd77
HEAD is now at f5be0bf new file
First, rewinding head to replay your work on top of it...
Applying: new file
Applied autostash.
ok 28 - pull --rebase --autostash & rebase.autostash unset
expecting success:
test_config rebase.autostash true &&
test_pull_autostash_fail --rebase --no-autostash
HEAD is now at f5be0bf new file
error: cannot pull with rebase: Your index contains uncommitted changes.
ok 29 - pull --rebase --no-autostash & rebase.autostash=true
expecting success:
test_config rebase.autostash false &&
test_pull_autostash_fail --rebase --no-autostash
HEAD is now at f5be0bf new file
error: cannot pull with rebase: Your index contains uncommitted changes.
ok 30 - pull --rebase --no-autostash & rebase.autostash=false
expecting success:
test_unconfig rebase.autostash &&
test_pull_autostash_fail --rebase --no-autostash
HEAD is now at f5be0bf new file
error: cannot pull with rebase: Your index contains uncommitted changes.
ok 31 - pull --rebase --no-autostash & rebase.autostash unset
expecting success:
test_must_fail git pull $i . copy 2>err &&
test_i18ngrep "only valid with --rebase" err
fatal: --[no-]autostash option is only valid with --rebase.
ok 32 - pull --autostash (without --rebase) is illegal
expecting success:
test_must_fail git pull $i . copy 2>err &&
test_i18ngrep "only valid with --rebase" err
fatal: --[no-]autostash option is only valid with --rebase.
ok 33 - pull --no-autostash (without --rebase) is illegal
expecting success:
git reset --hard before-rebase &&
test_config pull.rebase true &&
git pull . copy &&
test "$(git rev-parse HEAD^)" = "$(git rev-parse copy)" &&
test new = "$(git show HEAD:file2)"
HEAD is now at f5be0bf new file
From .
* branch copy -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
Applying: new file
ok 34 - pull.rebase
expecting success:
test_config pull.rebase true &&
test_pull_autostash --autostash
HEAD is now at f5be0bf new file
From .
* branch copy -> FETCH_HEAD
Created autostash: 395cd77
HEAD is now at f5be0bf new file
First, rewinding head to replay your work on top of it...
Applying: new file
Applied autostash.
ok 35 - pull --autostash & pull.rebase=true
expecting success:
test_config pull.rebase true &&
test_pull_autostash_fail --no-autostash
HEAD is now at f5be0bf new file
error: cannot pull with rebase: Your index contains uncommitted changes.
ok 36 - pull --no-autostash & pull.rebase=true
expecting success:
git reset --hard before-rebase &&
test_config branch.to-rebase.rebase true &&
git pull . copy &&
test "$(git rev-parse HEAD^)" = "$(git rev-parse copy)" &&
test new = "$(git show HEAD:file2)"
HEAD is now at f5be0bf new file
From .
* branch copy -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
Applying: new file
ok 37 - branch.to-rebase.rebase
expecting success:
git reset --hard before-rebase &&
test_config pull.rebase true &&
test_config branch.to-rebase.rebase false &&
git pull . copy &&
test "$(git rev-parse HEAD^)" != "$(git rev-parse copy)" &&
test new = "$(git show HEAD:file2)"
HEAD is now at f5be0bf new file
From .
* branch copy -> FETCH_HEAD
Merging:
f5be0bf new file
virtual 74d53fd83ab6a99a57fc42f6654fa24cd84b90b2
found 1 common ancestor:
3a88a4d modified
Merge made by the 'recursive' strategy.
file | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ok 38 - branch.to-rebase.rebase should override pull.rebase
expecting success:
git reset --hard before-rebase &&
git pull --rebase --verify-signatures . copy 2>err &&
test "$(git rev-parse HEAD^)" = "$(git rev-parse copy)" &&
test new = "$(git show HEAD:file2)" &&
test_i18ngrep "ignoring --verify-signatures for rebase" err
HEAD is now at f5be0bf new file
First, rewinding head to replay your work on top of it...
Applying: new file
warning: ignoring --verify-signatures for rebase
ok 39 - pull --rebase warns on --verify-signatures
expecting success:
git reset --hard before-rebase &&
git pull --rebase --no-verify-signatures . copy 2>err &&
test "$(git rev-parse HEAD^)" = "$(git rev-parse copy)" &&
test new = "$(git show HEAD:file2)" &&
test_i18ngrep ! "verify-signatures" err
HEAD is now at f5be0bf new file
First, rewinding head to replay your work on top of it...
Applying: new file
ok 40 - pull --rebase does not warn on --no-verify-signatures
expecting success:
git reset --hard before-rebase &&
git checkout -b keep-merge second^ &&
test_commit file3 &&
git checkout to-rebase &&
git merge keep-merge &&
git tag before-preserve-rebase
HEAD is now at f5be0bf new file
Switched to a new branch 'keep-merge'
[keep-merge 719612d] file3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3.t
Switched to branch 'to-rebase'
Merging:
f5be0bf new file
virtual keep-merge
found 1 common ancestor:
493bace original
Merge made by the 'recursive' strategy.
file3.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 file3.t
ok 41 - preserve merge setup
expecting success:
git reset --hard before-preserve-rebase &&
test_config pull.rebase false &&
git pull . copy &&
test "$(git rev-parse HEAD^1)" = "$(git rev-parse before-preserve-rebase)" &&
test "$(git rev-parse HEAD^2)" = "$(git rev-parse copy)" &&
test file3 = "$(git show HEAD:file3.t)"
HEAD is now at a28bb2c Merge branch 'keep-merge' into to-rebase
From .
* branch copy -> FETCH_HEAD
Merging:
a28bb2c Merge branch 'keep-merge' into to-rebase
virtual 74d53fd83ab6a99a57fc42f6654fa24cd84b90b2
found 1 common ancestor:
3a88a4d modified
Merge made by the 'recursive' strategy.
file | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ok 42 - pull.rebase=false create a new merge commit
expecting success:
git reset --hard before-preserve-rebase &&
test_config pull.rebase true &&
git pull . copy &&
test "$(git rev-parse HEAD^^)" = "$(git rev-parse copy)" &&
test file3 = "$(git show HEAD:file3.t)"
HEAD is now at a28bb2c Merge branch 'keep-merge' into to-rebase
From .
* branch copy -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
Applying: new file
Applying: file3
ok 43 - pull.rebase=true flattens keep-merge
expecting success:
git reset --hard before-preserve-rebase &&
test_config pull.rebase 1 &&
git pull . copy &&
test "$(git rev-parse HEAD^^)" = "$(git rev-parse copy)" &&
test file3 = "$(git show HEAD:file3.t)"
HEAD is now at a28bb2c Merge branch 'keep-merge' into to-rebase
From .
* branch copy -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
Applying: new file
Applying: file3
ok 44 - pull.rebase=1 is treated as true and flattens keep-merge
checking prerequisite: REBASE_P
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test -z "$GIT_TEST_SKIP_REBASE_P"
)
prerequisite REBASE_P ok
expecting success:
git reset --hard before-preserve-rebase &&
test_config pull.rebase preserve &&
git pull . copy &&
test "$(git rev-parse HEAD^^)" = "$(git rev-parse copy)" &&
test "$(git rev-parse HEAD^2)" = "$(git rev-parse keep-merge)"
HEAD is now at a28bb2c Merge branch 'keep-merge' into to-rebase
From .
* branch copy -> FETCH_HEAD
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/to-rebase.
ok 45 - pull.rebase=preserve rebases and merges keep-merge
expecting success:
write_script "$TRASH_DIRECTORY/fake-editor" <<-\EOF &&
echo I was here >fake.out &&
false
EOF
test_set_editor "$TRASH_DIRECTORY/fake-editor" &&
test_when_finished "test_might_fail git rebase --abort" &&
test_must_fail git pull --rebase=interactive . copy &&
test "I was here" = "$(cat fake.out)"
From .
* branch copy -> FETCH_HEAD
error: There was a problem with the editor '"$FAKE_EDITOR"'.
fatal: No rebase in progress?
ok 46 - pull.rebase=interactive
expecting success:
write_script "$TRASH_DIRECTORY/fake-editor" <<-\EOF &&
echo I was here, too >fake.out &&
false
EOF
test_set_editor "$TRASH_DIRECTORY/fake-editor" &&
test_when_finished "test_might_fail git rebase --abort" &&
test_must_fail git pull --rebase=i . copy &&
test "I was here, too" = "$(cat fake.out)"
From .
* branch copy -> FETCH_HEAD
error: There was a problem with the editor '"$FAKE_EDITOR"'.
fatal: No rebase in progress?
ok 47 - pull --rebase=i
expecting success:
git reset --hard before-preserve-rebase &&
test_config pull.rebase invalid &&
! git pull . copy
HEAD is now at a28bb2c Merge branch 'keep-merge' into to-rebase
fatal: Invalid value for pull.rebase: invalid
ok 48 - pull.rebase=invalid fails
expecting success:
git reset --hard before-preserve-rebase &&
test_config pull.rebase true &&
git pull --rebase=false . copy &&
test "$(git rev-parse HEAD^1)" = "$(git rev-parse before-preserve-rebase)" &&
test "$(git rev-parse HEAD^2)" = "$(git rev-parse copy)" &&
test file3 = "$(git show HEAD:file3.t)"
HEAD is now at a28bb2c Merge branch 'keep-merge' into to-rebase
From .
* branch copy -> FETCH_HEAD
Merging:
a28bb2c Merge branch 'keep-merge' into to-rebase
virtual 74d53fd83ab6a99a57fc42f6654fa24cd84b90b2
found 1 common ancestor:
3a88a4d modified
Merge made by the 'recursive' strategy.
file | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ok 49 - --rebase=false create a new merge commit
expecting success:
git reset --hard before-preserve-rebase &&
test_config pull.rebase preserve &&
git pull --rebase=true . copy &&
test "$(git rev-parse HEAD^^)" = "$(git rev-parse copy)" &&
test file3 = "$(git show HEAD:file3.t)"
HEAD is now at a28bb2c Merge branch 'keep-merge' into to-rebase
From .
* branch copy -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
Applying: new file
Applying: file3
ok 50 - --rebase=true rebases and flattens keep-merge
expecting success:
git reset --hard before-preserve-rebase &&
test_config pull.rebase true &&
git pull --rebase=preserve . copy &&
test "$(git rev-parse HEAD^^)" = "$(git rev-parse copy)" &&
test "$(git rev-parse HEAD^2)" = "$(git rev-parse keep-merge)"
HEAD is now at a28bb2c Merge branch 'keep-merge' into to-rebase
From .
* branch copy -> FETCH_HEAD
warning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.
Rebasing (1/2)
Rebasing (2/2)
Successfully rebased and updated refs/heads/to-rebase.
ok 51 - --rebase=preserve rebases and merges keep-merge
expecting success:
git reset --hard before-preserve-rebase &&
! git pull --rebase=invalid . copy
HEAD is now at a28bb2c Merge branch 'keep-merge' into to-rebase
error: Invalid value for --rebase: invalid
ok 52 - --rebase=invalid fails
expecting success:
git reset --hard before-preserve-rebase &&
test_config pull.rebase preserve &&
git pull --rebase . copy &&
test "$(git rev-parse HEAD^^)" = "$(git rev-parse copy)" &&
test file3 = "$(git show HEAD:file3.t)"
HEAD is now at a28bb2c Merge branch 'keep-merge' into to-rebase
From .
* branch copy -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
Applying: new file
Applying: file3
ok 53 - --rebase overrides pull.rebase=preserve and flattens keep-merge
expecting success:
git remote add -f me . &&
git checkout copy &&
git tag copy-orig &&
git reset --hard HEAD^ &&
echo conflicting modification > file &&
git commit -m conflict file &&
git checkout to-rebase &&
echo file > file2 &&
git commit -m to-rebase file2 &&
git tag to-rebase-orig &&
git pull --rebase me copy &&
test "conflicting modification" = "$(cat file)" &&
test file = "$(cat file2)"
Updating me
From .
* [new branch] copy -> me/copy
* [new branch] diverging -> me/diverging
* [new branch] fails-to-rebase -> me/fails-to-rebase
* [new branch] ff -> me/ff
* [new branch] keep-merge -> me/keep-merge
* [new branch] master -> me/master
* [new branch] second -> me/second
* [new branch] seq -> me/seq
* [new branch] to-rebase -> me/to-rebase
* [new branch] with-conflicts -> me/with-conflicts
Switched to branch 'copy'
Your branch and 'master' have diverged,
and have 2 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
HEAD is now at 3a88a4d modified
[copy 447ac6c] conflict
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'to-rebase'
[to-rebase 3f0a23a] to-rebase
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
From .
* branch copy -> FETCH_HEAD
+ 74d53fd...447ac6c copy -> me/copy (forced update)
First, rewinding head to replay your work on top of it...
Applying: new file
Applying: file3
Applying: to-rebase
ok 54 - --rebase with rebased upstream
expecting success:
test_when_finished "test_might_fail git rebase --abort" &&
git reset --hard to-rebase-orig &&
git pull --rebase -f me copy &&
test "conflicting modification" = "$(cat file)" &&
test file = "$(cat file2)"
HEAD is now at 3f0a23a to-rebase
From .
* branch copy -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
Applying: new file
Applying: file3
Applying: to-rebase
fatal: No rebase in progress?
ok 55 - --rebase -f with rebased upstream
expecting success:
git update-ref refs/remotes/me/copy copy-orig &&
git checkout --track -b to-rebase2 me/copy &&
git reset --hard to-rebase-orig &&
git pull --rebase &&
test "conflicting modification" = "$(cat file)" &&
test file = "$(cat file2)"
Switched to a new branch 'to-rebase2'
Branch 'to-rebase2' set up to track remote branch 'copy' from 'me'.
HEAD is now at 3f0a23a to-rebase
From .
+ 74d53fd...447ac6c copy -> me/copy (forced update)
+ de1e4cc...c254b28 to-rebase -> me/to-rebase (forced update)
* [new branch] to-rebase2 -> me/to-rebase2
First, rewinding head to replay your work on top of it...
Applying: new file
Applying: file3
Applying: to-rebase
ok 56 - --rebase with rebased default upstream
expecting success:
git update-ref refs/remotes/me/copy copy-orig &&
git reset --hard to-rebase-orig &&
git checkout --track -b to-rebase3 me/copy &&
git reset --hard to-rebase-orig &&
git fetch &&
git pull --rebase &&
test "conflicting modification" = "$(cat file)" &&
test file = "$(cat file2)"
HEAD is now at 3f0a23a to-rebase
Switched to a new branch 'to-rebase3'
Branch 'to-rebase3' set up to track remote branch 'copy' from 'me'.
HEAD is now at 3f0a23a to-rebase
From .
+ 74d53fd...447ac6c copy -> me/copy (forced update)
* [new branch] to-rebase3 -> me/to-rebase3
First, rewinding head to replay your work on top of it...
Applying: new file
Applying: file3
Applying: to-rebase
ok 57 - rebased upstream + fetch + pull --rebase
expecting success:
git checkout to-rebase &&
git update-ref refs/remotes/me/copy copy^ &&
COPY="$(git rev-parse --verify me/copy)" &&
git rebase --onto $COPY copy &&
test_config branch.to-rebase.remote me &&
test_config branch.to-rebase.merge refs/heads/copy &&
test_config branch.to-rebase.rebase true &&
echo dirty >> file &&
git add file &&
test_must_fail git pull &&
test "$COPY" = "$(git rev-parse --verify me/copy)" &&
git checkout HEAD -- file &&
git pull &&
test "$COPY" != "$(git rev-parse --verify me/copy)"
Switched to branch 'to-rebase'
First, rewinding head to replay your work on top of it...
Applying: new file
Applying: file3
Applying: to-rebase
error: cannot pull with rebase: Your index contains uncommitted changes.
error: please commit or stash them.
From .
3a88a4d..447ac6c copy -> me/copy
+ c254b28...caa61a1 to-rebase -> me/to-rebase (forced update)
+ 3f0a23a...c254b28 to-rebase3 -> me/to-rebase3 (forced update)
First, rewinding head to replay your work on top of it...
Applying: new file
Applying: file3
Applying: to-rebase
ok 58 - pull --rebase dies early with dirty working directory
expecting success:
git rev-parse master >expect &&
mkdir empty_repo &&
(cd empty_repo &&
git init &&
git pull --rebase .. master &&
git rev-parse HEAD >../actual
) &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5520-pull/empty_repo/.git/
From ..
* branch master -> FETCH_HEAD
ok 59 - pull --rebase works on branch yet to be born
expecting success:
test_when_finished "rm -rf empty_repo2" &&
git init empty_repo2 &&
(
cd empty_repo2 &&
echo staged-file >staged-file &&
git add staged-file &&
test "$(git ls-files)" = staged-file &&
test_must_fail git pull --rebase .. master 2>err &&
test "$(git ls-files)" = staged-file &&
test "$(git show :staged-file)" = staged-file &&
test_i18ngrep "unborn branch with changes added to the index" err
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5520-pull/empty_repo2/.git/
fatal: Updating an unborn branch with changes added to the index.
ok 60 - pull --rebase fails on unborn branch with staged changes
expecting success:
test_when_finished "rm -rf corrupt" &&
git init corrupt &&
(
cd corrupt &&
test_commit one &&
obj=$(git rev-parse --verify HEAD | sed "s#^..#&/#") &&
rm -f .git/objects/$obj &&
test_must_fail git pull --rebase
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5520-pull/corrupt/.git/
[master (root-commit) d944c64] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
error: cannot pull with rebase: Your index contains uncommitted changes.
error: please commit or stash them.
ok 61 - pull --rebase fails on corrupt HEAD
expecting success:
mkdir src &&
(cd src &&
git init &&
printf "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n" > stuff &&
git add stuff &&
git commit -m "Initial revision"
) &&
git clone src dst &&
(cd src &&
modify s/5/43/ stuff &&
git commit -a -m "5->43" &&
modify s/6/42/ stuff &&
git commit -a -m "Make it bigger"
) &&
(cd dst &&
modify s/5/43/ stuff &&
git commit -a -m "Independent discovery of 5->43"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5520-pull/src/.git/
[master (root-commit) bd1c84a] Initial revision
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 stuff
Cloning into 'dst'...
done.
[master c0a2a33] 5->43
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 5004a46] Make it bigger
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 60bf00b] Independent discovery of 5->43
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 62 - setup for detecting upstreamed changes
expecting success:
(cd dst &&
git pull --rebase &&
test -z "$(git ls-files -u)"
)
From /<<PKGBUILDDIR>>/t/trash directory.t5520-pull/src
bd1c84a..5004a46 master -> origin/master
First, rewinding head to replay your work on top of it...
ok 63 - git pull --rebase detects upstreamed changes
expecting success:
(cd dst &&
test_might_fail git rebase --abort &&
git reset --hard origin/master
) &&
git clone --bare src src-replace.git &&
rm -rf src &&
mv src-replace.git src &&
(cd dst &&
modify s/2/22/ stuff &&
git commit -a -m "Change 2" &&
modify s/3/33/ stuff &&
git commit -a -m "Change 3" &&
modify s/4/44/ stuff &&
git commit -a -m "Change 4" &&
git push &&
modify s/44/55/ stuff &&
git commit --amend -a -m "Modified Change 4"
)
fatal: No rebase in progress?
HEAD is now at 5004a46 Make it bigger
Cloning into bare repository 'src-replace.git'...
done.
[master 6561203] Change 2
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+), 2 deletions(-)
[master e842a0a] Change 3
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+), 2 deletions(-)
[master a5ed940] Change 4
Author: A U Thor <author@example.com>
1 file changed, 3 insertions(+), 3 deletions(-)
To /<<PKGBUILDDIR>>/t/trash directory.t5520-pull/src
5004a46..a5ed940 master -> master
[master 711c2d7] Modified Change 4
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:19:13 2005 -0700
1 file changed, 3 insertions(+), 3 deletions(-)
ok 64 - setup for avoiding reapplying old patches
expecting success:
(cd dst &&
test_must_fail git pull --rebase &&
test 1 = $(find .git/rebase-apply -name "000*" | wc -l)
)
First, rewinding head to replay your work on top of it...
Applying: Modified Change 4
Using index info to reconstruct a base tree...
M stuff
Falling back to patching base and 3-way merge...
Merging:
a5ed940 Change 4
virtual Modified Change 4
found 1 common ancestor:
virtual e369e858ec1aa73d497d02c4f23e5cf4ae2d3c3b
Auto-merging stuff
CONFLICT (content): Merge conflict in stuff
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 Modified Change 4
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
ok 65 - git pull --rebase does not reapply old patches
expecting success:
git checkout -b copy2 to-rebase-orig &&
git pull --rebase . to-rebase &&
test "conflicting modification" = "$(cat file)" &&
test file = "$(cat file2)"
Switched to a new branch 'copy2'
From .
* branch to-rebase -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
ok 66 - git pull --rebase against local branch
# passed all 66 test(s)
1..66
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5516-fetch-push.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/.git/
expecting success:
>path1 &&
git add path1 &&
test_tick &&
git commit -a -m repo &&
the_first_commit=$(git show-ref -s --verify refs/heads/master) &&
>path2 &&
git add path2 &&
test_tick &&
git commit -a -m second &&
the_commit=$(git show-ref -s --verify refs/heads/master)
[master (root-commit) b9c09d6] repo
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 path1
[master 9ad36e1] second
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 path2
ok 1 - setup
expecting success:
mk_empty testrepo &&
(
cd testrepo &&
git fetch .. refs/heads/master:refs/remotes/origin/master &&
echo "$the_commit commit refs/remotes/origin/master" >expect &&
git for-each-ref refs/remotes/origin >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
From ..
* [new branch] master -> origin/master
ok 2 - fetch without wildcard
expecting success:
mk_empty testrepo &&
(
cd testrepo &&
git config remote.up.url .. &&
git config remote.up.fetch "refs/heads/*:refs/remotes/origin/*" &&
git fetch up &&
echo "$the_commit commit refs/remotes/origin/master" >expect &&
git for-each-ref refs/remotes/origin >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
From ..
* [new branch] master -> origin/master
ok 3 - fetch with wildcard
expecting success:
mk_empty testrepo &&
(
TRASH=$(pwd)/ &&
cd testrepo &&
git config "url.$TRASH.insteadOf" trash/ &&
git config remote.up.url trash/. &&
git config remote.up.fetch "refs/heads/*:refs/remotes/origin/*" &&
git fetch up &&
echo "$the_commit commit refs/remotes/origin/master" >expect &&
git for-each-ref refs/remotes/origin >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
From /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/.
* [new branch] master -> origin/master
ok 4 - fetch with insteadOf
expecting success:
mk_empty testrepo &&
(
TRASH=$(pwd)/ &&
cd testrepo &&
git config "url.trash/.pushInsteadOf" "$TRASH" &&
git config remote.up.url "$TRASH." &&
git config remote.up.fetch "refs/heads/*:refs/remotes/origin/*" &&
git fetch up &&
echo "$the_commit commit refs/remotes/origin/master" >expect &&
git for-each-ref refs/remotes/origin >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
From /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/.
* [new branch] master -> origin/master
ok 5 - fetch with pushInsteadOf (should not rewrite)
expecting success:
mk_empty testrepo &&
git push testrepo refs/heads/master:refs/remotes/origin/master &&
(
cd testrepo &&
echo "$the_commit commit refs/remotes/origin/master" >expect &&
git for-each-ref refs/remotes/origin >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
To testrepo
* [new branch] master -> origin/master
ok 6 - push without wildcard
expecting success:
mk_empty testrepo &&
git push testrepo "refs/heads/*:refs/remotes/origin/*" &&
(
cd testrepo &&
echo "$the_commit commit refs/remotes/origin/master" >expect &&
git for-each-ref refs/remotes/origin >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
To testrepo
* [new branch] master -> origin/master
ok 7 - push with wildcard
expecting success:
mk_empty testrepo &&
TRASH="$(pwd)/" &&
test_config "url.$TRASH.insteadOf" trash/ &&
git push trash/testrepo refs/heads/master:refs/remotes/origin/master &&
(
cd testrepo &&
echo "$the_commit commit refs/remotes/origin/master" >expect &&
git for-each-ref refs/remotes/origin >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
To /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo
* [new branch] master -> origin/master
ok 8 - push with insteadOf
expecting success:
mk_empty testrepo &&
TRASH="$(pwd)/" &&
test_config "url.$TRASH.pushInsteadOf" trash/ &&
git push trash/testrepo refs/heads/master:refs/remotes/origin/master &&
(
cd testrepo &&
echo "$the_commit commit refs/remotes/origin/master" >expect &&
git for-each-ref refs/remotes/origin >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
To /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo
* [new branch] master -> origin/master
ok 9 - push with pushInsteadOf
expecting success:
mk_empty testrepo &&
test_config "url.trash2/.pushInsteadOf" testrepo/ &&
test_config "url.trash3/.pushInsteadOf" trash/wrong &&
test_config remote.r.url trash/wrong &&
test_config remote.r.pushurl "testrepo/" &&
git push r refs/heads/master:refs/remotes/origin/master &&
(
cd testrepo &&
echo "$the_commit commit refs/remotes/origin/master" >expect &&
git for-each-ref refs/remotes/origin >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
To testrepo/
* [new branch] master -> origin/master
ok 10 - push with pushInsteadOf and explicit pushurl (pushInsteadOf should not rewrite)
expecting success:
mk_test testrepo heads/master &&
git push testrepo : &&
check_push_result testrepo $the_commit heads/master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
remote: warning: updating the current branch
To testrepo
b9c09d6..9ad36e1 master -> master
ok 11 - push with matching heads
expecting success:
mk_test testrepo heads/master &&
git push testrepo : &&
check_push_result testrepo $the_commit heads/master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
remote: warning: updating the current branch
To testrepo
b9c09d6..9ad36e1 master -> master
ok 12 - push with matching heads on the command line
expecting success:
mk_test testrepo heads/master &&
git push testrepo : &&
git commit --amend -massaged &&
test_must_fail git push testrepo &&
check_push_result testrepo $the_commit heads/master &&
git reset --hard $the_commit
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
remote: warning: updating the current branch
To testrepo
b9c09d6..9ad36e1 master -> master
[master ead0604] assaged
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 path2
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream testrepo master
HEAD is now at 9ad36e1 second
ok 13 - failed (non-fast-forward) push with matching heads
expecting success:
mk_test testrepo heads/master &&
git push testrepo : &&
git commit --amend -massaged &&
git push --force testrepo : &&
! check_push_result testrepo $the_commit heads/master &&
git reset --hard $the_commit
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
remote: warning: updating the current branch
To testrepo
b9c09d6..9ad36e1 master -> master
[master ead0604] assaged
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 path2
remote: warning: updating the current branch
To testrepo
+ 9ad36e1...ead0604 master -> master (forced update)
--- expect 2019-08-14 07:31:11.129760972 +0000
+++ actual 2019-08-14 07:31:11.133761009 +0000
@@ -1 +1 @@
-9ad36e1e54b2130a20d55abb4f0f3ca8494ead3f
+ead060494eed34a0810ba15d500e7ac4ecaa2560
HEAD is now at 9ad36e1 second
ok 14 - push --force with matching heads
expecting success:
mk_test testrepo heads/master &&
git push testrepo : &&
git commit --amend -massaged &&
git push testrepo +: &&
! check_push_result testrepo $the_commit heads/master &&
git reset --hard $the_commit
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
remote: warning: updating the current branch
To testrepo
b9c09d6..9ad36e1 master -> master
[master ead0604] assaged
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 path2
remote: warning: updating the current branch
To testrepo
+ 9ad36e1...ead0604 master -> master (forced update)
--- expect 2019-08-14 07:31:11.605765363 +0000
+++ actual 2019-08-14 07:31:11.609765400 +0000
@@ -1 +1 @@
-9ad36e1e54b2130a20d55abb4f0f3ca8494ead3f
+ead060494eed34a0810ba15d500e7ac4ecaa2560
HEAD is now at 9ad36e1 second
ok 15 - push with matching heads and forced update
expecting success:
mk_test testrepo heads/master &&
git push testrepo master:master &&
check_push_result testrepo $the_commit heads/master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
remote: warning: updating the current branch
To testrepo
b9c09d6..9ad36e1 master -> master
ok 16 - push with no ambiguity (1)
expecting success:
mk_test testrepo remotes/origin/master &&
git push testrepo master:origin/master &&
check_push_result testrepo $the_commit remotes/origin/master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> origin/master
notice: HEAD points to an unborn branch (master)
To testrepo
b9c09d6..9ad36e1 master -> origin/master
notice: HEAD points to an unborn branch (master)
ok 17 - push with no ambiguity (2)
expecting success:
mk_test testrepo heads/master heads/t/master &&
git branch -f t/master master &&
git push testrepo master &&
check_push_result testrepo $the_commit heads/master &&
check_push_result testrepo $the_first_commit heads/t/master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> t/master
remote: warning: updating the current branch
To testrepo
b9c09d6..9ad36e1 master -> master
ok 18 - push with colon-less refspec, no ambiguity
expecting success:
mk_test testrepo heads/master remotes/origin/master &&
git push testrepo master:master &&
check_push_result testrepo $the_commit heads/master &&
check_push_result testrepo $the_first_commit remotes/origin/master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> origin/master
remote: warning: updating the current branch
To testrepo
b9c09d6..9ad36e1 master -> master
ok 19 - push with weak ambiguity (1)
expecting success:
mk_test testrepo heads/master remotes/origin/master remotes/another/master &&
git push testrepo master:master &&
check_push_result testrepo $the_commit heads/master &&
check_push_result testrepo $the_first_commit remotes/origin/master remotes/another/master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> origin/master
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> another/master
remote: warning: updating the current branch
To testrepo
b9c09d6..9ad36e1 master -> master
ok 20 - push with weak ambiguity (2)
expecting success:
mk_test testrepo heads/frotz tags/frotz &&
test_must_fail git push testrepo master:frotz &&
check_push_result testrepo $the_first_commit heads/frotz tags/frotz
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> frotz
To testrepo
* [new tag] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> frotz
notice: HEAD points to an unborn branch (master)
error: dst refspec frotz matches more than one
error: failed to push some refs to 'testrepo'
notice: HEAD points to an unborn branch (master)
ok 21 - push with ambiguity
expecting success:
mk_test testrepo heads/frotz tags/frotz &&
git branch -f frotz master &&
git push testrepo frotz &&
check_push_result testrepo $the_commit heads/frotz &&
check_push_result testrepo $the_first_commit tags/frotz
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> frotz
To testrepo
* [new tag] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> frotz
notice: HEAD points to an unborn branch (master)
To testrepo
b9c09d6..9ad36e1 frotz -> frotz
notice: HEAD points to an unborn branch (master)
notice: HEAD points to an unborn branch (master)
ok 22 - push with colon-less refspec (1)
expecting success:
mk_test testrepo heads/frotz tags/frotz &&
if git show-ref --verify -q refs/heads/frotz
then
git branch -D frotz
fi &&
git tag -f frotz &&
git push -f testrepo frotz &&
check_push_result testrepo $the_commit tags/frotz &&
check_push_result testrepo $the_first_commit heads/frotz
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> frotz
To testrepo
* [new tag] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> frotz
notice: HEAD points to an unborn branch (master)
Deleted branch frotz (was 9ad36e1).
To testrepo
+ b9c09d6...9ad36e1 frotz -> frotz (forced update)
notice: HEAD points to an unborn branch (master)
notice: HEAD points to an unborn branch (master)
ok 23 - push with colon-less refspec (2)
expecting success:
mk_test testrepo &&
if git show-ref --verify -q refs/tags/frotz
then
git tag -d frotz
fi &&
git branch -f frotz master &&
git push testrepo frotz &&
check_push_result testrepo $the_commit heads/frotz &&
test 1 = $( cd testrepo && git show-ref | wc -l )
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
notice: HEAD points to an unborn branch (master)
notice: No default references
Deleted tag 'frotz' (was 9ad36e1)
To testrepo
* [new branch] frotz -> frotz
notice: HEAD points to an unborn branch (master)
ok 24 - push with colon-less refspec (3)
expecting success:
mk_test testrepo &&
if git show-ref --verify -q refs/heads/frotz
then
git branch -D frotz
fi &&
git tag -f frotz &&
git push testrepo frotz &&
check_push_result testrepo $the_commit tags/frotz &&
test 1 = $( cd testrepo && git show-ref | wc -l )
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
notice: HEAD points to an unborn branch (master)
notice: No default references
Deleted branch frotz (was 9ad36e1).
To testrepo
* [new tag] frotz -> frotz
notice: HEAD points to an unborn branch (master)
ok 25 - push with colon-less refspec (4)
expecting success:
mk_test testrepo &&
git push testrepo master:branch &&
check_push_result testrepo $the_commit heads/branch
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
notice: HEAD points to an unborn branch (master)
notice: No default references
To testrepo
* [new branch] master -> branch
notice: HEAD points to an unborn branch (master)
ok 26 - push head with non-existent, incomplete dest
expecting success:
mk_test testrepo &&
git tag -f v1.0 &&
git push testrepo v1.0:tag &&
check_push_result testrepo $the_commit tags/tag
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
notice: HEAD points to an unborn branch (master)
notice: No default references
To testrepo
* [new tag] v1.0 -> tag
notice: HEAD points to an unborn branch (master)
ok 27 - push tag with non-existent, incomplete dest
expecting success:
mk_test testrepo &&
test_must_fail git push testrepo $(git rev-parse master):foo
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
notice: HEAD points to an unborn branch (master)
notice: No default references
error: The destination you provided is not a full refname (i.e.,
starting with "refs/"). We tried to guess what you meant by:
- Looking for a ref that matches 'foo' on the remote side.
- Checking if the <src> being pushed ('9ad36e1e54b2130a20d55abb4f0f3ca8494ead3f')
is a ref in "refs/{heads,tags}/". If so we add a corresponding
refs/{heads,tags}/ prefix on the remote side.
Neither worked, so we gave up. You must fully qualify the ref.
hint: The <src> part of the refspec is a commit object.
hint: Did you mean to create a new branch by pushing to
hint: '9ad36e1e54b2130a20d55abb4f0f3ca8494ead3f:refs/heads/foo'?
error: failed to push some refs to 'testrepo'
ok 28 - push sha1 with non-existent, incomplete dest
expecting success:
mk_test testrepo &&
test_must_fail git push testrepo master^:branch
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
notice: HEAD points to an unborn branch (master)
notice: No default references
error: The destination you provided is not a full refname (i.e.,
starting with "refs/"). We tried to guess what you meant by:
- Looking for a ref that matches 'branch' on the remote side.
- Checking if the <src> being pushed ('master^')
is a ref in "refs/{heads,tags}/". If so we add a corresponding
refs/{heads,tags}/ prefix on the remote side.
Neither worked, so we gave up. You must fully qualify the ref.
hint: The <src> part of the refspec is a commit object.
hint: Did you mean to create a new branch by pushing to
hint: 'master^:refs/heads/branch'?
error: failed to push some refs to 'testrepo'
ok 29 - push ref expression with non-existent, incomplete dest
expecting success:
mk_test testrepo heads/master &&
git checkout master &&
git push testrepo HEAD &&
check_push_result testrepo $the_commit heads/master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Already on 'master'
remote: warning: updating the current branch
To testrepo
b9c09d6..9ad36e1 HEAD -> master
ok 30 - push with HEAD
expecting success:
mk_test testrepo heads/master &&
git checkout -b local master &&
git push testrepo HEAD &&
check_push_result testrepo $the_commit heads/local
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Switched to a new branch 'local'
To testrepo
* [new branch] HEAD -> local
ok 31 - push with HEAD nonexisting at remote
expecting success:
mk_test testrepo heads/master &&
git checkout master &&
git branch -D local &&
git checkout -b local &&
git push testrepo master local &&
check_push_result testrepo $the_commit heads/master &&
check_push_result testrepo $the_commit heads/local &&
# Without force rewinding should fail
git reset --hard HEAD^ &&
test_must_fail git push testrepo HEAD &&
check_push_result testrepo $the_commit heads/local &&
# With force rewinding should succeed
git push testrepo +HEAD &&
check_push_result testrepo $the_first_commit heads/local
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Switched to branch 'master'
Deleted branch local (was 9ad36e1).
Switched to a new branch 'local'
remote: warning: updating the current branch
To testrepo
b9c09d6..9ad36e1 master -> master
* [new branch] local -> local
HEAD is now at b9c09d6 repo
To testrepo
! [rejected] HEAD -> local (non-fast-forward)
error: failed to push some refs to 'testrepo'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
To testrepo
+ 9ad36e1...b9c09d6 HEAD -> local (forced update)
ok 32 - push with +HEAD
expecting success:
mk_test testrepo &&
git checkout master &&
git push testrepo HEAD:branch &&
check_push_result testrepo $the_commit heads/branch
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
notice: HEAD points to an unborn branch (master)
notice: No default references
Switched to branch 'master'
To testrepo
* [new branch] HEAD -> branch
notice: HEAD points to an unborn branch (master)
ok 33 - push HEAD with non-existent, incomplete dest
expecting success:
mk_test testrepo heads/local &&
git checkout master &&
git branch -f local $the_commit &&
(
cd testrepo &&
git checkout local &&
git reset --hard $the_first_commit
) &&
test_config remote.there.url testrepo &&
test_config remote.there.push HEAD &&
test_config branch.master.remote there &&
git push &&
check_push_result testrepo $the_commit heads/master &&
check_push_result testrepo $the_first_commit heads/local
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> local
notice: HEAD points to an unborn branch (master)
Already on 'master'
Switched to branch 'local'
HEAD is now at b9c09d6 repo
To testrepo
* [new branch] HEAD -> master
ok 34 - push with config remote.*.push = HEAD
expecting success:
mk_test up_repo heads/master &&
mk_test down_repo heads/master &&
test_config remote.up.url up_repo &&
test_config remote.down.url down_repo &&
test_config branch.master.remote up &&
test_config remote.pushdefault down &&
test_config push.default matching &&
git push &&
check_push_result up_repo $the_first_commit heads/master &&
check_push_result down_repo $the_commit heads/master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/up_repo/.git/
remote: warning: updating the current branch
To up_repo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/down_repo/.git/
remote: warning: updating the current branch
To down_repo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
remote: warning: updating the current branch
To down_repo
b9c09d6..9ad36e1 master -> master
ok 35 - push with remote.pushdefault
expecting success:
mk_test testrepo heads/master &&
git checkout master &&
test_config remote.there.url test2repo &&
test_config remote.there.pushurl testrepo &&
git push there : &&
check_push_result testrepo $the_commit heads/master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Already on 'master'
remote: warning: updating the current branch
To testrepo
b9c09d6..9ad36e1 master -> master
ok 36 - push with config remote.*.pushurl
expecting success:
mk_test up_repo heads/master &&
mk_test side_repo heads/master &&
mk_test down_repo heads/master &&
test_config remote.up.url up_repo &&
test_config remote.pushdefault side_repo &&
test_config remote.down.url down_repo &&
test_config branch.master.remote up &&
test_config branch.master.pushremote down &&
test_config push.default matching &&
git push &&
check_push_result up_repo $the_first_commit heads/master &&
check_push_result side_repo $the_first_commit heads/master &&
check_push_result down_repo $the_commit heads/master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/up_repo/.git/
remote: warning: updating the current branch
To up_repo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/side_repo/.git/
remote: warning: updating the current branch
To side_repo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/down_repo/.git/
remote: warning: updating the current branch
To down_repo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
remote: warning: updating the current branch
To down_repo
b9c09d6..9ad36e1 master -> master
ok 37 - push with config branch.*.pushremote
expecting success:
mk_test one_repo heads/master &&
mk_test two_repo heads/master &&
test_config remote.one.url one_repo &&
test_config remote.two.url two_repo &&
test_config branch.master.pushremote two_repo &&
test_config remote.pushdefault one_repo &&
test_config push.default matching &&
git push &&
check_push_result one_repo $the_first_commit heads/master &&
check_push_result two_repo $the_commit heads/master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/one_repo/.git/
remote: warning: updating the current branch
To one_repo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/two_repo/.git/
remote: warning: updating the current branch
To two_repo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
remote: warning: updating the current branch
To two_repo
b9c09d6..9ad36e1 master -> master
ok 38 - branch.*.pushremote config order is irrelevant
expecting success:
mk_test testrepo heads/master &&
old_commit=$(git -C testrepo show-ref -s --verify refs/heads/master) &&
git push --dry-run testrepo : &&
check_push_result testrepo $old_commit heads/master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
To testrepo
b9c09d6..9ad36e1 master -> master
ok 39 - push with dry-run
expecting success:
mk_test testrepo heads/master &&
mk_child testrepo child &&
(
cd child &&
git pull .. master &&
git push &&
test $(git rev-parse master) = \
$(git rev-parse remotes/origin/master)
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Cloning into 'child'...
done.
From ..
* branch master -> FETCH_HEAD
Updating b9c09d6..9ad36e1
Fast-forward
path2 | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 path2
remote: warning: updating the current branch
To /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo
b9c09d6..9ad36e1 master -> master
ok 40 - push updates local refs
expecting success:
mk_test testrepo heads/master &&
mk_child testrepo child1 &&
mk_child testrepo child2 &&
(cd child1 && git pull .. master && git push) &&
(
cd child2 &&
git pull ../child1 master &&
git push &&
test $(git rev-parse master) = \
$(git rev-parse remotes/origin/master)
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Cloning into 'child1'...
done.
Cloning into 'child2'...
done.
From ..
* branch master -> FETCH_HEAD
Updating b9c09d6..9ad36e1
Fast-forward
path2 | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 path2
remote: warning: updating the current branch
To /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo
b9c09d6..9ad36e1 master -> master
From ../child1
* branch master -> FETCH_HEAD
Updating b9c09d6..9ad36e1
Fast-forward
path2 | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 path2
Everything up-to-date
ok 41 - push updates up-to-date local refs
expecting success:
mk_test testrepo heads/master &&
mk_child testrepo child &&
(
cd child &&
git push &&
! test -f .git/refs/remotes/origin/master
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Cloning into 'child'...
done.
Everything up-to-date
ok 42 - push preserves up-to-date packed refs
expecting success:
mk_test testrepo heads/master &&
mk_child testrepo child &&
mkdir testrepo/.git/hooks &&
echo "#!/no/frobnication/today" >testrepo/.git/hooks/pre-receive &&
chmod +x testrepo/.git/hooks/pre-receive &&
(
cd child &&
git pull .. master &&
test_must_fail git push &&
test $(git rev-parse master) != \
$(git rev-parse remotes/origin/master)
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Cloning into 'child'...
done.
From ..
* branch master -> FETCH_HEAD
Updating b9c09d6..9ad36e1
Fast-forward
path2 | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 path2
fatal: cannot run hooks/pre-receive: No such file or directory
To /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '/<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo'
ok 43 - push does not update local refs on failure
expecting success:
mk_test testrepo heads/master &&
rm -f testrepo/.git/objects/??/* &&
git push testrepo :refs/heads/master &&
(cd testrepo && test_must_fail git rev-parse --verify refs/heads/master)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
error: refs/heads/master does not point to a valid object!
remote: warning: updating the current branch
remote: warning: Allowing deletion of corrupt ref.
To testrepo
- [deleted] master
fatal: Needed a single revision
ok 44 - allow deleting an invalid remote ref
expecting success:
mk_test_with_hooks testrepo heads/master heads/next &&
orgmaster=$(cd testrepo && git show-ref -s --verify refs/heads/master) &&
newmaster=$(git show-ref -s --verify refs/heads/master) &&
orgnext=$(cd testrepo && git show-ref -s --verify refs/heads/next) &&
newnext=$ZERO_OID &&
git push testrepo refs/heads/master:refs/heads/master :refs/heads/next &&
(
cd testrepo/.git &&
cat >pre-receive.expect <<-EOF &&
$orgmaster $newmaster refs/heads/master
$orgnext $newnext refs/heads/next
EOF
cat >update.expect <<-EOF &&
refs/heads/master $orgmaster $newmaster
refs/heads/next $orgnext $newnext
EOF
cat >post-receive.expect <<-EOF &&
$orgmaster $newmaster refs/heads/master
$orgnext $newnext refs/heads/next
EOF
cat >post-update.expect <<-EOF &&
refs/heads/master
refs/heads/next
EOF
test_cmp pre-receive.expect pre-receive.actual &&
test_cmp update.expect update.actual &&
test_cmp post-receive.expect post-receive.actual &&
test_cmp post-update.expect post-update.actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> next
remote: warning: updating the current branch
To testrepo
b9c09d6..9ad36e1 master -> master
- [deleted] next
ok 45 - pushing valid refs triggers post-receive and post-update hooks
expecting success:
mk_test_with_hooks testrepo heads/master &&
rm -f testrepo/.git/objects/??/* &&
git push testrepo :refs/heads/master &&
(
cd testrepo/.git &&
cat >pre-receive.expect <<-EOF &&
$ZERO_OID $ZERO_OID refs/heads/master
EOF
cat >update.expect <<-EOF &&
refs/heads/master $ZERO_OID $ZERO_OID
EOF
cat >post-receive.expect <<-EOF &&
$ZERO_OID $ZERO_OID refs/heads/master
EOF
cat >post-update.expect <<-EOF &&
refs/heads/master
EOF
test_cmp pre-receive.expect pre-receive.actual &&
test_cmp update.expect update.actual &&
test_cmp post-receive.expect post-receive.actual &&
test_cmp post-update.expect post-update.actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
error: refs/heads/master does not point to a valid object!
remote: warning: updating the current branch
remote: warning: Allowing deletion of corrupt ref.
To testrepo
- [deleted] master
ok 46 - deleting dangling ref triggers hooks with correct args
expecting success:
mk_test_with_hooks testrepo heads/master &&
orgmaster=$(cd testrepo && git show-ref -s --verify refs/heads/master) &&
newmaster=$(git show-ref -s --verify refs/heads/master) &&
git push testrepo master :refs/heads/nonexistent &&
(
cd testrepo/.git &&
cat >pre-receive.expect <<-EOF &&
$orgmaster $newmaster refs/heads/master
$ZERO_OID $ZERO_OID refs/heads/nonexistent
EOF
cat >update.expect <<-EOF &&
refs/heads/master $orgmaster $newmaster
refs/heads/nonexistent $ZERO_OID $ZERO_OID
EOF
cat >post-receive.expect <<-EOF &&
$orgmaster $newmaster refs/heads/master
EOF
cat >post-update.expect <<-EOF &&
refs/heads/master
EOF
test_cmp pre-receive.expect pre-receive.actual &&
test_cmp update.expect update.actual &&
test_cmp post-receive.expect post-receive.actual &&
test_cmp post-update.expect post-update.actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
remote: warning: updating the current branch
remote: warning: Deleting a non-existent ref.
To testrepo
b9c09d6..9ad36e1 master -> master
- [deleted] nonexistent
ok 47 - deletion of a non-existent ref is not fed to post-receive and post-update hooks
expecting success:
mk_test_with_hooks testrepo heads/master &&
git push testrepo :refs/heads/nonexistent &&
(
cd testrepo/.git &&
cat >pre-receive.expect <<-EOF &&
$ZERO_OID $ZERO_OID refs/heads/nonexistent
EOF
cat >update.expect <<-EOF &&
refs/heads/nonexistent $ZERO_OID $ZERO_OID
EOF
test_cmp pre-receive.expect pre-receive.actual &&
test_cmp update.expect update.actual &&
test_path_is_missing post-receive.actual &&
test_path_is_missing post-update.actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
remote: warning: Deleting a non-existent ref.
To testrepo
- [deleted] nonexistent
ok 48 - deletion of a non-existent ref alone does trigger post-receive and post-update hooks
expecting success:
mk_test_with_hooks testrepo heads/master heads/next heads/pu &&
orgmaster=$(cd testrepo && git show-ref -s --verify refs/heads/master) &&
newmaster=$(git show-ref -s --verify refs/heads/master) &&
orgnext=$(cd testrepo && git show-ref -s --verify refs/heads/next) &&
newnext=$ZERO_OID &&
orgpu=$(cd testrepo && git show-ref -s --verify refs/heads/pu) &&
newpu=$(git show-ref -s --verify refs/heads/master) &&
git push testrepo refs/heads/master:refs/heads/master \
refs/heads/master:refs/heads/pu :refs/heads/next \
:refs/heads/nonexistent &&
(
cd testrepo/.git &&
cat >pre-receive.expect <<-EOF &&
$orgmaster $newmaster refs/heads/master
$orgnext $newnext refs/heads/next
$orgpu $newpu refs/heads/pu
$ZERO_OID $ZERO_OID refs/heads/nonexistent
EOF
cat >update.expect <<-EOF &&
refs/heads/master $orgmaster $newmaster
refs/heads/next $orgnext $newnext
refs/heads/pu $orgpu $newpu
refs/heads/nonexistent $ZERO_OID $ZERO_OID
EOF
cat >post-receive.expect <<-EOF &&
$orgmaster $newmaster refs/heads/master
$orgnext $newnext refs/heads/next
$orgpu $newpu refs/heads/pu
EOF
cat >post-update.expect <<-EOF &&
refs/heads/master
refs/heads/next
refs/heads/pu
EOF
test_cmp pre-receive.expect pre-receive.actual &&
test_cmp update.expect update.actual &&
test_cmp post-receive.expect post-receive.actual &&
test_cmp post-update.expect post-update.actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> next
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> pu
remote: warning: updating the current branch
remote: warning: Deleting a non-existent ref.
To testrepo
b9c09d6..9ad36e1 master -> master
- [deleted] next
b9c09d6..9ad36e1 master -> pu
- [deleted] nonexistent
ok 49 - mixed ref updates, deletes, invalid deletes trigger hooks with correct input
expecting success:
mk_test testrepo heads/master &&
(cd testrepo && git config receive.denyDeleteCurrent warn) &&
git push testrepo --delete master &&
(cd testrepo && test_must_fail git rev-parse --verify refs/heads/master)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
remote: warning: updating the current branch
remote: warning: deleting the current branch
To testrepo
- [deleted] master
fatal: Needed a single revision
ok 50 - allow deleting a ref using --delete
expecting success:
mk_test testrepo heads/master &&
git tag -a -m dummy_message deltag heads/master &&
git push testrepo --tags &&
(cd testrepo && git rev-parse --verify -q refs/tags/deltag) &&
git push testrepo --delete tag deltag &&
(cd testrepo && test_must_fail git rev-parse --verify refs/tags/deltag)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
To testrepo
* [new tag] deltag -> deltag
* [new tag] frotz -> frotz
* [new tag] v1.0 -> v1.0
6e5fba4679ec93de5598d25f1c27f6b6073c29fe
To testrepo
- [deleted] deltag
fatal: Needed a single revision
ok 51 - allow deleting a tag using --delete
expecting success:
mk_test testrepo heads/master &&
test_must_fail git push testrepo --delete
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
fatal: --delete doesn't make sense without any refs
ok 52 - push --delete without args aborts
expecting success:
mk_test testrepo heads/master &&
test_must_fail git push testrepo --delete master:foo
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
fatal: --delete only accepts plain target ref names
ok 53 - push --delete refuses src:dest refspecs
expecting success:
mk_test testrepo heads/master &&
(
cd testrepo &&
git checkout master &&
git config receive.denyCurrentBranch warn
) &&
git push testrepo master 2>stderr &&
grep "warning: updating the current branch" stderr
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Already on 'master'
remote: warning: updating the current branch
ok 54 - warn on push to HEAD of non-bare repository
expecting success:
mk_test testrepo heads/master &&
(
cd testrepo &&
git checkout master &&
git config receive.denyCurrentBranch true
) &&
test_must_fail git push testrepo master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Already on 'master'
remote: error: refusing to update checked out branch: refs/heads/master
To testrepo
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'testrepo'
ok 55 - deny push to HEAD of non-bare repository
expecting success:
mk_test testrepo heads/master &&
(
cd testrepo &&
git checkout master &&
git config receive.denyCurrentBranch true &&
git config core.bare true
) &&
git push testrepo master 2>stderr &&
! grep "warning: updating the current branch" stderr
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Already on 'master'
ok 56 - allow push to HEAD of bare repository (bare)
expecting success:
mk_test testrepo heads/master &&
(
cd testrepo &&
git checkout master &&
git config receive.denyCurrentBranch false
) &&
git push testrepo master 2>stderr &&
! grep "warning: updating the current branch" stderr
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Already on 'master'
ok 57 - allow push to HEAD of non-bare repository (config)
expecting success:
mk_empty testrepo &&
git branch second $the_first_commit &&
git checkout second &&
echo ".." > testrepo/.git/branches/branch1 &&
(
cd testrepo &&
git fetch branch1 &&
echo "$the_commit commit refs/heads/branch1" >expect &&
git for-each-ref refs/heads >actual &&
test_cmp expect actual
) &&
git checkout master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
Switched to branch 'second'
From ..
* [new branch] master -> branch1
* [new tag] deltag -> deltag
* [new tag] frotz -> frotz
* [new tag] v1.0 -> v1.0
Switched to branch 'master'
ok 58 - fetch with branches
expecting success:
mk_empty testrepo &&
echo "..#second" > testrepo/.git/branches/branch2 &&
(
cd testrepo &&
git fetch branch2 &&
echo "$the_first_commit commit refs/heads/branch2" >expect &&
git for-each-ref refs/heads >actual &&
test_cmp expect actual
) &&
git checkout master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
From ..
* [new branch] second -> branch2
Already on 'master'
ok 59 - fetch with branches containing #
expecting success:
mk_empty testrepo &&
git checkout second &&
echo "testrepo" > .git/branches/branch1 &&
git push branch1 &&
(
cd testrepo &&
echo "$the_first_commit commit refs/heads/master" >expect &&
git for-each-ref refs/heads >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
Switched to branch 'second'
remote: warning: updating the current branch
To testrepo
* [new branch] HEAD -> master
ok 60 - push with branches
expecting success:
mk_empty testrepo &&
echo "testrepo#branch3" > .git/branches/branch2 &&
git push branch2 &&
(
cd testrepo &&
echo "$the_first_commit commit refs/heads/branch3" >expect &&
git for-each-ref refs/heads >actual &&
test_cmp expect actual
) &&
git checkout master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
To testrepo
* [new branch] HEAD -> branch3
Switched to branch 'master'
ok 61 - push with branches containing #
expecting success:
mk_test testrepo heads/master &&
mk_child testrepo child1 &&
mk_child testrepo child2 &&
(
cd child1 &&
git branch foo &&
git symbolic-ref refs/heads/bar refs/heads/foo &&
git config receive.denyCurrentBranch false
) &&
(
cd child2 &&
>path2 &&
git add path2 &&
test_tick &&
git commit -a -m child2 &&
git branch foo &&
git branch bar &&
git push ../child1 foo bar
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Cloning into 'child1'...
done.
Cloning into 'child2'...
done.
[master 730546d] child2
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 path2
To ../child1
b9c09d6..730546d bar -> bar
b9c09d6..730546d foo -> foo
ok 62 - push into aliased refs (consistent)
expecting success:
mk_test testrepo heads/master &&
mk_child testrepo child1 &&
mk_child testrepo child2 &&
(
cd child1 &&
git branch foo &&
git symbolic-ref refs/heads/bar refs/heads/foo &&
git config receive.denyCurrentBranch false
) &&
(
cd child2 &&
>path2 &&
git add path2 &&
test_tick &&
git commit -a -m child2 &&
git branch foo &&
>path3 &&
git add path3 &&
test_tick &&
git commit -a -m child2 &&
git branch bar &&
test_must_fail git push ../child1 foo bar 2>stderr &&
grep "refusing inconsistent update" stderr
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Cloning into 'child1'...
done.
Cloning into 'child2'...
done.
[master 730546d] child2
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 path2
[master 2ba6bb5] child2
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 path3
remote: error: refusing inconsistent update between symref 'refs/heads/bar' (b9c09d6..2ba6bb5) and its target 'refs/heads/foo' (b9c09d6..730546d)
ok 63 - push into aliased refs (inconsistent)
expecting success:
mk_test testrepo heads/master &&
mk_child testrepo child1 &&
mk_child testrepo child2 &&
(
cd child1 &&
git tag testTag &&
git push ../child2 testTag &&
>file1 &&
git add file1 &&
git commit -m 'file1' &&
git tag -f testTag &&
test_must_fail git push ../child2 testTag &&
git push --force ../child2 testTag &&
git tag -f testTag HEAD~ &&
test_must_fail git push ../child2 testTag &&
git push --force ../child2 testTag &&
# Clobbering without + in refspec needs --force
git tag -f testTag &&
test_must_fail git push ../child2 'refs/tags/*:refs/tags/*' &&
git push --force ../child2 'refs/tags/*:refs/tags/*' &&
# Clobbering with + in refspec does not need --force
git tag -f testTag HEAD~ &&
git push ../child2 '+refs/tags/*:refs/tags/*' &&
# Clobbering with --no-force still obeys + in refspec
git tag -f testTag &&
git push --no-force ../child2 '+refs/tags/*:refs/tags/*' &&
# Clobbering with/without --force and 'tag <name>' format
git tag -f testTag HEAD~ &&
test_must_fail git push ../child2 tag testTag &&
git push --force ../child2 tag testTag
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Cloning into 'child1'...
done.
Cloning into 'child2'...
done.
To ../child2
* [new tag] testTag -> testTag
[master 1da25e3] file1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file1
Updated tag 'testTag' (was b9c09d6)
To ../child2
! [rejected] testTag -> testTag (already exists)
error: failed to push some refs to '../child2'
hint: Updates were rejected because the tag already exists in the remote.
To ../child2
+ b9c09d6...1da25e3 testTag -> testTag (forced update)
Updated tag 'testTag' (was 1da25e3)
To ../child2
! [rejected] testTag -> testTag (already exists)
error: failed to push some refs to '../child2'
hint: Updates were rejected because the tag already exists in the remote.
To ../child2
+ 1da25e3...b9c09d6 testTag -> testTag (forced update)
Updated tag 'testTag' (was b9c09d6)
To ../child2
! [rejected] testTag -> testTag (already exists)
error: failed to push some refs to '../child2'
hint: Updates were rejected because the tag already exists in the remote.
To ../child2
+ b9c09d6...1da25e3 testTag -> testTag (forced update)
Updated tag 'testTag' (was 1da25e3)
To ../child2
+ 1da25e3...b9c09d6 testTag -> testTag (forced update)
Updated tag 'testTag' (was b9c09d6)
To ../child2
+ b9c09d6...1da25e3 testTag -> testTag (forced update)
Updated tag 'testTag' (was 1da25e3)
To ../child2
! [rejected] testTag -> testTag (already exists)
error: failed to push some refs to '../child2'
hint: Updates were rejected because the tag already exists in the remote.
To ../child2
+ 1da25e3...b9c09d6 testTag -> testTag (forced update)
ok 64 - force pushing required to update lightweight tag
expecting success:
mk_test testrepo heads/master &&
mk_child testrepo child1 &&
mk_child testrepo child2 &&
(
cd child1 &&
git tag testTag &&
git push ../child2 testTag &&
>file1 &&
git add file1 &&
git commit -m 'file1' &&
git tag -f -a -m'tag message' testTag &&
test_must_fail git push ../child2 testTag &&
git push --force ../child2 testTag &&
git tag -f -a -m'tag message' testTag HEAD~ &&
test_must_fail git push ../child2 testTag &&
git push --force ../child2 testTag &&
# Clobbering without + in refspec needs --force
git tag -f testTag &&
test_must_fail git push ../child2 'refs/tags/*:refs/tags/*' &&
git push --force ../child2 'refs/tags/*:refs/tags/*' &&
# Clobbering with + in refspec does not need --force
git tag -f testTag HEAD~ &&
git push ../child2 '+refs/tags/*:refs/tags/*' &&
# Clobbering with --no-force still obeys + in refspec
git tag -f testTag &&
git push --no-force ../child2 '+refs/tags/*:refs/tags/*' &&
# Clobbering with/without --force and 'tag <name>' format
git tag -f testTag HEAD~ &&
test_must_fail git push ../child2 tag testTag &&
git push --force ../child2 tag testTag
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Cloning into 'child1'...
done.
Cloning into 'child2'...
done.
To ../child2
* [new tag] testTag -> testTag
[master 1da25e3] file1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file1
Updated tag 'testTag' (was b9c09d6)
To ../child2
! [rejected] testTag -> testTag (already exists)
error: failed to push some refs to '../child2'
hint: Updates were rejected because the tag already exists in the remote.
To ../child2
+ b9c09d6...f3dec81 testTag -> testTag (forced update)
Updated tag 'testTag' (was f3dec81)
To ../child2
! [rejected] testTag -> testTag (already exists)
error: failed to push some refs to '../child2'
hint: Updates were rejected because the tag already exists in the remote.
To ../child2
+ f3dec81...16185e5 testTag -> testTag (forced update)
Updated tag 'testTag' (was 16185e5)
To ../child2
! [rejected] testTag -> testTag (already exists)
error: failed to push some refs to '../child2'
hint: Updates were rejected because the tag already exists in the remote.
To ../child2
+ 16185e5...1da25e3 testTag -> testTag (forced update)
Updated tag 'testTag' (was 1da25e3)
To ../child2
+ 1da25e3...b9c09d6 testTag -> testTag (forced update)
Updated tag 'testTag' (was b9c09d6)
To ../child2
+ b9c09d6...1da25e3 testTag -> testTag (forced update)
Updated tag 'testTag' (was 1da25e3)
To ../child2
! [rejected] testTag -> testTag (already exists)
error: failed to push some refs to '../child2'
hint: Updates were rejected because the tag already exists in the remote.
To ../child2
+ 1da25e3...b9c09d6 testTag -> testTag (forced update)
ok 65 - force pushing required to update annotated tag
expecting success:
mk_test testrepo heads/master &&
mk_child testrepo child1 &&
mk_child testrepo child2 &&
(
cd testrepo &&
git tag testTag &&
git -C ../child1 fetch origin tag testTag &&
>file1 &&
git add file1 &&
git commit -m 'file1' &&
git tag -f testTag &&
test_must_fail git -C ../child1 fetch origin tag testTag &&
git -C ../child1 fetch origin '+refs/tags/*:refs/tags/*'
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Cloning into 'child1'...
done.
Cloning into 'child2'...
done.
From /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo
* [new tag] testTag -> testTag
[master 7083162] file1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename path1 => file1 (100%)
Updated tag 'testTag' (was b9c09d6)
From /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo
! [rejected] testTag -> testTag (would clobber existing tag)
From /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo
t [tag update] testTag -> testTag
ok 66 - fetch will not clobber an existing lightweight tag without --force
expecting success:
mk_test testrepo heads/master &&
mk_child testrepo child1 &&
mk_child testrepo child2 &&
(
cd testrepo &&
git tag testTag &&
git -C ../child1 fetch origin tag testTag &&
>file1 &&
git add file1 &&
git commit -m 'file1' &&
git tag -f -a -m'tag message' testTag &&
test_must_fail git -C ../child1 fetch origin tag testTag &&
git -C ../child1 fetch origin '+refs/tags/*:refs/tags/*'
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Cloning into 'child1'...
done.
Cloning into 'child2'...
done.
From /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo
* [new tag] testTag -> testTag
[master 7083162] file1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename path1 => file1 (100%)
Updated tag 'testTag' (was b9c09d6)
From /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo
! [rejected] testTag -> testTag (would clobber existing tag)
From /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo
t [tag update] testTag -> testTag
ok 67 - fetch will not clobber an existing annotated tag without --force
expecting success:
mk_empty testrepo &&
echo >.git/foo "To testrepo" &&
echo >>.git/foo "* refs/heads/master:refs/remotes/origin/master [new branch]" &&
echo >>.git/foo "Done" &&
git push >.git/bar --porcelain testrepo refs/heads/master:refs/remotes/origin/master &&
(
cd testrepo &&
echo "$the_commit commit refs/remotes/origin/master" >expect &&
git for-each-ref refs/remotes/origin >actual &&
test_cmp expect actual
) &&
test_cmp .git/foo .git/bar
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
ok 68 - push --porcelain
expecting success:
mk_empty testrepo &&
test_must_fail git push >.git/bar --porcelain asdfasdfasd refs/heads/master:refs/remotes/origin/master &&
! grep -q Done .git/bar
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
fatal: 'asdfasdfasd' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 69 - push --porcelain bad url
expecting success:
mk_empty testrepo &&
git push testrepo refs/heads/master:refs/remotes/origin/master &&
(cd testrepo &&
git reset --hard origin/master^ &&
git config receive.denyCurrentBranch true) &&
echo >.git/foo "To testrepo" &&
echo >>.git/foo "! refs/heads/master:refs/heads/master [remote rejected] (branch is currently checked out)" &&
test_must_fail git push >.git/bar --porcelain testrepo refs/heads/master:refs/heads/master &&
test_cmp .git/foo .git/bar
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
To testrepo
* [new branch] master -> origin/master
HEAD is now at b9c09d6 repo
remote: error: refusing to update checked out branch: refs/heads/master
error: failed to push some refs to 'testrepo'
ok 70 - push --porcelain rejected
expecting success:
mk_empty testrepo &&
git push testrepo refs/heads/master:refs/remotes/origin/master &&
(cd testrepo &&
git reset --hard origin/master &&
git config receive.denyCurrentBranch true) &&
echo >.git/foo "To testrepo" &&
echo >>.git/foo "! refs/heads/master^:refs/heads/master [rejected] (non-fast-forward)" &&
echo >>.git/foo "Done" &&
test_must_fail git push >.git/bar --porcelain --dry-run testrepo refs/heads/master^:refs/heads/master &&
test_cmp .git/foo .git/bar
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
To testrepo
* [new branch] master -> origin/master
HEAD is now at 9ad36e1 second
error: failed to push some refs to 'testrepo'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
ok 71 - push --porcelain --dry-run rejected
expecting success:
mk_test testrepo heads/master heads/second heads/foo heads/bar &&
git push --prune testrepo : &&
check_push_result testrepo $the_commit heads/master &&
check_push_result testrepo $the_first_commit heads/second &&
! check_push_result testrepo $the_first_commit heads/foo heads/bar
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> second
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> foo
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> bar
remote: warning: updating the current branch
To testrepo
- [deleted] bar
- [deleted] foo
b9c09d6..9ad36e1 master -> master
fatal: 'refs/heads/foo' - not a valid ref
ok 72 - push --prune
expecting success:
mk_test testrepo tmp/master tmp/second tmp/foo tmp/bar &&
git push --prune testrepo "refs/heads/*:refs/tmp/*" &&
check_push_result testrepo $the_commit tmp/master &&
check_push_result testrepo $the_first_commit tmp/second &&
! check_push_result testrepo $the_first_commit tmp/foo tmp/bar
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> refs/tmp/master
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> refs/tmp/second
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> refs/tmp/foo
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> refs/tmp/bar
notice: HEAD points to an unborn branch (master)
To testrepo
- [deleted] refs/tmp/bar
- [deleted] refs/tmp/foo
b9c09d6..9ad36e1 master -> refs/tmp/master
* [new branch] branch1 -> refs/tmp/branch1
* [new branch] branch2 -> refs/tmp/branch2
* [new branch] local -> refs/tmp/local
* [new branch] t/master -> refs/tmp/t/master
notice: HEAD points to an unborn branch (master)
notice: HEAD points to an unborn branch (master)
fatal: 'refs/tmp/foo' - not a valid ref
ok 73 - push --prune refspec
expecting success:
mk_test testrepo heads/master hidden/one hidden/two hidden/three &&
(
cd testrepo &&
git config $configsection.hiderefs refs/hidden
) &&
# push to unhidden ref succeeds normally
git push testrepo master:refs/heads/master &&
check_push_result testrepo $the_commit heads/master &&
# push to update a hidden ref should fail
test_must_fail git push testrepo master:refs/hidden/one &&
check_push_result testrepo $the_first_commit hidden/one &&
# push to delete a hidden ref should fail
test_must_fail git push testrepo :refs/hidden/two &&
check_push_result testrepo $the_first_commit hidden/two &&
# idempotent push to update a hidden ref should fail
test_must_fail git push testrepo $the_first_commit:refs/hidden/three &&
check_push_result testrepo $the_first_commit hidden/three
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> refs/hidden/one
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> refs/hidden/two
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> refs/hidden/three
remote: warning: updating the current branch
To testrepo
b9c09d6..9ad36e1 master -> master
To testrepo
! [remote rejected] master -> refs/hidden/one (deny updating a hidden ref)
error: failed to push some refs to 'testrepo'
To testrepo
! [remote rejected] refs/hidden/two (deny deleting a hidden ref)
error: failed to push some refs to 'testrepo'
To testrepo
! [remote rejected] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> refs/hidden/three (deny updating a hidden ref)
error: failed to push some refs to 'testrepo'
ok 74 - push to update a ref hidden by transfer.hiderefs
expecting success:
mk_test testrepo heads/master hidden/one hidden/two hidden/three &&
(
cd testrepo &&
git config $configsection.hiderefs refs/hidden
) &&
# push to unhidden ref succeeds normally
git push testrepo master:refs/heads/master &&
check_push_result testrepo $the_commit heads/master &&
# push to update a hidden ref should fail
test_must_fail git push testrepo master:refs/hidden/one &&
check_push_result testrepo $the_first_commit hidden/one &&
# push to delete a hidden ref should fail
test_must_fail git push testrepo :refs/hidden/two &&
check_push_result testrepo $the_first_commit hidden/two &&
# idempotent push to update a hidden ref should fail
test_must_fail git push testrepo $the_first_commit:refs/hidden/three &&
check_push_result testrepo $the_first_commit hidden/three
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> refs/hidden/one
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> refs/hidden/two
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> refs/hidden/three
remote: warning: updating the current branch
To testrepo
b9c09d6..9ad36e1 master -> master
To testrepo
! [remote rejected] master -> refs/hidden/one (deny updating a hidden ref)
error: failed to push some refs to 'testrepo'
To testrepo
! [remote rejected] refs/hidden/two (deny deleting a hidden ref)
error: failed to push some refs to 'testrepo'
To testrepo
! [remote rejected] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> refs/hidden/three (deny updating a hidden ref)
error: failed to push some refs to 'testrepo'
ok 75 - push to update a ref hidden by receive.hiderefs
expecting success:
mk_test testrepo heads/master hidden/one &&
git push testrepo master:refs/hidden/one &&
(
cd testrepo &&
git config transfer.hiderefs refs/hidden
) &&
check_push_result testrepo $the_commit hidden/one &&
mk_child testrepo child &&
(
cd child &&
# make sure $the_commit does not exist here
git repack -a -d &&
git prune &&
test_must_fail git cat-file -t $the_commit &&
# Some protocol versions (e.g. 2) support fetching
# unadvertised objects, so restrict this test to v0.
# fetching the hidden object should fail by default
test_must_fail env GIT_TEST_PROTOCOL_VERSION= \
git fetch -v ../testrepo $the_commit:refs/heads/copy 2>err &&
test_i18ngrep "Server does not allow request for unadvertised object" err &&
test_must_fail git rev-parse --verify refs/heads/copy &&
# the server side can allow it to succeed
(
cd ../testrepo &&
git config uploadpack.allowtipsha1inwant true
) &&
git fetch -v ../testrepo $the_commit:refs/heads/copy master:refs/heads/extra &&
cat >expect <<-EOF &&
$the_commit
$the_first_commit
EOF
{
git rev-parse --verify refs/heads/copy &&
git rev-parse --verify refs/heads/extra
} >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> refs/hidden/one
To testrepo
b9c09d6..9ad36e1 master -> refs/hidden/one
Cloning into 'child'...
done.
fatal: git cat-file: could not get object info
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: Server does not allow request for unadvertised object 9ad36e1e54b2130a20d55abb4f0f3ca8494ead3f
fatal: Needed a single revision
From ../testrepo
* [new ref] 9ad36e1e54b2130a20d55abb4f0f3ca8494ead3f -> copy
* [new branch] master -> extra
ok 76 - fetch exact SHA1
expecting success:
mk_test testrepo heads/master hidden/one &&
git push testrepo master:refs/hidden/one &&
git -C testrepo config transfer.hiderefs refs/hidden &&
check_push_result testrepo $the_commit hidden/one &&
mk_child testrepo child &&
git -C child config protocol.version 2 &&
# make sure $the_commit does not exist here
git -C child repack -a -d &&
git -C child prune &&
test_must_fail git -C child cat-file -t $the_commit &&
# fetching the hidden object succeeds by default
# NEEDSWORK: should this match the v0 behavior instead?
git -C child fetch -v ../testrepo $the_commit:refs/heads/copy
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> refs/hidden/one
To testrepo
b9c09d6..9ad36e1 master -> refs/hidden/one
Cloning into 'child'...
done.
fatal: git cat-file: could not get object info
From ../testrepo
* [new ref] 9ad36e1e54b2130a20d55abb4f0f3ca8494ead3f -> copy
ok 77 - fetch exact SHA1 in protocol v2
expecting success:
mk_empty testrepo &&
(
cd testrepo &&
git config uploadpack.allowtipsha1inwant $configallowtipsha1inwant &&
git commit --allow-empty -m foo &&
git commit --allow-empty -m bar
) &&
SHA1=$(git --git-dir=testrepo/.git rev-parse HEAD^) &&
mk_empty shallow &&
(
cd shallow &&
# Some protocol versions (e.g. 2) support fetching
# unadvertised objects, so restrict this test to v0.
test_must_fail env GIT_TEST_PROTOCOL_VERSION= \
git fetch --depth=1 ../testrepo/.git $SHA1 &&
git --git-dir=../testrepo/.git config uploadpack.allowreachablesha1inwant true &&
git fetch --depth=1 ../testrepo/.git $SHA1 &&
git cat-file commit $SHA1
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
[master (root-commit) a6b22ca] foo
Author: A U Thor <author@example.com>
[master 5e26403] bar
Author: A U Thor <author@example.com>
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/shallow/.git/
fatal: remote error: upload-pack: not our ref a6b22cab249ba5160facc1657eff7e4bbd9ed808
fatal: git upload-pack: not our ref a6b22cab249ba5160facc1657eff7e4bbd9ed808
From ../testrepo/
* branch a6b22cab249ba5160facc1657eff7e4bbd9ed808 -> FETCH_HEAD
tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
author A U Thor <author@example.com> 1112912053 -0700
committer C O Mitter <committer@example.com> 1112912053 -0700
foo
ok 78 - shallow fetch reachable SHA1 (but not a ref), allowtipsha1inwant=true
expecting success:
mk_empty testrepo &&
(
cd testrepo &&
git config uploadpack.allowtipsha1inwant $configallowtipsha1inwant &&
git commit --allow-empty -m foo &&
git commit --allow-empty -m bar &&
git commit --allow-empty -m xyz
) &&
SHA1_1=$(git --git-dir=testrepo/.git rev-parse HEAD^^) &&
SHA1_2=$(git --git-dir=testrepo/.git rev-parse HEAD^) &&
SHA1_3=$(git --git-dir=testrepo/.git rev-parse HEAD) &&
(
cd testrepo &&
git reset --hard $SHA1_2 &&
git cat-file commit $SHA1_1 &&
git cat-file commit $SHA1_3
) &&
mk_empty shallow &&
(
cd shallow &&
# Some protocol versions (e.g. 2) support fetching
# unadvertised objects, so restrict this test to v0.
test_must_fail env GIT_TEST_PROTOCOL_VERSION= \
git fetch ../testrepo/.git $SHA1_3 &&
test_must_fail env GIT_TEST_PROTOCOL_VERSION= \
git fetch ../testrepo/.git $SHA1_1 &&
git --git-dir=../testrepo/.git config uploadpack.allowreachablesha1inwant true &&
git fetch ../testrepo/.git $SHA1_1 &&
git cat-file commit $SHA1_1 &&
test_must_fail git cat-file commit $SHA1_2 &&
git fetch ../testrepo/.git $SHA1_2 &&
git cat-file commit $SHA1_2 &&
test_must_fail env GIT_TEST_PROTOCOL_VERSION= \
git fetch ../testrepo/.git $SHA1_3 2>err &&
test_i18ngrep "remote error:.*not our ref.*$SHA1_3\$" err
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
[master (root-commit) a6b22ca] foo
Author: A U Thor <author@example.com>
[master 5e26403] bar
Author: A U Thor <author@example.com>
[master 64ea4c1] xyz
Author: A U Thor <author@example.com>
HEAD is now at 5e26403 bar
tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
author A U Thor <author@example.com> 1112912053 -0700
committer C O Mitter <committer@example.com> 1112912053 -0700
foo
tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
parent 5e26403b4485d7a44fd8b65dc3f71e21c0dd6fad
author A U Thor <author@example.com> 1112912053 -0700
committer C O Mitter <committer@example.com> 1112912053 -0700
xyz
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/shallow/.git/
fatal: remote error: upload-pack: not our ref 64ea4c133d59fa98e86a771eda009872d6ab2886
fatal: git upload-pack: not our ref 64ea4c133d59fa98e86a771eda009872d6ab2886
fatal: remote error: upload-pack: not our ref a6b22cab249ba5160facc1657eff7e4bbd9ed808
fatal: git upload-pack: not our ref a6b22cab249ba5160facc1657eff7e4bbd9ed808
From ../testrepo/
* branch a6b22cab249ba5160facc1657eff7e4bbd9ed808 -> FETCH_HEAD
tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
author A U Thor <author@example.com> 1112912053 -0700
committer C O Mitter <committer@example.com> 1112912053 -0700
foo
fatal: git cat-file 5e26403b4485d7a44fd8b65dc3f71e21c0dd6fad: bad file
From ../testrepo/
* branch 5e26403b4485d7a44fd8b65dc3f71e21c0dd6fad -> FETCH_HEAD
tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
parent a6b22cab249ba5160facc1657eff7e4bbd9ed808
author A U Thor <author@example.com> 1112912053 -0700
committer C O Mitter <committer@example.com> 1112912053 -0700
bar
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: remote error: upload-pack: not our ref 64ea4c133d59fa98e86a771eda009872d6ab2886
ok 79 - deny fetch unreachable SHA1, allowtipsha1inwant=true
expecting success:
mk_empty testrepo &&
(
cd testrepo &&
git config uploadpack.allowtipsha1inwant $configallowtipsha1inwant &&
git commit --allow-empty -m foo &&
git commit --allow-empty -m bar
) &&
SHA1=$(git --git-dir=testrepo/.git rev-parse HEAD^) &&
mk_empty shallow &&
(
cd shallow &&
# Some protocol versions (e.g. 2) support fetching
# unadvertised objects, so restrict this test to v0.
test_must_fail env GIT_TEST_PROTOCOL_VERSION= \
git fetch --depth=1 ../testrepo/.git $SHA1 &&
git --git-dir=../testrepo/.git config uploadpack.allowreachablesha1inwant true &&
git fetch --depth=1 ../testrepo/.git $SHA1 &&
git cat-file commit $SHA1
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
[master (root-commit) a6b22ca] foo
Author: A U Thor <author@example.com>
[master 5e26403] bar
Author: A U Thor <author@example.com>
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/shallow/.git/
error: Server does not allow request for unadvertised object a6b22cab249ba5160facc1657eff7e4bbd9ed808
From ../testrepo/
* branch a6b22cab249ba5160facc1657eff7e4bbd9ed808 -> FETCH_HEAD
tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
author A U Thor <author@example.com> 1112912053 -0700
committer C O Mitter <committer@example.com> 1112912053 -0700
foo
ok 80 - shallow fetch reachable SHA1 (but not a ref), allowtipsha1inwant=false
expecting success:
mk_empty testrepo &&
(
cd testrepo &&
git config uploadpack.allowtipsha1inwant $configallowtipsha1inwant &&
git commit --allow-empty -m foo &&
git commit --allow-empty -m bar &&
git commit --allow-empty -m xyz
) &&
SHA1_1=$(git --git-dir=testrepo/.git rev-parse HEAD^^) &&
SHA1_2=$(git --git-dir=testrepo/.git rev-parse HEAD^) &&
SHA1_3=$(git --git-dir=testrepo/.git rev-parse HEAD) &&
(
cd testrepo &&
git reset --hard $SHA1_2 &&
git cat-file commit $SHA1_1 &&
git cat-file commit $SHA1_3
) &&
mk_empty shallow &&
(
cd shallow &&
# Some protocol versions (e.g. 2) support fetching
# unadvertised objects, so restrict this test to v0.
test_must_fail env GIT_TEST_PROTOCOL_VERSION= \
git fetch ../testrepo/.git $SHA1_3 &&
test_must_fail env GIT_TEST_PROTOCOL_VERSION= \
git fetch ../testrepo/.git $SHA1_1 &&
git --git-dir=../testrepo/.git config uploadpack.allowreachablesha1inwant true &&
git fetch ../testrepo/.git $SHA1_1 &&
git cat-file commit $SHA1_1 &&
test_must_fail git cat-file commit $SHA1_2 &&
git fetch ../testrepo/.git $SHA1_2 &&
git cat-file commit $SHA1_2 &&
test_must_fail env GIT_TEST_PROTOCOL_VERSION= \
git fetch ../testrepo/.git $SHA1_3 2>err &&
test_i18ngrep "remote error:.*not our ref.*$SHA1_3\$" err
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
[master (root-commit) a6b22ca] foo
Author: A U Thor <author@example.com>
[master 5e26403] bar
Author: A U Thor <author@example.com>
[master 64ea4c1] xyz
Author: A U Thor <author@example.com>
HEAD is now at 5e26403 bar
tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
author A U Thor <author@example.com> 1112912053 -0700
committer C O Mitter <committer@example.com> 1112912053 -0700
foo
tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
parent 5e26403b4485d7a44fd8b65dc3f71e21c0dd6fad
author A U Thor <author@example.com> 1112912053 -0700
committer C O Mitter <committer@example.com> 1112912053 -0700
xyz
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/shallow/.git/
error: Server does not allow request for unadvertised object 64ea4c133d59fa98e86a771eda009872d6ab2886
error: Server does not allow request for unadvertised object a6b22cab249ba5160facc1657eff7e4bbd9ed808
From ../testrepo/
* branch a6b22cab249ba5160facc1657eff7e4bbd9ed808 -> FETCH_HEAD
tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
author A U Thor <author@example.com> 1112912053 -0700
committer C O Mitter <committer@example.com> 1112912053 -0700
foo
fatal: git cat-file 5e26403b4485d7a44fd8b65dc3f71e21c0dd6fad: bad file
From ../testrepo/
* branch 5e26403b4485d7a44fd8b65dc3f71e21c0dd6fad -> FETCH_HEAD
tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
parent a6b22cab249ba5160facc1657eff7e4bbd9ed808
author A U Thor <author@example.com> 1112912053 -0700
committer C O Mitter <committer@example.com> 1112912053 -0700
bar
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: remote error: upload-pack: not our ref 64ea4c133d59fa98e86a771eda009872d6ab2886
ok 81 - deny fetch unreachable SHA1, allowtipsha1inwant=false
expecting success:
mk_test testrepo heads/master &&
rm -fr src dst &&
git init src &&
(
cd src &&
git pull ../testrepo master &&
git tag -m "annotated" tag &&
git for-each-ref >tmp1 &&
(
cat tmp1
sed -n "s|refs/heads/master$|refs/remotes/origin/master|p" tmp1
) |
sort -k 3 >../expect
) &&
git init dst &&
(
cd dst &&
git remote add origin ../src &&
git config branch.master.remote origin &&
git config branch.master.merge refs/heads/master &&
git pull &&
git for-each-ref >../actual
) &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/src/.git/
From ../testrepo
* branch master -> FETCH_HEAD
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/dst/.git/
From ../src
* [new branch] master -> origin/master
* [new tag] tag -> tag
ok 82 - fetch follows tags by default
expecting success:
mk_empty testrepo &&
git -C testrepo commit --allow-empty -m one &&
git -C testrepo commit --allow-empty -m two &&
git -C testrepo tag -m foo mytag HEAD^ &&
oid=$(git -C testrepo rev-parse mytag^{commit}) &&
test_must_fail env GIT_TEST_PROTOCOL_VERSION= \
git fetch testrepo $oid 2>err &&
test_i18ngrep "Server does not allow request for unadvertised object" err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
[master (root-commit) d38f542] one
Author: A U Thor <author@example.com>
[master 37ed719] two
Author: A U Thor <author@example.com>
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: Server does not allow request for unadvertised object d38f542f2d868bcbbb09173528a3bb403f53a0f0
ok 83 - peeled advertisements are not considered ref tips
expecting success:
mk_test testrepo heads/master &&
rm -fr src dst &&
git init src &&
git init --bare dst &&
(
cd src &&
git pull ../testrepo master &&
git branch next &&
git config remote.dst.url ../dst &&
git config remote.dst.push "+refs/heads/*:refs/remotes/src/*" &&
git push dst master &&
git show-ref refs/heads/master |
sed -e "s|refs/heads/|refs/remotes/src/|" >../dst/expect
) &&
(
cd dst &&
test_must_fail git show-ref refs/heads/next &&
test_must_fail git show-ref refs/heads/master &&
git show-ref refs/remotes/src/master >actual
) &&
test_cmp dst/expect dst/actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/src/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/dst/
From ../testrepo
* branch master -> FETCH_HEAD
To ../dst
* [new branch] master -> src/master
ok 84 - pushing a specific ref applies remote.$name.push as refmap
expecting success:
mk_test testrepo heads/master &&
rm -fr src dst &&
git init src &&
git init --bare dst &&
(
cd src &&
git pull ../testrepo master &&
git branch next &&
git config remote.dst.url ../dst &&
git config push.default matching &&
git push dst master &&
git show-ref refs/heads/master >../dst/expect
) &&
(
cd dst &&
test_must_fail git show-ref refs/heads/next &&
git show-ref refs/heads/master >actual
) &&
test_cmp dst/expect dst/actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/src/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/dst/
From ../testrepo
* branch master -> FETCH_HEAD
To ../dst
* [new branch] master -> master
ok 85 - with no remote.$name.push, it is not used as refmap
expecting success:
mk_test testrepo heads/master &&
rm -fr src dst &&
git init src &&
git init --bare dst &&
(
cd src &&
git pull ../testrepo master &&
git branch next &&
git config remote.dst.url ../dst &&
git config remote.dst.fetch "+refs/heads/*:refs/remotes/dst/*" &&
git config push.default upstream &&
git config branch.master.merge refs/heads/trunk &&
git config branch.master.remote dst &&
git push dst master &&
git show-ref refs/heads/master |
sed -e "s|refs/heads/master|refs/heads/trunk|" >../dst/expect
) &&
(
cd dst &&
test_must_fail git show-ref refs/heads/master &&
test_must_fail git show-ref refs/heads/next &&
git show-ref refs/heads/trunk >actual
) &&
test_cmp dst/expect dst/actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/src/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/dst/
From ../testrepo
* branch master -> FETCH_HEAD
To ../dst
* [new branch] master -> trunk
ok 86 - with no remote.$name.push, upstream mapping is used
expecting success:
mk_test testrepo heads/master &&
rm -fr src dst &&
git init src &&
git init --bare dst &&
(
cd src &&
git pull ../testrepo master &&
git tag -m "annotated" tag &&
git checkout -b another &&
git commit --allow-empty -m "future commit" &&
git tag -m "future" future &&
git checkout master &&
git for-each-ref refs/heads/master >../expect &&
git push ../dst master
) &&
(
cd dst &&
git for-each-ref >../actual
) &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/src/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/dst/
From ../testrepo
* branch master -> FETCH_HEAD
Switched to a new branch 'another'
[another 951b7f2] future commit
Author: A U Thor <author@example.com>
Switched to branch 'master'
To ../dst
* [new branch] master -> master
ok 87 - push does not follow tags by default
expecting success:
mk_test testrepo heads/master &&
rm -fr src dst &&
git init src &&
git init --bare dst &&
(
cd src &&
git pull ../testrepo master &&
git tag -m "annotated" tag &&
git checkout -b another &&
git commit --allow-empty -m "future commit" &&
git tag -m "future" future &&
git checkout master &&
git for-each-ref refs/heads/master refs/tags/tag >../expect &&
git push --follow-tags ../dst master
) &&
(
cd dst &&
git for-each-ref >../actual
) &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
remote: warning: updating the current branch
To testrepo
* [new branch] b9c09d6cc74d3857142fb7c082dca65b88254c6d -> master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/src/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/dst/
From ../testrepo
* branch master -> FETCH_HEAD
Switched to a new branch 'another'
[another 951b7f2] future commit
Author: A U Thor <author@example.com>
Switched to branch 'master'
To ../dst
* [new branch] master -> master
* [new tag] tag -> tag
ok 88 - push --follow-tags only pushes relevant tags
expecting success:
cat >>path1 <<\EOF &&
keep base version of path1 big enough, compared to the new changes
later, in order to pass size heuristics in
builtin/pack-objects.c:try_delta()
EOF
git commit -am initial &&
git init no-thin &&
git --git-dir=no-thin/.git config receive.unpacklimit 0 &&
git push no-thin/.git refs/heads/master:refs/heads/foo &&
echo modified >> path1 &&
git commit -am modified &&
git repack -adf &&
rcvpck="git receive-pack --reject-thin-pack-for-testing" &&
git push --no-thin --receive-pack="$rcvpck" no-thin/.git refs/heads/master:refs/heads/foo
[master 40adbea] initial
Author: A U Thor <author@example.com>
1 file changed, 3 insertions(+)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/no-thin/.git/
To no-thin/.git
* [new branch] master -> foo
[master 7ee1f22] modified
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
To no-thin/.git
40adbea..7ee1f22 master -> foo
ok 89 - push --no-thin must produce non-thin pack
expecting success:
rm -rf dst.git &&
blob=$(echo unreferenced | git hash-object -w --stdin) &&
git tag -m foo tag-of-blob $blob &&
git init --bare dst.git &&
git push dst.git tag-of-blob &&
# the receiving index-pack should have noticed
# any problems, but we double check
echo unreferenced >expect &&
git --git-dir=dst.git cat-file blob tag-of-blob >actual &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/dst.git/
To dst.git
* [new tag] tag-of-blob -> tag-of-blob
ok 90 - pushing a tag pushes the tagged object
expecting success:
rm -rf dst.git &&
git init --bare dst.git &&
git -C dst.git config core.logallrefupdates true &&
# double push to test both with and without
# the actual pack transfer
git push dst.git master:one &&
echo "one@{0} push" >expect &&
git -C dst.git log -g --format="%gd %gs" one >actual &&
test_cmp expect actual &&
git push dst.git master:two &&
echo "two@{0} push" >expect &&
git -C dst.git log -g --format="%gd %gs" two >actual &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/dst.git/
To dst.git
* [new branch] master -> one
To dst.git
* [new branch] master -> two
ok 91 - push into bare respects core.logallrefupdates
expecting success:
rm -rf dst.git &&
git init --bare dst.git &&
(
cd dst.git &&
git config core.logallrefupdates true &&
# as above, we double-fetch to test both
# with and without pack transfer
git fetch .. master:one &&
echo "one@{0} fetch .. master:one: storing head" >expect &&
git log -g --format="%gd %gs" one >actual &&
test_cmp expect actual &&
git fetch .. master:two &&
echo "two@{0} fetch .. master:two: storing head" >expect &&
git log -g --format="%gd %gs" two >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/dst.git/
From ..
* [new branch] master -> one
* [new tag] deltag -> deltag
* [new tag] frotz -> frotz
* [new tag] v1.0 -> v1.0
From ..
* [new branch] master -> two
ok 92 - fetch into bare respects core.logallrefupdates
expecting success:
git push testrepo master &&
(
cd testrepo &&
git reset --hard &&
git config receive.denyCurrentBranch updateInstead
) &&
test_commit third path2 &&
# Try pushing into a repository with pristine working tree
git push testrepo master &&
(
cd testrepo &&
git update-index -q --refresh &&
git diff-files --quiet -- &&
git diff-index --quiet --cached HEAD -- &&
test third = "$(cat path2)" &&
test $(git -C .. rev-parse HEAD) = $(git rev-parse HEAD)
) &&
# Try pushing into a repository with working tree needing a refresh
(
cd testrepo &&
git reset --hard HEAD^ &&
test $(git -C .. rev-parse HEAD^) = $(git rev-parse HEAD) &&
test-tool chmtime +100 path1
) &&
git push testrepo master &&
(
cd testrepo &&
git update-index -q --refresh &&
git diff-files --quiet -- &&
git diff-index --quiet --cached HEAD -- &&
test_cmp ../path1 path1 &&
test third = "$(cat path2)" &&
test $(git -C .. rev-parse HEAD) = $(git rev-parse HEAD)
) &&
# Update what is to be pushed
test_commit fourth path2 &&
# Try pushing into a repository with a dirty working tree
# (1) the working tree updated
(
cd testrepo &&
echo changed >path1
) &&
test_must_fail git push testrepo master &&
(
cd testrepo &&
test $(git -C .. rev-parse HEAD^) = $(git rev-parse HEAD) &&
git diff --quiet --cached &&
test changed = "$(cat path1)"
) &&
# (2) the index updated
(
cd testrepo &&
echo changed >path1 &&
git add path1
) &&
test_must_fail git push testrepo master &&
(
cd testrepo &&
test $(git -C .. rev-parse HEAD^) = $(git rev-parse HEAD) &&
git diff --quiet &&
test changed = "$(cat path1)"
) &&
# Introduce a new file in the update
test_commit fifth path3 &&
# (3) the working tree has an untracked file that would interfere
(
cd testrepo &&
git reset --hard &&
echo changed >path3
) &&
test_must_fail git push testrepo master &&
(
cd testrepo &&
test $(git -C .. rev-parse HEAD^^) = $(git rev-parse HEAD) &&
git diff --quiet &&
git diff --quiet --cached &&
test changed = "$(cat path3)"
) &&
# (4) the target changes to what gets pushed but it still is a change
(
cd testrepo &&
git reset --hard &&
echo fifth >path3 &&
git add path3
) &&
test_must_fail git push testrepo master &&
(
cd testrepo &&
test $(git -C .. rev-parse HEAD^^) = $(git rev-parse HEAD) &&
git diff --quiet &&
test fifth = "$(cat path3)"
) &&
# (5) push into void
rm -fr void &&
git init void &&
(
cd void &&
git config receive.denyCurrentBranch updateInstead
) &&
git push void master &&
(
cd void &&
test $(git -C .. rev-parse master) = $(git rev-parse HEAD) &&
git diff --quiet &&
git diff --cached --quiet
) &&
# (6) updateInstead intervened by fast-forward check
test_must_fail git push void master^:master &&
test $(git -C void rev-parse HEAD) = $(git rev-parse master) &&
git -C void diff --quiet &&
git -C void diff --cached --quiet
remote: warning: updating the current branch
To testrepo
b9c09d6..7ee1f22 master -> master
HEAD is now at 7ee1f22 modified
[master af7aa26] third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
To testrepo
7ee1f22..af7aa26 master -> master
HEAD is now at 7ee1f22 modified
To testrepo
7ee1f22..af7aa26 master -> master
[master 1b12869] fourth
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
To testrepo
! [remote rejected] master -> master (Working directory has unstaged changes)
error: failed to push some refs to 'testrepo'
To testrepo
! [remote rejected] master -> master (Working directory has staged changes)
error: failed to push some refs to 'testrepo'
[master 99d9406] fifth
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 path3
HEAD is now at af7aa26 third
error: Untracked working tree file 'path3' would be overwritten by merge.
To testrepo
! [remote rejected] master -> master (Could not update working tree to new HEAD)
error: failed to push some refs to 'testrepo'
HEAD is now at af7aa26 third
To testrepo
! [remote rejected] master -> master (Working directory has staged changes)
error: failed to push some refs to 'testrepo'
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/void/.git/
To void
* [new branch] master -> master
To void
! [rejected] master^ -> master (non-fast-forward)
error: failed to push some refs to 'void'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
ok 93 - receive.denyCurrentBranch = updateInstead
expecting success:
rm -fr testrepo &&
git init testrepo &&
(
cd testrepo &&
git pull .. master &&
git reset --hard HEAD^^ &&
git tag initial &&
git config receive.denyCurrentBranch updateInstead &&
write_script .git/hooks/push-to-checkout <<-\EOF
echo >&2 updating from $(git rev-parse HEAD)
echo >&2 updating to "$1"
git update-index -q --refresh &&
git read-tree -u -m HEAD "$1" || {
status=$?
echo >&2 read-tree failed
exit $status
}
EOF
) &&
# Try pushing into a pristine
git push testrepo master &&
(
cd testrepo &&
git diff --quiet &&
git diff HEAD --quiet &&
test $(git -C .. rev-parse HEAD) = $(git rev-parse HEAD)
) &&
# Try pushing into a repository with conflicting change
(
cd testrepo &&
git reset --hard initial &&
echo conflicting >path2
) &&
test_must_fail git push testrepo master &&
(
cd testrepo &&
test $(git rev-parse initial) = $(git rev-parse HEAD) &&
test conflicting = "$(cat path2)" &&
git diff-index --quiet --cached HEAD
) &&
# Try pushing into a repository with unrelated change
(
cd testrepo &&
git reset --hard initial &&
echo unrelated >path1 &&
echo irrelevant >path5 &&
git add path5
) &&
git push testrepo master &&
(
cd testrepo &&
test "$(cat path1)" = unrelated &&
test "$(cat path5)" = irrelevant &&
test "$(git diff --name-only --cached HEAD)" = path5 &&
test $(git -C .. rev-parse HEAD) = $(git rev-parse HEAD)
) &&
# push into void
rm -fr void &&
git init void &&
(
cd void &&
git config receive.denyCurrentBranch updateInstead &&
write_script .git/hooks/push-to-checkout <<-\EOF
if git rev-parse --quiet --verify HEAD
then
has_head=yes
echo >&2 updating from $(git rev-parse HEAD)
else
has_head=no
echo >&2 pushing into void
fi
echo >&2 updating to "$1"
git update-index -q --refresh &&
case "$has_head" in
yes)
git read-tree -u -m HEAD "$1" ;;
no)
git read-tree -u -m "$1" ;;
esac || {
status=$?
echo >&2 read-tree failed
exit $status
}
EOF
) &&
git push void master &&
(
cd void &&
git diff --quiet &&
git diff --cached --quiet &&
test $(git -C .. rev-parse HEAD) = $(git rev-parse HEAD)
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/testrepo/.git/
From ..
* branch master -> FETCH_HEAD
HEAD is now at af7aa26 third
updating from af7aa264a0612fd7ca196f597c95342395812771
updating to 99d9406f2b363e93b6b8521b55ba2802ef67586a
To testrepo
af7aa26..99d9406 master -> master
HEAD is now at af7aa26 third
updating from af7aa264a0612fd7ca196f597c95342395812771
updating to 99d9406f2b363e93b6b8521b55ba2802ef67586a
error: Entry 'path2' not uptodate. Cannot merge.
read-tree failed
To testrepo
! [remote rejected] master -> master (push-to-checkout hook declined)
error: failed to push some refs to 'testrepo'
HEAD is now at af7aa26 third
updating from af7aa264a0612fd7ca196f597c95342395812771
updating to 99d9406f2b363e93b6b8521b55ba2802ef67586a
To testrepo
af7aa26..99d9406 master -> master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5516-fetch-push/void/.git/
pushing into void
updating to 99d9406f2b363e93b6b8521b55ba2802ef67586a
To void
* [new branch] master -> master
ok 94 - updateInstead with push-to-checkout hook
# passed all 94 test(s)
1..94
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5527-fetch-odd-refs.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5527-fetch-odd-refs/.git/
expecting success:
echo content >file &&
git add . &&
git commit -m one &&
git update-ref refs/for/refs/heads/master HEAD &&
echo content >>file &&
git commit -a -m two &&
echo content >>file &&
git commit -a -m three &&
git checkout HEAD^
[master (root-commit) ed6ccbc] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master c9a24ed] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 774f764] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at c9a24ed two
ok 1 - setup repo with odd suffix ref
expecting success:
git clone --bare file://"$PWD" suffix &&
echo three >expect &&
git --git-dir=suffix log -1 --format=%s refs/heads/master >actual &&
test_cmp expect actual
Cloning into bare repository 'suffix'...
ok 2 - suffix ref is ignored during fetch
expecting success:
ref240=$ZERO_OID/$ZERO_OID/$ZERO_OID/$ZERO_OID/$ZERO_OID/$ZERO_OID &&
ref1440=$ref240/$ref240/$ref240/$ref240/$ref240/$ref240 &&
git init long &&
(
cd long &&
test_commit long &&
test_commit master
) &&
if git -C long update-ref refs/heads/$ref1440 long; then
test_set_prereq LONG_REF
else
echo >&2 "long refs not supported"
fi
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5527-fetch-odd-refs/long/.git/
[master (root-commit) 92be28b] long
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 long.t
[master f3bdd7b] master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 master.t
ok 3 - try to create repo with absurdly long refname
expecting success:
git fetch long refs/heads/*:refs/remotes/long/* &&
cat >expect <<-\EOF &&
long
master
EOF
git for-each-ref --format="%(subject)" refs/remotes/long >actual &&
test_cmp expect actual
warning: no common commits
From long
* [new branch] 0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000 -> long/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000
* [new branch] master -> long/master
* [new tag] long -> long
* [new tag] master -> master
ok 4 - fetch handles extremely long refname
expecting success:
git push long :refs/heads/$ref1440 &&
git -C long for-each-ref --format="%(subject)" refs/heads >actual &&
echo master >expect &&
test_cmp expect actual
To long
- [deleted] 0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000/0000000000000000000000000000000000000000
ok 5 - push handles extremely long refname
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5529-push-errors.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5529-push-errors/.git/
expecting success:
test_commit one
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 1 - setup commits
expecting success:
git init --bare remote.git &&
git remote add origin remote.git
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5529-push-errors/remote.git/
ok 2 - setup remote
expecting success:
FAKE_RP_ROOT=$(pwd) &&
export FAKE_RP_ROOT &&
write_script fake-rp <<-\EOF &&
echo yes >"$FAKE_RP_ROOT"/rp-ran
exit 1
EOF
git config remote.origin.receivepack "\"\$FAKE_RP_ROOT/fake-rp\""
ok 3 - setup fake receive-pack
expecting success:
echo no >rp-ran &&
echo no >expect &&
test_must_fail git push origin missing &&
test_cmp expect rp-ran
error: src refspec missing does not match any
error: failed to push some refs to 'remote.git'
ok 4 - detect missing branches early
expecting success:
echo no >rp-ran &&
echo no >expect &&
test_must_fail git push origin master~2:master &&
test_cmp expect rp-ran
error: src refspec master~2 does not match any
error: failed to push some refs to 'remote.git'
ok 5 - detect missing sha1 expressions early
expecting success:
git branch foo &&
git tag foo &&
echo no >rp-ran &&
echo no >expect &&
test_must_fail git push origin foo &&
test_cmp expect rp-ran
error: src refspec foo matches more than one
error: failed to push some refs to 'remote.git'
ok 6 - detect ambiguous refs early
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5530-upload-pack-error.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5530-upload-pack-error/.git/
expecting success:
echo file >file &&
git add file &&
git rev-parse :file &&
git commit -a -m original &&
test_tick &&
echo changed >file &&
git commit -a -m changed &&
corrupt_repo HEAD:file
f73f3093ff865c514c6c51f867e35f693487d0d3
[master (root-commit) f1a3c7c] original
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 4bb1333] changed
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup and corrupt repository
expecting success:
test_must_fail git fsck
missing blob 5ea2ed416fbd4a4cbe227b75fe255dd7fa6bd4d6
ok 2 - fsck fails
expecting success:
printf "0032want %s\n00000009done\n0000" \
$(git rev-parse HEAD) >input &&
test_must_fail git upload-pack . <input >/dev/null 2>output.err &&
test_i18ngrep "unable to read" output.err &&
test_i18ngrep "pack-objects died" output.err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Binary file output.err matches
Binary file output.err matches
ok 3 - upload-pack fails due to error in pack-objects packing
expecting success:
git hash-object -w file &&
corrupt_repo HEAD^^{tree}
5ea2ed416fbd4a4cbe227b75fe255dd7fa6bd4d6
ok 4 - corrupt repo differently
expecting success:
test_must_fail git fsck
broken link from commit f1a3c7c45ac9f12a8381c80922fe369d4c120164
to tree bec63e37d08c454ad3a60cde90b70f3f7d077852
dangling blob f73f3093ff865c514c6c51f867e35f693487d0d3
missing tree bec63e37d08c454ad3a60cde90b70f3f7d077852
ok 5 - fsck fails
expecting success:
printf "0032want %s\n0034shallow %s00000009done\n0000" \
$(git rev-parse HEAD) $(git rev-parse HEAD^) >input &&
test_must_fail git upload-pack . <input >/dev/null 2>output.err &&
grep "bad tree object" output.err
Binary file output.err matches
ok 6 - upload-pack fails due to error in rev-list
expecting success:
printf "0045want %s multi_ack_detailed\n00000009done\n0000" \
"deadbeefdeadbeefdeadbeefdeadbeefdeadbeef" >input &&
test_must_fail git upload-pack . <input >output 2>output.err &&
grep "not our ref" output.err &&
grep "ERR" output &&
! grep multi_ack_detailed output.err
fatal: git upload-pack: not our ref deadbeefdeadbeefdeadbeefdeadbeefdeadbeef
Binary file output matches
ok 7 - upload-pack fails due to bad want (no object)
expecting success:
oid=$(echo an object we have | git hash-object -w --stdin) &&
printf "0045want %s multi_ack_detailed\n00000009done\n0000" \
"$oid" >input &&
test_must_fail git upload-pack . <input >output 2>output.err &&
grep "not our ref" output.err &&
grep "ERR" output &&
! grep multi_ack_detailed output.err
fatal: git upload-pack: not our ref 023832c7c4fbc3a6d75879d18bbbef0b476b78b5
Binary file output matches
ok 8 - upload-pack fails due to bad want (not tip)
expecting success:
printf "0032want %s\n00000009done\n0000" \
$(git rev-parse HEAD) >input &&
test_must_fail git upload-pack . <input >/dev/null 2>output.err &&
grep "bad tree object" output.err &&
grep "pack-objects died" output.err
Binary file output.err matches
Binary file output.err matches
ok 9 - upload-pack fails due to error in pack-objects enumeration
expecting success:
mkdir foo &&
cd foo &&
git init
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5530-upload-pack-error/foo/.git/
ok 10 - create empty repository
expecting success:
test_must_fail git fetch .. master
remote: fatal: bad tree object bec63e37d08c454ad3a60cde90b70f3f7d077852
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: protocol error: bad pack header
ok 11 - fetch fails
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5510-fetch.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.git/
expecting success:
echo >file original &&
git add file &&
git commit -a -m original
[master (root-commit) b2feadc] original
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 1 - setup
expecting success:
git clone . one &&
(
cd one &&
echo >file updated by one &&
git commit -a -m "updated by one"
) &&
git clone . two &&
(
cd two &&
git config branch.master.remote one &&
git config remote.one.url ../one/.git/ &&
git config remote.one.fetch refs/heads/master:refs/heads/one
) &&
git clone . three &&
(
cd three &&
git config branch.master.remote two &&
git config branch.master.merge refs/heads/one &&
mkdir -p .git/remotes &&
{
echo "URL: ../two/.git/"
echo "Pull: refs/heads/master:refs/heads/two"
echo "Pull: refs/heads/one:refs/heads/one"
} >.git/remotes/two
) &&
git clone . bundle &&
git clone . seven
Cloning into 'one'...
done.
[master beaa7f8] updated by one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Cloning into 'two'...
done.
Cloning into 'three'...
done.
Cloning into 'bundle'...
done.
Cloning into 'seven'...
done.
ok 2 - clone and setup child repos
expecting success:
cd "$D" &&
echo >file updated by origin &&
git commit -a -m "updated by origin" &&
cd two &&
git fetch &&
git rev-parse --verify refs/heads/one &&
mine=$(git rev-parse refs/heads/one) &&
his=$(cd ../one && git rev-parse refs/heads/master) &&
test "z$mine" = "z$his"
[master cc910fe] updated by origin
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
From ../one/
* [new branch] master -> one
beaa7f8ddb44a83937d2765269166c6bb7f3af32
ok 3 - fetch test
expecting success:
cd "$D" &&
cd three &&
git fetch &&
git rev-parse --verify refs/heads/two &&
git rev-parse --verify refs/heads/one &&
master_in_two=$(cd ../two && git rev-parse master) &&
one_in_two=$(cd ../two && git rev-parse one) &&
{
echo "$one_in_two "
echo "$master_in_two not-for-merge"
} >expected &&
cut -f -2 .git/FETCH_HEAD >actual &&
test_cmp expected actual
From ../two/
* [new branch] one -> one
* [new branch] master -> two
b2feadcf588d362bbd718ae40c077fcfb0eb700c
beaa7f8ddb44a83937d2765269166c6bb7f3af32
ok 4 - fetch test for-merge
expecting success:
cd "$D" &&
git clone . prune &&
cd prune &&
git update-ref refs/remotes/origin/extrabranch master &&
git fetch --prune origin &&
test_must_fail git rev-parse origin/extrabranch
Cloning into 'prune'...
done.
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/extrabranch
fatal: ambiguous argument 'origin/extrabranch': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
origin/extrabranch
ok 5 - fetch --prune on its own works as expected
expecting success:
cd "$D" &&
git clone . prune-branch &&
cd prune-branch &&
git update-ref refs/remotes/origin/extrabranch master &&
git fetch --prune origin master &&
git rev-parse origin/extrabranch
Cloning into 'prune-branch'...
done.
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* branch master -> FETCH_HEAD
cc910fe6ecaf9b3a82d6fafa971008f526127691
ok 6 - fetch --prune with a branch name keeps branches
expecting success:
cd "$D" &&
git clone . prune-namespace &&
cd prune-namespace &&
git fetch --prune origin refs/heads/a/*:refs/remotes/origin/a/* &&
git rev-parse origin/master
Cloning into 'prune-namespace'...
done.
cc910fe6ecaf9b3a82d6fafa971008f526127691
ok 7 - fetch --prune with a namespace keeps other namespaces
expecting success:
cd "$D" &&
git update-ref refs/pull/42/head master &&
git clone . prune-overlapping &&
cd prune-overlapping &&
git config --add remote.origin.fetch refs/pull/*/head:refs/remotes/origin/pr/* &&
git fetch --prune origin &&
git rev-parse origin/master &&
git rev-parse origin/pr/42 &&
git config --unset-all remote.origin.fetch &&
git config remote.origin.fetch refs/pull/*/head:refs/remotes/origin/pr/* &&
git config --add remote.origin.fetch refs/heads/*:refs/remotes/origin/* &&
git fetch --prune origin &&
git rev-parse origin/master &&
git rev-parse origin/pr/42
Cloning into 'prune-overlapping'...
done.
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new ref] refs/pull/42/head -> origin/pr/42
cc910fe6ecaf9b3a82d6fafa971008f526127691
cc910fe6ecaf9b3a82d6fafa971008f526127691
cc910fe6ecaf9b3a82d6fafa971008f526127691
cc910fe6ecaf9b3a82d6fafa971008f526127691
ok 8 - fetch --prune handles overlapping refspecs
expecting success:
cd "$D" &&
git clone . prune-tags &&
cd prune-tags &&
git tag sometag master &&
# Create what looks like a remote-tracking branch from an earlier
# fetch that has since been deleted from the remote:
git update-ref refs/remotes/origin/fake-remote master &&
git fetch --prune --tags origin &&
git rev-parse origin/master &&
test_must_fail git rev-parse origin/fake-remote &&
git rev-parse sometag
Cloning into 'prune-tags'...
done.
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/fake-remote
cc910fe6ecaf9b3a82d6fafa971008f526127691
fatal: ambiguous argument 'origin/fake-remote': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
origin/fake-remote
cc910fe6ecaf9b3a82d6fafa971008f526127691
ok 9 - fetch --prune --tags prunes branches but not tags
expecting success:
cd "$D" &&
git clone . prune-tags-branch &&
cd prune-tags-branch &&
git tag sometag master &&
git update-ref refs/remotes/origin/extrabranch master &&
git fetch --prune --tags origin master &&
git rev-parse origin/extrabranch &&
git rev-parse sometag
Cloning into 'prune-tags-branch'...
done.
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* branch master -> FETCH_HEAD
cc910fe6ecaf9b3a82d6fafa971008f526127691
cc910fe6ecaf9b3a82d6fafa971008f526127691
ok 10 - fetch --prune --tags with branch does not prune other things
expecting success:
cd "$D" &&
git clone . prune-tags-refspec &&
cd prune-tags-refspec &&
git tag sometag master &&
git update-ref refs/remotes/origin/foo/otherbranch master &&
git update-ref refs/remotes/origin/extrabranch master &&
git fetch --prune --tags origin refs/heads/foo/*:refs/remotes/origin/foo/* &&
test_must_fail git rev-parse refs/remotes/origin/foo/otherbranch &&
git rev-parse origin/extrabranch &&
git rev-parse sometag
Cloning into 'prune-tags-refspec'...
done.
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/foo/otherbranch
fatal: ambiguous argument 'refs/remotes/origin/foo/otherbranch': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
refs/remotes/origin/foo/otherbranch
cc910fe6ecaf9b3a82d6fafa971008f526127691
cc910fe6ecaf9b3a82d6fafa971008f526127691
ok 11 - fetch --prune --tags with refspec prunes based on refspec
expecting success:
cd "$D" &&
mkdir notags &&
cd notags &&
git init &&
git fetch -t ..
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/notags/.git/
From ..
* branch HEAD -> FETCH_HEAD
ok 12 - fetch tags when there is no tags
expecting success:
cd "$D" &&
git tag -a -m annotated anno HEAD &&
git tag light HEAD &&
mkdir four &&
cd four &&
git init &&
git fetch .. :track &&
git show-ref --verify refs/tags/anno &&
git show-ref --verify refs/tags/light
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/four/.git/
From ..
* [new ref] -> track
* [new tag] anno -> anno
* [new tag] light -> light
7576df6967232b8caffdd9fdcaf989ba63d4e5f1 refs/tags/anno
cc910fe6ecaf9b3a82d6fafa971008f526127691 refs/tags/light
ok 13 - fetch following tags
expecting success:
cd "$D" &&
git init descriptive &&
(
cd descriptive &&
git config remote.o.url .. &&
git config remote.o.fetch "refs/heads/*:refs/crazyheads/*" &&
git config --add remote.o.fetch "refs/others/*:refs/heads/*" &&
git fetch o
) &&
git tag -a -m "Descriptive tag" descriptive-tag &&
git branch descriptive-branch &&
git checkout descriptive-branch &&
echo "Nuts" >crazy &&
git add crazy &&
git commit -a -m "descriptive commit" &&
git update-ref refs/others/crazy HEAD &&
(
cd descriptive &&
git fetch o 2>actual &&
test_i18ngrep "new branch.* -> refs/crazyheads/descriptive-branch$" actual &&
test_i18ngrep "new tag.* -> descriptive-tag$" actual &&
test_i18ngrep "new ref.* -> crazy$" actual
) &&
git checkout master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/descriptive/.git/
From ..
* [new branch] master -> refs/crazyheads/master
* [new tag] anno -> anno
* [new tag] light -> light
Switched to branch 'descriptive-branch'
[descriptive-branch 6ea2378] descriptive commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 crazy
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
* [new branch] descriptive-branch -> refs/crazyheads/descriptive-branch
* [new tag] descriptive-tag -> descriptive-tag
* [new ref] refs/others/crazy -> crazy
Switched to branch 'master'
ok 14 - fetch uses remote ref names to describe new refs
expecting success:
cd "$D" &&
mkdir five &&
cd five &&
git init &&
test_must_fail git fetch .. anno:five
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/five/.git/
error: cannot update ref 'refs/heads/five': trying to write non-commit object 7576df6967232b8caffdd9fdcaf989ba63d4e5f1 to branch 'refs/heads/five'
From ..
! [new tag] anno -> five (unable to update local ref)
* [new tag] anno -> anno
ok 15 - fetch must not resolve short tag name
expecting success:
cd "$D" &&
git update-ref refs/remotes/six/HEAD HEAD &&
mkdir six &&
cd six &&
git init &&
git fetch .. six:six
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/six/.git/
From ..
* [new ref] six/HEAD -> six
* [new tag] anno -> anno
* [new tag] descriptive-tag -> descriptive-tag
* [new tag] light -> light
ok 16 - fetch can now resolve short remote name
expecting success:
cd "$D" &&
echo >file updated again by origin &&
git commit -a -m "tip" &&
git bundle create bundle1 master^..master
[master 8ed9872] tip
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 17 - create bundle 1
expecting success:
head -n 1 "$D"/bundle1 | grep "^#" &&
head -n 2 "$D"/bundle1 | grep "^-[0-9a-f]\{40\} " &&
head -n 3 "$D"/bundle1 | grep "^[0-9a-f]\{40\} " &&
head -n 4 "$D"/bundle1 | grep "^$"
# v2 git bundle
-cc910fe6ecaf9b3a82d6fafa971008f526127691 updated by origin
8ed9872773c014804efab3399cb60b3a7096e742 refs/heads/master
ok 18 - header of bundle looks right
expecting success:
cd "$D" &&
git bundle create bundle2 master~2..master
ok 19 - create bundle 2
expecting success:
cd "$D/bundle" &&
git checkout -b some-branch &&
test_must_fail git fetch "$D/bundle1" master:master
Switched to a new branch 'some-branch'
error: Repository lacks these prerequisite commits:
error: cc910fe6ecaf9b3a82d6fafa971008f526127691
ok 20 - unbundle 1
expecting success:
cd "$D" &&
convert_bundle_to_pack <bundle1 >bundle.pack &&
git index-pack bundle.pack &&
test_bundle_object_count bundle.pack 3
d04a73d08a3601cb0ab0a0cc9593444688871709
ok 21 - bundle 1 has only 3 files
expecting success:
cd "$D/bundle" &&
git fetch ../bundle2 master:master &&
test "tip" = "$(git log -1 --pretty=oneline master | cut -b42-)"
From ../bundle2
b2feadc..8ed9872 master -> master
ok 22 - unbundle 2
expecting success:
cd "$D" &&
touch file2 &&
git add file2 &&
git commit -m add.file2 file2 &&
git bundle create bundle3 -1 HEAD &&
convert_bundle_to_pack <bundle3 >bundle.pack &&
git index-pack bundle.pack &&
test_bundle_object_count bundle.pack 3
[master afd61ca] add.file2
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file2
5f3245bc24786c04ae58ce2f4ec2f92067be5635
ok 23 - bundle does not prerequisite objects
expecting success:
cd "$D" &&
git tag -a -m 1.0 v1.0 master &&
git bundle create bundle4 v1.0
ok 24 - bundle should be able to create a full history
expecting success:
git config branch.master.remote yeti &&
git config branch.master.merge refs/heads/bigfoot &&
git config remote.blub.url one &&
git config remote.blub.fetch "refs/heads/*:refs/remotes/one/*" &&
git fetch blub
From one
* [new branch] master -> one/master
ok 25 - fetch with a non-applying branch.<name>.merge
expecting success:
one_head=$(cd one && git rev-parse HEAD) &&
this_head=$(git rev-parse HEAD) &&
git update-ref -d FETCH_HEAD &&
git fetch one &&
test $one_head = "$(git rev-parse --verify FETCH_HEAD)" &&
test $this_head = "$(git rev-parse --verify HEAD)"
From one
* branch HEAD -> FETCH_HEAD
ok 26 - fetch from GIT URL with a non-applying branch.<name>.merge [1]
expecting success:
one_ref=$(cd one && git symbolic-ref HEAD) &&
git config branch.master.remote blub &&
git config branch.master.merge "$one_ref" &&
git update-ref -d FETCH_HEAD &&
git fetch one &&
test $one_head = "$(git rev-parse --verify FETCH_HEAD)" &&
test $this_head = "$(git rev-parse --verify HEAD)"
From one
* branch HEAD -> FETCH_HEAD
ok 27 - fetch from GIT URL with a non-applying branch.<name>.merge [2]
expecting success:
git config branch.master.merge "${one_ref}_not" &&
git update-ref -d FETCH_HEAD &&
git fetch one &&
test $one_head = "$(git rev-parse --verify FETCH_HEAD)" &&
test $this_head = "$(git rev-parse --verify HEAD)"
From one
* branch HEAD -> FETCH_HEAD
ok 28 - fetch from GIT URL with a non-applying branch.<name>.merge [3]
expecting success:
test_must_fail git fetch "a\\!'b" > result 2>&1 &&
cat result &&
grep "fatal: 'a\\\\!'b'" result
fatal: 'a\!'b' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: 'a\!'b' does not appear to be a git repository
ok 29 - quoting of a strangely named repo
expecting success:
cd "$D" &&
git bundle create bundle5 HEAD master &&
git bundle list-heads bundle5 >actual &&
for h in HEAD refs/heads/master
do
echo "$(git rev-parse --verify $h) $h"
done >expect &&
test_cmp expect actual
ok 30 - bundle should record HEAD correctly
expecting success:
(
cd three &&
git tag base-origin-master refs/remotes/origin/master
)
ok 31 - mark initial state of origin/master
expecting success:
cd "$D" &&
git branch -f side &&
(
cd three &&
git update-ref refs/remotes/origin/master base-origin-master &&
o=$(git rev-parse --verify refs/remotes/origin/master) &&
git fetch origin master &&
n=$(git rev-parse --verify refs/remotes/origin/master) &&
test "$o" != "$n" &&
test_must_fail git rev-parse --verify refs/remotes/origin/side
)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* branch master -> FETCH_HEAD
b2feadc..afd61ca master -> origin/master
fatal: Needed a single revision
ok 32 - explicit fetch should update tracking
expecting success:
cd "$D" &&
git branch -f side &&
(
cd three &&
git update-ref refs/remotes/origin/master base-origin-master &&
o=$(git rev-parse --verify refs/remotes/origin/master) &&
git pull origin master &&
n=$(git rev-parse --verify refs/remotes/origin/master) &&
test "$o" != "$n" &&
test_must_fail git rev-parse --verify refs/remotes/origin/side
)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* branch master -> FETCH_HEAD
b2feadc..afd61ca master -> origin/master
Updating b2feadc..afd61ca
Fast-forward
file | 2 +-
file2 | 0
2 files changed, 1 insertion(+), 1 deletion(-)
create mode 100644 file2
fatal: Needed a single revision
ok 33 - explicit pull should update tracking
expecting success:
cd "$D" &&
(
cd three &&
test_must_fail git fetch --refmap="*:refs/remotes/none/*"
)
fatal: --refmap option is only meaningful with command-line refspec(s).
ok 34 - explicit --refmap is allowed only with command-line refspec
expecting success:
cd "$D" &&
git branch -f side &&
(
cd three &&
git update-ref refs/remotes/origin/master base-origin-master &&
o=$(git rev-parse --verify refs/remotes/origin/master) &&
git fetch --refmap="refs/heads/*:refs/remotes/other/*" origin master &&
n=$(git rev-parse --verify refs/remotes/origin/master) &&
test "$o" = "$n" &&
test_must_fail git rev-parse --verify refs/remotes/origin/side &&
git rev-parse --verify refs/remotes/other/master
)
fatal: the remote end hung up unexpectedly
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* branch master -> FETCH_HEAD
* [new branch] master -> other/master
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 35 - explicit --refmap option overrides remote.*.fetch
expecting success:
cd "$D" &&
git branch -f side &&
(
cd three &&
git update-ref refs/remotes/origin/master base-origin-master &&
o=$(git rev-parse --verify refs/remotes/origin/master) &&
git fetch --refmap="" origin master &&
n=$(git rev-parse --verify refs/remotes/origin/master) &&
test "$o" = "$n" &&
test_must_fail git rev-parse --verify refs/remotes/origin/side
)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* branch master -> FETCH_HEAD
fatal: Needed a single revision
ok 36 - explicitly empty --refmap option disables remote.*.fetch
expecting success:
cd "$D" &&
git branch -f side &&
(
cd three &&
git update-ref refs/remotes/origin/master base-origin-master &&
o=$(git rev-parse --verify refs/remotes/origin/master) &&
git fetch origin &&
n=$(git rev-parse --verify refs/remotes/origin/master) &&
test "$o" != "$n" &&
git rev-parse --verify refs/remotes/origin/side
)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] descriptive-branch -> origin/descriptive-branch
b2feadc..afd61ca master -> origin/master
* [new branch] side -> origin/side
* [new tag] anno -> anno
* [new tag] descriptive-tag -> descriptive-tag
* [new tag] light -> light
* [new tag] v1.0 -> v1.0
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 37 - configured fetch updates tracking
expecting success:
cd "$D" &&
git update-ref refs/odd/location HEAD &&
(
cd three &&
git update-ref refs/remotes/origin/master base-origin-master &&
git config --add remote.origin.fetch \
refs/odd/location:refs/remotes/origin/odd &&
o=$(git rev-parse --verify refs/remotes/origin/master) &&
git fetch origin master &&
n=$(git rev-parse --verify refs/remotes/origin/master) &&
test "$o" != "$n" &&
test_must_fail git rev-parse --verify refs/remotes/origin/odd
)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* branch master -> FETCH_HEAD
b2feadc..afd61ca master -> origin/master
fatal: Needed a single revision
ok 38 - non-matching refspecs do not confuse tracking update
expecting success:
cd "$D" &&
test_must_fail git push seven no:no
error: src refspec no does not match any
error: failed to push some refs to 'seven'
ok 39 - pushing nonexistent branch by mistake should not segv
expecting success:
cd "$D" &&
git clone .git follow &&
git checkout HEAD^0 &&
(
for i in 1 2 3 4 5 6 7
do
echo $i >>file &&
git commit -m $i -a &&
git tag -a -m $i excess-$i || exit 1
done
) &&
git checkout master &&
(
cd follow &&
git fetch
)
Cloning into 'follow'...
done.
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at afd61ca add.file2
[detached HEAD 5970eff] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[detached HEAD 9d3ed9c] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[detached HEAD 37aea69] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[detached HEAD df9cb72] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[detached HEAD 9004fca] 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[detached HEAD 400f96e] 6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[detached HEAD 00ac2e7] 7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Previous HEAD position was 00ac2e7 7
Switched to branch 'master'
Your branch is based on 'one/master_not', but the upstream is gone.
(use "git branch --unset-upstream" to fixup)
ok 40 - auto tag following fetches minimum
expecting success:
test_must_fail git fetch . side:master
fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository
fatal: the remote end hung up unexpectedly
ok 41 - refuse to fetch into the current branch
expecting success:
git fetch --update-head-ok . side:master
ok 42 - fetch into the current branch with --update-head-ok
expecting success:
rm -f .git/FETCH_HEAD &&
git fetch --dry-run . &&
! test -f .git/FETCH_HEAD
From .
* branch HEAD -> FETCH_HEAD
ok 43 - fetch --dry-run
expecting success:
mkdir dups &&
(
cd dups &&
git init &&
git config branch.master.remote three &&
git config remote.three.url ../three/.git &&
git config remote.three.fetch +refs/heads/*:refs/remotes/origin/* &&
git config --add remote.three.fetch +refs/heads/*:refs/remotes/origin/* &&
git fetch three
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/dups/.git/
From ../three/
* [new branch] master -> origin/master
* [new branch] one -> origin/one
* [new branch] two -> origin/two
* [new tag] base-origin-master -> base-origin-master
* [new tag] v1.0 -> v1.0
* [new tag] anno -> anno
* [new tag] descriptive-tag -> descriptive-tag
* [new tag] light -> light
ok 44 - should be able to fetch with duplicate refspecs
expecting success:
mkdir lhs-ambiguous &&
(
cd lhs-ambiguous &&
git init server &&
test_commit -C server unwanted &&
test_commit -C server wanted &&
git init client &&
# Check a name coming after "refs" alphabetically ...
git -C server update-ref refs/heads/s wanted &&
git -C server update-ref refs/heads/refs/heads/s unwanted &&
git -C client fetch ../server +refs/heads/s:refs/heads/checkthis &&
git -C server rev-parse wanted >expect &&
git -C client rev-parse checkthis >actual &&
test_cmp expect actual &&
# ... and one before.
git -C server update-ref refs/heads/q wanted &&
git -C server update-ref refs/heads/refs/heads/q unwanted &&
git -C client fetch ../server +refs/heads/q:refs/heads/checkthis &&
git -C server rev-parse wanted >expect &&
git -C client rev-parse checkthis >actual &&
test_cmp expect actual &&
# Tags are preferred over branches like refs/{heads,tags}/*
git -C server update-ref refs/tags/t wanted &&
git -C server update-ref refs/heads/t unwanted &&
git -C client fetch ../server +t:refs/heads/checkthis &&
git -C server rev-parse wanted >expect &&
git -C client rev-parse checkthis >actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/lhs-ambiguous/server/.git/
[master (root-commit) 4bd74f6] unwanted
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 unwanted.t
[master 2680c84] wanted
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 wanted.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/lhs-ambiguous/client/.git/
From ../server
* [new branch] s -> checkthis
* [new tag] wanted -> wanted
* [new tag] unwanted -> unwanted
From ../server
* [new tag] t -> t
ok 45 - LHS of refspec follows ref disambiguation rules
expecting success:
remote_url="file://$(git -C one config remote.origin.url)" &&
remote_fetch="$(git -C one config remote.origin.fetch)" &&
cmdline_setup="\"$remote_url\" \"$remote_fetch\""
ok 46 - setup cmdline_setup variable for subsequent test
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] descriptive-branch -> origin/descriptive-branch
b2feadc..afd61ca master -> origin/master
* [new branch] newbranch -> origin/newbranch
* [new branch] side -> origin/side
* [new tag] newtag -> newtag
* [new tag] v1.0 -> v1.0
* [new tag] anno -> anno
* [new tag] descriptive-tag -> descriptive-tag
* [new tag] light -> light
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 47 - name prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 48 - link prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --no-prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 49 - name prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --no-prune; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --no-prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 50 - link prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --no-prune; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 51 - name prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --prune; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 52 - link prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --prune; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune origin refs/tags/*:refs/tags/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> newtag
* [new tag] excess-1 -> excess-1
* [new tag] excess-2 -> excess-2
* [new tag] excess-3 -> excess-3
* [new tag] excess-4 -> excess-4
* [new tag] excess-5 -> excess-5
* [new tag] excess-6 -> excess-6
* [new tag] excess-7 -> excess-7
afd61ca8319290eb90edd5c19463779bd540d0a1
fatal: Needed a single revision
ok 53 - name prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --prune origin refs/tags/*:refs/tags/*; branch:kept tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." refs/tags/*:refs/tags/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
fatal: Needed a single revision
ok 54 - link prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --prune origin refs/tags/*:refs/tags/*; branch:kept tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune origin refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 55 - name prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --prune origin refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/*; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 56 - link prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --prune origin refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/*; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 57 - name prune fetch.prune=false remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 58 - link prune fetch.prune=false remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --no-prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 59 - name prune fetch.prune=false remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --no-prune; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --no-prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 60 - link prune fetch.prune=false remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --no-prune; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 61 - name prune fetch.prune=false remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --prune; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 62 - link prune fetch.prune=false remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --prune; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 63 - name prune fetch.prune=true remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 64 - link prune fetch.prune=true remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 65 - name prune fetch.prune=true remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --prune; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 66 - link prune fetch.prune=true remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --prune; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --no-prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 67 - name prune fetch.prune=true remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --no-prune; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --no-prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 68 - link prune fetch.prune=true remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --no-prune; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 69 - name prune fetch.prune=unset remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 70 - link prune fetch.prune=unset remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --no-prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 71 - name prune fetch.prune=unset remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset --no-prune; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --no-prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 72 - link prune fetch.prune=unset remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset --no-prune; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 73 - name prune fetch.prune=unset remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset --prune; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 74 - link prune fetch.prune=unset remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset --prune; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 75 - name prune fetch.prune=false remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 76 - link prune fetch.prune=false remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --no-prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 77 - name prune fetch.prune=false remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset --no-prune; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --no-prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 78 - link prune fetch.prune=false remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset --no-prune; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 79 - name prune fetch.prune=false remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset --prune; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 80 - link prune fetch.prune=false remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset --prune; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune origin refs/tags/*:refs/tags/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
fatal: Needed a single revision
ok 81 - name prune fetch.prune=false remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset --prune origin refs/tags/*:refs/tags/*; branch:kept tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." refs/tags/*:refs/tags/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
fatal: Needed a single revision
ok 82 - link prune fetch.prune=false remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset --prune origin refs/tags/*:refs/tags/*; branch:kept tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune origin refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 83 - name prune fetch.prune=false remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset --prune origin refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/*; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 84 - link prune fetch.prune=false remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset --prune origin refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/*; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 85 - name prune fetch.prune=true remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 86 - link prune fetch.prune=true remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 87 - name prune fetch.prune=true remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset --prune; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 88 - link prune fetch.prune=true remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset --prune; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --no-prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 89 - name prune fetch.prune=true remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset --no-prune; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --no-prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 90 - link prune fetch.prune=true remote.origin.prune=false fetch.pruneTags=unset remote.origin.pruneTags=unset --no-prune; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 91 - name prune fetch.prune=unset remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 92 - link prune fetch.prune=unset remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --no-prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 93 - name prune fetch.prune=unset remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset --no-prune; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --no-prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 94 - link prune fetch.prune=unset remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset --no-prune; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 95 - name prune fetch.prune=unset remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset --prune; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 96 - link prune fetch.prune=unset remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset --prune; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 97 - name prune fetch.prune=false remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 98 - link prune fetch.prune=false remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --no-prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 99 - name prune fetch.prune=false remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset --no-prune; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --no-prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 100 - link prune fetch.prune=false remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset --no-prune; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 101 - name prune fetch.prune=false remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset --prune; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 102 - link prune fetch.prune=false remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset --prune; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 103 - name prune fetch.prune=true remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 104 - link prune fetch.prune=true remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 105 - name prune fetch.prune=true remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset --prune; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 106 - link prune fetch.prune=true remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset --prune; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --no-prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 107 - name prune fetch.prune=true remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset --no-prune; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --no-prune &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 108 - link prune fetch.prune=true remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset --no-prune; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune origin refs/tags/*:refs/tags/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
fatal: Needed a single revision
ok 109 - name prune fetch.prune=true remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset --prune origin refs/tags/*:refs/tags/*; branch:kept tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." refs/tags/*:refs/tags/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
fatal: Needed a single revision
ok 110 - link prune fetch.prune=true remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset --prune origin refs/tags/*:refs/tags/*; branch:kept tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune origin refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 111 - name prune fetch.prune=true remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset --prune origin refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/*; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 112 - link prune fetch.prune=true remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=unset --prune origin refs/tags/*:refs/tags/* +refs/heads/*:refs/remotes/origin/*; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune-tags &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 113 - name prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --prune-tags; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune-tags &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 114 - link prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --prune-tags; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 115 - name prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=true remote.origin.pruneTags=unset; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" refs/tags/*:refs/tags/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 116 - link prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=true remote.origin.pruneTags=unset; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 117 - name prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=true; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" refs/tags/*:refs/tags/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 118 - link prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=true; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune --prune-tags &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 119 - name prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --prune --prune-tags; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune --prune-tags &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 120 - link prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --prune --prune-tags; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 121 - name prune fetch.prune=true remote.origin.prune=unset fetch.pruneTags=true remote.origin.pruneTags=unset; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" refs/tags/*:refs/tags/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 122 - link prune fetch.prune=true remote.origin.prune=unset fetch.pruneTags=true remote.origin.pruneTags=unset; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 123 - name prune fetch.prune=unset remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=true; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" refs/tags/*:refs/tags/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 124 - link prune fetch.prune=unset remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=true; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 125 - name prune fetch.prune=true remote.origin.prune=unset fetch.pruneTags=true remote.origin.pruneTags=unset; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" refs/tags/*:refs/tags/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 126 - link prune fetch.prune=true remote.origin.prune=unset fetch.pruneTags=true remote.origin.pruneTags=unset; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 127 - name prune fetch.prune=false remote.origin.prune=true fetch.pruneTags=false remote.origin.pruneTags=true; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" refs/tags/*:refs/tags/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 128 - link prune fetch.prune=false remote.origin.prune=true fetch.pruneTags=false remote.origin.pruneTags=true; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 129 - name prune fetch.prune=true remote.origin.prune=false fetch.pruneTags=true remote.origin.pruneTags=false; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" refs/tags/*:refs/tags/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 130 - link prune fetch.prune=true remote.origin.prune=false fetch.pruneTags=true remote.origin.pruneTags=false; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune --prune-tags origin +refs/heads/*:refs/remotes/origin/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 131 - name prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --prune --prune-tags origin +refs/heads/*:refs/remotes/origin/*; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune --prune-tags "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." +refs/heads/*:refs/remotes/origin/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 132 - link prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --prune --prune-tags origin +refs/heads/*:refs/remotes/origin/*; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune origin +refs/heads/*:refs/remotes/origin/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 133 - name prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=true remote.origin.pruneTags=unset --prune origin +refs/heads/*:refs/remotes/origin/*; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." +refs/heads/*:refs/remotes/origin/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 134 - link prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=true remote.origin.pruneTags=unset --prune origin +refs/heads/*:refs/remotes/origin/*; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune origin +refs/heads/*:refs/remotes/origin/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 135 - name prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=true --prune origin +refs/heads/*:refs/remotes/origin/*; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." +refs/heads/*:refs/remotes/origin/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
fatal: Needed a single revision
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 136 - link prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=true --prune origin +refs/heads/*:refs/remotes/origin/*; branch:pruned tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch origin --prune-tags &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 137 - name prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset origin --prune-tags; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." --prune-tags &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
ok 138 - link prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset origin --prune-tags; branch:kept tag:kept
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch origin --prune --prune-tags &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 139 - name prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset origin --prune --prune-tags; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." --prune --prune-tags &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
fatal: Needed a single revision
ok 140 - link prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset origin --prune --prune-tags; branch:kept tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune --prune-tags origin &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 141 - name prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --prune --prune-tags origin; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune --prune-tags "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
fatal: Needed a single revision
ok 142 - link prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset --prune --prune-tags origin; branch:kept tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune origin &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 143 - name prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=true remote.origin.pruneTags=unset --prune origin; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." refs/tags/*:refs/tags/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
fatal: Needed a single revision
ok 144 - link prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=true remote.origin.pruneTags=unset --prune origin; branch:kept tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune origin &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 145 - name prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=true --prune origin; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch --prune "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." refs/tags/*:refs/tags/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
fatal: Needed a single revision
ok 146 - link prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=true --prune origin; branch:kept tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch origin &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 147 - name prune fetch.prune=true remote.origin.prune=unset fetch.pruneTags=true remote.origin.pruneTags=unset origin; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." refs/tags/*:refs/tags/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
fatal: Needed a single revision
ok 148 - link prune fetch.prune=true remote.origin.prune=unset fetch.pruneTags=true remote.origin.pruneTags=unset origin; branch:kept tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch origin &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 149 - name prune fetch.prune=unset remote.origin.prune=true fetch.pruneTags=true remote.origin.pruneTags=unset origin; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." refs/tags/*:refs/tags/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
fatal: Needed a single revision
ok 150 - link prune fetch.prune=unset remote.origin.prune=true fetch.pruneTags=true remote.origin.pruneTags=unset origin; branch:kept tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch origin &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/newbranch
- [deleted] (none) -> newtag
fatal: Needed a single revision
fatal: Needed a single revision
ok 151 - name prune fetch.prune=unset remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=true origin; branch:pruned tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." refs/tags/*:refs/tags/* &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new branch] newbranch -> origin/newbranch
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
fatal: Needed a single revision
ok 152 - link prune fetch.prune=unset remote.origin.prune=true fetch.pruneTags=unset remote.origin.pruneTags=true origin; branch:kept tag:pruned
expecting success:
(
cd one &&
git config --unset-all remote.origin.fetch
)
ok 153 - remove remote.origin.fetch "one"
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch origin --prune --prune-tags &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> newtag
* branch master -> FETCH_HEAD
afd61ca8319290eb90edd5c19463779bd540d0a1
fatal: Needed a single revision
ok 154 - name prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset origin --prune --prune-tags; branch:kept tag:pruned
expecting success:
# make sure a newbranch is there in . and also in one
git branch -f newbranch &&
git tag -f newtag &&
(
cd one &&
test_unconfig fetch.prune &&
test_unconfig fetch.pruneTags &&
test_unconfig remote.origin.prune &&
test_unconfig remote.origin.pruneTags &&
git fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." "+refs/heads/*:refs/remotes/origin/*" &&
git rev-parse --verify refs/remotes/origin/newbranch &&
git rev-parse --verify refs/tags/newtag
) &&
# now remove them
git branch -d newbranch &&
git tag -d newtag &&
# then test
(
cd one &&
git_fetch_c="" &&
set_config_tristate fetch.prune $fetch_prune &&
set_config_tristate fetch.pruneTags $fetch_prune_tags &&
set_config_tristate remote.origin.prune $remote_origin_prune &&
set_config_tristate remote.origin.pruneTags $remote_origin_prune_tags &&
if test "$mode" != "link"
then
git_fetch_c=""
fi &&
git$git_fetch_c fetch "file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/." --prune --prune-tags &&
case "$expected_branch" in
pruned)
test_must_fail git rev-parse --verify refs/remotes/origin/newbranch
;;
kept)
git rev-parse --verify refs/remotes/origin/newbranch
;;
esac &&
case "$expected_tag" in
pruned)
test_must_fail git rev-parse --verify refs/tags/newtag
;;
kept)
git rev-parse --verify refs/tags/newtag
;;
esac
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
* [new tag] newtag -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
afd61ca8319290eb90edd5c19463779bd540d0a1
Deleted branch newbranch (was afd61ca).
Deleted tag 'newtag' (was afd61ca)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> newtag
afd61ca8319290eb90edd5c19463779bd540d0a1
fatal: Needed a single revision
ok 155 - link prune fetch.prune=unset remote.origin.prune=unset fetch.pruneTags=unset remote.origin.pruneTags=unset origin --prune --prune-tags; branch:kept tag:pruned
expecting success:
test_commit base &&
test_commit oneside &&
git checkout HEAD^ &&
test_commit otherside &&
git checkout master &&
test_tick &&
git merge otherside &&
ad=$(git log --no-walk --format=%ad HEAD) &&
git bundle create twoside-boundary.bdl master --since="$ad" &&
convert_bundle_to_pack <twoside-boundary.bdl >twoside-boundary.pack &&
pack=$(git index-pack --fix-thin --stdin <twoside-boundary.pack) &&
test_bundle_object_count .git/objects/pack/pack-${pack##pack }.pack 3
[master 807c855] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 base.t
[master 9ebe1f8] oneside
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 oneside.t
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 807c855 base
[detached HEAD 7bea0a7] otherside
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 otherside.t
Previous HEAD position was 7bea0a7 otherside
Switched to branch 'master'
Your branch is based on 'one/master_not', but the upstream is gone.
(use "git branch --unset-upstream" to fixup)
Merging:
9ebe1f8 oneside
virtual otherside
found 1 common ancestor:
807c855 base
Merge made by the 'recursive' strategy.
otherside.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 otherside.t
ok 156 - all boundary commits are excluded
expecting success:
git branch goodbye &&
git clone . only-prunes &&
git branch -D goodbye &&
(
cd only-prunes &&
git fetch --prune origin 2>&1 | head -n1 >../actual
) &&
echo "From ${D}/." >expect &&
test_i18ncmp expect actual
Cloning into 'only-prunes'...
done.
Deleted branch goodbye (was fe9cfb7).
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 157 - fetch --prune prints the remotes url
expecting success:
git branch dir/file &&
git clone . prune-df-conflict &&
git branch -D dir/file &&
git branch dir &&
(
cd prune-df-conflict &&
git fetch --prune &&
git rev-parse origin/dir >../actual
) &&
git rev-parse dir >expect &&
test_cmp expect actual
Cloning into 'prune-df-conflict'...
done.
Deleted branch dir/file (was fe9cfb7).
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/.
- [deleted] (none) -> origin/dir/file
* [new branch] dir -> origin/dir
ok 158 - branchname D/F conflict resolved by --prune
expecting success:
test_commit extra &&
git reset --hard HEAD^ &&
git update-ref refs/foo extra &&
git init one-level &&
(
cd one-level &&
git fetch .. HEAD refs/foo
)
[master 98d280b] extra
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 extra.t
HEAD is now at fe9cfb7 Merge tag 'otherside'
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/one-level/.git/
From ..
* branch HEAD -> FETCH_HEAD
* branch refs/foo -> FETCH_HEAD
ok 159 - fetching a one-level ref works
expecting success:
write_script askyesno <<-\EOF &&
echo "$*" &&
false
EOF
git clone "file://$D" auto-gc &&
test_commit test2 &&
(
cd auto-gc &&
git config fetch.unpackLimit 1 &&
git config gc.autoPackLimit 1 &&
git config gc.autoDetach false &&
GIT_ASK_YESNO="$D/askyesno" git fetch >fetch.out 2>&1 &&
test_i18ngrep "Auto packing the repository" fetch.out &&
! grep "Should I try again" fetch.out
)
Cloning into 'auto-gc'...
[master 6e7bb68] test2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 test2.t
Auto packing the repository for optimum performance.
ok 160 - fetching with auto-gc does not lock up
expecting success:
git clone . full-output &&
test_commit looooooooooooong-tag &&
(
cd full-output &&
git -c fetch.output=full fetch origin >actual 2>&1 &&
grep -e "->" actual | cut -c 22- >../actual
) &&
cat >expect <<-\EOF &&
master -> origin/master
looooooooooooong-tag -> looooooooooooong-tag
EOF
test_cmp expect actual
Cloning into 'full-output'...
done.
[master 806c6f4] looooooooooooong-tag
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 looooooooooooong-tag.t
ok 161 - fetch aligned output
expecting success:
git clone . compact &&
test_commit extraaa &&
(
cd compact &&
git -c fetch.output=compact fetch origin >actual 2>&1 &&
grep -e "->" actual | cut -c 22- >../actual
) &&
cat >expect <<-\EOF &&
master -> origin/*
extraaa -> *
EOF
test_cmp expect actual
Cloning into 'compact'...
done.
[master 6027935] extraaa
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 extraaa.t
ok 162 - fetch compact output
expecting success:
setup_negotiation_tip server server 0 &&
GIT_TRACE_PACKET="$(pwd)/trace" git -C client fetch \
--negotiation-tip=alpha_1 --negotiation-tip=beta_1 \
origin alpha_s beta_s &&
check_negotiation_tip
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/server/.git/
[master (root-commit) 8870ee7] alpha_1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 alpha_1.t
[master 13d40be] alpha_2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 alpha_2.t
Switched to a new branch 'beta'
[beta (root-commit) 8b58bcd] beta_1
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 alpha_1.t
create mode 100644 alpha_2.t
create mode 100644 beta_1.t
[beta 8717e02] beta_2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 beta_2.t
Cloning into 'client'...
done.
[beta 4e0d39f] beta_s
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 beta_s.t
Switched to branch 'master'
[master e193389] alpha_s
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 alpha_s.t
Deleted tag 'alpha_1' (was 8870ee7)
Deleted tag 'alpha_2' (was 13d40be)
Deleted tag 'beta_1' (was 8b58bcd)
Deleted tag 'beta_2' (was 8717e02)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/server
* tag alpha_s -> FETCH_HEAD
* tag beta_s -> FETCH_HEAD
packet: fetch> have 8870ee78dee82f6c868de93e6270cecd30ea6dfa
packet: fetch> have 8b58bcd779f7cba7f929390b9badcb8ce5a6f263
ok 163 - --negotiation-tip limits "have" lines sent
expecting success:
setup_negotiation_tip server server 0 &&
GIT_TRACE_PACKET="$(pwd)/trace" git -C client fetch \
--negotiation-tip=*_1 \
origin alpha_s beta_s &&
check_negotiation_tip
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/server/.git/
[master (root-commit) 5c7e6af] alpha_1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 alpha_1.t
[master e1114f7] alpha_2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 alpha_2.t
Switched to a new branch 'beta'
[beta (root-commit) 50cdf62] beta_1
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 alpha_1.t
create mode 100644 alpha_2.t
create mode 100644 beta_1.t
[beta dfec498] beta_2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 beta_2.t
Cloning into 'client'...
done.
[beta e77e52c] beta_s
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 beta_s.t
Switched to branch 'master'
[master aa70094] alpha_s
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 alpha_s.t
Deleted tag 'alpha_1' (was 5c7e6af)
Deleted tag 'alpha_2' (was e1114f7)
Deleted tag 'beta_1' (was 50cdf62)
Deleted tag 'beta_2' (was dfec498)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/server
* tag alpha_s -> FETCH_HEAD
* tag beta_s -> FETCH_HEAD
packet: fetch> have 5c7e6af9b6b72477ca865b31116bac15243f0101
packet: fetch> have 50cdf6286d0b8ad2b70f52ffe8f6fa4e6b7eb924
ok 164 - --negotiation-tip understands globs
expecting success:
setup_negotiation_tip server server 0 &&
GIT_TRACE_PACKET="$(pwd)/trace" git -C client fetch \
--negotiation-tip=$(git -C client rev-parse --short alpha_1) \
--negotiation-tip=$(git -C client rev-parse --short beta_1) \
origin alpha_s beta_s &&
check_negotiation_tip
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/server/.git/
[master (root-commit) 652c3dc] alpha_1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 alpha_1.t
[master c449b74] alpha_2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 alpha_2.t
Switched to a new branch 'beta'
[beta (root-commit) 7367bdf] beta_1
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 alpha_1.t
create mode 100644 alpha_2.t
create mode 100644 beta_1.t
[beta e3b1411] beta_2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 beta_2.t
Cloning into 'client'...
done.
[beta 9ac7127] beta_s
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 beta_s.t
Switched to branch 'master'
[master e2afba2] alpha_s
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 alpha_s.t
Deleted tag 'alpha_1' (was 652c3dc)
Deleted tag 'alpha_2' (was c449b74)
Deleted tag 'beta_1' (was 7367bdf)
Deleted tag 'beta_2' (was e3b1411)
From /<<PKGBUILDDIR>>/t/trash directory.t5510-fetch/server
* tag alpha_s -> FETCH_HEAD
* tag beta_s -> FETCH_HEAD
packet: fetch> have 652c3dc2ba7290d8007fbd4dbe88e04884d3b69d
packet: fetch> have 7367bdf3be3d9d14e3f6384d6802f52582e5b877
ok 165 - --negotiation-tip understands abbreviated SHA-1
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
# passed all 165 test(s)
# SKIP no web server found at '/usr/sbin/apache2'
1..165
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5532-fetch-proxy.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5532-fetch-proxy/.git/
expecting success:
git init remote &&
(cd remote &&
echo content >file &&
git add file &&
git commit -m one
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5532-fetch-proxy/remote/.git/
[master (root-commit) 69da627] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 1 - setup remote repo
expecting success:
write_script proxy-get-cmd "$PERL_PATH" <<-\EOF &&
read(STDIN, $buf, 4);
my $n = hex($buf) - 4;
read(STDIN, $buf, $n);
my ($cmd, $other) = split /\0/, $buf;
# drop absolute-path on repo name
$cmd =~ s{ /}{ };
print $cmd;
EOF
write_script proxy <<-\EOF
echo >&2 "proxying for $*"
cmd=$(./proxy-get-cmd)
echo >&2 "Running $cmd"
exec $cmd
EOF
ok 2 - setup proxy script
expecting success:
git remote add fake git://example.com/remote &&
git config core.gitproxy ./proxy
ok 3 - setup local repo
expecting success:
git fetch fake &&
echo one >expect &&
git log -1 --format=%s FETCH_HEAD >actual &&
test_cmp expect actual
proxying for example.com 9418
Running git-upload-pack remote
From git://example.com/remote
* [new branch] master -> fake/master
ok 4 - fetch through proxy works
expecting success:
test_must_fail git fetch git://-remote/repo.git 2>stderr &&
! grep "proxying for" stderr
ok 5 - funny hostnames are rejected before running proxy
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5528-push-default.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5528-push-default/.git/
expecting success:
git init --bare repo1 &&
git remote add parent1 repo1 &&
git init --bare repo2 &&
git remote add parent2 repo2 &&
test_commit one &&
git push parent1 HEAD &&
git push parent2 HEAD
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5528-push-default/repo1/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5528-push-default/repo2/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
To repo1
* [new branch] HEAD -> master
To repo2
* [new branch] HEAD -> master
ok 1 - setup bare remotes
expecting success:
git checkout master &&
test_config branch.master.remote parent1 &&
test_config branch.master.merge refs/heads/foo &&
test_commit two &&
test_push_success upstream foo
Already on 'master'
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
To repo1
* [new branch] master -> foo
ok 2 - "upstream" pushes to configured upstream
expecting success:
git checkout master &&
test_unconfig branch.master.remote &&
test_commit three &&
test_push_failure upstream
Already on 'master'
[master 7c7cd71] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using
git remote add <name> <url>
and then push using the remote name
git push <name>
ok 3 - "upstream" does not push on unconfigured remote
expecting success:
git checkout master &&
test_config branch.master.remote parent1 &&
test_unconfig branch.master.merge &&
test_commit four &&
test_push_failure upstream
Already on 'master'
[master fd8d77e] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 four.t
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream parent1 master
ok 4 - "upstream" does not push on unconfigured branch
expecting success:
git checkout master &&
test_config branch.master.remote parent1 &&
test_config branch.master.merge refs/heads/foo &&
test_config push.default upstream &&
test_commit five &&
test_must_fail git push parent2
Already on 'master'
[master a383792] five
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 five.t
fatal: You are pushing to remote 'parent2', which is not the upstream of
your current branch 'master', without telling me what to push
to update which remote branch.
ok 5 - "upstream" does not push when remotes do not match
expecting success:
git checkout -b new-branch &&
test_push_failure simple &&
test_push_failure matching &&
test_push_failure upstream
Switched to a new branch 'new-branch'
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using
git remote add <name> <url>
and then push using the remote name
git push <name>
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using
git remote add <name> <url>
and then push using the remote name
git push <name>
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using
git remote add <name> <url>
and then push using the remote name
git push <name>
ok 6 - push from/to new branch with upstream, matching and simple
expecting success:
git checkout -b ambiguous &&
test_config branch.ambiguous.remote parent1 &&
test_config branch.ambiguous.merge refs/heads/ambiguous &&
git tag ambiguous &&
test_push_success simple ambiguous &&
test_push_success matching ambiguous &&
test_push_success upstream ambiguous
Switched to a new branch 'ambiguous'
To repo1
* [new branch] ambiguous -> ambiguous
To repo1
d79ce16..a383792 master -> master
Everything up-to-date
ok 7 - push ambiguously named branch with upstream, matching and simple
expecting success:
test_config branch.new-branch.remote repo1 &&
git checkout new-branch &&
test_push_success current new-branch
Switched to branch 'new-branch'
To repo1
* [new branch] new-branch -> new-branch
ok 8 - push from/to new branch with current creates remote branch
expecting success:
test_config branch.master.remote repo1 &&
git checkout master &&
test_push_failure simple &&
test_push_failure upstream
Switched to branch 'master'
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream repo1 master
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream repo1 master
ok 9 - push to existing branch, with no upstream configured
expecting success:
test_config branch.master.remote repo1 &&
test_config branch.master.merge refs/heads/master &&
git checkout master &&
test_commit six &&
test_push_success upstream master &&
test_commit seven &&
test_push_success simple master
Already on 'master'
[master 5891a38] six
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 six.t
To repo1
a383792..5891a38 master -> master
[master c9b0832] seven
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 seven.t
To repo1
5891a38..c9b0832 master -> master
ok 10 - push to existing branch, upstream configured with same name
expecting success:
test_config branch.master.remote repo1 &&
test_config branch.master.merge refs/heads/other-name &&
git checkout master &&
test_commit eight &&
test_push_success upstream other-name &&
test_commit nine &&
test_push_failure simple &&
git --git-dir=repo1 log -1 --format="%h %s" "other-name" >expect-other-name &&
test_push_success current master &&
git --git-dir=repo1 log -1 --format="%h %s" "other-name" >actual-other-name &&
test_cmp expect-other-name actual-other-name
Already on 'master'
[master 6d8952b] eight
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 eight.t
To repo1
* [new branch] master -> other-name
[master e7406c7] nine
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 nine.t
fatal: The upstream branch of your current branch does not match
the name of your current branch. To push to the upstream branch
on the remote, use
git push repo1 HEAD:other-name
To push to the branch of the same name on the remote, use
git push repo1 HEAD
To repo1
c9b0832..e7406c7 master -> master
ok 11 - push to existing branch, upstream configured with different name
expecting success:
test_config branch.master.remote parent1 &&
test_config branch.master.merge refs/heads/foo &&
test_config remote.pushdefault parent1 &&
test_commit commit-for-current &&
test_push_success current master
[master f3846c5] commit-for-current
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 commit-for-current.t
To repo1
e7406c7..f3846c5 master -> master
ok 12 - push.default = current success in central workflows
expecting success:
test_config branch.master.remote parent1 &&
test_config branch.master.merge refs/heads/foo &&
test_config remote.pushdefault parent1 &&
test_commit commit-for-upstream &&
test_push_success upstream foo
[master 4cda86c] commit-for-upstream
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 commit-for-upstream.t
To repo1
139b20d..4cda86c master -> foo
ok 13 - push.default = upstream success in central workflows
expecting success:
test_config branch.master.remote parent1 &&
test_config branch.master.merge refs/heads/foo &&
test_config remote.pushdefault parent1 &&
test_commit commit-for-simple &&
test_push_failure simple master
[master c70813c] commit-for-simple
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 commit-for-simple.t
fatal: The upstream branch of your current branch does not match
the name of your current branch. To push to the upstream branch
on the remote, use
git push parent1 HEAD:foo
To push to the branch of the same name on the remote, use
git push parent1 HEAD
ok 14 - push.default = simple failure in central workflows
expecting success:
test_config branch.master.remote parent1 &&
test_config branch.master.merge refs/heads/foo &&
test_config remote.pushdefault parent1 &&
test_commit commit-for-matching &&
test_push_success matching master
[master 5b5f0b1] commit-for-matching
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 commit-for-matching.t
To repo1
f3846c5..5b5f0b1 master -> master
ok 15 - push.default = matching success in central workflows
expecting success:
test_config branch.master.remote parent1 &&
test_config branch.master.merge refs/heads/foo &&
test_config remote.pushdefault parent2 &&
test_commit commit-for-current-triangular &&
test_push_success current master repo2
[master 851f765] commit-for-current-triangular
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 commit-for-current-triangular.t
To repo2
d79ce16..851f765 master -> master
ok 16 - push.default = current success in triangular workflows
expecting success:
test_config branch.master.remote parent1 &&
test_config branch.master.merge refs/heads/foo &&
test_config remote.pushdefault parent2 &&
test_commit commit-for-upstream-triangular &&
test_push_failure upstream foo repo2
[master 5aea25e] commit-for-upstream-triangular
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 commit-for-upstream-triangular.t
fatal: You are pushing to remote 'parent2', which is not the upstream of
your current branch 'master', without telling me what to push
to update which remote branch.
ok 17 - push.default = upstream failure in triangular workflows
expecting success:
test_config branch.master.remote parent1 &&
test_config branch.master.merge refs/heads/foo &&
test_config remote.pushdefault parent2 &&
test_commit commit-for-simple-triangular &&
test_push_success simple master repo2
[master 19194cb] commit-for-simple-triangular
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 commit-for-simple-triangular.t
To repo2
851f765..19194cb master -> master
ok 18 - push.default = simple success in triangular workflows
expecting success:
test_config branch.master.remote parent1 &&
test_config branch.master.merge refs/heads/foo &&
test_config remote.pushdefault parent2 &&
test_commit commit-for-matching-triangular &&
test_push_success matching master repo2
[master 8956523] commit-for-matching-triangular
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 commit-for-matching-triangular.t
To repo2
19194cb..8956523 master -> master
ok 19 - push.default = matching success in triangular workflows
expecting success:
test_config branch.master.remote parent1 &&
test_config branch.master.merge refs/heads/master &&
test_config remote.pushdefault parent1 &&
test_commit default-master-master &&
test_push_success "" master
[master f163556] default-master-master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 default-master-master.t
To repo1
5b5f0b1..f163556 master -> master
ok 20 - default behavior allows "simple" push
expecting success:
test_config branch.master.remote parent1 &&
test_config branch.master.merge refs/heads/foo &&
test_config remote.pushdefault parent1 &&
test_commit default-master-foo &&
test_push_failure ""
[master accfd16] default-master-foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 default-master-foo.t
fatal: The upstream branch of your current branch does not match
the name of your current branch. To push to the upstream branch
on the remote, use
git push parent1 HEAD:foo
To push to the branch of the same name on the remote, use
git push parent1 HEAD
To choose either option permanently, see push.default in 'git help config'.
ok 21 - default behavior rejects non-simple push
expecting success:
test_config branch.master.remote parent1 &&
test_config branch.master.merge refs/heads/foo &&
test_config remote.pushdefault parent2 &&
test_commit default-triangular &&
test_push_success "" master repo2
[master 0f29fa4] default-triangular
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 default-triangular.t
To repo2
8956523..0f29fa4 master -> master
ok 22 - default triangular behavior acts like "current"
# passed all 22 test(s)
1..22
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5534-push-signed.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5534-push-signed/.git/
expecting success:
# master, ff and noff branches pointing at the same commit
test_tick &&
git commit --allow-empty -m initial &&
git checkout -b noop &&
git checkout -b ff &&
git checkout -b noff &&
# noop stays the same, ff advances, noff rewrites
test_tick &&
git commit --allow-empty --amend -m rewritten &&
git checkout ff &&
test_tick &&
git commit --allow-empty -m second
[master (root-commit) 66fe8b3] initial
Author: A U Thor <author@example.com>
Switched to a new branch 'noop'
Switched to a new branch 'ff'
Switched to a new branch 'noff'
[noff 6391b7f] rewritten
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
Switched to branch 'ff'
[ff 566fbd3] second
Author: A U Thor <author@example.com>
ok 1 - setup
expecting success:
prepare_dst &&
mkdir -p dst/.git/hooks &&
write_script dst/.git/hooks/post-receive <<-\EOF &&
# discard the update list
cat >/dev/null
# record the push certificate
if test -n "${GIT_PUSH_CERT-}"
then
git cat-file blob $GIT_PUSH_CERT >../push-cert
fi
EOF
git push dst noop ff +noff &&
! test -f dst/push-cert
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5534-push-signed/dst/.git/
To dst
* [new branch] master -> noop
* [new branch] master -> ff
* [new branch] master -> noff
To dst
66fe8b3..566fbd3 ff -> ff
+ 66fe8b3...6391b7f noff -> noff (forced update)
ok 2 - unsigned push does not send push certificate
expecting success:
prepare_dst &&
mkdir -p dst/.git/hooks &&
write_script dst/.git/hooks/post-receive <<-\EOF &&
# discard the update list
cat >/dev/null
# record the push certificate
if test -n "${GIT_PUSH_CERT-}"
then
git cat-file blob $GIT_PUSH_CERT >../push-cert
fi
EOF
git push dst noop ff +noff &&
! test -f dst/push-cert
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5534-push-signed/dst/.git/
To dst
* [new branch] master -> noop
* [new branch] master -> ff
* [new branch] master -> noff
To dst
66fe8b3..566fbd3 ff -> ff
+ 66fe8b3...6391b7f noff -> noff (forced update)
ok 3 - talking with a receiver without push certificate support
expecting success:
prepare_dst &&
mkdir -p dst/.git/hooks &&
test_must_fail git push --signed dst noop ff +noff 2>err &&
test_i18ngrep "the receiving end does not support" err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5534-push-signed/dst/.git/
To dst
* [new branch] master -> noop
* [new branch] master -> ff
* [new branch] master -> noff
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: the receiving end does not support --signed push
ok 4 - push --signed fails with a receiver without push certificate support
expecting success:
prepare_dst &&
mkdir -p dst/.git/hooks &&
test_must_fail git push --signed=1 dst noop ff +noff 2>err &&
test_i18ngrep "the receiving end does not support" err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5534-push-signed/dst/.git/
To dst
* [new branch] master -> noop
* [new branch] master -> ff
* [new branch] master -> noff
fatal: the receiving end does not support --signed push
ok 5 - push --signed=1 is accepted
expecting success:
prepare_dst &&
mkdir -p dst/.git/hooks &&
write_script dst/.git/hooks/post-receive <<-\EOF &&
if test -n "${GIT_PUSH_CERT-}"
then
git cat-file blob $GIT_PUSH_CERT >../push-cert
fi
EOF
git push dst noop &&
! test -f dst/push-cert
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5534-push-signed/dst/.git/
To dst
* [new branch] master -> noop
* [new branch] master -> ff
* [new branch] master -> noff
Everything up-to-date
ok 6 - no certificate for a signed push with no update
expecting success:
prepare_dst &&
mkdir -p dst/.git/hooks &&
git -C dst config receive.certnonceseed sekrit &&
write_script dst/.git/hooks/post-receive <<-\EOF &&
# discard the update list
cat >/dev/null
# record the push certificate
if test -n "${GIT_PUSH_CERT-}"
then
git cat-file blob $GIT_PUSH_CERT >../push-cert
fi &&
cat >../push-cert-status <<E_O_F
SIGNER=${GIT_PUSH_CERT_SIGNER-nobody}
KEY=${GIT_PUSH_CERT_KEY-nokey}
STATUS=${GIT_PUSH_CERT_STATUS-nostatus}
NONCE_STATUS=${GIT_PUSH_CERT_NONCE_STATUS-nononcestatus}
NONCE=${GIT_PUSH_CERT_NONCE-nononce}
E_O_F
EOF
git push --signed dst noop ff +noff &&
(
cat <<-\EOF &&
SIGNER=C O Mitter <committer@example.com>
KEY=13B6F51ECDDE430D
STATUS=G
NONCE_STATUS=OK
EOF
sed -n -e "s/^nonce /NONCE=/p" -e "/^$/q" dst/push-cert
) >expect &&
noop=$(git rev-parse noop) &&
ff=$(git rev-parse ff) &&
noff=$(git rev-parse noff) &&
grep "$noop $ff refs/heads/ff" dst/push-cert &&
grep "$noop $noff refs/heads/noff" dst/push-cert &&
test_cmp expect dst/push-cert-status
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5534-push-signed/dst/.git/
To dst
* [new branch] master -> noop
* [new branch] master -> ff
* [new branch] master -> noff
To dst
66fe8b3..566fbd3 ff -> ff
+ 66fe8b3...6391b7f noff -> noff (forced update)
66fe8b3f2df5c2a6e67944af865f3a0893093d69 566fbd34a75c18947f0bcd052512caf55e7144ba refs/heads/ff
66fe8b3f2df5c2a6e67944af865f3a0893093d69 6391b7f36bc1393eab3cad0aaf8c08cdacbe78fa refs/heads/noff
ok 7 - signed push sends push certificate
expecting success:
# First, invoke receive-pack with dummy input to obtain its preamble.
prepare_dst &&
git -C dst config receive.certnonceseed sekrit &&
git -C dst config receive.advertisepushoptions 1 &&
printf xxxx | test_might_fail git receive-pack dst >preamble &&
# Then, invoke push. Simulate a receive-pack that sends the preamble we
# obtained, followed by a dummy packet.
write_script myscript <<-\EOF &&
cat preamble &&
printf xxxx &&
cat >push
EOF
test_might_fail git push --push-option="foo" --push-option="bar" \
--receive-pack="\"$(pwd)/myscript\"" --signed dst --delete ff &&
# Replay the push output on a fresh dst, checking that ff is truly
# deleted.
prepare_dst &&
git -C dst config receive.certnonceseed sekrit &&
git -C dst config receive.advertisepushoptions 1 &&
git receive-pack dst <push &&
test_must_fail git -C dst rev-parse ff &&
# Tweak the push output to make the push option outside the cert
# different, then replay it on a fresh dst, checking that ff is not
# deleted.
perl -pe "s/([^ ])bar/\$1baz/" push >push.tweak &&
prepare_dst &&
git -C dst config receive.certnonceseed sekrit &&
git -C dst config receive.advertisepushoptions 1 &&
git receive-pack dst <push.tweak >out &&
git -C dst rev-parse ff &&
grep "inconsistent push options" out
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5534-push-signed/dst/.git/
To dst
* [new branch] master -> noop
* [new branch] master -> ff
* [new branch] master -> noff
fatal: protocol error: bad line length character: xxxx
fatal: protocol error: bad line length character: xxxx
fatal: the remote end hung up unexpectedly
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5534-push-signed/dst/.git/
To dst
* [new branch] master -> noop
* [new branch] master -> ff
* [new branch] master -> noff
00da66fe8b3f2df5c2a6e67944af865f3a0893093d69 refs/heads/ff report-status delete-refs side-band-64k quiet atomic ofs-delta push-cert=1565767922-b605c9de74d2f9a482aec1743793181c2dcf1383 push-options agent=git/2.23.0.rc1
003d66fe8b3f2df5c2a6e67944af865f3a0893093d69 refs/heads/noff
003d66fe8b3f2df5c2a6e67944af865f3a0893093d69 refs/heads/noop
0000002c000eunpack ok
0015ok refs/heads/ff
00000000fatal: ambiguous argument 'ff': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ff
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5534-push-signed/dst/.git/
To dst
* [new branch] master -> noop
* [new branch] master -> ff
* [new branch] master -> noff
66fe8b3f2df5c2a6e67944af865f3a0893093d69
Binary file out matches
ok 8 - inconsistent push options in signed push not allowed
expecting success:
prepare_dst &&
mkdir -p dst/.git/hooks &&
git -C dst config receive.certnonceseed sekrit &&
write_script dst/.git/hooks/post-receive <<-\EOF &&
# discard the update list
cat >/dev/null
# record the push certificate
if test -n "${GIT_PUSH_CERT-}"
then
git cat-file blob $GIT_PUSH_CERT >../push-cert
fi &&
cat >../push-cert-status <<E_O_F
SIGNER=${GIT_PUSH_CERT_SIGNER-nobody}
KEY=${GIT_PUSH_CERT_KEY-nokey}
STATUS=${GIT_PUSH_CERT_STATUS-nostatus}
NONCE_STATUS=${GIT_PUSH_CERT_NONCE_STATUS-nononcestatus}
NONCE=${GIT_PUSH_CERT_NONCE-nononce}
E_O_F
EOF
test_config user.email hasnokey@nowhere.com &&
(
sane_unset GIT_COMMITTER_EMAIL &&
test_must_fail git push --signed dst noop ff +noff
) &&
test_config user.signingkey $GIT_COMMITTER_EMAIL &&
git push --signed dst noop ff +noff &&
(
cat <<-\EOF &&
SIGNER=C O Mitter <committer@example.com>
KEY=13B6F51ECDDE430D
STATUS=G
NONCE_STATUS=OK
EOF
sed -n -e "s/^nonce /NONCE=/p" -e "/^$/q" dst/push-cert
) >expect &&
noop=$(git rev-parse noop) &&
ff=$(git rev-parse ff) &&
noff=$(git rev-parse noff) &&
grep "$noop $ff refs/heads/ff" dst/push-cert &&
grep "$noop $noff refs/heads/noff" dst/push-cert &&
test_cmp expect dst/push-cert-status
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5534-push-signed/dst/.git/
To dst
* [new branch] master -> noop
* [new branch] master -> ff
* [new branch] master -> noff
error: gpg failed to sign the data
fatal: failed to sign the push certificate
fatal: the remote end hung up unexpectedly
To dst
66fe8b3..566fbd3 ff -> ff
+ 66fe8b3...6391b7f noff -> noff (forced update)
66fe8b3f2df5c2a6e67944af865f3a0893093d69 566fbd34a75c18947f0bcd052512caf55e7144ba refs/heads/ff
66fe8b3f2df5c2a6e67944af865f3a0893093d69 6391b7f36bc1393eab3cad0aaf8c08cdacbe78fa refs/heads/noff
ok 9 - fail without key and heed user.signingkey
expecting success:
test_config gpg.format x509 &&
prepare_dst &&
mkdir -p dst/.git/hooks &&
git -C dst config receive.certnonceseed sekrit &&
write_script dst/.git/hooks/post-receive <<-\EOF &&
# discard the update list
cat >/dev/null
# record the push certificate
if test -n "${GIT_PUSH_CERT-}"
then
git cat-file blob $GIT_PUSH_CERT >../push-cert
fi &&
cat >../push-cert-status <<E_O_F
SIGNER=${GIT_PUSH_CERT_SIGNER-nobody}
KEY=${GIT_PUSH_CERT_KEY-nokey}
STATUS=${GIT_PUSH_CERT_STATUS-nostatus}
NONCE_STATUS=${GIT_PUSH_CERT_NONCE_STATUS-nononcestatus}
NONCE=${GIT_PUSH_CERT_NONCE-nononce}
E_O_F
EOF
test_config user.email hasnokey@nowhere.com &&
test_config user.signingkey "" &&
(
sane_unset GIT_COMMITTER_EMAIL &&
test_must_fail git push --signed dst noop ff +noff
) &&
test_config user.signingkey $GIT_COMMITTER_EMAIL &&
git push --signed dst noop ff +noff &&
(
cat <<-\EOF &&
SIGNER=/CN=C O Mitter/O=Example/SN=C O/GN=Mitter
KEY=
STATUS=G
NONCE_STATUS=OK
EOF
sed -n -e "s/^nonce /NONCE=/p" -e "/^$/q" dst/push-cert
) >expect.in &&
key=$(cat "${GNUPGHOME}/trustlist.txt" | cut -d" " -f1 | tr -d ":") &&
sed -e "s/^KEY=/KEY=${key}/" expect.in >expect &&
noop=$(git rev-parse noop) &&
ff=$(git rev-parse ff) &&
noff=$(git rev-parse noff) &&
grep "$noop $ff refs/heads/ff" dst/push-cert &&
grep "$noop $noff refs/heads/noff" dst/push-cert &&
test_cmp expect dst/push-cert-status
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5534-push-signed/dst/.git/
To dst
* [new branch] master -> noop
* [new branch] master -> ff
* [new branch] master -> noff
error: gpg failed to sign the data
fatal: failed to sign the push certificate
fatal: the remote end hung up unexpectedly
To dst
66fe8b3..566fbd3 ff -> ff
+ 66fe8b3...6391b7f noff -> noff (forced update)
66fe8b3f2df5c2a6e67944af865f3a0893093d69 566fbd34a75c18947f0bcd052512caf55e7144ba refs/heads/ff
66fe8b3f2df5c2a6e67944af865f3a0893093d69 6391b7f36bc1393eab3cad0aaf8c08cdacbe78fa refs/heads/noff
ok 10 - fail without key and heed user.signingkey x509
# passed all 10 test(s)
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5535-fetch-push-symref.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5535-fetch-push-symref/.git/
expecting success:
test_commit one &&
git clone . src &&
git clone src dst1 &&
git clone src dst2 &&
test_commit two &&
( cd src && git pull )
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Cloning into 'src'...
done.
Cloning into 'dst1'...
done.
Cloning into 'dst2'...
done.
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
From /<<PKGBUILDDIR>>/t/trash directory.t5535-fetch-push-symref/.
d79ce16..139b20d master -> origin/master
* [new tag] two -> two
Updating d79ce16..139b20d
Fast-forward
two.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 two.t
ok 1 - setup
expecting success:
(
cd src &&
git push ../dst1 "refs/remotes/*:refs/remotes/*"
) &&
git ls-remote src "refs/remotes/*" >expect &&
git ls-remote dst1 "refs/remotes/*" >actual &&
test_cmp expect actual &&
( cd src && git symbolic-ref refs/remotes/origin/HEAD ) >expect &&
( cd dst1 && git symbolic-ref refs/remotes/origin/HEAD ) >actual &&
test_cmp expect actual
To ../dst1
d79ce16..139b20d origin/HEAD -> origin/HEAD
d79ce16..139b20d origin/master -> origin/master
ok 2 - push
expecting success:
(
cd dst2 &&
git fetch ../src "refs/remotes/*:refs/remotes/*"
) &&
git ls-remote src "refs/remotes/*" >expect &&
git ls-remote dst2 "refs/remotes/*" >actual &&
test_cmp expect actual &&
( cd src && git symbolic-ref refs/remotes/origin/HEAD ) >expect &&
( cd dst2 && git symbolic-ref refs/remotes/origin/HEAD ) >actual &&
test_cmp expect actual
From ../src
d79ce16..139b20d origin/master -> origin/master
* [new tag] two -> two
ok 3 - fetch
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5526-fetch-submodules.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/.git/
expecting success:
mkdir deepsubmodule &&
(
cd deepsubmodule &&
git init &&
echo deepsubcontent > deepsubfile &&
git add deepsubfile &&
git commit -m new deepsubfile
) &&
mkdir submodule &&
(
cd submodule &&
git init &&
echo subcontent > subfile &&
git add subfile &&
git submodule add "$pwd/deepsubmodule" subdir/deepsubmodule &&
git commit -a -m new
) &&
git submodule add "$pwd/submodule" submodule &&
git commit -am initial &&
git clone . downstream &&
(
cd downstream &&
git submodule update --init --recursive
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/deepsubmodule/.git/
[master (root-commit) 252162f] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 deepsubfile
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/submodule/.git/
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/submodule/subdir/deepsubmodule'...
done.
[master (root-commit) 1b7d4b9] new
Author: A U Thor <author@example.com>
3 files changed, 5 insertions(+)
create mode 100644 .gitmodules
create mode 160000 subdir/deepsubmodule
create mode 100644 subfile
Adding existing repo at 'submodule' to the index
[master (root-commit) 3e4ad6a] initial
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 submodule
Cloning into 'downstream'...
done.
Submodule 'submodule' (/<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/submodule) registered for path 'submodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/downstream/submodule'...
done.
Submodule path 'submodule': checked out '1b7d4b948ace7f7f3694e740765416551e059bea'
Submodule 'subdir/deepsubmodule' (/<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/deepsubmodule) registered for path 'submodule/subdir/deepsubmodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/downstream/submodule/subdir/deepsubmodule'...
done.
Submodule path 'submodule/subdir/deepsubmodule': checked out '252162f51c07a854d74c2dd98fd9f2a611d9c367'
ok 1 - setup
expecting success:
add_upstream_commit &&
(
cd downstream &&
git fetch --recurse-submodules >../actual.out 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_i18ncmp expect.err actual.err
[master 1144402] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 9114033] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 2 - fetch --recurse-submodules recurses into submodules
expecting success:
add_upstream_commit &&
(
cd downstream &&
git -c submodule.recurse fetch >../actual.out 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_i18ncmp expect.err actual.err
[master fc2d0b1] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master aa3ddd3] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 3 - submodule.recurse option triggers recursive fetch
expecting success:
add_upstream_commit &&
(
cd downstream &&
GIT_TRACE="$TRASH_DIRECTORY/trace.out" git fetch --recurse-submodules -j2 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_i18ncmp expect.err actual.err &&
grep "2 tasks" trace.out
[master e1d725a] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master e9b833e] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
run_processes_parallel: preparing to run up to 2 tasks
ok 4 - fetch --recurse-submodules -j2 has the same output behaviour
expecting success:
add_upstream_commit &&
(
cd downstream &&
git fetch >../actual.out 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_must_be_empty actual.err
[master 58fde1f] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master f173879] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 5 - fetch alone only fetches superproject
expecting success:
(
cd downstream &&
git fetch --no-recurse-submodules >../actual.out 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_must_be_empty actual.err
ok 6 - fetch --no-recurse-submodules only fetches superproject
expecting success:
(
cd downstream &&
git config -f .gitmodules submodule.submodule.fetchRecurseSubmodules true &&
git fetch >../actual.out 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_i18ncmp expect.err actual.err
ok 7 - using fetchRecurseSubmodules=true in .gitmodules recurses into submodules
expecting success:
add_upstream_commit &&
(
cd downstream &&
git fetch --no-recurse-submodules >../actual.out 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_must_be_empty actual.err
[master 8bdcb35] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 3a795a4] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 8 - --no-recurse-submodules overrides .gitmodules config
expecting success:
(
cd downstream &&
git config submodule.submodule.fetchRecurseSubmodules false &&
git fetch >../actual.out 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_must_be_empty actual.err
ok 9 - using fetchRecurseSubmodules=false in .git/config overrides setting in .gitmodules
expecting success:
(
cd downstream &&
git fetch --recurse-submodules >../actual.out 2>../actual.err &&
git config --unset -f .gitmodules submodule.submodule.fetchRecurseSubmodules &&
git config --unset submodule.submodule.fetchRecurseSubmodules
) &&
test_must_be_empty actual.out &&
test_i18ncmp expect.err actual.err
ok 10 - --recurse-submodules overrides fetchRecurseSubmodules setting from .git/config
expecting success:
(
cd downstream &&
git fetch --recurse-submodules --quiet >../actual.out 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_must_be_empty actual.err
ok 11 - --quiet propagates to submodules
expecting success:
(
cd downstream &&
git fetch --recurse-submodules -j 2 --quiet >../actual.out 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_must_be_empty actual.err
ok 12 - --quiet propagates to parallel submodules
expecting success:
add_upstream_commit &&
(
cd downstream &&
git fetch --recurse-submodules --dry-run >../actual.out 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_i18ncmp expect.err actual.err
[master 534974f] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master ddf987c] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 13 - --dry-run propagates to submodules
expecting success:
(
cd downstream &&
git fetch --recurse-submodules >../actual.out 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_i18ncmp expect.err actual.err
ok 14 - Without --dry-run propagates to submodules
expecting success:
add_upstream_commit &&
(
cd downstream &&
git config fetch.recurseSubmodules true &&
git fetch >../actual.out 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_i18ncmp expect.err actual.err
[master be435db] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master bcc3848] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 15 - recurseSubmodules=true propagates into submodules
expecting success:
add_upstream_commit &&
(
cd downstream &&
(
cd submodule &&
git config fetch.recurseSubmodules false
) &&
git fetch --recurse-submodules >../actual.out 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_i18ncmp expect.err actual.err
[master 6486590] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master e9212f6] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 16 - --recurse-submodules overrides config in submodule
expecting success:
add_upstream_commit &&
(
cd downstream &&
git config fetch.recurseSubmodules true &&
git fetch --no-recurse-submodules >../actual.out 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_must_be_empty actual.err
[master 62873ad] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 334ea50] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 17 - --no-recurse-submodules overrides config setting
expecting success:
(
cd downstream &&
(
cd submodule &&
git config --unset fetch.recurseSubmodules
) &&
git config --unset fetch.recurseSubmodules &&
git fetch >../actual.out 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_must_be_empty actual.err
ok 18 - Recursion doesn't happen when no new commits are fetched in the superproject
expecting success:
head1=$(git rev-parse --short HEAD) &&
git add submodule &&
git commit -m "new submodule" &&
head2=$(git rev-parse --short HEAD) &&
echo "From $pwd/." > expect.err.sub &&
echo " $head1..$head2 master -> origin/master" >>expect.err.sub &&
head -3 expect.err >> expect.err.sub &&
(
cd downstream &&
git fetch >../actual.out 2>../actual.err
) &&
test_i18ncmp expect.err.sub actual.err &&
test_must_be_empty actual.out
[master 31294c7] new submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 19 - Recursion stops when no new submodule commits are fetched
expecting success:
add_upstream_commit &&
head1=$(git rev-parse --short HEAD) &&
echo a > file &&
git add file &&
git commit -m "new file" &&
head2=$(git rev-parse --short HEAD) &&
echo "From $pwd/." > expect.err.file &&
echo " $head1..$head2 master -> origin/master" >> expect.err.file &&
(
cd downstream &&
git fetch >../actual.out 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_i18ncmp expect.err.file actual.err
[master be88fe6] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 348da92] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 95ac9c7] new file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 20 - Recursion doesn't happen when new superproject commits don't change any submodules
expecting success:
(
cd downstream &&
git fetch --recurse-submodules &&
(
cd submodule &&
git config fetch.recurseSubmodules true
)
) &&
add_upstream_commit &&
head1=$(git rev-parse --short HEAD) &&
git add submodule &&
git commit -m "new submodule" &&
head2=$(git rev-parse --short HEAD) &&
echo "From $pwd/." > expect.err.sub &&
echo " $head1..$head2 master -> origin/master" >> expect.err.sub &&
cat expect.err >> expect.err.sub &&
(
cd downstream &&
git fetch >../actual.out 2>../actual.err &&
(
cd submodule &&
git config --unset fetch.recurseSubmodules
)
) &&
test_i18ncmp expect.err.sub actual.err &&
test_must_be_empty actual.out
Fetching submodule submodule
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/submodule
62873ad..be88fe6 master -> origin/master
Fetching submodule submodule/subdir/deepsubmodule
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/deepsubmodule
e9212f6..348da92 master -> origin/master
[master 9e2cd5b] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master b78b3ec] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master ac3e796] new submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 21 - Recursion picks up config in submodule
expecting success:
add_upstream_commit &&
(
cd submodule &&
(
cd subdir/deepsubmodule &&
git fetch &&
git checkout -q FETCH_HEAD
) &&
head1=$(git rev-parse --short HEAD^) &&
git add subdir/deepsubmodule &&
git commit -m "new deepsubmodule" &&
head2=$(git rev-parse --short HEAD) &&
echo "Fetching submodule submodule" > ../expect.err.sub &&
echo "From $pwd/submodule" >> ../expect.err.sub &&
echo " $head1..$head2 master -> origin/master" >> ../expect.err.sub
) &&
head1=$(git rev-parse --short HEAD) &&
git add submodule &&
git commit -m "new submodule" &&
head2=$(git rev-parse --short HEAD) &&
echo "From $pwd/." > expect.err.2 &&
echo " $head1..$head2 master -> origin/master" >> expect.err.2 &&
cat expect.err.sub >> expect.err.2 &&
tail -3 expect.err >> expect.err.2 &&
(
cd downstream &&
git fetch >../actual.out 2>../actual.err
) &&
test_i18ncmp expect.err.2 actual.err &&
test_must_be_empty actual.out
[master 70369c2] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master a4acbe9] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/deepsubmodule
252162f..a4acbe9 master -> origin/master
[master 213c02c] new deepsubmodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 89213a0] new submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 22 - Recursion picks up all submodules when necessary
expecting success:
add_upstream_commit &&
(
cd submodule &&
(
cd subdir/deepsubmodule &&
git fetch &&
git checkout -q FETCH_HEAD
) &&
head1=$(git rev-parse --short HEAD^) &&
git add subdir/deepsubmodule &&
git commit -m "new deepsubmodule" &&
head2=$(git rev-parse --short HEAD) &&
echo Fetching submodule submodule > ../expect.err.sub &&
echo "From $pwd/submodule" >> ../expect.err.sub &&
echo " $head1..$head2 master -> origin/master" >> ../expect.err.sub
) &&
(
cd downstream &&
git config fetch.recurseSubmodules true &&
git fetch --recurse-submodules=on-demand >../actual.out 2>../actual.err &&
git config --unset fetch.recurseSubmodules
) &&
test_must_be_empty actual.out &&
test_must_be_empty actual.err
[master 4d4f179] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 3d91a12] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/deepsubmodule
a4acbe9..3d91a12 master -> origin/master
[master c4fa3b3] new deepsubmodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 23 - '--recurse-submodules=on-demand' doesn't recurse when no new commits are fetched in the superproject (and ignores config)
expecting success:
head1=$(git rev-parse --short HEAD) &&
git add submodule &&
git commit -m "new submodule" &&
head2=$(git rev-parse --short HEAD) &&
tail -3 expect.err > expect.err.deepsub &&
echo "From $pwd/." > expect.err &&
echo " $head1..$head2 master -> origin/master" >>expect.err &&
cat expect.err.sub >> expect.err &&
cat expect.err.deepsub >> expect.err &&
(
cd downstream &&
git config fetch.recurseSubmodules false &&
(
cd submodule &&
git config -f .gitmodules submodule.subdir/deepsubmodule.fetchRecursive false
) &&
git fetch --recurse-submodules=on-demand >../actual.out 2>../actual.err &&
git config --unset fetch.recurseSubmodules &&
(
cd submodule &&
git config --unset -f .gitmodules submodule.subdir/deepsubmodule.fetchRecursive
)
) &&
test_must_be_empty actual.out &&
test_i18ncmp expect.err actual.err
[master adce532] new submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 24 - '--recurse-submodules=on-demand' recurses as deep as necessary (and ignores config)
expecting success:
add_upstream_commit &&
head1=$(git rev-parse --short HEAD) &&
echo a >> file &&
git add file &&
git commit -m "new file" &&
head2=$(git rev-parse --short HEAD) &&
echo "From $pwd/." > expect.err.file &&
echo " $head1..$head2 master -> origin/master" >> expect.err.file &&
(
cd downstream &&
git fetch --recurse-submodules=on-demand >../actual.out 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_i18ncmp expect.err.file actual.err
[master bd6e96a] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master c56554c] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 81a14b5] new file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 25 - '--recurse-submodules=on-demand' stops when no new submodule commits are found in the superproject (and ignores config)
expecting success:
(
cd downstream &&
git fetch --recurse-submodules
) &&
add_upstream_commit &&
git config --global fetch.recurseSubmodules false &&
head1=$(git rev-parse --short HEAD) &&
git add submodule &&
git commit -m "new submodule" &&
head2=$(git rev-parse --short HEAD) &&
echo "From $pwd/." > expect.err.2 &&
echo " $head1..$head2 master -> origin/master" >>expect.err.2 &&
head -3 expect.err >> expect.err.2 &&
(
cd downstream &&
git config fetch.recurseSubmodules on-demand &&
git fetch >../actual.out 2>../actual.err
) &&
git config --global --unset fetch.recurseSubmodules &&
(
cd downstream &&
git config --unset fetch.recurseSubmodules
) &&
test_must_be_empty actual.out &&
test_i18ncmp expect.err.2 actual.err
Fetching submodule submodule
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/submodule
c4fa3b3..bd6e96a master -> origin/master
Fetching submodule submodule/subdir/deepsubmodule
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/deepsubmodule
3d91a12..c56554c master -> origin/master
[master 8064cf8] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 36793c9] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 2bf6e86] new submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 26 - 'fetch.recurseSubmodules=on-demand' overrides global config
expecting success:
(
cd downstream &&
git fetch --recurse-submodules
) &&
add_upstream_commit &&
git config fetch.recurseSubmodules false &&
head1=$(git rev-parse --short HEAD) &&
git add submodule &&
git commit -m "new submodule" &&
head2=$(git rev-parse --short HEAD) &&
echo "From $pwd/." > expect.err.2 &&
echo " $head1..$head2 master -> origin/master" >>expect.err.2 &&
head -3 expect.err >> expect.err.2 &&
(
cd downstream &&
git config submodule.submodule.fetchRecurseSubmodules on-demand &&
git fetch >../actual.out 2>../actual.err
) &&
git config --unset fetch.recurseSubmodules &&
(
cd downstream &&
git config --unset submodule.submodule.fetchRecurseSubmodules
) &&
test_must_be_empty actual.out &&
test_i18ncmp expect.err.2 actual.err
Fetching submodule submodule
Fetching submodule submodule/subdir/deepsubmodule
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/deepsubmodule
c56554c..36793c9 master -> origin/master
[master ad37ca8] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 5ba071c] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master ec26487] new submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 27 - 'submodule.<sub>.fetchRecurseSubmodules=on-demand' overrides fetch.recurseSubmodules
expecting success:
(
cd submodule &&
git checkout -q HEAD^^
) &&
head1=$(git rev-parse --short HEAD) &&
git add submodule &&
git commit -m "submodule rewound" &&
head2=$(git rev-parse --short HEAD) &&
echo "From $pwd/." > expect.err &&
echo " $head1..$head2 master -> origin/master" >> expect.err &&
(
cd downstream &&
git fetch >../actual.out 2>../actual.err
) &&
test_must_be_empty actual.out &&
test_i18ncmp expect.err actual.err &&
(
cd submodule &&
git checkout -q master
)
[master 63b16e4] submodule rewound
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 28 - don't fetch submodule when newly recorded commits are already present
expecting success:
(
cd downstream &&
git fetch --recurse-submodules
) &&
add_upstream_commit &&
head1=$(git rev-parse --short HEAD) &&
git add submodule &&
git rm .gitmodules &&
git commit -m "new submodule without .gitmodules" &&
head2=$(git rev-parse --short HEAD) &&
echo "From $pwd/." >expect.err.2 &&
echo " $head1..$head2 master -> origin/master" >>expect.err.2 &&
head -3 expect.err >>expect.err.2 &&
(
cd downstream &&
rm .gitmodules &&
git config fetch.recurseSubmodules on-demand &&
# fake submodule configuration to avoid skipping submodule handling
git config -f .gitmodules submodule.fake.path fake &&
git config -f .gitmodules submodule.fake.url fakeurl &&
git add .gitmodules &&
git config --unset submodule.submodule.url &&
git fetch >../actual.out 2>../actual.err &&
# cleanup
git config --unset fetch.recurseSubmodules &&
git reset --hard
) &&
test_must_be_empty actual.out &&
test_i18ncmp expect.err.2 actual.err &&
git checkout HEAD^ -- .gitmodules &&
git add .gitmodules &&
git commit -m "new submodule restored .gitmodules"
Fetching submodule submodule
Fetching submodule submodule/subdir/deepsubmodule
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/deepsubmodule
36793c9..5ba071c master -> origin/master
[master b2f7613] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 451ccf8] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rm '.gitmodules'
[master 1da993a] new submodule without .gitmodules
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 4 deletions(-)
delete mode 100644 .gitmodules
HEAD is now at 3e4ad6a initial
[master 38e835b] new submodule restored .gitmodules
Author: A U Thor <author@example.com>
1 file changed, 3 insertions(+)
create mode 100644 .gitmodules
ok 29 - 'fetch.recurseSubmodules=on-demand' works also without .gitmodules entry
expecting success:
git config fetch.recurseSubmodules true &&
(
cd downstream &&
GIT_TRACE=$(pwd)/trace.out git fetch &&
grep "1 tasks" trace.out &&
GIT_TRACE=$(pwd)/trace.out git fetch --jobs 7 &&
grep "7 tasks" trace.out &&
git config submodule.fetchJobs 8 &&
GIT_TRACE=$(pwd)/trace.out git fetch &&
grep "8 tasks" trace.out &&
GIT_TRACE=$(pwd)/trace.out git fetch --jobs 9 &&
grep "9 tasks" trace.out
)
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/.
1da993a..38e835b master -> origin/master
run_processes_parallel: preparing to run up to 1 tasks
run_processes_parallel: preparing to run up to 7 tasks
run_processes_parallel: preparing to run up to 8 tasks
run_processes_parallel: preparing to run up to 9 tasks
ok 30 - fetching submodules respects parallel settings
expecting success:
# Prepare src and src/sub nested in it
git init src &&
(
cd src &&
git init sub &&
git -C sub commit --allow-empty -m "initial in sub" &&
git submodule add -- ./sub sub &&
git commit -m "initial in top"
) &&
# Clone the old-fashoned way
git clone src dst &&
git -C dst clone ../src/sub sub &&
# Make sure that old-fashoned layout is still supported
git -C dst status &&
# "diff" would find no change
git -C dst diff --exit-code &&
# Recursive-fetch works fine
git -C dst fetch --recurse-submodules &&
# Break the receiving submodule
rm -f dst/sub/.git/HEAD &&
# NOTE: without the fix the following tests will recurse forever!
# They should terminate with an error.
test_must_fail git -C dst status &&
test_must_fail git -C dst diff &&
test_must_fail git -C dst fetch --recurse-submodules
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/src/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/src/sub/.git/
[master (root-commit) e24bbd1] initial in sub
Author: A U Thor <author@example.com>
Adding existing repo at 'sub' to the index
[master (root-commit) efece41] initial in top
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub
Cloning into 'dst'...
done.
Cloning into 'sub'...
done.
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
Fetching submodule sub
fatal: 'sub/.git' not recognized as a git repository
fatal: 'sub/.git' not recognized as a git repository
Could not access submodule 'sub'ok 31 - fetching submodule into a broken repository
expecting success:
git clone . downstream_rename &&
(
cd downstream_rename &&
git submodule update --init --recursive &&
git checkout -b rename &&
git mv submodule submodule_renamed &&
(
cd submodule_renamed &&
git checkout -b rename_sub &&
echo a >a &&
git add a &&
git commit -ma &&
git push origin rename_sub &&
git rev-parse HEAD >../../expect
) &&
git add submodule_renamed &&
git commit -m "update renamed submodule" &&
git push origin rename
) &&
(
cd downstream &&
git fetch --recurse-submodules=on-demand &&
(
cd submodule &&
git rev-parse origin/rename_sub >../../actual
)
) &&
test_cmp expect actual
Cloning into 'downstream_rename'...
done.
Submodule 'submodule' (/<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/submodule) registered for path 'submodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/downstream_rename/submodule'...
done.
Submodule path 'submodule': checked out 'b2f7613aba7de74fe7c976429a7cf9b2057398f9'
Submodule 'subdir/deepsubmodule' (/<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/deepsubmodule) registered for path 'submodule/subdir/deepsubmodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/downstream_rename/submodule/subdir/deepsubmodule'...
done.
Submodule path 'submodule/subdir/deepsubmodule': checked out '3d91a12c92fe79b99befbb5909031a37c7b974f4'
Switched to a new branch 'rename'
Switched to a new branch 'rename_sub'
[rename_sub 37c2197] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
To /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/submodule
* [new branch] rename_sub -> rename_sub
[rename 8807d06] update renamed submodule
Author: A U Thor <author@example.com>
3 files changed, 2 insertions(+), 2 deletions(-)
delete mode 160000 submodule
create mode 160000 submodule_renamed
To /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/.
* [new branch] rename -> rename
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/.
* [new branch] rename -> origin/rename
Fetching submodule submodule
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/submodule
* [new branch] rename_sub -> origin/rename_sub
ok 32 - fetch new commits when submodule got renamed
expecting success:
# add a second submodule and ensure it is around in downstream first
git clone submodule sub1 &&
git submodule add ./sub1 &&
git commit -m "adding a second submodule" &&
git -C downstream pull &&
git -C downstream submodule update --init --recursive &&
git checkout --detach &&
C=$(git -C submodule commit-tree -m "new change outside refs/heads" HEAD^{tree}) &&
git -C submodule update-ref refs/changes/1 $C &&
git update-index --cacheinfo 160000 $C submodule &&
test_tick &&
D=$(git -C sub1 commit-tree -m "new change outside refs/heads" HEAD^{tree}) &&
git -C sub1 update-ref refs/changes/2 $D &&
git update-index --cacheinfo 160000 $D sub1 &&
git commit -m "updated submodules outside of refs/heads" &&
E=$(git rev-parse HEAD) &&
git update-ref refs/changes/3 $E &&
(
cd downstream &&
git fetch --recurse-submodules origin refs/changes/3:refs/heads/my_branch &&
git -C submodule cat-file -t $C &&
git -C sub1 cat-file -t $D &&
git checkout --recurse-submodules FETCH_HEAD
)
Cloning into 'sub1'...
done.
Adding existing repo at 'sub1' to the index
[master 6b90113] adding a second submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 160000 sub1
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/.
38e835b..6b90113 master -> origin/master
Updating 3e4ad6a..6b90113
Fast-forward
.gitmodules | 3 +++
file | 2 ++
sub1 | 1 +
submodule | 2 +-
4 files changed, 7 insertions(+), 1 deletion(-)
create mode 100644 file
create mode 160000 sub1
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/./sub1) registered for path 'sub1'
Submodule 'submodule' (/<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/submodule) registered for path 'submodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/downstream/sub1'...
done.
Submodule path 'sub1': checked out 'b2f7613aba7de74fe7c976429a7cf9b2057398f9'
Submodule 'subdir/deepsubmodule' (/<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/deepsubmodule) registered for path 'sub1/subdir/deepsubmodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/downstream/sub1/subdir/deepsubmodule'...
done.
Submodule path 'sub1/subdir/deepsubmodule': checked out '3d91a12c92fe79b99befbb5909031a37c7b974f4'
Submodule path 'submodule': checked out 'b2f7613aba7de74fe7c976429a7cf9b2057398f9'
Submodule path 'submodule/subdir/deepsubmodule': checked out '3d91a12c92fe79b99befbb5909031a37c7b974f4'
HEAD is now at 6b90113 adding a second submodule
[detached HEAD 2cae80d] updated submodules outside of refs/heads
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/.
* [new ref] refs/changes/3 -> my_branch
Fetching submodule sub1
Fetching submodule sub1/subdir/deepsubmodule
Fetching submodule submodule
Fetching submodule submodule/subdir/deepsubmodule
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/deepsubmodule
5ba071c..451ccf8 master -> origin/master
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/./sub1
* branch 5986a9e5b25221243648827ebdae040293b710c1 -> FETCH_HEAD
Fetching submodule sub1/subdir/deepsubmodule
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/submodule
* branch 48a174bbc6c70cf99311838dd0c5af1d72b4e48f -> FETCH_HEAD
Fetching submodule submodule/subdir/deepsubmodule
commit
commit
Note: switching to 'FETCH_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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 2cae80d updated submodules outside of refs/heads
ok 33 - fetch new submodule commits on-demand outside standard refspec
expecting success:
# depends on the previous test for setup
C=$(git -C submodule commit-tree -m "another change outside refs/heads" HEAD^{tree}) &&
git -C submodule update-ref refs/changes/4 $C &&
git update-index --cacheinfo 160000 $C submodule &&
test_tick &&
D=$(git -C sub1 commit-tree -m "another change outside refs/heads" HEAD^{tree}) &&
git -C sub1 update-ref refs/changes/5 $D &&
git update-index --cacheinfo 160000 $D sub1 &&
git commit -m "updated submodules outside of refs/heads" &&
E=$(git rev-parse HEAD) &&
git update-ref refs/changes/6 $E &&
(
cd downstream &&
git fetch --recurse-submodules origin refs/changes/6 &&
git -C submodule cat-file -t $C &&
git -C sub1 cat-file -t $D &&
git checkout --recurse-submodules FETCH_HEAD
)
[detached HEAD 46aac59] updated submodules outside of refs/heads
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/.
* branch refs/changes/6 -> FETCH_HEAD
Fetching submodule sub1
Fetching submodule sub1/subdir/deepsubmodule
Fetching submodule submodule
Fetching submodule submodule/subdir/deepsubmodule
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/./sub1
* branch 6d44c5716cdad90e8e0d5ea9caa2afbd294034d2 -> FETCH_HEAD
Fetching submodule sub1/subdir/deepsubmodule
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/submodule
* branch 0fd222777078ef6d21ced75e4d33594bba4551c6 -> FETCH_HEAD
Fetching submodule submodule/subdir/deepsubmodule
commit
commit
Previous HEAD position was 2cae80d updated submodules outside of refs/heads
HEAD is now at 46aac59 updated submodules outside of refs/heads
ok 34 - fetch new submodule commit on-demand in FETCH_HEAD
expecting success:
# depends on the previous test for setup
git config -f .gitmodules --remove-section submodule.sub1 &&
git add .gitmodules &&
git commit -m "delete gitmodules file" &&
git checkout -B master &&
git -C downstream fetch &&
git -C downstream checkout origin/master &&
C=$(git -C submodule commit-tree -m "yet another change outside refs/heads" HEAD^{tree}) &&
git -C submodule update-ref refs/changes/7 $C &&
git update-index --cacheinfo 160000 $C submodule &&
test_tick &&
D=$(git -C sub1 commit-tree -m "yet another change outside refs/heads" HEAD^{tree}) &&
git -C sub1 update-ref refs/changes/8 $D &&
git update-index --cacheinfo 160000 $D sub1 &&
git commit -m "updated submodules outside of refs/heads" &&
E=$(git rev-parse HEAD) &&
git update-ref refs/changes/9 $E &&
(
cd downstream &&
git fetch --recurse-submodules origin refs/changes/9 &&
git -C submodule cat-file -t $C &&
git -C sub1 cat-file -t $D &&
git checkout --recurse-submodules FETCH_HEAD
)
[detached HEAD 1c65675] delete gitmodules file
Author: A U Thor <author@example.com>
1 file changed, 3 deletions(-)
Switched to and reset branch 'master'
M sub1
M submodule
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/.
6b90113..1c65675 master -> origin/master
Previous HEAD position was 46aac59 updated submodules outside of refs/heads
HEAD is now at 1c65675 delete gitmodules file
[master 13871b3] updated submodules outside of refs/heads
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/.
* branch refs/changes/9 -> FETCH_HEAD
warning: 13871b39754e9f74b70a25284ac3bb3c36668e3e:.gitmodules, multiple configurations found for 'submodule.submodule.path'. Skipping second one!
warning: 13871b39754e9f74b70a25284ac3bb3c36668e3e:.gitmodules, multiple configurations found for 'submodule.submodule.url'. Skipping second one!
Fetching submodule sub1
Fetching submodule sub1/subdir/deepsubmodule
Fetching submodule submodule
Fetching submodule submodule/subdir/deepsubmodule
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/./sub1
* branch c71bf04a00a09a95176b711ebbfd6d1b4270a0af -> FETCH_HEAD
Fetching submodule sub1/subdir/deepsubmodule
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/submodule
* branch b7d8144b28fe3af8ee2f575269f1c44ecac806c8 -> FETCH_HEAD
Fetching submodule submodule/subdir/deepsubmodule
commit
commit
Previous HEAD position was 1c65675 delete gitmodules file
HEAD is now at 13871b3 updated submodules outside of refs/heads
M sub1
ok 35 - fetch new submodule commits on-demand without .gitmodules entry
expecting success:
# depends on the previous test for setup
D=$(git -C sub1 commit-tree -m "change 10 outside refs/heads" HEAD^{tree}) &&
E=$(git -C sub1 commit-tree -m "change 11 outside refs/heads" HEAD^{tree}) &&
F=$(git -C sub1 commit-tree -m "change 12 outside refs/heads" HEAD^{tree}) &&
git -C sub1 update-ref refs/changes/10 $D &&
git update-index --cacheinfo 160000 $D sub1 &&
git commit -m "updated submodules outside of refs/heads" &&
git -C sub1 update-ref refs/changes/11 $E &&
git update-index --cacheinfo 160000 $E sub1 &&
git commit -m "updated submodules outside of refs/heads" &&
git -C sub1 update-ref refs/changes/12 $F &&
git update-index --cacheinfo 160000 $F sub1 &&
git commit -m "updated submodules outside of refs/heads" &&
G=$(git rev-parse HEAD) &&
git update-ref refs/changes/13 $G &&
(
cd downstream &&
git fetch --recurse-submodules origin refs/changes/13 &&
git -C sub1 cat-file -t $D &&
git -C sub1 cat-file -t $E &&
git -C sub1 cat-file -t $F
)
[master 8422d87] updated submodules outside of refs/heads
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 7610484] updated submodules outside of refs/heads
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master b3040ff] updated submodules outside of refs/heads
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/.
* branch refs/changes/13 -> FETCH_HEAD
warning: b3040ffcd331ace943baffd32164c3bba8c75b7e:.gitmodules, multiple configurations found for 'submodule.submodule.path'. Skipping second one!
warning: b3040ffcd331ace943baffd32164c3bba8c75b7e:.gitmodules, multiple configurations found for 'submodule.submodule.url'. Skipping second one!
warning: 76104844847853bd9e841f163595220c0ea193b2:.gitmodules, multiple configurations found for 'submodule.submodule.path'. Skipping second one!
warning: 76104844847853bd9e841f163595220c0ea193b2:.gitmodules, multiple configurations found for 'submodule.submodule.url'. Skipping second one!
warning: 76104844847853bd9e841f163595220c0ea193b2:.gitmodules, multiple configurations found for 'submodule.submodule.path'. Skipping second one!
warning: 76104844847853bd9e841f163595220c0ea193b2:.gitmodules, multiple configurations found for 'submodule.submodule.url'. Skipping second one!
warning: 8422d8716e5b17b2614e0fda8a6c67c60182a772:.gitmodules, multiple configurations found for 'submodule.submodule.path'. Skipping second one!
warning: 8422d8716e5b17b2614e0fda8a6c67c60182a772:.gitmodules, multiple configurations found for 'submodule.submodule.url'. Skipping second one!
warning: 8422d8716e5b17b2614e0fda8a6c67c60182a772:.gitmodules, multiple configurations found for 'submodule.submodule.path'. Skipping second one!
warning: 8422d8716e5b17b2614e0fda8a6c67c60182a772:.gitmodules, multiple configurations found for 'submodule.submodule.url'. Skipping second one!
warning: 13871b39754e9f74b70a25284ac3bb3c36668e3e:.gitmodules, multiple configurations found for 'submodule.submodule.path'. Skipping second one!
warning: 13871b39754e9f74b70a25284ac3bb3c36668e3e:.gitmodules, multiple configurations found for 'submodule.submodule.url'. Skipping second one!
warning: 13871b39754e9f74b70a25284ac3bb3c36668e3e:.gitmodules, multiple configurations found for 'submodule.submodule.path'. Skipping second one!
warning: 13871b39754e9f74b70a25284ac3bb3c36668e3e:.gitmodules, multiple configurations found for 'submodule.submodule.url'. Skipping second one!
Fetching submodule sub1
Fetching submodule sub1/subdir/deepsubmodule
Fetching submodule submodule
Fetching submodule submodule/subdir/deepsubmodule
From /<<PKGBUILDDIR>>/t/trash directory.t5526-fetch-submodules/./sub1
* branch 009230bdb17f89565ab148047ab72858e8a3663d -> FETCH_HEAD
* branch 7c90eba4d93ce522ca9fe283b56677b7590a79c0 -> FETCH_HEAD
* branch 8013b99fb5ca5fece182dbd49bff032a82c24a9f -> FETCH_HEAD
Fetching submodule sub1/subdir/deepsubmodule
commit
commit
commit
ok 36 - fetch new submodule commit intermittently referenced by superproject
# passed all 36 test(s)
1..36
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5536-fetch-conflicts.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5536-fetch-conflicts/.git/
expecting success:
git commit --allow-empty -m "Initial" &&
git branch branch1 &&
git tag tag1 &&
git commit --allow-empty -m "First" &&
git branch branch2 &&
git tag tag2
[master (root-commit) 02ce730] Initial
Author: A U Thor <author@example.com>
[master 42ac6da] First
Author: A U Thor <author@example.com>
ok 1 - setup
expecting success:
setup_repository ok "+refs/heads/*:refs/remotes/origin/*" && (
cd ok &&
git fetch origin
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5536-fetch-conflicts/ok/.git/
From /<<PKGBUILDDIR>>/t/trash directory.t5536-fetch-conflicts
* [new branch] branch1 -> origin/branch1
* [new branch] branch2 -> origin/branch2
* [new branch] master -> origin/master
* [new tag] tag1 -> tag1
* [new tag] tag2 -> tag2
ok 2 - fetch with no conflict
expecting success:
setup_repository ccc \
"+refs/heads/branch1:refs/remotes/origin/branch1" \
"+refs/heads/branch2:refs/remotes/origin/branch1" && (
cd ccc &&
test_must_fail git fetch origin 2>error &&
test_i18ngrep "fatal: Cannot fetch both refs/heads/branch1 and refs/heads/branch2 to refs/remotes/origin/branch1" error
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5536-fetch-conflicts/ccc/.git/
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: Cannot fetch both refs/heads/branch1 and refs/heads/branch2 to refs/remotes/origin/branch1
ok 3 - fetch conflict: config vs. config
expecting success:
setup_repository dcc \
"+refs/heads/*:refs/remotes/origin/*" \
"+refs/heads/branch1:refs/remotes/origin/branch1" && (
cd dcc &&
git fetch origin
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5536-fetch-conflicts/dcc/.git/
From /<<PKGBUILDDIR>>/t/trash directory.t5536-fetch-conflicts
* [new branch] branch1 -> origin/branch1
* [new branch] branch2 -> origin/branch2
* [new branch] master -> origin/master
* [new tag] tag1 -> tag1
* [new tag] tag2 -> tag2
ok 4 - fetch duplicate: config vs. config
expecting success:
setup_repository aoc \
"+refs/heads/*:refs/remotes/origin/*" && (
cd aoc &&
git fetch origin refs/heads/branch2:refs/remotes/origin/branch1
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5536-fetch-conflicts/aoc/.git/
From /<<PKGBUILDDIR>>/t/trash directory.t5536-fetch-conflicts
* [new branch] branch2 -> origin/branch1
* [new tag] tag2 -> tag2
* [new branch] branch2 -> origin/branch2
* [new tag] tag1 -> tag1
ok 5 - fetch conflict: arg overrides config
expecting success:
setup_repository caa && (
cd caa &&
test_must_fail git fetch origin \
refs/heads/*:refs/remotes/origin/* \
refs/heads/branch2:refs/remotes/origin/branch1 2>error &&
test_i18ngrep "fatal: Cannot fetch both refs/heads/branch1 and refs/heads/branch2 to refs/remotes/origin/branch1" error
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5536-fetch-conflicts/caa/.git/
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: Cannot fetch both refs/heads/branch1 and refs/heads/branch2 to refs/remotes/origin/branch1
ok 6 - fetch conflict: arg vs. arg
expecting success:
setup_repository xaa \
"+refs/heads/*:refs/remotes/origin/*" && (
cd xaa &&
git fetch origin \
refs/heads/branch1:refs/remotes/origin/branch2 \
refs/heads/branch2:refs/remotes/origin/branch1 2>error &&
test_i18ngrep "warning: refs/remotes/origin/branch1 usually tracks refs/heads/branch1, not refs/heads/branch2" error &&
test_i18ngrep "warning: refs/remotes/origin/branch2 usually tracks refs/heads/branch2, not refs/heads/branch1" error
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5536-fetch-conflicts/xaa/.git/
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
warning: refs/remotes/origin/branch1 usually tracks refs/heads/branch1, not refs/heads/branch2
warning: refs/remotes/origin/branch2 usually tracks refs/heads/branch2, not refs/heads/branch1
ok 7 - fetch conflict: criss-cross args
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5531-deep-submodule-push.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5531-deep-submodule-push/.git/
expecting success:
mkdir pub.git &&
GIT_DIR=pub.git git init --bare &&
GIT_DIR=pub.git git config receive.fsckobjects true &&
mkdir work &&
(
cd work &&
git init &&
git config push.default matching &&
mkdir -p gar/bage &&
(
cd gar/bage &&
git init &&
git config push.default matching &&
>junk &&
git add junk &&
git commit -m "Initial junk"
) &&
git add gar/bage &&
git commit -m "Initial superproject"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5531-deep-submodule-push/pub.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5531-deep-submodule-push/work/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5531-deep-submodule-push/work/gar/bage/.git/
[master (root-commit) 9082fdd] Initial junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 junk
warning: adding embedded git repository: gar/bage
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> gar/bage
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached gar/bage
hint:
hint: See "git help submodule" for more information.
[master (root-commit) 3251b83] Initial superproject
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 160000 gar/bage
ok 1 - setup
expecting success:
(
cd work &&
git push ../pub.git master
)
To ../pub.git
* [new branch] master -> master
ok 2 - push works with recorded gitlink
expecting success:
(
cd work/gar/bage &&
>junk2 &&
git add junk2 &&
git commit -m "Second junk"
) &&
(
cd work &&
git add gar/bage &&
git commit -m "Second commit for gar/bage" &&
git push --recurse-submodules=check ../pub.git master
)
[master 9c1a88a] Second junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 junk2
[master 8bcda58] Second commit for gar/bage
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
To ../pub.git
3251b83..8bcda58 master -> master
ok 3 - push if submodule has no remote
expecting success:
(
cd work/gar &&
git clone --bare bage ../../submodule.git &&
cd bage &&
git remote add origin ../../../submodule.git &&
git fetch &&
>junk3 &&
git add junk3 &&
git commit -m "Third junk"
) &&
(
cd work &&
git add gar/bage &&
git commit -m "Third commit for gar/bage" &&
# the push should fail with --recurse-submodules=check
# on the command line...
test_must_fail git push --recurse-submodules=check ../pub.git master &&
# ...or if specified in the configuration..
test_must_fail git -c push.recurseSubmodules=check push ../pub.git master
)
Cloning into bare repository '../../submodule.git'...
done.
From ../../../submodule
* [new branch] master -> origin/master
[master 3a4143e] Third junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 junk3
[master 88fe2b3] Third commit for gar/bage
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
The following submodule paths contain changes that can
not be found on any remote:
gar/bage
Please try
git push --recurse-submodules=on-demand
or cd to the path and use
git push
to push them to a remote.
fatal: Aborting.
fatal: the remote end hung up unexpectedly
The following submodule paths contain changes that can
not be found on any remote:
gar/bage
Please try
git push --recurse-submodules=on-demand
or cd to the path and use
git push
to push them to a remote.
fatal: Aborting.
ok 4 - push fails if submodule commit not on remote
expecting success:
(
cd work/gar/bage &&
git push origin master
) &&
(
cd work &&
git push --recurse-submodules=check ../pub.git master
)
fatal: the remote end hung up unexpectedly
To ../../../submodule.git
9c1a88a..3a4143e master -> master
To ../pub.git
8bcda58..88fe2b3 master -> master
ok 5 - push succeeds after commit was pushed to remote
expecting success:
(
cd work/gar/bage &&
>recurse-on-demand-on-command-line &&
git add recurse-on-demand-on-command-line &&
git commit -m "Recurse on-demand on command line junk"
) &&
(
cd work &&
git add gar/bage &&
git commit -m "Recurse on-demand on command line for gar/bage" &&
git push --recurse-submodules=on-demand ../pub.git master &&
# Check that the supermodule commit got there
git fetch ../pub.git &&
git diff --quiet FETCH_HEAD master &&
# Check that the submodule commit got there too
cd gar/bage &&
git diff --quiet origin/master master
)
[master 09ecc2d] Recurse on-demand on command line junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 recurse-on-demand-on-command-line
[master 8c49576] Recurse on-demand on command line for gar/bage
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Pushing submodule 'gar/bage'
To ../../../submodule.git
3a4143e..09ecc2d master -> master
To ../pub.git
88fe2b3..8c49576 master -> master
From ../pub
* branch HEAD -> FETCH_HEAD
ok 6 - push succeeds if submodule commit not on remote but using on-demand on command line
expecting success:
(
cd work/gar/bage &&
>recurse-on-demand-from-config &&
git add recurse-on-demand-from-config &&
git commit -m "Recurse on-demand from config junk"
) &&
(
cd work &&
git add gar/bage &&
git commit -m "Recurse on-demand from config for gar/bage" &&
git -c push.recurseSubmodules=on-demand push ../pub.git master &&
# Check that the supermodule commit got there
git fetch ../pub.git &&
git diff --quiet FETCH_HEAD master &&
# Check that the submodule commit got there too
cd gar/bage &&
git diff --quiet origin/master master
)
[master a283d64] Recurse on-demand from config junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 recurse-on-demand-from-config
[master 80ba984] Recurse on-demand from config for gar/bage
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Pushing submodule 'gar/bage'
To ../../../submodule.git
09ecc2d..a283d64 master -> master
To ../pub.git
8c49576..80ba984 master -> master
From ../pub
* branch HEAD -> FETCH_HEAD
ok 7 - push succeeds if submodule commit not on remote but using on-demand from config
expecting success:
(
cd work/gar/bage &&
>recurse-on-demand-from-submodule-recurse-config &&
git add recurse-on-demand-from-submodule-recurse-config &&
git commit -m "Recurse submodule.recurse from config junk"
) &&
(
cd work &&
git add gar/bage &&
git commit -m "Recurse submodule.recurse from config for gar/bage" &&
git -c submodule.recurse push ../pub.git master &&
# Check that the supermodule commit got there
git fetch ../pub.git &&
git diff --quiet FETCH_HEAD master &&
# Check that the submodule commit got there too
cd gar/bage &&
git diff --quiet origin/master master
)
[master b0974bd] Recurse submodule.recurse from config junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 recurse-on-demand-from-submodule-recurse-config
[master 6edf9ba] Recurse submodule.recurse from config for gar/bage
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Pushing submodule 'gar/bage'
To ../../../submodule.git
a283d64..b0974bd master -> master
To ../pub.git
80ba984..6edf9ba master -> master
From ../pub
* branch HEAD -> FETCH_HEAD
ok 8 - push succeeds if submodule commit not on remote but using auto-on-demand via submodule.recurse config
expecting success:
(
cd work/gar/bage &&
>recurse-check-on-command-line-overriding-config &&
git add recurse-check-on-command-line-overriding-config &&
git commit -m "Recurse on command-line overriding config junk"
) &&
(
cd work &&
git add gar/bage &&
git commit -m "Recurse on command-line overriding config for gar/bage" &&
# Ensure that we can override on-demand in the config
# to just check submodules
test_must_fail git -c push.recurseSubmodules=on-demand push --recurse-submodules=check ../pub.git master &&
# Check that the supermodule commit did not get there
git fetch ../pub.git &&
git diff --quiet FETCH_HEAD master^ &&
# Check that the submodule commit did not get there
(cd gar/bage && git diff --quiet origin/master master^) &&
# Ensure that we can override check in the config to
# disable submodule recursion entirely
(cd gar/bage && git diff --quiet origin/master master^) &&
git -c push.recurseSubmodules=on-demand push --recurse-submodules=no ../pub.git master &&
git fetch ../pub.git &&
git diff --quiet FETCH_HEAD master &&
(cd gar/bage && git diff --quiet origin/master master^) &&
# Ensure that we can override check in the config to
# disable submodule recursion entirely (alternative form)
git -c push.recurseSubmodules=on-demand push --no-recurse-submodules ../pub.git master &&
git fetch ../pub.git &&
git diff --quiet FETCH_HEAD master &&
(cd gar/bage && git diff --quiet origin/master master^) &&
# Ensure that we can override check in the config to
# push the submodule too
git -c push.recurseSubmodules=check push --recurse-submodules=on-demand ../pub.git master &&
git fetch ../pub.git &&
git diff --quiet FETCH_HEAD master &&
(cd gar/bage && git diff --quiet origin/master master)
)
[master bbf390f] Recurse on command-line overriding config junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 recurse-check-on-command-line-overriding-config
[master 2c51a02] Recurse on command-line overriding config for gar/bage
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
The following submodule paths contain changes that can
not be found on any remote:
gar/bage
Please try
git push --recurse-submodules=on-demand
or cd to the path and use
git push
to push them to a remote.
fatal: Aborting.
fatal: the remote end hung up unexpectedly
From ../pub
* branch HEAD -> FETCH_HEAD
To ../pub.git
6edf9ba..2c51a02 master -> master
From ../pub
* branch HEAD -> FETCH_HEAD
Everything up-to-date
From ../pub
* branch HEAD -> FETCH_HEAD
Pushing submodule 'gar/bage'
To ../../../submodule.git
b0974bd..bbf390f master -> master
Everything up-to-date
From ../pub
* branch HEAD -> FETCH_HEAD
ok 9 - push recurse-submodules on command line overrides config
expecting success:
(
cd work/gar/bage &&
>recurse-check-on-command-line-overriding-earlier-command-line &&
git add recurse-check-on-command-line-overriding-earlier-command-line &&
git commit -m "Recurse on command-line overridiing earlier command-line junk"
) &&
(
cd work &&
git add gar/bage &&
git commit -m "Recurse on command-line overriding earlier command-line for gar/bage" &&
# should result in "check"
test_must_fail git push --recurse-submodules=on-demand --recurse-submodules=check ../pub.git master &&
# Check that the supermodule commit did not get there
git fetch ../pub.git &&
git diff --quiet FETCH_HEAD master^ &&
# Check that the submodule commit did not get there
(cd gar/bage && git diff --quiet origin/master master^) &&
# should result in "no"
git push --recurse-submodules=on-demand --recurse-submodules=no ../pub.git master &&
# Check that the supermodule commit did get there
git fetch ../pub.git &&
git diff --quiet FETCH_HEAD master &&
# Check that the submodule commit did not get there
(cd gar/bage && git diff --quiet origin/master master^) &&
# should result in "no"
git push --recurse-submodules=on-demand --no-recurse-submodules ../pub.git master &&
# Check that the submodule commit did not get there
(cd gar/bage && git diff --quiet origin/master master^) &&
# But the options in the other order should push the submodule
git push --recurse-submodules=check --recurse-submodules=on-demand ../pub.git master &&
# Check that the submodule commit did get there
git fetch ../pub.git &&
(cd gar/bage && git diff --quiet origin/master master)
)
[master 81fd412] Recurse on command-line overridiing earlier command-line junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 recurse-check-on-command-line-overriding-earlier-command-line
[master 06b93a4] Recurse on command-line overriding earlier command-line for gar/bage
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
The following submodule paths contain changes that can
not be found on any remote:
gar/bage
Please try
git push --recurse-submodules=on-demand
or cd to the path and use
git push
to push them to a remote.
fatal: Aborting.
fatal: the remote end hung up unexpectedly
From ../pub
* branch HEAD -> FETCH_HEAD
To ../pub.git
2c51a02..06b93a4 master -> master
From ../pub
* branch HEAD -> FETCH_HEAD
Everything up-to-date
Pushing submodule 'gar/bage'
To ../../../submodule.git
bbf390f..81fd412 master -> master
Everything up-to-date
From ../pub
* branch HEAD -> FETCH_HEAD
ok 10 - push recurse-submodules last one wins on command line
expecting success:
(
cd work/gar/bage &&
>recurse-on-demand-on-command-line-overriding-config &&
git add recurse-on-demand-on-command-line-overriding-config &&
git commit -m "Recurse on-demand on command-line overriding config junk"
) &&
(
cd work &&
git add gar/bage &&
git commit -m "Recurse on-demand on command-line overriding config for gar/bage" &&
git -c push.recurseSubmodules=check push --recurse-submodules=on-demand ../pub.git master &&
# Check that the supermodule commit got there
git fetch ../pub.git &&
git diff --quiet FETCH_HEAD master &&
# Check that the submodule commit got there
cd gar/bage &&
git diff --quiet origin/master master
)
[master c14ddf3] Recurse on-demand on command-line overriding config junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 recurse-on-demand-on-command-line-overriding-config
[master d6ac592] Recurse on-demand on command-line overriding config for gar/bage
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Pushing submodule 'gar/bage'
To ../../../submodule.git
81fd412..c14ddf3 master -> master
To ../pub.git
06b93a4..d6ac592 master -> master
From ../pub
* branch HEAD -> FETCH_HEAD
ok 11 - push succeeds if submodule commit not on remote using on-demand from cmdline overriding config
expecting success:
(
cd work/gar/bage &&
>recurse-disable-on-command-line-overriding-config &&
git add recurse-disable-on-command-line-overriding-config &&
git commit -m "Recurse disable on command-line overriding config junk"
) &&
(
cd work &&
git add gar/bage &&
git commit -m "Recurse disable on command-line overriding config for gar/bage" &&
git -c push.recurseSubmodules=check push --recurse-submodules=no ../pub.git master &&
# Check that the supermodule commit got there
git fetch ../pub.git &&
git diff --quiet FETCH_HEAD master &&
# But that the submodule commit did not
( cd gar/bage && git diff --quiet origin/master master^ ) &&
# Now push it to avoid confusing future tests
git push --recurse-submodules=on-demand ../pub.git master
)
[master 9138768] Recurse disable on command-line overriding config junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 recurse-disable-on-command-line-overriding-config
[master 5978b42] Recurse disable on command-line overriding config for gar/bage
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
To ../pub.git
d6ac592..5978b42 master -> master
From ../pub
* branch HEAD -> FETCH_HEAD
Pushing submodule 'gar/bage'
To ../../../submodule.git
c14ddf3..9138768 master -> master
Everything up-to-date
ok 12 - push succeeds if submodule commit disabling recursion from cmdline overriding config
expecting success:
(
cd work/gar/bage &&
>recurse-disable-on-command-line-alt-overriding-config &&
git add recurse-disable-on-command-line-alt-overriding-config &&
git commit -m "Recurse disable on command-line alternative overriding config junk"
) &&
(
cd work &&
git add gar/bage &&
git commit -m "Recurse disable on command-line alternative overriding config for gar/bage" &&
git -c push.recurseSubmodules=check push --no-recurse-submodules ../pub.git master &&
# Check that the supermodule commit got there
git fetch ../pub.git &&
git diff --quiet FETCH_HEAD master &&
# But that the submodule commit did not
( cd gar/bage && git diff --quiet origin/master master^ ) &&
# Now push it to avoid confusing future tests
git push --recurse-submodules=on-demand ../pub.git master
)
[master 812f356] Recurse disable on command-line alternative overriding config junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 recurse-disable-on-command-line-alt-overriding-config
[master 8781cec] Recurse disable on command-line alternative overriding config for gar/bage
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
To ../pub.git
5978b42..8781cec master -> master
From ../pub
* branch HEAD -> FETCH_HEAD
Pushing submodule 'gar/bage'
To ../../../submodule.git
9138768..812f356 master -> master
Everything up-to-date
ok 13 - push succeeds if submodule commit disabling recursion from cmdline (alternative form) overriding config
expecting success:
git -C work/gar/bage tag -a test1 -m "tag" &&
tag=$(git -C work/gar/bage rev-parse test1^{tag}) &&
git -C work update-index --cacheinfo 160000 "$tag" gar/bage &&
git -C work commit -m "bad commit" &&
test_when_finished "git -C work reset --hard HEAD^" &&
test_must_fail git -C work push --recurse-submodules=on-demand ../pub.git master 2>err &&
test_i18ngrep "is a tag, not a commit" err
[master 0d0e5b4] bad commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: submodule entry 'gar/bage' (3b04e6536a49d8f86c8c0a170b37d7537ef7f877) is a tag, not a commit
HEAD is now at 8781cec Recurse disable on command-line alternative overriding config for gar/bage
ok 14 - submodule entry pointing at a tag is error
expecting success:
(
cd work/gar/bage &&
>recurse-push-fails-if-recurse-submodules-passed-as-yes &&
git add recurse-push-fails-if-recurse-submodules-passed-as-yes &&
git commit -m "Recurse push fails if recurse submodules option passed as yes"
) &&
(
cd work &&
git add gar/bage &&
git commit -m "Recurse push fails if recurse submodules option passed as yes for gar/bage" &&
test_must_fail git push --recurse-submodules=yes ../pub.git master &&
test_must_fail git -c push.recurseSubmodules=yes push ../pub.git master &&
git push --recurse-submodules=on-demand ../pub.git master
)
[master af0d49f] Recurse push fails if recurse submodules option passed as yes
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 recurse-push-fails-if-recurse-submodules-passed-as-yes
[master 54c606b] Recurse push fails if recurse submodules option passed as yes for gar/bage
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
fatal: bad recurse-submodules argument: yes
fatal: bad push.recursesubmodules argument: yes
Pushing submodule 'gar/bage'
To ../../../submodule.git
812f356..af0d49f master -> master
To ../pub.git
8781cec..54c606b master -> master
ok 15 - push fails if recurse submodules option passed as yes
expecting success:
(
cd work/gar/bage &&
>junk4 &&
git add junk4 &&
git commit -m "Fourth junk"
) &&
(
cd work &&
git branch branch2 &&
git add gar/bage &&
git commit -m "Fourth commit for gar/bage" &&
git checkout branch2 &&
(
cd gar/bage &&
git checkout HEAD~1
) &&
>junk1 &&
git add junk1 &&
git commit -m "First junk" &&
test_must_fail git push --recurse-submodules=check ../pub.git
)
[master da1f67b] Fourth junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 junk4
[master f0dd37f] Fourth commit for gar/bage
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'branch2'
M gar/bage
Note: switching to 'HEAD~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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at af0d49f Recurse push fails if recurse submodules option passed as yes
[branch2 dc6f0a4] First junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 junk1
The following submodule paths contain changes that can
not be found on any remote:
gar/bage
Please try
git push --recurse-submodules=on-demand
or cd to the path and use
git push
to push them to a remote.
fatal: Aborting.
fatal: the remote end hung up unexpectedly
ok 16 - push fails when commit on multiple branches if one branch has no remote
expecting success:
git init --bare a &&
git clone a a1 &&
(
cd a1 &&
git init b &&
(
cd b &&
>junk &&
git add junk &&
git commit -m "initial"
) &&
git add b &&
git commit -m "added submodule" &&
git push --recurse-submodules=check origin master
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5531-deep-submodule-push/a/
Cloning into 'a1'...
warning: You appear to have cloned an empty repository.
done.
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5531-deep-submodule-push/a1/b/.git/
[master (root-commit) fcd25f3] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 junk
warning: adding embedded git repository: b
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> b
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached b
hint:
hint: See "git help submodule" for more information.
[master (root-commit) 3fa2acb] added submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 160000 b
To /<<PKGBUILDDIR>>/t/trash directory.t5531-deep-submodule-push/a
* [new branch] master -> master
ok 17 - push succeeds if submodule has no remote and is on the first superproject commit
expecting success:
(
cd work &&
(
cd gar/bage &&
git checkout master &&
>junk5 &&
git add junk5 &&
git commit -m "Fifth junk" &&
git push &&
git rev-parse origin/master >../../../expected
) &&
git checkout master &&
git add gar/bage &&
git commit -m "Fifth commit for gar/bage" &&
git push --recurse-submodules=on-demand ../pub.git master
) &&
(
cd submodule.git &&
git rev-parse master >../actual
) &&
test_cmp expected actual
Previous HEAD position was af0d49f Recurse push fails if recurse submodules option passed as yes
Switched to branch 'master'
[master f96c8f8] Fifth junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 junk5
To ../../../submodule.git
af0d49f..f96c8f8 master -> master
Switched to branch 'master'
M gar/bage
[master b3b8c60] Fifth commit for gar/bage
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
To ../pub.git
54c606b..b3b8c60 master -> master
ok 18 - push unpushed submodules when not needed
expecting success:
(
cd submodule.git &&
git rev-parse master >../expected
) &&
(
cd work &&
(
cd gar/bage &&
>junk6 &&
git add junk6 &&
git commit -m "Sixth junk"
) &&
>junk2 &&
git add junk2 &&
git commit -m "Second junk for work" &&
git push --recurse-submodules=on-demand ../pub.git master
) &&
(
cd submodule.git &&
git rev-parse master >../actual
) &&
test_cmp expected actual
[master 334eb85] Sixth junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 junk6
[master fbd8155] Second junk for work
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 junk2
To ../pub.git
b3b8c60..fbd8155 master -> master
ok 19 - push unpushed submodules when not needed 2
expecting success:
(
cd work &&
(
cd gar/bage &&
git checkout master &&
> junk7 &&
git add junk7 &&
git commit -m "Seventh junk" &&
git rev-parse master >../../../expected
) &&
git checkout master &&
git add gar/bage &&
git commit -m "Seventh commit for gar/bage" &&
git push --recurse-submodules=on-demand ../pub.git master
) &&
(
cd submodule.git &&
git rev-parse master >../actual
) &&
test_cmp expected actual
Already on 'master'
[master f505f3b] Seventh junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 junk7
Already on 'master'
M gar/bage
[master b5c65a3] Seventh commit for gar/bage
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Pushing submodule 'gar/bage'
To ../../../submodule.git
f96c8f8..f505f3b master -> master
To ../pub.git
fbd8155..b5c65a3 master -> master
ok 20 - push unpushed submodules recursively
expecting success:
(
cd work &&
(
cd gar/bage &&
git rev-parse origin/master >../../../expected &&
git checkout master~0 &&
> junk8 &&
git add junk8 &&
git commit -m "Eighth junk"
) &&
git add gar/bage &&
git commit -m "Eighth commit for gar/bage" &&
test_must_fail git push --recurse-submodules=on-demand ../pub.git master
) &&
(
cd submodule.git &&
git rev-parse master >../actual
) &&
test_when_finished git -C work reset --hard master^ &&
test_cmp expected actual
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at f505f3b Seventh junk
[detached HEAD c82db11] Eighth junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 junk8
[master e3c1c72] Eighth commit for gar/bage
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Pushing submodule 'gar/bage'
Everything up-to-date
The following submodule paths contain changes that can
not be found on any remote:
gar/bage
Please try
git push --recurse-submodules=on-demand
or cd to the path and use
git push
to push them to a remote.
fatal: Aborting.
fatal: the remote end hung up unexpectedly
HEAD is now at b5c65a3 Seventh commit for gar/bage
ok 21 - push unpushable submodule recursively fails
expecting success:
(
cd work/gar/bage &&
git checkout master &&
git rev-parse master >../../../expected_submodule &&
> junk9 &&
git add junk9 &&
git commit -m "Ninth junk" &&
# Go up to work directory
cd ../.. &&
git checkout master &&
git rev-parse master >../expected_pub &&
git add gar/bage &&
git commit -m "Ninth commit for gar/bage" &&
git push --dry-run --recurse-submodules=on-demand ../pub.git master
) &&
git -C submodule.git rev-parse master >actual_submodule &&
git -C pub.git rev-parse master >actual_pub &&
test_cmp expected_pub actual_pub &&
test_cmp expected_submodule actual_submodule
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
c82db11 Eighth junk
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> c82db11
Switched to branch 'master'
[master 34ee87f] Ninth junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 junk9
Already on 'master'
M gar/bage
[master 55ea96d] Ninth commit for gar/bage
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Pushing submodule 'gar/bage'
To ../../../submodule.git
f505f3b..34ee87f master -> master
To ../pub.git
b5c65a3..55ea96d master -> master
ok 22 - push --dry-run does not recursively update submodules
expecting success:
git -C work push --dry-run --recurse-submodules=only ../pub.git master &&
git -C submodule.git rev-parse master >actual_submodule &&
git -C pub.git rev-parse master >actual_pub &&
test_cmp expected_pub actual_pub &&
test_cmp expected_submodule actual_submodule
Pushing submodule 'gar/bage'
To ../../../submodule.git
f505f3b..34ee87f master -> master
Everything up-to-date
ok 23 - push --dry-run does not recursively update submodules
expecting success:
git -C work/gar/bage rev-parse master >expected_submodule &&
git -C pub.git rev-parse master >expected_pub &&
git -C work push --recurse-submodules=only ../pub.git master &&
git -C submodule.git rev-parse master >actual_submodule &&
git -C pub.git rev-parse master >actual_pub &&
test_cmp expected_submodule actual_submodule &&
test_cmp expected_pub actual_pub
Pushing submodule 'gar/bage'
To ../../../submodule.git
f505f3b..34ee87f master -> master
Everything up-to-date
ok 24 - push only unpushed submodules recursively
expecting success:
git -C work remote add origin ../pub.git &&
git -C work remote add pub ../pub.git &&
> work/gar/bage/junk10 &&
git -C work/gar/bage add junk10 &&
git -C work/gar/bage commit -m "Tenth junk" &&
git -C work add gar/bage &&
git -C work commit -m "Tenth junk added to gar/bage" &&
# Fails when submodule does not have a matching remote
test_must_fail git -C work push --recurse-submodules=on-demand pub master &&
# Succeeds when submodules has matching remote and refspec
git -C work push --recurse-submodules=on-demand origin master &&
git -C submodule.git rev-parse master >actual_submodule &&
git -C pub.git rev-parse master >actual_pub &&
git -C work/gar/bage rev-parse master >expected_submodule &&
git -C work rev-parse master >expected_pub &&
test_cmp expected_submodule actual_submodule &&
test_cmp expected_pub actual_pub
[master 2a82526] Tenth junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 junk10
[master 1a30b88] Tenth junk added to gar/bage
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
fatal: remote 'pub' not configured
fatal: process for submodule 'gar/bage' failed
fatal: the remote end hung up unexpectedly
Pushing submodule 'gar/bage'
To ../../../submodule.git
34ee87f..2a82526 master -> master
To ../pub.git
b5c65a3..1a30b88 master -> master
ok 25 - push propagating the remotes name to a submodule
expecting success:
> work/gar/bage/junk11 &&
git -C work/gar/bage add junk11 &&
git -C work/gar/bage commit -m "Eleventh junk" &&
git -C work checkout branch2 &&
git -C work add gar/bage &&
git -C work commit -m "updating gar/bage in branch2" &&
# Fails when submodule does not have a matching branch
test_must_fail git -C work push --recurse-submodules=on-demand origin branch2 &&
# Fails when refspec includes an object id
test_must_fail git -C work push --recurse-submodules=on-demand origin \
"$(git -C work rev-parse branch2):refs/heads/branch2" &&
# Fails when refspec includes HEAD and parent and submodule do not
# have the same named branch checked out
test_must_fail git -C work push --recurse-submodules=on-demand origin \
HEAD:refs/heads/branch2 &&
git -C work/gar/bage branch branch2 master &&
git -C work push --recurse-submodules=on-demand origin branch2 &&
git -C submodule.git rev-parse branch2 >actual_submodule &&
git -C pub.git rev-parse branch2 >actual_pub &&
git -C work/gar/bage rev-parse branch2 >expected_submodule &&
git -C work rev-parse branch2 >expected_pub &&
test_cmp expected_submodule actual_submodule &&
test_cmp expected_pub actual_pub
[master d4dd7c3] Eleventh junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 junk11
Switched to branch 'branch2'
M gar/bage
[branch2 d44d334] updating gar/bage in branch2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
fatal: src refspec 'branch2' must name a ref
fatal: process for submodule 'gar/bage' failed
fatal: the remote end hung up unexpectedly
fatal: src refspec 'd44d33425cc95f97d244cb0e9e3a761fa920d37c' must name a ref
fatal: process for submodule 'gar/bage' failed
fatal: the remote end hung up unexpectedly
fatal: HEAD does not match the named branch in the superproject
fatal: process for submodule 'gar/bage' failed
fatal: the remote end hung up unexpectedly
Pushing submodule 'gar/bage'
To ../../../submodule.git
* [new branch] branch2 -> branch2
To ../pub.git
* [new branch] branch2 -> branch2
ok 26 - push propagating refspec to a submodule
expecting success:
git -C work/gar/bage checkout branch2 &&
> work/gar/bage/junk12 &&
git -C work/gar/bage add junk12 &&
git -C work/gar/bage commit -m "Twelfth junk" &&
git -C work checkout branch2 &&
git -C work add gar/bage &&
git -C work commit -m "updating gar/bage in branch2" &&
# Passes since the superproject and submodules HEAD are both on branch2
git -C work push --recurse-submodules=on-demand origin \
HEAD:refs/heads/branch2 &&
git -C submodule.git rev-parse branch2 >actual_submodule &&
git -C pub.git rev-parse branch2 >actual_pub &&
git -C work/gar/bage rev-parse branch2 >expected_submodule &&
git -C work rev-parse branch2 >expected_pub &&
test_cmp expected_submodule actual_submodule &&
test_cmp expected_pub actual_pub
Switched to branch 'branch2'
[branch2 2c7ac75] Twelfth junk
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 junk12
Already on 'branch2'
M gar/bage
[branch2 edada9e] updating gar/bage in branch2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Pushing submodule 'gar/bage'
To ../../../submodule.git
d4dd7c3..2c7ac75 HEAD -> branch2
To ../pub.git
d44d334..edada9e HEAD -> branch2
ok 27 - push propagating HEAD refspec to a submodule
# passed all 27 test(s)
1..27
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5539-fetch-http-shallow.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5539-fetch-http-shallow/.git/
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
1..0 # SKIP no web server found at '/usr/sbin/apache2'
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5540-http-push-webdav.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5540-http-push-webdav/.git/
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
1..0 # SKIP no web server found at '/usr/sbin/apache2'
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5541-http-push-smart.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5541-http-push-smart/.git/
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
1..0 # SKIP no web server found at '/usr/sbin/apache2'
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5542-push-http-shallow.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5542-push-http-shallow/.git/
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
1..0 # SKIP no web server found at '/usr/sbin/apache2'
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5533-push-cas.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/.git/
expecting success:
# create template repository
test_commit A &&
test_commit B &&
test_commit C
[master (root-commit) 0ddfaf1] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
[master d9df450] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B.t
[master 35a8500] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C.t
ok 1 - setup
expecting success:
setup_srcdst_basic &&
(
cd dst &&
test_commit D &&
test_must_fail git push --force-with-lease=master:master origin master 2>err &&
grep "stale info" err
) &&
git ls-remote . refs/heads/master >expect &&
git ls-remote src refs/heads/master >actual &&
test_cmp expect actual
Cloning into 'src'...
Cloning into 'dst'...
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 35a8500 C
[master be8f64f] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D.t
! [rejected] master -> master (stale info)
ok 2 - push to update (protected)
expecting success:
setup_srcdst_basic &&
(
cd dst &&
test_commit D &&
git push --force --force-with-lease=master:master origin master 2>err &&
grep "forced update" err
) &&
git ls-remote dst refs/heads/master >expect &&
git ls-remote src refs/heads/master >actual &&
test_cmp expect actual
Cloning into 'src'...
Cloning into 'dst'...
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 35a8500 C
[master be8f64f] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D.t
+ 35a8500...be8f64f master -> master (forced update)
ok 3 - push to update (protected, forced)
expecting success:
setup_srcdst_basic &&
(
cd src &&
git checkout master &&
test_commit D &&
git checkout HEAD^0
) &&
git ls-remote src refs/heads/master >expect &&
(
cd dst &&
test_commit E &&
git ls-remote . refs/remotes/origin/master >expect &&
test_must_fail git push --force-with-lease=master origin master &&
git ls-remote . refs/remotes/origin/master >actual &&
test_cmp expect actual
) &&
git ls-remote src refs/heads/master >actual &&
test_cmp expect actual
Cloning into 'src'...
Cloning into 'dst'...
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 35a8500 C
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
[master be8f64f] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D.t
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at be8f64f D
[master 3e7056f] E
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 E.t
To /<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/src
! [rejected] master -> master (stale info)
error: failed to push some refs to '/<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/src'
ok 4 - push to update (protected, tracking)
expecting success:
setup_srcdst_basic &&
(
cd src &&
git checkout master &&
test_commit D &&
git checkout HEAD^0
) &&
(
cd dst &&
test_commit E &&
git ls-remote . refs/remotes/origin/master >expect &&
git push --force --force-with-lease=master origin master
) &&
git ls-remote dst refs/heads/master >expect &&
git ls-remote src refs/heads/master >actual &&
test_cmp expect actual
Cloning into 'src'...
Cloning into 'dst'...
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 35a8500 C
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
[master be8f64f] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D.t
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at be8f64f D
[master 3e7056f] E
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 E.t
To /<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/src
+ be8f64f...3e7056f master -> master (forced update)
ok 5 - push to update (protected, tracking, forced)
expecting success:
setup_srcdst_basic &&
(
cd dst &&
test_commit D &&
git push --force-with-lease=master:master^ origin master
) &&
git ls-remote dst refs/heads/master >expect &&
git ls-remote src refs/heads/master >actual &&
test_cmp expect actual
Cloning into 'src'...
Cloning into 'dst'...
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 35a8500 C
[master be8f64f] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D.t
To /<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/src
35a8500..be8f64f master -> master
ok 6 - push to update (allowed)
expecting success:
setup_srcdst_basic &&
(
cd dst &&
test_commit D &&
git push --force-with-lease=master origin master 2>err &&
! grep "forced update" err
) &&
git ls-remote dst refs/heads/master >expect &&
git ls-remote src refs/heads/master >actual &&
test_cmp expect actual
Cloning into 'src'...
Cloning into 'dst'...
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 35a8500 C
[master be8f64f] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D.t
ok 7 - push to update (allowed, tracking)
expecting success:
setup_srcdst_basic &&
(
cd dst &&
git reset --hard HEAD^ &&
test_commit D &&
git push --force-with-lease=master origin master 2>err &&
grep "forced update" err
) &&
git ls-remote dst refs/heads/master >expect &&
git ls-remote src refs/heads/master >actual &&
test_cmp expect actual
Cloning into 'src'...
Cloning into 'dst'...
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 35a8500 C
HEAD is now at d9df450 B
[master 3e6e33e] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D.t
+ 35a8500...3e6e33e master -> master (forced update)
ok 8 - push to update (allowed even though no-ff)
expecting success:
setup_srcdst_basic &&
git ls-remote src refs/heads/master >expect &&
(
cd dst &&
test_must_fail git push --force-with-lease=master:master^ origin :master
) &&
git ls-remote src refs/heads/master >actual &&
test_cmp expect actual
Cloning into 'src'...
Cloning into 'dst'...
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 35a8500 C
To /<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/src
! [rejected] (delete) -> master (stale info)
error: failed to push some refs to '/<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/src'
ok 9 - push to delete (protected)
expecting success:
setup_srcdst_basic &&
(
cd dst &&
git push --force --force-with-lease=master:master^ origin :master
) &&
git ls-remote src refs/heads/master >actual &&
test_must_be_empty actual
Cloning into 'src'...
Cloning into 'dst'...
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 35a8500 C
To /<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/src
- [deleted] master
ok 10 - push to delete (protected, forced)
expecting success:
setup_srcdst_basic &&
(
cd dst &&
git push --force-with-lease=master origin :master 2>err &&
grep deleted err
) &&
git ls-remote src refs/heads/master >actual &&
test_must_be_empty actual
Cloning into 'src'...
Cloning into 'dst'...
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 35a8500 C
- [deleted] master
ok 11 - push to delete (allowed)
expecting success:
setup_srcdst_basic &&
(
cd src &&
git branch naster master^
) &&
git ls-remote src refs/heads/\* >expect &&
(
cd dst &&
test_must_fail git push --force-with-lease origin master master:naster
) &&
git ls-remote src refs/heads/\* >actual &&
test_cmp expect actual
Cloning into 'src'...
Cloning into 'dst'...
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 35a8500 C
To /<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/src
! [rejected] master -> naster (stale info)
error: failed to push some refs to '/<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/src'
ok 12 - cover everything with default force-with-lease (protected)
expecting success:
setup_srcdst_basic &&
(
cd src &&
git branch naster master^
) &&
(
cd dst &&
git fetch &&
git push --force-with-lease origin master master:naster
) &&
git ls-remote dst refs/heads/master |
sed -e "s/master/naster/" >expect &&
git ls-remote src refs/heads/naster >actual &&
test_cmp expect actual
Cloning into 'src'...
Cloning into 'dst'...
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 35a8500 C
From /<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/src
* [new branch] naster -> origin/naster
To /<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/src
d9df450..35a8500 master -> naster
ok 13 - cover everything with default force-with-lease (allowed)
expecting success:
setup_srcdst_basic &&
(
cd dst &&
git branch branch master &&
git push --force-with-lease=branch origin branch
) &&
git ls-remote dst refs/heads/branch >expect &&
git ls-remote src refs/heads/branch >actual &&
test_cmp expect actual
Cloning into 'src'...
Cloning into 'dst'...
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 35a8500 C
To /<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/src
* [new branch] branch -> branch
ok 14 - new branch covered by force-with-lease
expecting success:
setup_srcdst_basic &&
(
cd dst &&
git branch branch master &&
git push --force-with-lease=branch: origin branch
) &&
git ls-remote dst refs/heads/branch >expect &&
git ls-remote src refs/heads/branch >actual &&
test_cmp expect actual
Cloning into 'src'...
Cloning into 'dst'...
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 35a8500 C
To /<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/src
* [new branch] branch -> branch
ok 15 - new branch covered by force-with-lease (explicit)
expecting success:
setup_srcdst_basic &&
(
cd src &&
git checkout -b branch master &&
test_commit F
) &&
(
cd dst &&
git branch branch master &&
test_must_fail git push --force-with-lease=branch: origin branch
)
Cloning into 'src'...
Cloning into 'dst'...
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 35a8500 C
Switched to a new branch 'branch'
[branch b6ba73d] F
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 F.t
To /<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/src
! [rejected] branch -> branch (stale info)
error: failed to push some refs to '/<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/src'
ok 16 - new branch already exists
expecting success:
rm -rf src dst &&
git init --bare src.bare &&
test_when_finished "rm -rf src.bare" &&
git clone --no-local src.bare dst &&
test_when_finished "rm -rf dst" &&
(
cd dst &&
test_commit G &&
git remote add origin-push ../src.bare &&
git push origin-push master:master
) &&
git clone --no-local src.bare dst2 &&
test_when_finished "rm -rf dst2" &&
(
cd dst2 &&
test_commit H &&
git push
) &&
(
cd dst &&
test_commit I &&
git fetch origin &&
test_must_fail git push --force-with-lease origin-push &&
git fetch origin-push &&
git push --force-with-lease origin-push
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/src.bare/
Cloning into 'dst'...
warning: You appear to have cloned an empty repository.
[master (root-commit) c0a8953] G
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 G.t
To ../src.bare
* [new branch] master -> master
Cloning into 'dst2'...
[master d19f4d4] H
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 H.t
To /<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/src.bare
c0a8953..d19f4d4 master -> master
[master 91bb270] I
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 I.t
From /<<PKGBUILDDIR>>/t/trash directory.t5533-push-cas/src.bare
* [new branch] master -> origin/master
To ../src.bare
! [rejected] master -> master (stale info)
error: failed to push some refs to '../src.bare'
From ../src.bare
c0a8953..d19f4d4 master -> origin-push/master
To ../src.bare
+ d19f4d4...91bb270 master -> master (forced update)
ok 17 - background updates of REMOTE can be mitigated with a non-updated REMOTE-push
# passed all 17 test(s)
1..17
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5538-push-shallow.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5538-push-shallow/.git/
expecting success:
git config --global transfer.fsckObjects true &&
commit 1 &&
commit 2 &&
commit 3 &&
commit 4 &&
git clone . full &&
(
git init full-abc &&
cd full-abc &&
commit a &&
commit b &&
commit c
) &&
git clone --no-local --depth=2 .git shallow &&
git --git-dir=shallow/.git log --format=%s >actual &&
cat <<EOF >expect &&
4
3
EOF
test_cmp expect actual &&
git clone --no-local --depth=2 full-abc/.git shallow2 &&
git --git-dir=shallow2/.git log --format=%s >actual &&
cat <<EOF >expect &&
c
b
EOF
test_cmp expect actual
[master (root-commit) 39e07fb] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 tracked
[master f9faab9] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master e96f347] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 2977a97] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Cloning into 'full'...
done.
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5538-push-shallow/full-abc/.git/
[master (root-commit) db600ad] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 tracked
[master 13349e0] b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master cef016c] c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Cloning into 'shallow'...
Cloning into 'shallow2'...
ok 1 - setup
expecting success:
(
cd shallow &&
commit 5 &&
git push ../.git +master:refs/remotes/shallow/master
) &&
git log --format=%s shallow/master >actual &&
git fsck &&
cat <<EOF >expect &&
5
4
3
2
1
EOF
test_cmp expect actual
[master f3f6643] 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
To ../.git
* [new branch] master -> shallow/master
ok 2 - push from shallow clone
expecting success:
(
cd shallow2 &&
test_must_fail git push ../.git +master:refs/remotes/shallow2/master 2>err &&
grep "shallow2/master.*shallow update not allowed" err
) &&
test_must_fail git rev-parse shallow2/master &&
git fsck
! [remote rejected] master -> shallow2/master (shallow update not allowed)
fatal: ambiguous argument 'shallow2/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
shallow2/master
dangling commit cef016c5f942ba746c8ac66fe300c65f6a23522b
ok 3 - push from shallow clone, with grafted roots
expecting success:
test_config receive.shallowupdate true &&
(
cd shallow2 &&
git push ../.git +master:refs/remotes/shallow2/master
) &&
git log --format=%s shallow2/master >actual &&
git fsck &&
cat <<EOF >expect &&
c
b
EOF
test_cmp expect actual
error: Could not read db600ad97096168ef4bceedfe79feff8126fc0f1
To ../.git
* [new branch] master -> shallow2/master
ok 4 - add new shallow root with receive.updateshallow on
expecting success:
(
cd shallow &&
git --git-dir=../shallow2/.git config receive.shallowupdate true &&
git push ../shallow2/.git +master:refs/remotes/shallow/master &&
git --git-dir=../shallow2/.git config receive.shallowupdate false
) &&
(
cd shallow2 &&
git log --format=%s shallow/master >actual &&
git fsck &&
cat <<EOF >expect &&
5
4
3
EOF
test_cmp expect actual
)
To ../shallow2/.git
* [new branch] master -> shallow/master
ok 5 - push from shallow to shallow
expecting success:
! git --git-dir=shallow2/.git cat-file blob $(echo 1|git hash-object --stdin) &&
commit 1 &&
git push shallow2/.git +master:refs/remotes/top/master &&
(
cd shallow2 &&
git log --format=%s top/master >actual &&
git fsck &&
cat <<EOF >expect &&
1
4
3
EOF
test_cmp expect actual &&
git cat-file blob $(echo 1|git hash-object --stdin) >/dev/null
)
fatal: git cat-file d00491fd7e5bb6fa28c517a0bb32b8b506539d4d: bad file
[master ece9059] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
To shallow2/.git
* [new branch] master -> top/master
ok 6 - push from full to shallow
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5544-pack-objects-hook.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5544-pack-objects-hook/.git/
expecting success:
test_commit one &&
test_commit two
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
ok 1 - create some history to fetch
expecting success:
write_script .git/hook <<-\EOF
echo >&2 "hook running"
echo "$*" >hook.args
cat >hook.stdin
"$@" <hook.stdin >hook.stdout
cat hook.stdout
EOF
ok 2 - create debugging hook script
expecting success:
clear_hook_results &&
test_config_global uploadpack.packObjectsHook ./hook &&
git clone --no-local . dst.git 2>stderr &&
grep "hook running" stderr
remote: hook running
ok 3 - hook runs via global config
expecting success:
# check that we recorded a usable pack
git index-pack --stdin <.git/hook.stdout &&
# check that we recorded args and stdin. We do not check
# the full argument list or the exact pack contents, as it would make
# the test brittle. So just sanity check that we could replay
# the packing procedure.
grep "^git" .git/hook.args &&
$(cat .git/hook.args) <.git/hook.stdin >replay
pack 2a0b62213eae197db6150718d99ad9a6e24df950
git pack-objects --revs --thin --stdout --delta-base-offset
ok 4 - hook outputs are sane
expecting success:
clear_hook_results &&
git clone --no-local \
-u "git -c uploadpack.packObjectsHook=./hook upload-pack" \
. dst.git 2>stderr &&
grep "hook running" stderr
remote: hook running
ok 5 - hook runs from -c config
expecting success:
clear_hook_results &&
test_config uploadpack.packObjectsHook "./hook" &&
git clone --no-local . dst.git 2>stderr &&
! grep "hook running" stderr &&
test_path_is_missing .git/hook.args &&
test_path_is_missing .git/hook.stdin &&
test_path_is_missing .git/hook.stdout
ok 6 - hook does not run from repo config
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5537-fetch-shallow.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5537-fetch-shallow/.git/
expecting success:
commit 1 &&
commit 2 &&
commit 3 &&
commit 4 &&
git config --global transfer.fsckObjects true
[master (root-commit) 992f3ae] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 tracked
[master db64217] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 39f16ca] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 1c71802] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
git clone --no-local --depth=2 .git shallow &&
git --git-dir=shallow/.git log --format=%s >actual &&
cat <<EOF >expect &&
4
3
EOF
test_cmp expect actual
Cloning into 'shallow'...
ok 2 - setup shallow clone
expecting success:
git clone --no-local shallow shallow2 &&
(
cd shallow2 &&
git fsck &&
git log --format=%s >actual &&
cat <<EOF >expect &&
4
3
EOF
test_cmp expect actual
)
Cloning into 'shallow2'...
ok 3 - clone from shallow clone
expecting success:
(
cd shallow &&
commit 5
) &&
(
cd shallow2 &&
git fetch &&
git fsck &&
git log --format=%s origin/master >actual &&
cat <<EOF >expect &&
5
4
3
EOF
test_cmp expect actual
)
[master 353f4c2] 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
From /<<PKGBUILDDIR>>/t/trash directory.t5537-fetch-shallow/shallow
1c71802..353f4c2 master -> origin/master
ok 4 - fetch from shallow clone
expecting success:
(
cd shallow &&
commit 6
) &&
(
cd shallow2 &&
git fetch --depth=2 &&
git fsck &&
git log --format=%s origin/master >actual &&
cat <<EOF >expect &&
6
5
EOF
test_cmp expect actual
)
[master fc3a9cd] 6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
From /<<PKGBUILDDIR>>/t/trash directory.t5537-fetch-shallow/shallow
353f4c2..fc3a9cd master -> origin/master
ok 5 - fetch --depth from shallow clone
expecting success:
(
cd shallow2 &&
git fetch --unshallow &&
git fsck &&
git log --format=%s origin/master >actual &&
cat <<EOF >expect &&
6
5
4
3
EOF
test_cmp expect actual
)
ok 6 - fetch --unshallow from shallow clone
expecting success:
# the blob "1" is available in .git but hidden by the
# shallow2/.git/shallow and it should be resent
! git --git-dir=shallow2/.git cat-file blob $(echo 1|git hash-object --stdin) >/dev/null &&
echo 1 >1.t &&
git add 1.t &&
git commit -m add-1-back &&
(
cd shallow2 &&
git fetch ../.git +refs/heads/master:refs/remotes/top/master &&
git fsck &&
git log --format=%s top/master >actual &&
cat <<EOF >expect &&
add-1-back
4
3
EOF
test_cmp expect actual
) &&
git --git-dir=shallow2/.git cat-file blob $(echo 1|git hash-object --stdin) >/dev/null
fatal: git cat-file d00491fd7e5bb6fa28c517a0bb32b8b506539d4d: bad file
[master 7b3947d] add-1-back
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1.t
From ../
* [new branch] master -> top/master
ok 7 - fetch something upstream has but hidden by clients shallow boundaries
expecting success:
(
cd shallow &&
git checkout --orphan no-shallow &&
commit no-shallow
) &&
git init notshallow &&
(
cd notshallow &&
git fetch ../shallow/.git refs/heads/*:refs/remotes/shallow/*&&
git for-each-ref --format="%(refname)" >actual.refs &&
cat <<EOF >expect.refs &&
refs/remotes/shallow/no-shallow
EOF
test_cmp expect.refs actual.refs &&
git log --format=%s shallow/no-shallow >actual &&
cat <<EOF >expect &&
no-shallow
EOF
test_cmp expect actual
)
Switched to a new branch 'no-shallow'
[no-shallow (root-commit) f9eb650] no-shallow
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 tracked
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5537-fetch-shallow/notshallow/.git/
warning: reject refs/remotes/shallow/master because shallow roots are not allowed to be updated
From ../shallow/
* [new branch] no-shallow -> shallow/no-shallow
ok 8 - fetch that requires changes in .git/shallow is filtered
expecting success:
(
cd shallow &&
git checkout master &&
commit 7 &&
git tag -m foo heavy-tag HEAD^ &&
git tag light-tag HEAD^:tracked
) &&
(
cd notshallow &&
git fetch --update-shallow ../shallow/.git refs/heads/*:refs/remotes/shallow/* &&
git fsck &&
git for-each-ref --sort=refname --format="%(refname)" >actual.refs &&
cat <<EOF >expect.refs &&
refs/remotes/shallow/master
refs/remotes/shallow/no-shallow
refs/tags/heavy-tag
refs/tags/light-tag
EOF
test_cmp expect.refs actual.refs &&
git log --format=%s shallow/master >actual &&
cat <<EOF >expect &&
7
6
5
4
3
EOF
test_cmp expect actual
)
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
[master ff9088f] 7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
error: Could not read db6421740fdb6628ec6dceb741557dcfbcc1df34
From ../shallow/
* [new branch] master -> shallow/master
* [new tag] heavy-tag -> heavy-tag
* [new tag] light-tag -> light-tag
notice: HEAD points to an unborn branch (master)
ok 9 - fetch --update-shallow
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 -r SANETESTD.1/x &&
chmod -rx SANETESTD.2 ||
BUG "cannot prepare SANETESTD"
! test -r SANETESTD.1/x &&
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
BUG "cannot clean SANETESTD"
return $status
)
rm: cannot remove 'SANETESTD.1/x': Permission denied
prerequisite SANITY ok
expecting success:
cp -R .git read-only.git &&
test_when_finished "find read-only.git -type d -print | xargs chmod +w" &&
find read-only.git -print | xargs chmod -w &&
git clone --no-local --depth=2 read-only.git from-read-only &&
git --git-dir=from-read-only/.git log --format=%s >actual &&
cat >expect <<EOF &&
add-1-back
4
EOF
test_cmp expect actual
Cloning into 'from-read-only'...
ok 10 - shallow fetch from a read-only repo
expecting success:
git init shallow-server &&
test_commit -C shallow-server A &&
test_commit -C shallow-server B &&
git -C shallow-server checkout -b branch &&
test_commit -C shallow-server C &&
test_commit -C shallow-server E &&
test_commit -C shallow-server D &&
d="$(git -C shallow-server rev-parse --verify D^0)" &&
git -C shallow-server checkout master &&
git clone --depth=1 --no-tags --no-single-branch \
"file://$PWD/shallow-server" shallow-client &&
: now remove the branch and fetch with prune &&
git -C shallow-server branch -D branch &&
git -C shallow-client fetch --prune --depth=1 \
origin "+refs/heads/*:refs/remotes/origin/*" &&
git -C shallow-client repack -adfl &&
test_must_fail git -C shallow-client rev-parse --verify $d^0 &&
! grep $d shallow-client/.git/shallow &&
git -C shallow-server branch branch-orig $d &&
git -C shallow-client fetch --prune --depth=2 \
origin "+refs/heads/*:refs/remotes/origin/*"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5537-fetch-shallow/shallow-server/.git/
[master (root-commit) 0ddfaf1] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
[master d9df450] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B.t
Switched to a new branch 'branch'
[branch 35a8500] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C.t
[branch 3e7056f] E
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 E.t
[branch ab50130] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D.t
Switched to branch 'master'
Cloning into 'shallow-client'...
Deleted branch branch (was ab50130).
From file:///<<PKGBUILDDIR>>/t/trash directory.t5537-fetch-shallow/shallow-server
- [deleted] (none) -> origin/branch
fatal: Needed a single revision
From file:///<<PKGBUILDDIR>>/t/trash directory.t5537-fetch-shallow/shallow-server
* [new branch] branch-orig -> origin/branch-orig
ok 11 - .git/shallow is edited by repack
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
# passed all 11 test(s)
# SKIP no web server found at '/usr/sbin/apache2'
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5547-push-quarantine.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5547-push-quarantine/.git/
expecting success:
git init --bare dest.git &&
write_script dest.git/hooks/pre-receive <<-\EOF
while read old new ref; do
test "$(git log -1 --format=%s $new)" = reject && exit 1
done
exit 0
EOF
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5547-push-quarantine/dest.git/
ok 1 - create picky dest repo
expecting success:
test_commit ok &&
git push dest.git HEAD &&
commit=$(git rev-parse HEAD) &&
git --git-dir=dest.git cat-file commit $commit
[master (root-commit) c6ea792] ok
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 ok.t
To dest.git
* [new branch] HEAD -> master
tree b75e7563b6e3ea344e3d7eff513fde4da0914ed6
author A U Thor <author@example.com> 1112911993 -0700
committer C O Mitter <committer@example.com> 1112911993 -0700
ok
ok 2 - accepted objects work
expecting success:
test_commit reject &&
commit=$(git rev-parse HEAD) &&
test_must_fail git push dest.git reject &&
test_must_fail git --git-dir=dest.git cat-file commit $commit
[master d08c8eb] reject
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 reject.t
To dest.git
! [remote rejected] reject -> reject (pre-receive hook declined)
error: failed to push some refs to 'dest.git'
fatal: git cat-file d08c8eba97f4e683ece08654c7c8d2ba0c03b129: bad file
ok 3 - rejected objects are not installed
expecting success:
echo "incoming-*" >expect &&
(cd dest.git/objects && echo incoming-*) >actual &&
test_cmp expect actual
ok 4 - rejected objects are removed
expecting success:
# The interesting failure case here is when the
# receiving end cannot access its original object directory,
# so make it likely for us to generate a delta by having
# a non-trivial file with multiple versions.
test-tool genrandom foo 4096 >file.bin &&
git add file.bin &&
git commit -m bin &&
if test_have_prereq MINGW
then
pathsep=";"
else
pathsep=":"
fi &&
git clone --bare . "xxx${pathsep}yyy.git" &&
echo change >>file.bin &&
git commit -am change &&
# Note that we have to use the full path here, or it gets confused
# with the ssh host:path syntax.
git push "$(pwd)/xxx${pathsep}yyy.git" HEAD
[master f56dd63] bin
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file.bin
Cloning into bare repository 'xxx:yyy.git'...
done.
[master 0343f66] change
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
To /<<PKGBUILDDIR>>/t/trash directory.t5547-push-quarantine/xxx:yyy.git
f56dd63..0343f66 HEAD -> master
ok 5 - push to repo path with path separator (colon)
expecting success:
git init --bare update.git &&
write_script update.git/hooks/pre-receive <<-\EOF &&
read old new refname
git update-ref refs/heads/unrelated $new
exit 1
EOF
test_must_fail git push update.git HEAD &&
git -C update.git fsck
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5547-push-quarantine/update.git/
remote: fatal: update_ref failed for ref 'refs/heads/unrelated': ref updates forbidden inside quarantine environment
To update.git
! [remote rejected] HEAD -> master (pre-receive hook declined)
error: failed to push some refs to 'update.git'
notice: HEAD points to an unborn branch (master)
notice: No default references
ok 6 - updating a ref from quarantine is forbidden
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5546-receive-limits.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5546-receive-limits/.git/
expecting success:
test-tool genrandom foo 1024 >one-k &&
git add one-k &&
test_commit one-k
[master (root-commit) cba7046] one-k
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 100644 one-k
create mode 100644 one-k.t
ok 1 - create known-size (1024 bytes) commit
expecting success:
rm -fr dest &&
git --bare init dest
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5546-receive-limits/dest/
ok 2 - prepare destination repository
expecting success:
git --git-dir=dest config receive.unpacklimit "$unpack_limit"
ok 3 - set unpacklimit to 1
expecting success:
git --git-dir=dest config receive.maxInputSize 512 &&
test_must_fail git push dest HEAD
remote: fatal: pack exceeds maximum allowed size
error: remote unpack failed: index-pack abnormal exit
To dest
! [remote rejected] HEAD -> master (unpacker error)
error: failed to push some refs to 'dest'
ok 4 - setting receive.maxInputSize to 512 rejects push
expecting success:
git --git-dir=dest config receive.maxInputSize 4k &&
git push dest HEAD
To dest
* [new branch] HEAD -> master
ok 5 - bumping limit to 4k allows push
expecting success:
rm -fr dest &&
git --bare init dest
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5546-receive-limits/dest/
ok 6 - prepare destination repository (again)
expecting success:
git --git-dir=dest config receive.maxInputSize 0 &&
git push dest HEAD
To dest
* [new branch] HEAD -> master
ok 7 - lifting the limit allows push
expecting success:
rm -fr dest &&
git --bare init dest
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5546-receive-limits/dest/
ok 8 - prepare destination repository
expecting success:
git --git-dir=dest config receive.unpacklimit "$unpack_limit"
ok 9 - set unpacklimit to 10000
expecting success:
git --git-dir=dest config receive.maxInputSize 512 &&
test_must_fail git push dest HEAD
remote: fatal: pack exceeds maximum allowed size
error: remote unpack failed: unpack-objects abnormal exit
To dest
! [remote rejected] HEAD -> master (unpacker error)
error: failed to push some refs to 'dest'
ok 10 - setting receive.maxInputSize to 512 rejects push
expecting success:
git --git-dir=dest config receive.maxInputSize 4k &&
git push dest HEAD
To dest
* [new branch] HEAD -> master
ok 11 - bumping limit to 4k allows push
expecting success:
rm -fr dest &&
git --bare init dest
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5546-receive-limits/dest/
ok 12 - prepare destination repository (again)
expecting success:
git --git-dir=dest config receive.maxInputSize 0 &&
git push dest HEAD
To dest
* [new branch] HEAD -> master
ok 13 - lifting the limit allows push
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5550-http-fetch-dumb.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5550-http-fetch-dumb/.git/
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
1..0 # SKIP no web server found at '/usr/sbin/apache2'
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5551-http-fetch-smart.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5551-http-fetch-smart/.git/
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
1..0 # SKIP no web server found at '/usr/sbin/apache2'
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5543-atomic-push.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5543-atomic-push/.git/
expecting success:
mk_repo_pair &&
(
cd workbench &&
test_commit one &&
git push --mirror up &&
test_commit two &&
git push --atomic up master
) &&
test_refs master master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5543-atomic-push/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5543-atomic-push/workbench/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
remote: warning: updating the current branch
To ../upstream
* [new branch] master -> master
* [new tag] one -> one
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
remote: warning: updating the current branch
To ../upstream
d79ce16..139b20d master -> master
ok 1 - atomic push works for a single branch
expecting success:
mk_repo_pair &&
(
cd workbench &&
test_commit one &&
git branch second &&
git push --mirror up &&
test_commit two &&
git checkout second &&
test_commit three &&
git push --atomic up master second
) &&
test_refs master master &&
test_refs second second
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5543-atomic-push/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5543-atomic-push/workbench/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
remote: warning: updating the current branch
To ../upstream
* [new branch] master -> master
* [new branch] second -> second
* [new tag] one -> one
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
Switched to branch 'second'
[second 897c206] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
remote: warning: updating the current branch
To ../upstream
d79ce16..139b20d master -> master
d79ce16..897c206 second -> second
ok 2 - atomic push works for two branches
expecting success:
mk_repo_pair &&
(
cd workbench &&
test_commit one &&
git checkout -b second &&
test_commit two &&
git push --atomic --mirror up
) &&
test_refs master master &&
test_refs second second
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5543-atomic-push/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5543-atomic-push/workbench/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Switched to a new branch 'second'
[second 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
remote: warning: updating the current branch
To ../upstream
* [new branch] master -> master
* [new branch] second -> second
* [new tag] one -> one
* [new tag] two -> two
ok 3 - atomic push works in combination with --mirror
expecting success:
mk_repo_pair &&
(
cd workbench &&
test_commit one &&
git branch second master &&
test_commit two_a &&
git checkout second &&
test_commit two_b &&
test_commit three_b &&
test_commit four &&
git push --mirror up &&
# The actual test is below
git checkout master &&
test_commit three_a &&
git checkout second &&
git reset --hard HEAD^ &&
git push --force --atomic up master second
) &&
test_refs master master &&
test_refs second second
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5543-atomic-push/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5543-atomic-push/workbench/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 0fd3f08] two_a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two_a.t
Switched to branch 'second'
[second 476acd6] two_b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two_b.t
[second 04c72ee] three_b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three_b.t
[second f7b7ae4] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 four.t
remote: warning: updating the current branch
To ../upstream
* [new branch] master -> master
* [new branch] second -> second
* [new tag] four -> four
* [new tag] one -> one
* [new tag] three_b -> three_b
* [new tag] two_a -> two_a
* [new tag] two_b -> two_b
Switched to branch 'master'
[master 6413866] three_a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three_a.t
Switched to branch 'second'
HEAD is now at 04c72ee three_b
remote: warning: updating the current branch
To ../upstream
0fd3f08..6413866 master -> master
+ f7b7ae4...04c72ee second -> second (forced update)
ok 4 - atomic push works in combination with --force
expecting success:
mk_repo_pair &&
(
cd workbench &&
test_commit one &&
git checkout -b second master &&
test_commit two &&
test_commit three &&
test_commit four &&
git push --mirror up &&
git reset --hard HEAD~2 &&
test_commit five &&
git checkout master &&
test_commit six &&
test_must_fail git push --atomic --all up
) &&
test_refs master HEAD@{7} &&
test_refs second HEAD@{4}
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5543-atomic-push/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5543-atomic-push/workbench/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Switched to a new branch 'second'
[second 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[second 7c7cd71] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
[second fd8d77e] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 four.t
remote: warning: updating the current branch
To ../upstream
* [new branch] master -> master
* [new branch] second -> second
* [new tag] four -> four
* [new tag] one -> one
* [new tag] three -> three
* [new tag] two -> two
HEAD is now at 139b20d two
[second a9f66f4] five
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 five.t
Switched to branch 'master'
[master 29c9ea2] six
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 six.t
error: atomic push failed for ref refs/heads/second. status: 2
fatal: the remote end hung up unexpectedly
To ../upstream
! [rejected] master -> master (atomic push failed)
! [rejected] second -> second (non-fast-forward)
! [rejected] four (atomic push failed)
! [rejected] one (atomic push failed)
! [rejected] three (atomic push failed)
! [rejected] two (atomic push failed)
error: failed to push some refs to '../upstream'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
ok 5 - atomic push fails if one branch fails
expecting success:
# prepare the repo
mk_repo_pair &&
(
cd workbench &&
test_commit one &&
git checkout -b second master &&
test_commit two &&
git push --mirror up
) &&
# a third party modifies the server side:
(
cd upstream &&
git checkout second &&
git tag test_tag second
) &&
# see if we can now push both branches.
(
cd workbench &&
git checkout master &&
test_commit three &&
git checkout second &&
test_commit four &&
git tag test_tag &&
test_must_fail git push --tags --atomic up master second
) &&
test_refs master HEAD@{3} &&
test_refs second HEAD@{1}
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5543-atomic-push/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5543-atomic-push/workbench/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Switched to a new branch 'second'
[second 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
remote: warning: updating the current branch
To ../upstream
* [new branch] master -> master
* [new branch] second -> second
* [new tag] one -> one
* [new tag] two -> two
Switched to branch 'second'
Switched to branch 'master'
[master 846d065] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
Switched to branch 'second'
[second b6d6c1f] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 four.t
error: atomic push failed for ref refs/tags/test_tag. status: 3
fatal: the remote end hung up unexpectedly
To ../upstream
! [rejected] master -> master (atomic push failed)
! [rejected] second -> second (atomic push failed)
! [rejected] one -> one (atomic push failed)
! [rejected] test_tag -> test_tag (already exists)
! [rejected] two -> two (atomic push failed)
! [rejected] four -> four (atomic push failed)
! [rejected] three -> three (atomic push failed)
error: failed to push some refs to '../upstream'
hint: Updates were rejected because the tag already exists in the remote.
ok 6 - atomic push fails if one tag fails remotely
expecting success:
mk_repo_pair &&
(
cd workbench &&
test_commit one &&
git checkout -b second master &&
test_commit two &&
git push --mirror up
) &&
(
cd upstream &&
HOOKDIR="$(git rev-parse --git-dir)/hooks" &&
HOOK="$HOOKDIR/update" &&
mkdir -p "$HOOKDIR" &&
write_script "$HOOK" <<-\EOF
# only allow update to master from now on
test "$1" = "refs/heads/master"
EOF
) &&
(
cd workbench &&
git checkout master &&
test_commit three &&
git checkout second &&
test_commit four &&
test_must_fail git push --atomic up master second
) &&
test_refs master HEAD@{3} &&
test_refs second HEAD@{1}
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5543-atomic-push/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5543-atomic-push/workbench/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Switched to a new branch 'second'
[second 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
remote: warning: updating the current branch
To ../upstream
* [new branch] master -> master
* [new branch] second -> second
* [new tag] one -> one
* [new tag] two -> two
Switched to branch 'master'
[master 846d065] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
Switched to branch 'second'
[second b6d6c1f] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 four.t
remote: warning: updating the current branch
remote: error: hook declined to update refs/heads/second
To ../upstream
! [remote rejected] master -> master (atomic push failure)
! [remote rejected] second -> second (hook declined)
! [rejected] one (atomic push failed)
! [rejected] two (atomic push failed)
error: failed to push some refs to '../upstream'
ok 7 - atomic push obeys update hook preventing a branch to be pushed
expecting success:
mk_repo_pair &&
(
cd upstream &&
git config receive.advertiseatomic 0
) &&
(
cd workbench &&
test_commit one &&
git push --mirror up &&
test_commit two &&
test_must_fail git push --atomic up master
) &&
test_refs master HEAD@{1}
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5543-atomic-push/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5543-atomic-push/workbench/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
remote: warning: updating the current branch
To ../upstream
* [new branch] master -> master
* [new tag] one -> one
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
fatal: the receiving end does not support --atomic push
fatal: the remote end hung up unexpectedly
ok 8 - atomic push is not advertised if configured
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5561-http-backend.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5561-http-backend/.git/
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
1..0 # SKIP no web server found at '/usr/sbin/apache2'
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5560-http-backend-noserver.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5560-http-backend-noserver/.git/
expecting success:
echo content >file &&
git add file &&
git commit -m one &&
mkdir "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
(cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
git --bare init &&
: >objects/info/alternates &&
: >objects/info/http-alternates
) &&
git remote add public "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
git push public master:master &&
(cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
git repack -a -d
) &&
echo other >file &&
git add file &&
git commit -m two &&
git push public master:master &&
LOOSE_URL=$(find_file objects/??) &&
PACK_URL=$(find_file objects/pack/*.pack) &&
IDX_URL=$(find_file objects/pack/*.idx)
[master (root-commit) c8165c1] one
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.t5560-http-backend-noserver/repo.git/
To /<<PKGBUILDDIR>>/t/trash directory.t5560-http-backend-noserver/repo.git
* [new branch] master -> master
[master 405fa0b] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
To /<<PKGBUILDDIR>>/t/trash directory.t5560-http-backend-noserver/repo.git
c8165c1..405fa0b master -> master
ok 1 - setup repository
expecting success:
GET refs/heads/master "404 Not Found"
ok 2 - direct refs/heads/master not found
expecting success:
get_static_files "200 OK"
ok 3 - static file is ok
expecting success:
get_static_files "404 Not Found"
ok 4 - no export by default
expecting success:
(cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
touch git-daemon-export-ok
) &&
get_static_files "200 OK"
ok 5 - export if git-daemon-export-ok
expecting success:
config http.getanyfile true &&
get_static_files "200 OK"
ok 6 - static file if http.getanyfile true is ok
expecting success:
config http.getanyfile false &&
get_static_files "403 Forbidden"
ok 7 - static file if http.getanyfile false fails
expecting success:
GET info/refs?service=git-upload-pack "200 OK" &&
POST git-upload-pack 0000 "200 OK"
ok 8 - http.uploadpack default enabled
expecting success:
config http.uploadpack true &&
GET info/refs?service=git-upload-pack "200 OK" &&
POST git-upload-pack 0000 "200 OK"
ok 9 - http.uploadpack true
expecting success:
config http.uploadpack false &&
GET info/refs?service=git-upload-pack "403 Forbidden" &&
POST git-upload-pack 0000 "403 Forbidden"
ok 10 - http.uploadpack false
expecting success:
GET info/refs?service=git-receive-pack "403 Forbidden" &&
POST git-receive-pack 0000 "403 Forbidden"
ok 11 - http.receivepack default disabled
expecting success:
config http.receivepack true &&
GET info/refs?service=git-receive-pack "200 OK" &&
POST git-receive-pack 0000 "200 OK"
ok 12 - http.receivepack true
expecting success:
config http.receivepack false &&
GET info/refs?service=git-receive-pack "403 Forbidden" &&
POST git-receive-pack 0000 "403 Forbidden"
ok 13 - http.receivepack false
expecting success:
config http.getanyfile true &&
expect_aliased 0 /repo.git/HEAD &&
expect_aliased 1 /repo.git/../HEAD &&
expect_aliased 1 /../etc/passwd &&
expect_aliased 1 ../etc/passwd &&
expect_aliased 1 /etc//passwd &&
expect_aliased 1 /etc/./passwd &&
expect_aliased 1 //domain/data.txt
--- exp.err 2019-08-14 07:32:14.870459364 +0000
+++ act.err 2019-08-14 07:32:14.850459087 +0000
@@ -1 +0,0 @@
-fatal: '/repo.git/../HEAD': aliased
--- exp.err 2019-08-14 07:32:14.906459864 +0000
+++ act.err 2019-08-14 07:32:14.902459808 +0000
@@ -1 +1 @@
-fatal: '/../etc/passwd': aliased
+Request not supported: '/<<PKGBUILDDIR>>/t/trash directory.t5560-http-backend-noserver//../etc/passwd'
\ No newline at end of file
--- exp.err 2019-08-14 07:32:14.934460253 +0000
+++ act.err 2019-08-14 07:32:14.930460197 +0000
@@ -1 +1 @@
-fatal: '../etc/passwd': aliased
+Request not supported: '/<<PKGBUILDDIR>>/t/trash directory.t5560-http-backend-noserver/../etc/passwd'
\ No newline at end of file
--- exp.err 2019-08-14 07:32:14.974460808 +0000
+++ act.err 2019-08-14 07:32:14.974460808 +0000
@@ -1 +1 @@
-fatal: '/etc//passwd': aliased
+Request not supported: '/<<PKGBUILDDIR>>/t/trash directory.t5560-http-backend-noserver//etc//passwd'
\ No newline at end of file
--- exp.err 2019-08-14 07:32:15.002461197 +0000
+++ act.err 2019-08-14 07:32:14.994461085 +0000
@@ -1 +1 @@
-fatal: '/etc/./passwd': aliased
+Request not supported: '/<<PKGBUILDDIR>>/t/trash directory.t5560-http-backend-noserver//etc/./passwd'
\ No newline at end of file
--- exp.err 2019-08-14 07:32:15.030461583 +0000
+++ act.err 2019-08-14 07:32:15.026461528 +0000
@@ -1 +1 @@
-fatal: '//domain/data.txt': aliased
+Request not supported: '/<<PKGBUILDDIR>>/t/trash directory.t5560-http-backend-noserver///domain/data.txt'
\ No newline at end of file
ok 14 - http-backend blocks bad PATH_INFO
# passed all 14 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5545-push-options.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/.git/
expecting success:
mk_repo_pair &&
git -C upstream config receive.advertisePushOptions true &&
(
cd workbench &&
test_commit one &&
git push --mirror up &&
test_commit two &&
git push --push-option=asdf up master
) &&
test_refs master master &&
echo "asdf" >expect &&
test_cmp expect upstream/.git/hooks/pre-receive.push_options &&
test_cmp expect upstream/.git/hooks/post-receive.push_options
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/workbench/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
remote: warning: updating the current branch
To ../upstream
* [new branch] master -> master
* [new tag] one -> one
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
remote: warning: updating the current branch
To ../upstream
d79ce16..139b20d master -> master
ok 1 - one push option works for a single branch
expecting success:
mk_repo_pair &&
git -C upstream config receive.advertisePushOptions false &&
(
cd workbench &&
test_commit one &&
git push --mirror up &&
test_commit two &&
test_must_fail git push --push-option=asdf up master
) &&
test_refs master HEAD@{1}
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/workbench/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
remote: warning: updating the current branch
To ../upstream
* [new branch] master -> master
* [new tag] one -> one
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
fatal: the receiving end does not support push options
fatal: the remote end hung up unexpectedly
ok 2 - push option denied by remote
expecting success:
mk_repo_pair &&
git -C upstream config receive.advertisePushOptions true &&
(
cd workbench &&
test_commit one &&
git push --mirror up &&
test_commit two &&
git push --push-option=asdf --push-option="more structured text" up master
) &&
test_refs master master &&
printf "asdf\nmore structured text\n" >expect &&
test_cmp expect upstream/.git/hooks/pre-receive.push_options &&
test_cmp expect upstream/.git/hooks/post-receive.push_options
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/workbench/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
remote: warning: updating the current branch
To ../upstream
* [new branch] master -> master
* [new tag] one -> one
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
remote: warning: updating the current branch
To ../upstream
d79ce16..139b20d master -> master
ok 3 - two push options work
expecting success:
test_when_finished "rm -rf parent" &&
test_when_finished "rm -rf parent_upstream" &&
mk_repo_pair &&
git -C upstream config receive.advertisePushOptions true &&
cp -r upstream parent_upstream &&
test_commit -C upstream one &&
test_create_repo parent &&
git -C parent remote add up ../parent_upstream &&
test_commit -C parent one &&
git -C parent push --mirror up &&
git -C parent submodule add ../upstream workbench &&
git -C parent/workbench remote add up ../../upstream &&
git -C parent commit -m "add submoule" &&
test_commit -C parent/workbench two &&
git -C parent add workbench &&
git -C parent commit -m "update workbench" &&
git -C parent push \
--push-option=asdf --push-option="more structured text" \
--recurse-submodules=on-demand up master &&
git -C upstream rev-parse --verify master >expect &&
git -C parent/workbench rev-parse --verify master >actual &&
test_cmp expect actual &&
git -C parent_upstream rev-parse --verify master >expect &&
git -C parent rev-parse --verify master >actual &&
test_cmp expect actual &&
printf "asdf\nmore structured text\n" >expect &&
test_cmp expect upstream/.git/hooks/pre-receive.push_options &&
test_cmp expect upstream/.git/hooks/post-receive.push_options &&
test_cmp expect parent_upstream/.git/hooks/pre-receive.push_options &&
test_cmp expect parent_upstream/.git/hooks/post-receive.push_options
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/workbench/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/parent/.git/
[master (root-commit) b838542] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
remote: warning: updating the current branch
To ../parent_upstream
* [new branch] master -> master
* [new tag] one -> one
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/parent/workbench'...
done.
[master f3f0fa6] add submoule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 workbench
[master 8f1d4ef] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[master 4bd3bdf] update workbench
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Pushing submodule 'workbench'
remote: warning: updating the current branch
To ../../upstream
d79ce16..8f1d4ef master -> master
remote: warning: updating the current branch
To ../parent_upstream
b838542..4bd3bdf master -> master
ok 4 - push options and submodules
expecting success:
mk_repo_pair &&
git -C upstream config receive.advertisePushOptions true &&
(
cd workbench &&
test_commit one &&
git push --mirror up &&
test_commit two &&
git -c push.pushOption=default push up master
) &&
test_refs master master &&
echo "default" >expect &&
test_cmp expect upstream/.git/hooks/pre-receive.push_options &&
test_cmp expect upstream/.git/hooks/post-receive.push_options
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/workbench/.git/
[master (root-commit) af0b45c] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
remote: warning: updating the current branch
To ../upstream
* [new branch] master -> master
* [new tag] one -> one
[master 1dd7f79] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
remote: warning: updating the current branch
To ../upstream
af0b45c..1dd7f79 master -> master
ok 5 - default push option
expecting success:
mk_repo_pair &&
git -C upstream config receive.advertisePushOptions true &&
(
cd workbench &&
test_commit one &&
git push --mirror up &&
test_commit two &&
git -c push.pushOption=default1 -c push.pushOption=default2 push up master
) &&
test_refs master master &&
printf "default1\ndefault2\n" >expect &&
test_cmp expect upstream/.git/hooks/pre-receive.push_options &&
test_cmp expect upstream/.git/hooks/post-receive.push_options
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/workbench/.git/
[master (root-commit) af0b45c] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
remote: warning: updating the current branch
To ../upstream
* [new branch] master -> master
* [new tag] one -> one
[master 1dd7f79] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
remote: warning: updating the current branch
To ../upstream
af0b45c..1dd7f79 master -> master
ok 6 - two default push options
expecting success:
mk_repo_pair &&
git -C upstream config receive.advertisePushOptions true &&
(
cd workbench &&
test_commit one &&
git push --mirror up &&
test_commit two &&
git -c push.pushOption=default push --push-option=manual up master
) &&
test_refs master master &&
echo "manual" >expect &&
test_cmp expect upstream/.git/hooks/pre-receive.push_options &&
test_cmp expect upstream/.git/hooks/post-receive.push_options
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/workbench/.git/
[master (root-commit) af0b45c] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
remote: warning: updating the current branch
To ../upstream
* [new branch] master -> master
* [new tag] one -> one
[master 1dd7f79] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
remote: warning: updating the current branch
To ../upstream
af0b45c..1dd7f79 master -> master
ok 7 - push option from command line overrides from-config push option
expecting success:
mk_repo_pair &&
git -C upstream config receive.advertisePushOptions true &&
(
cd workbench &&
test_commit one &&
git push --mirror up &&
test_commit two &&
git -c push.pushOption=default1 -c push.pushOption= -c push.pushOption=default2 push up master
) &&
test_refs master master &&
echo "default2" >expect &&
test_cmp expect upstream/.git/hooks/pre-receive.push_options &&
test_cmp expect upstream/.git/hooks/post-receive.push_options
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/workbench/.git/
[master (root-commit) af0b45c] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
remote: warning: updating the current branch
To ../upstream
* [new branch] master -> master
* [new tag] one -> one
[master 1dd7f79] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
remote: warning: updating the current branch
To ../upstream
af0b45c..1dd7f79 master -> master
ok 8 - empty value of push.pushOption in config clears the list
expecting success:
mk_repo_pair &&
git -C upstream config receive.advertisePushOptions true &&
(
cd workbench &&
test_commit one &&
git push --mirror up &&
test_commit two &&
test_must_fail git -c push.pushOption push up master
) &&
test_refs master HEAD@{1}
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/workbench/.git/
[master (root-commit) af0b45c] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
remote: warning: updating the current branch
To ../upstream
* [new branch] master -> master
* [new tag] one -> one
[master 1dd7f79] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
error: missing value for 'push.pushoption'
fatal: unable to parse 'push.pushoption' from command-line config
ok 9 - invalid push option in config
expecting success:
mk_repo_pair &&
git -C upstream config receive.advertisePushOptions true &&
test_commit -C workbench one &&
git -C workbench push --push-option="\"embedded quotes\"" up master &&
echo "\"embedded quotes\"" >expect &&
test_cmp expect upstream/.git/hooks/pre-receive.push_options
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5545-push-options/workbench/.git/
[master (root-commit) af0b45c] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
remote: warning: updating the current branch
To ../upstream
* [new branch] master -> master
ok 10 - push options keep quoted characters intact (direct)
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
# passed all 10 test(s)
# SKIP no web server found at '/usr/sbin/apache2'
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5562-http-backend-content-length.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5562-http-backend-content-length/.git/
expecting success:
HTTP_CONTENT_ENCODING="identity" &&
export HTTP_CONTENT_ENCODING &&
git config http.receivepack true &&
test_commit c0 &&
test_commit c1 &&
hash_head=$(git rev-parse HEAD) &&
hash_prev=$(git rev-parse HEAD~1) &&
printf "want %s" "$hash_head" | packetize >fetch_body &&
printf 0000 >>fetch_body &&
printf "have %s" "$hash_prev" | packetize >>fetch_body &&
printf done | packetize >>fetch_body &&
test_copy_bytes 10 <fetch_body >fetch_body.trunc &&
hash_next=$(git commit-tree -p HEAD -m next HEAD^{tree}) &&
printf "%s %s refs/heads/newbranch\\0report-status\\n" "$_z40" "$hash_next" | packetize >push_body &&
printf 0000 >>push_body &&
echo "$hash_next" | git pack-objects --stdout >>push_body &&
test_copy_bytes 10 <push_body >push_body.trunc &&
: >empty_body
[master (root-commit) a44f171] c0
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c0.t
[master 989de5e] c1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c1.t
ok 1 - setup
checking prerequisite: GZIP
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&gzip --version
)
gzip 1.9
Copyright (C) 2017 Free Software Foundation, Inc.
Copyright (C) 1993 Jean-loup Gailly.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Written by Jean-loup Gailly.
prerequisite GZIP ok
expecting success:
gzip -c fetch_body >fetch_body.gz &&
test_copy_bytes 10 <fetch_body.gz >fetch_body.gz.trunc &&
gzip -c push_body >push_body.gz &&
test_copy_bytes 10 <push_body.gz >push_body.gz.trunc
ok 2 - setup, compression related
expecting success:
test_http_env upload fetch_body &&
verify_http_result "200 OK"
ok 3 - fetch plain
expecting success:
test_http_env upload fetch_body.trunc &&
! verify_http_result "200 OK"
fatal: the remote end hung up unexpectedly
ok 4 - fetch plain truncated
expecting success:
test_http_env upload empty_body &&
! verify_http_result "200 OK"
fatal: the remote end hung up unexpectedly
ok 5 - fetch plain empty
expecting success:
test_env HTTP_CONTENT_ENCODING="gzip" test_http_env upload fetch_body.gz &&
verify_http_result "200 OK"
ok 6 - fetch gzipped
expecting success:
test_env HTTP_CONTENT_ENCODING="gzip" test_http_env upload fetch_body.gz.trunc &&
! verify_http_result "200 OK"
fatal: request ended in the middle of the gzip stream
ok 7 - fetch gzipped truncated
expecting success:
test_env HTTP_CONTENT_ENCODING="gzip" test_http_env upload empty_body &&
! verify_http_result "200 OK"
fatal: request ended in the middle of the gzip stream
ok 8 - fetch gzipped empty
expecting success:
test_when_finished "git branch -D newbranch" &&
test_http_env receive push_body &&
verify_http_result "200 OK" &&
git rev-parse newbranch >act.head &&
echo "$hash_next" >exp.head &&
test_cmp act.head exp.head
Deleted branch newbranch (was d8aa3fa).
ok 9 - push plain
expecting success:
test_http_env receive push_body.trunc &&
! verify_http_result "200 OK"
fatal: the remote end hung up unexpectedly
ok 10 - push plain truncated
expecting success:
test_http_env receive empty_body &&
! verify_http_result "200 OK"
fatal: the remote end hung up unexpectedly
ok 11 - push plain empty
expecting success:
test_when_finished "git branch -D newbranch" &&
test_env HTTP_CONTENT_ENCODING="gzip" test_http_env receive push_body.gz &&
verify_http_result "200 OK" &&
git rev-parse newbranch >act.head &&
echo "$hash_next" >exp.head &&
test_cmp act.head exp.head
Deleted branch newbranch (was d8aa3fa).
ok 12 - push gzipped
expecting success:
test_env HTTP_CONTENT_ENCODING="gzip" test_http_env receive push_body.gz.trunc &&
! verify_http_result "200 OK"
fatal: request ended in the middle of the gzip stream
ok 13 - push gzipped truncated
expecting success:
test_env HTTP_CONTENT_ENCODING="gzip" test_http_env receive empty_body &&
! verify_http_result "200 OK"
fatal: request ended in the middle of the gzip stream
ok 14 - push gzipped empty
expecting success:
NOT_FIT_IN_SSIZE=$(ssize_b100dots) &&
env \
CONTENT_TYPE=application/x-git-upload-pack-request \
QUERY_STRING=/repo.git/git-upload-pack \
PATH_TRANSLATED="$PWD"/.git/git-upload-pack \
GIT_HTTP_EXPORT_ALL=TRUE \
REQUEST_METHOD=POST \
CONTENT_LENGTH="$NOT_FIT_IN_SSIZE" \
git http-backend </dev/null >/dev/null 2>err &&
grep "fatal:.*CONTENT_LENGTH" err
fatal: failed to parse CONTENT_LENGTH: 2147483648
ok 15 - CONTENT_LENGTH overflow ssite_t
expecting success:
env \
QUERY_STRING="service=git-receive-pack" \
PATH_TRANSLATED="$PWD"/.git/info/refs \
GIT_HTTP_EXPORT_ALL=TRUE \
REQUEST_METHOD=GET \
CONTENT_LENGTH="" \
git http-backend <empty_body >act.out.$test_count 2>act.err.$test_count &&
verify_http_result "200 OK"
ok 16 - empty CONTENT_LENGTH
# passed all 16 test(s)
1..16
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5570-git-daemon.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/.git/
checking prerequisite: PIPE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports FIFOs
test_have_prereq !MINGW,!CYGWIN &&
rm -f testfifo && mkfifo testfifo
)
prerequisite PIPE ok
Starting git daemon ...
[21858] Ready to rumble
expecting success:
git config push.default matching &&
echo content >file &&
git add file &&
git commit -m one
[master (root-commit) ed13172] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 1 - setup repository
expecting success:
mkdir "$GIT_DAEMON_DOCUMENT_ROOT_PATH/repo.git" &&
(cd "$GIT_DAEMON_DOCUMENT_ROOT_PATH/repo.git" &&
git --bare init &&
: >git-daemon-export-ok
) &&
git remote add public "$GIT_DAEMON_DOCUMENT_ROOT_PATH/repo.git" &&
git push public master:master
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo/repo.git/
To /<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo/repo.git
* [new branch] master -> master
ok 2 - create git-accessible bare repository
expecting success:
git clone -v "$GIT_DAEMON_URL/repo.git" clone 2>stderr &&
check_verbose_connect &&
test_cmp file clone/file
[21989] Connection from 127.0.0.1:59770
[21989] Extended attribute "host": 127.0.0.1:5570
[21989] Request upload-pack for '/repo.git'
[21858] [21989] Disconnected
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Looking up 127.0.0.1 ... done.
Connecting to 127.0.0.1 (port 5570) ... 127.0.0.1 done.
Looking up 127.0.0.1 ... done.
Connecting to 127.0.0.1 (port 5570) ... 127.0.0.1 done.
ok 3 - clone git repository
expecting success:
echo content >>file &&
git commit -a -m two &&
git push public &&
(cd clone && git pull -v) 2>stderr &&
check_verbose_connect &&
test_cmp file clone/file
[master 7799ad6] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
To /<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo/repo.git
ed13172..7799ad6 master -> master
[22145] Connection from 127.0.0.1:59772
[22145] Extended attribute "host": 127.0.0.1:5570
[22145] Request upload-pack for '/repo.git'
[21858] [22145] Disconnected
Updating ed13172..7799ad6
Fast-forward
file | 1 +
1 file changed, 1 insertion(+)
Looking up 127.0.0.1 ... done.
Connecting to 127.0.0.1 (port 5570) ... 127.0.0.1 done.
Looking up 127.0.0.1 ... done.
Connecting to 127.0.0.1 (port 5570) ... 127.0.0.1 done.
ok 4 - fetch changes via git protocol
expecting success:
(cd clone && git fetch -v) 2>stderr &&
check_verbose_connect
[22229] Connection from 127.0.0.1:59774
[22229] Extended attribute "host": 127.0.0.1:5570
[22229] Request upload-pack for '/repo.git'
[21858] [22229] Disconnected
Looking up 127.0.0.1 ... done.
Connecting to 127.0.0.1 (port 5570) ... 127.0.0.1 done.
Looking up 127.0.0.1 ... done.
Connecting to 127.0.0.1 (port 5570) ... 127.0.0.1 done.
ok 5 - no-op fetch -v stderr is as expected
expecting success:
(cd clone && git fetch 2>../stderr) &&
test_must_be_empty stderr
[22289] Connection from 127.0.0.1:59776
[22289] Extended attribute "host": 127.0.0.1:5570
[22289] Request upload-pack for '/repo.git'
[21858] [22289] Disconnected
ok 6 - no-op fetch without "-v" is quiet
expecting success:
git push public master:other &&
(cd clone &&
git remote set-head -d origin &&
git remote set-head -a origin &&
git symbolic-ref refs/remotes/origin/HEAD > output &&
echo refs/remotes/origin/master > expect &&
test_cmp expect output
)
To /<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo/repo.git
* [new branch] master -> other
[22364] Connection from 127.0.0.1:59778
[22364] Extended attribute "host": 127.0.0.1:5570
[22364] Request upload-pack for '/repo.git'
origin/HEAD set to master
[21858] [22364] Disconnected
ok 7 - remote detects correct HEAD
expecting success:
cp -R "$GIT_DAEMON_DOCUMENT_ROOT_PATH"/repo.git "$GIT_DAEMON_DOCUMENT_ROOT_PATH"/repo_pack.git &&
(cd "$GIT_DAEMON_DOCUMENT_ROOT_PATH"/repo_pack.git &&
git --bare repack -a -d
)
ok 8 - prepare pack objects
expecting success:
cp -R "$GIT_DAEMON_DOCUMENT_ROOT_PATH"/repo_pack.git "$GIT_DAEMON_DOCUMENT_ROOT_PATH"/repo_bad1.git &&
(cd "$GIT_DAEMON_DOCUMENT_ROOT_PATH"/repo_bad1.git &&
p=$(ls objects/pack/pack-*.pack) &&
chmod u+w $p &&
printf %0256d 0 | dd of=$p bs=256 count=1 seek=1 conv=notrunc
) &&
mkdir repo_bad1.git &&
(cd repo_bad1.git &&
git --bare init &&
test_must_fail git --bare fetch "$GIT_DAEMON_URL/repo_bad1.git" &&
test 0 = $(ls objects/pack/pack-*.pack | wc -l)
)
1+0 records in
1+0 records out
256 bytes copied, 0.000456866 s, 560 kB/s
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo_bad1.git/
[22532] Connection from 127.0.0.1:59780
[22532] Extended attribute "host": 127.0.0.1:5570
[22532] Request upload-pack for '/repo_bad1.git'
[22532] error: packfile ./objects/pack/pack-eb0f5eb021fcf644c879cff3349844bce8404e58.pack does not match index
[22532] error: packfile ./objects/pack/pack-eb0f5eb021fcf644c879cff3349844bce8404e58.pack does not match index
[22532] error: packfile ./objects/pack/pack-eb0f5eb021fcf644c879cff3349844bce8404e58.pack does not match index
[22532] error: packfile ./objects/pack/pack-eb0f5eb021fcf644c879cff3349844bce8404e58.pack does not match index
[22532] error: refs/heads/master does not point to a valid object!
[22532] error: packfile ./objects/pack/pack-eb0f5eb021fcf644c879cff3349844bce8404e58.pack does not match index
[22532] error: packfile ./objects/pack/pack-eb0f5eb021fcf644c879cff3349844bce8404e58.pack does not match index
[22532] error: refs/heads/other does not point to a valid object!
[22532] error: packfile ./objects/pack/pack-eb0f5eb021fcf644c879cff3349844bce8404e58.pack does not match index
[22532] error: packfile ./objects/pack/pack-eb0f5eb021fcf644c879cff3349844bce8404e58.pack does not match index
fatal: remote error: upload-pack: not our ref 7799ad6c234142a9a0f4377391ba04f99ae662a5
[22532] fatal: git upload-pack: not our ref 7799ad6c234142a9a0f4377391ba04f99ae662a5
[21858] [22532] Disconnected (with error)
ls: cannot access 'objects/pack/pack-*.pack': No such file or directory
ok 9 - fetch notices corrupt pack
expecting success:
cp -R "$GIT_DAEMON_DOCUMENT_ROOT_PATH"/repo_pack.git "$GIT_DAEMON_DOCUMENT_ROOT_PATH"/repo_bad2.git &&
(cd "$GIT_DAEMON_DOCUMENT_ROOT_PATH"/repo_bad2.git &&
rm -f objects/pack/multi-pack-index &&
p=$(ls objects/pack/pack-*.idx) &&
chmod u+w $p &&
printf %0256d 0 | dd of=$p bs=256 count=1 seek=1 conv=notrunc
) &&
mkdir repo_bad2.git &&
(cd repo_bad2.git &&
git --bare init &&
test_must_fail git --bare fetch "$GIT_DAEMON_URL/repo_bad2.git" &&
test 0 = $(ls objects/pack | wc -l)
)
1+0 records in
1+0 records out
256 bytes copied, 0.000442746 s, 578 kB/s
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo_bad2.git/
[22602] Connection from 127.0.0.1:59782
[22602] Extended attribute "host": 127.0.0.1:5570
[22602] Request upload-pack for '/repo_bad2.git'
fatal: remote error: upload-pack: not our ref 7799ad6c234142a9a0f4377391ba04f99ae662a5
[22602] error: non-monotonic index ./objects/pack/pack-eb0f5eb021fcf644c879cff3349844bce8404e58.idx
[22602] error: non-monotonic index ./objects/pack/pack-eb0f5eb021fcf644c879cff3349844bce8404e58.idx
[22602] error: non-monotonic index ./objects/pack/pack-eb0f5eb021fcf644c879cff3349844bce8404e58.idx
[22602] error: non-monotonic index ./objects/pack/pack-eb0f5eb021fcf644c879cff3349844bce8404e58.idx
[22602] error: refs/heads/master does not point to a valid object!
[22602] error: non-monotonic index ./objects/pack/pack-eb0f5eb021fcf644c879cff3349844bce8404e58.idx
[22602] error: non-monotonic index ./objects/pack/pack-eb0f5eb021fcf644c879cff3349844bce8404e58.idx
[22602] error: refs/heads/other does not point to a valid object!
[22602] error: non-monotonic index ./objects/pack/pack-eb0f5eb021fcf644c879cff3349844bce8404e58.idx
[22602] error: non-monotonic index ./objects/pack/pack-eb0f5eb021fcf644c879cff3349844bce8404e58.idx
[22602] fatal: git upload-pack: not our ref 7799ad6c234142a9a0f4377391ba04f99ae662a5
[21858] [22602] Disconnected (with error)
ok 10 - fetch notices corrupt idx
expecting success: test_remote_error 'access denied or repository not exported' clone nowhere.git
[22637] Connection from 127.0.0.1:59784
[22637] Extended attribute "host": 127.0.0.1:5570
[22637] Request upload-pack for '/nowhere.git'
[22637] '/<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo/nowhere.git' does not appear to be a git repository
[21858] [22637] Disconnected (with error)
fatal: remote error: access denied or repository not exported: /nowhere.git
ok 11 - clone non-existent
expecting success: test_remote_error 'access denied or repository not exported' push repo.git master
[22653] Connection from 127.0.0.1:59786
[22653] Extended attribute "host": 127.0.0.1:5570
[22653] Request receive-pack for '/repo.git'
[22653] 'receive-pack': service not enabled for '/<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo/repo.git'
[21858] [22653] Disconnected (with error)
fatal: remote error: access denied or repository not exported: /repo.git
ok 12 - push disabled
expecting success: test_remote_error -x 'access denied or repository not exported' fetch repo.git
[22672] Connection from 127.0.0.1:59788
[22672] Extended attribute "host": 127.0.0.1:5570
[22672] Request upload-pack for '/repo.git'
[22672] '/<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo/repo.git' does not appear to be a git repository
[21858] [22672] Disconnected (with error)
fatal: remote error: access denied or repository not exported: /repo.git
ok 13 - read access denied
expecting success: test_remote_error -n 'access denied or repository not exported' fetch repo.git
[22690] Connection from 127.0.0.1:59790
[22690] Extended attribute "host": 127.0.0.1:5570
[22690] Request upload-pack for '/repo.git'
[22690] '/<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo/repo.git': repository not exported.
[21858] [22690] Disconnected (with error)
fatal: remote error: access denied or repository not exported: /repo.git
ok 14 - not exported
Stopping git daemon ...
Starting git daemon ...
[22704] Ready to rumble
expecting success: test_remote_error 'no such repository' clone nowhere.git
[22718] Connection from 127.0.0.1:59792
[22718] Extended attribute "host": 127.0.0.1:5570
[22718] Request upload-pack for '/nowhere.git'
[22718] '/<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo/nowhere.git' does not appear to be a git repository
[22704] [22718] Disconnected (with error)
fatal: remote error: no such repository: /nowhere.git
ok 15 - clone non-existent
expecting success: test_remote_error 'service not enabled' push repo.git master
[22760] Connection from 127.0.0.1:59794
[22760] Extended attribute "host": 127.0.0.1:5570
[22760] Request receive-pack for '/repo.git'
[22760] 'receive-pack': service not enabled for '/<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo/repo.git'
[22704] [22760] Disconnected (with error)
fatal: remote error: service not enabled: /repo.git
ok 16 - push disabled
expecting success: test_remote_error -x 'no such repository' fetch repo.git
[22793] Connection from 127.0.0.1:59796
[22793] Extended attribute "host": 127.0.0.1:5570
[22793] Request upload-pack for '/repo.git'
[22793] '/<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo/repo.git' does not appear to be a git repository
[22704] [22793] Disconnected (with error)
fatal: remote error: no such repository: /repo.git
ok 17 - read access denied
expecting success: test_remote_error -n 'repository not exported' fetch repo.git
[22812] Connection from 127.0.0.1:59798
[22812] Extended attribute "host": 127.0.0.1:5570
[22812] Request upload-pack for '/repo.git'
[22812] '/<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo/repo.git': repository not exported.
[22704] [22812] Disconnected (with error)
fatal: remote error: repository not exported: /repo.git
ok 18 - not exported
Stopping git daemon ...
Starting git daemon ...
[22827] Ready to rumble
expecting success:
repo="$GIT_DAEMON_DOCUMENT_ROOT_PATH/localhost/interp.git" &&
git init --bare "$repo" &&
git push "$repo" HEAD &&
>"$repo"/git-daemon-export-ok &&
GIT_OVERRIDE_VIRTUAL_HOST=localhost \
git ls-remote "$GIT_DAEMON_URL/interp.git" &&
GIT_OVERRIDE_VIRTUAL_HOST=LOCALHOST \
git ls-remote "$GIT_DAEMON_URL/interp.git"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo/localhost/interp.git/
To /<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo/localhost/interp.git
* [new branch] HEAD -> master
[22900] Connection from 127.0.0.1:59800
[22900] Extended attribute "host": localhost
[22900] Request upload-pack for '/interp.git'
[22900] Interpolated dir '/<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo/localhost/interp.git'
7799ad6c234142a9a0f4377391ba04f99ae662a5 HEAD
7799ad6c234142a9a0f4377391ba04f99ae662a5 refs/heads/master
[22827] [22900] Disconnected
[22904] Connection from 127.0.0.1:59802
[22904] Extended attribute "host": LOCALHOST
[22904] Request upload-pack for '/interp.git'
[22904] Interpolated dir '/<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo/localhost/interp.git'
7799ad6c234142a9a0f4377391ba04f99ae662a5 HEAD
7799ad6c234142a9a0f4377391ba04f99ae662a5 refs/heads/master
[22827] [22904] Disconnected
ok 19 - access repo via interpolated hostname
expecting success:
repo="$GIT_DAEMON_DOCUMENT_ROOT_PATH/../escape.git" &&
git init --bare "$repo" &&
git push "$repo" HEAD &&
>"$repo"/git-daemon-export-ok &&
test_must_fail \
env GIT_OVERRIDE_VIRTUAL_HOST=.. \
git ls-remote "$GIT_DAEMON_URL/escape.git"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/escape.git/
To /<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo/../escape.git
* [new branch] HEAD -> master
[22949] Connection from 127.0.0.1:59804
[22949] Extended attribute "host": ..
[22949] Request upload-pack for '/escape.git'
[22949] Interpolated dir '/<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo//escape.git'
[22949] '/<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo//escape.git' does not appear to be a git repository
fatal: remote error: access denied or repository not exported: /escape.git
[22827] [22949] Disconnected (with error)
ok 20 - hostname cannot break out of directory
checking prerequisite: FAKENC
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
perl -MIO::Socket::INET -e "exit 0"
)
prerequisite FAKENC ok
expecting success:
{
printf "git-upload-pack /interp.git\n\0host=localhost" | packetize
printf "0000"
} >input &&
fake_nc "$GIT_DAEMON_HOST_PORT" <input >output &&
depacketize <output >output.raw &&
# just pick out the value of master, which avoids any protocol
# particulars
perl -lne "print \$1 if m{^(\\S+) refs/heads/master}" <output.raw >actual &&
git -C "$repo" rev-parse master >expect &&
test_cmp expect actual
[23093] Connection from 127.0.0.1:59806
[23093] Extended attribute "host": localhost
[23093] Request upload-pack for '/interp.git'
[23093] Interpolated dir '/<<PKGBUILDDIR>>/t/trash directory.t5570-git-daemon/repo/localhost/interp.git'
[22827] [23093] Disconnected
ok 21 - hostname interpolation works after LF-stripping
Stopping git daemon ...
# passed all 21 test(s)
1..21
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5571-pre-push-hook.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5571-pre-push-hook/.git/
expecting success:
git config push.default upstream &&
git init --bare repo1 &&
git remote add parent1 repo1 &&
test_commit one &&
git push parent1 HEAD:foreign
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5571-pre-push-hook/repo1/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
To repo1
* [new branch] HEAD -> foreign
ok 1 - setup
expecting success:
test_commit two &&
test_must_fail git push parent1 HEAD
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
error: failed to push some refs to 'repo1'
ok 2 - push with failing hook
expecting success:
git push --no-verify parent1 HEAD
To repo1
* [new branch] HEAD -> master
ok 3 - --no-verify bypasses hook
expecting success:
git push parent1 master:foreign &&
diff expected actual
To repo1
d79ce16..139b20d master -> foreign
ok 4 - push with hook
expecting success:
git checkout -b other parent1/foreign &&
test_commit three
Switched to a new branch 'other'
Branch 'other' set up to track remote branch 'foreign' from 'parent1'.
[other 7c7cd71] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
ok 5 - add a branch
expecting success:
git push &&
diff expected actual
To repo1
139b20d..7c7cd71 other -> foreign
ok 6 - push to default
expecting success:
git push parent1 one:tag1 HEAD~:refs/heads/prev &&
diff expected actual
To repo1
* [new tag] one -> tag1
* [new branch] HEAD~ -> prev
ok 7 - push non-branches
expecting success:
git push parent1 :prev &&
diff expected actual
To repo1
- [deleted] prev
ok 8 - push delete
expecting success:
git push repo1 HEAD &&
diff expected actual
To repo1
* [new branch] HEAD -> other
ok 9 - push to URL
expecting success:
{
nr=1000
while test $nr -lt 2000
do
nr=$(( $nr + 1 ))
echo "create refs/heads/b/$nr $COMMIT3"
done
} | git update-ref --stdin
ok 10 - set up many-ref tests
expecting success:
echo "exit 0" | write_script "$HOOK" &&
git push parent1 "refs/heads/b/*:refs/heads/b/*"
To repo1
* [new branch] b/1001 -> b/1001
* [new branch] b/1002 -> b/1002
* [new branch] b/1003 -> b/1003
* [new branch] b/1004 -> b/1004
* [new branch] b/1005 -> b/1005
* [new branch] b/1006 -> b/1006
* [new branch] b/1007 -> b/1007
* [new branch] b/1008 -> b/1008
* [new branch] b/1009 -> b/1009
* [new branch] b/1010 -> b/1010
* [new branch] b/1011 -> b/1011
* [new branch] b/1012 -> b/1012
* [new branch] b/1013 -> b/1013
* [new branch] b/1014 -> b/1014
* [new branch] b/1015 -> b/1015
* [new branch] b/1016 -> b/1016
* [new branch] b/1017 -> b/1017
* [new branch] b/1018 -> b/1018
* [new branch] b/1019 -> b/1019
* [new branch] b/1020 -> b/1020
* [new branch] b/1021 -> b/1021
* [new branch] b/1022 -> b/1022
* [new branch] b/1023 -> b/1023
* [new branch] b/1024 -> b/1024
* [new branch] b/1025 -> b/1025
* [new branch] b/1026 -> b/1026
* [new branch] b/1027 -> b/1027
* [new branch] b/1028 -> b/1028
* [new branch] b/1029 -> b/1029
* [new branch] b/1030 -> b/1030
* [new branch] b/1031 -> b/1031
* [new branch] b/1032 -> b/1032
* [new branch] b/1033 -> b/1033
* [new branch] b/1034 -> b/1034
* [new branch] b/1035 -> b/1035
* [new branch] b/1036 -> b/1036
* [new branch] b/1037 -> b/1037
* [new branch] b/1038 -> b/1038
* [new branch] b/1039 -> b/1039
* [new branch] b/1040 -> b/1040
* [new branch] b/1041 -> b/1041
* [new branch] b/1042 -> b/1042
* [new branch] b/1043 -> b/1043
* [new branch] b/1044 -> b/1044
* [new branch] b/1045 -> b/1045
* [new branch] b/1046 -> b/1046
* [new branch] b/1047 -> b/1047
* [new branch] b/1048 -> b/1048
* [new branch] b/1049 -> b/1049
* [new branch] b/1050 -> b/1050
* [new branch] b/1051 -> b/1051
* [new branch] b/1052 -> b/1052
* [new branch] b/1053 -> b/1053
* [new branch] b/1054 -> b/1054
* [new branch] b/1055 -> b/1055
* [new branch] b/1056 -> b/1056
* [new branch] b/1057 -> b/1057
* [new branch] b/1058 -> b/1058
* [new branch] b/1059 -> b/1059
* [new branch] b/1060 -> b/1060
* [new branch] b/1061 -> b/1061
* [new branch] b/1062 -> b/1062
* [new branch] b/1063 -> b/1063
* [new branch] b/1064 -> b/1064
* [new branch] b/1065 -> b/1065
* [new branch] b/1066 -> b/1066
* [new branch] b/1067 -> b/1067
* [new branch] b/1068 -> b/1068
* [new branch] b/1069 -> b/1069
* [new branch] b/1070 -> b/1070
* [new branch] b/1071 -> b/1071
* [new branch] b/1072 -> b/1072
* [new branch] b/1073 -> b/1073
* [new branch] b/1074 -> b/1074
* [new branch] b/1075 -> b/1075
* [new branch] b/1076 -> b/1076
* [new branch] b/1077 -> b/1077
* [new branch] b/1078 -> b/1078
* [new branch] b/1079 -> b/1079
* [new branch] b/1080 -> b/1080
* [new branch] b/1081 -> b/1081
* [new branch] b/1082 -> b/1082
* [new branch] b/1083 -> b/1083
* [new branch] b/1084 -> b/1084
* [new branch] b/1085 -> b/1085
* [new branch] b/1086 -> b/1086
* [new branch] b/1087 -> b/1087
* [new branch] b/1088 -> b/1088
* [new branch] b/1089 -> b/1089
* [new branch] b/1090 -> b/1090
* [new branch] b/1091 -> b/1091
* [new branch] b/1092 -> b/1092
* [new branch] b/1093 -> b/1093
* [new branch] b/1094 -> b/1094
* [new branch] b/1095 -> b/1095
* [new branch] b/1096 -> b/1096
* [new branch] b/1097 -> b/1097
* [new branch] b/1098 -> b/1098
* [new branch] b/1099 -> b/1099
* [new branch] b/1100 -> b/1100
* [new branch] b/1101 -> b/1101
* [new branch] b/1102 -> b/1102
* [new branch] b/1103 -> b/1103
* [new branch] b/1104 -> b/1104
* [new branch] b/1105 -> b/1105
* [new branch] b/1106 -> b/1106
* [new branch] b/1107 -> b/1107
* [new branch] b/1108 -> b/1108
* [new branch] b/1109 -> b/1109
* [new branch] b/1110 -> b/1110
* [new branch] b/1111 -> b/1111
* [new branch] b/1112 -> b/1112
* [new branch] b/1113 -> b/1113
* [new branch] b/1114 -> b/1114
* [new branch] b/1115 -> b/1115
* [new branch] b/1116 -> b/1116
* [new branch] b/1117 -> b/1117
* [new branch] b/1118 -> b/1118
* [new branch] b/1119 -> b/1119
* [new branch] b/1120 -> b/1120
* [new branch] b/1121 -> b/1121
* [new branch] b/1122 -> b/1122
* [new branch] b/1123 -> b/1123
* [new branch] b/1124 -> b/1124
* [new branch] b/1125 -> b/1125
* [new branch] b/1126 -> b/1126
* [new branch] b/1127 -> b/1127
* [new branch] b/1128 -> b/1128
* [new branch] b/1129 -> b/1129
* [new branch] b/1130 -> b/1130
* [new branch] b/1131 -> b/1131
* [new branch] b/1132 -> b/1132
* [new branch] b/1133 -> b/1133
* [new branch] b/1134 -> b/1134
* [new branch] b/1135 -> b/1135
* [new branch] b/1136 -> b/1136
* [new branch] b/1137 -> b/1137
* [new branch] b/1138 -> b/1138
* [new branch] b/1139 -> b/1139
* [new branch] b/1140 -> b/1140
* [new branch] b/1141 -> b/1141
* [new branch] b/1142 -> b/1142
* [new branch] b/1143 -> b/1143
* [new branch] b/1144 -> b/1144
* [new branch] b/1145 -> b/1145
* [new branch] b/1146 -> b/1146
* [new branch] b/1147 -> b/1147
* [new branch] b/1148 -> b/1148
* [new branch] b/1149 -> b/1149
* [new branch] b/1150 -> b/1150
* [new branch] b/1151 -> b/1151
* [new branch] b/1152 -> b/1152
* [new branch] b/1153 -> b/1153
* [new branch] b/1154 -> b/1154
* [new branch] b/1155 -> b/1155
* [new branch] b/1156 -> b/1156
* [new branch] b/1157 -> b/1157
* [new branch] b/1158 -> b/1158
* [new branch] b/1159 -> b/1159
* [new branch] b/1160 -> b/1160
* [new branch] b/1161 -> b/1161
* [new branch] b/1162 -> b/1162
* [new branch] b/1163 -> b/1163
* [new branch] b/1164 -> b/1164
* [new branch] b/1165 -> b/1165
* [new branch] b/1166 -> b/1166
* [new branch] b/1167 -> b/1167
* [new branch] b/1168 -> b/1168
* [new branch] b/1169 -> b/1169
* [new branch] b/1170 -> b/1170
* [new branch] b/1171 -> b/1171
* [new branch] b/1172 -> b/1172
* [new branch] b/1173 -> b/1173
* [new branch] b/1174 -> b/1174
* [new branch] b/1175 -> b/1175
* [new branch] b/1176 -> b/1176
* [new branch] b/1177 -> b/1177
* [new branch] b/1178 -> b/1178
* [new branch] b/1179 -> b/1179
* [new branch] b/1180 -> b/1180
* [new branch] b/1181 -> b/1181
* [new branch] b/1182 -> b/1182
* [new branch] b/1183 -> b/1183
* [new branch] b/1184 -> b/1184
* [new branch] b/1185 -> b/1185
* [new branch] b/1186 -> b/1186
* [new branch] b/1187 -> b/1187
* [new branch] b/1188 -> b/1188
* [new branch] b/1189 -> b/1189
* [new branch] b/1190 -> b/1190
* [new branch] b/1191 -> b/1191
* [new branch] b/1192 -> b/1192
* [new branch] b/1193 -> b/1193
* [new branch] b/1194 -> b/1194
* [new branch] b/1195 -> b/1195
* [new branch] b/1196 -> b/1196
* [new branch] b/1197 -> b/1197
* [new branch] b/1198 -> b/1198
* [new branch] b/1199 -> b/1199
* [new branch] b/1200 -> b/1200
* [new branch] b/1201 -> b/1201
* [new branch] b/1202 -> b/1202
* [new branch] b/1203 -> b/1203
* [new branch] b/1204 -> b/1204
* [new branch] b/1205 -> b/1205
* [new branch] b/1206 -> b/1206
* [new branch] b/1207 -> b/1207
* [new branch] b/1208 -> b/1208
* [new branch] b/1209 -> b/1209
* [new branch] b/1210 -> b/1210
* [new branch] b/1211 -> b/1211
* [new branch] b/1212 -> b/1212
* [new branch] b/1213 -> b/1213
* [new branch] b/1214 -> b/1214
* [new branch] b/1215 -> b/1215
* [new branch] b/1216 -> b/1216
* [new branch] b/1217 -> b/1217
* [new branch] b/1218 -> b/1218
* [new branch] b/1219 -> b/1219
* [new branch] b/1220 -> b/1220
* [new branch] b/1221 -> b/1221
* [new branch] b/1222 -> b/1222
* [new branch] b/1223 -> b/1223
* [new branch] b/1224 -> b/1224
* [new branch] b/1225 -> b/1225
* [new branch] b/1226 -> b/1226
* [new branch] b/1227 -> b/1227
* [new branch] b/1228 -> b/1228
* [new branch] b/1229 -> b/1229
* [new branch] b/1230 -> b/1230
* [new branch] b/1231 -> b/1231
* [new branch] b/1232 -> b/1232
* [new branch] b/1233 -> b/1233
* [new branch] b/1234 -> b/1234
* [new branch] b/1235 -> b/1235
* [new branch] b/1236 -> b/1236
* [new branch] b/1237 -> b/1237
* [new branch] b/1238 -> b/1238
* [new branch] b/1239 -> b/1239
* [new branch] b/1240 -> b/1240
* [new branch] b/1241 -> b/1241
* [new branch] b/1242 -> b/1242
* [new branch] b/1243 -> b/1243
* [new branch] b/1244 -> b/1244
* [new branch] b/1245 -> b/1245
* [new branch] b/1246 -> b/1246
* [new branch] b/1247 -> b/1247
* [new branch] b/1248 -> b/1248
* [new branch] b/1249 -> b/1249
* [new branch] b/1250 -> b/1250
* [new branch] b/1251 -> b/1251
* [new branch] b/1252 -> b/1252
* [new branch] b/1253 -> b/1253
* [new branch] b/1254 -> b/1254
* [new branch] b/1255 -> b/1255
* [new branch] b/1256 -> b/1256
* [new branch] b/1257 -> b/1257
* [new branch] b/1258 -> b/1258
* [new branch] b/1259 -> b/1259
* [new branch] b/1260 -> b/1260
* [new branch] b/1261 -> b/1261
* [new branch] b/1262 -> b/1262
* [new branch] b/1263 -> b/1263
* [new branch] b/1264 -> b/1264
* [new branch] b/1265 -> b/1265
* [new branch] b/1266 -> b/1266
* [new branch] b/1267 -> b/1267
* [new branch] b/1268 -> b/1268
* [new branch] b/1269 -> b/1269
* [new branch] b/1270 -> b/1270
* [new branch] b/1271 -> b/1271
* [new branch] b/1272 -> b/1272
* [new branch] b/1273 -> b/1273
* [new branch] b/1274 -> b/1274
* [new branch] b/1275 -> b/1275
* [new branch] b/1276 -> b/1276
* [new branch] b/1277 -> b/1277
* [new branch] b/1278 -> b/1278
* [new branch] b/1279 -> b/1279
* [new branch] b/1280 -> b/1280
* [new branch] b/1281 -> b/1281
* [new branch] b/1282 -> b/1282
* [new branch] b/1283 -> b/1283
* [new branch] b/1284 -> b/1284
* [new branch] b/1285 -> b/1285
* [new branch] b/1286 -> b/1286
* [new branch] b/1287 -> b/1287
* [new branch] b/1288 -> b/1288
* [new branch] b/1289 -> b/1289
* [new branch] b/1290 -> b/1290
* [new branch] b/1291 -> b/1291
* [new branch] b/1292 -> b/1292
* [new branch] b/1293 -> b/1293
* [new branch] b/1294 -> b/1294
* [new branch] b/1295 -> b/1295
* [new branch] b/1296 -> b/1296
* [new branch] b/1297 -> b/1297
* [new branch] b/1298 -> b/1298
* [new branch] b/1299 -> b/1299
* [new branch] b/1300 -> b/1300
* [new branch] b/1301 -> b/1301
* [new branch] b/1302 -> b/1302
* [new branch] b/1303 -> b/1303
* [new branch] b/1304 -> b/1304
* [new branch] b/1305 -> b/1305
* [new branch] b/1306 -> b/1306
* [new branch] b/1307 -> b/1307
* [new branch] b/1308 -> b/1308
* [new branch] b/1309 -> b/1309
* [new branch] b/1310 -> b/1310
* [new branch] b/1311 -> b/1311
* [new branch] b/1312 -> b/1312
* [new branch] b/1313 -> b/1313
* [new branch] b/1314 -> b/1314
* [new branch] b/1315 -> b/1315
* [new branch] b/1316 -> b/1316
* [new branch] b/1317 -> b/1317
* [new branch] b/1318 -> b/1318
* [new branch] b/1319 -> b/1319
* [new branch] b/1320 -> b/1320
* [new branch] b/1321 -> b/1321
* [new branch] b/1322 -> b/1322
* [new branch] b/1323 -> b/1323
* [new branch] b/1324 -> b/1324
* [new branch] b/1325 -> b/1325
* [new branch] b/1326 -> b/1326
* [new branch] b/1327 -> b/1327
* [new branch] b/1328 -> b/1328
* [new branch] b/1329 -> b/1329
* [new branch] b/1330 -> b/1330
* [new branch] b/1331 -> b/1331
* [new branch] b/1332 -> b/1332
* [new branch] b/1333 -> b/1333
* [new branch] b/1334 -> b/1334
* [new branch] b/1335 -> b/1335
* [new branch] b/1336 -> b/1336
* [new branch] b/1337 -> b/1337
* [new branch] b/1338 -> b/1338
* [new branch] b/1339 -> b/1339
* [new branch] b/1340 -> b/1340
* [new branch] b/1341 -> b/1341
* [new branch] b/1342 -> b/1342
* [new branch] b/1343 -> b/1343
* [new branch] b/1344 -> b/1344
* [new branch] b/1345 -> b/1345
* [new branch] b/1346 -> b/1346
* [new branch] b/1347 -> b/1347
* [new branch] b/1348 -> b/1348
* [new branch] b/1349 -> b/1349
* [new branch] b/1350 -> b/1350
* [new branch] b/1351 -> b/1351
* [new branch] b/1352 -> b/1352
* [new branch] b/1353 -> b/1353
* [new branch] b/1354 -> b/1354
* [new branch] b/1355 -> b/1355
* [new branch] b/1356 -> b/1356
* [new branch] b/1357 -> b/1357
* [new branch] b/1358 -> b/1358
* [new branch] b/1359 -> b/1359
* [new branch] b/1360 -> b/1360
* [new branch] b/1361 -> b/1361
* [new branch] b/1362 -> b/1362
* [new branch] b/1363 -> b/1363
* [new branch] b/1364 -> b/1364
* [new branch] b/1365 -> b/1365
* [new branch] b/1366 -> b/1366
* [new branch] b/1367 -> b/1367
* [new branch] b/1368 -> b/1368
* [new branch] b/1369 -> b/1369
* [new branch] b/1370 -> b/1370
* [new branch] b/1371 -> b/1371
* [new branch] b/1372 -> b/1372
* [new branch] b/1373 -> b/1373
* [new branch] b/1374 -> b/1374
* [new branch] b/1375 -> b/1375
* [new branch] b/1376 -> b/1376
* [new branch] b/1377 -> b/1377
* [new branch] b/1378 -> b/1378
* [new branch] b/1379 -> b/1379
* [new branch] b/1380 -> b/1380
* [new branch] b/1381 -> b/1381
* [new branch] b/1382 -> b/1382
* [new branch] b/1383 -> b/1383
* [new branch] b/1384 -> b/1384
* [new branch] b/1385 -> b/1385
* [new branch] b/1386 -> b/1386
* [new branch] b/1387 -> b/1387
* [new branch] b/1388 -> b/1388
* [new branch] b/1389 -> b/1389
* [new branch] b/1390 -> b/1390
* [new branch] b/1391 -> b/1391
* [new branch] b/1392 -> b/1392
* [new branch] b/1393 -> b/1393
* [new branch] b/1394 -> b/1394
* [new branch] b/1395 -> b/1395
* [new branch] b/1396 -> b/1396
* [new branch] b/1397 -> b/1397
* [new branch] b/1398 -> b/1398
* [new branch] b/1399 -> b/1399
* [new branch] b/1400 -> b/1400
* [new branch] b/1401 -> b/1401
* [new branch] b/1402 -> b/1402
* [new branch] b/1403 -> b/1403
* [new branch] b/1404 -> b/1404
* [new branch] b/1405 -> b/1405
* [new branch] b/1406 -> b/1406
* [new branch] b/1407 -> b/1407
* [new branch] b/1408 -> b/1408
* [new branch] b/1409 -> b/1409
* [new branch] b/1410 -> b/1410
* [new branch] b/1411 -> b/1411
* [new branch] b/1412 -> b/1412
* [new branch] b/1413 -> b/1413
* [new branch] b/1414 -> b/1414
* [new branch] b/1415 -> b/1415
* [new branch] b/1416 -> b/1416
* [new branch] b/1417 -> b/1417
* [new branch] b/1418 -> b/1418
* [new branch] b/1419 -> b/1419
* [new branch] b/1420 -> b/1420
* [new branch] b/1421 -> b/1421
* [new branch] b/1422 -> b/1422
* [new branch] b/1423 -> b/1423
* [new branch] b/1424 -> b/1424
* [new branch] b/1425 -> b/1425
* [new branch] b/1426 -> b/1426
* [new branch] b/1427 -> b/1427
* [new branch] b/1428 -> b/1428
* [new branch] b/1429 -> b/1429
* [new branch] b/1430 -> b/1430
* [new branch] b/1431 -> b/1431
* [new branch] b/1432 -> b/1432
* [new branch] b/1433 -> b/1433
* [new branch] b/1434 -> b/1434
* [new branch] b/1435 -> b/1435
* [new branch] b/1436 -> b/1436
* [new branch] b/1437 -> b/1437
* [new branch] b/1438 -> b/1438
* [new branch] b/1439 -> b/1439
* [new branch] b/1440 -> b/1440
* [new branch] b/1441 -> b/1441
* [new branch] b/1442 -> b/1442
* [new branch] b/1443 -> b/1443
* [new branch] b/1444 -> b/1444
* [new branch] b/1445 -> b/1445
* [new branch] b/1446 -> b/1446
* [new branch] b/1447 -> b/1447
* [new branch] b/1448 -> b/1448
* [new branch] b/1449 -> b/1449
* [new branch] b/1450 -> b/1450
* [new branch] b/1451 -> b/1451
* [new branch] b/1452 -> b/1452
* [new branch] b/1453 -> b/1453
* [new branch] b/1454 -> b/1454
* [new branch] b/1455 -> b/1455
* [new branch] b/1456 -> b/1456
* [new branch] b/1457 -> b/1457
* [new branch] b/1458 -> b/1458
* [new branch] b/1459 -> b/1459
* [new branch] b/1460 -> b/1460
* [new branch] b/1461 -> b/1461
* [new branch] b/1462 -> b/1462
* [new branch] b/1463 -> b/1463
* [new branch] b/1464 -> b/1464
* [new branch] b/1465 -> b/1465
* [new branch] b/1466 -> b/1466
* [new branch] b/1467 -> b/1467
* [new branch] b/1468 -> b/1468
* [new branch] b/1469 -> b/1469
* [new branch] b/1470 -> b/1470
* [new branch] b/1471 -> b/1471
* [new branch] b/1472 -> b/1472
* [new branch] b/1473 -> b/1473
* [new branch] b/1474 -> b/1474
* [new branch] b/1475 -> b/1475
* [new branch] b/1476 -> b/1476
* [new branch] b/1477 -> b/1477
* [new branch] b/1478 -> b/1478
* [new branch] b/1479 -> b/1479
* [new branch] b/1480 -> b/1480
* [new branch] b/1481 -> b/1481
* [new branch] b/1482 -> b/1482
* [new branch] b/1483 -> b/1483
* [new branch] b/1484 -> b/1484
* [new branch] b/1485 -> b/1485
* [new branch] b/1486 -> b/1486
* [new branch] b/1487 -> b/1487
* [new branch] b/1488 -> b/1488
* [new branch] b/1489 -> b/1489
* [new branch] b/1490 -> b/1490
* [new branch] b/1491 -> b/1491
* [new branch] b/1492 -> b/1492
* [new branch] b/1493 -> b/1493
* [new branch] b/1494 -> b/1494
* [new branch] b/1495 -> b/1495
* [new branch] b/1496 -> b/1496
* [new branch] b/1497 -> b/1497
* [new branch] b/1498 -> b/1498
* [new branch] b/1499 -> b/1499
* [new branch] b/1500 -> b/1500
* [new branch] b/1501 -> b/1501
* [new branch] b/1502 -> b/1502
* [new branch] b/1503 -> b/1503
* [new branch] b/1504 -> b/1504
* [new branch] b/1505 -> b/1505
* [new branch] b/1506 -> b/1506
* [new branch] b/1507 -> b/1507
* [new branch] b/1508 -> b/1508
* [new branch] b/1509 -> b/1509
* [new branch] b/1510 -> b/1510
* [new branch] b/1511 -> b/1511
* [new branch] b/1512 -> b/1512
* [new branch] b/1513 -> b/1513
* [new branch] b/1514 -> b/1514
* [new branch] b/1515 -> b/1515
* [new branch] b/1516 -> b/1516
* [new branch] b/1517 -> b/1517
* [new branch] b/1518 -> b/1518
* [new branch] b/1519 -> b/1519
* [new branch] b/1520 -> b/1520
* [new branch] b/1521 -> b/1521
* [new branch] b/1522 -> b/1522
* [new branch] b/1523 -> b/1523
* [new branch] b/1524 -> b/1524
* [new branch] b/1525 -> b/1525
* [new branch] b/1526 -> b/1526
* [new branch] b/1527 -> b/1527
* [new branch] b/1528 -> b/1528
* [new branch] b/1529 -> b/1529
* [new branch] b/1530 -> b/1530
* [new branch] b/1531 -> b/1531
* [new branch] b/1532 -> b/1532
* [new branch] b/1533 -> b/1533
* [new branch] b/1534 -> b/1534
* [new branch] b/1535 -> b/1535
* [new branch] b/1536 -> b/1536
* [new branch] b/1537 -> b/1537
* [new branch] b/1538 -> b/1538
* [new branch] b/1539 -> b/1539
* [new branch] b/1540 -> b/1540
* [new branch] b/1541 -> b/1541
* [new branch] b/1542 -> b/1542
* [new branch] b/1543 -> b/1543
* [new branch] b/1544 -> b/1544
* [new branch] b/1545 -> b/1545
* [new branch] b/1546 -> b/1546
* [new branch] b/1547 -> b/1547
* [new branch] b/1548 -> b/1548
* [new branch] b/1549 -> b/1549
* [new branch] b/1550 -> b/1550
* [new branch] b/1551 -> b/1551
* [new branch] b/1552 -> b/1552
* [new branch] b/1553 -> b/1553
* [new branch] b/1554 -> b/1554
* [new branch] b/1555 -> b/1555
* [new branch] b/1556 -> b/1556
* [new branch] b/1557 -> b/1557
* [new branch] b/1558 -> b/1558
* [new branch] b/1559 -> b/1559
* [new branch] b/1560 -> b/1560
* [new branch] b/1561 -> b/1561
* [new branch] b/1562 -> b/1562
* [new branch] b/1563 -> b/1563
* [new branch] b/1564 -> b/1564
* [new branch] b/1565 -> b/1565
* [new branch] b/1566 -> b/1566
* [new branch] b/1567 -> b/1567
* [new branch] b/1568 -> b/1568
* [new branch] b/1569 -> b/1569
* [new branch] b/1570 -> b/1570
* [new branch] b/1571 -> b/1571
* [new branch] b/1572 -> b/1572
* [new branch] b/1573 -> b/1573
* [new branch] b/1574 -> b/1574
* [new branch] b/1575 -> b/1575
* [new branch] b/1576 -> b/1576
* [new branch] b/1577 -> b/1577
* [new branch] b/1578 -> b/1578
* [new branch] b/1579 -> b/1579
* [new branch] b/1580 -> b/1580
* [new branch] b/1581 -> b/1581
* [new branch] b/1582 -> b/1582
* [new branch] b/1583 -> b/1583
* [new branch] b/1584 -> b/1584
* [new branch] b/1585 -> b/1585
* [new branch] b/1586 -> b/1586
* [new branch] b/1587 -> b/1587
* [new branch] b/1588 -> b/1588
* [new branch] b/1589 -> b/1589
* [new branch] b/1590 -> b/1590
* [new branch] b/1591 -> b/1591
* [new branch] b/1592 -> b/1592
* [new branch] b/1593 -> b/1593
* [new branch] b/1594 -> b/1594
* [new branch] b/1595 -> b/1595
* [new branch] b/1596 -> b/1596
* [new branch] b/1597 -> b/1597
* [new branch] b/1598 -> b/1598
* [new branch] b/1599 -> b/1599
* [new branch] b/1600 -> b/1600
* [new branch] b/1601 -> b/1601
* [new branch] b/1602 -> b/1602
* [new branch] b/1603 -> b/1603
* [new branch] b/1604 -> b/1604
* [new branch] b/1605 -> b/1605
* [new branch] b/1606 -> b/1606
* [new branch] b/1607 -> b/1607
* [new branch] b/1608 -> b/1608
* [new branch] b/1609 -> b/1609
* [new branch] b/1610 -> b/1610
* [new branch] b/1611 -> b/1611
* [new branch] b/1612 -> b/1612
* [new branch] b/1613 -> b/1613
* [new branch] b/1614 -> b/1614
* [new branch] b/1615 -> b/1615
* [new branch] b/1616 -> b/1616
* [new branch] b/1617 -> b/1617
* [new branch] b/1618 -> b/1618
* [new branch] b/1619 -> b/1619
* [new branch] b/1620 -> b/1620
* [new branch] b/1621 -> b/1621
* [new branch] b/1622 -> b/1622
* [new branch] b/1623 -> b/1623
* [new branch] b/1624 -> b/1624
* [new branch] b/1625 -> b/1625
* [new branch] b/1626 -> b/1626
* [new branch] b/1627 -> b/1627
* [new branch] b/1628 -> b/1628
* [new branch] b/1629 -> b/1629
* [new branch] b/1630 -> b/1630
* [new branch] b/1631 -> b/1631
* [new branch] b/1632 -> b/1632
* [new branch] b/1633 -> b/1633
* [new branch] b/1634 -> b/1634
* [new branch] b/1635 -> b/1635
* [new branch] b/1636 -> b/1636
* [new branch] b/1637 -> b/1637
* [new branch] b/1638 -> b/1638
* [new branch] b/1639 -> b/1639
* [new branch] b/1640 -> b/1640
* [new branch] b/1641 -> b/1641
* [new branch] b/1642 -> b/1642
* [new branch] b/1643 -> b/1643
* [new branch] b/1644 -> b/1644
* [new branch] b/1645 -> b/1645
* [new branch] b/1646 -> b/1646
* [new branch] b/1647 -> b/1647
* [new branch] b/1648 -> b/1648
* [new branch] b/1649 -> b/1649
* [new branch] b/1650 -> b/1650
* [new branch] b/1651 -> b/1651
* [new branch] b/1652 -> b/1652
* [new branch] b/1653 -> b/1653
* [new branch] b/1654 -> b/1654
* [new branch] b/1655 -> b/1655
* [new branch] b/1656 -> b/1656
* [new branch] b/1657 -> b/1657
* [new branch] b/1658 -> b/1658
* [new branch] b/1659 -> b/1659
* [new branch] b/1660 -> b/1660
* [new branch] b/1661 -> b/1661
* [new branch] b/1662 -> b/1662
* [new branch] b/1663 -> b/1663
* [new branch] b/1664 -> b/1664
* [new branch] b/1665 -> b/1665
* [new branch] b/1666 -> b/1666
* [new branch] b/1667 -> b/1667
* [new branch] b/1668 -> b/1668
* [new branch] b/1669 -> b/1669
* [new branch] b/1670 -> b/1670
* [new branch] b/1671 -> b/1671
* [new branch] b/1672 -> b/1672
* [new branch] b/1673 -> b/1673
* [new branch] b/1674 -> b/1674
* [new branch] b/1675 -> b/1675
* [new branch] b/1676 -> b/1676
* [new branch] b/1677 -> b/1677
* [new branch] b/1678 -> b/1678
* [new branch] b/1679 -> b/1679
* [new branch] b/1680 -> b/1680
* [new branch] b/1681 -> b/1681
* [new branch] b/1682 -> b/1682
* [new branch] b/1683 -> b/1683
* [new branch] b/1684 -> b/1684
* [new branch] b/1685 -> b/1685
* [new branch] b/1686 -> b/1686
* [new branch] b/1687 -> b/1687
* [new branch] b/1688 -> b/1688
* [new branch] b/1689 -> b/1689
* [new branch] b/1690 -> b/1690
* [new branch] b/1691 -> b/1691
* [new branch] b/1692 -> b/1692
* [new branch] b/1693 -> b/1693
* [new branch] b/1694 -> b/1694
* [new branch] b/1695 -> b/1695
* [new branch] b/1696 -> b/1696
* [new branch] b/1697 -> b/1697
* [new branch] b/1698 -> b/1698
* [new branch] b/1699 -> b/1699
* [new branch] b/1700 -> b/1700
* [new branch] b/1701 -> b/1701
* [new branch] b/1702 -> b/1702
* [new branch] b/1703 -> b/1703
* [new branch] b/1704 -> b/1704
* [new branch] b/1705 -> b/1705
* [new branch] b/1706 -> b/1706
* [new branch] b/1707 -> b/1707
* [new branch] b/1708 -> b/1708
* [new branch] b/1709 -> b/1709
* [new branch] b/1710 -> b/1710
* [new branch] b/1711 -> b/1711
* [new branch] b/1712 -> b/1712
* [new branch] b/1713 -> b/1713
* [new branch] b/1714 -> b/1714
* [new branch] b/1715 -> b/1715
* [new branch] b/1716 -> b/1716
* [new branch] b/1717 -> b/1717
* [new branch] b/1718 -> b/1718
* [new branch] b/1719 -> b/1719
* [new branch] b/1720 -> b/1720
* [new branch] b/1721 -> b/1721
* [new branch] b/1722 -> b/1722
* [new branch] b/1723 -> b/1723
* [new branch] b/1724 -> b/1724
* [new branch] b/1725 -> b/1725
* [new branch] b/1726 -> b/1726
* [new branch] b/1727 -> b/1727
* [new branch] b/1728 -> b/1728
* [new branch] b/1729 -> b/1729
* [new branch] b/1730 -> b/1730
* [new branch] b/1731 -> b/1731
* [new branch] b/1732 -> b/1732
* [new branch] b/1733 -> b/1733
* [new branch] b/1734 -> b/1734
* [new branch] b/1735 -> b/1735
* [new branch] b/1736 -> b/1736
* [new branch] b/1737 -> b/1737
* [new branch] b/1738 -> b/1738
* [new branch] b/1739 -> b/1739
* [new branch] b/1740 -> b/1740
* [new branch] b/1741 -> b/1741
* [new branch] b/1742 -> b/1742
* [new branch] b/1743 -> b/1743
* [new branch] b/1744 -> b/1744
* [new branch] b/1745 -> b/1745
* [new branch] b/1746 -> b/1746
* [new branch] b/1747 -> b/1747
* [new branch] b/1748 -> b/1748
* [new branch] b/1749 -> b/1749
* [new branch] b/1750 -> b/1750
* [new branch] b/1751 -> b/1751
* [new branch] b/1752 -> b/1752
* [new branch] b/1753 -> b/1753
* [new branch] b/1754 -> b/1754
* [new branch] b/1755 -> b/1755
* [new branch] b/1756 -> b/1756
* [new branch] b/1757 -> b/1757
* [new branch] b/1758 -> b/1758
* [new branch] b/1759 -> b/1759
* [new branch] b/1760 -> b/1760
* [new branch] b/1761 -> b/1761
* [new branch] b/1762 -> b/1762
* [new branch] b/1763 -> b/1763
* [new branch] b/1764 -> b/1764
* [new branch] b/1765 -> b/1765
* [new branch] b/1766 -> b/1766
* [new branch] b/1767 -> b/1767
* [new branch] b/1768 -> b/1768
* [new branch] b/1769 -> b/1769
* [new branch] b/1770 -> b/1770
* [new branch] b/1771 -> b/1771
* [new branch] b/1772 -> b/1772
* [new branch] b/1773 -> b/1773
* [new branch] b/1774 -> b/1774
* [new branch] b/1775 -> b/1775
* [new branch] b/1776 -> b/1776
* [new branch] b/1777 -> b/1777
* [new branch] b/1778 -> b/1778
* [new branch] b/1779 -> b/1779
* [new branch] b/1780 -> b/1780
* [new branch] b/1781 -> b/1781
* [new branch] b/1782 -> b/1782
* [new branch] b/1783 -> b/1783
* [new branch] b/1784 -> b/1784
* [new branch] b/1785 -> b/1785
* [new branch] b/1786 -> b/1786
* [new branch] b/1787 -> b/1787
* [new branch] b/1788 -> b/1788
* [new branch] b/1789 -> b/1789
* [new branch] b/1790 -> b/1790
* [new branch] b/1791 -> b/1791
* [new branch] b/1792 -> b/1792
* [new branch] b/1793 -> b/1793
* [new branch] b/1794 -> b/1794
* [new branch] b/1795 -> b/1795
* [new branch] b/1796 -> b/1796
* [new branch] b/1797 -> b/1797
* [new branch] b/1798 -> b/1798
* [new branch] b/1799 -> b/1799
* [new branch] b/1800 -> b/1800
* [new branch] b/1801 -> b/1801
* [new branch] b/1802 -> b/1802
* [new branch] b/1803 -> b/1803
* [new branch] b/1804 -> b/1804
* [new branch] b/1805 -> b/1805
* [new branch] b/1806 -> b/1806
* [new branch] b/1807 -> b/1807
* [new branch] b/1808 -> b/1808
* [new branch] b/1809 -> b/1809
* [new branch] b/1810 -> b/1810
* [new branch] b/1811 -> b/1811
* [new branch] b/1812 -> b/1812
* [new branch] b/1813 -> b/1813
* [new branch] b/1814 -> b/1814
* [new branch] b/1815 -> b/1815
* [new branch] b/1816 -> b/1816
* [new branch] b/1817 -> b/1817
* [new branch] b/1818 -> b/1818
* [new branch] b/1819 -> b/1819
* [new branch] b/1820 -> b/1820
* [new branch] b/1821 -> b/1821
* [new branch] b/1822 -> b/1822
* [new branch] b/1823 -> b/1823
* [new branch] b/1824 -> b/1824
* [new branch] b/1825 -> b/1825
* [new branch] b/1826 -> b/1826
* [new branch] b/1827 -> b/1827
* [new branch] b/1828 -> b/1828
* [new branch] b/1829 -> b/1829
* [new branch] b/1830 -> b/1830
* [new branch] b/1831 -> b/1831
* [new branch] b/1832 -> b/1832
* [new branch] b/1833 -> b/1833
* [new branch] b/1834 -> b/1834
* [new branch] b/1835 -> b/1835
* [new branch] b/1836 -> b/1836
* [new branch] b/1837 -> b/1837
* [new branch] b/1838 -> b/1838
* [new branch] b/1839 -> b/1839
* [new branch] b/1840 -> b/1840
* [new branch] b/1841 -> b/1841
* [new branch] b/1842 -> b/1842
* [new branch] b/1843 -> b/1843
* [new branch] b/1844 -> b/1844
* [new branch] b/1845 -> b/1845
* [new branch] b/1846 -> b/1846
* [new branch] b/1847 -> b/1847
* [new branch] b/1848 -> b/1848
* [new branch] b/1849 -> b/1849
* [new branch] b/1850 -> b/1850
* [new branch] b/1851 -> b/1851
* [new branch] b/1852 -> b/1852
* [new branch] b/1853 -> b/1853
* [new branch] b/1854 -> b/1854
* [new branch] b/1855 -> b/1855
* [new branch] b/1856 -> b/1856
* [new branch] b/1857 -> b/1857
* [new branch] b/1858 -> b/1858
* [new branch] b/1859 -> b/1859
* [new branch] b/1860 -> b/1860
* [new branch] b/1861 -> b/1861
* [new branch] b/1862 -> b/1862
* [new branch] b/1863 -> b/1863
* [new branch] b/1864 -> b/1864
* [new branch] b/1865 -> b/1865
* [new branch] b/1866 -> b/1866
* [new branch] b/1867 -> b/1867
* [new branch] b/1868 -> b/1868
* [new branch] b/1869 -> b/1869
* [new branch] b/1870 -> b/1870
* [new branch] b/1871 -> b/1871
* [new branch] b/1872 -> b/1872
* [new branch] b/1873 -> b/1873
* [new branch] b/1874 -> b/1874
* [new branch] b/1875 -> b/1875
* [new branch] b/1876 -> b/1876
* [new branch] b/1877 -> b/1877
* [new branch] b/1878 -> b/1878
* [new branch] b/1879 -> b/1879
* [new branch] b/1880 -> b/1880
* [new branch] b/1881 -> b/1881
* [new branch] b/1882 -> b/1882
* [new branch] b/1883 -> b/1883
* [new branch] b/1884 -> b/1884
* [new branch] b/1885 -> b/1885
* [new branch] b/1886 -> b/1886
* [new branch] b/1887 -> b/1887
* [new branch] b/1888 -> b/1888
* [new branch] b/1889 -> b/1889
* [new branch] b/1890 -> b/1890
* [new branch] b/1891 -> b/1891
* [new branch] b/1892 -> b/1892
* [new branch] b/1893 -> b/1893
* [new branch] b/1894 -> b/1894
* [new branch] b/1895 -> b/1895
* [new branch] b/1896 -> b/1896
* [new branch] b/1897 -> b/1897
* [new branch] b/1898 -> b/1898
* [new branch] b/1899 -> b/1899
* [new branch] b/1900 -> b/1900
* [new branch] b/1901 -> b/1901
* [new branch] b/1902 -> b/1902
* [new branch] b/1903 -> b/1903
* [new branch] b/1904 -> b/1904
* [new branch] b/1905 -> b/1905
* [new branch] b/1906 -> b/1906
* [new branch] b/1907 -> b/1907
* [new branch] b/1908 -> b/1908
* [new branch] b/1909 -> b/1909
* [new branch] b/1910 -> b/1910
* [new branch] b/1911 -> b/1911
* [new branch] b/1912 -> b/1912
* [new branch] b/1913 -> b/1913
* [new branch] b/1914 -> b/1914
* [new branch] b/1915 -> b/1915
* [new branch] b/1916 -> b/1916
* [new branch] b/1917 -> b/1917
* [new branch] b/1918 -> b/1918
* [new branch] b/1919 -> b/1919
* [new branch] b/1920 -> b/1920
* [new branch] b/1921 -> b/1921
* [new branch] b/1922 -> b/1922
* [new branch] b/1923 -> b/1923
* [new branch] b/1924 -> b/1924
* [new branch] b/1925 -> b/1925
* [new branch] b/1926 -> b/1926
* [new branch] b/1927 -> b/1927
* [new branch] b/1928 -> b/1928
* [new branch] b/1929 -> b/1929
* [new branch] b/1930 -> b/1930
* [new branch] b/1931 -> b/1931
* [new branch] b/1932 -> b/1932
* [new branch] b/1933 -> b/1933
* [new branch] b/1934 -> b/1934
* [new branch] b/1935 -> b/1935
* [new branch] b/1936 -> b/1936
* [new branch] b/1937 -> b/1937
* [new branch] b/1938 -> b/1938
* [new branch] b/1939 -> b/1939
* [new branch] b/1940 -> b/1940
* [new branch] b/1941 -> b/1941
* [new branch] b/1942 -> b/1942
* [new branch] b/1943 -> b/1943
* [new branch] b/1944 -> b/1944
* [new branch] b/1945 -> b/1945
* [new branch] b/1946 -> b/1946
* [new branch] b/1947 -> b/1947
* [new branch] b/1948 -> b/1948
* [new branch] b/1949 -> b/1949
* [new branch] b/1950 -> b/1950
* [new branch] b/1951 -> b/1951
* [new branch] b/1952 -> b/1952
* [new branch] b/1953 -> b/1953
* [new branch] b/1954 -> b/1954
* [new branch] b/1955 -> b/1955
* [new branch] b/1956 -> b/1956
* [new branch] b/1957 -> b/1957
* [new branch] b/1958 -> b/1958
* [new branch] b/1959 -> b/1959
* [new branch] b/1960 -> b/1960
* [new branch] b/1961 -> b/1961
* [new branch] b/1962 -> b/1962
* [new branch] b/1963 -> b/1963
* [new branch] b/1964 -> b/1964
* [new branch] b/1965 -> b/1965
* [new branch] b/1966 -> b/1966
* [new branch] b/1967 -> b/1967
* [new branch] b/1968 -> b/1968
* [new branch] b/1969 -> b/1969
* [new branch] b/1970 -> b/1970
* [new branch] b/1971 -> b/1971
* [new branch] b/1972 -> b/1972
* [new branch] b/1973 -> b/1973
* [new branch] b/1974 -> b/1974
* [new branch] b/1975 -> b/1975
* [new branch] b/1976 -> b/1976
* [new branch] b/1977 -> b/1977
* [new branch] b/1978 -> b/1978
* [new branch] b/1979 -> b/1979
* [new branch] b/1980 -> b/1980
* [new branch] b/1981 -> b/1981
* [new branch] b/1982 -> b/1982
* [new branch] b/1983 -> b/1983
* [new branch] b/1984 -> b/1984
* [new branch] b/1985 -> b/1985
* [new branch] b/1986 -> b/1986
* [new branch] b/1987 -> b/1987
* [new branch] b/1988 -> b/1988
* [new branch] b/1989 -> b/1989
* [new branch] b/1990 -> b/1990
* [new branch] b/1991 -> b/1991
* [new branch] b/1992 -> b/1992
* [new branch] b/1993 -> b/1993
* [new branch] b/1994 -> b/1994
* [new branch] b/1995 -> b/1995
* [new branch] b/1996 -> b/1996
* [new branch] b/1997 -> b/1997
* [new branch] b/1998 -> b/1998
* [new branch] b/1999 -> b/1999
* [new branch] b/2000 -> b/2000
ok 11 - sigpipe does not cause pre-push hook failure
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5580-clone-push-unc.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5580-clone-push-unc/.git/
1..0 # SKIP skipping Windows-only path tests
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5581-http-curl-verbose.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5581-http-curl-verbose/.git/
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
1..0 # SKIP no web server found at '/usr/sbin/apache2'
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5600-clone-fail-cleanup.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5600-clone-fail-cleanup/.git/
expecting success:
test_must_fail git clone foo bar
fatal: repository 'foo' does not exist
ok 1 - clone of non-existent source should fail
expecting success:
test_path_is_missing bar
ok 2 - failed clone should not leave a directory
expecting success:
test_create_repo foo
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5600-clone-fail-cleanup/foo/.git/
ok 3 - create a repo to clone
expecting success:
test_commit -C foo file
[master (root-commit) 4c1911f] file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.t
ok 4 - create objects in repo for later corruption
expecting success:
test_must_fail git clone ../foo baz
fatal: repository '../foo' does not exist
ok 5 - clone of non-existent (relative to $PWD) source should fail
expecting success:
git clone foo bar
Cloning into 'bar'...
done.
ok 6 - clone should work now that source exists
expecting success:
test_path_is_dir bar
ok 7 - successful clone must leave the directory
expecting success:
corrupt_repo &&
test_must_fail git clone --separate-git-dir gitdir foo worktree &&
test_path_is_missing gitdir &&
test_path_is_missing worktree
Cloning into 'worktree'...
error: refs/heads/master does not point to a valid object!
error: refs/tags/file does not point to a valid object!
done.
fatal: update_ref failed for ref 'HEAD': cannot update ref 'HEAD': trying to write ref 'HEAD' with nonexistent object 4c1911ffa61819af2268cf7c64ef8f9aa3c96d97
fatal: the remote end hung up unexpectedly
ok 8 - failed clone --separate-git-dir should not leave any directories
expecting success:
mkdir -p empty &&
corrupt_repo &&
test_must_fail git clone foo empty &&
test_dir_is_empty empty
Cloning into 'empty'...
error: refs/heads/master does not point to a valid object!
error: refs/tags/file does not point to a valid object!
done.
fatal: update_ref failed for ref 'HEAD': cannot update ref 'HEAD': trying to write ref 'HEAD' with nonexistent object 4c1911ffa61819af2268cf7c64ef8f9aa3c96d97
fatal: the remote end hung up unexpectedly
ok 9 - failed clone into empty leaves directory (vanilla)
expecting success:
mkdir -p empty &&
corrupt_repo &&
test_must_fail git clone --bare foo empty &&
test_dir_is_empty empty
Cloning into bare repository 'empty'...
error: refs/heads/master does not point to a valid object!
error: refs/tags/file does not point to a valid object!
done.
fatal: update_ref failed for ref 'HEAD': cannot update ref 'HEAD': trying to write ref 'HEAD' with nonexistent object 4c1911ffa61819af2268cf7c64ef8f9aa3c96d97
fatal: the remote end hung up unexpectedly
ok 10 - failed clone into empty leaves directory (bare)
expecting success:
mkdir -p empty-git empty-wt &&
corrupt_repo &&
test_must_fail git clone --separate-git-dir empty-git foo empty-wt &&
test_dir_is_empty empty-git &&
test_dir_is_empty empty-wt
Cloning into 'empty-wt'...
fatal: empty-git already exists
ok 11 - failed clone into empty leaves directory (separate)
expecting success:
mkdir -p empty-git &&
corrupt_repo &&
test_must_fail git clone --separate-git-dir empty-git foo no-wt &&
test_dir_is_empty empty-git &&
test_path_is_missing no-wt
Cloning into 'no-wt'...
fatal: empty-git already exists
ok 12 - failed clone into empty leaves directory (separate, git)
expecting success:
mkdir -p empty-wt &&
corrupt_repo &&
test_must_fail git clone --separate-git-dir no-git foo empty-wt &&
test_path_is_missing no-git &&
test_dir_is_empty empty-wt
Cloning into 'empty-wt'...
error: refs/heads/master does not point to a valid object!
error: refs/tags/file does not point to a valid object!
done.
fatal: update_ref failed for ref 'HEAD': cannot update ref 'HEAD': trying to write ref 'HEAD' with nonexistent object 4c1911ffa61819af2268cf7c64ef8f9aa3c96d97
fatal: the remote end hung up unexpectedly
ok 13 - failed clone into empty leaves directory (separate, wt)
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5573-pull-verify-signatures.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5573-pull-verify-signatures/.git/
skipping test: create repositories with signed commits
echo 1 >a && git add a &&
test_tick && git commit -m initial &&
git tag initial &&
git clone . signed &&
(
cd signed &&
echo 2 >b && git add b &&
test_tick && git commit -S -m "signed"
) &&
git clone . unsigned &&
(
cd unsigned &&
echo 3 >c && git add c &&
test_tick && git commit -m "unsigned"
) &&
git clone . bad &&
(
cd bad &&
echo 4 >d && git add d &&
test_tick && git commit -S -m "bad" &&
git cat-file commit HEAD >raw &&
sed -e "s/^bad/forged bad/" raw >forged &&
git hash-object -w -t commit forged >forged.commit &&
git checkout $(cat forged.commit)
) &&
git clone . untrusted &&
(
cd untrusted &&
echo 5 >e && git add e &&
test_tick && git commit -SB7227189 -m "untrusted"
)
ok 1 # skip create repositories with signed commits (missing GPG)
skipping test: pull unsigned commit with --verify-signatures
test_when_finished "git reset --hard && git checkout initial" &&
test_must_fail git pull --ff-only --verify-signatures unsigned 2>pullerror &&
test_i18ngrep "does not have a GPG signature" pullerror
ok 2 # skip pull unsigned commit with --verify-signatures (missing GPG)
skipping test: pull commit with bad signature with --verify-signatures
test_when_finished "git reset --hard && git checkout initial" &&
test_must_fail git pull --ff-only --verify-signatures bad 2>pullerror &&
test_i18ngrep "has a bad GPG signature" pullerror
ok 3 # skip pull commit with bad signature with --verify-signatures (missing GPG)
skipping test: pull commit with untrusted signature with --verify-signatures
test_when_finished "git reset --hard && git checkout initial" &&
test_must_fail git pull --ff-only --verify-signatures untrusted 2>pullerror &&
test_i18ngrep "has an untrusted GPG signature" pullerror
ok 4 # skip pull commit with untrusted signature with --verify-signatures (missing GPG)
skipping test: pull signed commit with --verify-signatures
test_when_finished "git reset --hard && git checkout initial" &&
git pull --verify-signatures signed >pulloutput &&
test_i18ngrep "has a good GPG signature" pulloutput
ok 5 # skip pull signed commit with --verify-signatures (missing GPG)
skipping test: pull commit with bad signature without verification
test_when_finished "git reset --hard && git checkout initial" &&
git pull --ff-only bad 2>pullerror
ok 6 # skip pull commit with bad signature without verification (missing GPG)
skipping test: pull commit with bad signature with --no-verify-signatures
test_when_finished "git reset --hard && git checkout initial" &&
test_config merge.verifySignatures true &&
test_config pull.verifySignatures true &&
git pull --ff-only --no-verify-signatures bad 2>pullerror
ok 7 # skip pull commit with bad signature with --no-verify-signatures (missing GPG)
skipping test: pull unsigned commit into unborn branch
git init empty-repo &&
test_must_fail \
git -C empty-repo pull --verify-signatures .. 2>pullerror &&
test_i18ngrep "does not have a GPG signature" pullerror
ok 8 # skip pull unsigned commit into unborn branch (missing GPG)
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5602-clone-remote-exec.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5602-clone-remote-exec/.git/
expecting success:
echo "#!/bin/sh" > not_ssh &&
echo "echo \"\$*\" > not_ssh_output" >> not_ssh &&
echo "exit 1" >> not_ssh &&
chmod +x not_ssh
ok 1 - setup
expecting success:
test_must_fail env GIT_SSH=./not_ssh git clone localhost:/path/to/repo junk &&
echo "localhost git-upload-pack '/path/to/repo'" >expected &&
test_cmp expected not_ssh_output
Cloning into 'junk'...
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 2 - clone calls git upload-pack unqualified with no -u option
expecting success:
test_must_fail env GIT_SSH=./not_ssh \
git clone -u ./something/bin/git-upload-pack localhost:/path/to/repo junk &&
echo "localhost ./something/bin/git-upload-pack '/path/to/repo'" >expected &&
test_cmp expected not_ssh_output
Cloning into 'junk'...
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 3 - clone calls specified git upload-pack with -u option
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5552-skipping-fetch-negotiator.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/.git/
expecting success:
git init server &&
test_commit -C server to_fetch &&
git init client &&
for i in $(test_seq 7)
do
test_commit -C client c$i
done &&
# We send: "c7" (skip 1) "c5" (skip 2) "c2" (skip 4). After that, since
# "c1" has no parent, it is still sent as "have" even though it would
# normally be skipped.
test_config -C client fetch.negotiationalgorithm skipping &&
trace_fetch client "$(pwd)/server" &&
have_sent c7 c5 c2 c1 &&
have_not_sent c6 c4 c3
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/server/.git/
[master (root-commit) 92dc17d] to_fetch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 to_fetch.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/client/.git/
[master (root-commit) 9e22a6c] c1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c1.t
[master 0d7e994] c2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c2.t
[master 85a1cf7] c3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c3.t
[master 0849982] c4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c4.t
[master 0abab02] c5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c5.t
[master 796a96a] c6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c6.t
[master 9b13844] c7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c7.t
warning: no common commits
From /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/server
* branch HEAD -> FETCH_HEAD
packet: fetch> have 9b13844ba1d52a28bb9487107b41cce9916b74c9
packet: fetch> have 0abab022ac7e07f16265106cf36faf7cb5d87ab3
packet: fetch> have 0d7e994c092abbb0a21e7d243114efa5ba452b8c
packet: fetch> have 9e22a6c1b441ee1bcd54b8da801261ba8b15eac9
ok 1 - commits with no parents are sent regardless of skip distance
expecting success:
rm -rf server client trace &&
git init server &&
test_commit -C server to_fetch &&
git init client &&
test_commit -C client on_client &&
git -C client checkout on_client &&
test_config -C client fetch.negotiationAlgorithm invalid &&
test_must_fail git -C client fetch "$(pwd)/server" 2>err &&
test_i18ngrep "unknown fetch negotiation algorithm" err &&
# Explicit "default" value
test_config -C client fetch.negotiationAlgorithm default &&
git -C client -c fetch.negotiationAlgorithm=default fetch "$(pwd)/server" &&
# Implementation detail: If there is nothing to fetch, we will not error out
test_config -C client fetch.negotiationAlgorithm invalid &&
git -C client fetch "$(pwd)/server" 2>err &&
test_i18ngrep ! "unknown fetch negotiation algorithm" err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/server/.git/
[master (root-commit) 64a1f76] to_fetch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 to_fetch.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/client/.git/
[master (root-commit) 6d60c89] on_client
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 on_client.t
Note: switching to 'on_client'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 6d60c89 on_client
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: unknown fetch negotiation algorithm 'invalid'
warning: no common commits
From /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/server
* branch HEAD -> FETCH_HEAD
ok 2 - unknown fetch.negotiationAlgorithm values error out
expecting success:
rm -rf server client trace &&
git init server &&
test_commit -C server to_fetch &&
git init client &&
for i in $(test_seq 11)
do
test_commit -C client c$i
done &&
git -C client checkout c5 &&
test_commit -C client c5side &&
# Before reaching c5, we send "c5side" (skip 1) and "c11" (skip 1) "c9"
# (skip 2) "c6" (skip 4). The larger skip (skip 4) takes precedence, so
# the next "have" sent will be "c1" (from "c6" skip 4) and not "c4"
# (from "c5side" skip 1).
test_config -C client fetch.negotiationalgorithm skipping &&
trace_fetch client "$(pwd)/server" &&
have_sent c5side c11 c9 c6 c1 &&
have_not_sent c10 c8 c7 c5 c4 c3 c2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/server/.git/
[master (root-commit) 3bc19e6] to_fetch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 to_fetch.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/client/.git/
[master (root-commit) 73c9691] c1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c1.t
[master 3e97f74] c2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c2.t
[master 40cabae] c3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c3.t
[master 7106bbb] c4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c4.t
[master 2a51269] c5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c5.t
[master 591084c] c6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c6.t
[master 86cf406] c7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c7.t
[master cd20934] c8
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c8.t
[master 6d58a2d] c9
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c9.t
[master 9fa7b54] c10
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c10.t
[master 71dd193] c11
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c11.t
Note: switching to 'c5'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 2a51269 c5
[detached HEAD 5bb2674] c5side
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c5side.t
warning: no common commits
From /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/server
* branch HEAD -> FETCH_HEAD
packet: fetch> have 5bb26742f0d19e4c8eb1d1c6b4ad095643276f17
packet: fetch> have 71dd1938ab184b2c161869e75d3d67ab6f43f2ad
packet: fetch> have 6d58a2de92cca4528034ca2f9a1c205bc6850c1d
packet: fetch> have 591084cc9129e52445472ffcd274d61cb8468867
packet: fetch> have 73c9691b10107e4c472cac321722d49cc664e3e6
ok 3 - when two skips collide, favor the larger one
expecting success:
rm -rf server client trace &&
git init server &&
test_commit -C server c1 &&
test_commit -C server c2 &&
test_commit -C server c3 &&
git -C server tag -d c1 c2 c3 &&
git clone server client &&
test_commit -C client c4 &&
test_commit -C client c5 &&
git -C client checkout c4^^ &&
test_commit -C client c2side &&
git -C server checkout --orphan anotherbranch &&
test_commit -C server to_fetch &&
# The server advertising "c3" (as "refs/heads/master") means that we do
# not need to send any ancestors of "c3", but we still need to send "c3"
# itself.
test_config -C client fetch.negotiationalgorithm skipping &&
# The ref advertisement itself is filtered when protocol v2 is used, so
# use v0.
GIT_TEST_PROTOCOL_VERSION= trace_fetch client origin to_fetch &&
have_sent c5 c4^ c2side &&
have_not_sent c4 c4^^ c4^^^
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/server/.git/
[master (root-commit) 47f2535] c1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c1.t
[master dd0ac24] c2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c2.t
[master b554ada] c3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c3.t
Deleted tag 'c1' (was 47f2535)
Deleted tag 'c2' (was dd0ac24)
Deleted tag 'c3' (was b554ada)
Cloning into 'client'...
done.
[master 15c2709] c4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c4.t
[master 14537eb] c5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c5.t
Note: switching to 'c4^^'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at dd0ac24 c2
[detached HEAD 3409843] c2side
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c2side.t
Switched to a new branch 'anotherbranch'
[anotherbranch (root-commit) ed0e66c] to_fetch
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 c1.t
create mode 100644 c2.t
create mode 100644 c3.t
create mode 100644 to_fetch.t
From /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/server
* tag to_fetch -> FETCH_HEAD
packet: fetch> have 14537ebb3063f1a5d49e3e3eac10cc6e900a9c3a
packet: fetch> have b554adabfc933db0071191b38e163057f45d7dee
packet: fetch> have 3409843ec3ac9e67b951a36aae634d4ff9ec378d
ok 4 - use ref advertisement to filter out commits
expecting success:
rm -rf server client trace &&
git init server &&
test_commit -C server to_fetch &&
git init client &&
# 2 regular commits
test_tick=2000000000 &&
test_commit -C client c1 &&
test_commit -C client c2 &&
# 4 old commits
test_tick=1000000000 &&
git -C client checkout c1 &&
test_commit -C client old1 &&
test_commit -C client old2 &&
test_commit -C client old3 &&
test_commit -C client old4 &&
# "c2" and "c1" are popped first, then "old4" to "old1". "old1" would
# normally be skipped, but is treated as a commit without a parent here
# and sent, because (due to clock skew) its only parent has already been
# popped off the priority queue.
test_config -C client fetch.negotiationalgorithm skipping &&
trace_fetch client "$(pwd)/server" &&
have_sent c2 c1 old4 old2 old1 &&
have_not_sent old3
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/server/.git/
[master (root-commit) 8324fbb] to_fetch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 to_fetch.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/client/.git/
[master (root-commit) dc824fa] c1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c1.t
[master 9ab4692] c2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c2.t
Note: switching to 'c1'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at dc824fa c1
[detached HEAD e9a2c09] old1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 old1.t
[detached HEAD 41bd8dc] old2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 old2.t
[detached HEAD 4ff0db5] old3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 old3.t
[detached HEAD caef059] old4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 old4.t
warning: no common commits
From /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/server
* branch HEAD -> FETCH_HEAD
packet: fetch> have 9ab46928dc282aa09f4dbf96893a252e058e7e8e
packet: fetch> have dc824fafb05f3229aedf1f320bbe572e35364dfe
packet: fetch> have caef059de69917b9119176a11b88afcef769331d
packet: fetch> have 41bd8dc092ee110ba80e350a346ec507ab2e42a0
packet: fetch> have e9a2c092a8e911567a377c881a7f6031e7f892ea
ok 5 - handle clock skew
expecting success:
rm -rf server client trace &&
git init server &&
test_commit -C server to_fetch &&
git init client &&
for i in $(test_seq 8)
do
git -C client checkout --orphan b$i &&
test_commit -C client b$i.c0
done &&
for j in $(test_seq 19)
do
for i in $(test_seq 8)
do
git -C client checkout b$i &&
test_commit -C client b$i.c$j
done
done &&
# Copy this branch over to the server and add a commit on it so that it
# is reachable but not advertised.
git -C server fetch --no-tags "$(pwd)/client" b1:refs/heads/b1 &&
git -C server checkout b1 &&
test_commit -C server commit-on-b1 &&
test_config -C client fetch.negotiationalgorithm skipping &&
trace_fetch client "$(pwd)/server" to_fetch &&
grep " fetch" trace &&
# fetch-pack sends 2 requests each containing 16 "have" lines before
# processing the first response. In these 2 requests, 4 commits from
# each branch are sent. Just check the first branch.
have_sent b1.c19 b1.c17 b1.c14 b1.c9 &&
have_not_sent b1.c18 b1.c16 b1.c15 b1.c13 b1.c12 b1.c11 b1.c10 &&
# While fetch-pack is processing the first response, it should read that
# the server ACKs b1.c19 and b1.c17.
grep "fetch< ACK $(git -C client rev-parse b1.c19) common" trace &&
grep "fetch< ACK $(git -C client rev-parse b1.c17) common" trace &&
# fetch-pack should thus not send any more commits in the b1 branch, but
# should still send the others (in this test, just check b2).
for i in $(test_seq 0 8)
do
have_not_sent b1.c$i
done &&
have_sent b2.c1 b2.c0
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/server/.git/
[master (root-commit) 184bd23] to_fetch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 to_fetch.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/client/.git/
Switched to a new branch 'b1'
[b1 (root-commit) f66d2ca] b1.c0
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c0.t
Switched to a new branch 'b2'
[b2 (root-commit) c402344] b2.c0
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 b1.c0.t
create mode 100644 b2.c0.t
Switched to a new branch 'b3'
[b3 (root-commit) 8252af3] b3.c0
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 b1.c0.t
create mode 100644 b2.c0.t
create mode 100644 b3.c0.t
Switched to a new branch 'b4'
[b4 (root-commit) 8bffdf8] b4.c0
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 b1.c0.t
create mode 100644 b2.c0.t
create mode 100644 b3.c0.t
create mode 100644 b4.c0.t
Switched to a new branch 'b5'
[b5 (root-commit) ece05e8] b5.c0
Author: A U Thor <author@example.com>
5 files changed, 5 insertions(+)
create mode 100644 b1.c0.t
create mode 100644 b2.c0.t
create mode 100644 b3.c0.t
create mode 100644 b4.c0.t
create mode 100644 b5.c0.t
Switched to a new branch 'b6'
[b6 (root-commit) ca6bc33] b6.c0
Author: A U Thor <author@example.com>
6 files changed, 6 insertions(+)
create mode 100644 b1.c0.t
create mode 100644 b2.c0.t
create mode 100644 b3.c0.t
create mode 100644 b4.c0.t
create mode 100644 b5.c0.t
create mode 100644 b6.c0.t
Switched to a new branch 'b7'
[b7 (root-commit) 063e256] b7.c0
Author: A U Thor <author@example.com>
7 files changed, 7 insertions(+)
create mode 100644 b1.c0.t
create mode 100644 b2.c0.t
create mode 100644 b3.c0.t
create mode 100644 b4.c0.t
create mode 100644 b5.c0.t
create mode 100644 b6.c0.t
create mode 100644 b7.c0.t
Switched to a new branch 'b8'
[b8 (root-commit) 9f605c2] b8.c0
Author: A U Thor <author@example.com>
8 files changed, 8 insertions(+)
create mode 100644 b1.c0.t
create mode 100644 b2.c0.t
create mode 100644 b3.c0.t
create mode 100644 b4.c0.t
create mode 100644 b5.c0.t
create mode 100644 b6.c0.t
create mode 100644 b7.c0.t
create mode 100644 b8.c0.t
Switched to branch 'b1'
[b1 3f095eb] b1.c1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c1.t
Switched to branch 'b2'
[b2 89ecd55] b2.c1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c1.t
Switched to branch 'b3'
[b3 6592e0b] b3.c1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c1.t
Switched to branch 'b4'
[b4 4426873] b4.c1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c1.t
Switched to branch 'b5'
[b5 dbb467e] b5.c1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c1.t
Switched to branch 'b6'
[b6 6b911cf] b6.c1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c1.t
Switched to branch 'b7'
[b7 2414896] b7.c1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c1.t
Switched to branch 'b8'
[b8 768bfc5] b8.c1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c1.t
Switched to branch 'b1'
[b1 e885a48] b1.c2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c2.t
Switched to branch 'b2'
[b2 7c818a7] b2.c2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c2.t
Switched to branch 'b3'
[b3 871f49f] b3.c2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c2.t
Switched to branch 'b4'
[b4 72680bb] b4.c2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c2.t
Switched to branch 'b5'
[b5 b4557a1] b5.c2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c2.t
Switched to branch 'b6'
[b6 6ca2925] b6.c2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c2.t
Switched to branch 'b7'
[b7 7b661b8] b7.c2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c2.t
Switched to branch 'b8'
[b8 2ecc389] b8.c2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c2.t
Switched to branch 'b1'
[b1 5c8f104] b1.c3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c3.t
Switched to branch 'b2'
[b2 4a25303] b2.c3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c3.t
Switched to branch 'b3'
[b3 53d0287] b3.c3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c3.t
Switched to branch 'b4'
[b4 6a982e3] b4.c3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c3.t
Switched to branch 'b5'
[b5 beacf7c] b5.c3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c3.t
Switched to branch 'b6'
[b6 645ec77] b6.c3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c3.t
Switched to branch 'b7'
[b7 c245fa6] b7.c3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c3.t
Switched to branch 'b8'
[b8 e7e7720] b8.c3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c3.t
Switched to branch 'b1'
[b1 42fd38e] b1.c4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c4.t
Switched to branch 'b2'
[b2 b2c5e5b] b2.c4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c4.t
Switched to branch 'b3'
[b3 f0835ff] b3.c4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c4.t
Switched to branch 'b4'
[b4 b60c575] b4.c4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c4.t
Switched to branch 'b5'
[b5 4981e16] b5.c4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c4.t
Switched to branch 'b6'
[b6 3b4c6b7] b6.c4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c4.t
Switched to branch 'b7'
[b7 500474e] b7.c4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c4.t
Switched to branch 'b8'
[b8 54ca498] b8.c4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c4.t
Switched to branch 'b1'
[b1 3accc66] b1.c5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c5.t
Switched to branch 'b2'
[b2 82dee3b] b2.c5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c5.t
Switched to branch 'b3'
[b3 be215b2] b3.c5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c5.t
Switched to branch 'b4'
[b4 dabc132] b4.c5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c5.t
Switched to branch 'b5'
[b5 8561b1c] b5.c5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c5.t
Switched to branch 'b6'
[b6 318c581] b6.c5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c5.t
Switched to branch 'b7'
[b7 92d192b] b7.c5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c5.t
Switched to branch 'b8'
[b8 ea98a5a] b8.c5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c5.t
Switched to branch 'b1'
[b1 4f95974] b1.c6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c6.t
Switched to branch 'b2'
[b2 c6b69d0] b2.c6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c6.t
Switched to branch 'b3'
[b3 0c5d942] b3.c6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c6.t
Switched to branch 'b4'
[b4 46bd8d8] b4.c6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c6.t
Switched to branch 'b5'
[b5 3eb11ae] b5.c6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c6.t
Switched to branch 'b6'
[b6 77cb153] b6.c6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c6.t
Switched to branch 'b7'
[b7 1fa72fc] b7.c6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c6.t
Switched to branch 'b8'
[b8 ddd2755] b8.c6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c6.t
Switched to branch 'b1'
[b1 318aa43] b1.c7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c7.t
Switched to branch 'b2'
[b2 5e7b2f0] b2.c7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c7.t
Switched to branch 'b3'
[b3 9bf9a83] b3.c7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c7.t
Switched to branch 'b4'
[b4 794bc8f] b4.c7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c7.t
Switched to branch 'b5'
[b5 69fe812] b5.c7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c7.t
Switched to branch 'b6'
[b6 97ae47d] b6.c7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c7.t
Switched to branch 'b7'
[b7 403ab1f] b7.c7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c7.t
Switched to branch 'b8'
[b8 cff31fa] b8.c7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c7.t
Switched to branch 'b1'
[b1 eccb3a8] b1.c8
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c8.t
Switched to branch 'b2'
[b2 6e4ea02] b2.c8
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c8.t
Switched to branch 'b3'
[b3 37e9829] b3.c8
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c8.t
Switched to branch 'b4'
[b4 9ff00cf] b4.c8
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c8.t
Switched to branch 'b5'
[b5 a42de58] b5.c8
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c8.t
Switched to branch 'b6'
[b6 8fce737] b6.c8
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c8.t
Switched to branch 'b7'
[b7 8a6b38a] b7.c8
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c8.t
Switched to branch 'b8'
[b8 4e6a712] b8.c8
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c8.t
Switched to branch 'b1'
[b1 b76868e] b1.c9
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c9.t
Switched to branch 'b2'
[b2 770eae6] b2.c9
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c9.t
Switched to branch 'b3'
[b3 83458c8] b3.c9
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c9.t
Switched to branch 'b4'
[b4 49c8cda] b4.c9
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c9.t
Switched to branch 'b5'
[b5 0ed227c] b5.c9
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c9.t
Switched to branch 'b6'
[b6 91e9203] b6.c9
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c9.t
Switched to branch 'b7'
[b7 5f1aa7f] b7.c9
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c9.t
Switched to branch 'b8'
[b8 e4190b4] b8.c9
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c9.t
Switched to branch 'b1'
[b1 431681a] b1.c10
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c10.t
Switched to branch 'b2'
[b2 cdc2fe7] b2.c10
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c10.t
Switched to branch 'b3'
[b3 04d742f] b3.c10
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c10.t
Switched to branch 'b4'
[b4 a03b044] b4.c10
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c10.t
Switched to branch 'b5'
[b5 1636ce4] b5.c10
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c10.t
Switched to branch 'b6'
[b6 5636f71] b6.c10
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c10.t
Switched to branch 'b7'
[b7 a986247] b7.c10
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c10.t
Switched to branch 'b8'
[b8 3c735f4] b8.c10
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c10.t
Switched to branch 'b1'
[b1 d2b5e73] b1.c11
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c11.t
Switched to branch 'b2'
[b2 f9d95c1] b2.c11
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c11.t
Switched to branch 'b3'
[b3 62a89df] b3.c11
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c11.t
Switched to branch 'b4'
[b4 ad26868] b4.c11
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c11.t
Switched to branch 'b5'
[b5 5a4dfb9] b5.c11
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c11.t
Switched to branch 'b6'
[b6 dc8930a] b6.c11
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c11.t
Switched to branch 'b7'
[b7 3b76e60] b7.c11
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c11.t
Switched to branch 'b8'
[b8 2ba6a3d] b8.c11
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c11.t
Switched to branch 'b1'
[b1 b8e826f] b1.c12
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c12.t
Switched to branch 'b2'
[b2 4234dfd] b2.c12
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c12.t
Switched to branch 'b3'
[b3 342bc7b] b3.c12
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c12.t
Switched to branch 'b4'
[b4 108c1a4] b4.c12
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c12.t
Switched to branch 'b5'
[b5 9a28ede] b5.c12
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c12.t
Switched to branch 'b6'
[b6 3f5ace9] b6.c12
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c12.t
Switched to branch 'b7'
[b7 93c4bac] b7.c12
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c12.t
Switched to branch 'b8'
[b8 baa7561] b8.c12
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c12.t
Switched to branch 'b1'
[b1 95bc4bb] b1.c13
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c13.t
Switched to branch 'b2'
[b2 8489a1d] b2.c13
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c13.t
Switched to branch 'b3'
[b3 64d34a0] b3.c13
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c13.t
Switched to branch 'b4'
[b4 bac01a4] b4.c13
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c13.t
Switched to branch 'b5'
[b5 e86f129] b5.c13
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c13.t
Switched to branch 'b6'
[b6 699548c] b6.c13
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c13.t
Switched to branch 'b7'
[b7 103bf10] b7.c13
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c13.t
Switched to branch 'b8'
[b8 c26a4fc] b8.c13
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c13.t
Switched to branch 'b1'
[b1 b89f649] b1.c14
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c14.t
Switched to branch 'b2'
[b2 fe51ff5] b2.c14
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c14.t
Switched to branch 'b3'
[b3 fc1ea38] b3.c14
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c14.t
Switched to branch 'b4'
[b4 2b6a82d] b4.c14
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c14.t
Switched to branch 'b5'
[b5 bd4af3f] b5.c14
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c14.t
Switched to branch 'b6'
[b6 15633e6] b6.c14
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c14.t
Switched to branch 'b7'
[b7 b2e9b68] b7.c14
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c14.t
Switched to branch 'b8'
[b8 a1d75da] b8.c14
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c14.t
Switched to branch 'b1'
[b1 5e97e7c] b1.c15
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c15.t
Switched to branch 'b2'
[b2 1c61ed4] b2.c15
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c15.t
Switched to branch 'b3'
[b3 19afa9a] b3.c15
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c15.t
Switched to branch 'b4'
[b4 9c413e1] b4.c15
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c15.t
Switched to branch 'b5'
[b5 d014f6a] b5.c15
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c15.t
Switched to branch 'b6'
[b6 f8c4313] b6.c15
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c15.t
Switched to branch 'b7'
[b7 682d1c2] b7.c15
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c15.t
Switched to branch 'b8'
[b8 d06805d] b8.c15
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c15.t
Switched to branch 'b1'
[b1 6280c6c] b1.c16
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c16.t
Switched to branch 'b2'
[b2 54730b4] b2.c16
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c16.t
Switched to branch 'b3'
[b3 450e72c] b3.c16
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c16.t
Switched to branch 'b4'
[b4 1d556dd] b4.c16
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c16.t
Switched to branch 'b5'
[b5 30d8e5b] b5.c16
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c16.t
Switched to branch 'b6'
[b6 7b79d49] b6.c16
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c16.t
Switched to branch 'b7'
[b7 15da705] b7.c16
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c16.t
Switched to branch 'b8'
[b8 83492f9] b8.c16
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c16.t
Switched to branch 'b1'
[b1 17639a0] b1.c17
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c17.t
Switched to branch 'b2'
[b2 0e8fe67] b2.c17
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c17.t
Switched to branch 'b3'
[b3 a33f3b9] b3.c17
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c17.t
Switched to branch 'b4'
[b4 bf65a8f] b4.c17
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c17.t
Switched to branch 'b5'
[b5 d9ed2b1] b5.c17
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c17.t
Switched to branch 'b6'
[b6 48b167c] b6.c17
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c17.t
Switched to branch 'b7'
[b7 7f5656e] b7.c17
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c17.t
Switched to branch 'b8'
[b8 e7bb01c] b8.c17
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c17.t
Switched to branch 'b1'
[b1 ea1e457] b1.c18
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c18.t
Switched to branch 'b2'
[b2 611613a] b2.c18
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c18.t
Switched to branch 'b3'
[b3 7497b4a] b3.c18
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c18.t
Switched to branch 'b4'
[b4 b5d9485] b4.c18
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c18.t
Switched to branch 'b5'
[b5 d9fd7d4] b5.c18
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c18.t
Switched to branch 'b6'
[b6 f5d257d] b6.c18
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c18.t
Switched to branch 'b7'
[b7 ca45808] b7.c18
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c18.t
Switched to branch 'b8'
[b8 76929ae] b8.c18
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c18.t
Switched to branch 'b1'
[b1 e3496f0] b1.c19
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b1.c19.t
Switched to branch 'b2'
[b2 124ff4f] b2.c19
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b2.c19.t
Switched to branch 'b3'
[b3 155cfe5] b3.c19
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b3.c19.t
Switched to branch 'b4'
[b4 29f3488] b4.c19
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b4.c19.t
Switched to branch 'b5'
[b5 b722512] b5.c19
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b5.c19.t
Switched to branch 'b6'
[b6 eb0ead1] b6.c19
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b6.c19.t
Switched to branch 'b7'
[b7 334d40a] b7.c19
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b7.c19.t
Switched to branch 'b8'
[b8 f65fc9b] b8.c19
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b8.c19.t
warning: no common commits
From /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/client
* [new branch] b1 -> b1
Switched to branch 'b1'
[b1 4fc6b0b] commit-on-b1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 commit-on-b1.t
From /<<PKGBUILDDIR>>/t/trash directory.t5552-skipping-fetch-negotiator/server
* tag to_fetch -> FETCH_HEAD
packet: fetch< 4fc6b0b77cfa2370eb0c417e5e26e40a980884fe HEAD\0multi_ack thin-pack side-band side-band-64k ofs-delta shallow deepen-since deepen-not deepen-relative no-progress include-tag multi_ack_detailed symref=HEAD:refs/heads/b1 agent=git/2.23.0.rc1
packet: fetch< 4fc6b0b77cfa2370eb0c417e5e26e40a980884fe refs/heads/b1
packet: fetch< 184bd23dc533e1e63153e7e181411bd29acca918 refs/heads/master
packet: fetch< 4fc6b0b77cfa2370eb0c417e5e26e40a980884fe refs/tags/commit-on-b1
packet: fetch< 184bd23dc533e1e63153e7e181411bd29acca918 refs/tags/to_fetch
packet: fetch< 0000
packet: fetch> want 184bd23dc533e1e63153e7e181411bd29acca918 multi_ack_detailed side-band-64k thin-pack no-progress ofs-delta deepen-since deepen-not agent=git/2.23.0.rc1
packet: fetch> 0000
packet: fetch> have f65fc9b4d5c1cb76494a7f8df0230d8d29a33e67
packet: fetch> have 334d40a157dec5d93023976c30cd22b24bdc279a
packet: fetch> have eb0ead13281c18fd207283425897500ff37b58a0
packet: fetch> have b722512541a1c484f0269dbb06e0ebe809126be7
packet: fetch> have 29f348829e91209e05b0f7277512e3815fd33d66
packet: fetch> have 155cfe5fba134b2a3f290da550e227776793d1c5
packet: fetch> have 124ff4f891c3955a682247533ec290603f9df504
packet: fetch> have e3496f08debed7528bd7e4c4a12b71d1a99d697f
packet: fetch> have e7bb01cb25bebd0341c9d62f4c7e929a99b6ed4b
packet: fetch> have 7f5656e94770d527d4f909fd5e2ea274ec63177a
packet: fetch> have 48b167c8c363708a36d20637466781d435df923e
packet: fetch> have d9ed2b16325a06a2cc5061533b4935c526e4e64d
packet: fetch> have bf65a8f944c8cdbf9d31b2f8656b07b1f3b7daf4
packet: fetch> have a33f3b91e50fa0ce528590623af68f075a7d7f13
packet: fetch> have 0e8fe67b3355336aecfc08fdd26397774c64247a
packet: fetch> have 17639a004fe8511fe1de57dd9ddabf2ee0de902d
packet: fetch> 0000
packet: fetch> have a1d75daa2f482f89171f092778da506803e54531
packet: fetch> have b2e9b68d2650b77283421888be8a950c18bab29d
packet: fetch> have 15633e66d344ed5bf98eebac690942c9cb93d182
packet: fetch> have bd4af3f8e2999e978ad2b792b1815f78f91a81d8
packet: fetch> have 2b6a82df34178b75c650082ccc76cab0bc2d2537
packet: fetch> have fc1ea38ba267d192a042f8c6efb76b4b37a3cd59
packet: fetch> have fe51ff519f033bfe0b49a646f58762e393bdbd1d
packet: fetch> have b89f6499d7cee40ef422edb15433a10f82de0206
packet: fetch> have e4190b433240834c895347214d29426a094f2fe2
packet: fetch> have 5f1aa7f016defcf74e5e1d4991342987c9d4b447
packet: fetch> have 91e920349cc8fc80c282e69da054c2bfa3346e03
packet: fetch> have 0ed227c5105634ad47b6e4351cb4933656eb6c83
packet: fetch> have 49c8cda191a8dc56e3e99fe3207882c2409ecab9
packet: fetch> have 83458c83eb7fd3f865319fc6c6436caa2268401c
packet: fetch> have 770eae6e9055970583428d6c1ac289cec76525a9
packet: fetch> have b76868e654ce45adb9e06f638e48a72556843361
packet: fetch> 0000
packet: fetch< ACK e3496f08debed7528bd7e4c4a12b71d1a99d697f common
packet: fetch< ACK 17639a004fe8511fe1de57dd9ddabf2ee0de902d common
packet: fetch< NAK
packet: fetch> have 768bfc586d66909db8c6f75f809ecf54f353d2cb
packet: fetch> have 2414896148937fcc3df5ca53e846ebd2481945b3
packet: fetch> have 6b911cfac437ae1c8a0db544afef1c4dba87d26d
packet: fetch> have dbb467e9a5ddb4b8148e8b7f214ceed3c4e0e71a
packet: fetch> have 44268733d7e0371a0129a3776faa39beee58d3fe
packet: fetch> have 6592e0bbee4f972ca359f25206af69a9962aac1c
packet: fetch> have 89ecd55a5a20b633c82b7fbf2491660b45b37f5f
packet: fetch> have 9f605c21b07f8dd321aa26907043464e8a8eb40d
packet: fetch> have 063e25688044f8baf7ce6ce7bfb87ced658844c8
packet: fetch> have ca6bc330e163fe097fd075d037ceacbdafee00f3
packet: fetch> have ece05e896e3c6aaa553cb541f15203bcadc24468
packet: fetch> have 8bffdf81ad07c0f1bb4beaab6f4db452cc745dd6
packet: fetch> have 8252af32268388cf5b0de476a87325cfff99c560
packet: fetch> have c402344c412528d24d8381cf5cc66e6c5df54169
packet: fetch> done
packet: fetch< ACK b89f6499d7cee40ef422edb15433a10f82de0206 common
packet: fetch< ACK b76868e654ce45adb9e06f638e48a72556843361 common
packet: fetch< NAK
packet: fetch< ACK b76868e654ce45adb9e06f638e48a72556843361
packet: fetch> have e3496f08debed7528bd7e4c4a12b71d1a99d697f
packet: fetch> have 17639a004fe8511fe1de57dd9ddabf2ee0de902d
packet: fetch> have b89f6499d7cee40ef422edb15433a10f82de0206
packet: fetch> have b76868e654ce45adb9e06f638e48a72556843361
packet: fetch< ACK e3496f08debed7528bd7e4c4a12b71d1a99d697f common
packet: fetch< ACK 17639a004fe8511fe1de57dd9ddabf2ee0de902d common
packet: fetch> have 89ecd55a5a20b633c82b7fbf2491660b45b37f5f
packet: fetch> have c402344c412528d24d8381cf5cc66e6c5df54169
ok 6 - do not send "have" with ancestors of commits that server ACKed
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5603-clone-dirname.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5603-clone-dirname/.git/
expecting success:
write_script "$TRASH_DIRECTORY/ssh-wrapper" <<-\EOF &&
git upload-pack "$TRASH_DIRECTORY"
EOF
GIT_SSH="$TRASH_DIRECTORY/ssh-wrapper" &&
GIT_SSH_VARIANT=ssh &&
export GIT_SSH &&
export GIT_SSH_VARIANT &&
export TRASH_DIRECTORY
ok 1 - setup ssh wrapper
expecting success:
rm -rf foo &&
git clone host:foo &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 2 - clone of host:foo goes to foo (non-bare)
expecting success:
rm -rf foo.git &&
git clone --bare host:foo &&
test_path_is_dir foo.git
Cloning into bare repository 'foo.git'...
warning: You appear to have cloned an empty repository.
ok 3 - clone of host:foo goes to foo.git (bare)
expecting success:
rm -rf foo &&
git clone host:foo.git &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 4 - clone of host:foo.git goes to foo (non-bare)
expecting success:
rm -rf foo.git &&
git clone --bare host:foo.git &&
test_path_is_dir foo.git
Cloning into bare repository 'foo.git'...
warning: You appear to have cloned an empty repository.
ok 5 - clone of host:foo.git goes to foo.git (bare)
expecting success:
rm -rf foo &&
git clone host:foo/.git &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 6 - clone of host:foo/.git goes to foo (non-bare)
expecting success:
rm -rf foo.git &&
git clone --bare host:foo/.git &&
test_path_is_dir foo.git
Cloning into bare repository 'foo.git'...
warning: You appear to have cloned an empty repository.
ok 7 - clone of host:foo/.git goes to foo.git (bare)
expecting success:
rm -rf foo &&
git clone ssh://host/foo &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 8 - clone of ssh://host/foo goes to foo (non-bare)
expecting success:
rm -rf foo.git &&
git clone --bare ssh://host/foo &&
test_path_is_dir foo.git
Cloning into bare repository 'foo.git'...
warning: You appear to have cloned an empty repository.
ok 9 - clone of ssh://host/foo goes to foo.git (bare)
expecting success:
rm -rf foo &&
git clone ssh://host/foo.git &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 10 - clone of ssh://host/foo.git goes to foo (non-bare)
expecting success:
rm -rf foo.git &&
git clone --bare ssh://host/foo.git &&
test_path_is_dir foo.git
Cloning into bare repository 'foo.git'...
warning: You appear to have cloned an empty repository.
ok 11 - clone of ssh://host/foo.git goes to foo.git (bare)
expecting success:
rm -rf foo &&
git clone ssh://host/foo/.git &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 12 - clone of ssh://host/foo/.git goes to foo (non-bare)
expecting success:
rm -rf foo.git &&
git clone --bare ssh://host/foo/.git &&
test_path_is_dir foo.git
Cloning into bare repository 'foo.git'...
warning: You appear to have cloned an empty repository.
ok 13 - clone of ssh://host/foo/.git goes to foo.git (bare)
expecting success:
rm -rf foo &&
git clone ssh://host/foo/ &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 14 - clone of ssh://host/foo/ goes to foo (non-bare)
expecting success:
rm -rf foo &&
git clone ssh://host/foo/// &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 15 - clone of ssh://host/foo/// goes to foo (non-bare)
expecting success:
rm -rf foo &&
git clone ssh://host/foo/.git/ &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 16 - clone of ssh://host/foo/.git/ goes to foo (non-bare)
expecting success:
rm -rf foo &&
git clone ssh://host/foo.git/ &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 17 - clone of ssh://host/foo.git/ goes to foo (non-bare)
expecting success:
rm -rf foo &&
git clone ssh://host/foo.git/// &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 18 - clone of ssh://host/foo.git/// goes to foo (non-bare)
expecting success:
rm -rf foo &&
git clone ssh://host/foo///.git/ &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 19 - clone of ssh://host/foo///.git/ goes to foo (non-bare)
expecting success:
rm -rf foo &&
git clone ssh://host/foo/.git/// &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 20 - clone of ssh://host/foo/.git/// goes to foo (non-bare)
expecting success:
rm -rf foo &&
git clone host:foo/ &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 21 - clone of host:foo/ goes to foo (non-bare)
expecting success:
rm -rf foo &&
git clone host:foo/// &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 22 - clone of host:foo/// goes to foo (non-bare)
expecting success:
rm -rf foo &&
git clone host:foo.git/ &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 23 - clone of host:foo.git/ goes to foo (non-bare)
expecting success:
rm -rf foo &&
git clone host:foo/.git/ &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 24 - clone of host:foo/.git/ goes to foo (non-bare)
expecting success:
rm -rf foo &&
git clone host:foo.git/// &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 25 - clone of host:foo.git/// goes to foo (non-bare)
expecting success:
rm -rf foo &&
git clone host:foo///.git/ &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 26 - clone of host:foo///.git/ goes to foo (non-bare)
expecting success:
rm -rf foo &&
git clone host:foo/.git/// &&
test_path_is_dir foo
Cloning into 'foo'...
warning: You appear to have cloned an empty repository.
ok 27 - clone of host:foo/.git/// goes to foo (non-bare)
expecting success:
rm -rf host &&
git clone ssh://host/ &&
test_path_is_dir host
Cloning into 'host'...
warning: You appear to have cloned an empty repository.
ok 28 - clone of ssh://host/ goes to host (non-bare)
expecting success:
rm -rf host &&
git clone ssh://host:1234/ &&
test_path_is_dir host
Cloning into 'host'...
warning: You appear to have cloned an empty repository.
ok 29 - clone of ssh://host:1234/ goes to host (non-bare)
expecting success:
rm -rf host &&
git clone ssh://user@host/ &&
test_path_is_dir host
Cloning into 'host'...
warning: You appear to have cloned an empty repository.
ok 30 - clone of ssh://user@host/ goes to host (non-bare)
expecting success:
rm -rf host &&
git clone host:/ &&
test_path_is_dir host
Cloning into 'host'...
warning: You appear to have cloned an empty repository.
ok 31 - clone of host:/ goes to host (non-bare)
expecting success:
rm -rf host &&
git clone ssh://user:password@host/ &&
test_path_is_dir host
Cloning into 'host'...
warning: You appear to have cloned an empty repository.
ok 32 - clone of ssh://user:password@host/ goes to host (non-bare)
expecting success:
rm -rf host &&
git clone ssh://user:password@host:1234/ &&
test_path_is_dir host
Cloning into 'host'...
warning: You appear to have cloned an empty repository.
ok 33 - clone of ssh://user:password@host:1234/ goes to host (non-bare)
expecting success:
rm -rf host &&
git clone ssh://user:passw@rd@host:1234/ &&
test_path_is_dir host
Cloning into 'host'...
warning: You appear to have cloned an empty repository.
ok 34 - clone of ssh://user:passw@rd@host:1234/ goes to host (non-bare)
expecting success:
rm -rf host &&
git clone user@host:/ &&
test_path_is_dir host
Cloning into 'host'...
warning: You appear to have cloned an empty repository.
ok 35 - clone of user@host:/ goes to host (non-bare)
expecting success:
rm -rf host &&
git clone user:password@host:/ &&
test_path_is_dir host
Cloning into 'host'...
warning: You appear to have cloned an empty repository.
ok 36 - clone of user:password@host:/ goes to host (non-bare)
expecting success:
rm -rf host &&
git clone user:passw@rd@host:/ &&
test_path_is_dir host
Cloning into 'host'...
warning: You appear to have cloned an empty repository.
ok 37 - clone of user:passw@rd@host:/ goes to host (non-bare)
expecting success:
rm -rf foo@bar &&
git clone ssh://host/foo@bar &&
test_path_is_dir foo@bar
Cloning into 'foo@bar'...
warning: You appear to have cloned an empty repository.
ok 38 - clone of ssh://host/foo@bar goes to foo@bar (non-bare)
expecting success:
rm -rf foo@bar &&
git clone ssh://host/foo@bar.git &&
test_path_is_dir foo@bar
Cloning into 'foo@bar'...
warning: You appear to have cloned an empty repository.
ok 39 - clone of ssh://host/foo@bar.git goes to foo@bar (non-bare)
expecting success:
rm -rf foo@bar &&
git clone ssh://user:password@host/foo@bar &&
test_path_is_dir foo@bar
Cloning into 'foo@bar'...
warning: You appear to have cloned an empty repository.
ok 40 - clone of ssh://user:password@host/foo@bar goes to foo@bar (non-bare)
expecting success:
rm -rf foo@bar &&
git clone ssh://user:passw@rd@host/foo@bar.git &&
test_path_is_dir foo@bar
Cloning into 'foo@bar'...
warning: You appear to have cloned an empty repository.
ok 41 - clone of ssh://user:passw@rd@host/foo@bar.git goes to foo@bar (non-bare)
expecting success:
rm -rf foo@bar &&
git clone host:/foo@bar &&
test_path_is_dir foo@bar
Cloning into 'foo@bar'...
warning: You appear to have cloned an empty repository.
ok 42 - clone of host:/foo@bar goes to foo@bar (non-bare)
expecting success:
rm -rf foo@bar &&
git clone host:/foo@bar.git &&
test_path_is_dir foo@bar
Cloning into 'foo@bar'...
warning: You appear to have cloned an empty repository.
ok 43 - clone of host:/foo@bar.git goes to foo@bar (non-bare)
expecting success:
rm -rf foo@bar &&
git clone user:password@host:/foo@bar &&
test_path_is_dir foo@bar
Cloning into 'foo@bar'...
warning: You appear to have cloned an empty repository.
ok 44 - clone of user:password@host:/foo@bar goes to foo@bar (non-bare)
expecting success:
rm -rf foo@bar &&
git clone user:passw@rd@host:/foo@bar.git &&
test_path_is_dir foo@bar
Cloning into 'foo@bar'...
warning: You appear to have cloned an empty repository.
ok 45 - clone of user:passw@rd@host:/foo@bar.git goes to foo@bar (non-bare)
expecting success:
rm -rf 1234 &&
git clone ssh://user:password@host/test:1234 &&
test_path_is_dir 1234
Cloning into '1234'...
warning: You appear to have cloned an empty repository.
ok 46 - clone of ssh://user:password@host/test:1234 goes to 1234 (non-bare)
expecting success:
rm -rf 1234 &&
git clone ssh://user:password@host/test:1234.git &&
test_path_is_dir 1234
Cloning into '1234'...
warning: You appear to have cloned an empty repository.
ok 47 - clone of ssh://user:password@host/test:1234.git goes to 1234 (non-bare)
# passed all 47 test(s)
1..47
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5605-clone-local.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5605-clone-local/.git/
expecting success:
: >file && git add . && git commit -m1 &&
git clone --bare . a.git &&
git clone --bare . x &&
test "$(cd a.git && git config --bool core.bare)" = true &&
test "$(cd x && git config --bool core.bare)" = true &&
git bundle create b1.bundle --all &&
git bundle create b2.bundle master &&
mkdir dir &&
cp b1.bundle dir/b3 &&
cp b1.bundle b4
[master (root-commit) 4c32f12] 1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
Cloning into bare repository 'a.git'...
done.
Cloning into bare repository 'x'...
done.
ok 1 - preparing origin repository
expecting success:
git clone -l -s a b &&
(cd b &&
test "$(git config --bool core.bare)" = false &&
git fetch)
Cloning into 'b'...
done.
ok 2 - local clone without .git suffix
expecting success:
git clone -l -s a.git c &&
(cd c && git fetch)
Cloning into 'c'...
done.
ok 3 - local clone with .git suffix
expecting success:
git clone -l -s x y &&
(cd y && git fetch)
Cloning into 'y'...
done.
ok 4 - local clone from x
expecting success:
test_must_fail git clone -l -s x.git z
fatal: repository 'x.git' does not exist
ok 5 - local clone from x.git that does not exist
expecting success:
git clone --bare --no-hardlinks x w &&
! repo_is_hardlinked w
Cloning into bare repository 'w'...
done.
test_line_count: line count for output != 0
w/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
w/objects/df/2b8fc99e1c1d4dbc0a854d9f72157f1d6ea078
w/objects/4c/32f12a90c7db7a0a233be3814a45859c410d8e
ok 6 - With -no-hardlinks, local will make a copy
expecting success:
rm -fr w &&
git clone -l --bare x w &&
repo_is_hardlinked w
Cloning into bare repository 'w'...
done.
ok 7 - Even without -l, local will make a hardlink
expecting success:
echo "ref: refs/heads/nonexistent" > a.git/HEAD &&
git clone a d &&
(cd d &&
git fetch &&
test ! -e .git/refs/remotes/origin/HEAD)
Cloning into 'd'...
done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.
ok 8 - local clone of repo with nonexistent ref in HEAD
expecting success:
git clone dir/b3 &&
(cd b3 && git fetch)
Cloning into 'b3'...
ok 9 - bundle clone without .bundle suffix
expecting success:
git clone b1.bundle &&
(cd b1 && git fetch)
Cloning into 'b1'...
ok 10 - bundle clone with .bundle suffix
expecting success:
git clone b4 bdl &&
(cd bdl && git fetch)
Cloning into 'bdl'...
ok 11 - bundle clone from b4
expecting success:
test_must_fail git clone b4.bundle bb
fatal: repository 'b4.bundle' does not exist
ok 12 - bundle clone from b4.bundle that does not exist
expecting success:
git clone b2.bundle b2 &&
(cd b2 &&
git fetch &&
test_must_fail git rev-parse --verify refs/heads/master)
Cloning into 'b2'...
warning: remote HEAD refers to nonexistent ref, unable to checkout.
fatal: Needed a single revision
ok 13 - bundle clone with nonexistent HEAD
expecting success:
mkdir empty &&
(cd empty &&
git init &&
git config receive.denyCurrentBranch warn) &&
git clone empty empty-clone &&
test_tick &&
(cd empty-clone &&
echo "content" >> foo &&
git add foo &&
git commit -m "Initial commit" &&
git push origin master &&
expected=$(git rev-parse master) &&
actual=$(git --git-dir=../empty/.git rev-parse master) &&
test $actual = $expected)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5605-clone-local/empty/.git/
Cloning into 'empty-clone'...
warning: You appear to have cloned an empty repository.
done.
[master (root-commit) b8e7dd3] Initial commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
remote: warning: updating the current branch
To /<<PKGBUILDDIR>>/t/trash directory.t5605-clone-local/empty
* [new branch] master -> master
ok 14 - clone empty repository
expecting success:
rm -fr empty/ empty-clone/ &&
mkdir empty &&
(cd empty && git init) &&
git clone empty empty-clone &&
(cd empty-clone &&
test_must_fail git push)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5605-clone-local/empty/.git/
Cloning into 'empty-clone'...
warning: You appear to have cloned an empty repository.
done.
error: src refspec refs/heads/master does not match any
error: failed to push some refs to '/<<PKGBUILDDIR>>/t/trash directory.t5605-clone-local/empty'
ok 15 - clone empty repository, and then push should not segfault.
expecting success:
rm -rf does-not-exist &&
test_must_fail git clone does-not-exist
fatal: repository 'does-not-exist' does not exist
ok 16 - cloning non-existent directory fails
expecting success:
rm -rf not-a-git-repo not-a-git-repo-clone &&
mkdir not-a-git-repo &&
test_must_fail git clone not-a-git-repo not-a-git-repo-clone
fatal: repository 'not-a-git-repo' does not exist
ok 17 - cloning non-git directory fails
expecting success:
git clone --bare file://"$(pwd)"/a non-local &&
! repo_is_hardlinked non-local
Cloning into bare repository 'non-local'...
test_line_count: line count for output != 0
non-local/objects/pack/pack-f148d2bd64d36fdb6d9f2dc3d91bf5129881ec11.pack
non-local/objects/pack/pack-f148d2bd64d36fdb6d9f2dc3d91bf5129881ec11.idx
ok 18 - cloning file:// does not hardlink
expecting success:
git clone --bare --no-local a force-nonlocal &&
! repo_is_hardlinked force-nonlocal
Cloning into bare repository 'force-nonlocal'...
test_line_count: line count for output != 0
force-nonlocal/objects/pack/pack-f148d2bd64d36fdb6d9f2dc3d91bf5129881ec11.pack
force-nonlocal/objects/pack/pack-f148d2bd64d36fdb6d9f2dc3d91bf5129881ec11.idx
ok 19 - cloning a local path with --no-local does not hardlink
expecting success:
test_must_fail git clone --bare -u false a should_not_work.git
Cloning into bare repository 'should_not_work.git'...
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 20 - cloning locally respects "-u" for fetching refs
# passed all 20 test(s)
1..20
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5606-clone-options.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5606-clone-options/.git/
expecting success:
mkdir parent &&
(cd parent && git init &&
echo one >file && git add file &&
git commit -m one)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5606-clone-options/parent/.git/
[master (root-commit) bc46171] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 1 - setup
expecting success:
git clone -o foo parent clone-o &&
(cd clone-o && git rev-parse --verify refs/remotes/foo/master)
Cloning into 'clone-o'...
done.
bc46171a06b16ecc2d6f4e34078937f32a666c9f
ok 2 - clone -o
expecting success:
git clone "file://$(pwd)/parent" clone-redirected >out 2>err &&
! grep % err &&
test_i18ngrep ! "Checking connectivity" err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 3 - redirected clone does not show progress
expecting success:
git clone --progress "file://$(pwd)/parent" clone-redirected-progress \
>out 2>err &&
grep % err
remote:
remote:
remote: Counting objects: 33% (1/3)
remote:
remote:
remote: Counting objects: 66% (2/3)
remote:
remote:
remote: Counting objects: 100% (3/3)
remote:
remote:
remote: Counting objects: 100% (3/3), done.
Receiving objects: 33% (1/3)
Receiving objects: 66% (2/3)
Receiving objects: 100% (3/3)
Receiving objects: 100% (3/3), done.
ok 4 - redirected clone -v does show progress
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5604-clone-reference.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5604-clone-reference/.git/
expecting success:
test_create_repo A &&
commit_in A file1
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5604-clone-reference/A/.git/
[master (root-commit) 151c7d5] file1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1
ok 1 - preparing first repository
expecting success:
git clone A B &&
commit_in B file2 &&
git -C B repack -ad &&
git -C B prune
Cloning into 'B'...
done.
[master f26b11a] file2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
ok 2 - preparing second repository
expecting success:
git clone -l -s --reference B A C
Cloning into 'C'...
done.
ok 3 - cloning with reference (-l -s)
expecting success:
test_line_count = 2 C/.git/objects/info/alternates
ok 4 - existence of info/alternates
expecting success:
git -C C pull ../B master
From ../B
* branch master -> FETCH_HEAD
Updating 151c7d5..f26b11a
Fast-forward
file2 | 1 +
1 file changed, 1 insertion(+)
create mode 100644 file2
ok 5 - pulling from reference
expecting success:
test_objcount C 0
ok 6 - that reference gets used
expecting success:
GIT_TRACE_PACKET=$U.D git clone --reference B "file://$(pwd)/A" D
Cloning into 'D'...
ok 7 - cloning with reference (no -l -s)
expecting success:
test -s "$U.D" &&
! grep " want" "$U.D"
ok 8 - fetched no objects
expecting success:
test_line_count = 1 D/.git/objects/info/alternates
ok 9 - existence of info/alternates
expecting success:
git -C D pull ../B master
From ../B
* branch master -> FETCH_HEAD
Updating 151c7d5..f26b11a
Fast-forward
file2 | 1 +
1 file changed, 1 insertion(+)
create mode 100644 file2
ok 10 - pulling from reference
expecting success:
test_objcount D 0
ok 11 - that reference gets used
expecting success:
commit_in A file3 &&
git -C A repack -ad &&
git -C A prune
[master 00bb2fc] file3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
ok 12 - updating origin
expecting success:
git -C C pull origin
From /<<PKGBUILDDIR>>/t/trash directory.t5604-clone-reference/A
151c7d5..00bb2fc master -> origin/master
Merging:
f26b11a file2
virtual 00bb2fc7e2ab649eb513e94a6d4408734ae3f55b
found 1 common ancestor:
151c7d5 file1
Merge made by the 'recursive' strategy.
file3 | 1 +
1 file changed, 1 insertion(+)
create mode 100644 file3
ok 13 - pulling changes from origin
expecting success:
test_objcount C 2
ok 14 - that alternate to origin gets used
expecting success:
git -C D pull origin
From file:///<<PKGBUILDDIR>>/t/trash directory.t5604-clone-reference/A
151c7d5..00bb2fc master -> origin/master
Merging:
f26b11a file2
virtual 00bb2fc7e2ab649eb513e94a6d4408734ae3f55b
found 1 common ancestor:
151c7d5 file1
Merge made by the 'recursive' strategy.
file3 | 1 +
1 file changed, 1 insertion(+)
create mode 100644 file3
ok 15 - pulling changes from origin
expecting success:
test_objcount D 5
ok 16 - check objects expected to exist locally
expecting success:
test_create_repo F &&
commit_in F file1
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5604-clone-reference/F/.git/
[master (root-commit) 1fa4576] file1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1
ok 17 - preparing alternate repository #1
expecting success:
git clone F G &&
commit_in F file2
Cloning into 'G'...
done.
[master 975a302] file2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
ok 18 - cloning alternate repo #2 and adding changes to repo #1
expecting success:
git clone --reference G F H
Cloning into 'H'...
done.
ok 19 - cloning alternate repo #1, using #2 as reference
expecting success:
git clone -l -s --reference A B E
Cloning into 'E'...
done.
ok 20 - cloning with reference being subset of source (-l -s)
expecting success:
git clone -s --reference B --reference A --reference B A dups &&
test_line_count = 2 dups/.git/objects/info/alternates
Cloning into 'dups'...
done.
ok 21 - cloning with multiple references drops duplicates
expecting success:
(
cd A && git tag -a -m tagged HEAD
) &&
git clone --reference=A A I
Cloning into 'I'...
done.
ok 22 - clone with reference from a tagged repository
expecting success:
git clone A J &&
(
cd J &&
git checkout -b other master^ &&
echo other >otherfile &&
git add otherfile &&
git commit -m other &&
git checkout master
)
Cloning into 'J'...
done.
Switched to a new branch 'other'
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
warning: refname 'HEAD' is ambiguous.
[other 4882636] other
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 otherfile
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
ok 23 - prepare branched repository
expecting success:
git init K &&
echo "$base_dir/A/.git/objects" >K/.git/objects/info/alternates &&
(
cd K &&
git remote add J "file://$base_dir/J" &&
GIT_TRACE_PACKET=$U.K git fetch J
) &&
master_object=$(cd A && git for-each-ref --format="%(objectname)" refs/heads/master) &&
test -s "$U.K" &&
! grep " want $master_object" "$U.K" &&
tag_object=$(cd A && git for-each-ref --format="%(objectname)" refs/tags/HEAD) &&
! grep " want $tag_object" "$U.K"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5604-clone-reference/K/.git/
From file:///<<PKGBUILDDIR>>/t/trash directory.t5604-clone-reference/J
* [new branch] master -> J/master
* [new branch] other -> J/other
* [new tag] HEAD -> HEAD
ok 24 - fetch with incomplete alternates
expecting success:
git clone --separate-git-dir=L A M &&
git clone --reference=M A N &&
echo "$base_dir/L/objects" >expected &&
test_cmp expected "$base_dir/N/.git/objects/info/alternates"
Cloning into 'M'...
done.
Cloning into 'N'...
done.
ok 25 - clone using repo with gitfile as a reference
expecting success:
git clone --reference=M/.git A O &&
echo "$base_dir/L/objects" >expected &&
test_cmp expected "$base_dir/O/.git/objects/info/alternates"
Cloning into 'O'...
done.
ok 26 - clone using repo pointed at by gitfile as reference
expecting success:
git init P &&
(
cd P && test_commit one
) &&
git clone P Q &&
(
cd Q && test_commit two
) &&
git clone --no-local --reference=P Q R &&
git clone --no-local --reference=P --dissociate Q S &&
# removing the reference P would corrupt R but not S
rm -fr P &&
test_must_fail git -C R fsck &&
git -C S fsck
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5604-clone-reference/P/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Cloning into 'Q'...
done.
[master 51ba0d2] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
Cloning into 'R'...
Cloning into 'S'...
error: object directory /<<PKGBUILDDIR>>/t/trash directory.t5604-clone-reference/P/.git/objects does not exist; check .git/objects/info/alternates
error: refs/tags/one: invalid sha1 pointer d79ce1670bdcb76e6d1da2ae095e890ccb326ae9
broken link from commit 51ba0d2036f9bf23b2826a3b2dcc450c417a1bc5
to commit d79ce1670bdcb76e6d1da2ae095e890ccb326ae9
missing blob 5626abf0f72e58d7a153368ba57db4c673c0e171
missing commit d79ce1670bdcb76e6d1da2ae095e890ccb326ae9
ok 27 - clone and dissociate from reference
expecting success:
rm -fr P Q R &&
git init P &&
(
cd P &&
test_commit one &&
git repack &&
test_commit two &&
git repack
) &&
git clone --bare P Q &&
(
cd P &&
git checkout -b second &&
test_commit three &&
git repack
) &&
git clone --bare --dissociate --reference=P Q R &&
ls R/objects/pack/*.pack >packs.txt &&
test_line_count = 1 packs.txt
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5604-clone-reference/P/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
Cloning into bare repository 'Q'...
done.
Switched to a new branch 'second'
[second 916c3f9] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
Cloning into bare repository 'R'...
done.
ok 28 - clone, dissociate from partial reference and repack
expecting success:
rm -fr A B C &&
test_create_repo A &&
commit_in A file1 &&
git clone --reference=A A B &&
test_line_count = 1 B/.git/objects/info/alternates &&
git clone --local --dissociate B C &&
! test -f C/.git/objects/info/alternates &&
( cd C && git fsck )
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5604-clone-reference/A/.git/
[master (root-commit) eb2df8a] file1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1
Cloning into 'B'...
done.
Cloning into 'C'...
done.
ok 29 - clone, dissociate from alternates
expecting success:
git init S &&
(
cd S &&
test_commit A &&
cd .git/objects &&
>.some-hidden-file &&
>some-file &&
mkdir .some-hidden-dir &&
>.some-hidden-dir/some-file &&
>.some-hidden-dir/.some-dot-file &&
mkdir some-dir &&
>some-dir/some-file &&
>some-dir/.some-dot-file
)
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5604-clone-reference/S/.git/
[master 09b350a] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
ok 30 - setup repo with garbage in objects/*
expecting success:
for option in --local --no-hardlinks --shared --dissociate
do
git clone $option S S$option || return 1 &&
git -C S$option fsck || return 1
done &&
find S-* -name "*some*" | sort >actual &&
cat >expected <<-EOF &&
S--dissociate/.git/objects/.some-hidden-dir
S--dissociate/.git/objects/.some-hidden-dir/.some-dot-file
S--dissociate/.git/objects/.some-hidden-dir/some-file
S--dissociate/.git/objects/.some-hidden-file
S--dissociate/.git/objects/some-dir
S--dissociate/.git/objects/some-dir/.some-dot-file
S--dissociate/.git/objects/some-dir/some-file
S--dissociate/.git/objects/some-file
S--local/.git/objects/.some-hidden-dir
S--local/.git/objects/.some-hidden-dir/.some-dot-file
S--local/.git/objects/.some-hidden-dir/some-file
S--local/.git/objects/.some-hidden-file
S--local/.git/objects/some-dir
S--local/.git/objects/some-dir/.some-dot-file
S--local/.git/objects/some-dir/some-file
S--local/.git/objects/some-file
S--no-hardlinks/.git/objects/.some-hidden-dir
S--no-hardlinks/.git/objects/.some-hidden-dir/.some-dot-file
S--no-hardlinks/.git/objects/.some-hidden-dir/some-file
S--no-hardlinks/.git/objects/.some-hidden-file
S--no-hardlinks/.git/objects/some-dir
S--no-hardlinks/.git/objects/some-dir/.some-dot-file
S--no-hardlinks/.git/objects/some-dir/some-file
S--no-hardlinks/.git/objects/some-file
EOF
test_cmp expected actual
Cloning into 'S--local'...
done.
Cloning into 'S--no-hardlinks'...
done.
Cloning into 'S--shared'...
done.
Cloning into 'S--dissociate'...
done.
ok 31 - clone a repo with garbage in objects/*
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 init T &&
(
cd T &&
git config gc.auto 0 &&
test_commit A &&
git gc &&
test_commit B &&
cd .git/objects &&
mv pack packs &&
ln -s packs pack &&
find ?? -type d >loose-dirs &&
last_loose=$(tail -n 1 loose-dirs) &&
mv $last_loose a-loose-dir &&
ln -s a-loose-dir $last_loose &&
first_loose=$(head -n 1 loose-dirs) &&
rm -f loose-dirs &&
cd $first_loose &&
obj=$(ls *) &&
mv $obj ../an-object &&
ln -s ../an-object $obj &&
cd ../ &&
find . -type f | sort >../../../T.objects-files.raw &&
find . -type l | sort >../../../T.objects-symlinks.raw &&
echo unknown_content >unknown_file
) &&
git -C T fsck &&
git -C T rev-list --all --objects >T.objects
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5604-clone-reference/T/.git/
[master (root-commit) 0ddfaf1] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
[master d9df450] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B.t
ok 32 - setup repo with manually symlinked or unknown files at objects/
expecting success:
for option in --local --no-hardlinks --shared --dissociate
do
git clone $option T T$option || return 1 &&
git -C T$option fsck || return 1 &&
git -C T$option rev-list --all --objects >T$option.objects &&
test_cmp T.objects T$option.objects &&
(
cd T$option/.git/objects &&
find . -type f | sort >../../../T$option.objects-files.raw &&
find . -type l | sort >../../../T$option.objects-symlinks.raw
)
done &&
for raw in $(ls T*.raw)
do
sed -e "s!/../!/Y/!; s![0-9a-f]\{38,\}!Z!" -e "/commit-graph/d" \
-e "/multi-pack-index/d" <$raw >$raw.de-sha || return 1
done &&
cat >expected-files <<-EOF &&
./Y/Z
./Y/Z
./a-loose-dir/Z
./an-object
./Y/Z
./info/packs
./pack/pack-Z.idx
./pack/pack-Z.pack
./packs/pack-Z.idx
./packs/pack-Z.pack
./unknown_file
EOF
for option in --local --no-hardlinks --dissociate
do
test_cmp expected-files T$option.objects-files.raw.de-sha || return 1 &&
test_must_be_empty T$option.objects-symlinks.raw.de-sha || return 1
done &&
echo ./info/alternates >expected-files &&
test_cmp expected-files T--shared.objects-files.raw &&
test_must_be_empty T--shared.objects-symlinks.raw
Cloning into 'T--local'...
done.
Cloning into 'T--no-hardlinks'...
done.
Cloning into 'T--shared'...
done.
Cloning into 'T--dissociate'...
done.
ok 33 - clone repo with symlinked or unknown files at objects/
# passed all 33 test(s)
1..33
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5607-clone-bundle.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5607-clone-bundle/.git/
expecting success:
test_commit initial &&
test_tick &&
git tag -m tag tag &&
test_commit second &&
test_commit third &&
git tag -d initial &&
git tag -d second &&
git tag -d third
[master (root-commit) 24b24cf] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
[master 21f74a9] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 second.t
[master d31729a] third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 third.t
Deleted tag 'initial' (was 24b24cf)
Deleted tag 'second' (was 21f74a9)
Deleted tag 'third' (was d31729a)
ok 1 - setup
expecting success:
git bundle create tip.bundle -1 master &&
test_must_fail nongit git bundle verify ../tip.bundle 2>err &&
test_i18ngrep "need a repository" err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: need a repository to verify a bundle
ok 2 - "verify" needs a worktree
expecting success:
git bundle create bundle --all --since=7.Apr.2005.15:14:00.-0700 &&
git ls-remote bundle > output &&
grep tag output &&
git bundle create bundle --all --since=7.Apr.2005.15:16:00.-0700 &&
git ls-remote bundle > output &&
! grep tag output
e01ff0465079785b971390644b3ef4ec3a910f75 refs/tags/tag
ok 3 - annotated tags can be excluded by rev-list options
expecting success:
mkdir adir &&
test_must_fail git bundle create adir --all
fatal: cannot create 'adir': Is a directory
ok 4 - die if bundle file cannot be created
checking known breakage:
echo master | git bundle create stdin-bundle.bdl --stdin &&
git ls-remote stdin-bundle.bdl >output &&
grep master output
fatal: Refusing to create empty bundle.
not ok 5 - bundle --stdin # TODO known breakage
checking known breakage:
echo master | git bundle create hybrid-bundle.bdl --stdin tag &&
git ls-remote hybrid-bundle.bdl >output &&
grep master output
not ok 6 - bundle --stdin <rev-list options> # TODO known breakage
expecting success:
: >empty-bundle &&
test_must_fail git fetch empty-bundle
fatal: invalid gitfile format: empty-bundle
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 7 - empty bundle file is rejected
expecting success:
: >file4 &&
test_tick &&
git add file4 &&
printf "%01200d\n" 0 | git commit -F - &&
test_commit fifth &&
git bundle create long-subject-bundle.bdl HEAD^..HEAD &&
git bundle list-heads long-subject-bundle.bdl >heads &&
test -s heads &&
git fetch long-subject-bundle.bdl &&
sed -n "/^-/{p;q;}" long-subject-bundle.bdl >boundary &&
grep "^-[0-9a-f]\\{40\\} " boundary
[master 731e220] 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file4
[master fc029ac] fifth
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fifth.t
From long-subject-bundle.bdl
* branch HEAD -> FETCH_HEAD
-731e22069f935c2baa02a907c08e20d012404511 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
ok 8 - ridiculously long subject in boundary
expecting success:
: >file1 &&
git add file1 &&
test_tick &&
git commit --allow-empty-message -m "" &&
test_commit file2 &&
git bundle create bundle HEAD^.. &&
git bundle verify bundle
[master 1e44ac2]
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file1
[master 3fdaba7] file2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2.t
bundle is okay
The bundle contains this ref:
3fdaba71a8ccb4d44ffe75938a9a115cfea4806a HEAD
The bundle requires this ref:
1e44ac2f9ccb8d3590010e3ee941dc1d4be2e304
ok 9 - prerequisites with an empty commit message
expecting success:
# This fails because the bundle would be empty.
test_must_fail git bundle create fail.bundle master..master &&
test_path_is_missing fail.bundle.lock
fatal: Refusing to create empty bundle.
ok 10 - failed bundle creation does not leave cruft
# still have 2 known breakage(s)
# passed all remaining 8 test(s)
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5601-clone.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5601-clone/.git/
expecting success:
rm -fr .git &&
test_create_repo src &&
(
cd src &&
>file &&
git add file &&
git commit -m initial &&
echo 1 >file &&
git add file &&
git commit -m updated
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5601-clone/src/.git/
[master (root-commit) 11409a3] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
[master a06b69f] updated
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
rm -fr dst &&
test_must_fail git clone -n src dst junk
fatal: Too many arguments.
usage: git clone [<options>] [--] <repo> [<dir>]
-v, --verbose be more verbose
-q, --quiet be more quiet
--progress force progress reporting
-n, --no-checkout don't create a checkout
--bare create a bare repository
--mirror create a mirror repository (implies bare)
-l, --local to clone from a local repository
--no-hardlinks don't use local hardlinks, always copy
-s, --shared setup as shared repository
--recursive ... alias of --recurse-submodules
--recurse-submodules[=<pathspec>]
initialize submodules in the clone
-j, --jobs <n> number of submodules cloned in parallel
--template <template-directory>
directory from which templates will be used
--reference <repo> reference repository
--reference-if-able <repo>
reference repository
--dissociate use --reference only while cloning
-o, --origin <name> use <name> instead of 'origin' to track upstream
-b, --branch <branch>
checkout <branch> instead of the remote's HEAD
-u, --upload-pack <path>
path to git-upload-pack on the remote
--depth <depth> create a shallow clone of that depth
--shallow-since <time>
create a shallow clone since a specific time
--shallow-exclude <revision>
deepen history of shallow clone, excluding rev
--single-branch clone only one branch, HEAD or --branch
--no-tags don't clone any tags, and make later fetches not to follow them
--shallow-submodules any cloned submodules will be shallow
--separate-git-dir <gitdir>
separate git dir from working tree
-c, --config <key=value>
set config inside the new repository
--server-option <server-specific>
option to transmit
-4, --ipv4 use IPv4 addresses only
-6, --ipv6 use IPv6 addresses only
--filter <args> object filtering
--remote-submodules any cloned submodules will use their remote-tracking branch
ok 2 - clone with excess parameters (1)
expecting success:
rm -fr dst &&
test_must_fail git clone -n "file://$(pwd)/src" dst junk
fatal: Too many arguments.
usage: git clone [<options>] [--] <repo> [<dir>]
-v, --verbose be more verbose
-q, --quiet be more quiet
--progress force progress reporting
-n, --no-checkout don't create a checkout
--bare create a bare repository
--mirror create a mirror repository (implies bare)
-l, --local to clone from a local repository
--no-hardlinks don't use local hardlinks, always copy
-s, --shared setup as shared repository
--recursive ... alias of --recurse-submodules
--recurse-submodules[=<pathspec>]
initialize submodules in the clone
-j, --jobs <n> number of submodules cloned in parallel
--template <template-directory>
directory from which templates will be used
--reference <repo> reference repository
--reference-if-able <repo>
reference repository
--dissociate use --reference only while cloning
-o, --origin <name> use <name> instead of 'origin' to track upstream
-b, --branch <branch>
checkout <branch> instead of the remote's HEAD
-u, --upload-pack <path>
path to git-upload-pack on the remote
--depth <depth> create a shallow clone of that depth
--shallow-since <time>
create a shallow clone since a specific time
--shallow-exclude <revision>
deepen history of shallow clone, excluding rev
--single-branch clone only one branch, HEAD or --branch
--no-tags don't clone any tags, and make later fetches not to follow them
--shallow-submodules any cloned submodules will be shallow
--separate-git-dir <gitdir>
separate git dir from working tree
-c, --config <key=value>
set config inside the new repository
--server-option <server-specific>
option to transmit
-4, --ipv4 use IPv4 addresses only
-6, --ipv6 use IPv6 addresses only
--filter <args> object filtering
--remote-submodules any cloned submodules will use their remote-tracking branch
ok 3 - clone with excess parameters (2)
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
expecting success:
rm -fr dst &&
git clone -n "file://$(pwd)/src" dst >output 2>&1 &&
test $(grep Clon output | wc -l) = 1
ok 4 - output from clone
expecting success:
rm -fr dst &&
git clone -n "file://$(pwd)/src" dst &&
! test -f dst/file &&
! (echo dst/.git/objects/pack/pack-* | grep "\.keep")
Cloning into 'dst'...
ok 5 - clone does not keep pack
expecting success:
rm -fr dst &&
git clone src dst &&
test -f dst/file
Cloning into 'dst'...
done.
ok 6 - clone checks out files
expecting success:
GIT_WORK_TREE=worktree git clone src bare &&
test -f bare/config &&
test -f worktree/file
Cloning into 'bare'...
done.
ok 7 - clone respects GIT_WORK_TREE
expecting success:
test_create_repo r0 &&
cd r0 &&
test_commit initial &&
cd .. &&
git init r1 &&
cd r1 &&
cat >.git/hooks/pre-commit <<-\EOF &&
#!/bin/sh
git clone ../r0 ../r2
exit 1
EOF
chmod u+x .git/hooks/pre-commit &&
: >file &&
git add file &&
test_must_fail git commit -m invoke-hook &&
cd .. &&
test_cmp r0/.git/HEAD r2/.git/HEAD &&
test_cmp r0/initial.t r2/initial.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5601-clone/r0/.git/
[master (root-commit) 24b24cf] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5601-clone/r1/.git/
Cloning into '../r2'...
done.
ok 8 - clone from hooks
expecting success:
git clone src long/path/to/dst &&
test -f long/path/to/dst/file
Cloning into 'long/path/to/dst'...
done.
ok 9 - clone creates intermediate directories
expecting success:
git clone --bare src long/path/to/bare/dst &&
test -f long/path/to/bare/dst/config
Cloning into bare repository 'long/path/to/bare/dst'...
done.
ok 10 - clone creates intermediate directories for bare repo
expecting success:
git clone --mirror src mirror &&
test -f mirror/HEAD &&
test ! -f mirror/file &&
FETCH="$(cd mirror && git config remote.origin.fetch)" &&
test "+refs/*:refs/*" = "$FETCH" &&
MIRROR="$(cd mirror && git config --bool remote.origin.mirror)" &&
test "$MIRROR" = true
Cloning into bare repository 'mirror'...
done.
ok 11 - clone --mirror
expecting success:
( cd src && git checkout HEAD^ && git rev-parse HEAD >../expected ) &&
git clone --mirror src mirror.detached &&
( cd src && git checkout - ) &&
GIT_DIR=mirror.detached git rev-parse HEAD >actual &&
test_cmp expected actual
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 11409a3 initial
Cloning into bare repository 'mirror.detached'...
done.
Previous HEAD position was 11409a3 initial
Switched to branch 'master'
ok 12 - clone --mirror with detached HEAD
expecting success:
( cd src && git checkout HEAD^ && git rev-parse HEAD >../expected ) &&
git clone --bare src bare.detached &&
( cd src && git checkout - ) &&
GIT_DIR=bare.detached git rev-parse HEAD >actual &&
test_cmp expected actual
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 11409a3 initial
Cloning into bare repository 'bare.detached'...
done.
Previous HEAD position was 11409a3 initial
Switched to branch 'master'
ok 13 - clone --bare with detached HEAD
expecting success:
git clone --bare src &&
test -d src.git
Cloning into bare repository 'src.git'...
done.
ok 14 - clone --bare names the local repository <name>.git
expecting success:
(cd src &&
git tag some-tag HEAD) &&
git clone --mirror src mirror2 &&
(cd mirror2 &&
git show-ref 2> clone.err > clone.out) &&
! grep Duplicate mirror2/clone.err &&
grep some-tag mirror2/clone.out
Cloning into bare repository 'mirror2'...
done.
a06b69fb6e3bea9adf7d976e9dcf531cc15a65fc refs/tags/some-tag
ok 15 - clone --mirror does not repeat tags
expecting success:
git clone src target-1/ &&
T=$( cd target-1 && git rev-parse HEAD ) &&
S=$( cd src && git rev-parse HEAD ) &&
test "$T" = "$S"
Cloning into 'target-1'...
done.
ok 16 - clone to destination with trailing /
expecting success:
git clone src target-2/// &&
T=$( cd target-2 && git rev-parse HEAD ) &&
S=$( cd src && git rev-parse HEAD ) &&
test "$T" = "$S"
Cloning into 'target-2'...
done.
ok 17 - clone to destination with extra trailing /
expecting success:
mkdir target-3 &&
git clone src target-3 &&
T=$( cd target-3 && git rev-parse HEAD ) &&
S=$( cd src && git rev-parse HEAD ) &&
test "$T" = "$S"
Cloning into 'target-3'...
done.
ok 18 - clone to an existing empty directory
expecting success:
mkdir target-4 &&
>target-4/Fakefile &&
test_must_fail git clone src target-4
fatal: destination path 'target-4' already exists and is not an empty directory.
ok 19 - clone to an existing non-empty directory
expecting success:
>target-5 &&
test_must_fail git clone src target-5
fatal: destination path 'target-5' already exists and is not an empty directory.
ok 20 - clone to an existing path
expecting success:
mkdir src-0 &&
(
cd src-0 && git init
) &&
git clone "file://$(pwd)/src-0" target-6 2>err-6 &&
! grep "fatal:" err-6 &&
(
cd src-0 && test_commit A
) &&
git clone "file://$(pwd)/src-0" target-7 2>err-7 &&
! grep "fatal:" err-7 &&
# There is no reason to insist they are bit-for-bit
# identical, but this test should suffice for now.
test_cmp target-6/.git/config target-7/.git/config
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5601-clone/src-0/.git/
[master (root-commit) 508df12] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
ok 21 - clone a void
expecting success:
(
test_config="$HOME/.gitconfig" &&
git config -f "$test_config" branch.autosetuprebase remote &&
rm -fr dst &&
git clone src dst &&
cd dst &&
actual="z$(git config branch.master.rebase)" &&
test ztrue = $actual
)
Cloning into 'dst'...
done.
ok 22 - clone respects global branch.autosetuprebase
expecting success:
git init x+y &&
git clone "file://$PWD/x+y" xy-url-1 &&
git clone "file://$PWD/x%2By" xy-url-2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5601-clone/x+y/.git/
Cloning into 'xy-url-1'...
warning: You appear to have cloned an empty repository.
Cloning into 'xy-url-2'...
warning: You appear to have cloned an empty repository.
ok 23 - respect url-encoding of file://
expecting success:
rm -rf x+y &&
git init "x y" &&
test_must_fail git clone "file://$PWD/x+y" xy-no-plus
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5601-clone/x y/.git/
Cloning into 'xy-no-plus'...
fatal: '/<<PKGBUILDDIR>>/t/trash directory.t5601-clone/x+y' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 24 - do not query-string-decode + in URLs
expecting success:
git init x+y &&
test_must_fail git clone x%2By xy-regular &&
git clone x+y xy-regular
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5601-clone/x+y/.git/
fatal: repository 'x%2By' does not exist
Cloning into 'xy-regular'...
warning: You appear to have cloned an empty repository.
done.
ok 25 - do not respect url-encoding of non-url path
expecting success:
rm -rf dst &&
git clone --separate-git-dir realgitdir src dst &&
test -d realgitdir/refs
Cloning into 'dst'...
done.
ok 26 - clone separate gitdir
expecting success:
echo "gitdir: $(pwd)/realgitdir" >expected &&
test_cmp expected dst/.git
ok 27 - clone separate gitdir: output
expecting success:
git clone dst/.git dst2
Cloning into 'dst2'...
done.
ok 28 - clone from .git file
expecting success:
(
cd dst2 &&
git fetch ../dst/.git
)
From ../dst/
* branch HEAD -> FETCH_HEAD
ok 29 - fetch from .git gitfile
expecting success:
(
cd dst2 &&
git fetch ../dst
)
From ../dst
* branch HEAD -> FETCH_HEAD
ok 30 - fetch from gitfile parent
expecting success:
rm -rf dst &&
test_must_fail git clone --separate-git-dir realgitdir src dst
Cloning into 'dst'...
fatal: realgitdir already exists
ok 31 - clone separate gitdir where target already exists
expecting success:
git clone --shared --bare src src-1 &&
git clone --bare src src-2 &&
git clone --reference=src-2 --bare src-1 target-8 &&
grep /src-2/ target-8/objects/info/alternates
Cloning into bare repository 'src-1'...
done.
Cloning into bare repository 'src-2'...
done.
Cloning into bare repository 'target-8'...
done.
/<<PKGBUILDDIR>>/t/trash directory.t5601-clone/src-2/objects
ok 32 - clone --reference from original
expecting success:
git clone --bare src src-3 &&
git clone --bare src src-4 &&
git clone --reference=src-3 --reference=src-4 src target-9 &&
grep /src-3/ target-9/.git/objects/info/alternates &&
grep /src-4/ target-9/.git/objects/info/alternates
Cloning into bare repository 'src-3'...
done.
Cloning into bare repository 'src-4'...
done.
Cloning into 'target-9'...
done.
/<<PKGBUILDDIR>>/t/trash directory.t5601-clone/src-3/objects
/<<PKGBUILDDIR>>/t/trash directory.t5601-clone/src-4/objects
ok 33 - clone with more than one --reference
expecting success:
mkdir nest &&
git clone --bare src nest/src-5 &&
echo ../../../src/.git/objects >nest/src-5/objects/info/alternates &&
git clone --bare nest/src-5 target-10 &&
grep /src/\\.git/objects target-10/objects/info/alternates
Cloning into bare repository 'nest/src-5'...
done.
Cloning into bare repository 'target-10'...
done.
/<<PKGBUILDDIR>>/t/trash directory.t5601-clone/src/.git/objects
ok 34 - clone from original with relative alternate
expecting success:
git clone --branch=some-tag src dst.tag &&
GIT_DIR=src/.git git rev-parse some-tag >expected &&
test_cmp expected dst.tag/.git/HEAD &&
GIT_DIR=dst.tag/.git git config remote.origin.fetch >fetch.actual &&
echo "+refs/heads/*:refs/remotes/origin/*" >fetch.expected &&
test_cmp fetch.expected fetch.actual
Cloning into 'dst.tag'...
done.
Note: switching to 'a06b69fb6e3bea9adf7d976e9dcf531cc15a65fc'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
ok 35 - clone checking out a tag
expecting success:
cp "$GIT_BUILD_DIR/t/helper/test-fake-ssh$X" \
"$TRASH_DIRECTORY/ssh$X" &&
GIT_SSH="$TRASH_DIRECTORY/ssh$X" &&
export GIT_SSH &&
export TRASH_DIRECTORY &&
>"$TRASH_DIRECTORY"/ssh-output
ok 36 - set up ssh wrapper
expecting success:
GIT_TEST_PROTOCOL_VERSION=0 git clone myhost:src ssh-clone &&
expect_ssh myhost src
Cloning into 'ssh-clone'...
ok 37 - clone myhost:src uses ssh
expecting success:
cp -R src "foo:bar" &&
git clone "foo:bar" foobar &&
expect_ssh none
Cloning into 'foobar'...
done.
ok 38 - clone local path foo:bar
expecting success:
GIT_TEST_PROTOCOL_VERSION=0 git clone "[myhost:123]:src" ssh-bracket-clone &&
expect_ssh "-p 123" myhost src
Cloning into 'ssh-bracket-clone'...
ok 39 - bracketed hostnames are still ssh
expecting success:
GIT_TEST_PROTOCOL_VERSION=0 git clone -4 "[myhost:123]:src" ssh-ipv4-clone &&
expect_ssh "-4 -p 123" myhost src
Cloning into 'ssh-ipv4-clone'...
ok 40 - OpenSSH variant passes -4
expecting success:
copy_ssh_wrapper_as "$TRASH_DIRECTORY/putty" &&
git -c ssh.variant=putty clone -4 "[myhost:123]:src" ssh-putty-clone &&
expect_ssh "-4 -P 123" myhost src
Cloning into 'ssh-putty-clone'...
ok 41 - variant can be overridden
expecting success:
copy_ssh_wrapper_as "$TRASH_DIRECTORY/plink" &&
git -c ssh.variant=auto clone -4 "[myhost:123]:src" ssh-auto-clone &&
expect_ssh "-4 -P 123" myhost src
Cloning into 'ssh-auto-clone'...
ok 42 - variant=auto picks based on basename
expecting success:
copy_ssh_wrapper_as "$TRASH_DIRECTORY/simple" &&
test_must_fail git clone -4 "myhost:src" ssh-4-clone-simple
Cloning into 'ssh-4-clone-simple'...
fatal: ssh variant 'simple' does not support -4
ok 43 - simple does not support -4/-6
expecting success:
copy_ssh_wrapper_as "$TRASH_DIRECTORY/simple" &&
test_must_fail git clone "[myhost:123]:src" ssh-bracket-clone-simple
Cloning into 'ssh-bracket-clone-simple'...
fatal: ssh variant 'simple' does not support setting port
ok 44 - simple does not support port
expecting success:
copy_ssh_wrapper_as "$TRASH_DIRECTORY/uplink" &&
test_must_fail git clone "[myhost:123]:src" ssh-bracket-clone-uplink &&
git clone "myhost:src" ssh-clone-uplink &&
expect_ssh myhost src
Cloning into 'ssh-bracket-clone-uplink'...
fatal: ssh variant 'simple' does not support setting port
Cloning into 'ssh-clone-uplink'...
ok 45 - uplink is treated as simple
expecting success:
write_script "$TRASH_DIRECTORY/uplink" <<-EOF &&
if test "\$1" = "-G"
then
exit 0
fi &&
exec "\$TRASH_DIRECTORY/ssh$X" "\$@"
EOF
test_when_finished "rm -f \"\$TRASH_DIRECTORY/uplink\"" &&
GIT_SSH="$TRASH_DIRECTORY/uplink" &&
test_when_finished "GIT_SSH=\"\$TRASH_DIRECTORY/ssh\$X\"" &&
GIT_TEST_PROTOCOL_VERSION=0 git clone "[myhost:123]:src" ssh-bracket-clone-sshlike-uplink &&
expect_ssh "-p 123" myhost src
Cloning into 'ssh-bracket-clone-sshlike-uplink'...
ok 46 - OpenSSH-like uplink is treated as ssh
expecting success:
copy_ssh_wrapper_as "$TRASH_DIRECTORY/plink" &&
git clone "[myhost:123]:src" ssh-bracket-clone-plink-0 &&
expect_ssh "-P 123" myhost src
Cloning into 'ssh-bracket-clone-plink-0'...
ok 47 - plink is treated specially (as putty)
expecting success:
copy_ssh_wrapper_as "$TRASH_DIRECTORY/plink.exe" &&
git clone "[myhost:123]:src" ssh-bracket-clone-plink-1 &&
expect_ssh "-P 123" myhost src
Cloning into 'ssh-bracket-clone-plink-1'...
ok 48 - plink.exe is treated specially (as putty)
expecting success:
copy_ssh_wrapper_as "$TRASH_DIRECTORY/tortoiseplink" &&
git clone "[myhost:123]:src" ssh-bracket-clone-plink-2 &&
expect_ssh "-batch -P 123" myhost src
Cloning into 'ssh-bracket-clone-plink-2'...
ok 49 - tortoiseplink is like putty, with extra arguments
expecting success:
copy_ssh_wrapper_as "$TRASH_DIRECTORY/plink.exe" &&
GIT_SSH_COMMAND="\"$TRASH_DIRECTORY/plink.exe\" -v" \
git clone "[myhost:123]:src" ssh-bracket-clone-plink-3 &&
expect_ssh "-v -P 123" myhost src
Cloning into 'ssh-bracket-clone-plink-3'...
ok 50 - double quoted plink.exe in GIT_SSH_COMMAND
expecting success:
copy_ssh_wrapper_as "$TRASH_DIRECTORY/plink.exe" &&
GIT_SSH_COMMAND="$SQ$TRASH_DIRECTORY/plink.exe$SQ -v" \
git clone "[myhost:123]:src" ssh-bracket-clone-plink-4 &&
expect_ssh "-v -P 123" myhost src
Cloning into 'ssh-bracket-clone-plink-4'...
ok 51 - single quoted plink.exe in GIT_SSH_COMMAND
expecting success:
copy_ssh_wrapper_as "$TRASH_DIRECTORY/plink" &&
GIT_TEST_PROTOCOL_VERSION=0 GIT_SSH_VARIANT=ssh \
git clone "[myhost:123]:src" ssh-bracket-clone-variant-1 &&
expect_ssh "-p 123" myhost src
Cloning into 'ssh-bracket-clone-variant-1'...
ok 52 - GIT_SSH_VARIANT overrides plink detection
expecting success:
copy_ssh_wrapper_as "$TRASH_DIRECTORY/plink" &&
GIT_TEST_PROTOCOL_VERSION=0 git -c ssh.variant=ssh \
clone "[myhost:123]:src" ssh-bracket-clone-variant-2 &&
expect_ssh "-p 123" myhost src
Cloning into 'ssh-bracket-clone-variant-2'...
ok 53 - ssh.variant overrides plink detection
expecting success:
copy_ssh_wrapper_as "$TRASH_DIRECTORY/plink" &&
GIT_SSH_VARIANT=plink \
git clone "[myhost:123]:src" ssh-bracket-clone-variant-3 &&
expect_ssh "-P 123" myhost src
Cloning into 'ssh-bracket-clone-variant-3'...
ok 54 - GIT_SSH_VARIANT overrides plink detection to plink
expecting success:
copy_ssh_wrapper_as "$TRASH_DIRECTORY/plink" &&
GIT_SSH_VARIANT=tortoiseplink \
git clone "[myhost:123]:src" ssh-bracket-clone-variant-4 &&
expect_ssh "-batch -P 123" myhost src
Cloning into 'ssh-bracket-clone-variant-4'...
ok 55 - GIT_SSH_VARIANT overrides plink to tortoiseplink
expecting success:
test_must_fail \
env GIT_SSH_COMMAND="${SQ}plink.exe -v" \
git clone "[myhost:123]:src" sq-failure
Cloning into 'sq-failure'...
fatal: ssh variant 'simple' does not support setting port
ok 56 - clean failure on broken quoting
expecting success:
test_clone_url c:temp c temp
Cloning into 'tmp1'...
fatal: 'temp' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 57 - clone c:temp is ssl
skipping test: clone c:temp is dos drive
test_clone_url c:temp none
ok 58 # skip clone c:temp is dos drive (missing MINGW)
expecting success:
test_clone_url host:$repo host $repo
Cloning into 'tmp2'...
fatal: 'rep' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 59 - clone host:rep
expecting success:
test_clone_url host:$repo host $repo
Cloning into 'tmp3'...
fatal: 'rep/home/project' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 60 - clone host:rep/home/project
expecting success:
test_clone_url host:$repo host $repo
Cloning into 'tmp4'...
fatal: '123' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 61 - clone host:123
expecting success:
test_clone_url [::1]:$repo ::1 "$repo"
Cloning into 'tmp5'...
fatal: 'rep' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 62 - clone [::1]:rep
expecting success:
test_clone_url [::1]:$repo ::1 "$repo"
Cloning into 'tmp6'...
fatal: 'rep/home/project' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 63 - clone [::1]:rep/home/project
expecting success:
test_clone_url [::1]:$repo ::1 "$repo"
Cloning into 'tmp7'...
fatal: '123' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 64 - clone [::1]:123
expecting success:
test_clone_url host:/~repo host "~repo"
Cloning into 'tmp8'...
fatal: '~repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 65 - clone host:/~repo
expecting success:
test_clone_url [::1]:/~repo ::1 "~repo"
Cloning into 'tmp9'...
fatal: '~repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 66 - clone [::1]:/~repo
expecting success:
test_clone_url $url none
Cloning into 'tmp10'...
fatal: 'foo/bar:baz' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 67 - clone foo/bar:baz is not ssh
expecting success:
test_clone_url $url none
Cloning into 'tmp11'...
fatal: ']bar/baz:qux' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 68 - clone [foo]bar/baz:qux is not ssh
expecting success:
test_clone_url $url none
Cloning into 'tmp12'...
fatal: ']:baz' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 69 - clone [foo/bar]:baz is not ssh
expecting success:
test_clone_url "ssh://host.xz$tcol/home/user/repo" host.xz /home/user/repo
Cloning into 'tmp13'...
fatal: '/home/user/repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 70 - clone ssh://host.xz/home/user/repo
expecting success:
test_clone_url "ssh://host.xz$tcol/~repo" host.xz "~repo"
Cloning into 'tmp14'...
fatal: '~repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 71 - clone ssh://host.xz/~repo
expecting success:
test_clone_url "ssh://host.xz$tcol/home/user/repo" host.xz /home/user/repo
Cloning into 'tmp15'...
fatal: '/home/user/repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 72 - clone ssh://host.xz:/home/user/repo
expecting success:
test_clone_url "ssh://host.xz$tcol/~repo" host.xz "~repo"
Cloning into 'tmp16'...
fatal: '~repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 73 - clone ssh://host.xz:/~repo
expecting success:
test_clone_url "ssh://host.xz:22/home/user/repo" "-p 22 host.xz" "/home/user/repo"
Cloning into 'tmp17'...
fatal: '/home/user/repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 74 - clone ssh://host.xz:22/home/user/repo
expecting success:
test_clone_url "ssh://host.xz:22/~repo" "-p 22 host.xz" "~repo"
Cloning into 'tmp18'...
fatal: '~repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 75 - clone ssh://host.xz:22/~repo
expecting success:
test_clone_url ssh://::1/home/user/repo ::1 /home/user/repo
Cloning into 'tmp19'...
fatal: '/home/user/repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 76 - clone ssh://::1/home/user/repo
expecting success:
test_clone_url ssh://[::1]/home/user/repo ::1 /home/user/repo
Cloning into 'tmp20'...
fatal: '/home/user/repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 77 - clone ssh://[::1]/home/user/repo
expecting success:
test_clone_url ssh://[::1]:/home/user/repo ::1 /home/user/repo
Cloning into 'tmp21'...
fatal: '/home/user/repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 78 - clone ssh://[::1]:/home/user/repo
expecting success:
test_clone_url ssh://user@::1/home/user/repo user@::1 /home/user/repo
Cloning into 'tmp22'...
fatal: '/home/user/repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 79 - clone ssh://user@::1/home/user/repo
expecting success:
test_clone_url ssh://user@[::1]/home/user/repo user@::1 /home/user/repo
Cloning into 'tmp23'...
fatal: '/home/user/repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 80 - clone ssh://user@[::1]/home/user/repo
expecting success:
test_clone_url ssh://user@[::1]:/home/user/repo user@::1 /home/user/repo
Cloning into 'tmp24'...
fatal: '/home/user/repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 81 - clone ssh://user@[::1]:/home/user/repo
expecting success:
test_clone_url ssh://[user@::1]/home/user/repo user@::1 /home/user/repo
Cloning into 'tmp25'...
fatal: '/home/user/repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 82 - clone ssh://[user@::1]/home/user/repo
expecting success:
test_clone_url ssh://[user@::1]:/home/user/repo user@::1 /home/user/repo
Cloning into 'tmp26'...
fatal: '/home/user/repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 83 - clone ssh://[user@::1]:/home/user/repo
expecting success:
test_clone_url ssh://::1/~repo ::1 '~repo'
Cloning into 'tmp27'...
fatal: '~repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 84 - clone ssh://::1/~repo
expecting success:
test_clone_url ssh://[::1]/~repo ::1 '~repo'
Cloning into 'tmp28'...
fatal: '~repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 85 - clone ssh://[::1]/~repo
expecting success:
test_clone_url ssh://user@::1/~repo user@::1 '~repo'
Cloning into 'tmp29'...
fatal: '~repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 86 - clone ssh://user@::1/~repo
expecting success:
test_clone_url ssh://user@[::1]/~repo user@::1 '~repo'
Cloning into 'tmp30'...
fatal: '~repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 87 - clone ssh://user@[::1]/~repo
expecting success:
test_clone_url ssh://[user@::1]/~repo user@::1 '~repo'
Cloning into 'tmp31'...
fatal: '~repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 88 - clone ssh://[user@::1]/~repo
expecting success:
test_clone_url ssh://[::1]:22/home/user/repo '-p 22' ::1 /home/user/repo
Cloning into 'tmp32'...
fatal: '/home/user/repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 89 - clone ssh://[::1]:22/home/user/repo
expecting success:
test_clone_url ssh://user@[::1]:22/home/user/repo '-p 22' user@::1 /home/user/repo
Cloning into 'tmp33'...
fatal: '/home/user/repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 90 - clone ssh://user@[::1]:22/home/user/repo
expecting success:
test_clone_url ssh://[user@::1]:22/home/user/repo '-p 22' user@::1 /home/user/repo
Cloning into 'tmp34'...
fatal: '/home/user/repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 91 - clone ssh://[user@::1]:22/home/user/repo
expecting success:
test_clone_url ssh://[::1]:22/~repo '-p 22' ::1 '~repo'
Cloning into 'tmp35'...
fatal: '~repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 92 - clone ssh://[::1]:22/~repo
expecting success:
test_clone_url ssh://user@[::1]:22/~repo '-p 22' user@::1 '~repo'
Cloning into 'tmp36'...
fatal: '~repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 93 - clone ssh://user@[::1]:22/~repo
expecting success:
test_clone_url ssh://[user@::1]:22/~repo '-p 22' user@::1 '~repo'
Cloning into 'tmp37'...
fatal: '~repo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 94 - clone ssh://[user@::1]:22/~repo
expecting success:
(
cd src &&
git checkout -b another master
) &&
git clone src target-11 &&
test "z$( cd target-11 && git symbolic-ref HEAD )" = zrefs/heads/another
Switched to a new branch 'another'
Cloning into 'target-11'...
done.
ok 95 - clone from a repository with two identical branches
expecting success:
git clone --depth=1 --no-local src ssrrcc &&
git clone ssrrcc ddsstt &&
test_cmp ssrrcc/.git/shallow ddsstt/.git/shallow &&
( cd ddsstt && git fsck )
Cloning into 'ssrrcc'...
Cloning into 'ddsstt'...
ok 96 - shallow clone locally
expecting success:
rm -rf dst.git &&
GIT_TRACE_PACKFILE=$PWD/tmp.pack git clone --no-local --bare src dst.git &&
git init --bare replay.git &&
git -C replay.git index-pack -v --stdin <tmp.pack
Cloning into bare repository 'dst.git'...
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5601-clone/replay.git/
Receiving objects: 16% (1/6)
Receiving objects: 33% (2/6)
Receiving objects: 50% (3/6)
Receiving objects: 66% (4/6)
Receiving objects: 83% (5/6)
Receiving objects: 100% (6/6)
Receiving objects: 100% (6/6), done.
pack b4d21afd7a876111c9cc4f6c830144a4478956a9
ok 97 - GIT_TRACE_PACKFILE produces a usable pack
expecting success:
git init icasefs &&
(
cd icasefs &&
o=$(git hash-object -w --stdin </dev/null | hex2oct) &&
t=$(printf "100644 X\0${o}100644 x\0${o}" |
git hash-object -w -t tree --stdin) &&
c=$(git commit-tree -m bogus $t) &&
git update-ref refs/heads/bogus $c &&
git clone -b bogus . bogus 2>warning
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5601-clone/icasefs/.git/
ok 98 - clone on case-insensitive fs
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
)
prerequisite CASE_INSENSITIVE_FS not satisfied
skipping test: colliding file detection
grep X icasefs/warning &&
grep x icasefs/warning &&
test_i18ngrep "the following paths have collided" icasefs/warning
ok 99 # skip colliding file detection (missing CASE_INSENSITIVE_FS)
expecting success:
partial_clone server "file://$(pwd)/server"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5601-clone/server/.git/
[master (root-commit) b838542] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Removing one.t
[master f942c40] Revert "one"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 1 deletion(-)
delete mode 100644 one.t
[master 5c0c643] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
Cloning into 'client'...
fatal: 'not a remote' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ok 100 - partial clone
expecting success:
partial_clone_server server &&
git clone -o blah --filter=blob:limit=0 "file://$(pwd)/server" client
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5601-clone/server/.git/
[master (root-commit) af0b45c] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Removing one.t
[master 9d84c42] Revert "one"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 deletion(-)
delete mode 100644 one.t
[master 3b7317f] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
Cloning into 'client'...
ok 101 - partial clone with -o
expecting success:
rm -rf server client &&
test_create_repo server &&
test_commit -C server one &&
git clone --filter=blob:limit=0 "file://$(pwd)/server" client 2> err &&
test_i18ngrep "filtering not recognized by server" err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5601-clone/server/.git/
[master (root-commit) 26cc6ba] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
warning: filtering not recognized by server, ignoring
ok 102 - partial clone: warn if server does not support object filtering
expecting success:
rm -rf server client &&
test_create_repo server &&
echo a >server/a &&
echo b >server/b &&
git -C server add a b &&
git -C server commit -m x &&
echo aa >server/a &&
echo bb >server/b &&
git -C server add a b &&
git -C server commit -m x &&
test_config -C server uploadpack.allowfilter 1 &&
test_config -C server uploadpack.allowanysha1inwant 1 &&
git clone --filter=blob:limit=0 "file://$(pwd)/server" client &&
# Ensure that there is only one negotiation by checking that there is
# only "done" line sent. ("done" marks the end of negotiation.)
GIT_TRACE_PACKET="$(pwd)/trace" git -C client checkout HEAD^ &&
grep "git> done" trace >done_lines &&
test_line_count = 1 done_lines
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5601-clone/server/.git/
[master (root-commit) 557ab0a] x
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 a
create mode 100644 b
[master 2ce4f1c] x
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
Cloning into 'client'...
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 557ab0a x
ok 103 - batch missing blob request during checkout
expecting success:
rm -rf server client &&
test_create_repo repo_for_submodule &&
test_commit -C repo_for_submodule x &&
test_create_repo server &&
echo a >server/a &&
echo b >server/b &&
git -C server add a b &&
git -C server commit -m x &&
echo aa >server/a &&
echo bb >server/b &&
# Also add a gitlink pointing to an arbitrary repository
git -C server submodule add "$(pwd)/repo_for_submodule" c &&
git -C server add a b c &&
git -C server commit -m x &&
test_config -C server uploadpack.allowfilter 1 &&
test_config -C server uploadpack.allowanysha1inwant 1 &&
# Make sure that it succeeds
git clone --filter=blob:limit=0 "file://$(pwd)/server" client
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5601-clone/repo_for_submodule/.git/
[master (root-commit) d9e7118] x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 x.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5601-clone/server/.git/
[master (root-commit) a996202] x
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 a
create mode 100644 b
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5601-clone/server/c'...
done.
[master 5ab0e57] x
Author: A U Thor <author@example.com>
4 files changed, 6 insertions(+), 2 deletions(-)
create mode 100644 .gitmodules
create mode 160000 c
Cloning into 'client'...
ok 104 - batch missing blob request does not inadvertently try to fetch gitlinks
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
# passed all 104 test(s)
# SKIP no web server found at '/usr/sbin/apache2'
1..104
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5608-clone-2gb.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5608-clone-2gb/.git/
Skipping expensive 2GB clone test; enable it with GIT_TEST_CLONE_2GB=t
skipping test: setup
git config pack.compression 0 &&
git config pack.depth 0 &&
blobsize=$((100*1024*1024)) &&
blobcount=$((2*1024*1024*1024/$blobsize+1)) &&
i=1 &&
(while test $i -le $blobcount
do
printf "Generating blob $i/$blobcount\r" >&2 &&
printf "blob\nmark :$i\ndata $blobsize\n" &&
#test-tool genrandom $i $blobsize &&
printf "%-${blobsize}s" $i &&
echo "M 100644 :$i $i" >> commit &&
i=$(($i+1)) ||
echo $? > exit-status
done &&
echo "commit refs/heads/master" &&
echo "author A U Thor <author@email.com> 123456789 +0000" &&
echo "committer C O Mitter <committer@email.com> 123456789 +0000" &&
echo "data 5" &&
echo ">2gb" &&
cat commit) |
git fast-import --big-file-threshold=2 &&
test ! -f exit-status
ok 1 # skip setup (missing CLONE_2GB)
skipping test: clone - bare
git clone --bare --no-hardlinks . clone-bare
ok 2 # skip clone - bare (missing CLONE_2GB)
skipping test: clone - with worktree, file:// protocol
git clone "file://$(pwd)" clone-wt
ok 3 # skip clone - with worktree, file:// protocol (missing CLONE_2GB)
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5609-clone-branch.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5609-clone-branch/.git/
expecting success:
mkdir parent &&
(cd parent && git init &&
echo one >file && git add file && git commit -m one &&
git checkout -b two &&
echo two >file && git add file && git commit -m two &&
git checkout master) &&
mkdir empty &&
(cd empty && git init)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5609-clone-branch/parent/.git/
[master (root-commit) 2b9120b] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Switched to a new branch 'two'
[two 528e776] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'master'
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5609-clone-branch/empty/.git/
ok 1 - setup
expecting success:
git clone parent clone &&
(cd clone &&
check_HEAD master &&
check_file one
)
Cloning into 'clone'...
done.
ok 2 - vanilla clone chooses HEAD
expecting success:
git clone -b two parent clone-two &&
(cd clone-two &&
check_HEAD two &&
check_file two
)
Cloning into 'clone-two'...
done.
ok 3 - clone -b chooses specified branch
expecting success:
(cd clone-two &&
echo origin >expect &&
git config branch.two.remote >actual &&
echo refs/heads/two >>expect &&
git config branch.two.merge >>actual &&
test_cmp expect actual
)
ok 4 - clone -b sets up tracking
expecting success:
(cd clone-two &&
echo refs/remotes/origin/master >expect &&
git symbolic-ref refs/remotes/origin/HEAD >actual &&
test_cmp expect actual
)
ok 5 - clone -b does not munge remotes/origin/HEAD
expecting success:
test_must_fail git clone -b bogus parent clone-bogus
Cloning into 'clone-bogus'...
fatal: Remote branch bogus not found in upstream origin
ok 6 - clone -b with bogus branch
expecting success:
test_must_fail git clone -b branch empty clone-branch-empty
fatal: the remote end hung up unexpectedly
Cloning into 'clone-branch-empty'...
fatal: Remote branch branch not found in upstream origin
ok 7 - clone -b not allowed with empty repos
fatal: the remote end hung up unexpectedly
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5611-clone-config.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5611-clone-config/.git/
expecting success:
rm -rf child &&
git clone -c core.foo=bar . child &&
echo bar >expect &&
git --git-dir=child/.git config core.foo >actual &&
test_cmp expect actual
Cloning into 'child'...
warning: You appear to have cloned an empty repository.
done.
ok 1 - clone -c sets config in cloned repo
expecting success:
rm -rf child &&
git clone -c core.foo=bar -c core.foo=baz . child &&
{ echo bar; echo baz; } >expect &&
git --git-dir=child/.git config --get-all core.foo >actual &&
test_cmp expect actual
Cloning into 'child'...
warning: You appear to have cloned an empty repository.
done.
ok 2 - clone -c can set multi-keys
expecting success:
rm -rf child &&
git clone -c credential.helper= -c credential.helper=hi . child &&
printf "%s\n" "" hi >expect &&
git --git-dir=child/.git config --get-all credential.helper >actual &&
test_cmp expect actual
Cloning into 'child'...
warning: You appear to have cloned an empty repository.
done.
ok 3 - clone -c can set multi-keys, including some empty
expecting success:
rm -rf child &&
git clone -c core.foo . child &&
echo true >expect &&
git --git-dir=child/.git config --bool core.foo >actual &&
test_cmp expect actual
Cloning into 'child'...
warning: You appear to have cloned an empty repository.
done.
ok 4 - clone -c without a value is boolean true
expecting success:
echo content >file &&
git add file &&
git commit -m one &&
rm -rf child &&
git clone -c core.autocrlf . child &&
printf "content\\r\\n" >expect &&
test_cmp expect child/file
[master (root-commit) 5204692] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Cloning into 'child'...
done.
ok 5 - clone -c config is available during clone
expecting success:
rm -rf child &&
git update-ref refs/grab/it refs/heads/master &&
git update-ref refs/leave/out refs/heads/master &&
git clone -c "remote.origin.fetch=+refs/grab/*:refs/grab/*" . child &&
git -C child for-each-ref --format="%(refname)" >actual &&
cat >expect <<-\EOF &&
refs/grab/it
refs/heads/master
refs/remotes/origin/HEAD
refs/remotes/origin/master
EOF
test_cmp expect actual
Cloning into 'child'...
done.
ok 6 - clone -c remote.origin.fetch=<refspec> works
expecting success:
rm -rf child &&
git -c "remote.origin.fetch=+refs/grab/*:refs/grab/*" clone . child &&
git -C child for-each-ref --format="%(refname)" >actual &&
cat >expect <<-\EOF &&
refs/grab/it
refs/heads/master
refs/remotes/origin/HEAD
refs/remotes/origin/master
EOF
test_cmp expect actual
Cloning into 'child'...
done.
ok 7 - git -c remote.origin.fetch=<refspec> clone works
expecting success:
rm -rf child &&
git clone --origin=upstream \
-c "remote.upstream.fetch=+refs/grab/*:refs/grab/*" \
-c "remote.origin.fetch=+refs/leave/*:refs/leave/*" \
. child &&
git -C child for-each-ref --format="%(refname)" >actual &&
cat >expect <<-\EOF &&
refs/grab/it
refs/heads/master
refs/remotes/upstream/HEAD
refs/remotes/upstream/master
EOF
test_cmp expect actual
Cloning into 'child'...
done.
ok 8 - clone -c remote.<remote>.fetch=<refspec> --origin=<name>
skipping test: clone -c core.hideDotFiles
test_commit attributes .gitattributes "" &&
rm -rf child &&
git clone -c core.hideDotFiles=false . child &&
! is_hidden child/.gitattributes &&
rm -rf child &&
git clone -c core.hideDotFiles=dotGitOnly . child &&
! is_hidden child/.gitattributes &&
rm -rf child &&
git clone -c core.hideDotFiles=true . child &&
is_hidden child/.gitattributes
ok 9 # skip clone -c core.hideDotFiles (missing MINGW)
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5610-clone-detached.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5610-clone-detached/.git/
expecting success:
echo one >file &&
git add file &&
git commit -m one &&
echo two >file &&
git commit -a -m two &&
git tag two &&
echo three >file &&
git commit -a -m three
[master (root-commit) 2b9120b] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 528e776] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 5f93e9b] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
git checkout master^0 &&
git clone "file://$PWD" detached-branch
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 5f93e9b three
Cloning into 'detached-branch'...
ok 2 - clone repo (detached HEAD points to branch)
expecting success:
echo three >expect &&
git --git-dir=detached-branch/.git log -1 --format=%s >actual &&
test_cmp expect actual
ok 3 - cloned HEAD matches
checking known breakage:
head_is_detached detached-branch
5f93e9b6c6cd294b1c980b6278299ff569d13540
refs/heads/master
test_must_fail: command succeeded: git --git-dir=detached-branch/.git symbolic-ref HEAD
not ok 4 - cloned HEAD is detached # TODO known breakage
expecting success:
git checkout two^0 &&
git clone "file://$PWD" detached-tag
Previous HEAD position was 5f93e9b three
HEAD is now at 528e776 two
Cloning into 'detached-tag'...
Note: switching to '528e7761723772fbbf91de0b723f0d6c9dc9bdc9'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
ok 5 - clone repo (detached HEAD points to tag)
expecting success:
echo two >expect &&
git --git-dir=detached-tag/.git log -1 --format=%s >actual &&
test_cmp expect actual
ok 6 - cloned HEAD matches
expecting success:
head_is_detached detached-tag
528e7761723772fbbf91de0b723f0d6c9dc9bdc9
fatal: ref HEAD is not a symbolic ref
ok 7 - cloned HEAD is detached
expecting success:
git checkout two^ &&
git clone "file://$PWD" detached-history
Previous HEAD position was 528e776 two
HEAD is now at 2b9120b one
Cloning into 'detached-history'...
Note: switching to '2b9120b8047c25c0c77b3a9745417eb479ae2ed1'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
ok 8 - clone repo (detached HEAD points to history)
expecting success:
echo one >expect &&
git --git-dir=detached-history/.git log -1 --format=%s >actual &&
test_cmp expect actual
ok 9 - cloned HEAD matches
expecting success:
head_is_detached detached-history
2b9120b8047c25c0c77b3a9745417eb479ae2ed1
fatal: ref HEAD is not a symbolic ref
ok 10 - cloned HEAD is detached
expecting success:
git checkout master^0 &&
echo four >file &&
git commit -a -m four &&
git clone "file://$PWD" detached-orphan
Previous HEAD position was 2b9120b one
HEAD is now at 5f93e9b three
[detached HEAD 71faa75] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Cloning into 'detached-orphan'...
Note: switching to '71faa75a1ea5e1521db42e76c3a1a3c222c777cc'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
ok 11 - clone repo (orphan detached HEAD)
expecting success:
echo four >expect &&
git --git-dir=detached-orphan/.git log -1 --format=%s >actual &&
test_cmp expect actual
ok 12 - cloned HEAD matches
expecting success:
head_is_detached detached-orphan
71faa75a1ea5e1521db42e76c3a1a3c222c777cc
fatal: ref HEAD is not a symbolic ref
ok 13 - cloned HEAD is detached
# still have 1 known breakage(s)
# passed all remaining 12 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5613-info-alternate.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5613-info-alternate/.git/
expecting success:
test_create_repo A && (
cd A &&
echo "Hello World" > file1 &&
git add file1 &&
git commit -m "Initial commit" file1 &&
git repack -a -d &&
git prune
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5613-info-alternate/A/.git/
[master (root-commit) 6ecf7a6] Initial commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1
ok 1 - preparing first repository
expecting success:
git clone -l -s A B && (
cd B &&
echo "foo bar" > file2 &&
git add file2 &&
git commit -m "next commit" file2 &&
git repack -a -d -l &&
git prune
)
Cloning into 'B'...
done.
[master 099fe0b] next commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
ok 2 - preparing second repository
expecting success:
git clone -l -s B C && (
cd C &&
echo "Goodbye, cruel world" > file3 &&
git add file3 &&
git commit -m "one more" file3 &&
git repack -a -d -l &&
git prune
)
Cloning into 'C'...
done.
[master b87299c] one more
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
ok 3 - preparing third repository
expecting success:
cat >expect <<-EOF &&
alternate: $(pwd)/B/.git/objects
alternate: $(pwd)/A/.git/objects
EOF
git -C C count-objects -v >actual &&
grep ^alternate: actual >actual.alternates &&
test_cmp expect actual.alternates
ok 4 - count-objects shows the alternates
expecting success:
git clone -l -s C D &&
git clone -l -s D E &&
git clone -l -s E F &&
git clone -l -s F G &&
git clone --bare -l -s G H
Cloning into 'D'...
done.
Cloning into 'E'...
done.
Cloning into 'F'...
done.
Cloning into 'G'...
done.
Cloning into bare repository 'H'...
done.
error: /<<PKGBUILDDIR>>/t/trash directory.t5613-info-alternate/B/.git/objects: ignoring alternate object stores, nesting too deep
ok 5 - creating too deep nesting
expecting success:
git -C G fsck
ok 6 - validity of seventh repository
expecting success:
test_must_fail git -C H fsck
error: /<<PKGBUILDDIR>>/t/trash directory.t5613-info-alternate/B/.git/objects: ignoring alternate object stores, nesting too deep
broken link from commit 099fe0bab10cf9a1130c196c2eb46d94664ba0a9
to commit 6ecf7a630ed9cd69902071ec8b3742bfc4b6754e
broken link from tree a34a1216018cdd9b811a02de226d708856167e0e
to blob 557db03de997c86a4a028e1ebd3a1ceb225be238
missing commit 6ecf7a630ed9cd69902071ec8b3742bfc4b6754e
missing blob 557db03de997c86a4a028e1ebd3a1ceb225be238
ok 7 - invalidity of eighth repository
expecting success:
echo "$(pwd)"/B/.git/objects >>A/.git/objects/info/alternates &&
git -C C fsck
ok 8 - breaking of loops
expecting success:
rm -f C/.git/objects/info/alternates &&
test_must_fail git -C C fsck
error: refs/remotes/origin/HEAD: invalid sha1 pointer 099fe0bab10cf9a1130c196c2eb46d94664ba0a9
error: refs/remotes/origin/master: invalid sha1 pointer 099fe0bab10cf9a1130c196c2eb46d94664ba0a9
error: refs/remotes/origin/HEAD: invalid reflog entry 099fe0bab10cf9a1130c196c2eb46d94664ba0a9
error: refs/heads/master: invalid reflog entry 099fe0bab10cf9a1130c196c2eb46d94664ba0a9
error: refs/heads/master: invalid reflog entry 099fe0bab10cf9a1130c196c2eb46d94664ba0a9
error: HEAD: invalid reflog entry 099fe0bab10cf9a1130c196c2eb46d94664ba0a9
error: HEAD: invalid reflog entry 099fe0bab10cf9a1130c196c2eb46d94664ba0a9
broken link from commit b87299c34fcef4a3f33eefcdf1b853e0c8592b0f
to commit 099fe0bab10cf9a1130c196c2eb46d94664ba0a9
missing commit 099fe0bab10cf9a1130c196c2eb46d94664ba0a9
missing blob 557db03de997c86a4a028e1ebd3a1ceb225be238
missing blob d675fa44e50606caa705c3f48de02cf129c7f9a2
ok 9 - that info/alternates is necessary
expecting success:
echo "../../../B/.git/objects" >C/.git/objects/info/alternates &&
git fsck
notice: HEAD points to an unborn branch (master)
notice: No default references
ok 10 - that relative alternate is possible for current dir
expecting success:
git -C D fsck
ok 11 - that relative alternate is recursive
expecting success:
mkdir -p deep/subdir &&
git init --bare deep/subdir/duplicate.git &&
cat >deep/subdir/duplicate.git/objects/info/alternates <<-\EOF &&
../../../../C/.git/objects
../../../../A/.git/objects
EOF
cat >expect <<-EOF &&
alternate: $(pwd)/C/.git/objects
alternate: $(pwd)/B/.git/objects
alternate: $(pwd)/A/.git/objects
EOF
git -C deep/subdir/duplicate.git count-objects -v >actual &&
grep ^alternate: actual >actual.alternates &&
test_cmp expect actual.alternates
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5613-info-alternate/deep/subdir/duplicate.git/
ok 12 - relative duplicates are eliminated
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
)
prerequisite CASE_INSENSITIVE_FS not satisfied
skipping test: dup finding can be case-insensitive
git init --bare insensitive.git &&
# the previous entry for "A" will have used uppercase
cat >insensitive.git/objects/info/alternates <<-\EOF &&
../../C/.git/objects
../../a/.git/objects
EOF
cat >expect <<-EOF &&
alternate: $(pwd)/C/.git/objects
alternate: $(pwd)/B/.git/objects
alternate: $(pwd)/A/.git/objects
EOF
git -C insensitive.git count-objects -v >actual &&
grep ^alternate: actual >actual.alternates &&
test_cmp expect actual.alternates
ok 13 # skip dup finding can be case-insensitive (missing CASE_INSENSITIVE_FS)
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5615-alternate-env.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5615-alternate-env/.git/
expecting success:
git init --bare one.git &&
one=$(echo one | git -C one.git hash-object -w --stdin) &&
git init --bare two.git &&
two=$(echo two | git -C two.git hash-object -w --stdin)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5615-alternate-env/one.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5615-alternate-env/two.git/
ok 1 - create alternate repositories
expecting success:
check_obj "" <<-EOF
$one missing
$two missing
EOF
ok 2 - objects inaccessible without alternates
expecting success:
check_obj "$PWD/one.git/objects" <<-EOF
$one blob
$two missing
EOF
ok 3 - access alternate via absolute path
expecting success:
check_obj "$PWD/one.git/objects:$PWD/two.git/objects" <<-EOF
$one blob
$two blob
EOF
ok 4 - access multiple alternates
expecting success:
git init --bare bare.git &&
check_obj "../one.git/objects" -C bare.git <<-EOF
$one blob
EOF
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5615-alternate-env/bare.git/
ok 5 - access alternate via relative path (bare)
expecting success:
git init worktree &&
check_obj "../one.git/objects" -C worktree <<-EOF
$one blob
EOF
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5615-alternate-env/worktree/.git/
ok 6 - access alternate via relative path (worktree)
expecting success:
mkdir subdir &&
check_obj "one.git/objects" -C subdir <<-EOF
$one blob
EOF
ok 7 - access alternate via relative path (subdir)
expecting success:
check_obj "$quoted:$unquoted" <<-EOF
$one blob
$two blob
EOF
ok 8 - mix of quoted and unquoted alternates
expecting success:
mv one.git \"one.git &&
check_obj \"one.git/objects <<-EOF
$one blob
EOF
ok 9 - broken quoting falls back to interpreting raw
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5612-clone-refspec.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5612-clone-refspec/.git/
expecting success:
# Make two branches, "master" and "side"
echo one >file &&
git add file &&
git commit -m one &&
echo two >file &&
git commit -a -m two &&
git tag two &&
echo three >file &&
git commit -a -m three &&
git checkout -b side &&
echo four >file &&
git commit -a -m four &&
git checkout master &&
git tag five &&
# default clone
git clone . dir_all &&
# default clone --no-tags
git clone --no-tags . dir_all_no_tags &&
# default --single that follows HEAD=master
git clone --single-branch . dir_master &&
# default --single that follows HEAD=master with no tags
git clone --single-branch --no-tags . dir_master_no_tags &&
# default --single that follows HEAD=side
git checkout side &&
git clone --single-branch . dir_side &&
# explicit --single that follows side
git checkout master &&
git clone --single-branch --branch side . dir_side2 &&
# default --single with --mirror
git clone --single-branch --mirror . dir_mirror &&
# default --single with --branch and --mirror
git clone --single-branch --mirror --branch side . dir_mirror_side &&
# --single that does not know what branch to follow
git checkout two^ &&
git clone --single-branch . dir_detached &&
# explicit --single with tag
git clone --single-branch --branch two . dir_tag &&
# explicit --single with tag and --no-tags
git clone --single-branch --no-tags --branch two . dir_tag_no_tags &&
# advance both "master" and "side" branches
git checkout side &&
echo five >file &&
git commit -a -m five &&
git checkout master &&
echo six >file &&
git commit -a -m six &&
# update tag
git tag -d two && git tag two
[master (root-commit) 9018439] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 8b19183] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 66013b8] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'side'
[side fb55c95] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'master'
Cloning into 'dir_all'...
done.
Cloning into 'dir_all_no_tags'...
done.
Cloning into 'dir_master'...
done.
Cloning into 'dir_master_no_tags'...
done.
Switched to branch 'side'
Cloning into 'dir_side'...
done.
Switched to branch 'master'
Cloning into 'dir_side2'...
done.
Cloning into bare repository 'dir_mirror'...
done.
Cloning into bare repository 'dir_mirror_side'...
done.
Note: switching to 'two^'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 9018439 one
Cloning into 'dir_detached'...
done.
Note: switching to '9018439ee29d78e59143aed147f194963d33e480'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
Cloning into 'dir_tag'...
done.
Note: switching to '8b1918361a872db94c2de2d88a25118547ed24a4'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
Cloning into 'dir_tag_no_tags'...
done.
Note: switching to '8b1918361a872db94c2de2d88a25118547ed24a4'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
Previous HEAD position was 9018439 one
Switched to branch 'side'
[side 61a80f3] five
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'master'
[master fa7c3f7] six
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Deleted tag 'two' (was 8b19183)
ok 1 - setup
expecting success:
(
cd dir_all &&
git fetch &&
git for-each-ref refs/remotes/origin |
sed -e "/HEAD$/d" \
-e "s|/remotes/origin/|/heads/|" >../actual
) &&
# follow both master and side
git for-each-ref refs/heads >expect &&
test_cmp expect actual
From /<<PKGBUILDDIR>>/t/trash directory.t5612-clone-refspec/.
66013b8..fa7c3f7 master -> origin/master
fb55c95..61a80f3 side -> origin/side
ok 2 - by default all branches will be kept updated
expecting success:
(
cd dir_all &&
git fetch &&
git for-each-ref refs/tags >../actual
) &&
git for-each-ref refs/tags >expect &&
test_must_fail test_cmp expect actual &&
test_line_count = 2 actual
--- expect 2019-08-14 07:32:43.478878868 +0000
+++ actual 2019-08-14 07:32:43.470878730 +0000
@@ -1,2 +1,2 @@
66013b810936f7b49a70c2bbc876340a3d957b15 commit refs/tags/five
-fa7c3f71eacb3568228e95371888fbbf440ea3c3 commit refs/tags/two
+8b1918361a872db94c2de2d88a25118547ed24a4 commit refs/tags/two
ok 3 - by default no tags will be kept updated
expecting success:
(
cd dir_all_no_tags &&
git fetch &&
git for-each-ref refs/tags >../actual
) &&
test_must_be_empty actual
From /<<PKGBUILDDIR>>/t/trash directory.t5612-clone-refspec/.
66013b8..fa7c3f7 master -> origin/master
fb55c95..61a80f3 side -> origin/side
ok 4 - clone with --no-tags
expecting success:
(
cd dir_master &&
git fetch --force &&
git for-each-ref refs/remotes/origin |
sed -e "/HEAD$/d" \
-e "s|/remotes/origin/|/heads/|" >../actual
) &&
# only follow master
git for-each-ref refs/heads/master >expect &&
# get & check latest tags
test_cmp expect actual &&
(
cd dir_master &&
git fetch --tags --force &&
git for-each-ref refs/tags >../actual
) &&
git for-each-ref refs/tags >expect &&
test_cmp expect actual &&
test_line_count = 2 actual
From /<<PKGBUILDDIR>>/t/trash directory.t5612-clone-refspec/.
66013b8..fa7c3f7 master -> origin/master
From /<<PKGBUILDDIR>>/t/trash directory.t5612-clone-refspec/.
t [tag update] two -> two
ok 5 - --single-branch while HEAD pointing at master
expecting success:
(
cd dir_master_no_tags &&
git fetch &&
git for-each-ref refs/remotes/origin |
sed -e "/HEAD$/d" \
-e "s|/remotes/origin/|/heads/|" >../actual
) &&
# only follow master
git for-each-ref refs/heads/master >expect &&
test_cmp expect actual &&
# get tags (noop)
(
cd dir_master_no_tags &&
git fetch &&
git for-each-ref refs/tags >../actual
) &&
test_must_be_empty actual &&
test_line_count = 0 actual &&
# get tags with --tags overrides tagOpt
(
cd dir_master_no_tags &&
git fetch --tags &&
git for-each-ref refs/tags >../actual
) &&
git for-each-ref refs/tags >expect &&
test_cmp expect actual &&
test_line_count = 2 actual
From /<<PKGBUILDDIR>>/t/trash directory.t5612-clone-refspec/.
66013b8..fa7c3f7 master -> origin/master
From /<<PKGBUILDDIR>>/t/trash directory.t5612-clone-refspec/.
* [new tag] five -> five
* [new tag] two -> two
ok 6 - --single-branch while HEAD pointing at master and --no-tags
expecting success:
(
cd dir_side &&
git fetch &&
git for-each-ref refs/remotes/origin |
sed -e "/HEAD$/d" \
-e "s|/remotes/origin/|/heads/|" >../actual
) &&
# only follow side
git for-each-ref refs/heads/side >expect &&
test_cmp expect actual
From /<<PKGBUILDDIR>>/t/trash directory.t5612-clone-refspec/.
fb55c95..61a80f3 side -> origin/side
ok 7 - --single-branch while HEAD pointing at side
expecting success:
(
cd dir_side2 &&
git fetch &&
git for-each-ref refs/remotes/origin |
sed -e "/HEAD$/d" \
-e "s|/remotes/origin/|/heads/|" >../actual
) &&
# only follow side
git for-each-ref refs/heads/side >expect &&
test_cmp expect actual
From /<<PKGBUILDDIR>>/t/trash directory.t5612-clone-refspec/.
fb55c95..61a80f3 side -> origin/side
ok 8 - --single-branch with explicit --branch side
expecting success:
(
cd dir_tag &&
git fetch &&
git for-each-ref refs/tags >../actual
) &&
git for-each-ref refs/tags >expect &&
test_cmp expect actual
From /<<PKGBUILDDIR>>/t/trash directory.t5612-clone-refspec/.
t [tag update] two -> two
ok 9 - --single-branch with explicit --branch with tag fetches updated tag
expecting success:
(
cd dir_tag_no_tags &&
git fetch &&
git for-each-ref refs/tags >../actual
) &&
git for-each-ref refs/tags/two >expect &&
test_cmp expect actual &&
test_line_count = 1 actual
From /<<PKGBUILDDIR>>/t/trash directory.t5612-clone-refspec/.
t [tag update] two -> two
ok 10 - --single-branch with explicit --branch with tag fetches updated tag despite --no-tags
expecting success:
(
cd dir_mirror &&
git fetch &&
git for-each-ref refs > ../actual
) &&
git for-each-ref refs >expect &&
test_cmp expect actual
From /<<PKGBUILDDIR>>/t/trash directory.t5612-clone-refspec/.
66013b8..fa7c3f7 master -> master
* [new branch] side -> side
t [tag update] two -> two
ok 11 - --single-branch with --mirror
expecting success:
(
cd dir_mirror_side &&
git fetch &&
git for-each-ref refs > ../actual
) &&
git for-each-ref refs >expect &&
test_cmp expect actual
From /<<PKGBUILDDIR>>/t/trash directory.t5612-clone-refspec/.
* [new branch] master -> master
fb55c95..61a80f3 side -> side
t [tag update] two -> two
ok 12 - --single-branch with explicit --branch and --mirror
expecting success:
(
cd dir_detached &&
git fetch &&
git for-each-ref refs/remotes/origin |
sed -e "/HEAD$/d" \
-e "s|/remotes/origin/|/heads/|" >../actual
) &&
# nothing
test_must_be_empty actual
From /<<PKGBUILDDIR>>/t/trash directory.t5612-clone-refspec/.
* branch HEAD -> FETCH_HEAD
ok 13 - --single-branch with detached
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5617-clone-submodules-remote.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5617-clone-submodules-remote/.git/
expecting success:
git checkout -b master &&
test_commit commit1 &&
mkdir sub &&
(
cd sub &&
git init &&
test_commit subcommit1 &&
git tag sub_when_added_to_super
) &&
git submodule add "file://$pwd/sub" sub &&
git commit -m "add submodule" &&
(
cd sub &&
test_commit subcommit2
)
Switched to a new branch 'master'
[master (root-commit) ef004cf] commit1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 commit1.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5617-clone-submodules-remote/sub/.git/
[master (root-commit) 5110c63] subcommit1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subcommit1.t
Adding existing repo at 'sub' to the index
[master 0f7fead] add submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub
[master c24f10e] subcommit2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subcommit2.t
ok 1 - setup
expecting success:
test_when_finished "rm -rf super_clone" &&
git clone --recurse-submodules --no-remote-submodules "file://$pwd/." super_clone &&
(
cd super_clone/sub &&
git diff --exit-code sub_when_added_to_super
)
Cloning into 'super_clone'...
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t5617-clone-submodules-remote/sub) registered for path 'sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5617-clone-submodules-remote/super_clone/sub'...
Submodule path 'sub': checked out '5110c633865043debe00950928ed2147ea5b8714'
ok 2 - clone with --no-remote-submodules
expecting success:
test_when_finished "rm -rf super_clone" &&
git clone --recurse-submodules --remote-submodules "file://$pwd/." super_clone &&
(
cd super_clone/sub &&
git diff --exit-code remotes/origin/master
)
Cloning into 'super_clone'...
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t5617-clone-submodules-remote/sub) registered for path 'sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5617-clone-submodules-remote/super_clone/sub'...
Submodule path 'sub': checked out 'c24f10ee4103ccdd16360092dcb618ad35ca1288'
ok 3 - clone with --remote-submodules
expecting success:
test_when_finished "rm -rf super_clone" &&
git clone --recurse-submodules "file://$pwd/." super_clone &&
(
cd super_clone/sub &&
git diff --exit-code sub_when_added_to_super
)
Cloning into 'super_clone'...
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t5617-clone-submodules-remote/sub) registered for path 'sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5617-clone-submodules-remote/super_clone/sub'...
Submodule path 'sub': checked out '5110c633865043debe00950928ed2147ea5b8714'
ok 4 - check the default is --no-remote-submodules
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5618-alternate-refs.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5618-alternate-refs/.git/
expecting success:
git checkout -b one &&
test_tick &&
git commit --allow-empty -m base &&
test_tick &&
git commit --allow-empty -m one &&
git checkout -b two HEAD^ &&
test_tick &&
git commit --allow-empty -m two
Switched to a new branch 'one'
[one (root-commit) 00f38a4] base
Author: A U Thor <author@example.com>
[one eae7140] one
Author: A U Thor <author@example.com>
Switched to a new branch 'two'
[two e9067a7] two
Author: A U Thor <author@example.com>
ok 1 - set up local refs
expecting success:
git clone -s . child &&
cd child &&
git merge origin/one
Cloning into 'child'...
done.
Merging:
e9067a7 two
virtual origin/one
found 1 common ancestor:
00f38a4 base
Already up to date!
Merge made by the 'recursive' strategy.
ok 2 - set up shared clone
expecting success:
git rev-list --remotes=origin >expect &&
git rev-list --alternate-refs >actual &&
test_cmp expect actual
ok 3 - rev-list --alternate-refs
expecting success:
git rev-parse HEAD >expect &&
git rev-list HEAD --not --alternate-refs >actual &&
test_cmp expect actual
ok 4 - rev-list --not --alternate-refs
expecting success:
test_config core.alternateRefsPrefixes refs/heads/one &&
git rev-list origin/one >expect &&
git rev-list --alternate-refs >actual &&
test_cmp expect actual
ok 5 - limiting with alternateRefsPrefixes
expecting success:
git log --oneline --source --remotes=origin >expect.orig &&
sed "s/origin.* /.alternate /" <expect.orig >expect &&
git log --oneline --source --alternate-refs >actual &&
test_cmp expect actual
ok 6 - log --source shows .alternate marker
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5614-clone-submodules-shallow.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5614-clone-submodules-shallow/.git/
expecting success:
git checkout -b master &&
test_commit commit1 &&
test_commit commit2 &&
mkdir sub &&
(
cd sub &&
git init &&
test_commit subcommit1 &&
test_commit subcommit2 &&
test_commit subcommit3
) &&
git submodule add "file://$pwd/sub" sub &&
git commit -m "add submodule"
Switched to a new branch 'master'
[master (root-commit) ef004cf] commit1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 commit1.t
[master 94955c5] commit2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 commit2.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5614-clone-submodules-shallow/sub/.git/
[master (root-commit) 6a80c79] subcommit1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subcommit1.t
[master f6b6be8] subcommit2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subcommit2.t
[master 5334747] subcommit3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subcommit3.t
Adding existing repo at 'sub' to the index
[master e989471] add submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub
ok 1 - setup
expecting success:
test_when_finished "rm -rf super_clone" &&
git clone --recurse-submodules "file://$pwd/." super_clone &&
git -C super_clone log --oneline >lines &&
test_line_count = 3 lines &&
git -C super_clone/sub log --oneline >lines &&
test_line_count = 3 lines
Cloning into 'super_clone'...
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t5614-clone-submodules-shallow/sub) registered for path 'sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5614-clone-submodules-shallow/super_clone/sub'...
Submodule path 'sub': checked out '53347473137b3c7bcd36cd24d83c719151112675'
ok 2 - nonshallow clone implies nonshallow submodule
expecting success:
test_when_finished "rm -rf super_clone" &&
git clone --recurse-submodules --depth 2 --shallow-submodules "file://$pwd/." super_clone &&
git -C super_clone log --oneline >lines &&
test_line_count = 2 lines &&
git -C super_clone/sub log --oneline >lines &&
test_line_count = 1 lines
Cloning into 'super_clone'...
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t5614-clone-submodules-shallow/sub) registered for path 'sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5614-clone-submodules-shallow/super_clone/sub'...
Submodule path 'sub': checked out '53347473137b3c7bcd36cd24d83c719151112675'
ok 3 - shallow clone with shallow submodule
expecting success:
test_when_finished "rm -rf super_clone" &&
git clone --recurse-submodules --depth 2 "file://$pwd/." super_clone &&
git -C super_clone log --oneline >lines &&
test_line_count = 2 lines &&
git -C super_clone/sub log --oneline >lines &&
test_line_count = 3 lines
Cloning into 'super_clone'...
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t5614-clone-submodules-shallow/sub) registered for path 'sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5614-clone-submodules-shallow/super_clone/sub'...
Submodule path 'sub': checked out '53347473137b3c7bcd36cd24d83c719151112675'
ok 4 - shallow clone does not imply shallow submodule
expecting success:
test_when_finished "rm -rf super_clone" &&
git clone --recurse-submodules --depth 2 --no-shallow-submodules "file://$pwd/." super_clone &&
git -C super_clone log --oneline >lines &&
test_line_count = 2 lines &&
git -C super_clone/sub log --oneline >lines &&
test_line_count = 3 lines
Cloning into 'super_clone'...
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t5614-clone-submodules-shallow/sub) registered for path 'sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5614-clone-submodules-shallow/super_clone/sub'...
Submodule path 'sub': checked out '53347473137b3c7bcd36cd24d83c719151112675'
ok 5 - shallow clone with non shallow submodule
expecting success:
test_when_finished "rm -rf super_clone" &&
git clone --recurse-submodules --no-local --shallow-submodules "file://$pwd/." super_clone &&
git -C super_clone log --oneline >lines &&
test_line_count = 3 lines &&
git -C super_clone/sub log --oneline >lines &&
test_line_count = 1 lines
Cloning into 'super_clone'...
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t5614-clone-submodules-shallow/sub) registered for path 'sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5614-clone-submodules-shallow/super_clone/sub'...
Submodule path 'sub': checked out '53347473137b3c7bcd36cd24d83c719151112675'
ok 6 - non shallow clone with shallow submodule
expecting success:
test_when_finished "rm -rf super_clone" &&
git config -f .gitmodules submodule.sub.shallow true &&
git add .gitmodules &&
git commit -m "recommend shallow for sub" &&
git clone --recurse-submodules --no-local "file://$pwd/." super_clone &&
(
cd super_clone &&
git log --oneline >lines &&
test_line_count = 4 lines
) &&
(
cd super_clone/sub &&
git log --oneline >lines &&
test_line_count = 1 lines
)
[master f96b60e] recommend shallow for sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Cloning into 'super_clone'...
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t5614-clone-submodules-shallow/sub) registered for path 'sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5614-clone-submodules-shallow/super_clone/sub'...
Submodule path 'sub': checked out '53347473137b3c7bcd36cd24d83c719151112675'
ok 7 - clone follows shallow recommendation
expecting success:
test_when_finished "rm -rf super_clone" &&
git clone --no-local "file://$pwd/." super_clone &&
(
cd super_clone &&
git submodule update --init --no-recommend-shallow &&
git log --oneline >lines &&
test_line_count = 4 lines
) &&
(
cd super_clone/sub &&
git log --oneline >lines &&
test_line_count = 3 lines
)
Cloning into 'super_clone'...
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t5614-clone-submodules-shallow/sub) registered for path 'sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5614-clone-submodules-shallow/super_clone/sub'...
Submodule path 'sub': checked out '53347473137b3c7bcd36cd24d83c719151112675'
ok 8 - get unshallow recommended shallow submodule
expecting success:
test_when_finished "rm -rf super_clone" &&
git config -f .gitmodules submodule.sub.shallow false &&
git add .gitmodules &&
git commit -m "recommend non shallow for sub" &&
git clone --recurse-submodules --no-local "file://$pwd/." super_clone &&
(
cd super_clone &&
git log --oneline >lines &&
test_line_count = 5 lines
) &&
(
cd super_clone/sub &&
git log --oneline >lines &&
test_line_count = 3 lines
)
[master a74a9c6] recommend non shallow for sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Cloning into 'super_clone'...
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t5614-clone-submodules-shallow/sub) registered for path 'sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5614-clone-submodules-shallow/super_clone/sub'...
Submodule path 'sub': checked out '53347473137b3c7bcd36cd24d83c719151112675'
ok 9 - clone follows non shallow recommendation
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5701-git-serve.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5701-git-serve/.git/
expecting success:
cat >expect <<-EOF &&
version 2
agent=git/$(git version | cut -d" " -f3)
ls-refs
fetch=shallow
server-option
0000
EOF
GIT_TEST_SIDEBAND_ALL=0 test-tool serve-v2 \
--advertise-capabilities >out &&
test-tool pkt-line unpack <out >actual &&
test_cmp expect actual
ok 1 - test capability advertisement
expecting success:
# Empty request
test-tool pkt-line pack >in <<-EOF &&
0000
EOF
test-tool serve-v2 --stateless-rpc >out <in &&
test_must_be_empty out &&
# EOF
test-tool serve-v2 --stateless-rpc >out &&
test_must_be_empty out
ok 2 - stateless-rpc flag does not list capabilities
expecting success:
test-tool pkt-line pack >in <<-EOF &&
foobar
0000
EOF
test_must_fail test-tool serve-v2 --stateless-rpc 2>err <in &&
test_i18ngrep "unknown capability" err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: unknown capability 'foobar'
ok 3 - request invalid capability
expecting success:
test-tool pkt-line pack >in <<-EOF &&
agent=git/test
0000
EOF
test_must_fail test-tool serve-v2 --stateless-rpc 2>err <in &&
test_i18ngrep "no command requested" err
fatal: no command requested
ok 4 - request with no command
expecting success:
test-tool pkt-line pack >in <<-EOF &&
command=foo
agent=git/test
0000
EOF
test_must_fail test-tool serve-v2 --stateless-rpc 2>err <in &&
test_i18ngrep "invalid command" err
fatal: invalid command 'foo'
ok 5 - request invalid command
expecting success:
test_commit one &&
git branch dev master &&
test_commit two &&
git symbolic-ref refs/heads/release refs/heads/master &&
git tag -a -m "annotated tag" annotated-tag
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
ok 6 - setup some refs and tags
expecting success:
test-tool pkt-line pack >in <<-EOF &&
command=ls-refs
0000
EOF
cat >expect <<-EOF &&
$(git rev-parse HEAD) HEAD
$(git rev-parse refs/heads/dev) refs/heads/dev
$(git rev-parse refs/heads/master) refs/heads/master
$(git rev-parse refs/heads/release) refs/heads/release
$(git rev-parse refs/tags/annotated-tag) refs/tags/annotated-tag
$(git rev-parse refs/tags/one) refs/tags/one
$(git rev-parse refs/tags/two) refs/tags/two
0000
EOF
test-tool serve-v2 --stateless-rpc <in >out &&
test-tool pkt-line unpack <out >actual &&
test_cmp expect actual
ok 7 - basics of ls-refs
expecting success:
test-tool pkt-line pack >in <<-EOF &&
command=ls-refs
0001
ref-prefix refs/heads/master
ref-prefix refs/tags/one
0000
EOF
cat >expect <<-EOF &&
$(git rev-parse refs/heads/master) refs/heads/master
$(git rev-parse refs/tags/one) refs/tags/one
0000
EOF
test-tool serve-v2 --stateless-rpc <in >out &&
test-tool pkt-line unpack <out >actual &&
test_cmp expect actual
ok 8 - basic ref-prefixes
expecting success:
test-tool pkt-line pack >in <<-EOF &&
command=ls-refs
0001
ref-prefix refs/heads/
0000
EOF
cat >expect <<-EOF &&
$(git rev-parse refs/heads/dev) refs/heads/dev
$(git rev-parse refs/heads/master) refs/heads/master
$(git rev-parse refs/heads/release) refs/heads/release
0000
EOF
test-tool serve-v2 --stateless-rpc <in >out &&
test-tool pkt-line unpack <out >actual &&
test_cmp expect actual
ok 9 - refs/heads prefix
expecting success:
test-tool pkt-line pack >in <<-EOF &&
command=ls-refs
0001
peel
ref-prefix refs/tags/
0000
EOF
cat >expect <<-EOF &&
$(git rev-parse refs/tags/annotated-tag) refs/tags/annotated-tag peeled:$(git rev-parse refs/tags/annotated-tag^{})
$(git rev-parse refs/tags/one) refs/tags/one
$(git rev-parse refs/tags/two) refs/tags/two
0000
EOF
test-tool serve-v2 --stateless-rpc <in >out &&
test-tool pkt-line unpack <out >actual &&
test_cmp expect actual
ok 10 - peel parameter
expecting success:
test-tool pkt-line pack >in <<-EOF &&
command=ls-refs
0001
symrefs
ref-prefix refs/heads/
0000
EOF
cat >expect <<-EOF &&
$(git rev-parse refs/heads/dev) refs/heads/dev
$(git rev-parse refs/heads/master) refs/heads/master
$(git rev-parse refs/heads/release) refs/heads/release symref-target:refs/heads/master
0000
EOF
test-tool serve-v2 --stateless-rpc <in >out &&
test-tool pkt-line unpack <out >actual &&
test_cmp expect actual
ok 11 - symrefs parameter
expecting success:
test-tool pkt-line pack >in <<-EOF &&
command=ls-refs
server-option=hello
server-option=world
0001
ref-prefix HEAD
0000
EOF
cat >expect <<-EOF &&
$(git rev-parse HEAD) HEAD
0000
EOF
test-tool serve-v2 --stateless-rpc <in >out &&
test-tool pkt-line unpack <out >actual &&
test_cmp expect actual
ok 12 - sending server-options
expecting success:
git init server &&
test-tool pkt-line pack >in <<-EOF &&
command=fetch
0001
this-is-not-a-command
0000
EOF
(
cd server &&
test_must_fail test-tool serve-v2 --stateless-rpc
) <in >/dev/null 2>err &&
grep "unexpected line: .this-is-not-a-command." err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5701-git-serve/server/.git/
fatal: unexpected line: 'this-is-not-a-command'
ok 13 - unexpected lines are not allowed in fetch request
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5700-protocol-v1.sh ***
checking prerequisite: PIPE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports FIFOs
test_have_prereq !MINGW,!CYGWIN &&
rm -f testfifo && mkfifo testfifo
)
prerequisite PIPE ok
Starting git daemon ...
[1326] Ready to rumble
expecting success:
git init "$daemon_parent" &&
test_commit -C "$daemon_parent" one
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5700-protocol-v1/repo/parent/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 1 - create repo to be served by git-daemon
expecting success:
GIT_TRACE_PACKET=1 git -c protocol.version=1 \
clone "$GIT_DAEMON_URL/parent" daemon_child 2>log &&
git -C daemon_child log -1 --format=%s >actual &&
git -C "$daemon_parent" log -1 --format=%s >expect &&
test_cmp expect actual &&
# Client requested to use protocol v1
grep "clone> .*\\\0\\\0version=1\\\0$" log &&
# Server responded using protocol v1
grep "clone< version 1" log
[1404] Connection from 127.0.0.1:45526
[1404] Extended attribute "host": 127.0.0.1:5700
[1404] Extended attribute "protocol": version=1
[1404] Request upload-pack for '/parent'
[1326] [1404] Disconnected
packet: clone> git-upload-pack /parent\0host=127.0.0.1:5700\0\0version=1\0
packet: clone< version 1
ok 2 - clone with git:// using protocol v1
expecting success:
test_commit -C "$daemon_parent" two &&
GIT_TRACE_PACKET=1 git -C daemon_child -c protocol.version=1 \
fetch 2>log &&
git -C daemon_child log -1 --format=%s origin/master >actual &&
git -C "$daemon_parent" log -1 --format=%s >expect &&
test_cmp expect actual &&
# Client requested to use protocol v1
grep "fetch> .*\\\0\\\0version=1\\\0$" log &&
# Server responded using protocol v1
grep "fetch< version 1" log
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[1510] Connection from 127.0.0.1:45528
[1510] Extended attribute "host": 127.0.0.1:5700
[1510] Extended attribute "protocol": version=1
[1510] Request upload-pack for '/parent'
[1326] [1510] Disconnected
packet: fetch> git-upload-pack /parent\0host=127.0.0.1:5700\0\0version=1\0
packet: fetch< version 1
ok 3 - fetch with git:// using protocol v1
expecting success:
GIT_TRACE_PACKET=1 git -C daemon_child -c protocol.version=1 \
pull 2>log &&
git -C daemon_child log -1 --format=%s >actual &&
git -C "$daemon_parent" log -1 --format=%s >expect &&
test_cmp expect actual &&
# Client requested to use protocol v1
grep "fetch> .*\\\0\\\0version=1\\\0$" log &&
# Server responded using protocol v1
grep "fetch< version 1" log
[1596] Connection from 127.0.0.1:45530
[1596] Extended attribute "host": 127.0.0.1:5700
[1596] Extended attribute "protocol": version=1
[1596] Request upload-pack for '/parent'
[1326] [1596] Disconnected
Updating d79ce16..139b20d
Fast-forward
two.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 two.t
packet: fetch> git-upload-pack /parent\0host=127.0.0.1:5700\0\0version=1\0
packet: fetch< version 1
ok 4 - pull with git:// using protocol v1
expecting success:
test_commit -C daemon_child three &&
# Push to another branch, as the target repository has the
# master branch checked out and we cannot push into it.
GIT_TRACE_PACKET=1 git -C daemon_child -c protocol.version=1 \
push origin HEAD:client_branch 2>log &&
git -C daemon_child log -1 --format=%s >actual &&
git -C "$daemon_parent" log -1 --format=%s client_branch >expect &&
test_cmp expect actual &&
# Client requested to use protocol v1
grep "push> .*\\\0\\\0version=1\\\0$" log &&
# Server responded using protocol v1
grep "push< version 1" log
[master 7c7cd71] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
[1715] Connection from 127.0.0.1:45532
[1715] Extended attribute "host": 127.0.0.1:5700
[1715] Extended attribute "protocol": version=1
[1715] Request receive-pack for '/parent'
[1326] [1715] Disconnected
packet: push> git-receive-pack /parent\0host=127.0.0.1:5700\0\0version=1\0
packet: push< version 1
ok 5 - push with git:// using protocol v1
Stopping git daemon ...
expecting success:
git init file_parent &&
test_commit -C file_parent one
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5700-protocol-v1/file_parent/.git/
[master (root-commit) af0b45c] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 6 - create repo to be served by file:// transport
expecting success:
GIT_TRACE_PACKET=1 git -c protocol.version=1 \
clone "file://$(pwd)/file_parent" file_child 2>log &&
git -C file_child log -1 --format=%s >actual &&
git -C file_parent log -1 --format=%s >expect &&
test_cmp expect actual &&
# Server responded using protocol v1
grep "clone< version 1" log
packet: clone< version 1
ok 7 - clone with file:// using protocol v1
expecting success:
test_commit -C file_parent two &&
GIT_TRACE_PACKET=1 git -C file_child -c protocol.version=1 \
fetch 2>log &&
git -C file_child log -1 --format=%s origin/master >actual &&
git -C file_parent log -1 --format=%s >expect &&
test_cmp expect actual &&
# Server responded using protocol v1
grep "fetch< version 1" log
[master 1dd7f79] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
packet: fetch< version 1
ok 8 - fetch with file:// using protocol v1
expecting success:
GIT_TRACE_PACKET=1 git -C file_child -c protocol.version=1 \
pull 2>log &&
git -C file_child log -1 --format=%s >actual &&
git -C file_parent log -1 --format=%s >expect &&
test_cmp expect actual &&
# Server responded using protocol v1
grep "fetch< version 1" log
Updating af0b45c..1dd7f79
Fast-forward
two.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 two.t
packet: fetch< version 1
ok 9 - pull with file:// using protocol v1
expecting success:
test_commit -C file_child three &&
# Push to another branch, as the target repository has the
# master branch checked out and we cannot push into it.
GIT_TRACE_PACKET=1 git -C file_child -c protocol.version=1 \
push origin HEAD:client_branch 2>log &&
git -C file_child log -1 --format=%s >actual &&
git -C file_parent log -1 --format=%s client_branch >expect &&
test_cmp expect actual &&
# Server responded using protocol v1
grep "push< version 1" log
[master a136e4a] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
packet: push< version 1
ok 10 - push with file:// using protocol v1
expecting success:
GIT_SSH="$GIT_BUILD_DIR/t/helper/test-fake-ssh" &&
export GIT_SSH &&
GIT_SSH_VARIANT=ssh &&
export GIT_SSH_VARIANT &&
export TRASH_DIRECTORY &&
>"$TRASH_DIRECTORY"/ssh-output
ok 11 - setup ssh wrapper
expecting success:
git init ssh_parent &&
test_commit -C ssh_parent one
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5700-protocol-v1/ssh_parent/.git/
[master (root-commit) 06e07da] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 12 - create repo to be served by ssh:// transport
expecting success:
GIT_TRACE_PACKET=1 git -c protocol.version=1 \
clone "ssh://myhost:$(pwd)/ssh_parent" ssh_child 2>log &&
expect_ssh git-upload-pack &&
git -C ssh_child log -1 --format=%s >actual &&
git -C ssh_parent log -1 --format=%s >expect &&
test_cmp expect actual &&
# Server responded using protocol v1
grep "clone< version 1" log
packet: clone< version 1
ok 13 - clone with ssh:// using protocol v1
expecting success:
test_commit -C ssh_parent two &&
GIT_TRACE_PACKET=1 git -C ssh_child -c protocol.version=1 \
fetch 2>log &&
expect_ssh git-upload-pack &&
git -C ssh_child log -1 --format=%s origin/master >actual &&
git -C ssh_parent log -1 --format=%s >expect &&
test_cmp expect actual &&
# Server responded using protocol v1
grep "fetch< version 1" log
[master 738d2f7] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
packet: fetch< version 1
ok 14 - fetch with ssh:// using protocol v1
expecting success:
GIT_TRACE_PACKET=1 git -C ssh_child -c protocol.version=1 \
pull 2>log &&
expect_ssh git-upload-pack &&
git -C ssh_child log -1 --format=%s >actual &&
git -C ssh_parent log -1 --format=%s >expect &&
test_cmp expect actual &&
# Server responded using protocol v1
grep "fetch< version 1" log
Updating 06e07da..738d2f7
Fast-forward
two.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 two.t
packet: fetch< version 1
ok 15 - pull with ssh:// using protocol v1
expecting success:
test_commit -C ssh_child three &&
# Push to another branch, as the target repository has the
# master branch checked out and we cannot push into it.
GIT_TRACE_PACKET=1 git -C ssh_child -c protocol.version=1 \
push origin HEAD:client_branch 2>log &&
expect_ssh git-receive-pack &&
git -C ssh_child log -1 --format=%s >actual &&
git -C ssh_parent log -1 --format=%s client_branch >expect &&
test_cmp expect actual &&
# Server responded using protocol v1
grep "push< version 1" log
[master 05cc2ac] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
packet: push< version 1
ok 16 - push with ssh:// using protocol v1
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
# passed all 16 test(s)
# SKIP no web server found at '/usr/sbin/apache2'
1..16
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5703-upload-pack-ref-in-want.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5703-upload-pack-ref-in-want/.git/
expecting success:
test_commit a &&
git checkout -b o/foo &&
test_commit b &&
test_commit c &&
git checkout -b o/bar b &&
test_commit d &&
git checkout -b baz a &&
test_commit e &&
git checkout master &&
test_commit f
[master (root-commit) ce450c7] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a.t
Switched to a new branch 'o/foo'
[o/foo 020ea9b] b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b.t
[o/foo d9ea348] c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c.t
Switched to a new branch 'o/bar'
[o/bar 1bd0260] d
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 d.t
Switched to a new branch 'baz'
[baz 10e5ce2] e
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 e.t
Switched to branch 'master'
[master 0e847a7] f
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 f.t
ok 1 - setup repository
expecting success:
test-tool serve-v2 --advertise-capabilities >out &&
! grep -a ref-in-want out &&
git config uploadpack.allowRefInWant false &&
test-tool serve-v2 --advertise-capabilities >out &&
! grep -a ref-in-want out &&
git config uploadpack.allowRefInWant true &&
test-tool serve-v2 --advertise-capabilities >out &&
grep -a ref-in-want out
001efetch=shallow ref-in-want
ok 2 - config controls ref-in-want advertisement
expecting success:
test-tool pkt-line pack >in <<-EOF &&
command=fetch
0001
no-progress
want-ref refs/heads/non-existent
done
0000
EOF
test_must_fail test-tool serve-v2 --stateless-rpc 2>out <in &&
grep "unknown ref" out
002bERR unknown ref refs/heads/non-existentfatal: unknown ref refs/heads/non-existent
ok 3 - invalid want-ref line
expecting success:
cat >expected_refs <<-EOF &&
$(git rev-parse f) refs/heads/master
EOF
git rev-parse f | sort >expected_commits &&
test-tool pkt-line pack >in <<-EOF &&
command=fetch
0001
no-progress
want-ref refs/heads/master
have $(git rev-parse a)
done
0000
EOF
test-tool serve-v2 --stateless-rpc >out <in &&
check_output
2cd455c37d1f88f1dd99c20a05dc00950e0b98e4
ok 4 - basic want-ref
expecting success:
cat >expected_refs <<-EOF &&
$(git rev-parse c) refs/heads/o/foo
$(git rev-parse d) refs/heads/o/bar
EOF
git rev-parse c d | sort >expected_commits &&
test-tool pkt-line pack >in <<-EOF &&
command=fetch
0001
no-progress
want-ref refs/heads/o/foo
want-ref refs/heads/o/bar
have $(git rev-parse b)
done
0000
EOF
test-tool serve-v2 --stateless-rpc >out <in &&
check_output
ef76e7a7b2817dc4a77b2e06e9b82a4f147b87d7
ok 5 - multiple want-ref lines
expecting success:
cat >expected_refs <<-EOF &&
$(git rev-parse f) refs/heads/master
EOF
git rev-parse e f | sort >expected_commits &&
test-tool pkt-line pack >in <<-EOF &&
command=fetch
0001
no-progress
want-ref refs/heads/master
want $(git rev-parse e)
have $(git rev-parse a)
done
0000
EOF
test-tool serve-v2 --stateless-rpc >out <in &&
check_output
a3b2910e2bc93b88442ed713e2d9bfba846dfb4a
ok 6 - mix want and want-ref
expecting success:
cat >expected_refs <<-EOF &&
$(git rev-parse c) refs/heads/o/foo
EOF
>expected_commits &&
test-tool pkt-line pack >in <<-EOF &&
command=fetch
0001
no-progress
want-ref refs/heads/o/foo
have $(git rev-parse c)
done
0000
EOF
test-tool serve-v2 --stateless-rpc >out <in &&
check_output
029d08823bd8a8eab510ad6ac75c823cfd3ed31e
ok 7 - want-ref with ref we already have commit for
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
# passed all 7 test(s)
# SKIP no web server found at '/usr/sbin/apache2'
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5616-partial-clone.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5616-partial-clone/.git/
expecting success:
echo "{print \$1}" >print_1.awk &&
echo "{print \$2}" >print_2.awk &&
git init src &&
for n in 1 2 3 4
do
echo "This is file: $n" > src/file.$n.txt
git -C src add file.$n.txt
git -C src commit -m "file $n"
git -C src ls-files -s file.$n.txt >>temp
done &&
awk -f print_2.awk <temp | sort >expect_1.oids &&
test_line_count = 4 expect_1.oids
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5616-partial-clone/src/.git/
[master (root-commit) 97dc692] file 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.1.txt
[master eb4c7e2] file 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.2.txt
[master 69c405c] file 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.3.txt
[master df641c6] file 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.4.txt
ok 1 - setup normal src repo
expecting success:
git clone --bare "file://$(pwd)/src" srv.bare &&
git -C srv.bare config --local uploadpack.allowfilter 1 &&
git -C srv.bare config --local uploadpack.allowanysha1inwant 1
Cloning into bare repository 'srv.bare'...
ok 2 - setup bare clone for server
expecting success:
git clone --no-checkout --filter=blob:none "file://$(pwd)/srv.bare" pc1 &&
git -C pc1 rev-list --quiet --objects --missing=print HEAD >revs &&
awk -f print_1.awk revs |
sed "s/?//" |
sort >observed.oids &&
test_cmp expect_1.oids observed.oids &&
test "$(git -C pc1 config --local core.repositoryformatversion)" = "1" &&
test "$(git -C pc1 config --local extensions.partialclone)" = "origin" &&
test "$(git -C pc1 config --local core.partialclonefilter)" = "blob:none"
Cloning into 'pc1'...
ok 3 - do partial clone 1
expecting success:
git -C pc1 rev-list --quiet --objects --missing=print HEAD >observed &&
test_line_count = 4 observed &&
git -C pc1 checkout master &&
git -C pc1 rev-list --quiet --objects --missing=print HEAD >observed &&
test_line_count = 0 observed
Already on 'master'
Your branch is up to date with 'origin/master'.
ok 4 - verify checkout with dynamic object fetch
expecting success:
git -C src remote add srv "file://$(pwd)/srv.bare" &&
for x in a b c d e
do
echo "Mod file.1.txt $x" >>src/file.1.txt
git -C src add file.1.txt
git -C src commit -m "mod $x"
done &&
git -C src blame master -- file.1.txt >expect.blame &&
git -C src push -u srv master
[master e729342] mod a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 641fb8b] mod b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master d43228f] mod c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master bf2cba3] mod d
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 18d7113] mod e
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
To file:///<<PKGBUILDDIR>>/t/trash directory.t5616-partial-clone/srv.bare
df641c6..18d7113 master -> master
Branch 'master' set up to track remote branch 'master' from 'srv'.
ok 5 - push new commits to server
expecting success:
git -C pc1 fetch origin &&
git -C pc1 rev-list --quiet --objects --missing=print \
master..origin/master >observed &&
test_line_count = 5 observed
From file:///<<PKGBUILDDIR>>/t/trash directory.t5616-partial-clone/srv.bare
df641c6..18d7113 master -> origin/master
ok 6 - partial fetch inherits filter settings
expecting success:
git -C pc1 diff master..origin/master -- file.1.txt &&
git -C pc1 rev-list --quiet --objects --missing=print \
master..origin/master >observed &&
test_line_count = 4 observed
diff --git a/file.1.txt b/file.1.txt
index 54ff69b..5cc7250 100644
--- a/file.1.txt
+++ b/file.1.txt
@@ -1 +1,6 @@
This is file: 1
+Mod file.1.txt a
+Mod file.1.txt b
+Mod file.1.txt c
+Mod file.1.txt d
+Mod file.1.txt e
ok 7 - verify diff causes dynamic object fetch
expecting success:
git -C pc1 blame origin/master -- file.1.txt >observed.blame &&
test_cmp expect.blame observed.blame &&
git -C pc1 rev-list --quiet --objects --missing=print \
master..origin/master >observed &&
test_line_count = 0 observed
ok 8 - verify blame causes dynamic object fetch
expecting success:
for x in a b c d e f
do
echo "Mod file.2.txt $x" >>src/file.2.txt
git -C src add file.2.txt
git -C src commit -m "mod $x"
done &&
git -C src push -u srv master
[master f105082] mod a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 652947d] mod b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 0c4397b] mod c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master baa4721] mod d
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 3409df1] mod e
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 57c66ee] mod f
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
To file:///<<PKGBUILDDIR>>/t/trash directory.t5616-partial-clone/srv.bare
18d7113..57c66ee master -> master
Branch 'master' set up to track remote branch 'master' from 'srv'.
ok 9 - push new commits to server for file.2.txt
expecting success:
git -C pc1 fetch --no-filter origin &&
git -C pc1 rev-list --quiet --objects --missing=print \
master..origin/master >observed &&
test_line_count = 0 observed
From file:///<<PKGBUILDDIR>>/t/trash directory.t5616-partial-clone/srv.bare
18d7113..57c66ee master -> origin/master
ok 10 - override inherited filter-spec using --no-filter
expecting success:
for x in a b c d e f
do
echo "Mod file.3.txt $x" >>src/file.3.txt
git -C src add file.3.txt
git -C src commit -m "mod $x"
done &&
git -C src push -u srv master
[master 2211b04] mod a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 375a4b2] mod b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 1ffda74] mod c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 3e2f3de] mod d
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 2ca902e] mod e
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 56198cd] mod f
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
To file:///<<PKGBUILDDIR>>/t/trash directory.t5616-partial-clone/srv.bare
57c66ee..56198cd master -> master
Branch 'master' set up to track remote branch 'master' from 'srv'.
ok 11 - push new commits to server for file.3.txt
expecting success:
git -C pc1 fetch --filter=blob:none origin &&
git -C pc1 rev-list --quiet --objects --missing=print \
master..origin/master >revs &&
awk -f print_1.awk revs |
sed "s/?//" |
sort >observed.oids &&
test_line_count = 6 observed.oids &&
git -C pc1 fetch-pack --stdin "file://$(pwd)/srv.bare" <observed.oids &&
git -C pc1 rev-list --quiet --objects --missing=print \
master..origin/master >revs &&
awk -f print_1.awk revs |
sed "s/?//" |
sort >observed.oids &&
test_line_count = 0 observed.oids
From file:///<<PKGBUILDDIR>>/t/trash directory.t5616-partial-clone/srv.bare
57c66ee..56198cd master -> origin/master
remote:
remote:
remote: Enumerating objects: 6, done.
remote:
remote:
remote: Counting objects: 16% (1/6)
remote:
remote:
remote: Counting objects: 33% (2/6)
remote:
remote:
remote: Counting objects: 50% (3/6)
remote:
remote:
remote: Counting objects: 66% (4/6)
remote:
remote:
remote: Counting objects: 83% (5/6)
remote:
remote:
remote: Counting objects: 100% (6/6)
remote:
remote:
remote: Counting objects: 100% (6/6), done.
remote:
remote:
remote: Compressing objects: 20% (1/5)
remote:
remote:
remote: Compressing objects: 40% (2/5)
remote:
remote:
remote: Compressing objects: 60% (3/5)
remote:
remote:
remote: Compressing objects: 80% (4/5)
remote:
remote:
remote: Compressing objects: 100% (5/5)
remote:
remote:
remote: Compressing objects: 100% (5/5), done.
remote: Total 6 (delta 4), reused 0 (delta 0)
7724cffe11579f391f6c098265878597ecd1ca74 7724cffe11579f391f6c098265878597ecd1ca74
7c22d416ccef0f2e04b1909d448fa12714ed0c5a 7c22d416ccef0f2e04b1909d448fa12714ed0c5a
7d87eff241fc01757db1d4f2f4710fbaeacd9950 7d87eff241fc01757db1d4f2f4710fbaeacd9950
9f8a0fb67784f4d9b9f81d22baf14c5bead82c7d 9f8a0fb67784f4d9b9f81d22baf14c5bead82c7d
a5e78dc6f3d20c8de85b54d4596946979a89d383 a5e78dc6f3d20c8de85b54d4596946979a89d383
e5f3bec205041acafa4538978741f185e437e1ee e5f3bec205041acafa4538978741f185e437e1ee
ok 12 - manual prefetch of missing objects
expecting success:
git init src &&
test_commit -C src x &&
test_config -C src uploadpack.allowfilter 1 &&
test_config -C src uploadpack.allowanysha1inwant 1 &&
GIT_TRACE="$(pwd)/trace" git -c transfer.fsckobjects=1 \
clone --filter="blob:none" "file://$(pwd)/src" dst &&
grep "git index-pack.*--fsck-objects" trace
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5616-partial-clone/src/.git/
[master 3321f30] x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 x.t
Cloning into 'dst'...
trace: run_command: git index-pack --stdin --fix-thin '--keep=fetch-pack 1281 on mb-lxc-01' --promisor --fsck-objects
trace: built-in: git index-pack --stdin --fix-thin '--keep=fetch-pack 1281 on mb-lxc-01' --promisor --fsck-objects
trace: run_command: git index-pack --stdin --fix-thin --promisor --pack_header=2,5 --fsck-objects
trace: built-in: git index-pack --stdin --fix-thin --promisor --pack_header=2,5 --fsck-objects
ok 13 - partial clone with transfer.fsckobjects=1 uses index-pack --fsck-objects
expecting success:
# push new commit so server has a subtree
mkdir src/dir &&
echo "in dir" >src/dir/file.txt &&
git -C src add dir/file.txt &&
git -C src commit -m "file in dir" &&
git -C src push -u srv master &&
SUBTREE=$(git -C src rev-parse HEAD:dir) &&
rm -rf dst &&
git clone --no-checkout --filter=tree:0 "file://$(pwd)/srv.bare" dst &&
git -C dst fsck &&
# Make sure we only have commits, and all trees and blobs are missing.
git -C dst rev-list --missing=allow-any --objects master \
>fetched_objects &&
awk -f print_1.awk fetched_objects |
xargs -n1 git -C dst cat-file -t >fetched_types &&
sort -u fetched_types >unique_types.observed &&
echo commit >unique_types.expected &&
test_cmp unique_types.expected unique_types.observed &&
# Auto-fetch a tree with cat-file.
git -C dst cat-file -p $SUBTREE >tree_contents &&
grep file.txt tree_contents &&
# fsck still works after an auto-fetch of a tree.
git -C dst fsck &&
# Auto-fetch all remaining trees and blobs with --missing=error
git -C dst rev-list --missing=error --objects master >fetched_objects &&
test_line_count = 70 fetched_objects &&
awk -f print_1.awk fetched_objects |
xargs -n1 git -C dst cat-file -t >fetched_types &&
sort -u fetched_types >unique_types.observed &&
test_write_lines blob commit tree >unique_types.expected &&
test_cmp unique_types.expected unique_types.observed
[master bccbe13] file in dir
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dir/file.txt
To file:///<<PKGBUILDDIR>>/t/trash directory.t5616-partial-clone/srv.bare
56198cd..bccbe13 master -> master
Branch 'master' set up to track remote branch 'master' from 'srv'.
Cloning into 'dst'...
100644 blob d2cebd4f0a9e97a48a6139d09cafdb513ad8fee3 file.txt
dangling tree bc1967ebf96a4e914801c7ef8328140456a10f41
ok 14 - use fsck before and after manually fetching a missing subtree
expecting success:
rm -rf src dst &&
git init src &&
test_commit -C src x &&
test_config -C src uploadpack.allowfilter 1 &&
test_config -C src uploadpack.allowanysha1inwant 1 &&
# Create a tag pointing to a blob.
BLOB=$(echo blob-contents | git -C src hash-object --stdin -w) &&
git -C src tag myblob "$BLOB" &&
git clone --filter="blob:none" "file://$(pwd)/src" dst 2>err &&
! grep "does not point to a valid object" err &&
git -C dst fsck
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5616-partial-clone/src/.git/
[master (root-commit) 6f481db] x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 x.t
ok 15 - partial clone fetches blobs pointed to by refs even if normally filtered out
expecting success:
rm -rf src dst.git &&
git init src &&
test_commit -C src foo &&
test_config -C src uploadpack.allowfilter 1 &&
test_config -C src uploadpack.allowanysha1inwant 1 &&
git hash-object --stdin <src/foo.t >blob &&
git clone --bare --filter=blob:none "file://$(pwd)/src" dst.git &&
git -C dst.git rev-list --objects --quiet --missing=print HEAD >missing_before &&
grep "?$(cat blob)" missing_before &&
git -C dst.git fetch origin $(cat blob) &&
git -C dst.git rev-list --objects --quiet --missing=print HEAD >missing_after &&
! grep "?$(cat blob)" missing_after
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5616-partial-clone/src/.git/
[master (root-commit) 31f3b95] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
Cloning into bare repository 'dst.git'...
?257cc5642cb1a054f08cc83f2d943e56fd3ebe99
From file:///<<PKGBUILDDIR>>/t/trash directory.t5616-partial-clone/src
* branch 257cc5642cb1a054f08cc83f2d943e56fd3ebe99 -> FETCH_HEAD
ok 16 - fetch what is specified on CLI even if already promised
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
# passed all 16 test(s)
# SKIP no web server found at '/usr/sbin/apache2'
1..16
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5802-connect-helper.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5802-connect-helper/.git/
expecting success:
git config --global protocol.ext.allow user &&
test_tick &&
git commit --allow-empty -m initial &&
test_tick &&
git commit --allow-empty -m second &&
test_tick &&
git commit --allow-empty -m third &&
test_tick &&
git tag -a -m "tip three" three &&
test_tick &&
git commit --allow-empty -m fourth
[master (root-commit) 66fe8b3] initial
Author: A U Thor <author@example.com>
[master 5ce2b00] second
Author: A U Thor <author@example.com>
[master 8019b76] third
Author: A U Thor <author@example.com>
[master b0c6cf2] fourth
Author: A U Thor <author@example.com>
ok 1 - setup
expecting success:
cmd=$(echo "echo >&2 ext::sh invoked && %S .." | sed -e "s/ /% /g") &&
git clone "ext::sh -c %S% ." dst &&
git for-each-ref refs/heads/ refs/tags/ >expect &&
(
cd dst &&
git config remote.origin.url "ext::sh -c $cmd" &&
git for-each-ref refs/heads/ refs/tags/
) >actual &&
test_cmp expect actual
Cloning into 'dst'...
ok 2 - clone
expecting success:
test_tick &&
git commit --allow-empty -m fifth &&
test_tick &&
git tag -a -m "tip five" five &&
git for-each-ref refs/heads/ refs/tags/ >expect &&
(
cd dst &&
git pull &&
git for-each-ref refs/heads/ refs/tags/ >../actual
) &&
test_cmp expect actual
[master a643494] fifth
Author: A U Thor <author@example.com>
ext::sh invoked
From ext::sh -c echo% >&2% ext::sh% invoked% &&% %S% ..
b0c6cf2..a643494 master -> origin/master
* [new tag] five -> five
Updating b0c6cf2..a643494
Fast-forward
ok 3 - update following tag
expecting success:
test_tick &&
git commit --allow-empty -m sixth &&
test_tick &&
git tag -a -m "tip two" two three^1 &&
git for-each-ref refs/heads/ refs/tags/ >expect &&
(
cd dst &&
git pull &&
git for-each-ref refs/heads/ refs/tags/ >../actual
) &&
test_cmp expect actual
[master 06b114e] sixth
Author: A U Thor <author@example.com>
ext::sh invoked
From ext::sh -c echo% >&2% ext::sh% invoked% &&% %S% ..
a643494..06b114e master -> origin/master
* [new tag] two -> two
Updating a643494..06b114e
Fast-forward
ok 4 - update backfilled tag
expecting success:
test_tick &&
git tag -a -m "tip one " one two^1 &&
git for-each-ref refs/heads/ refs/tags/ >expect &&
(
cd dst &&
git pull &&
git for-each-ref refs/heads/ refs/tags/ >../actual
) &&
test_cmp expect actual
ext::sh invoked
From ext::sh -c echo% >&2% ext::sh% invoked% &&% %S% ..
* [new tag] one -> one
Already up to date.
ok 5 - update backfilled tag without primary transfer
expecting success:
mkdir remote &&
git init --bare remote/one.git &&
mkdir remote/host &&
git init --bare remote/host/two.git &&
write_script fake-daemon <<-\EOF &&
git daemon --inetd \
--informative-errors \
--export-all \
--base-path="$TRASH_DIRECTORY/remote" \
--interpolated-path="$TRASH_DIRECTORY/remote/%H%D" \
"$TRASH_DIRECTORY/remote"
EOF
export TRASH_DIRECTORY &&
PATH=$TRASH_DIRECTORY:$PATH
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5802-connect-helper/remote/one.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5802-connect-helper/remote/host/two.git/
ok 6 - set up fake git-daemon
expecting success:
rm -rf dst &&
git clone "ext::fake-daemon %G/one.git" dst
Cloning into 'dst'...
warning: You appear to have cloned an empty repository.
ok 7 - ext command can connect to git daemon (no vhost)
expecting success:
rm -rf dst &&
git clone "ext::fake-daemon %G/two.git %Vhost" dst
Cloning into 'dst'...
warning: You appear to have cloned an empty repository.
ok 8 - ext command can connect to git daemon (vhost)
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5702-protocol-v2.sh ***
checking prerequisite: PIPE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports FIFOs
test_have_prereq !MINGW,!CYGWIN &&
rm -f testfifo && mkfifo testfifo
)
prerequisite PIPE ok
Starting git daemon ...
[2532] Ready to rumble
expecting success:
git init "$daemon_parent" &&
test_commit -C "$daemon_parent" one
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/repo/parent/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 1 - create repo to be served by git-daemon
expecting success:
test_when_finished "rm -f log" &&
GIT_TRACE_PACKET="$(pwd)/log" git -c protocol.version=2 \
ls-remote --symref "$GIT_DAEMON_URL/parent" >actual &&
# Client requested to use protocol v2
grep "git> .*\\\0\\\0version=2\\\0$" log &&
# Server responded using protocol v2
grep "git< version 2" log &&
git ls-remote --symref "$GIT_DAEMON_URL/parent" >expect &&
test_cmp expect actual
[2589] Connection from 127.0.0.1:59312
[2589] Extended attribute "host": 127.0.0.1:5702
[2589] Extended attribute "protocol": version=2
[2589] Request upload-pack for '/parent'
[2532] [2589] Disconnected
packet: git> git-upload-pack /parent\0host=127.0.0.1:5702\0\0version=2\0
packet: git< version 2
[2632] Connection from 127.0.0.1:59314
[2632] Extended attribute "host": 127.0.0.1:5702
[2632] Request upload-pack for '/parent'
[2532] [2632] Disconnected
ok 2 - list refs with git:// using protocol v2
expecting success:
test_when_finished "rm -f log" &&
GIT_TRACE_PACKET="$(pwd)/log" git -c protocol.version=2 \
ls-remote "$GIT_DAEMON_URL/parent" master >actual &&
cat >expect <<-EOF &&
$(git -C "$daemon_parent" rev-parse refs/heads/master)$(printf "\t")refs/heads/master
EOF
test_cmp expect actual
[2656] Connection from 127.0.0.1:59316
[2656] Extended attribute "host": 127.0.0.1:5702
[2656] Extended attribute "protocol": version=2
[2656] Request upload-pack for '/parent'
[2532] [2656] Disconnected
ok 3 - ref advertisment is filtered with ls-remote using protocol v2
expecting success:
test_when_finished "rm -f log" &&
GIT_TRACE_PACKET="$(pwd)/log" git -c protocol.version=2 \
clone "$GIT_DAEMON_URL/parent" daemon_child &&
git -C daemon_child log -1 --format=%s >actual &&
git -C "$daemon_parent" log -1 --format=%s >expect &&
test_cmp expect actual &&
# Client requested to use protocol v2
grep "clone> .*\\\0\\\0version=2\\\0$" log &&
# Server responded using protocol v2
grep "clone< version 2" log
Cloning into 'daemon_child'...
[2747] Connection from 127.0.0.1:59318
[2747] Extended attribute "host": 127.0.0.1:5702
[2747] Extended attribute "protocol": version=2
[2747] Request upload-pack for '/parent'
[2532] [2747] Disconnected
packet: clone> git-upload-pack /parent\0host=127.0.0.1:5702\0\0version=2\0
packet: clone< version 2
ok 4 - clone with git:// using protocol v2
expecting success:
test_when_finished "rm -f log" &&
test_commit -C "$daemon_parent" two &&
GIT_TRACE_PACKET="$(pwd)/log" git -C daemon_child -c protocol.version=2 \
fetch &&
git -C daemon_child log -1 --format=%s origin/master >actual &&
git -C "$daemon_parent" log -1 --format=%s >expect &&
test_cmp expect actual &&
# Client requested to use protocol v2
grep "fetch> .*\\\0\\\0version=2\\\0$" log &&
# Server responded using protocol v2
grep "fetch< version 2" log
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[2898] Connection from 127.0.0.1:59320
[2898] Extended attribute "host": 127.0.0.1:5702
[2898] Extended attribute "protocol": version=2
[2898] Request upload-pack for '/parent'
[2532] [2898] Disconnected
From git://127.0.0.1:5702/parent
d79ce16..139b20d master -> origin/master
* [new tag] two -> two
packet: fetch> git-upload-pack /parent\0host=127.0.0.1:5702\0\0version=2\0
packet: fetch< version 2
ok 5 - fetch with git:// using protocol v2
expecting success:
test_when_finished "rm -f log" &&
test_commit -C "$daemon_parent" two_a &&
git -C "$daemon_parent" rev-parse two_a >two_a_hash &&
GIT_TRACE_PACKET="$(pwd)/log" git -C daemon_child -c protocol.version=2 \
fetch --no-tags origin $(cat two_a_hash) &&
grep "fetch< version 2" log &&
! grep "fetch> command=ls-refs" log
[master 7e9f7d0] two_a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two_a.t
[3042] Connection from 127.0.0.1:59322
[3042] Extended attribute "host": 127.0.0.1:5702
[3042] Extended attribute "protocol": version=2
[3042] Request upload-pack for '/parent'
[2532] [3042] Disconnected
From git://127.0.0.1:5702/parent
* branch 7e9f7d092ed45f242659c87db76fd08923e99801 -> FETCH_HEAD
packet: fetch< version 2
ok 6 - fetch by hash without tag following with protocol v2 does not list refs
expecting success:
test_when_finished "rm -f log" &&
GIT_TRACE_PACKET="$(pwd)/log" git -C daemon_child -c protocol.version=2 \
pull &&
git -C daemon_child log -1 --format=%s >actual &&
git -C "$daemon_parent" log -1 --format=%s >expect &&
test_cmp expect actual &&
# Client requested to use protocol v2
grep "fetch> .*\\\0\\\0version=2\\\0$" log &&
# Server responded using protocol v2
grep "fetch< version 2" log
[3094] Connection from 127.0.0.1:59324
[3094] Extended attribute "host": 127.0.0.1:5702
[3094] Extended attribute "protocol": version=2
[3094] Request upload-pack for '/parent'
From git://127.0.0.1:5702/parent
139b20d..7e9f7d0 master -> origin/master
* [new tag] two_a -> two_a
[2532] [3094] Disconnected
Updating d79ce16..7e9f7d0
Fast-forward
two.t | 1 +
two_a.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 two.t
create mode 100644 two_a.t
packet: fetch> git-upload-pack /parent\0host=127.0.0.1:5702\0\0version=2\0
packet: fetch< version 2
ok 7 - pull with git:// using protocol v2
expecting success:
test_when_finished "rm -f log" &&
# Till v2 for push is designed, make sure that if a client has
# protocol.version configured to use v2, that the client instead falls
# back and uses v0.
test_commit -C daemon_child three &&
# Push to another branch, as the target repository has the
# master branch checked out and we cannot push into it.
GIT_TRACE_PACKET="$(pwd)/log" git -C daemon_child -c protocol.version=2 \
push origin HEAD:client_branch &&
git -C daemon_child log -1 --format=%s >actual &&
git -C "$daemon_parent" log -1 --format=%s client_branch >expect &&
test_cmp expect actual &&
# Client requested to use protocol v2
! grep "push> .*\\\0\\\0version=2\\\0$" log &&
# Server responded using protocol v2
! grep "push< version 2" log
[master 166f565] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
[3232] Connection from 127.0.0.1:59326
[3232] Extended attribute "host": 127.0.0.1:5702
[3232] Request receive-pack for '/parent'
To git://127.0.0.1:5702/parent
* [new branch] HEAD -> client_branch
[2532] [3232] Disconnected
ok 8 - push with git:// and a config of v2 does not request v2
Stopping git daemon ...
expecting success:
git init file_parent &&
test_commit -C file_parent one
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/file_parent/.git/
[master (root-commit) 6f4b17f] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 9 - create repo to be served by file:// transport
expecting success:
test_when_finished "rm -f log" &&
GIT_TRACE_PACKET="$(pwd)/log" git -c protocol.version=2 \
ls-remote --symref "file://$(pwd)/file_parent" >actual &&
# Server responded using protocol v2
grep "git< version 2" log &&
git ls-remote --symref "file://$(pwd)/file_parent" >expect &&
test_cmp expect actual
packet: git< version 2
ok 10 - list refs with file:// using protocol v2
expecting success:
test_when_finished "rm -f log" &&
GIT_TRACE_PACKET="$(pwd)/log" git -c protocol.version=2 \
ls-remote "file://$(pwd)/file_parent" master >actual &&
cat >expect <<-EOF &&
$(git -C file_parent rev-parse refs/heads/master)$(printf "\t")refs/heads/master
EOF
test_cmp expect actual
ok 11 - ref advertisment is filtered with ls-remote using protocol v2
expecting success:
test_when_finished "rm -f log" &&
GIT_TRACE_PACKET="$(pwd)/log" git -c protocol.version=2 \
ls-remote -o hello -o world "file://$(pwd)/file_parent" master >actual &&
cat >expect <<-EOF &&
$(git -C file_parent rev-parse refs/heads/master)$(printf "\t")refs/heads/master
EOF
test_cmp expect actual &&
grep "server-option=hello" log &&
grep "server-option=world" log
packet: git> server-option=hello
packet: upload-pack< server-option=hello
packet: git> server-option=world
packet: upload-pack< server-option=world
ok 12 - server-options are sent when using ls-remote
expecting success:
test_must_fail env GIT_TEST_PROTOCOL_VERSION=0 git -c protocol.version=0 \
ls-remote -o hello -o world "file://$(pwd)/file_parent" master 2>err &&
test_i18ngrep "see protocol.version in" err &&
test_i18ngrep "server options require protocol version 2 or later" err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
hint: see protocol.version in 'git help config' for more details
fatal: server options require protocol version 2 or later
ok 13 - warn if using server-option with ls-remote with legacy protocol
expecting success:
test_when_finished "rm -f log" &&
GIT_TRACE_PACKET="$(pwd)/log" git -c protocol.version=2 \
clone "file://$(pwd)/file_parent" file_child &&
git -C file_child log -1 --format=%s >actual &&
git -C file_parent log -1 --format=%s >expect &&
test_cmp expect actual &&
# Server responded using protocol v2
grep "clone< version 2" log &&
# Client sent ref-prefixes to filter the ref-advertisement
grep "ref-prefix HEAD" log &&
grep "ref-prefix refs/heads/" log &&
grep "ref-prefix refs/tags/" log
Cloning into 'file_child'...
packet: clone< version 2
packet: clone> ref-prefix HEAD
packet: upload-pack< ref-prefix HEAD
packet: clone> ref-prefix refs/heads/
packet: upload-pack< ref-prefix refs/heads/
packet: clone> ref-prefix refs/tags/
packet: upload-pack< ref-prefix refs/tags/
ok 14 - clone with file:// using protocol v2
expecting success:
test_when_finished "rm -f log" &&
test_commit -C file_parent two &&
GIT_TRACE_PACKET="$(pwd)/log" git -C file_child -c protocol.version=2 \
fetch origin &&
git -C file_child log -1 --format=%s origin/master >actual &&
git -C file_parent log -1 --format=%s >expect &&
test_cmp expect actual &&
# Server responded using protocol v2
grep "fetch< version 2" log
[master 5c4888c] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
From file:///<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/file_parent
6f4b17f..5c4888c master -> origin/master
* [new tag] two -> two
packet: fetch< version 2
ok 15 - fetch with file:// using protocol v2
expecting success:
test_when_finished "rm -f log" &&
test_commit -C file_parent three &&
git -C file_parent branch unwanted-branch three &&
GIT_TRACE_PACKET="$(pwd)/log" git -C file_child -c protocol.version=2 \
fetch origin master &&
git -C file_child log -1 --format=%s origin/master >actual &&
git -C file_parent log -1 --format=%s >expect &&
test_cmp expect actual &&
grep "refs/heads/master" log &&
! grep "refs/heads/unwanted-branch" log
[master 3fa1c23] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
From file:///<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/file_parent
* branch master -> FETCH_HEAD
5c4888c..3fa1c23 master -> origin/master
packet: fetch> ref-prefix refs/heads/master
packet: upload-pack< ref-prefix refs/heads/master
packet: upload-pack> 3fa1c2361a0cae4d34ddb1469c03fc84cd2e36bb refs/heads/master
packet: fetch< 3fa1c2361a0cae4d34ddb1469c03fc84cd2e36bb refs/heads/master
ok 16 - ref advertisment is filtered during fetch using protocol v2
expecting success:
test_when_finished "rm -f log" &&
test_commit -C file_parent four &&
GIT_TRACE_PACKET="$(pwd)/log" git -C file_child -c protocol.version=2 \
fetch -o hello -o world origin master &&
git -C file_child log -1 --format=%s origin/master >actual &&
git -C file_parent log -1 --format=%s >expect &&
test_cmp expect actual &&
grep "server-option=hello" log &&
grep "server-option=world" log
[master acc6f16] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 four.t
From file:///<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/file_parent
* branch master -> FETCH_HEAD
3fa1c23..acc6f16 master -> origin/master
packet: fetch> server-option=hello
packet: upload-pack< server-option=hello
packet: fetch> server-option=hello
packet: upload-pack< server-option=hello
packet: fetch> server-option=world
packet: upload-pack< server-option=world
packet: fetch> server-option=world
packet: upload-pack< server-option=world
ok 17 - server-options are sent when fetching
expecting success:
test_when_finished "rm -rf temp_child" &&
git init temp_child &&
test_must_fail env GIT_TEST_PROTOCOL_VERSION=0 git -C temp_child -c protocol.version=0 \
fetch -o hello -o world "file://$(pwd)/file_parent" master 2>err &&
test_i18ngrep "see protocol.version in" err &&
test_i18ngrep "server options require protocol version 2 or later" err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/temp_child/.git/
hint: see protocol.version in 'git help config' for more details
fatal: server options require protocol version 2 or later
ok 18 - warn if using server-option with fetch with legacy protocol
expecting success:
test_when_finished "rm -rf log myclone" &&
GIT_TRACE_PACKET="$(pwd)/log" git -c protocol.version=2 \
clone --server-option=hello --server-option=world \
"file://$(pwd)/file_parent" myclone &&
grep "server-option=hello" log &&
grep "server-option=world" log
Cloning into 'myclone'...
packet: clone> server-option=hello
packet: upload-pack< server-option=hello
packet: clone> server-option=hello
packet: upload-pack< server-option=hello
packet: clone> server-option=world
packet: upload-pack< server-option=world
packet: clone> server-option=world
packet: upload-pack< server-option=world
ok 19 - server-options are sent when cloning
expecting success:
test_when_finished "rm -rf myclone" &&
test_must_fail env GIT_TEST_PROTOCOL_VERSION=0 git -c protocol.version=0 \
clone --server-option=hello --server-option=world \
"file://$(pwd)/file_parent" myclone 2>err &&
test_i18ngrep "see protocol.version in" err &&
test_i18ngrep "server options require protocol version 2 or later" err
hint: see protocol.version in 'git help config' for more details
fatal: server options require protocol version 2 or later
ok 20 - warn if using server-option with clone with legacy protocol
expecting success:
git init server &&
write_script server/.git/hook <<-\EOF &&
touch hookout
"$@"
EOF
test_commit -C server one &&
test_config_global uploadpack.packobjectshook ./hook &&
test_path_is_missing server/.git/hookout &&
git -c protocol.version=2 clone "file://$(pwd)/server" client &&
test_path_is_file server/.git/hookout
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/server/.git/
[master (root-commit) 0ba3da9] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Cloning into 'client'...
ok 21 - upload-pack respects config using protocol v2
expecting success:
rm -rf server client &&
git init server &&
# 1 commit to create a file, and 1 commit to modify it
test_commit -C server message1 a.txt &&
test_commit -C server message2 a.txt &&
git -C server config protocol.version 2 &&
git -C server config uploadpack.allowfilter 1 &&
git -C server config uploadpack.allowanysha1inwant 1 &&
git -C server config protocol.version 2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/server/.git/
[master (root-commit) 9f9a637] message1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a.txt
[master 3b911b1] message2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 22 - setup filter tests
expecting success:
GIT_TRACE_PACKET="$(pwd)/trace" git -c protocol.version=2 \
clone --filter=blob:none "file://$(pwd)/server" client &&
grep "version 2" trace &&
# Ensure that the old version of the file is missing
git -C client rev-list --quiet --objects --missing=print master \
>observed.oids &&
grep "$(git -C server rev-parse message1:a.txt)" observed.oids &&
# Ensure that client passes fsck
git -C client fsck
Cloning into 'client'...
packet: upload-pack> version 2
packet: clone< version 2
packet: upload-pack> version 2
packet: clone< version 2
?8045c300940c3b486923ccfc4dc22e72d1a10616
ok 23 - partial clone
expecting success:
rm "$(pwd)/trace" &&
GIT_TRACE_PACKET="$(pwd)/trace" git -C client -c protocol.version=2 \
cat-file -p $(git -C server rev-parse message1:a.txt) &&
grep "version 2" trace
message1
packet: upload-pack> version 2
packet: git< version 2
ok 24 - dynamically fetch missing object
expecting success:
! grep "git> command=ls-refs" trace
ok 25 - when dynamically fetching missing object, do not list refs
expecting success:
rm -rf client "$(pwd)/trace" &&
git init client &&
SERVER="file://$(pwd)/server" &&
test_config -C client extensions.partialClone "$SERVER" &&
GIT_TRACE_PACKET="$(pwd)/trace" git -C client -c protocol.version=2 \
fetch --filter=blob:none "$SERVER" master:refs/heads/other &&
grep "version 2" trace &&
# Ensure that the old version of the file is missing
git -C client rev-list --quiet --objects --missing=print other \
>observed.oids &&
grep "$(git -C server rev-parse message1:a.txt)" observed.oids &&
# Ensure that client passes fsck
git -C client fsck
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/client/.git/
From file:///<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/server
* [new branch] master -> other
* [new tag] message2 -> message2
* [new tag] message1 -> message1
packet: upload-pack> version 2
packet: fetch< version 2
?8045c300940c3b486923ccfc4dc22e72d1a10616
notice: HEAD points to an unborn branch (master)
ok 26 - partial fetch
expecting success:
SERVER="file://$(pwd)/server" &&
rm "$(pwd)/trace" &&
git -C server config uploadpack.allowfilter 1 &&
GIT_TRACE_PACKET="$(pwd)/trace" git -c protocol.version=2 \
ls-remote "$SERVER" &&
grep "fetch=.*filter" trace &&
rm "$(pwd)/trace" &&
git -C server config uploadpack.allowfilter 0 &&
GIT_TRACE_PACKET="$(pwd)/trace" git -c protocol.version=2 \
ls-remote "$SERVER" &&
grep "fetch=" trace >fetch_capabilities &&
! grep filter fetch_capabilities
3b911b1bf820401c718047588b81902d5b7458b9 HEAD
3b911b1bf820401c718047588b81902d5b7458b9 refs/heads/master
9f9a637008eb8a901bafbb20928b41749ad6d174 refs/tags/message1
3b911b1bf820401c718047588b81902d5b7458b9 refs/tags/message2
packet: upload-pack> fetch=shallow filter
packet: git< fetch=shallow filter
3b911b1bf820401c718047588b81902d5b7458b9 HEAD
3b911b1bf820401c718047588b81902d5b7458b9 refs/heads/master
9f9a637008eb8a901bafbb20928b41749ad6d174 refs/tags/message1
3b911b1bf820401c718047588b81902d5b7458b9 refs/tags/message2
ok 27 - do not advertise filter if not configured to do so
expecting success:
rm -rf client &&
git -C server config uploadpack.allowfilter 0 &&
git -c protocol.version=2 \
clone --filter=blob:none "file://$(pwd)/server" client 2>err &&
test_i18ngrep "filtering not recognized by server, ignoring" err
warning: filtering not recognized by server, ignoring
ok 28 - partial clone warns if filter is not advertised
expecting success:
git -C server config uploadpack.allowfilter 0 &&
# Custom request that tries to filter even though it is not advertised.
test-tool pkt-line pack >in <<-EOF &&
command=fetch
0001
want $(git -C server rev-parse master)
filter blob:none
0000
EOF
test_must_fail test-tool -C server serve-v2 --stateless-rpc \
<in >/dev/null 2>err &&
grep "unexpected line: .filter blob:none." err &&
# Exercise to ensure that if advertised, filter works
git -C server config uploadpack.allowfilter 1 &&
test-tool -C server serve-v2 --stateless-rpc <in >/dev/null
fatal: unexpected line: 'filter blob:none'
ok 29 - even with handcrafted request, filter does not work if not advertised
expecting success:
test_when_finished "rm -f log" &&
GIT_TRACE_PACKET="$(pwd)/log" git -C file_child -c protocol.version=2 \
fetch origin &&
git -C file_child log -1 --format=%s three >actual &&
git -C file_parent log -1 --format=%s three >expect &&
test_cmp expect actual &&
grep "ref-prefix refs/heads/" log &&
grep "ref-prefix refs/tags/" log
From file:///<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/file_parent
* [new branch] unwanted-branch -> origin/unwanted-branch
* [new tag] four -> four
* [new tag] three -> three
packet: fetch> ref-prefix refs/heads/
packet: upload-pack< ref-prefix refs/heads/
packet: fetch> ref-prefix refs/tags/
packet: upload-pack< ref-prefix refs/tags/
ok 30 - default refspec is used to filter ref when fetchcing
expecting success:
rm -rf server client trace &&
git init server &&
test_commit -C server dwim &&
TREE=$(git -C server rev-parse HEAD^{tree}) &&
git -C server tag exact \
$(git -C server commit-tree -m a "$TREE") &&
git -C server tag dwim-unwanted \
$(git -C server commit-tree -m b "$TREE") &&
git -C server tag exact-unwanted \
$(git -C server commit-tree -m c "$TREE") &&
git -C server tag prefix1 \
$(git -C server commit-tree -m d "$TREE") &&
git -C server tag prefix2 \
$(git -C server commit-tree -m e "$TREE") &&
git -C server tag fetch-by-sha1 \
$(git -C server commit-tree -m f "$TREE") &&
git -C server tag completely-unrelated \
$(git -C server commit-tree -m g "$TREE") &&
git init client &&
GIT_TRACE_PACKET="$(pwd)/trace" git -C client -c protocol.version=2 \
fetch "file://$(pwd)/server" \
dwim \
refs/tags/exact \
refs/tags/prefix*:refs/tags/prefix* \
"$(git -C server rev-parse fetch-by-sha1)" &&
# Ensure that the appropriate prefixes are sent (using a sample)
grep "fetch> ref-prefix dwim" trace &&
grep "fetch> ref-prefix refs/heads/dwim" trace &&
grep "fetch> ref-prefix refs/tags/prefix" trace &&
# Ensure that the correct objects are returned
git -C client cat-file -e $(git -C server rev-parse dwim) &&
git -C client cat-file -e $(git -C server rev-parse exact) &&
git -C client cat-file -e $(git -C server rev-parse prefix1) &&
git -C client cat-file -e $(git -C server rev-parse prefix2) &&
git -C client cat-file -e $(git -C server rev-parse fetch-by-sha1) &&
test_must_fail git -C client cat-file -e \
$(git -C server rev-parse dwim-unwanted) &&
test_must_fail git -C client cat-file -e \
$(git -C server rev-parse exact-unwanted) &&
test_must_fail git -C client cat-file -e \
$(git -C server rev-parse completely-unrelated)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/server/.git/
[master (root-commit) 7f427d6] dwim
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dwim.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/client/.git/
From file:///<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/server
* tag dwim -> FETCH_HEAD
* tag exact -> FETCH_HEAD
* [new tag] prefix1 -> prefix1
* [new tag] prefix2 -> prefix2
* branch 6e00395e552e1231e0d9bf16c819be5a25ec09bf -> FETCH_HEAD
* [new tag] dwim -> dwim
* [new tag] exact -> exact
* [new tag] fetch-by-sha1 -> fetch-by-sha1
packet: fetch> ref-prefix dwim
packet: fetch> ref-prefix refs/heads/dwim
packet: fetch> ref-prefix refs/tags/prefix
ok 31 - fetch supports various ways of have lines
expecting success:
rm -rf server client trace &&
git init server &&
test_commit -C server to_fetch &&
git -C server tag -a annotated_tag -m message &&
git init client &&
GIT_TRACE_PACKET="$(pwd)/trace" git -C client -c protocol.version=2 \
fetch "$(pwd)/server" to_fetch:to_fetch &&
grep "fetch> ref-prefix to_fetch" trace &&
grep "fetch> ref-prefix refs/tags/" trace &&
grep "fetch> include-tag" trace &&
git -C client cat-file -e $(git -C client rev-parse annotated_tag)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/server/.git/
[master (root-commit) 23facce] to_fetch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 to_fetch.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/client/.git/
From /<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/server
* [new tag] to_fetch -> to_fetch
* [new tag] annotated_tag -> annotated_tag
* [new tag] to_fetch -> to_fetch
packet: fetch> ref-prefix to_fetch
packet: fetch> ref-prefix refs/tags/to_fetch
packet: fetch> ref-prefix refs/tags/
packet: fetch> include-tag
ok 32 - fetch supports include-tag and tag following
expecting success:
rm -rf server client trace &&
git init server &&
test_commit -C server base &&
test_commit -C server client_has &&
git clone --depth=1 "file://$(pwd)/server" client &&
# Add extra commits to the client so that the whole fetch takes more
# than 1 request (due to negotiation)
test_commit_bulk -C client --id=c 32 &&
git -C server checkout -b newbranch base &&
test_commit -C server client_wants &&
GIT_TRACE_PACKET="$(pwd)/trace" git -C client -c protocol.version=2 \
fetch origin newbranch &&
# Ensure that protocol v2 is used
grep "fetch< version 2" trace
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/server/.git/
[master (root-commit) 7011515] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 base.t
[master 35d129e] client_has
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 client_has.t
Cloning into 'client'...
35d129e7baa6ee4831bcbeb900efe4a30c2ed8b7
/<<PKGBUILDDIR>>/git-fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects: 5000
Total objects: 96 ( 0 duplicates )
blobs : 32 ( 0 duplicates 0 deltas of 0 attempts)
trees : 32 ( 0 duplicates 31 deltas of 31 attempts)
commits: 32 ( 0 duplicates 0 deltas of 0 attempts)
tags : 0 ( 0 duplicates 0 deltas of 0 attempts)
Total branches: 1 ( 1 loads )
marks: 1024 ( 0 unique )
atoms: 34
Memory total: 2395 KiB
pools: 2122 KiB
objects: 273 KiB
---------------------------------------------------------------------
pack_report: getpagesize() = 4096
pack_report: core.packedGitWindowSize = 33554432
pack_report: core.packedGitLimit = 268435456
pack_report: pack_used_ctr = 37
pack_report: pack_mmap_calls = 2
pack_report: pack_open_windows = 2 / 2
pack_report: pack_mapped = 7448 / 7448
---------------------------------------------------------------------
Your branch is ahead of 'origin/master' by 32 commits.
(use "git push" to publish your local commits)
Switched to a new branch 'newbranch'
[newbranch c382fc6] client_wants
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 client_wants.t
From file:///<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/server
* branch newbranch -> FETCH_HEAD
packet: fetch< version 2
ok 33 - upload-pack respects client shallows
expecting success:
rm -rf server client trace &&
test_create_repo server &&
test_commit -C server one &&
test_commit -C server two &&
test_commit -C server three &&
git clone --shallow-exclude two "file://$(pwd)/server" client &&
git -C server tag -a -m "an annotated tag" twotag two &&
# Triggers tag following (thus, 2 fetches in one process)
GIT_TRACE_PACKET="$(pwd)/trace" git -C client -c protocol.version=2 \
fetch --shallow-exclude one origin &&
# Ensure that protocol v2 is used
grep "fetch< version 2" trace
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/server/.git/
[master (root-commit) 1581e3e] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 5680d21] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[master 94705d7] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
Cloning into 'client'...
From file:///<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/server
* [new tag] two -> two
* [new tag] twotag -> twotag
packet: fetch< version 2
packet: fetch< version 2
ok 34 - ensure that multiple fetches in same process from a shallow repo works
expecting success:
rm -rf server client trace &&
test_create_repo server &&
test_commit -C server one &&
test_commit -C server two &&
test_commit -C server three &&
git clone --depth 1 "file://$(pwd)/server" client &&
test_commit -C server four &&
# Sanity check that only "three" is downloaded
git -C client log --pretty=tformat:%s master >actual &&
echo three >expected &&
test_cmp expected actual &&
GIT_TRACE_PACKET="$(pwd)/trace" git -C client -c protocol.version=2 \
fetch --deepen=1 origin &&
# Ensure that protocol v2 is used
grep "fetch< version 2" trace &&
git -C client log --pretty=tformat:%s origin/master >actual &&
cat >expected <<-\EOF &&
four
three
two
EOF
test_cmp expected actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/server/.git/
[master (root-commit) 3735e1b] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 581c9db] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[master f6e0668] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
Cloning into 'client'...
[master e79f779] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 four.t
From file:///<<PKGBUILDDIR>>/t/trash directory.t5702-protocol-v2/server
f6e0668..e79f779 master -> origin/master
* [new tag] four -> four
* [new tag] two -> two
packet: fetch< version 2
packet: fetch< version 2
ok 35 - deepen-relative
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
# passed all 35 test(s)
# SKIP no web server found at '/usr/sbin/apache2'
1..35
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5801-remote-helpers.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/.git/
expecting success:
git init server &&
(cd server &&
echo content >file &&
git add file &&
git commit -m one)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server/.git/
[master (root-commit) 050bc64] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 1 - setup repository
expecting success:
git clone "testgit::${PWD}/server" local &&
test_cmp server/file local/file
Cloning into 'local'...
ok 2 - cloning from local repo
expecting success:
(cd server &&
echo content >>file &&
git commit -a -m two)
[master 4d6a13d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 3 - create new commit on remote
expecting success:
(cd local && git pull) &&
test_cmp server/file local/file
From testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server
050bc64..4d6a13d master -> origin/master
Updating 050bc64..4d6a13d
Fast-forward
file | 1 +
1 file changed, 1 insertion(+)
ok 4 - pulling from local repo
expecting success:
(cd local &&
echo content >>file &&
git commit -a -m three &&
git push) &&
compare_refs local HEAD server HEAD
[master 5cdb4ec] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
To testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server
4d6a13d..5cdb4ec master -> master
ok 5 - pushing to local repo
expecting success:
(cd server &&
git reset --hard &&
git checkout -b new &&
echo content >>file &&
git commit -a -m five
) &&
(cd local &&
git fetch origin new
) &&
compare_refs server HEAD local FETCH_HEAD
HEAD is now at 5cdb4ec three
Switched to a new branch 'new'
[new cb71714] five
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
From testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server
* branch new -> FETCH_HEAD
* [new branch] new -> origin/new
ok 6 - fetch new branch
expecting success:
(cd local &&
git fetch
) &&
compare_refs server master local refs/remotes/origin/master &&
compare_refs server new local refs/remotes/origin/new
ok 7 - fetch multiple branches
expecting success:
(cd local &&
git reset --hard origin/master &&
echo content >>file &&
git commit -a -m six &&
git push
) &&
compare_refs local master server master
HEAD is now at 5cdb4ec three
[master 49b14b0] six
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
To testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server
5cdb4ec..49b14b0 master -> master
ok 8 - push when remote has extra refs
expecting success:
(cd local &&
git checkout -b new-name &&
echo content >>file &&
git commit -a -m seven &&
git push origin new-name
) &&
compare_refs local HEAD server refs/heads/new-name
Switched to a new branch 'new-name'
[new-name 017261e] seven
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
To testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server
* [new branch] new-name -> new-name
ok 9 - push new branch by name
expecting success:
(cd local &&
git push origin new-name:new-refspec
) &&
compare_refs local HEAD server refs/heads/new-refspec
To testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server
* [new branch] new-name -> new-refspec
ok 10 - push new branch with old:new refspec
expecting success:
(cd local &&
git checkout new-name &&
git push origin HEAD:new-refspec-2
) &&
compare_refs local HEAD server refs/heads/new-refspec-2
Already on 'new-name'
To testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server
* [new branch] HEAD -> new-refspec-2
ok 11 - push new branch with HEAD:new refspec
expecting success:
(cd local &&
git push origin :new-name
) &&
test_must_fail git --git-dir="server/.git" \
rev-parse --verify refs/heads/new-name
Everything up-to-date
fatal: Needed a single revision
ok 12 - push delete branch
expecting success:
(cd local &&
git checkout -b force-test &&
echo content >> file &&
git commit -a -m eight &&
git push origin force-test &&
echo content >> file &&
git commit -a --amend -m eight-modified &&
git push --force origin force-test
) &&
compare_refs local refs/heads/force-test server refs/heads/force-test
Switched to a new branch 'force-test'
[force-test 4521253] eight
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
To testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server
* [new branch] force-test -> force-test
[force-test e4a2457] eight-modified
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:32:56 2019 +0000
1 file changed, 2 insertions(+)
To testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server
4521253..e4a2457 force-test -> force-test
ok 13 - forced push
expecting success:
GIT_REMOTE_TESTGIT_NOREFSPEC=1 \
git clone "testgit::${PWD}/server" local2 2>error &&
test_i18ngrep "this remote helper should implement refspec capability" error &&
compare_refs local2 HEAD server HEAD
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
warning: this remote helper should implement refspec capability
ok 14 - cloning without refspec
expecting success:
(cd local2 &&
git reset --hard &&
GIT_REMOTE_TESTGIT_NOREFSPEC=1 git pull 2>../error) &&
test_i18ngrep "this remote helper should implement refspec capability" error &&
compare_refs local2 HEAD server HEAD
HEAD is now at cb71714 five
Already up to date.
warning: this remote helper should implement refspec capability
ok 15 - pulling without refspecs
expecting success:
test_when_finished "(cd local2 && git reset --hard origin)" &&
(cd local2 &&
echo content >>file &&
git commit -a -m ten &&
GIT_REMOTE_TESTGIT_NOREFSPEC=1 &&
export GIT_REMOTE_TESTGIT_NOREFSPEC &&
test_must_fail git push 2>../error) &&
test_i18ngrep "remote-helper doesn.t support push; refspec needed" error
[new d1d46f1] ten
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
fatal: remote-helper doesn't support push; refspec needed
HEAD is now at cb71714 five
ok 16 - pushing without refspecs
expecting success:
(cd local2 &&
GIT_REMOTE_TESTGIT_NO_MARKS=1 git pull) &&
compare_refs local2 HEAD server HEAD
Already up to date.
ok 17 - pulling without marks
checking known breakage:
test_when_finished "(cd local2 && git reset --hard origin)" &&
(cd local2 &&
echo content >>file &&
git commit -a -m twelve &&
GIT_REMOTE_TESTGIT_NO_MARKS=1 git push) &&
compare_refs local2 HEAD server HEAD
[new 7aed8ab] twelve
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
warning: Not updating refs/heads/new (new tip e31d605f9e5fe56bb49d808ec582e6f5691ee61d does not contain cb7171451fb8d2815cb52c92e00956e62e232167)
Everything up-to-date
--- expect 2019-08-14 07:32:58.615113462 +0000
+++ actual 2019-08-14 07:32:58.627113632 +0000
@@ -1 +1 @@
-7aed8abae32e8ef2de7ce4d5f57c8909f1d9a11d
+cb7171451fb8d2815cb52c92e00956e62e232167
HEAD is now at cb71714 five
not ok 18 - pushing without marks # TODO known breakage
expecting success:
(cd local &&
git branch dup2 master &&
git push origin --all
) &&
compare_refs local dup2 server dup2
To testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server
* [new branch] dup2 -> dup2
017261e..017261e new-name -> new-name
ok 19 - push all with existing object
expecting success:
(cd local &&
git branch dup master &&
git push origin dup
) &&
compare_refs local dup server dup
To testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server
* [new branch] dup -> dup
ok 20 - push ref with existing object
expecting success:
(cd local &&
git checkout master &&
git tag -s -m signed-tag signed-tag &&
git push origin signed-tag
) &&
compare_refs local signed-tag^{} server signed-tag^{} &&
test_must_fail compare_refs local signed-tag server signed-tag
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
warning: stripping signature from tag f3ada0cb0105371c03be927e39f19136b93a648a
To testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server
* [new tag] signed-tag -> signed-tag
--- expect 2019-08-14 07:32:59.267122702 +0000
+++ actual 2019-08-14 07:32:59.287122984 +0000
@@ -1 +1 @@
-f3ada0cb0105371c03be927e39f19136b93a648a
+dfbbf2e2de4c46312c5ff4a52c0d448bef6bbccf
ok 21 - push signed tag
expecting success:
(cd local &&
git checkout master &&
git tag -s -m signed-tag signed-tag-2 &&
GIT_REMOTE_TESTGIT_SIGNED_TAGS=1 git push origin signed-tag-2
) &&
compare_refs local signed-tag-2 server signed-tag-2
Already on 'master'
Your branch is up to date with 'origin/master'.
To testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server
* [new tag] signed-tag-2 -> signed-tag-2
ok 22 - push signed tag with signed-tags capability
expecting success:
(cd local &&
git checkout -b update master &&
echo update >>file &&
git commit -a -m update &&
git push origin update &&
git rev-parse --verify remotes/origin/update >expect &&
git rev-parse --verify testgit/origin/heads/update >actual &&
test_cmp expect actual
)
Switched to a new branch 'update'
[update babbae8] update
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
To testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server
* [new branch] update -> update
ok 23 - push update refs
expecting success:
(cd local &&
echo more-update >>file &&
git commit -a -m more-update &&
git rev-parse --verify testgit/origin/heads/update >expect &&
GIT_REMOTE_TESTGIT_NO_PRIVATE_UPDATE=t git push origin update &&
git rev-parse --verify testgit/origin/heads/update >actual &&
test_cmp expect actual
)
[update 8e3a758] more-update
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
To testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server
babbae8..8e3a758 update -> update
ok 24 - push update refs disabled by no-private-update
expecting success:
(cd local &&
git checkout update &&
echo "update fail" >>file &&
git commit -a -m "update fail" &&
git rev-parse --verify testgit/origin/heads/update >expect &&
test_expect_code 1 env GIT_REMOTE_TESTGIT_FAILURE="non-fast forward" \
git push origin update &&
git rev-parse --verify testgit/origin/heads/update >actual &&
test_cmp expect actual
)
Already on 'update'
[update a1ac730] update fail
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
error: failed to push some refs to 'testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server'
ok 25 - push update refs failure
expecting success:
(cd local &&
test_must_fail env GIT_REMOTE_TESTGIT_FAILURE=1 git fetch 2>error &&
cat error &&
test_i18ngrep -q "error while running fast-import" error
)
fatal: stream ends early
fast-import: dumping crash report to .git/fast_import_crash_5787
fatal: error while running fast-import
ok 26 - proper failure checks for fetching
expecting success:
test_when_finished "rm -rf local/git.marks local/testgit.marks" &&
(cd local &&
git checkout -b crash master &&
echo crash >>file &&
git commit -a -m crash &&
test_must_fail env GIT_REMOTE_TESTGIT_FAILURE=1 git push --all &&
clean_mark ".git/testgit/origin/git.marks" &&
clean_mark ".git/testgit/origin/testgit.marks" &&
test_cmp git.marks testgit.marks
)
Switched to a new branch 'crash'
[crash 189eb45] crash
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
error: failed to push some refs to 'testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server'
ok 27 - proper failure checks for pushing
expecting success:
(cd local &&
git checkout -b new_branch master &&
echo new >>file &&
git commit -a -m new &&
git push origin new_branch &&
git fetch origin &&
echo new >>file &&
git commit -a -m new &&
git push origin new_branch 2> msg &&
! grep "\[new branch\]" msg
)
Switched to a new branch 'new_branch'
[new_branch 7a9ca39] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
To testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server
* [new branch] new_branch -> new_branch
[new_branch 0bcbab2] new
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 28 - push messages
expecting success:
(cd server &&
git checkout master &&
echo more >>file &&
git commit -a -m more
) &&
(cd local &&
git fetch origin HEAD
) &&
compare_refs server HEAD local FETCH_HEAD
Switched to branch 'master'
[master 9587e5d] more
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
From testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server
* branch HEAD -> FETCH_HEAD
ok 29 - fetch HEAD
expecting success:
(cd server &&
git checkout master &&
echo more >>file &&
git commit -a -m more
) &&
(cd local &&
git fetch "testgit::${PWD}/../server"
) &&
compare_refs server HEAD local FETCH_HEAD
Already on 'master'
[master 9fd42f4] more
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
From testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/local/../server
* branch HEAD -> FETCH_HEAD
ok 30 - fetch url
expecting success:
(cd server &&
git tag v1.0
) &&
(cd local &&
git fetch
) &&
compare_refs local v1.0 server v1.0
From testgit::/<<PKGBUILDDIR>>/t/trash directory.t5801-remote-helpers/server
49b14b0..9fd42f4 master -> origin/master
* [new tag] v1.0 -> v1.0
ok 31 - fetch tag
# still have 1 known breakage(s)
# passed all remaining 30 test(s)
1..31
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5812-proto-disable-http.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5812-proto-disable-http/.git/
checking prerequisite: NOT_ROOT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
uid=$(id -u) &&
test "$uid" != 0
)
prerequisite NOT_ROOT ok
1..0 # SKIP no web server found at '/usr/sbin/apache2'
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5810-proto-disable-local.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5810-proto-disable-local/.git/
expecting success:
test_commit one
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 1 - setup repository to clone
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
ok 2 - clone file:// (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git fetch
)
From file:///<<PKGBUILDDIR>>/t/trash directory.t5810-proto-disable-local
* branch HEAD -> FETCH_HEAD
ok 3 - fetch file:// (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git push origin HEAD:pushed
)
To file:///<<PKGBUILDDIR>>/t/trash directory.t5810-proto-disable-local
* [new branch] HEAD -> pushed
ok 4 - push file:// (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git push origin HEAD:pushed
)
fatal: transport 'file' not allowed
ok 5 - push file:// (disabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git fetch
)
fatal: transport 'file' not allowed
ok 6 - fetch file:// (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'file' not allowed
ok 7 - clone file:// (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git -c protocol.allow=always clone --bare "$url" tmp.git &&
test_must_fail git -c protocol.$proto.allow=always clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'file' not allowed
Cloning into bare repository 'tmp.git'...
fatal: transport 'file' not allowed
ok 8 - clone file:// (env var has precedence)
expecting success:
rm -rf tmp.git &&
git -c protocol.$proto.allow=always clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
ok 9 - clone file:// (enabled with config)
expecting success:
git -C tmp.git -c protocol.$proto.allow=always fetch
From file:///<<PKGBUILDDIR>>/t/trash directory.t5810-proto-disable-local
* branch HEAD -> FETCH_HEAD
ok 10 - fetch file:// (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=always push origin HEAD:pushed
Everything up-to-date
ok 11 - push file:// (enabled)
expecting success:
test_must_fail git -C tmp.git -c protocol.$proto.allow=never push origin HEAD:pushed
fatal: transport 'file' not allowed
ok 12 - push file:// (disabled)
expecting success:
test_must_fail git -C tmp.git -c protocol.$proto.allow=never fetch
fatal: transport 'file' not allowed
ok 13 - fetch file:// (disabled)
expecting success:
rm -rf tmp.git &&
test_must_fail git -c protocol.$proto.allow=never clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
fatal: transport 'file' not allowed
ok 14 - clone file:// (disabled)
expecting success:
rm -rf tmp.git &&
git -c protocol.$proto.allow=user clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
ok 15 - clone file:// (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=user fetch
From file:///<<PKGBUILDDIR>>/t/trash directory.t5810-proto-disable-local
* branch HEAD -> FETCH_HEAD
ok 16 - fetch file:// (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=user push origin HEAD:pushed
Everything up-to-date
ok 17 - push file:// (enabled)
expecting success:
(
cd tmp.git &&
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user push origin HEAD:pushed
)
fatal: transport 'file' not allowed
ok 18 - push file:// (disabled)
expecting success:
(
cd tmp.git &&
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user fetch
)
fatal: transport 'file' not allowed
ok 19 - fetch file:// (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'file' not allowed
ok 20 - clone file:// (disabled)
expecting success:
rm -rf tmp.git &&
test_config_global protocol.allow always &&
git clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
ok 21 - clone file:// (enabled)
expecting success:
test_config_global protocol.allow always &&
git -C tmp.git fetch
From file:///<<PKGBUILDDIR>>/t/trash directory.t5810-proto-disable-local
* branch HEAD -> FETCH_HEAD
ok 22 - fetch file:// (enabled)
expecting success:
test_config_global protocol.allow always &&
git -C tmp.git push origin HEAD:pushed
Everything up-to-date
ok 23 - push file:// (enabled)
expecting success:
test_config_global protocol.allow never &&
test_must_fail git -C tmp.git push origin HEAD:pushed
fatal: transport 'file' not allowed
ok 24 - push file:// (disabled)
expecting success:
test_config_global protocol.allow never &&
test_must_fail git -C tmp.git fetch
fatal: transport 'file' not allowed
ok 25 - fetch file:// (disabled)
expecting success:
rm -rf tmp.git &&
test_config_global protocol.allow never &&
test_must_fail git clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
fatal: transport 'file' not allowed
ok 26 - clone file:// (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
done.
ok 27 - clone path (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git fetch
)
From /<<PKGBUILDDIR>>/t/trash directory.t5810-proto-disable-local/.
* branch HEAD -> FETCH_HEAD
ok 28 - fetch path (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git push origin HEAD:pushed
)
Everything up-to-date
ok 29 - push path (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git push origin HEAD:pushed
)
fatal: transport 'file' not allowed
ok 30 - push path (disabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git fetch
)
fatal: transport 'file' not allowed
ok 31 - fetch path (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'file' not allowed
ok 32 - clone path (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git -c protocol.allow=always clone --bare "$url" tmp.git &&
test_must_fail git -c protocol.$proto.allow=always clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'file' not allowed
Cloning into bare repository 'tmp.git'...
fatal: transport 'file' not allowed
ok 33 - clone path (env var has precedence)
expecting success:
rm -rf tmp.git &&
git -c protocol.$proto.allow=always clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
done.
ok 34 - clone path (enabled with config)
expecting success:
git -C tmp.git -c protocol.$proto.allow=always fetch
From /<<PKGBUILDDIR>>/t/trash directory.t5810-proto-disable-local/.
* branch HEAD -> FETCH_HEAD
ok 35 - fetch path (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=always push origin HEAD:pushed
Everything up-to-date
ok 36 - push path (enabled)
expecting success:
test_must_fail git -C tmp.git -c protocol.$proto.allow=never push origin HEAD:pushed
fatal: transport 'file' not allowed
ok 37 - push path (disabled)
expecting success:
test_must_fail git -C tmp.git -c protocol.$proto.allow=never fetch
fatal: transport 'file' not allowed
ok 38 - fetch path (disabled)
expecting success:
rm -rf tmp.git &&
test_must_fail git -c protocol.$proto.allow=never clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
fatal: transport 'file' not allowed
ok 39 - clone path (disabled)
expecting success:
rm -rf tmp.git &&
git -c protocol.$proto.allow=user clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
done.
ok 40 - clone path (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=user fetch
From /<<PKGBUILDDIR>>/t/trash directory.t5810-proto-disable-local/.
* branch HEAD -> FETCH_HEAD
ok 41 - fetch path (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=user push origin HEAD:pushed
Everything up-to-date
ok 42 - push path (enabled)
expecting success:
(
cd tmp.git &&
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user push origin HEAD:pushed
)
fatal: transport 'file' not allowed
ok 43 - push path (disabled)
expecting success:
(
cd tmp.git &&
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user fetch
)
fatal: transport 'file' not allowed
ok 44 - fetch path (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'file' not allowed
ok 45 - clone path (disabled)
expecting success:
rm -rf tmp.git &&
test_config_global protocol.allow always &&
git clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
done.
ok 46 - clone path (enabled)
expecting success:
test_config_global protocol.allow always &&
git -C tmp.git fetch
From /<<PKGBUILDDIR>>/t/trash directory.t5810-proto-disable-local/.
* branch HEAD -> FETCH_HEAD
ok 47 - fetch path (enabled)
expecting success:
test_config_global protocol.allow always &&
git -C tmp.git push origin HEAD:pushed
Everything up-to-date
ok 48 - push path (enabled)
expecting success:
test_config_global protocol.allow never &&
test_must_fail git -C tmp.git push origin HEAD:pushed
fatal: transport 'file' not allowed
ok 49 - push path (disabled)
expecting success:
test_config_global protocol.allow never &&
test_must_fail git -C tmp.git fetch
fatal: transport 'file' not allowed
ok 50 - fetch path (disabled)
expecting success:
rm -rf tmp.git &&
test_config_global protocol.allow never &&
test_must_fail git clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
fatal: transport 'file' not allowed
ok 51 - clone path (disabled)
expecting success:
git init --bare repo.git &&
git push repo.git HEAD &&
mv repo.git "$PWD/-repo.git"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5810-proto-disable-local/repo.git/
To repo.git
* [new branch] HEAD -> master
ok 52 - setup repo with dash
expecting success:
rm -f trace.out &&
test_must_fail env GIT_TRACE="$PWD/trace.out" git fetch -- -repo.git &&
! grep upload-pack trace.out
fatal: strange pathname '-repo.git' blocked
ok 53 - repo names starting with dash are rejected
expecting success:
git fetch "$PWD/-repo.git"
From /<<PKGBUILDDIR>>/t/trash directory.t5810-proto-disable-local/-repo
* branch HEAD -> FETCH_HEAD
ok 54 - full paths still work
# passed all 54 test(s)
1..54
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5811-proto-disable-git.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5811-proto-disable-git/.git/
checking prerequisite: PIPE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
# test whether the filesystem supports FIFOs
test_have_prereq !MINGW,!CYGWIN &&
rm -f testfifo && mkfifo testfifo
)
prerequisite PIPE ok
Starting git daemon ...
[6320] Ready to rumble
expecting success:
bare="$GIT_DAEMON_DOCUMENT_ROOT_PATH/repo.git" &&
test_commit one &&
git --bare init "$bare" &&
git push "$bare" HEAD &&
>"$bare/git-daemon-export-ok" &&
git -C "$bare" config daemon.receivepack true
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5811-proto-disable-git/repo/repo.git/
To /<<PKGBUILDDIR>>/t/trash directory.t5811-proto-disable-git/repo/repo.git
* [new branch] HEAD -> master
ok 1 - create git-accessible repo
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
[6474] Connection from 127.0.0.1:44342
[6474] Extended attribute "host": 127.0.0.1:5811
[6474] Request upload-pack for '/repo.git'
[6320] [6474] Disconnected
ok 2 - clone git:// (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git fetch
)
[6550] Connection from 127.0.0.1:44344
[6550] Extended attribute "host": 127.0.0.1:5811
[6550] Request upload-pack for '/repo.git'
From git://127.0.0.1:5811/repo
* branch HEAD -> FETCH_HEAD
[6320] [6550] Disconnected
ok 3 - fetch git:// (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git push origin HEAD:pushed
)
[6606] Connection from 127.0.0.1:44346
[6606] Extended attribute "host": 127.0.0.1:5811
[6606] Request receive-pack for '/repo.git'
To git://127.0.0.1:5811/repo.git
* [new branch] HEAD -> pushed
[6320] [6606] Disconnected
ok 4 - push git:// (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git push origin HEAD:pushed
)
fatal: transport 'git' not allowed
ok 5 - push git:// (disabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git fetch
)
fatal: transport 'git' not allowed
ok 6 - fetch git:// (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'git' not allowed
ok 7 - clone git:// (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git -c protocol.allow=always clone --bare "$url" tmp.git &&
test_must_fail git -c protocol.$proto.allow=always clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'git' not allowed
Cloning into bare repository 'tmp.git'...
fatal: transport 'git' not allowed
ok 8 - clone git:// (env var has precedence)
expecting success:
rm -rf tmp.git &&
git -c protocol.$proto.allow=always clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
[6813] Connection from 127.0.0.1:44348
[6813] Extended attribute "host": 127.0.0.1:5811
[6813] Request upload-pack for '/repo.git'
[6320] [6813] Disconnected
ok 9 - clone git:// (enabled with config)
expecting success:
git -C tmp.git -c protocol.$proto.allow=always fetch
[6899] Connection from 127.0.0.1:44350
[6899] Extended attribute "host": 127.0.0.1:5811
[6899] Request upload-pack for '/repo.git'
From git://127.0.0.1:5811/repo
* branch HEAD -> FETCH_HEAD
[6320] [6899] Disconnected
ok 10 - fetch git:// (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=always push origin HEAD:pushed
[6956] Connection from 127.0.0.1:44352
[6956] Extended attribute "host": 127.0.0.1:5811
[6956] Request receive-pack for '/repo.git'
Everything up-to-date
ok 11 - push git:// (enabled)
expecting success:
test_must_fail git -C tmp.git -c protocol.$proto.allow=never push origin HEAD:pushed
[6320] [6956] Disconnected
fatal: transport 'git' not allowed
ok 12 - push git:// (disabled)
expecting success:
test_must_fail git -C tmp.git -c protocol.$proto.allow=never fetch
fatal: transport 'git' not allowed
ok 13 - fetch git:// (disabled)
expecting success:
rm -rf tmp.git &&
test_must_fail git -c protocol.$proto.allow=never clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
fatal: transport 'git' not allowed
ok 14 - clone git:// (disabled)
expecting success:
rm -rf tmp.git &&
git -c protocol.$proto.allow=user clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
[7085] Connection from 127.0.0.1:44354
[7085] Extended attribute "host": 127.0.0.1:5811
[7085] Request upload-pack for '/repo.git'
[6320] [7085] Disconnected
ok 15 - clone git:// (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=user fetch
[7187] Connection from 127.0.0.1:44356
[7187] Extended attribute "host": 127.0.0.1:5811
[7187] Request upload-pack for '/repo.git'
From git://127.0.0.1:5811/repo
* branch HEAD -> FETCH_HEAD
[6320] [7187] Disconnected
ok 16 - fetch git:// (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=user push origin HEAD:pushed
[7235] Connection from 127.0.0.1:44358
[7235] Extended attribute "host": 127.0.0.1:5811
[7235] Request receive-pack for '/repo.git'
Everything up-to-date
ok 17 - push git:// (enabled)
expecting success:
(
cd tmp.git &&
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user push origin HEAD:pushed
)
[6320] [7235] Disconnected
fatal: transport 'git' not allowed
ok 18 - push git:// (disabled)
expecting success:
(
cd tmp.git &&
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user fetch
)
fatal: transport 'git' not allowed
ok 19 - fetch git:// (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'git' not allowed
ok 20 - clone git:// (disabled)
expecting success:
rm -rf tmp.git &&
test_config_global protocol.allow always &&
git clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
[7370] Connection from 127.0.0.1:44360
[7370] Extended attribute "host": 127.0.0.1:5811
[7370] Request upload-pack for '/repo.git'
[6320] [7370] Disconnected
ok 21 - clone git:// (enabled)
expecting success:
test_config_global protocol.allow always &&
git -C tmp.git fetch
[7493] Connection from 127.0.0.1:44362
[7493] Extended attribute "host": 127.0.0.1:5811
[7493] Request upload-pack for '/repo.git'
From git://127.0.0.1:5811/repo
* branch HEAD -> FETCH_HEAD
[6320] [7493] Disconnected
ok 22 - fetch git:// (enabled)
expecting success:
test_config_global protocol.allow always &&
git -C tmp.git push origin HEAD:pushed
[7560] Connection from 127.0.0.1:44364
[7560] Extended attribute "host": 127.0.0.1:5811
[7560] Request receive-pack for '/repo.git'
Everything up-to-date
[6320] [7560] Disconnected
ok 23 - push git:// (enabled)
expecting success:
test_config_global protocol.allow never &&
test_must_fail git -C tmp.git push origin HEAD:pushed
fatal: transport 'git' not allowed
ok 24 - push git:// (disabled)
expecting success:
test_config_global protocol.allow never &&
test_must_fail git -C tmp.git fetch
fatal: transport 'git' not allowed
ok 25 - fetch git:// (disabled)
expecting success:
rm -rf tmp.git &&
test_config_global protocol.allow never &&
test_must_fail git clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
fatal: transport 'git' not allowed
ok 26 - clone git:// (disabled)
Stopping git daemon ...
# passed all 26 test(s)
1..26
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5814-proto-disable-ext.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5814-proto-disable-ext/.git/
expecting success:
write_script fake-remote <<-\EOF &&
echo >&2 "fake-remote: $*"
cd "$TRASH_DIRECTORY/remote" &&
eval "$*"
EOF
PATH=$TRASH_DIRECTORY:$PATH &&
export TRASH_DIRECTORY
ok 1 - setup ext wrapper
expecting success:
test_commit one &&
mkdir remote &&
git init --bare remote/repo.git &&
git push remote/repo.git HEAD
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5814-proto-disable-ext/remote/repo.git/
To remote/repo.git
* [new branch] HEAD -> master
ok 2 - setup repository to clone
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fake-remote: git-upload-pack repo.git
ok 3 - clone remote-helper (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git fetch
)
fake-remote: git-upload-pack repo.git
From ext::fake-remote %S repo
* branch HEAD -> FETCH_HEAD
ok 4 - fetch remote-helper (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git push origin HEAD:pushed
)
fake-remote: git-receive-pack repo.git
To ext::fake-remote %S repo.git
* [new branch] HEAD -> pushed
ok 5 - push remote-helper (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git push origin HEAD:pushed
)
fatal: transport 'ext' not allowed
ok 6 - push remote-helper (disabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git fetch
)
fatal: transport 'ext' not allowed
ok 7 - fetch remote-helper (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'ext' not allowed
ok 8 - clone remote-helper (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git -c protocol.allow=always clone --bare "$url" tmp.git &&
test_must_fail git -c protocol.$proto.allow=always clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'ext' not allowed
Cloning into bare repository 'tmp.git'...
fatal: transport 'ext' not allowed
ok 9 - clone remote-helper (env var has precedence)
expecting success:
rm -rf tmp.git &&
git -c protocol.$proto.allow=always clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
fake-remote: git-upload-pack repo.git
ok 10 - clone remote-helper (enabled with config)
expecting success:
git -C tmp.git -c protocol.$proto.allow=always fetch
fake-remote: git-upload-pack repo.git
From ext::fake-remote %S repo
* branch HEAD -> FETCH_HEAD
ok 11 - fetch remote-helper (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=always push origin HEAD:pushed
fake-remote: git-receive-pack repo.git
Everything up-to-date
ok 12 - push remote-helper (enabled)
expecting success:
test_must_fail git -C tmp.git -c protocol.$proto.allow=never push origin HEAD:pushed
fatal: transport 'ext' not allowed
ok 13 - push remote-helper (disabled)
expecting success:
test_must_fail git -C tmp.git -c protocol.$proto.allow=never fetch
fatal: transport 'ext' not allowed
ok 14 - fetch remote-helper (disabled)
expecting success:
rm -rf tmp.git &&
test_must_fail git -c protocol.$proto.allow=never clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
fatal: transport 'ext' not allowed
ok 15 - clone remote-helper (disabled)
expecting success:
rm -rf tmp.git &&
git -c protocol.$proto.allow=user clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
fake-remote: git-upload-pack repo.git
ok 16 - clone remote-helper (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=user fetch
fake-remote: git-upload-pack repo.git
From ext::fake-remote %S repo
* branch HEAD -> FETCH_HEAD
ok 17 - fetch remote-helper (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=user push origin HEAD:pushed
fake-remote: git-receive-pack repo.git
Everything up-to-date
ok 18 - push remote-helper (enabled)
expecting success:
(
cd tmp.git &&
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user push origin HEAD:pushed
)
fatal: transport 'ext' not allowed
ok 19 - push remote-helper (disabled)
expecting success:
(
cd tmp.git &&
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user fetch
)
fatal: transport 'ext' not allowed
ok 20 - fetch remote-helper (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'ext' not allowed
ok 21 - clone remote-helper (disabled)
expecting success:
rm -rf tmp.git &&
test_config_global protocol.allow always &&
git clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
fake-remote: git-upload-pack repo.git
ok 22 - clone remote-helper (enabled)
expecting success:
test_config_global protocol.allow always &&
git -C tmp.git fetch
fake-remote: git-upload-pack repo.git
From ext::fake-remote %S repo
* branch HEAD -> FETCH_HEAD
ok 23 - fetch remote-helper (enabled)
expecting success:
test_config_global protocol.allow always &&
git -C tmp.git push origin HEAD:pushed
fake-remote: git-receive-pack repo.git
Everything up-to-date
ok 24 - push remote-helper (enabled)
expecting success:
test_config_global protocol.allow never &&
test_must_fail git -C tmp.git push origin HEAD:pushed
fatal: transport 'ext' not allowed
ok 25 - push remote-helper (disabled)
expecting success:
test_config_global protocol.allow never &&
test_must_fail git -C tmp.git fetch
fatal: transport 'ext' not allowed
ok 26 - fetch remote-helper (disabled)
expecting success:
rm -rf tmp.git &&
test_config_global protocol.allow never &&
test_must_fail git clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
fatal: transport 'ext' not allowed
ok 27 - clone remote-helper (disabled)
# passed all 27 test(s)
1..27
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5815-submodule-protos.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5815-submodule-protos/.git/
expecting success:
write_script fake-remote <<-\EOF &&
echo >&2 "fake-remote: $*"
cd "$TRASH_DIRECTORY/remote" &&
eval "$*"
EOF
PATH=$TRASH_DIRECTORY:$PATH &&
export TRASH_DIRECTORY
ok 1 - setup ext wrapper
expecting success:
write_script ssh-wrapper <<-\EOF &&
echo >&2 "ssh: $*"
host=$1; shift
cd "$TRASH_DIRECTORY/$host" &&
eval "$*"
EOF
GIT_SSH="$PWD/ssh-wrapper" &&
export GIT_SSH &&
export TRASH_DIRECTORY
ok 2 - setup ssh wrapper
expecting success:
mkdir remote &&
git init remote/repo.git &&
(cd remote/repo.git && test_commit one) &&
# submodule-add should probably trust what we feed it on the cmdline,
# but its implementation is overly conservative.
GIT_ALLOW_PROTOCOL=ssh git submodule add remote:repo.git ssh-module &&
GIT_ALLOW_PROTOCOL=ext git submodule add "ext::fake-remote %S repo.git" ext-module &&
git commit -m "add submodules"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5815-submodule-protos/remote/repo.git/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5815-submodule-protos/ssh-module'...
ssh: remote git-upload-pack 'repo.git'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5815-submodule-protos/ext-module'...
fake-remote: git-upload-pack repo.git
[master (root-commit) 48b8819] add submodules
Author: A U Thor <author@example.com>
3 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 ext-module
create mode 160000 ssh-module
ok 3 - setup repository with submodules
expecting success:
test_must_fail git clone --recurse-submodules . dst
Cloning into 'dst'...
done.
Submodule 'ext-module' (ext::fake-remote %S repo.git) registered for path 'ext-module'
Submodule 'ssh-module' (remote:repo.git) registered for path 'ssh-module'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5815-submodule-protos/dst/ext-module'...
fatal: transport 'ext' not allowed
fatal: clone of 'ext::fake-remote %S repo.git' into submodule path '/<<PKGBUILDDIR>>/t/trash directory.t5815-submodule-protos/dst/ext-module' failed
Failed to clone 'ext-module'. Retry scheduled
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5815-submodule-protos/dst/ssh-module'...
ssh: remote git-upload-pack 'repo.git'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5815-submodule-protos/dst/ext-module'...
fatal: transport 'ext' not allowed
fatal: clone of 'ext::fake-remote %S repo.git' into submodule path '/<<PKGBUILDDIR>>/t/trash directory.t5815-submodule-protos/dst/ext-module' failed
Failed to clone 'ext-module' a second time, aborting
ok 4 - clone with recurse-submodules fails
expecting success:
rm -rf dst &&
git clone . dst &&
git -C dst submodule init
Cloning into 'dst'...
done.
Submodule 'ext-module' (ext::fake-remote %S repo.git) registered for path 'ext-module'
Submodule 'ssh-module' (remote:repo.git) registered for path 'ssh-module'
ok 5 - setup individual updates
expecting success:
git -C dst submodule update ssh-module
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5815-submodule-protos/dst/ssh-module'...
ssh: remote git-upload-pack 'repo.git'
Submodule path 'ssh-module': checked out 'd79ce1670bdcb76e6d1da2ae095e890ccb326ae9'
ok 6 - update of ssh allowed
expecting success:
test_must_fail git -C dst submodule update ext-module
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5815-submodule-protos/dst/ext-module'...
fatal: transport 'ext' not allowed
fatal: clone of 'ext::fake-remote %S repo.git' into submodule path '/<<PKGBUILDDIR>>/t/trash directory.t5815-submodule-protos/dst/ext-module' failed
Failed to clone 'ext-module'. Retry scheduled
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5815-submodule-protos/dst/ext-module'...
fatal: transport 'ext' not allowed
fatal: clone of 'ext::fake-remote %S repo.git' into submodule path '/<<PKGBUILDDIR>>/t/trash directory.t5815-submodule-protos/dst/ext-module' failed
Failed to clone 'ext-module' a second time, aborting
ok 7 - update of ext not allowed
expecting success:
GIT_ALLOW_PROTOCOL=ext git -C dst submodule update ext-module
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5815-submodule-protos/dst/ext-module'...
fake-remote: git-upload-pack repo.git
Submodule path 'ext-module': checked out 'd79ce1670bdcb76e6d1da2ae095e890ccb326ae9'
ok 8 - user can override whitelist
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6000-rev-list-misc.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6000-rev-list-misc/.git/
expecting success:
echo content1 >wanted_file &&
echo content2 >unwanted_file &&
git add wanted_file unwanted_file &&
git commit -m one
[master (root-commit) e18bd60] one
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 unwanted_file
create mode 100644 wanted_file
ok 1 - setup
expecting success:
git rev-list --objects HEAD -- wanted_file >output &&
grep wanted_file output &&
! grep unwanted_file output
ac3e272b72bbf89def8657766b855d0656630ed4 wanted_file
ok 2 - rev-list --objects heeds pathspecs
expecting success:
mkdir foo &&
>foo/file &&
git add foo/file &&
git commit -m two &&
git rev-list --objects HEAD -- foo >output &&
grep foo/file output &&
git rev-list --objects HEAD -- foo/file >output &&
grep foo/file output &&
! grep unwanted_file output
[master 8dce0e0] two
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 foo/file
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 foo/file
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 foo/file
ok 3 - rev-list --objects with pathspecs and deeper paths
expecting success:
git checkout --orphan junio-testcase &&
git rm -rf . &&
mkdir two &&
echo frotz >one &&
cp one two/three &&
git add one two/three &&
test_tick &&
git commit -m that &&
ONE=$(git rev-parse HEAD:one) &&
git rev-list --objects HEAD two >output &&
grep "$ONE two/three" output &&
! grep one output
Switched to a new branch 'junio-testcase'
rm 'foo/file'
rm 'unwanted_file'
rm 'wanted_file'
[junio-testcase (root-commit) f0a247c] that
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 one
create mode 100644 two/three
8e4020bb5a8d8c873b25de15933e75cc0fc275df two/three
ok 4 - rev-list --objects with pathspecs and copied files
expecting success:
git rev-list --objects --no-object-names HEAD >output &&
! grep wanted_file output &&
! grep unwanted_file output &&
! grep " " output
ok 5 - rev-list --objects --no-object-names has no space/names
expecting success:
git rev-list --objects --no-object-names --all >list-output &&
git cat-file --batch-check <list-output >cat-output &&
! grep missing cat-output
ok 6 - rev-list --objects --no-object-names works with cat-file
expecting success:
git rev-list --objects --no-object-names --object-names --all >output &&
grep wanted_file output &&
git rev-list --objects --object-names --no-object-names --all >output &&
! grep wanted_file output
637f0347d31dad180d6fc7f6720c187b05a8754c unwanted_file
ac3e272b72bbf89def8657766b855d0656630ed4 wanted_file
ok 7 - --no-object-names and --object-names are last-one-wins
expecting success:
git commit --allow-empty -m another &&
git tag -a -m "annotated" v1.0 &&
git rev-list --objects ^v1.0^ v1.0 >expect &&
git rev-list --objects v1.0^..v1.0 >actual &&
test_cmp expect actual
[junio-testcase a6c6deb] another
Author: A U Thor <author@example.com>
ok 8 - rev-list A..B and rev-list ^A B are the same
expecting success:
git rev-list --objects ^HEAD^{tree} HEAD^{tree} >actual &&
test_must_be_empty actual
ok 9 - propagate uninteresting flag down correctly
expecting success:
git log --format="%m %s" --left-right v1.0...master >actual &&
cat >expect <<-\EOF &&
> two
> one
< another
< that
EOF
test_cmp expect actual
ok 10 - symleft flag bit is propagated down from tag
expecting success:
# Of the blobs and trees in the index, note:
#
# - we do not show two/three, because it is the
# same blob as "one", and we show objects only once
#
# - we do show the tree "two", because it has a valid cache tree
# from the last commit
#
# - we do not show the root tree; since we updated the index, it
# does not have a valid cache tree
#
cat >expect <<-\EOF &&
8e4020bb5a8d8c873b25de15933e75cc0fc275df one
d9d3a7417b9605cfd88ee6306b28dadc29e6ab08 only-in-index
9200b628cf9dc883a85a7abc8d6e6730baee589c two
EOF
echo only-in-index >only-in-index &&
test_when_finished "git reset --hard" &&
git add only-in-index &&
git rev-list --objects --indexed-objects >actual &&
test_cmp expect actual
HEAD is now at a6c6deb another
ok 11 - rev-list can show index objects
expecting success:
git rev-parse HEAD >expect &&
git rev-list -1 --objects HEAD --not --indexed-objects >actual &&
test_cmp expect actual
ok 12 - rev-list can negate index objects
expecting success:
test_must_fail git rev-list --bisect --first-parent HEAD
fatal: --first-parent is incompatible with --bisect
ok 13 - --bisect and --first-parent can not be combined
expecting success:
# We know that there is no Q in the true payload; names and
# addresses of the authors and the committers do not have
# any, and object names or header names do not, either.
git rev-list --header --max-count=2 HEAD |
nul_to_q |
grep "^Q" >actual &&
cat >expect <<-EOF &&
Q$(git rev-parse HEAD~1)
Q
EOF
test_cmp expect actual
ok 14 - --header shows a NUL after each commit
# passed all 14 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6001-rev-list-graft.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6001-rev-list-graft/.git/
expecting success:
mkdir subdir &&
echo >fileA fileA &&
echo >subdir/fileB fileB &&
git add fileA subdir/fileB &&
git commit -a -m "Initial in one history." &&
A0=$(git rev-parse --verify HEAD) &&
echo >fileA fileA modified &&
git commit -a -m "Second in one history." &&
A1=$(git rev-parse --verify HEAD) &&
echo >subdir/fileB fileB modified &&
git commit -a -m "Third in one history." &&
A2=$(git rev-parse --verify HEAD) &&
rm -f .git/refs/heads/master .git/index &&
echo >fileA fileA again &&
echo >subdir/fileB fileB again &&
git add fileA subdir/fileB &&
git commit -a -m "Initial in alternate history." &&
B0=$(git rev-parse --verify HEAD) &&
echo >fileA fileA modified in alternate history &&
git commit -a -m "Second in alternate history." &&
B1=$(git rev-parse --verify HEAD) &&
echo >subdir/fileB fileB modified in alternate history &&
git commit -a -m "Third in alternate history." &&
B2=$(git rev-parse --verify HEAD) &&
: done
[master (root-commit) 312fbb3] Initial in one history.
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 fileA
create mode 100644 subdir/fileB
[master 690b54e] Second in one history.
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 4ffe069] Third in one history.
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master (root-commit) eb2f3ca] Initial in alternate history.
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 fileA
create mode 100644 subdir/fileB
[master d1588e3] Second in alternate history.
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 5e6cd74] Third in alternate history.
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
rm -f .git/info/grafts &&
check basic 5e6cd74125bdbce597a3bade9459f212d4a50202 -- 5e6cd74125bdbce597a3bade9459f212d4a50202 d1588e34921be96c8d2ae3d69a7be761353c7417 eb2f3cac1c90f0af821b86108b9e6c901daeced5
ok 2 - without grafts
expecting success:
echo 'eb2f3cac1c90f0af821b86108b9e6c901daeced5 4ffe06906ae1c0e3fe7cf31c659b1c6a314e8379' >.git/info/grafts &&
check basic 5e6cd74125bdbce597a3bade9459f212d4a50202 -- 5e6cd74125bdbce597a3bade9459f212d4a50202 d1588e34921be96c8d2ae3d69a7be761353c7417 eb2f3cac1c90f0af821b86108b9e6c901daeced5 4ffe06906ae1c0e3fe7cf31c659b1c6a314e8379 690b54e88f77b8b7f78e28fefcfa8c44b905cf4a 312fbb339771e85adf5e73470dce546534956d00
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 3 - with grafts
expecting success:
rm -f .git/info/grafts &&
check basic 5e6cd74125bdbce597a3bade9459f212d4a50202 subdir -- 5e6cd74125bdbce597a3bade9459f212d4a50202 eb2f3cac1c90f0af821b86108b9e6c901daeced5
ok 4 - without grafts, with pathlimit
expecting success:
echo 'eb2f3cac1c90f0af821b86108b9e6c901daeced5 4ffe06906ae1c0e3fe7cf31c659b1c6a314e8379' >.git/info/grafts &&
check basic 5e6cd74125bdbce597a3bade9459f212d4a50202 subdir -- 5e6cd74125bdbce597a3bade9459f212d4a50202 eb2f3cac1c90f0af821b86108b9e6c901daeced5 4ffe06906ae1c0e3fe7cf31c659b1c6a314e8379 312fbb339771e85adf5e73470dce546534956d00
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 5 - with grafts, with pathlimit
expecting success:
rm -f .git/info/grafts &&
check parents 5e6cd74125bdbce597a3bade9459f212d4a50202 -- 5e6cd74125bdbce597a3bade9459f212d4a50202 d1588e34921be96c8d2ae3d69a7be761353c7417 eb2f3cac1c90f0af821b86108b9e6c901daeced5
ok 6 - without grafts
expecting success:
echo 'eb2f3cac1c90f0af821b86108b9e6c901daeced5 4ffe06906ae1c0e3fe7cf31c659b1c6a314e8379' >.git/info/grafts &&
check parents 5e6cd74125bdbce597a3bade9459f212d4a50202 -- 5e6cd74125bdbce597a3bade9459f212d4a50202 d1588e34921be96c8d2ae3d69a7be761353c7417 eb2f3cac1c90f0af821b86108b9e6c901daeced5 4ffe06906ae1c0e3fe7cf31c659b1c6a314e8379 690b54e88f77b8b7f78e28fefcfa8c44b905cf4a 312fbb339771e85adf5e73470dce546534956d00
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 7 - with grafts
expecting success:
rm -f .git/info/grafts &&
check parents 5e6cd74125bdbce597a3bade9459f212d4a50202 subdir -- 5e6cd74125bdbce597a3bade9459f212d4a50202 eb2f3cac1c90f0af821b86108b9e6c901daeced5
ok 8 - without grafts, with pathlimit
expecting success:
echo 'eb2f3cac1c90f0af821b86108b9e6c901daeced5 4ffe06906ae1c0e3fe7cf31c659b1c6a314e8379' >.git/info/grafts &&
check parents 5e6cd74125bdbce597a3bade9459f212d4a50202 subdir -- 5e6cd74125bdbce597a3bade9459f212d4a50202 eb2f3cac1c90f0af821b86108b9e6c901daeced5 4ffe06906ae1c0e3fe7cf31c659b1c6a314e8379 312fbb339771e85adf5e73470dce546534956d00
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 9 - with grafts, with pathlimit
expecting success:
rm -f .git/info/grafts &&
check parents-raw 5e6cd74125bdbce597a3bade9459f212d4a50202 -- 5e6cd74125bdbce597a3bade9459f212d4a50202 d1588e34921be96c8d2ae3d69a7be761353c7417 eb2f3cac1c90f0af821b86108b9e6c901daeced5
ok 10 - without grafts
expecting success:
echo 'eb2f3cac1c90f0af821b86108b9e6c901daeced5 4ffe06906ae1c0e3fe7cf31c659b1c6a314e8379' >.git/info/grafts &&
check parents-raw 5e6cd74125bdbce597a3bade9459f212d4a50202 -- 5e6cd74125bdbce597a3bade9459f212d4a50202 d1588e34921be96c8d2ae3d69a7be761353c7417 eb2f3cac1c90f0af821b86108b9e6c901daeced5 4ffe06906ae1c0e3fe7cf31c659b1c6a314e8379 690b54e88f77b8b7f78e28fefcfa8c44b905cf4a 312fbb339771e85adf5e73470dce546534956d00
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 11 - with grafts
expecting success:
rm -f .git/info/grafts &&
check parents-raw 5e6cd74125bdbce597a3bade9459f212d4a50202 subdir -- 5e6cd74125bdbce597a3bade9459f212d4a50202 eb2f3cac1c90f0af821b86108b9e6c901daeced5
ok 12 - without grafts, with pathlimit
expecting success:
echo 'eb2f3cac1c90f0af821b86108b9e6c901daeced5 4ffe06906ae1c0e3fe7cf31c659b1c6a314e8379' >.git/info/grafts &&
check parents-raw 5e6cd74125bdbce597a3bade9459f212d4a50202 subdir -- 5e6cd74125bdbce597a3bade9459f212d4a50202 eb2f3cac1c90f0af821b86108b9e6c901daeced5 4ffe06906ae1c0e3fe7cf31c659b1c6a314e8379 312fbb339771e85adf5e73470dce546534956d00
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 13 - with grafts, with pathlimit
expecting success:
git show HEAD 2>err &&
test_i18ngrep "git replace" err &&
test_config advice.graftFileDeprecated false &&
git show HEAD 2>err &&
test_i18ngrep ! "git replace" err
commit 5e6cd74125bdbce597a3bade9459f212d4a50202
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:33:09 2019 +0000
Third in alternate history.
diff --git a/subdir/fileB b/subdir/fileB
index 2da7ce9..8e5449e 100644
--- a/subdir/fileB
+++ b/subdir/fileB
@@ -1 +1 @@
-fileB again
+fileB modified in alternate history
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
hint: Please use "git replace --convert-graft-file"
commit 5e6cd74125bdbce597a3bade9459f212d4a50202
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:33:09 2019 +0000
Third in alternate history.
diff --git a/subdir/fileB b/subdir/fileB
index 2da7ce9..8e5449e 100644
--- a/subdir/fileB
+++ b/subdir/fileB
@@ -1 +1 @@
-fileB again
+fileB modified in alternate history
ok 14 - show advice that grafts are deprecated
# passed all 14 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5900-repo-selection.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/.git/
expecting success:
reset &&
make_tree foo &&
get foo &&
check foo
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/foo/.git/
[master (root-commit) ddd63c9] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/fetch/
From ../foo
* branch HEAD -> FETCH_HEAD
Cloning into 'clone'...
done.
ok 1 - find .git dir in worktree
expecting success:
reset &&
make_bare foo.git &&
get foo &&
check foo.git
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/foo.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/fetch/
From ../foo
* branch HEAD -> FETCH_HEAD
Cloning into 'clone'...
done.
ok 2 - automagically add .git suffix
expecting success:
reset &&
make_tree foo.git &&
get foo &&
check foo.git
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/foo.git/.git/
[master (root-commit) 98b6c1b] foo.git
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.git.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/fetch/
From ../foo
* branch HEAD -> FETCH_HEAD
Cloning into 'clone'...
done.
ok 3 - automagically add .git suffix to worktree
expecting success:
reset &&
make_tree foo &&
make_bare foo.git &&
get foo &&
check foo
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/foo/.git/
[master (root-commit) ddd63c9] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/foo.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/fetch/
From ../foo
* branch HEAD -> FETCH_HEAD
Cloning into 'clone'...
done.
ok 4 - prefer worktree foo over bare foo.git
expecting success:
reset &&
make_bare foo &&
make_bare foo.git &&
get foo &&
check foo
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/foo/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/foo.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/fetch/
From ../foo
* branch HEAD -> FETCH_HEAD
Cloning into 'clone'...
done.
ok 5 - prefer bare foo over bare foo.git
expecting success:
reset &&
make_bare foo &&
make_bare foo.git &&
get foo.git &&
check foo.git
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/foo/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/foo.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/fetch/
From ../foo
* branch HEAD -> FETCH_HEAD
Cloning into 'clone'...
done.
ok 6 - disambiguate with full foo.git
expecting success:
reset &&
make_bare foo.git &&
mkdir foo &&
get foo &&
check foo.git
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/foo.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/fetch/
From ../foo
* branch HEAD -> FETCH_HEAD
Cloning into 'clone'...
done.
ok 7 - we are not fooled by non-git foo directory
expecting success:
reset &&
make_tree foo &&
make_bare foo.git &&
mv foo/.git foo.git &&
get foo.git &&
check foo
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/foo/.git/
[master (root-commit) ddd63c9] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/foo.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5900-repo-selection/fetch/
From ../foo
* branch HEAD -> FETCH_HEAD
Cloning into 'clone'...
done.
ok 8 - prefer inner .git over outer bare
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5813-proto-disable-ssh.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/.git/
expecting success:
write_script ssh-wrapper <<-\EOF &&
echo >&2 "ssh: $*"
host=$1; shift
cd "$TRASH_DIRECTORY/$host" &&
eval "$*"
EOF
GIT_SSH="$PWD/ssh-wrapper" &&
export GIT_SSH &&
export TRASH_DIRECTORY
ok 1 - setup ssh wrapper
expecting success:
test_commit one &&
mkdir remote &&
git init --bare remote/repo.git &&
git push remote/repo.git HEAD
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git/
To remote/repo.git
* [new branch] HEAD -> master
ok 2 - setup repository to clone
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
ssh: remote git-upload-pack 'repo.git'
ok 3 - clone host:path (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git fetch
)
ssh: remote git-upload-pack 'repo.git'
From remote:repo
* branch HEAD -> FETCH_HEAD
ok 4 - fetch host:path (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git push origin HEAD:pushed
)
ssh: remote git-receive-pack 'repo.git'
To remote:repo.git
* [new branch] HEAD -> pushed
ok 5 - push host:path (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git push origin HEAD:pushed
)
fatal: transport 'ssh' not allowed
ok 6 - push host:path (disabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git fetch
)
fatal: transport 'ssh' not allowed
ok 7 - fetch host:path (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'ssh' not allowed
ok 8 - clone host:path (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git -c protocol.allow=always clone --bare "$url" tmp.git &&
test_must_fail git -c protocol.$proto.allow=always clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'ssh' not allowed
Cloning into bare repository 'tmp.git'...
fatal: transport 'ssh' not allowed
ok 9 - clone host:path (env var has precedence)
expecting success:
rm -rf tmp.git &&
git -c protocol.$proto.allow=always clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
ssh: remote git-upload-pack 'repo.git'
ok 10 - clone host:path (enabled with config)
expecting success:
git -C tmp.git -c protocol.$proto.allow=always fetch
ssh: remote git-upload-pack 'repo.git'
From remote:repo
* branch HEAD -> FETCH_HEAD
ok 11 - fetch host:path (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=always push origin HEAD:pushed
ssh: remote git-receive-pack 'repo.git'
Everything up-to-date
ok 12 - push host:path (enabled)
expecting success:
test_must_fail git -C tmp.git -c protocol.$proto.allow=never push origin HEAD:pushed
fatal: transport 'ssh' not allowed
ok 13 - push host:path (disabled)
expecting success:
test_must_fail git -C tmp.git -c protocol.$proto.allow=never fetch
fatal: transport 'ssh' not allowed
ok 14 - fetch host:path (disabled)
expecting success:
rm -rf tmp.git &&
test_must_fail git -c protocol.$proto.allow=never clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
fatal: transport 'ssh' not allowed
ok 15 - clone host:path (disabled)
expecting success:
rm -rf tmp.git &&
git -c protocol.$proto.allow=user clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
ssh: remote git-upload-pack 'repo.git'
ok 16 - clone host:path (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=user fetch
ssh: remote git-upload-pack 'repo.git'
From remote:repo
* branch HEAD -> FETCH_HEAD
ok 17 - fetch host:path (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=user push origin HEAD:pushed
ssh: remote git-receive-pack 'repo.git'
Everything up-to-date
ok 18 - push host:path (enabled)
expecting success:
(
cd tmp.git &&
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user push origin HEAD:pushed
)
fatal: transport 'ssh' not allowed
ok 19 - push host:path (disabled)
expecting success:
(
cd tmp.git &&
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user fetch
)
fatal: transport 'ssh' not allowed
ok 20 - fetch host:path (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'ssh' not allowed
ok 21 - clone host:path (disabled)
expecting success:
rm -rf tmp.git &&
test_config_global protocol.allow always &&
git clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
ssh: remote git-upload-pack 'repo.git'
ok 22 - clone host:path (enabled)
expecting success:
test_config_global protocol.allow always &&
git -C tmp.git fetch
ssh: remote git-upload-pack 'repo.git'
From remote:repo
* branch HEAD -> FETCH_HEAD
ok 23 - fetch host:path (enabled)
expecting success:
test_config_global protocol.allow always &&
git -C tmp.git push origin HEAD:pushed
ssh: remote git-receive-pack 'repo.git'
Everything up-to-date
ok 24 - push host:path (enabled)
expecting success:
test_config_global protocol.allow never &&
test_must_fail git -C tmp.git push origin HEAD:pushed
fatal: transport 'ssh' not allowed
ok 25 - push host:path (disabled)
expecting success:
test_config_global protocol.allow never &&
test_must_fail git -C tmp.git fetch
fatal: transport 'ssh' not allowed
ok 26 - fetch host:path (disabled)
expecting success:
rm -rf tmp.git &&
test_config_global protocol.allow never &&
test_must_fail git clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
fatal: transport 'ssh' not allowed
ok 27 - clone host:path (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
ssh: remote git-upload-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
ok 28 - clone ssh:// (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git fetch
)
ssh: remote git-upload-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
From ssh://remote/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo
* branch HEAD -> FETCH_HEAD
ok 29 - fetch ssh:// (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git push origin HEAD:pushed
)
ssh: remote git-receive-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
Everything up-to-date
ok 30 - push ssh:// (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git push origin HEAD:pushed
)
fatal: transport 'ssh' not allowed
ok 31 - push ssh:// (disabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git fetch
)
fatal: transport 'ssh' not allowed
ok 32 - fetch ssh:// (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'ssh' not allowed
ok 33 - clone ssh:// (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git -c protocol.allow=always clone --bare "$url" tmp.git &&
test_must_fail git -c protocol.$proto.allow=always clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'ssh' not allowed
Cloning into bare repository 'tmp.git'...
fatal: transport 'ssh' not allowed
ok 34 - clone ssh:// (env var has precedence)
expecting success:
rm -rf tmp.git &&
git -c protocol.$proto.allow=always clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
ssh: remote git-upload-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
ok 35 - clone ssh:// (enabled with config)
expecting success:
git -C tmp.git -c protocol.$proto.allow=always fetch
ssh: remote git-upload-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
From ssh://remote/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo
* branch HEAD -> FETCH_HEAD
ok 36 - fetch ssh:// (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=always push origin HEAD:pushed
ssh: remote git-receive-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
Everything up-to-date
ok 37 - push ssh:// (enabled)
expecting success:
test_must_fail git -C tmp.git -c protocol.$proto.allow=never push origin HEAD:pushed
fatal: transport 'ssh' not allowed
ok 38 - push ssh:// (disabled)
expecting success:
test_must_fail git -C tmp.git -c protocol.$proto.allow=never fetch
fatal: transport 'ssh' not allowed
ok 39 - fetch ssh:// (disabled)
expecting success:
rm -rf tmp.git &&
test_must_fail git -c protocol.$proto.allow=never clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
fatal: transport 'ssh' not allowed
ok 40 - clone ssh:// (disabled)
expecting success:
rm -rf tmp.git &&
git -c protocol.$proto.allow=user clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
ssh: remote git-upload-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
ok 41 - clone ssh:// (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=user fetch
ssh: remote git-upload-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
From ssh://remote/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo
* branch HEAD -> FETCH_HEAD
ok 42 - fetch ssh:// (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=user push origin HEAD:pushed
ssh: remote git-receive-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
Everything up-to-date
ok 43 - push ssh:// (enabled)
expecting success:
(
cd tmp.git &&
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user push origin HEAD:pushed
)
fatal: transport 'ssh' not allowed
ok 44 - push ssh:// (disabled)
expecting success:
(
cd tmp.git &&
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user fetch
)
fatal: transport 'ssh' not allowed
ok 45 - fetch ssh:// (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'ssh' not allowed
ok 46 - clone ssh:// (disabled)
expecting success:
rm -rf tmp.git &&
test_config_global protocol.allow always &&
git clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
ssh: remote git-upload-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
ok 47 - clone ssh:// (enabled)
expecting success:
test_config_global protocol.allow always &&
git -C tmp.git fetch
ssh: remote git-upload-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
From ssh://remote/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo
* branch HEAD -> FETCH_HEAD
ok 48 - fetch ssh:// (enabled)
expecting success:
test_config_global protocol.allow always &&
git -C tmp.git push origin HEAD:pushed
ssh: remote git-receive-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
Everything up-to-date
ok 49 - push ssh:// (enabled)
expecting success:
test_config_global protocol.allow never &&
test_must_fail git -C tmp.git push origin HEAD:pushed
fatal: transport 'ssh' not allowed
ok 50 - push ssh:// (disabled)
expecting success:
test_config_global protocol.allow never &&
test_must_fail git -C tmp.git fetch
fatal: transport 'ssh' not allowed
ok 51 - fetch ssh:// (disabled)
expecting success:
rm -rf tmp.git &&
test_config_global protocol.allow never &&
test_must_fail git clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
fatal: transport 'ssh' not allowed
ok 52 - clone ssh:// (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
ssh: remote git-upload-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
ok 53 - clone git+ssh:// (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git fetch
)
ssh: remote git-upload-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
From git+ssh://remote/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo
* branch HEAD -> FETCH_HEAD
ok 54 - fetch git+ssh:// (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=$proto &&
export GIT_ALLOW_PROTOCOL &&
git push origin HEAD:pushed
)
ssh: remote git-receive-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
Everything up-to-date
ok 55 - push git+ssh:// (enabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git push origin HEAD:pushed
)
fatal: transport 'ssh' not allowed
ok 56 - push git+ssh:// (disabled)
expecting success:
(
cd tmp.git &&
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git fetch
)
fatal: transport 'ssh' not allowed
ok 57 - fetch git+ssh:// (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'ssh' not allowed
ok 58 - clone git+ssh:// (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_ALLOW_PROTOCOL=none &&
export GIT_ALLOW_PROTOCOL &&
test_must_fail git -c protocol.allow=always clone --bare "$url" tmp.git &&
test_must_fail git -c protocol.$proto.allow=always clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'ssh' not allowed
Cloning into bare repository 'tmp.git'...
fatal: transport 'ssh' not allowed
ok 59 - clone git+ssh:// (env var has precedence)
expecting success:
rm -rf tmp.git &&
git -c protocol.$proto.allow=always clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
ssh: remote git-upload-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
ok 60 - clone git+ssh:// (enabled with config)
expecting success:
git -C tmp.git -c protocol.$proto.allow=always fetch
ssh: remote git-upload-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
From git+ssh://remote/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo
* branch HEAD -> FETCH_HEAD
ok 61 - fetch git+ssh:// (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=always push origin HEAD:pushed
ssh: remote git-receive-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
Everything up-to-date
ok 62 - push git+ssh:// (enabled)
expecting success:
test_must_fail git -C tmp.git -c protocol.$proto.allow=never push origin HEAD:pushed
fatal: transport 'ssh' not allowed
ok 63 - push git+ssh:// (disabled)
expecting success:
test_must_fail git -C tmp.git -c protocol.$proto.allow=never fetch
fatal: transport 'ssh' not allowed
ok 64 - fetch git+ssh:// (disabled)
expecting success:
rm -rf tmp.git &&
test_must_fail git -c protocol.$proto.allow=never clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
fatal: transport 'ssh' not allowed
ok 65 - clone git+ssh:// (disabled)
expecting success:
rm -rf tmp.git &&
git -c protocol.$proto.allow=user clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
ssh: remote git-upload-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
ok 66 - clone git+ssh:// (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=user fetch
ssh: remote git-upload-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
From git+ssh://remote/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo
* branch HEAD -> FETCH_HEAD
ok 67 - fetch git+ssh:// (enabled)
expecting success:
git -C tmp.git -c protocol.$proto.allow=user push origin HEAD:pushed
ssh: remote git-receive-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
Everything up-to-date
ok 68 - push git+ssh:// (enabled)
expecting success:
(
cd tmp.git &&
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user push origin HEAD:pushed
)
fatal: transport 'ssh' not allowed
ok 69 - push git+ssh:// (disabled)
expecting success:
(
cd tmp.git &&
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user fetch
)
fatal: transport 'ssh' not allowed
ok 70 - fetch git+ssh:// (disabled)
expecting success:
rm -rf tmp.git &&
(
GIT_PROTOCOL_FROM_USER=0 &&
export GIT_PROTOCOL_FROM_USER &&
test_must_fail git -c protocol.$proto.allow=user clone --bare "$url" tmp.git
)
Cloning into bare repository 'tmp.git'...
fatal: transport 'ssh' not allowed
ok 71 - clone git+ssh:// (disabled)
expecting success:
rm -rf tmp.git &&
test_config_global protocol.allow always &&
git clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
ssh: remote git-upload-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
ok 72 - clone git+ssh:// (enabled)
expecting success:
test_config_global protocol.allow always &&
git -C tmp.git fetch
ssh: remote git-upload-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
From git+ssh://remote/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo
* branch HEAD -> FETCH_HEAD
ok 73 - fetch git+ssh:// (enabled)
expecting success:
test_config_global protocol.allow always &&
git -C tmp.git push origin HEAD:pushed
ssh: remote git-receive-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/repo.git'
Everything up-to-date
ok 74 - push git+ssh:// (enabled)
expecting success:
test_config_global protocol.allow never &&
test_must_fail git -C tmp.git push origin HEAD:pushed
fatal: transport 'ssh' not allowed
ok 75 - push git+ssh:// (disabled)
expecting success:
test_config_global protocol.allow never &&
test_must_fail git -C tmp.git fetch
fatal: transport 'ssh' not allowed
ok 76 - fetch git+ssh:// (disabled)
expecting success:
rm -rf tmp.git &&
test_config_global protocol.allow never &&
test_must_fail git clone --bare "$url" tmp.git
Cloning into bare repository 'tmp.git'...
fatal: transport 'ssh' not allowed
ok 77 - clone git+ssh:// (disabled)
expecting success:
test_must_fail git clone ssh://-remote/repo.git dash-host 2>stderr &&
! grep ^ssh: stderr
ok 78 - hostnames starting with dash are rejected
expecting success:
git init --bare remote/-repo.git &&
git push remote/-repo.git HEAD
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/-repo.git/
To remote/-repo.git
* [new branch] HEAD -> master
ok 79 - setup repo with dash
expecting success:
test_must_fail git clone remote:-repo.git dash-path 2>stderr &&
! grep ^ssh: stderr
ok 80 - repo names starting with dash are rejected
expecting success:
git clone "remote:$PWD/remote/-repo.git" dash-path
Cloning into 'dash-path'...
ssh: remote git-upload-pack '/<<PKGBUILDDIR>>/t/trash directory.t5813-proto-disable-ssh/remote/-repo.git'
ok 81 - full paths still work
# passed all 81 test(s)
1..81
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6004-rev-list-path-optim.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6004-rev-list-path-optim/.git/
expecting success:
echo Hello >a &&
mkdir d &&
echo World >d/f &&
echo World >d/z &&
git add a d &&
test_tick &&
git commit -m "Initial commit" &&
git rev-parse --verify HEAD &&
git tag initial
[master (root-commit) 5c8df84] Initial commit
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 a
create mode 100644 d/f
create mode 100644 d/z
5c8df8481b8e4f419cc2268f5e68a10e349bbe37
ok 1 - setup
expecting success:
test_tick &&
commit=$(echo "Unchanged tree" | git commit-tree "HEAD^{tree}" -p HEAD) &&
test $(git rev-list $commit | wc -l) = 2 &&
test $(git rev-list $commit -- . | wc -l) = 1
ok 2 - path-optimization
expecting success:
git checkout -b side &&
echo Irrelevant >c &&
echo Irrelevant >d/f &&
git add c d/f &&
test_tick &&
git commit -m "Side makes an irrelevant commit" &&
git tag side_c0 &&
echo "More Irrelevancy" >c &&
git add c &&
test_tick &&
git commit -m "Side makes another irrelevant commit" &&
echo Bye >a &&
git add a &&
test_tick &&
git commit -m "Side touches a" &&
git tag side_a1 &&
echo "Yet more Irrelevancy" >c &&
git add c &&
test_tick &&
git commit -m "Side makes yet another irrelevant commit" &&
git checkout master &&
echo Another >b &&
echo Munged >d/z &&
git add b d/z &&
test_tick &&
git commit -m "Master touches b" &&
git tag master_b0 &&
git merge side &&
echo Touched >b &&
git add b &&
test_tick &&
git commit -m "Master touches b again"
Switched to a new branch 'side'
[side d02d707] Side makes an irrelevant commit
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 c
[side 381f63c] Side makes another irrelevant commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[side e8cf16f] Side touches a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[side edbc4dc] Side makes yet another irrelevant commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'master'
[master 4417088] Master touches b
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 b
Merging:
4417088 Master touches b
virtual side
found 1 common ancestor:
5c8df84 Initial commit
Merge made by the 'recursive' strategy.
a | 2 +-
c | 1 +
d/f | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
create mode 100644 c
[master 6a8c990] Master touches b again
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 3 - further setup
expecting success:
git rev-parse side_a1 initial >expected &&
git rev-list HEAD -- a >actual &&
test_cmp expected actual
ok 4 - path optimization 2
expecting success:
git rev-parse master^ master_b0 side_c0 initial >expected &&
git rev-list HEAD -- d >actual &&
test_cmp expected actual
ok 5 - pathspec with leading path
expecting success:
git rev-parse master^ master_b0 side_c0 initial >expected &&
git rev-list HEAD -- "d/*" >actual &&
test_cmp expected actual
ok 6 - pathspec with glob (1)
expecting success:
git rev-parse side_c0 initial >expected &&
git rev-list HEAD -- "d/[a-m]*" >actual &&
test_cmp expected actual
ok 7 - pathspec with glob (2)
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6005-rev-list-count.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6005-rev-list-count/.git/
expecting success:
for n in 1 2 3 4 5 ; do \
echo $n > a ; \
git add a ; \
git commit -m "$n" ; \
done
[master (root-commit) 54998ea] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
[master 3d2b5f1] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 7a46b9c] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master b55662b] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master ae080df] 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
test $(git rev-list HEAD | wc -l) = 5
ok 2 - no options
expecting success:
test $(git rev-list HEAD --max-count=0 | wc -l) = 0 &&
test $(git rev-list HEAD --max-count=3 | wc -l) = 3 &&
test $(git rev-list HEAD --max-count=5 | wc -l) = 5 &&
test $(git rev-list HEAD --max-count=10 | wc -l) = 5
ok 3 - --max-count
expecting success:
test $(git rev-list HEAD --max-count=1 | wc -l) = 1 &&
test $(git rev-list HEAD -1 | wc -l) = 1 &&
test $(git rev-list HEAD -n1 | wc -l) = 1 &&
test $(git rev-list HEAD -n 1 | wc -l) = 1
ok 4 - --max-count all forms
expecting success:
test $(git rev-list HEAD --skip=0 | wc -l) = 5 &&
test $(git rev-list HEAD --skip=3 | wc -l) = 2 &&
test $(git rev-list HEAD --skip=5 | wc -l) = 0 &&
test $(git rev-list HEAD --skip=10 | wc -l) = 0
ok 5 - --skip
expecting success:
test $(git rev-list HEAD --skip=0 --max-count=0 | wc -l) = 0 &&
test $(git rev-list HEAD --skip=0 --max-count=10 | wc -l) = 5 &&
test $(git rev-list HEAD --skip=3 --max-count=0 | wc -l) = 0 &&
test $(git rev-list HEAD --skip=3 --max-count=1 | wc -l) = 1 &&
test $(git rev-list HEAD --skip=3 --max-count=2 | wc -l) = 2 &&
test $(git rev-list HEAD --skip=3 --max-count=10 | wc -l) = 2 &&
test $(git rev-list HEAD --skip=5 --max-count=10 | wc -l) = 0 &&
test $(git rev-list HEAD --skip=10 --max-count=10 | wc -l) = 0
ok 6 - --skip --max-count
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6002-rev-list-bisect.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6002-rev-list-bisect/.git/
expecting success: test $_bisect_err -le $_max_diff
ok 1 - bisection diff --bisect l0 ^root <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 2 - bisection diff --bisect l1 ^root <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 3 - bisection diff --bisect l2 ^root <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 4 - bisection diff --bisect a0 ^root <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 5 - bisection diff --bisect a1 ^root <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 6 - bisection diff --bisect a2 ^root <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 7 - bisection diff --bisect a3 ^root <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 8 - bisection diff --bisect b1 ^root <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 9 - bisection diff --bisect b2 ^root <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 10 - bisection diff --bisect b3 ^root <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 11 - bisection diff --bisect c1 ^root <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 12 - bisection diff --bisect c2 ^root <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 13 - bisection diff --bisect c3 ^root <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 14 - bisection diff --bisect E ^F <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 15 - bisection diff --bisect e1 ^F <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 16 - bisection diff --bisect e2 ^F <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 17 - bisection diff --bisect e3 ^F <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 18 - bisection diff --bisect e4 ^F <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 19 - bisection diff --bisect e5 ^F <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 20 - bisection diff --bisect e6 ^F <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 21 - bisection diff --bisect e7 ^F <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 22 - bisection diff --bisect f1 ^F <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 23 - bisection diff --bisect f2 ^F <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 24 - bisection diff --bisect f3 ^F <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 25 - bisection diff --bisect f4 ^F <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 26 - bisection diff --bisect E ^F <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 27 - bisection diff --bisect V ^U <= 1
expecting success: test $_bisect_err -le $_max_diff
ok 28 - bisection diff --bisect V ^U ^u1 ^u2 ^u3 <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 29 - bisection diff --bisect u1 ^U <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 30 - bisection diff --bisect u2 ^U <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 31 - bisection diff --bisect u3 ^U <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 32 - bisection diff --bisect u4 ^U <= 0
expecting success: test $_bisect_err -le $_max_diff
ok 33 - bisection diff --bisect u5 ^U <= 0
expecting success: check_output bisect-l5-root "git rev-list $_bisect_option l5 ^root"
ok 34 - --bisect l5 ^root
expecting success: check_output bisect-l5-root-c3 "git rev-list $_bisect_option l5 ^root ^c3"
ok 35 - --bisect l5 ^root ^c3
expecting success: check_output bisect-l5-root-c3-b4 "git rev-list $_bisect_option l5 ^c3 ^b4"
ok 36 - --bisect l5 ^root ^c3 ^b4
expecting success: check_output bisect-l3-root-c3-b4 "git rev-list $_bisect_option l3 ^root ^c3 ^b4"
ok 37 - --bisect l3 ^root ^c3 ^b4
expecting success: check_output bisect-l5-b3-a3-b4-a4 "git rev-list $_bisect_option l3 ^b3 ^a3 ^a4"
ok 38 - --bisect l5 ^b3 ^a3 ^b4 ^a4
expecting success: check_output bisect-l4-a2-a3-b-a4 "git rev-list $_bisect_option l4 ^a2 ^a3 ^a4"
ok 39 - --bisect l4 ^a2 ^a3 ^b ^a4
expecting success: check_output bisect-l3-a2-a3-b-a4 "git rev-list $_bisect_option l3 ^a2 ^a3 ^a4"
ok 40 - --bisect l3 ^a2 ^a3 ^b ^a4
expecting success: check_output bisect-a4-a2-a3-b4 "git rev-list $_bisect_option a4 ^a2 ^a3 ^b4"
ok 41 - --bisect a4 ^a2 ^a3 ^b4
expecting success: check_output bisect-a4-a2-a3-b4-c2 "git rev-list $_bisect_option a4 ^a2 ^a3 ^b4 ^c2"
ok 42 - --bisect a4 ^a2 ^a3 ^b4 ^c2
expecting success: check_output bisect-a4-a2-a3-b4-c2-c3 "git rev-list $_bisect_option a4 ^a2 ^a3 ^b4 ^c2 ^c3"
ok 43 - --bisect a4 ^a2 ^a3 ^b4 ^c2 ^c3
expecting success: check_output bisect-a4-a2-a3-b4 "git rev-list $_bisect_option a4 ^a2 ^a3 ^b4"
ok 44 - --bisect a4 ^a2 ^a3 ^b4
expecting success: check_output bisect-c3-a2-a3-b4-c2 "git rev-list $_bisect_option c3 ^a2 ^a3 ^b4 ^c2"
ok 45 - --bisect c3 ^a2 ^a3 ^b4 ^c2
expecting success:
git update-ref refs/bisect/bad c3 &&
good=$(git rev-parse b1) &&
git update-ref refs/bisect/good-$good $good &&
good=$(git rev-parse c1) &&
git update-ref refs/bisect/good-$good $good
ok 46 - set up fake --bisect refs
expecting success:
# the only thing between c3 and c1 is c2
git rev-parse c2 >expect &&
git rev-list --bisect >actual &&
test_cmp expect actual
ok 47 - rev-list --bisect can default to good/bad refs
expecting success:
git rev-parse c3 ^b1 ^c1 >expect &&
git rev-parse --bisect >actual &&
# output order depends on the refnames, which in turn depends on
# the exact sha1s. We just want to make sure we have the same set
# of lines in any order.
sort <expect >expect.sorted &&
sort <actual >actual.sorted &&
test_cmp expect.sorted actual.sorted
ok 48 - rev-parse --bisect can default to good/bad refs
# passed all 48 test(s)
1..48
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6003-rev-list-topo-order.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6003-rev-list-topo-order/.git/
expecting success: check_output rev-list-has-correct-number-of-entries "git rev-list HEAD | wc -l | tr -d \" \""
ok 1 - rev-list has correct number of entries
expecting success: check_output simple-topo-order "git rev-list --topo-order HEAD"
ok 2 - simple topo order
expecting success: check_output simple-date-order "git rev-list --date-order HEAD"
ok 3 - simple date order
expecting success: check_output simple-author-date-order "git rev-list --author-date-order HEAD"
ok 4 - simple author-date order
expecting success: check_output two-diamonds-topo-order-g6 "git rev-list --topo-order g4"
ok 5 - two diamonds topo order (g6)
expecting success: check_output multiple-heads "git rev-list --topo-order a3 b3 c3"
ok 6 - multiple heads
expecting success: check_output multiple-heads-prune-at-a1 "git rev-list --topo-order a3 b3 c3 ^a1"
ok 7 - multiple heads, prune at a1
expecting success: check_output multiple-heads-prune-at-l1 "git rev-list --topo-order a3 b3 c3 ^l1"
ok 8 - multiple heads, prune at l1
expecting success: check_output cross-epoch-head-at-l5-prune-at-l1 "git rev-list --topo-order l5 ^l1"
ok 9 - cross-epoch, head at l5, prune at l1
expecting success: check_output duplicated-head-arguments "git rev-list --topo-order l5 l5 ^l1"
ok 10 - duplicated head arguments
expecting success: check_output prune-near-topo "git rev-list --topo-order a4 ^c3"
ok 11 - prune near topo
expecting success: check_output head-has-no-parent "git rev-list --topo-order root"
ok 12 - head has no parent
expecting success: check_output two-nodes-one-head-one-base "git rev-list --topo-order l0"
ok 13 - two nodes - one head, one base
expecting success: check_output three-nodes-one-head-one-internal-one-base "git rev-list --topo-order l1"
ok 14 - three nodes one head, one internal, one base
expecting success: check_output linear-prune-l2-root "git rev-list --topo-order l2 ^root"
ok 15 - linear prune l2 ^root
expecting success: check_output linear-prune-l2-l0 "git rev-list --topo-order l2 ^l0"
ok 16 - linear prune l2 ^l0
expecting success: check_output linear-prune-l2-l1 "git rev-list --topo-order l2 ^l1"
ok 17 - linear prune l2 ^l1
expecting success: check_output linear-prune-l5-a4 "git rev-list --topo-order l5 ^a4"
ok 18 - linear prune l5 ^a4
expecting success: check_output linear-prune-l5-l3 "git rev-list --topo-order l5 ^l3"
ok 19 - linear prune l5 ^l3
expecting success: check_output linear-prune-l5-l4 "git rev-list --topo-order l5 ^l4"
ok 20 - linear prune l5 ^l4
expecting success: check_output max-count-10-topo-order "git rev-list --topo-order --max-count=10 l5"
ok 21 - max-count 10 - topo order
expecting success: check_output max-count-10-non-topo-order "git rev-list --max-count=10 l5"
ok 22 - max-count 10 - non topo order
expecting success: check_output max-age-c3-no-topo-order "git rev-list --max-age=51148811 l5"
ok 23 - --max-age=c3, no --topo-order
expecting success: check_output one-specified-head-reachable-from-another-a4-c3-topo-order "list_duplicates git rev-list --topo-order a4 c3"
ok 24 - one specified head reachable from another a4, c3, --topo-order
expecting success: check_output one-specified-head-reachable-from-another-c3-a4-topo-order "list_duplicates git rev-list --topo-order c3 a4"
ok 25 - one specified head reachable from another c3, a4, --topo-order
expecting success: check_output one-specified-head-reachable-from-another-a4-c3-no-topo-order "list_duplicates git rev-list a4 c3"
ok 26 - one specified head reachable from another a4, c3, no --topo-order
expecting success: check_output one-specified-head-reachable-from-another-c3-a4-no-topo-order "list_duplicates git rev-list c3 a4"
ok 27 - one specified head reachable from another c3, a4, no --topo-order
expecting success: check_output graph-with-c3-and-a4-parents-of-head "list_duplicates git rev-list m1"
ok 28 - graph with c3 and a4 parents of head
expecting success: check_output graph-with-a4-and-c3-parents-of-head "list_duplicates git rev-list m2"
ok 29 - graph with a4 and c3 parents of head
expecting success: git rev-list --topo-order a3 ^a3
ok 30 - head ^head --topo-order
expecting success: git rev-list a3 ^a3
ok 31 - head ^head no --topo-order
expecting success: check_output simple-topo-order-l5r1 "git rev-list --topo-order l5r1"
ok 32 - simple topo order (l5r1)
expecting success: check_output simple-topo-order-r1l5 "git rev-list --topo-order r1l5"
ok 33 - simple topo order (r1l5)
expecting success: check_output don-t-print-things-unreachable-from-one-branch "git rev-list a3 ^b3 --topo-order"
ok 34 - don't print things unreachable from one branch
expecting success: check_output topo-order-a4-l3 "git rev-list --topo-order a4 l3"
ok 35 - --topo-order a4 l3
# passed all 35 test(s)
1..35
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6007-rev-list-cherry-pick-file.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6007-rev-list-cherry-pick-file/.git/
expecting success:
echo Hallo > foo &&
git add foo &&
test_tick &&
git commit -m "A" &&
git tag A &&
git checkout -b branch &&
echo Bello > foo &&
echo Cello > bar &&
git add foo bar &&
test_tick &&
git commit -m "C" &&
git tag C &&
echo Dello > bar &&
git add bar &&
test_tick &&
git commit -m "E" &&
git tag E &&
git checkout master &&
git checkout branch foo &&
test_tick &&
git commit -m "B" &&
git tag B &&
echo Cello > bar &&
git add bar &&
test_tick &&
git commit -m "D" &&
git tag D &&
echo Nello > bar &&
git add bar &&
test_tick &&
git commit -m "F" &&
git tag F
[master (root-commit) 87a5b85] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
Switched to a new branch 'branch'
[branch d81b112] C
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 bar
[branch 50f946e] E
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'master'
Updated 1 path from 75417d5
[master 9e00a87] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 9c68531] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
[master 555ccf5] F
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
git rev-list --left-right B...C > actual &&
git name-rev --stdin --name-only --refs="*tags/*" \
< actual > actual.named &&
test_cmp expect actual.named
ok 2 - --left-right
expecting success:
git rev-list --count B...C > actual &&
test "$(cat actual)" = 2
ok 3 - --count
expecting success:
test -z "$(git rev-list --left-right --cherry-pick B...C -- foo)"
ok 4 - --cherry-pick foo comes up empty
expecting success:
git rev-list --left-right --cherry-pick B...C -- bar > actual &&
git name-rev --stdin --name-only --refs="*tags/*" \
< actual > actual.named &&
test_cmp expect actual.named
ok 5 - --cherry-pick bar does not come up empty
expecting success:
git rev-list --left-right B...C -- bar > actual &&
git name-rev --stdin --name-only --refs="*tags/*" \
< actual > actual.named &&
test_cmp expect actual.named
ok 6 - bar does not come up empty
expecting success:
git rev-list --left-right --cherry-pick F...E -- bar > actual &&
git name-rev --stdin --name-only --refs="*tags/*" \
< actual > actual.named &&
test_cmp expect actual.named
ok 7 - --cherry-pick bar does not come up empty (II)
expecting success:
git rev-list --left-right --cherry-pick F...E -- bar >actual &&
git name-rev --stdin --name-only --refs="*tags/F" --refs="*tags/E" \
<actual >actual.named &&
test_cmp expect actual.named
ok 8 - name-rev multiple --refs combine inclusive
expecting success:
git rev-list --left-right --right-only --cherry-pick F...E -- bar >>expect &&
git rev-list --left-right --cherry-pick F...E -- bar >actual &&
git name-rev --stdin --name-only --refs="*tags/F" \
<actual >actual.named &&
test_cmp expect actual.named
ok 9 - name-rev --refs excludes non-matched patterns
expecting success:
git rev-list --left-right --right-only --cherry-pick F...E -- bar >>expect &&
git rev-list --left-right --cherry-pick F...E -- bar >actual &&
git name-rev --stdin --name-only --refs="*tags/*" --exclude="*E" \
<actual >actual.named &&
test_cmp expect actual.named
ok 10 - name-rev --exclude excludes matched patterns
expecting success:
git rev-list --left-right --cherry-pick F...E -- bar >expect &&
git name-rev --stdin --name-only --refs="*tags/F" --refs="*tags/E" --no-refs --refs="*tags/G" \
<expect >actual &&
test_cmp expect actual
ok 11 - name-rev --no-refs clears the refs list
expecting success:
git rev-list --cherry-mark F...E -- bar > actual &&
git name-rev --stdin --name-only --refs="*tags/*" \
< actual > actual.named &&
test_cmp expect actual.named
ok 12 - --cherry-mark
expecting success:
git rev-list --cherry-mark --left-right F...E -- bar > actual &&
git name-rev --stdin --name-only --refs="*tags/*" \
< actual > actual.named &&
test_cmp expect actual.named
ok 13 - --cherry-mark --left-right
expecting success:
git rev-list --cherry-pick --right-only F...E -- bar > actual &&
git name-rev --stdin --name-only --refs="*tags/*" \
< actual > actual.named &&
test_cmp expect actual.named
ok 14 - --cherry-pick --right-only
expecting success:
git rev-list --cherry-pick --left-only E...F -- bar > actual &&
git name-rev --stdin --name-only --refs="*tags/*" \
< actual > actual.named &&
test_cmp expect actual.named
ok 15 - --cherry-pick --left-only
expecting success:
git rev-list --cherry F...E -- bar > actual &&
git name-rev --stdin --name-only --refs="*tags/*" \
< actual > actual.named &&
test_cmp expect actual.named
ok 16 - --cherry
expecting success:
git rev-list --cherry --count F...E -- bar > actual &&
test_cmp expect actual
ok 17 - --cherry --count
expecting success:
git rev-list --cherry-mark --count F...E -- bar > actual &&
test_cmp expect actual
ok 18 - --cherry-mark --count
expecting success:
git rev-list --cherry-mark --left-right --count F...E -- bar > actual &&
test_cmp expect actual
ok 19 - --cherry-mark --left-right --count
expecting success:
git symbolic-ref HEAD refs/heads/independent &&
rm .git/index &&
echo Hallo > foo &&
git add foo &&
test_tick &&
git commit -m "independent" &&
echo Bello > foo &&
test_tick &&
git commit -m "independent, too" foo &&
test -z "$(git rev-list --left-right --cherry-pick \
HEAD...master -- foo)"
[independent (root-commit) 5da548c] independent
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
[independent de095d9] independent, too
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 20 - --cherry-pick with independent, but identical branches
expecting success:
git rev-list --count --left-right C...D > actual &&
test_cmp expect actual
ok 21 - --count --left-right
expecting success:
git checkout -b shy-diff &&
test_commit dont-look-at-me &&
echo Hello >dont-look-at-me.t &&
test_tick &&
git commit -m tip dont-look-at-me.t &&
git checkout -b mainline HEAD^ &&
test_commit to-cherry-pick &&
remove_loose_object shy-diff^:dont-look-at-me.t &&
git rev-list --cherry-pick ...shy-diff
Switched to a new branch 'shy-diff'
[shy-diff 38fbe57] dont-look-at-me
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dont-look-at-me.t
[shy-diff f065567] tip
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'mainline'
[mainline 7b441fd] to-cherry-pick
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 to-cherry-pick.t
7b441fdb48b15549aa518c0e9aef495001ae11cd
f065567c34afb81b41cc75716781105f7fc57824
ok 22 - --cherry-pick avoids looking at full diffs
# passed all 22 test(s)
1..22
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6008-rev-list-submodule.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6008-rev-list-submodule/.git/
expecting success:
: > file &&
git add file &&
test_tick &&
git commit -m initial &&
echo 1 > file &&
test_tick &&
git commit -m second file &&
echo 2 > file &&
test_tick &&
git commit -m third file &&
rm .git/index &&
: > super-file &&
git add super-file &&
git submodule add "$(pwd)" sub &&
git symbolic-ref HEAD refs/heads/super &&
test_tick &&
git commit -m super-initial &&
echo 1 > super-file &&
test_tick &&
git commit -m super-first super-file &&
echo 2 > super-file &&
test_tick &&
git commit -m super-second super-file
[master (root-commit) 1bd44cb] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
[master 534ad2c] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 1795412] third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6008-rev-list-submodule/sub'...
done.
[super (root-commit) a04e50d] super-initial
Author: A U Thor <author@example.com>
3 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub
create mode 100644 super-file
[super 89b9e3c] super-first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[super a1c10b6] super-second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
git rev-list --objects super master ^super^
a1c10b6a89b8c7872c086ceba331c47855bd9444
17954123b4d2a45f7e0fec2fea14972db2b90a1f
534ad2c6e7b5b68dcaa4f008327c6c2ab1fa47ff
1bd44cb9d13204b0fe1958db0082f5028a16eb3a
03cb95bf3968abeeabd83a97c1d228dd6f2d72c7
0cfbf08886fca9a91cb753ec8734c84fcbe52c9f super-file
d9cc608eedd5d2cc63c262272b7a0f6ab6aed5dd
f27c6ae26adb8396d3861976ba268f87ad8afa0b
df2b8fc99e1c1d4dbc0a854d9f72157f1d6ea078
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 file
ok 2 - Ilari's test
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6006-rev-list-format.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6006-rev-list-format/.git/
expecting success:
: >foo &&
git add foo &&
git config i18n.commitEncoding $test_encoding &&
echo "$added_iso88591" | git commit -F - &&
head1=$(git rev-parse --verify HEAD) &&
head1_short=$(git rev-parse --verify --short $head1) &&
tree1=$(git rev-parse --verify HEAD:) &&
tree1_short=$(git rev-parse --verify --short $tree1) &&
echo "$changed" > foo &&
echo "$changed_iso88591" | git commit -a -F - &&
head2=$(git rev-parse --verify HEAD) &&
head2_short=$(git rev-parse --verify --short $head2) &&
tree2=$(git rev-parse --verify HEAD:) &&
tree2_short=$(git rev-parse --verify --short $tree2) &&
git config --unset i18n.commitEncoding
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
git rev-list --pretty=format:'%%h' master >output.percent &&
test_cmp expect.percent output.percent
ok 2 - format percent
expecting success:
git rev-list --pretty=format:'%H%n%h' master >output.hash &&
test_cmp expect.hash output.hash
ok 3 - format hash
expecting success:
git rev-list --pretty=format:'%T%n%t' master >output.tree &&
test_cmp expect.tree output.tree
ok 4 - format tree
expecting success:
git rev-list --pretty=format:'%P%n%p' master >output.parents &&
test_cmp expect.parents output.parents
ok 5 - format parents
expecting success:
git rev-list --pretty=format:'%an%n%ae%n%ad%n%aD%n%at' master >output.author &&
test_cmp expect.author output.author
ok 6 - format author
expecting success:
git rev-list --pretty=format:'%cn%n%ce%n%cd%n%cD%n%ct' master >output.committer &&
test_cmp expect.committer output.committer
ok 7 - format committer
expecting success:
git rev-list --pretty=format:'%e' master >output.encoding &&
test_cmp expect.encoding output.encoding
ok 8 - format encoding
expecting success:
git rev-list --pretty=format:'%s' master >output.subject &&
test_cmp expect.subject output.subject
ok 9 - format subject
expecting success:
git rev-list --pretty=format:'%<(20,trunc)%s' master >output.subject-truncated &&
test_cmp expect.subject-truncated output.subject-truncated
ok 10 - format subject-truncated
expecting success:
git rev-list --pretty=format:'%b' master >output.body &&
test_cmp expect.body output.body
ok 11 - format body
expecting success:
git rev-list --pretty=format:'%B' master >output.raw-body &&
test_cmp expect.raw-body output.raw-body
ok 12 - format raw-body
expecting success:
cat >expect <<-EOF &&
commit $head2
<RED>foo<GREEN>bar<BLUE>baz<RESET>xyzzy
EOF
format="%Credfoo%Cgreenbar%Cbluebaz%Cresetxyzzy" &&
git rev-list --color --format="$format" -1 master >actual.raw &&
test_decode_color <actual.raw >actual &&
test_cmp expect actual
ok 13 - basic colors
expecting success:
git rev-list --format="%S" -1 master | grep "%S"
%S
ok 14 - %S is not a placeholder for rev-list yet
expecting success:
cat >expect <<-EOF &&
commit $head2
<BOLD;RED;BYELLOW>foo<RESET>
EOF
format="%C(red yellow bold)foo%C(reset)" &&
git rev-list --color --format="$format" -1 master >actual.raw &&
test_decode_color <actual.raw >actual &&
test_cmp expect actual
ok 15 - advanced colors
expecting success:
git log --format=$color -1 >actual &&
has_no_color actual
ok 16 - %Cred does not enable color by default
expecting success:
git -c color.diff=always log --format=$color -1 >actual &&
has_color actual
ok 17 - %Cred enables colors for color.diff
expecting success:
git -c color.ui=always log --format=$color -1 >actual &&
has_color actual
ok 18 - %Cred enables colors for color.ui
expecting success:
git log --format=$color -1 --color >actual &&
has_color actual
ok 19 - %Cred respects --color
expecting success:
git -c color.ui=always log --format=$color -1 --no-color >actual &&
has_no_color actual
ok 20 - %Cred respects --no-color
checking prerequisite: TTY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq PERL &&
# Reading from the pty master seems to get stuck _sometimes_
# on Mac OS X 10.5.0, using Perl 5.10.0 or 5.8.9.
#
# Reproduction recipe: run
#
# i=0
# while ./test-terminal.perl echo hi $i
# do
# : $((i = $i + 1))
# done
#
# After 2000 iterations or so it hangs.
# https://rt.cpan.org/Ticket/Display.html?id=65692
#
test "$(uname -s)" != Darwin &&
perl "$TEST_DIRECTORY"/test-terminal.perl \
sh -c "test -t 1 && test -t 2"
)
prerequisite TTY ok
expecting success:
test_terminal git log --format=$color -1 --color=auto >actual &&
has_color actual
died of signal 15 at /<<PKGBUILDDIR>>/t/test-terminal.perl line 35.
ok 21 - %Cred respects --color=auto (stdout is tty)
expecting success:
(
TERM=vt100 && export TERM &&
git log --format=$color -1 --color=auto >actual &&
has_no_color actual
)
ok 22 - %Cred respects --color=auto (stdout not tty)
expecting success:
git log --format=$color -1 >actual &&
has_no_color actual
ok 23 - %C(...) does not enable color by default
expecting success:
git -c color.diff=always log --format=$color -1 >actual &&
has_color actual
ok 24 - %C(...) enables colors for color.diff
expecting success:
git -c color.ui=always log --format=$color -1 >actual &&
has_color actual
ok 25 - %C(...) enables colors for color.ui
expecting success:
git log --format=$color -1 --color >actual &&
has_color actual
ok 26 - %C(...) respects --color
expecting success:
git -c color.ui=always log --format=$color -1 --no-color >actual &&
has_no_color actual
ok 27 - %C(...) respects --no-color
expecting success:
test_terminal git log --format=$color -1 --color=auto >actual &&
has_color actual
ok 28 - %C(...) respects --color=auto (stdout is tty)
expecting success:
(
TERM=vt100 && export TERM &&
git log --format=$color -1 --color=auto >actual &&
has_no_color actual
)
ok 29 - %C(...) respects --color=auto (stdout not tty)
expecting success:
git log --format=$color -1 >actual &&
has_no_color actual
ok 30 - %C(auto,...) does not enable color by default
expecting success:
git -c color.diff=always log --format=$color -1 >actual &&
has_color actual
ok 31 - %C(auto,...) enables colors for color.diff
expecting success:
git -c color.ui=always log --format=$color -1 >actual &&
has_color actual
ok 32 - %C(auto,...) enables colors for color.ui
expecting success:
git log --format=$color -1 --color >actual &&
has_color actual
ok 33 - %C(auto,...) respects --color
expecting success:
git -c color.ui=always log --format=$color -1 --no-color >actual &&
has_no_color actual
ok 34 - %C(auto,...) respects --no-color
expecting success:
test_terminal git log --format=$color -1 --color=auto >actual &&
has_color actual
ok 35 - %C(auto,...) respects --color=auto (stdout is tty)
expecting success:
(
TERM=vt100 && export TERM &&
git log --format=$color -1 --color=auto >actual &&
has_no_color actual
)
ok 36 - %C(auto,...) respects --color=auto (stdout not tty)
expecting success:
git log --format=$ALWAYS_COLOR -1 >actual &&
has_color actual
ok 37 - %C(always,...) enables color even without tty
expecting success:
git log --color --format="%C(auto)%H" -1 >actual.raw &&
test_decode_color <actual.raw >actual &&
echo "<YELLOW>$(git rev-parse HEAD)<RESET>" >expect &&
test_cmp expect actual
ok 38 - %C(auto) respects --color
expecting success:
git log --no-color --format="%C(auto)%H" -1 >actual &&
git rev-parse HEAD >expect &&
test_cmp expect actual
ok 39 - %C(auto) respects --no-color
expecting success:
git rev-list --color --format="%C(auto,green)foo%C(auto,reset)" \
-1 HEAD >actual.raw &&
test_decode_color <actual.raw >actual &&
cat >expect <<-EOF &&
commit $(git rev-parse HEAD)
<GREEN>foo<RESET>
EOF
test_cmp expect actual
ok 40 - rev-list %C(auto,...) respects --color
expecting success:
git config i18n.commitencoding $test_encoding &&
echo change2 >foo && git commit -a -F commit-msg &&
head3=$(git rev-parse --verify HEAD) &&
head3_short=$(git rev-parse --short $head3)
[master 79c1a11] Test printing of complex bodies
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 41 - setup complex body
expecting success:
git rev-list --pretty=format:'%e' master >output.complex-encoding &&
test_cmp expect.complex-encoding output.complex-encoding
ok 42 - format complex-encoding
expecting success:
git rev-list --pretty=format:'%s' master >output.complex-subject &&
test_cmp expect.complex-subject output.complex-subject
ok 43 - format complex-subject
expecting success:
git rev-list --pretty=format:'%<(20,trunc)%s' master >output.complex-subject-trunc &&
test_cmp expect.complex-subject-trunc output.complex-subject-trunc
ok 44 - format complex-subject-trunc
expecting success:
git rev-list --pretty=format:'%<(20,mtrunc)%s' master >output.complex-subject-mtrunc &&
test_cmp expect.complex-subject-mtrunc output.complex-subject-mtrunc
ok 45 - format complex-subject-mtrunc
expecting success:
git rev-list --pretty=format:'%<(20,ltrunc)%s' master >output.complex-subject-ltrunc &&
test_cmp expect.complex-subject-ltrunc output.complex-subject-ltrunc
ok 46 - format complex-subject-ltrunc
expecting success:
cat <<-EOF >expected.utf-8 &&
commit $head3
This commit message is much longer than the others,
and it will be encoded in $test_encoding. We should therefore
include an ISO8859 character: ¡bueno!
commit $head2
commit $head1
EOF
iconv -f utf-8 -t $test_encoding expected.utf-8 >expected.ISO8859-1
ok 47 - prepare expected messages (for test %b)
expecting success:
git rev-list --pretty=format:'%b' master >output.complex-body &&
test_cmp expect.complex-body output.complex-body
ok 48 - format complex-body
expecting success:
git rev-list --pretty=format:'%s' master >output.complex-subject-commitencoding-unset &&
test_cmp expect.complex-subject-commitencoding-unset output.complex-subject-commitencoding-unset
ok 49 - format complex-subject-commitencoding-unset
expecting success:
git rev-list --pretty=format:'%<(20,trunc)%s' master >output.complex-subject-commitencoding-unset-trunc &&
test_cmp expect.complex-subject-commitencoding-unset-trunc output.complex-subject-commitencoding-unset-trunc
ok 50 - format complex-subject-commitencoding-unset-trunc
expecting success:
git rev-list --pretty=format:'%<(20,mtrunc)%s' master >output.complex-subject-commitencoding-unset-mtrunc &&
test_cmp expect.complex-subject-commitencoding-unset-mtrunc output.complex-subject-commitencoding-unset-mtrunc
ok 51 - format complex-subject-commitencoding-unset-mtrunc
expecting success:
git rev-list --pretty=format:'%<(20,ltrunc)%s' master >output.complex-subject-commitencoding-unset-ltrunc &&
test_cmp expect.complex-subject-commitencoding-unset-ltrunc output.complex-subject-commitencoding-unset-ltrunc
ok 52 - format complex-subject-commitencoding-unset-ltrunc
expecting success:
git rev-list --pretty=format:'%b' master >output.complex-body-commitencoding-unset &&
test_cmp expect.complex-body-commitencoding-unset output.complex-body-commitencoding-unset
ok 53 - format complex-body-commitencoding-unset
expecting success:
echo >expect commit $head3 &&
echo >>expect fooQbar &&
git rev-list -1 --format=foo%x00bar HEAD >actual.nul &&
nul_to_q <actual.nul >actual &&
test_cmp expect actual
ok 54 - %x00 shows NUL
expecting success:
echo 2005-04-07 >expect.ad-short &&
git log -1 --date=short --pretty=tformat:%ad >output.ad-short master &&
test_cmp expect.ad-short output.ad-short
ok 55 - %ad respects --date=
expecting success:
test_tick &&
C=$(GIT_AUTHOR_EMAIL= git commit-tree HEAD^{tree} </dev/null) &&
A=$(git show --pretty=format:%an,%ae,%ad%n -s $C) &&
verbose test "$A" = "A U Thor,,Thu Apr 7 15:14:13 2005 -0700"
ok 56 - empty email
expecting success:
git show -s --pretty=format:"%s%n%-b%nThanks%n" HEAD^^ >actual &&
test_line_count = 2 actual
ok 57 - del LF before empty (1)
expecting success:
git show -s --pretty=format:"%s%n%-b%nThanks%n" HEAD >actual &&
test_line_count = 6 actual &&
grep "^$" actual
ok 58 - del LF before empty (2)
expecting success:
git show -s --pretty=format:"%s%+b%nThanks%n" HEAD^^ >actual &&
test_line_count = 2 actual
ok 59 - add LF before non-empty (1)
expecting success:
git show -s --pretty=format:"%s%+b%nThanks%n" HEAD >actual &&
test_line_count = 6 actual &&
grep "^$" actual
ok 60 - add LF before non-empty (2)
expecting success:
git show -s --pretty=format:"%s% bThanks" HEAD^^ >actual &&
test $(wc -w <actual) = 3
ok 61 - add SP before non-empty (1)
expecting success:
git show -s --pretty=format:"%s% sThanks" HEAD^^ >actual &&
test $(wc -w <actual) = 6
ok 62 - add SP before non-empty (2)
expecting success:
echo SHORT SHORT SHORT >expect2 &&
echo LONG LONG LONG >expect3 &&
git log -1 --format="%h %h %h" HEAD >actual1 &&
git log -1 --abbrev=5 --format="%h %h %h" HEAD >actual2 &&
git log -1 --abbrev=5 --format="%H %H %H" HEAD >actual3 &&
sed -e "s/$OID_REGEX/LONG/g" -e "s/$_x05/SHORT/g" <actual2 >fuzzy2 &&
sed -e "s/$OID_REGEX/LONG/g" -e "s/$_x05/SHORT/g" <actual3 >fuzzy3 &&
test_cmp expect2 fuzzy2 &&
test_cmp expect3 fuzzy3 &&
! test_cmp actual1 actual2
--- actual1 2019-08-14 07:33:17.339364840 +0000
+++ actual2 2019-08-14 07:33:17.347364943 +0000
@@ -1 +1 @@
-79c1a11 79c1a11 79c1a11
+79c1a 79c1a 79c1a
ok 63 - --abbrev
expecting success:
git log -1 --format=%H --abbrev-commit --abbrev=20 HEAD >actual &&
len=$(wc -c <actual) &&
test $len = 41
ok 64 - %H is not affected by --abbrev-commit
expecting success:
git log -1 --format=%h --abbrev-commit --abbrev=20 HEAD >actual &&
len=$(wc -c <actual) &&
test $len = 21
ok 65 - %h is not affected by --abbrev-commit
expecting success:
git reflog >expect &&
git log -g --format="%h %gD: %gs" >actual &&
test_cmp expect actual
ok 66 - "%h %gD: %gs" is same as git-reflog
expecting success:
git reflog --date=raw >expect &&
git log -g --format="%h %gD: %gs" --date=raw >actual &&
test_cmp expect actual
ok 67 - "%h %gD: %gs" is same as git-reflog (with date)
expecting success:
git reflog --abbrev=13 --date=raw >expect &&
git log -g --abbrev=13 --format="%h %gD: %gs" --date=raw >actual &&
test_cmp expect actual
ok 68 - "%h %gD: %gs" is same as git-reflog (with --abbrev)
expecting success:
echo "master@{0}" >expect.gd-short &&
git log -g -1 --format=%gd refs/heads/master >actual.gd-short &&
test_cmp expect.gd-short actual.gd-short
ok 69 - %gd shortens ref name
expecting success:
echo "C O Mitter:committer@example.com" >expect &&
git log -g -1 --format="%gn:%ge" >actual &&
test_cmp expect actual
ok 70 - reflog identity
expecting success:
git commit -m "dummy" --allow-empty &&
git commit -m "dummy" --allow-empty &&
git filter-branch --msg-filter "sed -e s/dummy//" HEAD^^.. &&
git rev-list --oneline HEAD >test.txt &&
test_line_count = 5 test.txt &&
git rev-list --oneline --graph HEAD >testg.txt &&
test_line_count = 5 testg.txt
[master 5aa097f] dummy
Author: A U Thor <author@example.com>
[master fa3a3fa] dummy
Author: A U Thor <author@example.com>
Rewrite 5aa097fabcc2e47c5f43f6ec1836bf401a2c6f69 (1/2) (0 seconds passed, remaining 0 predicted)
Rewrite fa3a3faef638b2d98ff91d77837c396b38c8dbbe (2/2) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/master' was rewritten
ok 71 - oneline with empty message
expecting success:
git commit --author="a <a@example.com>" --allow-empty -m foo &&
echo "a <a@example.com>" >expect &&
git log -1 --format="%an <%ae>" >actual &&
test_cmp expect actual
[master 900520a] foo
Author: a <a@example.com>
ok 72 - single-character name is parsed correctly
expecting success:
echo "%GX %G" >expect &&
git log -1 --format="%GX %G" >actual &&
test_cmp expect actual
ok 73 - unused %G placeholders are passed through
# passed all 73 test(s)
1..73
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6011-rev-list-with-bad-commit.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6011-rev-list-with-bad-commit/.git/
expecting success:
git init &&
git config core.compression 0 &&
git config core.logallrefupdates false &&
echo "foo" > foo &&
git add foo &&
git commit -m "first commit" &&
echo "bar" > bar &&
git add bar &&
git commit -m "second commit" &&
echo "baz" > baz &&
git add baz &&
git commit -m "third commit" &&
echo "foo again" >> foo &&
git add foo &&
git commit -m "fourth commit" &&
git repack -a -f -d
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6011-rev-list-with-bad-commit/.git/
[master (root-commit) 967e5d2] first commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
[master 17df0be] second commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
[master c1559f3] third commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 baz
[master 61b6fe4] fourth commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
revs=$(git rev-list --all | wc -l) &&
test $revs -eq 4 &&
first_commit=$(git rev-parse HEAD~3)
ok 2 - verify number of revisions
expecting success:
perl -i.bak -pe "s/second commit/socond commit/" .git/objects/pack/*.pack &&
test_must_fail git fsck --full
error: .git/objects/pack/pack-1653a070e3892de0d0e780ad7dc73cae26dfeac9.pack pack checksum mismatch
error: index CRC mismatch for object 17df0be8cf1fe891bfd207d3227b8a8138e4a354 from .git/objects/pack/pack-1653a070e3892de0d0e780ad7dc73cae26dfeac9.pack at offset 487
error: inflate: data stream error (incorrect data check)
error: cannot unpack 17df0be8cf1fe891bfd207d3227b8a8138e4a354 from .git/objects/pack/pack-1653a070e3892de0d0e780ad7dc73cae26dfeac9.pack at offset 487
dangling tree 89ff1a2aefcbff0f09197f0fd8beeb19a7b6e51c
dangling commit 967e5d2e0a9df9e092a5e0a9a33a1477ab24eed4
ok 3 - corrupt second commit object
expecting success:
test_must_fail env GIT_TEST_COMMIT_GRAPH=0 git rev-list --all > /dev/null
error: inflate: data stream error (incorrect data check)
fatal: packed object 17df0be8cf1fe891bfd207d3227b8a8138e4a354 (stored in .git/objects/pack/pack-1653a070e3892de0d0e780ad7dc73cae26dfeac9.pack) is corrupt
ok 4 - rev-list should fail
expecting success:
test_must_fail git repack -a -f -d
error: inflate: data stream error (incorrect data check)
fatal: packed object 17df0be8cf1fe891bfd207d3227b8a8138e4a354 (stored in .git/objects/pack/pack-1653a070e3892de0d0e780ad7dc73cae26dfeac9.pack) is corrupt
ok 5 - git repack _MUST_ fail
expecting success:
git log $first_commit
commit 967e5d2e0a9df9e092a5e0a9a33a1477ab24eed4
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:33:18 2019 +0000
first commit
ok 6 - first commit is still available
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6012-rev-list-simplify.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6012-rev-list-simplify/.git/
expecting success:
echo "Hi there" >file &&
echo "initial" >lost &&
git add file lost &&
test_tick && git commit -m "Initial file and lost" &&
note A &&
git branch other-branch &&
git symbolic-ref HEAD refs/heads/unrelated &&
git rm -f "*" &&
echo "Unrelated branch" >side &&
git add side &&
test_tick && git commit -m "Side root" &&
note J &&
git checkout master &&
echo "Hello" >file &&
echo "second" >lost &&
git add file lost &&
test_tick && GIT_AUTHOR_DATE=$(($test_tick + 120)) git commit -m "Modified file and lost" &&
note B &&
git checkout other-branch &&
echo "Hello" >file &&
>lost &&
git add file lost &&
test_tick && git commit -m "Modified the file identically" &&
note C &&
echo "This is a stupid example" >another-file &&
git add another-file &&
test_tick && git commit -m "Add another file" &&
note D &&
test_tick &&
test_must_fail git merge -m "merge" master &&
>lost && git commit -a -m "merge" &&
note E &&
echo "Yet another" >elif &&
git add elif &&
test_tick && git commit -m "Irrelevant change" &&
note F &&
git checkout master &&
echo "Yet another" >elif &&
git add elif &&
test_tick && git commit -m "Another irrelevant change" &&
note G &&
test_tick && git merge -m "merge" other-branch &&
note H &&
echo "Final change" >file &&
test_tick && git commit -a -m "Final change" &&
note I &&
git checkout master &&
test_tick && git merge --allow-unrelated-histories -m "Coolest" unrelated &&
note K &&
echo "Immaterial" >elif &&
git add elif &&
test_tick && git commit -m "Last" &&
note L
[master (root-commit) 2ce5a1a] Initial file and lost
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 file
create mode 100644 lost
rm 'file'
rm 'lost'
[unrelated (root-commit) efdd716] Side root
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 side
Switched to branch 'master'
[master 1a21661] Modified file and lost
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
Switched to branch 'other-branch'
[other-branch 96e46c8] Modified the file identically
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 2 deletions(-)
[other-branch afa190a] Add another file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 another-file
Merging:
afa190a Add another file
virtual master
found 1 common ancestor:
2ce5a1a Initial file and lost
Auto-merging lost
CONFLICT (content): Merge conflict in lost
Automatic merge failed; fix conflicts and then commit the result.
[other-branch 87e2285] merge
Author: A U Thor <author@example.com>
[other-branch f67ebfb] Irrelevant change
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 elif
Switched to branch 'master'
[master b2dce95] Another irrelevant change
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 elif
Merging:
b2dce95 Another irrelevant change
virtual other-branch
found 1 common ancestor:
1a21661 Modified file and lost
Merge made by the 'recursive' strategy.
another-file | 1 +
lost | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)
create mode 100644 another-file
[master 62ab427] Final change
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Already on 'master'
Merging:
62ab427 Final change
virtual unrelated
found 0 common ancestors:
Merge made by the 'recursive' strategy.
side | 1 +
1 file changed, 1 insertion(+)
create mode 100644 side
[master 1be1b21] Last
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 2 - log --full-history --topo-order
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 3 - log --full-history
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 4 - log --full-history --date-order
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 5 - log --full-history --author-date-order
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 6 - log --full-history -- file
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 7 - log --full-history --topo-order -- file
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 8 - log --full-history --date-order -- file
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 9 - log --full-history --author-date-order -- file
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 10 - log --simplify-merges -- file
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 11 - log --simplify-merges --topo-order -- file
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 12 - log --simplify-merges --date-order -- file
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 13 - log --simplify-merges --author-date-order -- file
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 14 - log -- file
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 15 - log --topo-order -- file
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 16 - log --date-order -- file
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 17 - log --author-date-order -- file
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 18 - log --first-parent -- another-file
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 19 - log --first-parent --topo-order -- another-file
expecting success:
git log --pretty="$FMT" --parents $param |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 20 - log --full-history E -- lost
expecting success:
printf "%s\n" E C B A >expect &&
git log --pretty="$FMT" --full-history E -- lost |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check
ok 21 - full history simplification without parent
expecting success:
git log -p --pretty="%H" --full-diff -- file >expected &&
git log -p --pretty="%H" --full-diff --parents -- file >actual &&
test_cmp expected actual
ok 22 - --full-diff is not affected by --parents
# passed all 22 test(s)
1..22
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6010-merge-base.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6010-merge-base/.git/
expecting success:
T=$(git mktree </dev/null)
ok 1 - setup
expecting success:
# E---D---C---B---A
# \"-_ \ \
# \ `---------G \
# \ \
# F----------------H
E=$(doit 5 E) &&
D=$(doit 4 D $E) &&
F=$(doit 6 F $E) &&
C=$(doit 3 C $D) &&
B=$(doit 2 B $C) &&
A=$(doit 1 A $B) &&
G=$(doit 7 G $B $E) &&
H=$(doit 8 H $A $F)
ok 2 - set up G and H
expecting success:
git name-rev $B >expected &&
MB=$(git merge-base G H) &&
git name-rev "$MB" >actual.single &&
MB=$(git merge-base --all G H) &&
git name-rev "$MB" >actual.all &&
MB=$(git show-branch --merge-base G H) &&
git name-rev "$MB" >actual.sb &&
test_cmp expected actual.single &&
test_cmp expected actual.all &&
test_cmp expected actual.sb
ok 3 - merge-base G H
expecting success:
git name-rev "$H" >expected1 &&
git name-rev "$H" "$G" >expected2 &&
parents=$(git merge-base --independent H) &&
git name-rev $parents >actual1.mb &&
parents=$(git merge-base --independent A H G) &&
git name-rev $parents >actual2.mb &&
parents=$(git show-branch --independent H) &&
git name-rev $parents >actual1.sb &&
parents=$(git show-branch --independent A H G) &&
git name-rev $parents >actual2.sb &&
test_cmp expected1 actual1.mb &&
test_cmp expected2 actual2.mb &&
test_cmp expected1 actual1.sb &&
test_cmp expected2 actual2.sb
ok 4 - merge-base/show-branch --independent
expecting success:
# This test is to demonstrate that relying on timestamps in a distributed
# SCM to provide a _consistent_ partial ordering of commits leads to
# insanity.
#
# Relative
# Structure timestamps
#
# PL PR +4 +4
# / \/ \ / \/ \
# L2 C2 R2 +3 -1 +3
# | | | | | |
# L1 C1 R1 +2 -2 +2
# | | | | | |
# L0 C0 R0 +1 -3 +1
# \ | / \ | /
# S 0
#
# The left and right chains of commits can be of any length and complexity as
# long as all of the timestamps are greater than that of S.
S=$(doit 0 S) &&
C0=$(doit -3 C0 $S) &&
C1=$(doit -2 C1 $C0) &&
C2=$(doit -1 C2 $C1) &&
L0=$(doit 1 L0 $S) &&
L1=$(doit 2 L1 $L0) &&
L2=$(doit 3 L2 $L1) &&
R0=$(doit 1 R0 $S) &&
R1=$(doit 2 R1 $R0) &&
R2=$(doit 3 R2 $R1) &&
PL=$(doit 4 PL $L2 $C2) &&
PR=$(doit 4 PR $C2 $R2) &&
git name-rev $C2 >expected &&
MB=$(git merge-base PL PR) &&
git name-rev "$MB" >actual.single &&
MB=$(git merge-base --all PL PR) &&
git name-rev "$MB" >actual.all &&
test_cmp expected actual.single &&
test_cmp expected actual.all
ok 5 - unsynchronized clocks
expecting success:
IB=$(doit 0 IB) &&
I1=$(doit -10 I1 $IB) &&
I2=$(doit -9 I2 $I1) &&
I3=$(doit -8 I3 $I2) &&
I4=$(doit -7 I4 $I3) &&
I5=$(doit -6 I5 $I4) &&
I6=$(doit -5 I6 $I5) &&
I7=$(doit -4 I7 $I6) &&
I8=$(doit -3 I8 $I7) &&
IH=$(doit -2 IH $I8) &&
echo $IH >expected &&
git merge-base --independent IB IH >actual &&
test_cmp expected actual
ok 6 - --independent with unsynchronized clocks
expecting success:
# Another set to demonstrate base between one commit and a merge
# in the documentation.
#
# * C (MMC) * B (MMB) * A (MMA)
# * o * o * o
# * o * o * o
# * o * o * o
# * o | _______/
# | |/
# | * 1 (MM1)
# | _______/
# |/
# * root (MMR)
test_commit MMR &&
test_commit MM1 &&
test_commit MM-o &&
test_commit MM-p &&
test_commit MM-q &&
test_commit MMA &&
git checkout MM1 &&
test_commit MM-r &&
test_commit MM-s &&
test_commit MM-t &&
test_commit MMB &&
git checkout MMR &&
test_commit MM-u &&
test_commit MM-v &&
test_commit MM-w &&
test_commit MM-x &&
test_commit MMC
[master (root-commit) 0075405] MMR
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 MMR.t
[master 91243c1] MM1
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 MM1.t
[master 4d5fde5] MM-o
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 MM-o.t
[master ca22c18] MM-p
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 MM-p.t
[master 2659ed6] MM-q
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 MM-q.t
[master fdb9a8f] MMA
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 MMA.t
Note: switching to 'MM1'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 91243c1 MM1
[detached HEAD c35e31c] MM-r
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 MM-r.t
[detached HEAD 44e361c] MM-s
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 MM-s.t
[detached HEAD a5daa7f] MM-t
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 MM-t.t
[detached HEAD bca1425] MMB
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 MMB.t
Previous HEAD position was bca1425 MMB
HEAD is now at 0075405 MMR
[detached HEAD 174b4d1] MM-u
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 MM-u.t
[detached HEAD c171a6c] MM-v
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 MM-v.t
[detached HEAD c25d00b] MM-w
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 MM-w.t
[detached HEAD 610cc22] MM-x
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 MM-x.t
[detached HEAD 03ab457] MMC
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 MMC.t
ok 7 - merge-base for octopus-step (setup)
expecting success:
git rev-parse --verify MM1 >expected &&
git rev-parse --verify MMR >expected.sb &&
git merge-base --all MMA MMB MMC >actual &&
git merge-base --all --octopus MMA MMB MMC >actual.common &&
git show-branch --merge-base MMA MMB MMC >actual.sb &&
test_cmp expected actual &&
test_cmp expected.sb actual.common &&
test_cmp expected.sb actual.sb
ok 8 - merge-base A B C
expecting success:
git reset --hard MMR &&
test_commit CC1 &&
git reset --hard E &&
test_commit CC2 &&
test_tick &&
# E is a root commit unrelated to MMR root on which CC1 is based
git merge -s ours --allow-unrelated-histories CC1 &&
test_commit CC-o &&
test_commit CCB &&
git reset --hard CC1 &&
# E is a root commit unrelated to MMR root on which CC1 is based
git merge -s ours --allow-unrelated-histories CC2 &&
test_commit CCA &&
git rev-parse CC1 CC2 >expected &&
git merge-base --all CCB CCA^^ CCA^^2 >actual &&
sort expected >expected.sorted &&
sort actual >actual.sorted &&
test_cmp expected.sorted actual.sorted
HEAD is now at 0075405 MMR
[detached HEAD 4141141] CC1
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 CC1.t
HEAD is now at e34970a E
[detached HEAD d33e00c] CC2
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 CC2.t
Merge made by the 'ours' strategy.
[detached HEAD 48e3312] CC-o
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 CC-o.t
[detached HEAD dda5641] CCB
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 CCB.t
HEAD is now at 4141141 CC1
Merge made by the 'ours' strategy.
[detached HEAD 6d30b69] CCA
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 CCA.t
ok 9 - criss-cross merge-base for octopus-step
expecting success:
git reset --hard &&
git checkout -b base $E &&
(
for count in 1 2 3
do
git commit --allow-empty -m "Base commit #$count" &&
git rev-parse HEAD >expect$count &&
git checkout -B derived &&
git commit --allow-empty -m "Derived #$count" &&
git rev-parse HEAD >derived$count &&
git checkout -B base $E || exit 1
done &&
for count in 1 2 3
do
git merge-base --fork-point base $(cat derived$count) >actual &&
test_cmp expect$count actual || exit 1
done
) &&
# check that we correctly default to HEAD
git checkout derived &&
git merge-base --fork-point base >actual &&
test_cmp expect3 actual
HEAD is now at 6d30b69 CCA
Previous HEAD position was 6d30b69 CCA
Switched to a new branch 'base'
[base 58b1909] Base commit #1
Author: A U Thor <git@au.thor.xz>
Switched to a new branch 'derived'
[derived 8ef5ddb] Derived #1
Author: A U Thor <git@au.thor.xz>
Switched to and reset branch 'base'
[base 9ef36f6] Base commit #2
Author: A U Thor <git@au.thor.xz>
Switched to and reset branch 'derived'
[derived 6c4d828] Derived #2
Author: A U Thor <git@au.thor.xz>
Switched to and reset branch 'base'
[base d6c9a6e] Base commit #3
Author: A U Thor <git@au.thor.xz>
Switched to and reset branch 'derived'
[derived 3768cdc] Derived #3
Author: A U Thor <git@au.thor.xz>
Switched to and reset branch 'base'
Switched to branch 'derived'
ok 10 - using reflog to find the fork point
expecting success:
git -c core.logallrefupdates=false branch no-reflog base &&
git merge-base --fork-point no-reflog derived &&
test_cmp expect3 actual
e34970abbab4461223052769885c56a229ee9299
ok 11 - --fork-point works with empty reflog
expecting success:
# Best common ancestor for JE, JAA and JDD is JC
# JE
# / |
# / |
# / |
# JAA / |
# |\ / |
# | \ | JDD |
# | \ |/ | |
# | JC JD |
# | | /| |
# | |/ | |
# JA | | |
# |\ /| | |
# X JB | X X
# \ \ | / /
# \__\|/___/
# J
test_commit J &&
test_commit JB &&
git reset --hard J &&
test_commit JC &&
git reset --hard J &&
test_commit JTEMP1 &&
test_merge JA JB &&
test_merge JAA JC &&
git reset --hard J &&
test_commit JTEMP2 &&
test_merge JD JB &&
test_merge JDD JC &&
git reset --hard J &&
test_commit JTEMP3 &&
test_merge JE JC &&
git rev-parse JC >expected &&
git merge-base --all --octopus JAA JDD JE >actual &&
test_cmp expected actual
[derived 3782338] J
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 J.t
[derived 83a274f] JB
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 JB.t
HEAD is now at 3782338 J
[derived cb75edb] JC
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 JC.t
HEAD is now at 3782338 J
[derived e9767d0] JTEMP1
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 JTEMP1.t
Merging:
e9767d0 JTEMP1
virtual JB
found 1 common ancestor:
3782338 J
Merge made by the 'recursive' strategy.
JB.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 JB.t
Merging:
20d1cc3 JA
virtual JC
found 1 common ancestor:
3782338 J
Merge made by the 'recursive' strategy.
JC.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 JC.t
HEAD is now at 3782338 J
[derived d2ca2eb] JTEMP2
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 JTEMP2.t
Merging:
d2ca2eb JTEMP2
virtual JB
found 1 common ancestor:
3782338 J
Merge made by the 'recursive' strategy.
JB.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 JB.t
Merging:
a0fc47f JD
virtual JC
found 1 common ancestor:
3782338 J
Merge made by the 'recursive' strategy.
JC.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 JC.t
HEAD is now at 3782338 J
[derived dc142e3] JTEMP3
Author: A U Thor <git@au.thor.xz>
1 file changed, 1 insertion(+)
create mode 100644 JTEMP3.t
Merging:
dc142e3 JTEMP3
virtual JC
found 1 common ancestor:
3782338 J
Merge made by the 'recursive' strategy.
JC.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 JC.t
ok 12 - merge-base --octopus --all for complex tree
# passed all 12 test(s)
1..12
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6013-rev-list-reverse-parents.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6013-rev-list-reverse-parents/.git/
expecting success:
commit one &&
git tag root &&
commit two &&
git checkout -b side HEAD^ &&
commit three &&
git checkout master &&
git merge -s ours side &&
commit five
[master (root-commit) 86412ff] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
[master 4931c53] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'side'
[side 0fcb03e] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'master'
Merge made by the 'ours' strategy.
[master 2ed4a76] five
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - set up --reverse example
expecting success:
git rev-list --parents --full-history master -- foo |
perl -e "print reverse <>" > expected &&
git rev-list --reverse --parents --full-history master -- foo \
> actual &&
test_cmp expected actual
ok 2 - --reverse --parents --full-history combines correctly
expecting success:
git rev-list --boundary --parents --full-history master ^root -- foo |
perl -e "print reverse <>" > expected &&
git rev-list --boundary --reverse --parents --full-history \
master ^root -- foo > actual &&
test_cmp expected actual
ok 3 - --boundary does too
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6009-rev-list-parent.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6009-rev-list-parent/.git/
expecting success:
touch file &&
git add file &&
test_commit one &&
test_tick=$(($test_tick - 2400)) &&
test_commit two &&
test_commit three &&
test_commit four &&
git log --pretty=oneline --abbrev-commit
[master (root-commit) e622cea] one
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 100644 file
create mode 100644 one.t
[master bfa07e2] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[master ecfa770] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
[master 0906875] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 four.t
0906875 four
ecfa770 three
bfa07e2 two
e622cea one
ok 1 - setup
expecting success:
git rev-list one --not four >result &&
test_must_be_empty result
ok 2 - one is ancestor of others and should not be shown
expecting success:
git checkout --orphan newroot &&
test_commit five &&
git checkout -b sidebranch two &&
test_commit six &&
git checkout -b anotherbranch three &&
test_commit seven &&
git checkout -b yetanotherbranch four &&
test_commit eight &&
git checkout master &&
test_tick &&
git merge --allow-unrelated-histories -m normalmerge newroot &&
git tag normalmerge &&
test_tick &&
git merge -m tripus sidebranch anotherbranch &&
git tag tripus &&
git checkout -b tetrabranch normalmerge &&
test_tick &&
git merge -m tetrapus sidebranch anotherbranch yetanotherbranch &&
git tag tetrapus &&
git checkout master
Switched to a new branch 'newroot'
[newroot (root-commit) 04238a1] five
Author: A U Thor <author@example.com>
6 files changed, 5 insertions(+)
create mode 100644 file
create mode 100644 five.t
create mode 100644 four.t
create mode 100644 one.t
create mode 100644 three.t
create mode 100644 two.t
Switched to a new branch 'sidebranch'
[sidebranch e29a44f] six
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 six.t
Switched to a new branch 'anotherbranch'
[anotherbranch f863663] seven
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 seven.t
Switched to a new branch 'yetanotherbranch'
[yetanotherbranch 3e13a02] eight
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 eight.t
Switched to branch 'master'
Merging:
0906875 four
virtual newroot
found 0 common ancestors:
Merge made by the 'recursive' strategy.
five.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 five.t
Trying simple merge with sidebranch
Trying simple merge with anotherbranch
Merge made by the 'octopus' strategy.
seven.t | 1 +
six.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 seven.t
create mode 100644 six.t
Switched to a new branch 'tetrabranch'
Trying simple merge with sidebranch
Trying simple merge with anotherbranch
Trying simple merge with yetanotherbranch
Merge made by the 'octopus' strategy.
eight.t | 1 +
seven.t | 1 +
six.t | 1 +
3 files changed, 3 insertions(+)
create mode 100644 eight.t
create mode 100644 seven.t
create mode 100644 six.t
Switched to branch 'master'
ok 3 - setup roots, merges and octopuses
expecting success:
check_revlist "--max-parents=0" one five
ok 4 - rev-list roots
expecting success:
check_revlist "--max-parents=1" one eight seven six five four three two &&
check_revlist "--no-merges" one eight seven six five four three two
ok 5 - rev-list no merges
expecting success:
check_revlist "--max-parents=2" one normalmerge eight seven six five four three two
ok 6 - rev-list no octopuses
expecting success:
check_revlist "--min-parents=1" tetrapus tripus normalmerge eight seven six four three two
ok 7 - rev-list no roots
expecting success:
check_revlist "--min-parents=2" tetrapus tripus normalmerge &&
check_revlist "--merges" tetrapus tripus normalmerge
ok 8 - rev-list merges
expecting success:
check_revlist "--min-parents=3" tetrapus tripus
ok 9 - rev-list octopus
expecting success:
check_revlist "--min-parents=1 --max-parents=1" eight seven six four three two
ok 10 - rev-list ordinary commits
expecting success:
check_revlist "--min-parents=2 --no-merges" &&
check_revlist "--merges --no-merges" &&
check_revlist "--no-merges --merges"
ok 11 - rev-list --merges --no-merges yields empty set
expecting success:
check_revlist "--min-parents=2 --max-parents=1 --max-parents=3" tripus normalmerge &&
check_revlist "--min-parents=1 --min-parents=2 --max-parents=7" tetrapus tripus normalmerge &&
check_revlist "--min-parents=2 --max-parents=8" tetrapus tripus normalmerge &&
check_revlist "--min-parents=2 --max-parents=-1" tetrapus tripus normalmerge &&
check_revlist "--min-parents=2 --no-max-parents" tetrapus tripus normalmerge &&
check_revlist "--max-parents=0 --min-parents=1 --no-min-parents" one five
ok 12 - rev-list override and infinities
expecting success:
roots= &&
for i in 1 2 3 4 5 6 7 8 9 10 11
do
git checkout -b root$i five &&
test_commit $i &&
roots="$roots root$i" ||
return
done &&
git checkout master &&
test_tick &&
git merge -m dodecapus $roots &&
git tag dodecapus &&
check_revlist "--min-parents=4" dodecapus tetrapus &&
check_revlist "--min-parents=8" dodecapus &&
check_revlist "--min-parents=12" dodecapus &&
check_revlist "--min-parents=13" &&
check_revlist "--min-parents=4 --max-parents=11" tetrapus
Switched to a new branch 'root1'
[root1 9562ee3] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1.t
Switched to a new branch 'root2'
[root2 1779fe6] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2.t
Switched to a new branch 'root3'
[root3 cc9911e] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 3.t
Switched to a new branch 'root4'
[root4 35b702f] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 4.t
Switched to a new branch 'root5'
[root5 c532809] 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 5.t
Switched to a new branch 'root6'
[root6 f4a589f] 6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 6.t
Switched to a new branch 'root7'
[root7 4f77507] 7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 7.t
Switched to a new branch 'root8'
[root8 e4dbc7d] 8
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 8.t
Switched to a new branch 'root9'
[root9 446b36e] 9
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 9.t
Switched to a new branch 'root10'
[root10 120147b] 10
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 10.t
Switched to a new branch 'root11'
[root11 ce99f6d] 11
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 11.t
Switched to branch 'master'
Trying simple merge with root1
Trying simple merge with root2
Trying simple merge with root3
Trying simple merge with root4
Trying simple merge with root5
Trying simple merge with root6
Trying simple merge with root7
Trying simple merge with root8
Trying simple merge with root9
Trying simple merge with root10
Trying simple merge with root11
Merge made by the 'octopus' strategy.
1.t | 1 +
10.t | 1 +
11.t | 1 +
2.t | 1 +
3.t | 1 +
4.t | 1 +
5.t | 1 +
6.t | 1 +
7.t | 1 +
8.t | 1 +
9.t | 1 +
11 files changed, 11 insertions(+)
create mode 100644 1.t
create mode 100644 10.t
create mode 100644 11.t
create mode 100644 2.t
create mode 100644 3.t
create mode 100644 4.t
create mode 100644 5.t
create mode 100644 6.t
create mode 100644 7.t
create mode 100644 8.t
create mode 100644 9.t
ok 13 - dodecapus
expecting success:
test_tick_keep=$test_tick &&
for i in 1 2 3 4 5 6 7 8; do
test_tick=$test_tick_keep
test_commit t$i
done &&
git rev-list t1^! --not t$i >result &&
test_must_be_empty result
[master 1bc0b48] t1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 t1.t
[master 145e5ab] t2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 t2.t
[master 17e63bf] t3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 t3.t
[master 47d7b66] t4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 t4.t
[master a42aaab] t5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 t5.t
[master aebfe15] t6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 t6.t
[master 7cfb595] t7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 t7.t
[master fea5200] t8
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 t8.t
ok 14 - ancestors with the same commit time
# passed all 14 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6014-rev-list-all.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6014-rev-list-all/.git/
expecting success:
commit one &&
commit two &&
git checkout HEAD^ &&
commit detached
[master (root-commit) 86412ff] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
[master 4931c53] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 86412ff one
[detached HEAD 13d8fe0] detached
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
test 3 = $(git rev-list --all | wc -l)
ok 2 - rev-list --all lists detached HEAD
expecting success:
git gc &&
git prune --expire=now &&
git show HEAD
commit 13d8fe0bae4079d4dedb755a88319ddebda9a07b
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
detached
diff --git a/foo b/foo
index 5626abf..9aa4e2b 100644
--- a/foo
+++ b/foo
@@ -1 +1 @@
-one
+detached
ok 3 - repack does not lose detached HEAD
expecting success:
test_must_fail git rev-list --graph --no-walk HEAD
fatal: cannot combine --no-walk with --graph
ok 4 - rev-list --graph --no-walk is forbidden
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6016-rev-list-graph-simplify-history.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6016-rev-list-graph-simplify-history/.git/
expecting success:
# 3 commits on branch A
test_commit A1 foo.txt &&
test_commit A2 bar.txt &&
test_commit A3 bar.txt &&
git branch -m master A &&
# 2 commits on branch B, started from A1
git checkout -b B A1 &&
test_commit B1 foo.txt &&
test_commit B2 abc.txt &&
# 2 commits on branch C, started from A2
git checkout -b C A2 &&
test_commit C1 xyz.txt &&
test_commit C2 xyz.txt &&
# Octopus merge B and C into branch A
git checkout A &&
git merge B C &&
git tag A4 &&
test_commit A5 bar.txt &&
# More commits on C, then merge C into A
git checkout C &&
test_commit C3 foo.txt &&
test_commit C4 bar.txt &&
git checkout A &&
git merge -s ours C &&
git tag A6 &&
test_commit A7 bar.txt &&
# Store commit names in variables for later use
A1=$(git rev-parse --verify A1) &&
A2=$(git rev-parse --verify A2) &&
A3=$(git rev-parse --verify A3) &&
A4=$(git rev-parse --verify A4) &&
A5=$(git rev-parse --verify A5) &&
A6=$(git rev-parse --verify A6) &&
A7=$(git rev-parse --verify A7) &&
B1=$(git rev-parse --verify B1) &&
B2=$(git rev-parse --verify B2) &&
C1=$(git rev-parse --verify C1) &&
C2=$(git rev-parse --verify C2) &&
C3=$(git rev-parse --verify C3) &&
C4=$(git rev-parse --verify C4)
[master (root-commit) 9b00348] A1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.txt
[master 02e4832] A2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar.txt
[master 993a1f0] A3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'B'
[B 4accf7e] B1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[B e76ada1] B2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 abc.txt
Switched to a new branch 'C'
[C 0c196cf] C1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 xyz.txt
[C ea5d98c] C2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'A'
Trying simple merge with B
Trying simple merge with C
Merge made by the 'octopus' strategy.
abc.txt | 1 +
foo.txt | 2 +-
xyz.txt | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 abc.txt
create mode 100644 xyz.txt
[A 443d0d2] A5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'C'
[C f01c181] C3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[C 406947e] C4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'A'
Merge made by the 'ours' strategy.
[A 806c60f] A7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - set up rev-list --graph test
expecting success:
rm -f expected &&
echo "* $A7" >> expected &&
echo "* $A6" >> expected &&
echo "|\\ " >> expected &&
echo "| * $C4" >> expected &&
echo "| * $C3" >> expected &&
echo "* | $A5" >> expected &&
echo "| | " >> expected &&
echo "| \\ " >> expected &&
echo "*-. \\ $A4" >> expected &&
echo "|\\ \\ \\ " >> expected &&
echo "| | |/ " >> expected &&
echo "| | * $C2" >> expected &&
echo "| | * $C1" >> expected &&
echo "| * | $B2" >> expected &&
echo "| * | $B1" >> expected &&
echo "* | | $A3" >> expected &&
echo "| |/ " >> expected &&
echo "|/| " >> expected &&
echo "* | $A2" >> expected &&
echo "|/ " >> expected &&
echo "* $A1" >> expected &&
git rev-list --graph --all > actual &&
test_cmp expected actual
ok 2 - --graph --all
expecting success:
rm -f expected &&
git tag -d A4 &&
echo "* $A7" >> expected &&
echo "* $A6" >> expected &&
echo "|\\ " >> expected &&
echo "| * $C4" >> expected &&
echo "| * $C3" >> expected &&
echo "* | $A5" >> expected &&
echo "| | " >> expected &&
echo "| \\ " >> expected &&
echo "*-. \\ $A4" >> expected &&
echo "|\\ \\ \\ " >> expected &&
echo "| | |/ " >> expected &&
echo "| | * $C2" >> expected &&
echo "| | * $C1" >> expected &&
echo "| * | $B2" >> expected &&
echo "| * | $B1" >> expected &&
echo "* | | $A3" >> expected &&
echo "| |/ " >> expected &&
echo "|/| " >> expected &&
echo "* | $A2" >> expected &&
echo "|/ " >> expected &&
echo "* $A1" >> expected &&
git rev-list --graph --all --simplify-by-decoration > actual &&
test_cmp expected actual
Deleted tag 'A4' (was e614451)
ok 3 - --graph --simplify-by-decoration
expecting success:
git tag -d B2 &&
git tag -d B1 &&
git branch -d B
Deleted tag 'B2' (was e76ada1)
Deleted tag 'B1' (was 4accf7e)
Deleted branch B (was e76ada1).
ok 4 - setup: get rid of decorations on B
expecting success:
rm -f expected &&
echo "* $A7" >> expected &&
echo "* $A6" >> expected &&
echo "|\\ " >> expected &&
echo "| * $C4" >> expected &&
echo "| * $C3" >> expected &&
echo "* | $A5" >> expected &&
echo "* | $A4" >> expected &&
echo "|\\ \\ " >> expected &&
echo "| |/ " >> expected &&
echo "| * $C2" >> expected &&
echo "| * $C1" >> expected &&
echo "* | $A3" >> expected &&
echo "|/ " >> expected &&
echo "* $A2" >> expected &&
echo "* $A1" >> expected &&
git rev-list --graph --simplify-by-decoration --all > actual &&
test_cmp expected actual
ok 5 - --graph --simplify-by-decoration prune branch B
expecting success:
rm -f expected &&
echo "* $A7" >> expected &&
echo "* $A6" >> expected &&
echo "|\\ " >> expected &&
echo "| * $C4" >> expected &&
echo "* | $A5" >> expected &&
echo "* | $A4" >> expected &&
echo "|\\ \\ " >> expected &&
echo "| |/ " >> expected &&
echo "* | $A3" >> expected &&
echo "|/ " >> expected &&
echo "* $A2" >> expected &&
git rev-list --graph --full-history --all -- bar.txt > actual &&
test_cmp expected actual
ok 6 - --graph --full-history -- bar.txt
expecting success:
rm -f expected &&
echo "* $A7" >> expected &&
echo "* $A6" >> expected &&
echo "|\\ " >> expected &&
echo "| * $C4" >> expected &&
echo "* | $A5" >> expected &&
echo "* | $A3" >> expected &&
echo "|/ " >> expected &&
echo "* $A2" >> expected &&
git rev-list --graph --full-history --simplify-merges --all \
-- bar.txt > actual &&
test_cmp expected actual
ok 7 - --graph --full-history --simplify-merges -- bar.txt
expecting success:
rm -f expected &&
echo "* $A7" >> expected &&
echo "* $A5" >> expected &&
echo "* $A3" >> expected &&
echo "| * $C4" >> expected &&
echo "|/ " >> expected &&
echo "* $A2" >> expected &&
git rev-list --graph --all -- bar.txt > actual &&
test_cmp expected actual
ok 8 - --graph -- bar.txt
expecting success:
rm -f expected &&
echo "* $A7" >> expected &&
echo "* $A6" >> expected &&
echo "* $A5" >> expected &&
echo "* $A4" >> expected &&
echo "* $A3" >> expected &&
echo "| * $C4" >> expected &&
echo "| * $C3" >> expected &&
echo "| * $C2" >> expected &&
echo "| * $C1" >> expected &&
echo "|/ " >> expected &&
echo "* $A2" >> expected &&
echo "* $A1" >> expected &&
git rev-list --graph --sparse --all -- bar.txt > actual &&
test_cmp expected actual
ok 9 - --graph --sparse -- bar.txt
expecting success:
rm -f expected &&
echo "* $A7" >> expected &&
echo "* $A6" >> expected &&
echo "* $A5" >> expected &&
echo "* $A4" >> expected &&
echo "|\\ " >> expected &&
echo "| * $B2" >> expected &&
echo "| * $B1" >> expected &&
echo "* $A3" >> expected &&
git rev-list --graph --all ^C4 > actual &&
test_cmp expected actual
ok 10 - --graph ^C4
expecting success:
rm -f expected &&
echo "* $A7" >> expected &&
echo "* $A6" >> expected &&
echo "|\\ " >> expected &&
echo "| * $C4" >> expected &&
echo "* $A5" >> expected &&
echo "* $A4" >> expected &&
echo "|\\ " >> expected &&
echo "| * $B2" >> expected &&
echo "| * $B1" >> expected &&
echo "* $A3" >> expected &&
git rev-list --graph --all ^C3 > actual &&
test_cmp expected actual
ok 11 - --graph ^C3
expecting success:
rm -f expected &&
echo "* $A7" >> expected &&
echo "* $A6" >> expected &&
echo "|\\ " >> expected &&
echo "| * $C4" >> expected &&
echo "* | $A5" >> expected &&
echo "| | " >> expected &&
echo "| \\ " >> expected &&
echo "*-. \\ $A4" >> expected &&
echo "|\\ \\ \\ " >> expected &&
echo "| * | | $B2" >> expected &&
echo "| * | | $B1" >> expected &&
echo "* | | | $A3" >> expected &&
echo "o | | | $A2" >> expected &&
echo "|/ / / " >> expected &&
echo "o | | $A1" >> expected &&
echo " / / " >> expected &&
echo "| o $C3" >> expected &&
echo "|/ " >> expected &&
echo "o $C2" >> expected &&
git rev-list --graph --boundary --all ^C3 > actual &&
test_cmp expected actual
ok 12 - --graph --boundary ^C3
# passed all 12 test(s)
1..12
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6017-rev-list-stdin.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6017-rev-list-stdin/.git/
expecting success:
(
for i in 0 $them
do
for j in $them
do
echo $i.$j >file-$j &&
git add file-$j || exit
done &&
test_tick &&
git commit -m $i || exit
done &&
for i in $them
do
git checkout -b side-$i master~$i &&
echo updated $i >file-$i &&
git add file-$i &&
test_tick &&
git commit -m side-$i || exit
done
)
[master (root-commit) b2718df] 0
Author: A U Thor <author@example.com>
7 files changed, 7 insertions(+)
create mode 100644 file-1
create mode 100644 file-2
create mode 100644 file-3
create mode 100644 file-4
create mode 100644 file-5
create mode 100644 file-6
create mode 100644 file-7
[master 4c7c799] 1
Author: A U Thor <author@example.com>
7 files changed, 7 insertions(+), 7 deletions(-)
[master a24e200] 2
Author: A U Thor <author@example.com>
7 files changed, 7 insertions(+), 7 deletions(-)
[master 72c7eca] 3
Author: A U Thor <author@example.com>
7 files changed, 7 insertions(+), 7 deletions(-)
[master 680e5c3] 4
Author: A U Thor <author@example.com>
7 files changed, 7 insertions(+), 7 deletions(-)
[master 496e2a9] 5
Author: A U Thor <author@example.com>
7 files changed, 7 insertions(+), 7 deletions(-)
[master c5757f4] 6
Author: A U Thor <author@example.com>
7 files changed, 7 insertions(+), 7 deletions(-)
[master a21e804] 7
Author: A U Thor <author@example.com>
7 files changed, 7 insertions(+), 7 deletions(-)
Switched to a new branch 'side-1'
[side-1 c52bcff] side-1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'side-2'
[side-2 fe893aa] side-2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'side-3'
[side-3 48694b2] side-3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'side-4'
[side-4 e31c210] side-4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'side-5'
[side-5 5786a4a] side-5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'side-6'
[side-6 6879e94] side-6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'side-7'
[side-7 a65952b] side-7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
git $cmd $(cat input) >expect &&
git $cmd --stdin <input >actual &&
sed -e "s/^/input /" input &&
sed -e "s/^/output /" expect &&
test_cmp expect actual
input master
output a21e80422823d665efde155c070bfdfb97c997e8
output c5757f4c5b3e9d8ed81f0ef337de57e6bef4e611
output 496e2a9cb78c7f1f05c123ba68719cbb2850d28b
output 680e5c39478a7f99f59d423c9d29c54c4cf23f21
output 72c7ecae8123b34f77d6ec686c9dc4d38558e420
output a24e2002dc3e76acd7262fac9934308ed5876528
output 4c7c79994a10176d26cb379d2f480e705687de5f
output b2718dfcca09d482353ed124d94698c230076ecb
ok 2 - check rev-list master
expecting success:
git $cmd $(cat input) >expect &&
git $cmd --stdin <input >actual &&
sed -e "s/^/input /" input &&
sed -e "s/^/output /" expect &&
test_cmp expect actual
input master
output commit a21e80422823d665efde155c070bfdfb97c997e8
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:20:13 2005 -0700
output
output 7
output
output file-1 | 2 +-
output file-2 | 2 +-
output file-3 | 2 +-
output file-4 | 2 +-
output file-5 | 2 +-
output file-6 | 2 +-
output file-7 | 2 +-
output 7 files changed, 7 insertions(+), 7 deletions(-)
output
output commit c5757f4c5b3e9d8ed81f0ef337de57e6bef4e611
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:19:13 2005 -0700
output
output 6
output
output file-1 | 2 +-
output file-2 | 2 +-
output file-3 | 2 +-
output file-4 | 2 +-
output file-5 | 2 +-
output file-6 | 2 +-
output file-7 | 2 +-
output 7 files changed, 7 insertions(+), 7 deletions(-)
output
output commit 496e2a9cb78c7f1f05c123ba68719cbb2850d28b
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:18:13 2005 -0700
output
output 5
output
output file-1 | 2 +-
output file-2 | 2 +-
output file-3 | 2 +-
output file-4 | 2 +-
output file-5 | 2 +-
output file-6 | 2 +-
output file-7 | 2 +-
output 7 files changed, 7 insertions(+), 7 deletions(-)
output
output commit 680e5c39478a7f99f59d423c9d29c54c4cf23f21
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:17:13 2005 -0700
output
output 4
output
output file-1 | 2 +-
output file-2 | 2 +-
output file-3 | 2 +-
output file-4 | 2 +-
output file-5 | 2 +-
output file-6 | 2 +-
output file-7 | 2 +-
output 7 files changed, 7 insertions(+), 7 deletions(-)
output
output commit 72c7ecae8123b34f77d6ec686c9dc4d38558e420
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:16:13 2005 -0700
output
output 3
output
output file-1 | 2 +-
output file-2 | 2 +-
output file-3 | 2 +-
output file-4 | 2 +-
output file-5 | 2 +-
output file-6 | 2 +-
output file-7 | 2 +-
output 7 files changed, 7 insertions(+), 7 deletions(-)
output
output commit a24e2002dc3e76acd7262fac9934308ed5876528
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:15:13 2005 -0700
output
output 2
output
output file-1 | 2 +-
output file-2 | 2 +-
output file-3 | 2 +-
output file-4 | 2 +-
output file-5 | 2 +-
output file-6 | 2 +-
output file-7 | 2 +-
output 7 files changed, 7 insertions(+), 7 deletions(-)
output
output commit 4c7c79994a10176d26cb379d2f480e705687de5f
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:14:13 2005 -0700
output
output 1
output
output file-1 | 2 +-
output file-2 | 2 +-
output file-3 | 2 +-
output file-4 | 2 +-
output file-5 | 2 +-
output file-6 | 2 +-
output file-7 | 2 +-
output 7 files changed, 7 insertions(+), 7 deletions(-)
output
output commit b2718dfcca09d482353ed124d94698c230076ecb
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:13:13 2005 -0700
output
output 0
output
output file-1 | 1 +
output file-2 | 1 +
output file-3 | 1 +
output file-4 | 1 +
output file-5 | 1 +
output file-6 | 1 +
output file-7 | 1 +
output 7 files changed, 7 insertions(+)
ok 3 - check log --stat master
expecting success:
git $cmd $(cat input) >expect &&
git $cmd --stdin <input >actual &&
sed -e "s/^/input /" input &&
sed -e "s/^/output /" expect &&
test_cmp expect actual
input side-1
input ^side-4
output c52bcff3af5ff0d662f1e767ea6739034b17f0ea
output c5757f4c5b3e9d8ed81f0ef337de57e6bef4e611
output 496e2a9cb78c7f1f05c123ba68719cbb2850d28b
output 680e5c39478a7f99f59d423c9d29c54c4cf23f21
ok 4 - check rev-list side-1 ^side-4
expecting success:
git $cmd $(cat input) >expect &&
git $cmd --stdin <input >actual &&
sed -e "s/^/input /" input &&
sed -e "s/^/output /" expect &&
test_cmp expect actual
input side-1
input ^side-4
output commit c52bcff3af5ff0d662f1e767ea6739034b17f0ea
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:21:13 2005 -0700
output
output side-1
output
output file-1 | 2 +-
output 1 file changed, 1 insertion(+), 1 deletion(-)
output
output commit c5757f4c5b3e9d8ed81f0ef337de57e6bef4e611
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:19:13 2005 -0700
output
output 6
output
output file-1 | 2 +-
output file-2 | 2 +-
output file-3 | 2 +-
output file-4 | 2 +-
output file-5 | 2 +-
output file-6 | 2 +-
output file-7 | 2 +-
output 7 files changed, 7 insertions(+), 7 deletions(-)
output
output commit 496e2a9cb78c7f1f05c123ba68719cbb2850d28b
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:18:13 2005 -0700
output
output 5
output
output file-1 | 2 +-
output file-2 | 2 +-
output file-3 | 2 +-
output file-4 | 2 +-
output file-5 | 2 +-
output file-6 | 2 +-
output file-7 | 2 +-
output 7 files changed, 7 insertions(+), 7 deletions(-)
output
output commit 680e5c39478a7f99f59d423c9d29c54c4cf23f21
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:17:13 2005 -0700
output
output 4
output
output file-1 | 2 +-
output file-2 | 2 +-
output file-3 | 2 +-
output file-4 | 2 +-
output file-5 | 2 +-
output file-6 | 2 +-
output file-7 | 2 +-
output 7 files changed, 7 insertions(+), 7 deletions(-)
ok 5 - check log --stat side-1 ^side-4
expecting success:
git $cmd $(cat input) >expect &&
git $cmd --stdin <input >actual &&
sed -e "s/^/input /" input &&
sed -e "s/^/output /" expect &&
test_cmp expect actual
input side-1
input ^side-7
input --
output c52bcff3af5ff0d662f1e767ea6739034b17f0ea
output c5757f4c5b3e9d8ed81f0ef337de57e6bef4e611
output 496e2a9cb78c7f1f05c123ba68719cbb2850d28b
output 680e5c39478a7f99f59d423c9d29c54c4cf23f21
output 72c7ecae8123b34f77d6ec686c9dc4d38558e420
output a24e2002dc3e76acd7262fac9934308ed5876528
output 4c7c79994a10176d26cb379d2f480e705687de5f
ok 6 - check rev-list side-1 ^side-7 --
expecting success:
git $cmd $(cat input) >expect &&
git $cmd --stdin <input >actual &&
sed -e "s/^/input /" input &&
sed -e "s/^/output /" expect &&
test_cmp expect actual
input side-1
input ^side-7
input --
output commit c52bcff3af5ff0d662f1e767ea6739034b17f0ea
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:21:13 2005 -0700
output
output side-1
output
output file-1 | 2 +-
output 1 file changed, 1 insertion(+), 1 deletion(-)
output
output commit c5757f4c5b3e9d8ed81f0ef337de57e6bef4e611
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:19:13 2005 -0700
output
output 6
output
output file-1 | 2 +-
output file-2 | 2 +-
output file-3 | 2 +-
output file-4 | 2 +-
output file-5 | 2 +-
output file-6 | 2 +-
output file-7 | 2 +-
output 7 files changed, 7 insertions(+), 7 deletions(-)
output
output commit 496e2a9cb78c7f1f05c123ba68719cbb2850d28b
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:18:13 2005 -0700
output
output 5
output
output file-1 | 2 +-
output file-2 | 2 +-
output file-3 | 2 +-
output file-4 | 2 +-
output file-5 | 2 +-
output file-6 | 2 +-
output file-7 | 2 +-
output 7 files changed, 7 insertions(+), 7 deletions(-)
output
output commit 680e5c39478a7f99f59d423c9d29c54c4cf23f21
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:17:13 2005 -0700
output
output 4
output
output file-1 | 2 +-
output file-2 | 2 +-
output file-3 | 2 +-
output file-4 | 2 +-
output file-5 | 2 +-
output file-6 | 2 +-
output file-7 | 2 +-
output 7 files changed, 7 insertions(+), 7 deletions(-)
output
output commit 72c7ecae8123b34f77d6ec686c9dc4d38558e420
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:16:13 2005 -0700
output
output 3
output
output file-1 | 2 +-
output file-2 | 2 +-
output file-3 | 2 +-
output file-4 | 2 +-
output file-5 | 2 +-
output file-6 | 2 +-
output file-7 | 2 +-
output 7 files changed, 7 insertions(+), 7 deletions(-)
output
output commit a24e2002dc3e76acd7262fac9934308ed5876528
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:15:13 2005 -0700
output
output 2
output
output file-1 | 2 +-
output file-2 | 2 +-
output file-3 | 2 +-
output file-4 | 2 +-
output file-5 | 2 +-
output file-6 | 2 +-
output file-7 | 2 +-
output 7 files changed, 7 insertions(+), 7 deletions(-)
output
output commit 4c7c79994a10176d26cb379d2f480e705687de5f
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:14:13 2005 -0700
output
output 1
output
output file-1 | 2 +-
output file-2 | 2 +-
output file-3 | 2 +-
output file-4 | 2 +-
output file-5 | 2 +-
output file-6 | 2 +-
output file-7 | 2 +-
output 7 files changed, 7 insertions(+), 7 deletions(-)
ok 7 - check log --stat side-1 ^side-7 --
expecting success:
git $cmd $(cat input) >expect &&
git $cmd --stdin <input >actual &&
sed -e "s/^/input /" input &&
sed -e "s/^/output /" expect &&
test_cmp expect actual
input side-1
input ^side-7
input --
input file-1
output c52bcff3af5ff0d662f1e767ea6739034b17f0ea
output c5757f4c5b3e9d8ed81f0ef337de57e6bef4e611
output 496e2a9cb78c7f1f05c123ba68719cbb2850d28b
output 680e5c39478a7f99f59d423c9d29c54c4cf23f21
output 72c7ecae8123b34f77d6ec686c9dc4d38558e420
output a24e2002dc3e76acd7262fac9934308ed5876528
output 4c7c79994a10176d26cb379d2f480e705687de5f
ok 8 - check rev-list side-1 ^side-7 -- file-1
expecting success:
git $cmd $(cat input) >expect &&
git $cmd --stdin <input >actual &&
sed -e "s/^/input /" input &&
sed -e "s/^/output /" expect &&
test_cmp expect actual
input side-1
input ^side-7
input --
input file-1
output commit c52bcff3af5ff0d662f1e767ea6739034b17f0ea
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:21:13 2005 -0700
output
output side-1
output
output file-1 | 2 +-
output 1 file changed, 1 insertion(+), 1 deletion(-)
output
output commit c5757f4c5b3e9d8ed81f0ef337de57e6bef4e611
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:19:13 2005 -0700
output
output 6
output
output file-1 | 2 +-
output 1 file changed, 1 insertion(+), 1 deletion(-)
output
output commit 496e2a9cb78c7f1f05c123ba68719cbb2850d28b
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:18:13 2005 -0700
output
output 5
output
output file-1 | 2 +-
output 1 file changed, 1 insertion(+), 1 deletion(-)
output
output commit 680e5c39478a7f99f59d423c9d29c54c4cf23f21
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:17:13 2005 -0700
output
output 4
output
output file-1 | 2 +-
output 1 file changed, 1 insertion(+), 1 deletion(-)
output
output commit 72c7ecae8123b34f77d6ec686c9dc4d38558e420
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:16:13 2005 -0700
output
output 3
output
output file-1 | 2 +-
output 1 file changed, 1 insertion(+), 1 deletion(-)
output
output commit a24e2002dc3e76acd7262fac9934308ed5876528
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:15:13 2005 -0700
output
output 2
output
output file-1 | 2 +-
output 1 file changed, 1 insertion(+), 1 deletion(-)
output
output commit 4c7c79994a10176d26cb379d2f480e705687de5f
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:14:13 2005 -0700
output
output 1
output
output file-1 | 2 +-
output 1 file changed, 1 insertion(+), 1 deletion(-)
ok 9 - check log --stat side-1 ^side-7 -- file-1
expecting success:
git $cmd $(cat input) >expect &&
git $cmd --stdin <input >actual &&
sed -e "s/^/input /" input &&
sed -e "s/^/output /" expect &&
test_cmp expect actual
input side-1
input ^side-7
input --
input file-2
output c5757f4c5b3e9d8ed81f0ef337de57e6bef4e611
output 496e2a9cb78c7f1f05c123ba68719cbb2850d28b
output 680e5c39478a7f99f59d423c9d29c54c4cf23f21
output 72c7ecae8123b34f77d6ec686c9dc4d38558e420
output a24e2002dc3e76acd7262fac9934308ed5876528
output 4c7c79994a10176d26cb379d2f480e705687de5f
ok 10 - check rev-list side-1 ^side-7 -- file-2
expecting success:
git $cmd $(cat input) >expect &&
git $cmd --stdin <input >actual &&
sed -e "s/^/input /" input &&
sed -e "s/^/output /" expect &&
test_cmp expect actual
input side-1
input ^side-7
input --
input file-2
output commit c5757f4c5b3e9d8ed81f0ef337de57e6bef4e611
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:19:13 2005 -0700
output
output 6
output
output file-2 | 2 +-
output 1 file changed, 1 insertion(+), 1 deletion(-)
output
output commit 496e2a9cb78c7f1f05c123ba68719cbb2850d28b
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:18:13 2005 -0700
output
output 5
output
output file-2 | 2 +-
output 1 file changed, 1 insertion(+), 1 deletion(-)
output
output commit 680e5c39478a7f99f59d423c9d29c54c4cf23f21
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:17:13 2005 -0700
output
output 4
output
output file-2 | 2 +-
output 1 file changed, 1 insertion(+), 1 deletion(-)
output
output commit 72c7ecae8123b34f77d6ec686c9dc4d38558e420
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:16:13 2005 -0700
output
output 3
output
output file-2 | 2 +-
output 1 file changed, 1 insertion(+), 1 deletion(-)
output
output commit a24e2002dc3e76acd7262fac9934308ed5876528
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:15:13 2005 -0700
output
output 2
output
output file-2 | 2 +-
output 1 file changed, 1 insertion(+), 1 deletion(-)
output
output commit 4c7c79994a10176d26cb379d2f480e705687de5f
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:14:13 2005 -0700
output
output 1
output
output file-2 | 2 +-
output 1 file changed, 1 insertion(+), 1 deletion(-)
ok 11 - check log --stat side-1 ^side-7 -- file-2
expecting success:
git $cmd $(cat input) >expect &&
git $cmd --stdin <input >actual &&
sed -e "s/^/input /" input &&
sed -e "s/^/output /" expect &&
test_cmp expect actual
input side-3
input ^side-4
input --
input file-3
output 48694b20de8c3a7d2a1cac0c842191d9a9f1dc4f
output 680e5c39478a7f99f59d423c9d29c54c4cf23f21
ok 12 - check rev-list side-3 ^side-4 -- file-3
expecting success:
git $cmd $(cat input) >expect &&
git $cmd --stdin <input >actual &&
sed -e "s/^/input /" input &&
sed -e "s/^/output /" expect &&
test_cmp expect actual
input side-3
input ^side-4
input --
input file-3
output commit 48694b20de8c3a7d2a1cac0c842191d9a9f1dc4f
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:23:13 2005 -0700
output
output side-3
output
output file-3 | 2 +-
output 1 file changed, 1 insertion(+), 1 deletion(-)
output
output commit 680e5c39478a7f99f59d423c9d29c54c4cf23f21
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:17:13 2005 -0700
output
output 4
output
output file-3 | 2 +-
output 1 file changed, 1 insertion(+), 1 deletion(-)
ok 13 - check log --stat side-3 ^side-4 -- file-3
expecting success:
git $cmd $(cat input) >expect &&
git $cmd --stdin <input >actual &&
sed -e "s/^/input /" input &&
sed -e "s/^/output /" expect &&
test_cmp expect actual
input side-3
input ^side-2
output 48694b20de8c3a7d2a1cac0c842191d9a9f1dc4f
ok 14 - check rev-list side-3 ^side-2
expecting success:
git $cmd $(cat input) >expect &&
git $cmd --stdin <input >actual &&
sed -e "s/^/input /" input &&
sed -e "s/^/output /" expect &&
test_cmp expect actual
input side-3
input ^side-2
output commit 48694b20de8c3a7d2a1cac0c842191d9a9f1dc4f
output Author: A U Thor <author@example.com>
output Date: Thu Apr 7 15:23:13 2005 -0700
output
output side-3
output
output file-3 | 2 +-
output 1 file changed, 1 insertion(+), 1 deletion(-)
ok 15 - check log --stat side-3 ^side-2
expecting success:
git $cmd $(cat input) >expect &&
git $cmd --stdin <input >actual &&
sed -e "s/^/input /" input &&
sed -e "s/^/output /" expect &&
test_cmp expect actual
input side-3
input ^side-2
input --
input file-1
ok 16 - check rev-list side-3 ^side-2 -- file-1
expecting success:
git $cmd $(cat input) >expect &&
git $cmd --stdin <input >actual &&
sed -e "s/^/input /" input &&
sed -e "s/^/output /" expect &&
test_cmp expect actual
input side-3
input ^side-2
input --
input file-1
ok 17 - check log --stat side-3 ^side-2 -- file-1
expecting success:
cat >expect <<-EOF &&
7
file-1
file-2
EOF
cat >input <<-EOF &&
^master^
--
file-2
EOF
git log --pretty=tformat:%s --name-only --stdin master -- file-1 \
<input >actual &&
test_cmp expect actual
ok 18 - not only --stdin
# passed all 18 test(s)
1..18
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6019-rev-list-ancestry-path.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6019-rev-list-ancestry-path/.git/
expecting success:
test_commit A &&
test_commit B &&
test_commit C &&
test_commit D &&
test_commit E &&
test_commit F &&
git reset --hard C &&
test_commit G &&
test_merge E H &&
test_commit I &&
test_merge F J &&
git reset --hard A &&
test_commit K &&
test_merge J L &&
test_commit M
[master (root-commit) 0ddfaf1] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
[master d9df450] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B.t
[master 35a8500] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C.t
[master be8f64f] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D.t
[master ee2ad00] E
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 E.t
[master 5374d8c] F
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 F.t
HEAD is now at 35a8500 C
[master fa55005] G
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 G.t
Merge made by the 'ours' strategy.
[master 4e719b9] I
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 I.t
Merge made by the 'ours' strategy.
HEAD is now at 0ddfaf1 A
[master 0f470b0] K
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 K.t
Merge made by the 'ours' strategy.
[master bcafe1b] M
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 M.t
ok 1 - setup
expecting success:
for c in E F G H I J K L M; do echo $c; done >expect &&
git rev-list --format=%s D..M |
sed -e "/^commit /d" |
sort >actual &&
test_cmp expect actual
ok 2 - rev-list D..M
expecting success:
for c in E F H I J L M; do echo $c; done >expect &&
git rev-list --ancestry-path --format=%s D..M |
sed -e "/^commit /d" |
sort >actual &&
test_cmp expect actual
ok 3 - rev-list --ancestry-path D..M
expecting success:
echo M >expect &&
git rev-list --format=%s D..M -- M.t |
sed -e "/^commit /d" >actual &&
test_cmp expect actual
ok 4 - rev-list D..M -- M.t
expecting success:
echo M >expect &&
git rev-list --ancestry-path --format=%s D..M -- M.t |
sed -e "/^commit /d" >actual &&
test_cmp expect actual
ok 5 - rev-list --ancestry-path D..M -- M.t
expecting success:
for c in F G H I; do echo $c; done >expect &&
git rev-list --format=%s F...I |
sed -e "/^commit /d" |
sort >actual &&
test_cmp expect actual
ok 6 - rev-list F...I
expecting success:
for c in F H I; do echo $c; done >expect &&
git rev-list --ancestry-path --format=%s F...I |
sed -e "/^commit /d" |
sort >actual &&
test_cmp expect actual
ok 7 - rev-list --ancestry-path F...I
expecting success:
git rev-list --format=%s G..M -- G.t |
sed -e "/^commit /d" >actual &&
test_must_be_empty actual
ok 8 - rev-list G..M -- G.t
expecting success:
echo L >expect &&
git rev-list --ancestry-path --format=%s G..M -- G.t |
sed -e "/^commit /d" >actual &&
test_cmp expect actual
ok 9 - rev-list --ancestry-path G..M -- G.t
expecting success:
for c in G L; do echo $c; done >expect &&
git rev-list --ancestry-path --simplify-merges --format=%s G^..M -- G.t |
sed -e "/^commit /d" |
sort >actual &&
test_cmp expect actual
ok 10 - rev-list --ancestry-path --simplify-merges G^..M -- G.t
expecting success:
mkdir criss-cross &&
(cd criss-cross &&
git init &&
test_commit A &&
git checkout -b xb master &&
test_commit B &&
git checkout -b xc master &&
test_commit C &&
git checkout -b xbc xb -- &&
git merge xc &&
git checkout -b xcb xc -- &&
git merge xb &&
git checkout master)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6019-rev-list-ancestry-path/criss-cross/.git/
[master (root-commit) 617a709] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
Switched to a new branch 'xb'
[xb 7dfaf8e] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B.t
Switched to a new branch 'xc'
[xc cf5ea0b] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C.t
Switched to a new branch 'xbc'
Merging:
7dfaf8e B
virtual xc
found 1 common ancestor:
617a709 A
Merge made by the 'recursive' strategy.
C.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 C.t
Switched to a new branch 'xcb'
Merging:
cf5ea0b C
virtual xb
found 1 common ancestor:
617a709 A
Merge made by the 'recursive' strategy.
B.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 B.t
Switched to branch 'master'
ok 11 - setup criss-cross
expecting success:
(cd criss-cross &&
git rev-list --ancestry-path xcb..xbc > actual &&
test -z "$(cat actual)")
ok 12 - criss-cross: rev-list --ancestry-path cb..bc
expecting success:
(cd criss-cross &&
git rev-list --ancestry-path --all ^xcb > actual &&
test -z "$(cat actual)")
ok 13 - criss-cross: rev-list --ancestry-path --all ^cb
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6020-merge-df.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6020-merge-df/.git/
expecting success:
echo Hello >init &&
git add init &&
git commit -m initial &&
git branch B &&
mkdir dir &&
echo foo >dir/foo &&
git add dir/foo &&
git commit -m "File: dir/foo" &&
git checkout B &&
echo file dir >dir &&
git add dir &&
git commit -m "File: dir"
[master (root-commit) 07c0275] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 init
[master 99cf9b4] File: dir/foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dir/foo
Switched to branch 'B'
[B cc36a4b] File: dir
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dir
ok 1 - prepare repository
expecting success:
test_expect_code 1 git merge -m "merge msg" master
Merging:
cc36a4b File: dir
virtual master
found 1 common ancestor:
07c0275 initial
Adding dir/foo
Removing dir to make room for subdirectory
CONFLICT (file/directory): There is a directory with name dir in master. Adding dir as dir~HEAD
Automatic merge failed; fix conflicts and then commit the result.
ok 2 - Merge with d/f conflicts
expecting success:
git reset --hard &&
git checkout master &&
rm .git/index &&
mkdir before &&
echo FILE >before/one &&
echo FILE >after &&
git add . &&
git commit -m first &&
rm -f after &&
git mv before after &&
git commit -m move &&
git checkout -b para HEAD^ &&
echo COMPLETELY ANOTHER FILE >another &&
git add . &&
git commit -m para &&
git merge master
HEAD is now at cc36a4b File: dir
Switched to branch 'master'
[master 2cd2eb4] first
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 after
create mode 100644 before/one
create mode 100644 dir~HEAD
[master 68a7ea0] move
Author: A U Thor <author@example.com>
2 files changed, 1 deletion(-)
delete mode 100644 after
rename {before => after}/one (100%)
Switched to a new branch 'para'
[para 333b88c] para
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 another
Merging:
333b88c para
virtual master
found 1 common ancestor:
2cd2eb4 first
Removing after to make room for subdirectory
Removing after
Merge made by the 'recursive' strategy.
after | 1 -
{before => after}/one | 0
2 files changed, 1 deletion(-)
delete mode 100644 after
rename {before => after}/one (100%)
ok 3 - F/D conflict
expecting success:
git checkout --orphan modify &&
git rm -rf . &&
git clean -fdqx &&
printf "a\nb\nc\nd\ne\nf\ng\nh\n" >letters &&
git add letters &&
git commit -m initial &&
# Throw in letters.txt for sorting order fun
# ("letters.txt" sorts between "letters" and "letters/file")
echo i >>letters &&
echo "version 2" >letters.txt &&
git add letters letters.txt &&
git commit -m modified &&
git checkout -b delete HEAD^ &&
git rm letters &&
mkdir letters &&
>letters/file &&
echo "version 1" >letters.txt &&
git add letters letters.txt &&
git commit -m deleted
Switched to a new branch 'modify'
rm 'after/one'
rm 'another'
rm 'dir/foo'
rm 'dir~HEAD'
rm 'init'
[modify (root-commit) 518348a] initial
Author: A U Thor <author@example.com>
1 file changed, 8 insertions(+)
create mode 100644 letters
[modify f3e9103] modified
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 letters.txt
Switched to a new branch 'delete'
rm 'letters'
[delete d1329e4] deleted
Author: A U Thor <author@example.com>
3 files changed, 1 insertion(+), 8 deletions(-)
delete mode 100644 letters
create mode 100644 letters.txt
create mode 100644 letters/file
ok 4 - setup modify/delete + directory/file conflict
expecting success:
git checkout delete^0 &&
test_must_fail git merge modify &&
test 5 -eq $(git ls-files -s | wc -l) &&
test 4 -eq $(git ls-files -u | wc -l) &&
test 1 -eq $(git ls-files -o | wc -l) &&
test -f letters/file &&
test -f letters.txt &&
test -f letters~modify
Note: switching to 'delete^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d1329e4 deleted
Merging:
d1329e4 deleted
virtual modify
found 1 common ancestor:
518348a initial
Adding letters/file
CONFLICT (add/add): Merge conflict in letters.txt
Auto-merging letters.txt
CONFLICT (modify/delete): letters deleted in HEAD and modified in modify. Version modify of letters left in tree at letters~modify.
Automatic merge failed; fix conflicts and then commit the result.
ok 5 - modify/delete + directory/file conflict
expecting success:
git reset --hard &&
git clean -f &&
git checkout modify^0 &&
test_must_fail git merge delete &&
test 5 -eq $(git ls-files -s | wc -l) &&
test 4 -eq $(git ls-files -u | wc -l) &&
test 1 -eq $(git ls-files -o | wc -l) &&
test -f letters/file &&
test -f letters.txt &&
test -f letters~HEAD
warning: unable to unlink 'letters': Is a directory
HEAD is now at d1329e4 deleted
Removing letters~modify
Previous HEAD position was d1329e4 deleted
HEAD is now at f3e9103 modified
Merging:
f3e9103 modified
virtual delete
found 1 common ancestor:
518348a initial
Adding letters/file
Removing letters to make room for subdirectory
CONFLICT (add/add): Merge conflict in letters.txt
Auto-merging letters.txt
CONFLICT (modify/delete): letters deleted in delete and modified in HEAD. Version HEAD of letters left in tree at letters~HEAD.
Automatic merge failed; fix conflicts and then commit the result.
ok 6 - modify/delete + directory/file conflict; other way
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6018-rev-list-glob.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6018-rev-list-glob/.git/
expecting success:
commit master &&
git checkout -b subspace/one master &&
commit one &&
git checkout -b subspace/two master &&
commit two &&
git checkout -b subspace-x master &&
commit subspace-x &&
git checkout -b other/three master &&
commit three &&
git checkout -b someref master &&
commit some &&
git checkout master &&
commit master2 &&
git tag foo/bar master &&
commit master3 &&
git update-ref refs/remotes/foo/baz master &&
commit master4 &&
git update-ref refs/remotes/upstream/one subspace/one &&
git update-ref refs/remotes/upstream/two subspace/two &&
git update-ref refs/remotes/upstream/x subspace-x &&
git tag qux/one subspace/one &&
git tag qux/two subspace/two &&
git tag qux/x subspace-x
[master (root-commit) e1f5012] master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
Switched to a new branch 'subspace/one'
[subspace/one 2eafb28] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'subspace/two'
[subspace/two 8d58bb9] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'subspace-x'
[subspace-x a6204e5] subspace-x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'other/three'
[other/three 9f9c15a] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'someref'
[someref 065b9f3] some
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'master'
[master 95cfde6] master2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 32e7f0b] master3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 427c67e] master4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
compare rev-parse "subspace/one subspace/two" "--glob=refs/heads/subspace/*"
ok 2 - rev-parse --glob=refs/heads/subspace/*
expecting success:
compare rev-parse "subspace/one subspace/two" "--glob=heads/subspace/*"
ok 3 - rev-parse --glob=heads/subspace/*
expecting success:
compare rev-parse "subspace/one subspace/two" "--glob=refs/heads/subspace/"
ok 4 - rev-parse --glob=refs/heads/subspace/
expecting success:
compare rev-parse "subspace/one subspace/two" "--glob=heads/subspace/"
ok 5 - rev-parse --glob=heads/subspace/
expecting success:
compare rev-parse "subspace/one subspace/two" "--glob=heads/subspace"
ok 6 - rev-parse --glob=heads/subspace
checking known breakage:
compare rev-parse "subspace/one subspace/two" "--glob heads/subspace"
fatal: ambiguous argument 'heads/subspace': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
not ok 7 - rev-parse accepts --glob as detached option # TODO known breakage
checking known breakage:
compare rev-parse "master" "--glob --symbolic master"
--- expected 2019-08-14 07:33:24.271453524 +0000
+++ actual 2019-08-14 07:33:24.283453677 +0000
@@ -1 +1,2 @@
-427c67e8294a2917294f816398b918414251bb36
+--glob
+master
not ok 8 - rev-parse is not confused by option-like glob # TODO known breakage
expecting success:
compare rev-parse "subspace/one subspace/two" "--branches=subspace/*"
ok 9 - rev-parse --branches=subspace/*
expecting success:
compare rev-parse "subspace/one subspace/two" "--branches=subspace/"
ok 10 - rev-parse --branches=subspace/
expecting success:
compare rev-parse "subspace/one subspace/two" "--branches=subspace"
ok 11 - rev-parse --branches=subspace
expecting success:
compare rev-parse "subspace/one subspace/two other/three" "--glob=heads/subspace/* --glob=heads/other/*"
ok 12 - rev-parse --glob=heads/subspace/* --glob=heads/other/*
expecting success:
compare rev-parse "master" "--glob=heads/someref/* master"
ok 13 - rev-parse --glob=heads/someref/* master
expecting success:
compare rev-parse "master other/three someref subspace-x subspace/one subspace/two" "--glob=heads/*"
ok 14 - rev-parse --glob=heads/*
expecting success:
compare rev-parse "foo/bar" "--tags=foo"
ok 15 - rev-parse --tags=foo
expecting success:
compare rev-parse "foo/baz" "--remotes=foo"
ok 16 - rev-parse --remotes=foo
expecting success:
compare rev-parse "--exclude=*/* --branches" "master someref subspace-x"
ok 17 - rev-parse --exclude with --branches
expecting success:
compare rev-parse "--exclude=refs/remotes/* --all" "--branches --tags"
ok 18 - rev-parse --exclude with --all
expecting success:
compare rev-parse "--exclude=refs/remotes/* --exclude=refs/tags/* --all" --branches
ok 19 - rev-parse accumulates multiple --exclude
expecting success:
compare rev-parse "--exclude=* --branches --branches" "--branches"
ok 20 - rev-parse --branches clears --exclude
expecting success:
compare rev-parse "--exclude=* --tags --tags" "--tags"
ok 21 - rev-parse --tags clears --exclude
expecting success:
compare rev-parse "--exclude=* --all --all" "--all"
ok 22 - rev-parse --all clears --exclude
expecting success:
compare rev-parse "--exclude=subspace-* --branches=sub*" "subspace/one subspace/two"
ok 23 - rev-parse --exclude=glob with --branches=glob
expecting success:
compare rev-parse "--exclude=qux/? --tags=qux/*" "qux/one qux/two"
ok 24 - rev-parse --exclude=glob with --tags=glob
expecting success:
compare rev-parse "--exclude=upstream/? --remotes=upstream/*" "upstream/one upstream/two"
ok 25 - rev-parse --exclude=glob with --remotes=glob
expecting success:
compare rev-parse "--exclude=subspace-x --branches=sub*" "subspace/one subspace/two"
ok 26 - rev-parse --exclude=ref with --branches=glob
expecting success:
compare rev-parse "--exclude=qux/x --tags=qux/*" "qux/one qux/two"
ok 27 - rev-parse --exclude=ref with --tags=glob
expecting success:
compare rev-parse "--exclude=upstream/x --remotes=upstream/*" "upstream/one upstream/two"
ok 28 - rev-parse --exclude=ref with --remotes=glob
expecting success:
compare rev-list "--exclude=subspace-* --branches=sub*" "subspace/one subspace/two"
ok 29 - rev-list --exclude=glob with --branches=glob
expecting success:
compare rev-list "--exclude=qux/? --tags=qux/*" "qux/one qux/two"
ok 30 - rev-list --exclude=glob with --tags=glob
expecting success:
compare rev-list "--exclude=upstream/? --remotes=upstream/*" "upstream/one upstream/two"
ok 31 - rev-list --exclude=glob with --remotes=glob
expecting success:
compare rev-list "--exclude=subspace-x --branches=sub*" "subspace/one subspace/two"
ok 32 - rev-list --exclude=ref with --branches=glob
expecting success:
compare rev-list "--exclude=qux/x --tags=qux/*" "qux/one qux/two"
ok 33 - rev-list --exclude=ref with --tags=glob
expecting success:
compare rev-list "--exclude=upstream/x --remotes=upstream/*" "upstream/one upstream/two"
ok 34 - rev-list --exclude=ref with --remotes=glob
expecting success:
compare rev-list "subspace/one subspace/two" "--glob=refs/heads/subspace/*"
ok 35 - rev-list --glob=refs/heads/subspace/*
expecting success:
compare rev-list "subspace/one subspace/two" "--glob refs/heads/subspace/*"
ok 36 - rev-list --glob refs/heads/subspace/*
expecting success:
compare rev-list "master" "--glob -0 master"
ok 37 - rev-list not confused by option-like --glob arg
expecting success:
compare rev-list "subspace/one subspace/two" "--glob=heads/subspace/*"
ok 38 - rev-list --glob=heads/subspace/*
expecting success:
compare rev-list "subspace/one subspace/two" "--glob=refs/heads/subspace/"
ok 39 - rev-list --glob=refs/heads/subspace/
expecting success:
compare rev-list "subspace/one subspace/two" "--glob=heads/subspace/"
ok 40 - rev-list --glob=heads/subspace/
expecting success:
compare rev-list "subspace/one subspace/two" "--glob=heads/subspace"
ok 41 - rev-list --glob=heads/subspace
expecting success:
compare rev-list "subspace/one subspace/two" "--branches=subspace/*"
ok 42 - rev-list --branches=subspace/*
expecting success:
compare rev-list "subspace/one subspace/two" "--branches=subspace/"
ok 43 - rev-list --branches=subspace/
expecting success:
compare rev-list "subspace/one subspace/two" "--branches=subspace"
ok 44 - rev-list --branches=subspace
expecting success:
compare rev-list "master subspace-x someref other/three subspace/one subspace/two" "--branches"
ok 45 - rev-list --branches
expecting success:
compare rev-list "master" "--glob=heads/someref/* master"
ok 46 - rev-list --glob=heads/someref/* master
expecting success:
compare rev-list "subspace/one subspace/two other/three" "--glob=heads/subspace/* --glob=heads/other/*"
ok 47 - rev-list --glob=heads/subspace/* --glob=heads/other/*
expecting success:
compare rev-list "master other/three someref subspace-x subspace/one subspace/two" "--glob=heads/*"
ok 48 - rev-list --glob=heads/*
expecting success:
compare rev-list "foo/bar" "--tags=foo"
ok 49 - rev-list --tags=foo
expecting success:
compare rev-list "foo/bar qux/x qux/two qux/one" "--tags"
ok 50 - rev-list --tags
expecting success:
compare rev-list "foo/baz" "--remotes=foo"
ok 51 - rev-list --remotes=foo
expecting success:
compare rev-list "--exclude=*/* --branches" "master someref subspace-x"
ok 52 - rev-list --exclude with --branches
expecting success:
compare rev-list "--exclude=refs/remotes/* --all" "--branches --tags"
ok 53 - rev-list --exclude with --all
expecting success:
compare rev-list "--exclude=refs/remotes/* --exclude=refs/tags/* --all" --branches
ok 54 - rev-list accumulates multiple --exclude
expecting success:
git rev-list --stdin </dev/null >actual &&
test_must_be_empty actual
ok 55 - rev-list should succeed with empty output on empty stdin
expecting success:
git rev-list --exclude=* --all >actual &&
test_must_be_empty actual
ok 56 - rev-list should succeed with empty output with all refs excluded
expecting success:
(
test_create_repo empty &&
cd empty &&
git rev-list --all >actual &&
test_must_be_empty actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6018-rev-list-glob/empty/.git/
ok 57 - rev-list should succeed with empty output with empty --all
expecting success:
git rev-list --glob=does-not-match-anything >actual &&
test_must_be_empty actual
ok 58 - rev-list should succeed with empty output with empty glob
expecting success:
compare shortlog "subspace/one subspace/two" --branches=subspace &&
compare shortlog \
"master subspace-x someref other/three subspace/one subspace/two" \
--branches &&
compare shortlog master "--glob=heads/someref/* master" &&
compare shortlog "subspace/one subspace/two other/three" \
"--glob=heads/subspace/* --glob=heads/other/*" &&
compare shortlog \
"master other/three someref subspace-x subspace/one subspace/two" \
"--glob=heads/*" &&
compare shortlog foo/bar --tags=foo &&
compare shortlog "foo/bar qux/one qux/two qux/x" --tags &&
compare shortlog foo/baz --remotes=foo
ok 59 - shortlog accepts --glob/--tags/--remotes
checking known breakage:
compare shortlog \
"master other/three someref subspace-x subspace/one subspace/two" \
"--glob heads/*"
error: unknown option `--glob'
usage: git shortlog [<options>] [<revision-range>] [[--] <path>...]
or: git log --pretty=short | git shortlog [<options>]
-c, --committer Group by committer rather than author
-n, --numbered sort output according to the number of commits per author
-s, --summary Suppress commit descriptions, only provides commit count
-e, --email Show the email address of each author
-w[<w>[,<i1>[,<i2>]]]
Linewrap output
not ok 60 - shortlog accepts --glob as detached option # TODO known breakage
checking known breakage:
compare shortlog master "--glob -e master"
error: unknown option `--glob'
usage: git shortlog [<options>] [<revision-range>] [[--] <path>...]
or: git log --pretty=short | git shortlog [<options>]
-c, --committer Group by committer rather than author
-n, --numbered sort output according to the number of commits per author
-s, --summary Suppress commit descriptions, only provides commit count
-e, --email Show the email address of each author
-w[<w>[,<i1>[,<i2>]]]
Linewrap output
not ok 61 - shortlog --glob is not confused by option-like argument # TODO known breakage
# still have 4 known breakage(s)
# passed all remaining 57 test(s)
1..61
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6021-merge-criss-cross.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6021-merge-criss-cross/.git/
expecting success: echo "1
2
3
4
5
6
7
8
9" > file &&
git add file &&
git commit -m "Initial commit" file &&
git branch A &&
git branch B &&
git checkout A &&
echo "1
2
3
4
5
6
7
8 changed in B8, branch A
9" > file &&
git commit -m "B8" file &&
git checkout B &&
echo "1
2
3 changed in C3, branch B
4
5
6
7
8
9
" > file &&
git commit -m "C3" file &&
git branch C3 &&
git merge -m "pre E3 merge" A &&
echo "1
2
3 changed in E3, branch B. New file size
4
5
6
7
8 changed in B8, branch A
9
" > file &&
git commit -m "E3" file &&
git checkout A &&
git merge -m "pre D8 merge" C3 &&
echo "1
2
3 changed in C3, branch B
4
5
6
7
8 changed in D8, branch A. New file size 2
9" > file &&
git commit -m D8 file
[master (root-commit) 67bf29e] Initial commit
Author: A U Thor <author@example.com>
1 file changed, 9 insertions(+)
create mode 100644 file
Switched to branch 'A'
[A f50247a] B8
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'B'
[B aa99efd] C3
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+), 1 deletion(-)
Merging:
aa99efd C3
virtual A
found 1 common ancestor:
67bf29e Initial commit
Auto-merging file
Merge made by the 'recursive' strategy.
file | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[B af3a0a9] E3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'A'
Merging:
f50247a B8
virtual C3
found 1 common ancestor:
67bf29e Initial commit
Auto-merging file
Merge made by the 'recursive' strategy.
file | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[A 41879bc] D8
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 2 deletions(-)
ok 1 - prepare repository
expecting success: git merge -m "final merge" B
Merging:
41879bc D8
virtual B
found 2 common ancestors:
aa99efd C3
f50247a B8
Merging:
aa99efd C3
f50247a B8
found 1 common ancestor:
67bf29e Initial commit
Auto-merging file
Auto-merging file
Merge made by the 'recursive' strategy.
file | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ok 2 - Criss-cross merge
expecting success: cmp file file-expect
ok 3 - Criss-cross merge result
expecting success: git reset --hard A^ &&
test_must_fail git merge -s resolve -m "final merge" B
HEAD is now at 41879bc D8
Trying simple merge.
Simple merge failed, trying Automatic merge.
Auto-merging file
ERROR: content conflict in file
fatal: merge program failed
Automatic merge failed; fix conflicts and then commit the result.
ok 4 - Criss-cross merge fails (-s resolve)
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6023-merge-file.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6023-merge-file/.git/
expecting success:
cp orig.txt test.txt &&
git merge-file test.txt orig.txt orig.txt &&
test_cmp test.txt orig.txt
ok 1 - merge with no changes
expecting success: git merge-file test.txt orig.txt new2.txt
ok 2 - merge without conflict
expecting success:
mkdir dir &&
cp new1.txt dir/a.txt &&
cp orig.txt dir/o.txt &&
cp new2.txt dir/b.txt &&
( cd dir && git merge-file a.txt o.txt b.txt ) &&
test_path_is_missing a.txt
ok 3 - works in subdirectory
expecting success: git merge-file --quiet test.txt orig.txt new2.txt
ok 4 - merge without conflict (--quiet)
checking known breakage: git merge-file test2.txt orig.txt new4.txt
not ok 5 - merge without conflict (missing LF at EOF) # TODO known breakage
checking known breakage: test_cmp test.txt test2.txt
--- test.txt 2019-08-14 07:33:27.731497341 +0000
+++ test2.txt 2019-08-14 07:33:27.771497846 +0000
@@ -3,7 +3,11 @@
super aquam refectionis educavit me;
animam meam convertit,
deduxit me super semitas jusitiae,
+<<<<<<< test2.txt
propter nomen suum.
Nam et si ambulavero in medio umbrae mortis,
non timebo mala, quoniam tu mecum es:
virga tua et baculus tuus ipsa me consolata sunt.
+=======
+propter nomen suum.
+>>>>>>> new4.txt
not ok 6 - merge result added missing LF # TODO known breakage
expecting success: git merge-file --quiet test3.txt new2.txt new3.txt
ok 7 - merge without conflict (missing LF at EOF, away from change in the other file)
expecting success: test_cmp expect.txt test3.txt
ok 8 - merge does not add LF away of change
expecting success: test_must_fail git merge-file test.txt orig.txt new3.txt
ok 9 - merge with conflicts
expecting success: test_cmp expect.txt test.txt
ok 10 - expected conflict markers
expecting success: git merge-file --ours test.txt orig.txt new3.txt && test_cmp expect.txt test.txt
ok 11 - merge conflicting with --ours
expecting success: git merge-file --theirs test.txt orig.txt new3.txt && test_cmp expect.txt test.txt
ok 12 - merge conflicting with --theirs
expecting success: git merge-file --union test.txt orig.txt new3.txt && test_cmp expect.txt test.txt
ok 13 - merge conflicting with --union
expecting success: test_must_fail git merge-file -L 1 -L 2 test.txt orig.txt new3.txt
ok 14 - merge with conflicts, using -L
expecting success: test_cmp expect.txt test.txt
ok 15 - expected conflict markers, with -L
expecting success: test_must_fail git merge-file -p orig.txt new1.txt new5.txt > out
ok 16 - conflict in removed tail
expecting success: test_cmp expect out
ok 17 - expected conflict markers
expecting success:
test_must_fail git merge-file -p \
orig.txt "$TEST_DIRECTORY"/test-binary-1.png new1.txt 2> merge.err &&
grep "Cannot merge binary files" merge.err
error: Cannot merge binary files: /<<PKGBUILDDIR>>/t/test-binary-1.png
ok 18 - binary files cannot be merged
expecting success:
test_must_fail git merge-file -p new6.txt new5.txt new7.txt > output &&
test 1 = $(grep ======= < output | wc -l)
ok 19 - MERGE_ZEALOUS simplifies non-conflicts
expecting success:
test_must_fail git merge-file -p \
new8.txt new5.txt new9.txt > merge.out &&
test 1 = $(grep ======= < merge.out | wc -l)
ok 20 - ZEALOUS_ALNUM
expecting success:
test_must_fail git merge-file -p --diff3 \
new8.txt new5.txt new9.txt >actual &&
test_cmp expect actual
ok 21 - "diff3 -m" style output (1)
expecting success:
git config merge.conflictstyle diff3 &&
test_must_fail git merge-file -p \
new8.txt new5.txt new9.txt >actual &&
test_cmp expect actual
ok 22 - "diff3 -m" style output (2)
expecting success:
test_must_fail git merge-file -p --marker-size=10 \
new8.txt new5.txt new9.txt >actual &&
test_cmp expect actual
ok 23 - marker size
expecting success: git merge-file -p --ours nolf-diff1.txt nolf-orig.txt nolf-diff2.txt >output.txt &&
printf "line1\nline2\nline3x" >expect.txt &&
test_cmp expect.txt output.txt
ok 24 - conflict at EOF without LF resolved by --ours
expecting success: git merge-file -p --theirs nolf-diff1.txt nolf-orig.txt nolf-diff2.txt >output.txt &&
printf "line1\nline2\nline3y" >expect.txt &&
test_cmp expect.txt output.txt
ok 25 - conflict at EOF without LF resolved by --theirs
expecting success: git merge-file -p --union nolf-diff1.txt nolf-orig.txt nolf-diff2.txt >output.txt &&
printf "line1\nline2\nline3x\nline3y" >expect.txt &&
test_cmp expect.txt output.txt
ok 26 - conflict at EOF without LF resolved by --union
expecting success:
printf "1\\r\\n2\\r\\n3" >crlf-orig.txt &&
printf "1\\r\\n2\\r\\n4" >crlf-diff1.txt &&
printf "1\\r\\n2\\r\\n5" >crlf-diff2.txt &&
test_must_fail git -c core.eol=crlf merge-file -p \
crlf-diff1.txt crlf-orig.txt crlf-diff2.txt >crlf.txt &&
test $(tr "\015" Q <crlf.txt | grep "^[<=>].*Q$" | wc -l) = 3 &&
test $(tr "\015" Q <crlf.txt | grep "[345]Q$" | wc -l) = 3 &&
test_must_fail git -c core.eol=crlf merge-file -p \
nolf-diff1.txt nolf-orig.txt nolf-diff2.txt >nolf.txt &&
test $(tr "\015" Q <nolf.txt | grep "^[<=>].*Q$" | wc -l) = 0
ok 27 - conflict sections match existing line endings
# still have 2 known breakage(s)
# passed all remaining 25 test(s)
1..27
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6024-recursive-merge.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6024-recursive-merge/.git/
expecting success:
echo 1 > a1 &&
git add a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:00" git commit -m 1 a1 &&
git checkout -b A master &&
echo A > a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:01" git commit -m A a1 &&
git checkout -b B master &&
echo B > a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:02" git commit -m B a1 &&
git checkout -b D A &&
git rev-parse B > .git/MERGE_HEAD &&
echo D > a1 &&
git update-index a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:03" git commit -m D &&
git symbolic-ref HEAD refs/heads/other &&
echo 2 > a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:04" git commit -m 2 a1 &&
git checkout -b C &&
echo C > a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:05" git commit -m C a1 &&
git checkout -b E C &&
git rev-parse B > .git/MERGE_HEAD &&
echo E > a1 &&
git update-index a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:06" git commit -m E &&
git checkout -b G E &&
git rev-parse A > .git/MERGE_HEAD &&
echo G > a1 &&
git update-index a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:07" git commit -m G &&
git checkout -b F D &&
git rev-parse C > .git/MERGE_HEAD &&
echo F > a1 &&
git update-index a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:08" git commit -m F
[master (root-commit) 2cb59ab] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a1
Switched to a new branch 'A'
[A 9d821b5] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'B'
[B 7082aa6] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'D'
[D e1146db] D
Author: A U Thor <author@example.com>
[other (root-commit) 216d386] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a1
Switched to a new branch 'C'
[C d264643] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'E'
[E 939285a] E
Author: A U Thor <author@example.com>
Switched to a new branch 'G'
[G 26f86b6] G
Author: A U Thor <author@example.com>
Switched to a new branch 'F'
[F 71b2f3d] F
Author: A U Thor <author@example.com>
ok 1 - setup tests
expecting success:
test_must_fail env GIT_TEST_COMMIT_GRAPH=0 git merge -m final G
Merging:
71b2f3d F
virtual G
found 3 common ancestors:
d264643 C
7082aa6 B
9d821b5 A
Merging:
d264643 C
7082aa6 B
found 0 common ancestors:
CONFLICT (add/add): Merge conflict in a1
Auto-merging a1
Merging:
virtual merged tree
9d821b5 A
found 1 common ancestor:
2cb59ab 1
Auto-merging a1
CONFLICT (content): Merge conflict in a1
Auto-merging a1
CONFLICT (content): Merge conflict in a1
Automatic merge failed; fix conflicts and then commit the result.
ok 2 - combined merge conflicts
expecting success: test_cmp expect a1
ok 3 - result contains a conflict
expecting success: test_cmp expect out
ok 4 - virtual trees were processed
expecting success:
git reset --hard &&
printf "\0" > binary-file &&
git add binary-file &&
git commit -m binary &&
git checkout G &&
printf "\0\0" > binary-file &&
git add binary-file &&
git commit -m binary2 &&
test_must_fail git merge F > merge.out 2> merge.err &&
grep "Cannot merge binary files: binary-file (HEAD vs. F)" merge.err
HEAD is now at 71b2f3d F
[F 2a77f49] binary
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 binary-file
Switched to branch 'G'
[G bb2ec60] binary2
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 binary-file
warning: Cannot merge binary files: binary-file (HEAD vs. F)
ok 5 - refuse to merge binary files
expecting success:
git reset --hard &&
git checkout -b delete &&
git rm a1 &&
test_tick &&
git commit -m delete &&
git checkout -b rename HEAD^ &&
git mv a1 a2 &&
test_tick &&
git commit -m rename &&
test_must_fail git merge delete &&
test 1 = $(git ls-files --unmerged | wc -l) &&
git rev-parse --verify :2:a2 &&
test_must_fail git rev-parse --verify :3:a2 &&
git checkout -f delete &&
test_must_fail git merge rename &&
test 1 = $(git ls-files --unmerged | wc -l) &&
test_must_fail git rev-parse --verify :2:a2 &&
git rev-parse --verify :3:a2
HEAD is now at bb2ec60 binary2
Switched to a new branch 'delete'
rm 'a1'
[delete 1a23c66] delete
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 a1
Switched to a new branch 'rename'
[rename 5348298] rename
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename a1 => a2 (100%)
Merging:
5348298 rename
virtual delete
found 1 common ancestor:
bb2ec60 binary2
CONFLICT (rename/delete): a1 deleted in delete and renamed to a2 in HEAD. Version HEAD of a2 left in tree.
Automatic merge failed; fix conflicts and then commit the result.
fd7923529855d0b274795ae3349c5e0438333979
fatal: Needed a single revision
Switched to branch 'delete'
Merging:
1a23c66 delete
virtual rename
found 1 common ancestor:
bb2ec60 binary2
CONFLICT (rename/delete): a1 deleted in HEAD and renamed to a2 in rename. Version rename of a2 left in tree.
Automatic merge failed; fix conflicts and then commit the result.
fatal: Needed a single revision
fd7923529855d0b274795ae3349c5e0438333979
ok 6 - mark rename/delete as unmerged
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6025-merge-symlinks.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6025-merge-symlinks/.git/
expecting success:
git config core.symlinks false &&
> file &&
git add file &&
git commit -m initial &&
git branch b-symlink &&
git branch b-file &&
l=$(printf file | git hash-object -t blob -w --stdin) &&
echo "120000 $l symlink" | git update-index --index-info &&
git commit -m master &&
git checkout b-symlink &&
l=$(printf file-different | git hash-object -t blob -w --stdin) &&
echo "120000 $l symlink" | git update-index --index-info &&
git commit -m b-symlink &&
git checkout b-file &&
echo plain-file > symlink &&
git add symlink &&
git commit -m b-file
[master (root-commit) 5bba757] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
[master 8eac0c8] master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 120000 symlink
Switched to branch 'b-symlink'
[b-symlink da7a067] b-symlink
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 120000 symlink
Switched to branch 'b-file'
[b-file ac6ec3e] b-file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 symlink
ok 1 - setup
expecting success:
git checkout b-symlink &&
test_must_fail git merge master
Switched to branch 'b-symlink'
Merging:
da7a067 b-symlink
virtual master
found 1 common ancestor:
5bba757 initial
CONFLICT (add/add): Merge conflict in symlink
Auto-merging symlink
Automatic merge failed; fix conflicts and then commit the result.
ok 2 - merge master into b-symlink, which has a different symbolic link
expecting success:
test -f symlink
ok 3 - the merge result must be a file
expecting success:
git reset --hard && git checkout b-file &&
test_must_fail git merge master
HEAD is now at da7a067 b-symlink
Switched to branch 'b-file'
Merging:
ac6ec3e b-file
virtual master
found 1 common ancestor:
5bba757 initial
CONFLICT (add/add): Merge conflict in symlink
Automatic merge failed; fix conflicts and then commit the result.
ok 4 - merge master into b-file, which has a file instead of a symbolic link
expecting success:
test -f symlink
ok 5 - the merge result must be a file
expecting success:
git reset --hard &&
git checkout master &&
test_must_fail git merge b-file
HEAD is now at ac6ec3e b-file
Switched to branch 'master'
Merging:
8eac0c8 master
virtual b-file
found 1 common ancestor:
5bba757 initial
CONFLICT (add/add): Merge conflict in symlink
Automatic merge failed; fix conflicts and then commit the result.
ok 6 - merge b-file, which has a file instead of a symbolic link, into master
expecting success:
test -f symlink
ok 7 - the merge result must be a file
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6027-merge-binary.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6027-merge-binary/.git/
expecting success:
cat "$TEST_DIRECTORY"/test-binary-1.png >m &&
git add m &&
git ls-files -s | sed -e "s/ 0 / 1 /" >E1 &&
test_tick &&
git commit -m "initial" &&
git branch side &&
echo frotz >a &&
git add a &&
echo nitfol >>m &&
git add a m &&
git ls-files -s a >E0 &&
git ls-files -s m | sed -e "s/ 0 / 3 /" >E3 &&
test_tick &&
git commit -m "master adds some" &&
git checkout side &&
echo rezrov >>m &&
git add m &&
git ls-files -s m | sed -e "s/ 0 / 2 /" >E2 &&
test_tick &&
git commit -m "side modifies" &&
git tag anchor &&
cat E0 E1 E2 E3 >expect
[master (root-commit) f315366] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 m
[master a142ea1] master adds some
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 100644 a
Switched to branch 'side'
[side 020cbcd] side modifies
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
ok 1 - setup
expecting success:
rm -f a* m* &&
git reset --hard anchor &&
if git merge -s resolve master
then
echo Oops, should not have succeeded
false
else
git ls-files -s >current
test_cmp expect current
fi
HEAD is now at 020cbcd side modifies
error: Merge requires file-level merging
Trying really trivial in-index merge...
Nope.
Trying simple merge.
Simple merge failed, trying Automatic merge.
Auto-merging m
error: Cannot merge binary files: .merge_file_14TSXg
ERROR: content conflict in m
fatal: merge program failed
Automatic merge failed; fix conflicts and then commit the result.
ok 2 - resolve
expecting success:
rm -f a* m* &&
git reset --hard anchor &&
if git merge -s recursive master
then
echo Oops, should not have succeeded
false
else
git ls-files -s >current
test_cmp expect current
fi
HEAD is now at 020cbcd side modifies
warning: Cannot merge binary files: m (HEAD vs. master)
Merging:
020cbcd side modifies
virtual master
found 1 common ancestor:
f315366 initial
Auto-merging m
CONFLICT (content): Merge conflict in m
Automatic merge failed; fix conflicts and then commit the result.
ok 3 - recursive
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6026-merge-attr.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6026-merge-attr/.git/
expecting success:
for f in text binary union
do
echo Initial >$f && git add $f || return 1
done &&
test_tick &&
git commit -m Initial &&
git branch side &&
for f in text binary union
do
echo Master >>$f && git add $f || return 1
done &&
test_tick &&
git commit -m Master &&
git checkout side &&
for f in text binary union
do
echo Side >>$f && git add $f || return 1
done &&
test_tick &&
git commit -m Side &&
git tag anchor
[master (root-commit) 5f96ff8] Initial
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 binary
create mode 100644 text
create mode 100644 union
[master 5054610] Master
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
Switched to branch 'side'
[side 03d8861] Side
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
ok 1 - setup
expecting success:
{
echo "binary -merge"
echo "union merge=union"
} >.gitattributes &&
if git merge master
then
echo Gaah, should have conflicted
false
else
echo Ok, conflicted.
fi
warning: Cannot merge binary files: binary (HEAD vs. master)
Merging:
03d8861 Side
virtual master
found 1 common ancestor:
5f96ff8 Initial
Auto-merging union
Auto-merging text
CONFLICT (content): Merge conflict in text
Auto-merging binary
CONFLICT (content): Merge conflict in binary
Automatic merge failed; fix conflicts and then commit the result.
Ok, conflicted.
ok 2 - merge
expecting success:
git ls-files -u | grep binary &&
git ls-files -u | grep text &&
! (git ls-files -u | grep union)
100644 a77fa514de2720c72c1a861de098595959a2c97a 1 binary
100644 fb25c069fdd4d47c6cf8d3a457b8f620064cba41 2 binary
100644 8950d9fdcf2dc4071be500e078831dbcfca693e1 3 binary
100644 a77fa514de2720c72c1a861de098595959a2c97a 1 text
100644 fb25c069fdd4d47c6cf8d3a457b8f620064cba41 2 text
100644 8950d9fdcf2dc4071be500e078831dbcfca693e1 3 text
ok 3 - check merge result in index
expecting success:
git cat-file -p HEAD:binary >binary-orig &&
grep "<<<<<<<" text &&
cmp binary-orig binary &&
! grep "<<<<<<<" union &&
grep Master union &&
grep Side union
<<<<<<< HEAD
Master
Side
ok 4 - check merge result in working tree
expecting success:
echo text conflict-marker-size=32 >>.gitattributes &&
git checkout -m text &&
sed -ne "/^\([<=>]\)\1\1\1*/{
s/ .*$//
p
}" >actual text &&
grep ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" actual &&
grep "================================" actual &&
grep "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" actual
Recreated 1 merge conflict
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
================================
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
ok 5 - retry the merge with longer context
expecting success:
echo "* merge=union" >.gitattributes &&
echo "text merge=custom" >>.gitattributes &&
git reset --hard anchor &&
git config --replace-all \
merge.custom.driver "./custom-merge %O %A %B 0 %P" &&
git config --replace-all \
merge.custom.name "custom merge driver for testing" &&
git merge master &&
cmp binary union &&
sed -e 1,3d text >check-1 &&
o=$(git unpack-file master^:text) &&
a=$(git unpack-file side^:text) &&
b=$(git unpack-file master:text) &&
sh -c "./custom-merge $o $a $b 0 text" &&
sed -e 1,3d $a >check-2 &&
cmp check-1 check-2 &&
rm -f $o $a $b
HEAD is now at 03d8861 Side
Merging:
03d8861 Side
virtual master
found 1 common ancestor:
5f96ff8 Initial
Auto-merging union
Auto-merging text
Auto-merging binary
Merge made by the 'recursive' strategy.
binary | 1 +
text | 10 ++++++++++
union | 1 +
3 files changed, 12 insertions(+)
ok 6 - custom merge backend
expecting success:
git reset --hard anchor &&
git config --replace-all \
merge.custom.driver "./custom-merge %O %A %B 1 %P" &&
git config --replace-all \
merge.custom.name "custom merge driver for testing" &&
if git merge master
then
echo "Eh? should have conflicted"
false
else
echo "Ok, conflicted"
fi &&
cmp binary union &&
sed -e 1,3d text >check-1 &&
o=$(git unpack-file master^:text) &&
a=$(git unpack-file anchor:text) &&
b=$(git unpack-file master:text) &&
sh -c "./custom-merge $o $a $b 0 text" &&
sed -e 1,3d $a >check-2 &&
cmp check-1 check-2 &&
sed -e 1,3d -e 4q $a >check-3 &&
echo "path is text" >expect &&
cmp expect check-3 &&
rm -f $o $a $b
HEAD is now at 03d8861 Side
Merging:
03d8861 Side
virtual master
found 1 common ancestor:
5f96ff8 Initial
Auto-merging union
Auto-merging text
CONFLICT (content): Merge conflict in text
Auto-merging binary
Automatic merge failed; fix conflicts and then commit the result.
Ok, conflicted
ok 7 - custom merge backend
expecting success:
test_create_repo repo1 &&
test_create_repo repo2 &&
test_tick &&
(
cd repo1 &&
>a &&
git add a &&
git commit -m initial
) &&
test_tick &&
(
cd repo2 &&
git commit --allow-empty -m initial
) &&
test_tick &&
(
cd repo1 &&
git fetch ../repo2 master &&
git merge --allow-unrelated-histories FETCH_HEAD
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6026-merge-attr/repo1/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6026-merge-attr/repo2/.git/
[master (root-commit) 94ef07c] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a
[master (root-commit) de45b2c] initial
Author: A U Thor <author@example.com>
warning: no common commits
From ../repo2
* branch master -> FETCH_HEAD
Merging:
94ef07c initial
virtual de45b2cb2b3688a6b4f2efd536594a5028ea60ae
found 0 common ancestors:
Already up to date!
Merge made by the 'recursive' strategy.
ok 8 - up-to-date merge without common ancestor
expecting success:
git reset --hard anchor &&
write_script sleep-an-hour.sh <<-\EOF &&
sleep 3600 &
echo $! >sleep.pid
EOF
test_write_lines >.gitattributes \
"* merge=ours" "text merge=sleep-an-hour" &&
test_config merge.ours.driver true &&
test_config merge.sleep-an-hour.driver ./sleep-an-hour.sh &&
# We are testing that the custom merge driver does not block
# index.lock on Windows due to an inherited file handle.
# To ensure that the backgrounded process ran sufficiently
# long (and has been started in the first place), we do not
# ignore the result of the kill command.
# By packaging the command in test_when_finished, we get both
# the correctness check and the clean-up.
test_when_finished "kill \$(cat sleep.pid)" &&
git merge master
HEAD is now at 03d8861 Side
Merging:
03d8861 Side
virtual master
found 1 common ancestor:
5f96ff8 Initial
Auto-merging union
Skipped union (merged same as existing)
Auto-merging text
Skipped text (merged same as existing)
Auto-merging binary
Skipped binary (merged same as existing)
Merge made by the 'recursive' strategy.
ok 9 - custom merge does not lock index
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6028-merge-up-to-date.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6028-merge-up-to-date/.git/
expecting success:
>file &&
git add file &&
test_tick &&
git commit -m initial &&
git tag c0 &&
echo second >file &&
git add file &&
test_tick &&
git commit -m second &&
git tag c1 &&
git branch test &&
echo third >file &&
git add file &&
test_tick &&
git commit -m third &&
git tag c2
[master (root-commit) 1bd44cb] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
[master e042178] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 52cad15] third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
git reset --hard c1 &&
test_tick &&
git merge -s recursive c0 &&
expect=$(git rev-parse c1) &&
current=$(git rev-parse HEAD) &&
test "$expect" = "$current"
HEAD is now at e042178 second
Already up to date.
ok 2 - merge -s recursive up-to-date
expecting success:
git reset --hard c0 &&
test_tick &&
git merge -s recursive c1 &&
expect=$(git rev-parse c1) &&
current=$(git rev-parse HEAD) &&
test "$expect" = "$current"
HEAD is now at 1bd44cb initial
Updating 1bd44cb..e042178
Fast-forward
file | 1 +
1 file changed, 1 insertion(+)
ok 3 - merge -s recursive fast-forward
expecting success:
git reset --hard c1 &&
test_tick &&
git merge -s ours c0 &&
expect=$(git rev-parse c1) &&
current=$(git rev-parse HEAD) &&
test "$expect" = "$current"
HEAD is now at e042178 second
Already up to date.
ok 4 - merge -s ours up-to-date
expecting success:
git reset --hard c0 &&
test_tick &&
git merge -s ours c1 &&
expect=$(git rev-parse c0^{tree}) &&
current=$(git rev-parse HEAD^{tree}) &&
test "$expect" = "$current"
HEAD is now at 1bd44cb initial
Merge made by the 'ours' strategy.
ok 5 - merge -s ours fast-forward
expecting success:
git reset --hard c1 &&
test_tick &&
git merge -s subtree c0 &&
expect=$(git rev-parse c1) &&
current=$(git rev-parse HEAD) &&
test "$expect" = "$current"
HEAD is now at e042178 second
Already up to date.
ok 6 - merge -s subtree up-to-date
expecting success:
git reset --hard c0 &&
test_tick &&
git merge c1 c2 &&
expect=$(git rev-parse c2) &&
current=$(git rev-parse HEAD) &&
test "$expect" = "$current"
HEAD is now at 1bd44cb initial
Updating 1bd44cb..52cad15
Fast-forward
file | 1 +
1 file changed, 1 insertion(+)
ok 7 - merge fast-forward octopus
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6029-merge-subtree.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6029-merge-subtree/.git/
expecting success:
s="1 2 3 4 5 6 7 8" &&
for i in $s; do echo $i; done >hello &&
git add hello &&
git commit -m initial &&
git checkout -b side &&
echo >>hello world &&
git add hello &&
git commit -m second &&
git checkout master &&
for i in mundo $s; do echo $i; done >hello &&
git add hello &&
git commit -m master
[master (root-commit) fb670bf] initial
Author: A U Thor <author@example.com>
1 file changed, 8 insertions(+)
create mode 100644 hello
Switched to a new branch 'side'
[side 2f53df5] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'master'
[master 28d5989] master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
git merge -s subtree side &&
for i in mundo $s world; do echo $i; done >expect &&
test_cmp expect hello
Merging:
28d5989 master
virtual side
found 1 common ancestor:
fb670bf initial
Auto-merging hello
Merge made by the 'subtree' strategy.
hello | 1 +
1 file changed, 1 insertion(+)
ok 2 - subtree available and works like recursive
expecting success:
git checkout --orphan sub &&
git rm -rf . &&
test_commit foo
Switched to a new branch 'sub'
rm 'hello'
[sub (root-commit) ddd63c9] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
ok 3 - setup branch sub
expecting success:
git checkout -b main master &&
git merge -s ours --no-commit --allow-unrelated-histories sub &&
git read-tree --prefix=dir/ -u sub &&
git commit -m "initial merge of sub into main" &&
test_path_is_file dir/foo.t &&
test_path_is_file hello
Switched to a new branch 'main'
Automatic merge went well; stopped before committing as requested
[main 9813f85] initial merge of sub into main
Author: A U Thor <author@example.com>
ok 4 - setup branch main
expecting success:
git checkout sub &&
test_commit bar
Switched to branch 'sub'
[sub 46a08c5] bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar.t
ok 5 - update branch sub
expecting success:
git checkout main &&
git merge -s subtree sub -m "second merge of sub into main" &&
test_path_is_file dir/bar.t &&
test_path_is_file dir/foo.t &&
test_path_is_file hello
Switched to branch 'main'
Merging:
9813f85 initial merge of sub into main
virtual sub
found 1 common ancestor:
ddd63c9 foo
Merge made by the 'subtree' strategy.
dir/bar.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 dir/bar.t
ok 6 - update branch main
expecting success:
mkdir git-gui &&
cd git-gui &&
git init &&
echo git-gui > git-gui.sh &&
o1=$(git hash-object git-gui.sh) &&
git add git-gui.sh &&
git commit -m "initial git-gui" &&
cd .. &&
mkdir git &&
cd git &&
git init &&
echo git >git.c &&
o2=$(git hash-object git.c) &&
git add git.c &&
git commit -m "initial git"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6029-merge-subtree/git-gui/.git/
[master (root-commit) a175596] initial git-gui
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 git-gui.sh
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6029-merge-subtree/git/.git/
[master (root-commit) 724c210] initial git
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 git.c
ok 7 - setup
expecting success:
git remote add -f gui ../git-gui &&
git merge -s ours --no-commit --allow-unrelated-histories gui/master &&
git read-tree --prefix=git-gui/ -u gui/master &&
git commit -m "Merge git-gui as our subdirectory" &&
git checkout -b work &&
git ls-files -s >actual &&
(
echo "100644 $o1 0 git-gui/git-gui.sh" &&
echo "100644 $o2 0 git.c"
) >expected &&
test_cmp expected actual
Updating gui
warning: no common commits
From ../git-gui
* [new branch] master -> gui/master
Automatic merge went well; stopped before committing as requested
[master b741856] Merge git-gui as our subdirectory
Author: A U Thor <author@example.com>
Switched to a new branch 'work'
ok 8 - initial merge
expecting success:
cd ../git-gui &&
echo git-gui2 > git-gui.sh &&
o3=$(git hash-object git-gui.sh) &&
git add git-gui.sh &&
git checkout -b master2 &&
git commit -m "update git-gui" &&
cd ../git &&
git pull -s subtree gui master2 &&
git ls-files -s >actual &&
(
echo "100644 $o3 0 git-gui/git-gui.sh" &&
echo "100644 $o2 0 git.c"
) >expected &&
test_cmp expected actual
Switched to a new branch 'master2'
M git-gui.sh
[master2 c9333be] update git-gui
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
From ../git-gui
* branch master2 -> FETCH_HEAD
* [new branch] master2 -> gui/master2
Merging:
b741856 Merge git-gui as our subdirectory
virtual c9333bebe07f90e76933cfa634ab72516dede3df
found 1 common ancestor:
a175596 initial git-gui
Merge made by the 'subtree' strategy.
git-gui/git-gui.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ok 9 - merge update
expecting success:
cd ../git &&
git reset --hard master &&
git checkout -b master2 &&
git merge -s ours --no-commit gui/master &&
git read-tree --prefix=git-gui2/ -u gui/master &&
git commit -m "Merge git-gui2 as our subdirectory" &&
git checkout -b work2 &&
git ls-files -s >actual &&
(
echo "100644 $o1 0 git-gui/git-gui.sh" &&
echo "100644 $o1 0 git-gui2/git-gui.sh" &&
echo "100644 $o2 0 git.c"
) >expected &&
test_cmp expected actual
HEAD is now at b741856 Merge git-gui as our subdirectory
Switched to a new branch 'master2'
Already up to date.
[master2 b1fd074] Merge git-gui2 as our subdirectory
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 git-gui2/git-gui.sh
Switched to a new branch 'work2'
ok 10 - initial ambiguous subtree
expecting success:
cd ../git &&
git reset --hard master2 &&
git pull -Xsubtree=git-gui gui master2 &&
git ls-files -s >actual &&
(
echo "100644 $o3 0 git-gui/git-gui.sh" &&
echo "100644 $o1 0 git-gui2/git-gui.sh" &&
echo "100644 $o2 0 git.c"
) >expected &&
test_cmp expected actual
HEAD is now at b1fd074 Merge git-gui2 as our subdirectory
From ../git-gui
* branch master2 -> FETCH_HEAD
Merging:
b1fd074 Merge git-gui2 as our subdirectory
virtual c9333bebe07f90e76933cfa634ab72516dede3df
found 1 common ancestor:
a175596 initial git-gui
Merge made by the 'recursive' strategy.
git-gui/git-gui.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ok 11 - merge using explicit
expecting success:
cd ../git &&
git reset --hard master2 &&
git pull -Xsubtree=git-gui2 gui master2 &&
git ls-files -s >actual &&
(
echo "100644 $o1 0 git-gui/git-gui.sh" &&
echo "100644 $o3 0 git-gui2/git-gui.sh" &&
echo "100644 $o2 0 git.c"
) >expected &&
test_cmp expected actual
HEAD is now at b1fd074 Merge git-gui2 as our subdirectory
From ../git-gui
* branch master2 -> FETCH_HEAD
Merging:
b1fd074 Merge git-gui2 as our subdirectory
virtual c9333bebe07f90e76933cfa634ab72516dede3df
found 1 common ancestor:
a175596 initial git-gui
Merge made by the 'recursive' strategy.
git-gui2/git-gui.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ok 12 - merge2 using explicit
# passed all 12 test(s)
1..12
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6031-merge-filemode.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6031-merge-filemode/.git/
expecting success:
: >file1 &&
git add file1 &&
git commit -m initial &&
git checkout -b a1 master &&
: >dummy &&
git add dummy &&
git commit -m a &&
git checkout -b b1 master &&
test_chmod +x file1 &&
git add file1 &&
git commit -m b1
[master (root-commit) cd25213] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file1
Switched to a new branch 'a1'
[a1 1d30955] a
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 dummy
Switched to a new branch 'b1'
[b1 8ef081f] b1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 file1
ok 1 - set up mode change in one branch
expecting success:
git checkout -f $us &&
git merge -s $strategy $them &&
git ls-files -s file1 | grep ^100755
Switched to branch 'a1'
Merging:
1d30955 a
virtual b1
found 1 common ancestor:
cd25213 initial
Merge made by the 'recursive' strategy.
file1 | 0
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 file1
100755 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 file1
ok 2 - resolve single mode change (recursive, a1)
checking prerequisite: FILEMODE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test "$(git config --bool core.filemode)" = true
)
prerequisite FILEMODE ok
expecting success:
test -x file1
ok 3 - verify executable bit on file (recursive, a1)
expecting success:
git checkout -f $us &&
git merge -s $strategy $them &&
git ls-files -s file1 | grep ^100755
Switched to branch 'b1'
Updating 8ef081f..6ab31ce
Fast-forward
dummy | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 dummy
100755 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 file1
ok 4 - resolve single mode change (recursive, b1)
expecting success:
test -x file1
ok 5 - verify executable bit on file (recursive, b1)
expecting success:
git checkout -f $us &&
git merge -s $strategy $them &&
git ls-files -s file1 | grep ^100755
Switched to branch 'a1'
Already up to date.
100755 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 file1
ok 6 - resolve single mode change (resolve, a1)
expecting success:
test -x file1
ok 7 - verify executable bit on file (resolve, a1)
expecting success:
git checkout -f $us &&
git merge -s $strategy $them &&
git ls-files -s file1 | grep ^100755
Switched to branch 'b1'
Already up to date.
100755 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0 file1
ok 8 - resolve single mode change (resolve, b1)
expecting success:
test -x file1
ok 9 - verify executable bit on file (resolve, b1)
expecting success:
git reset --hard HEAD &&
git checkout -b a2 master &&
: >file2 &&
H=$(git hash-object file2) &&
test_chmod +x file2 &&
git commit -m a2 &&
git checkout -b b2 master &&
: >file2 &&
git add file2 &&
git commit -m b2 &&
{
echo "100755 $H 2 file2"
echo "100644 $H 3 file2"
} >expect
HEAD is now at 6ab31ce Merge branch 'b1' into a1
Switched to a new branch 'a2'
[a2 b879450] a2
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100755 file2
Switched to a new branch 'b2'
[b2 999397b] b2
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file2
ok 10 - set up mode change in both branches
expecting success:
git reset --hard &&
git checkout -f a2 &&
test_must_fail git merge -s $strategy b2 &&
git ls-files -u >actual &&
test_cmp expect actual &&
git ls-files -s file2 | grep ^100755
HEAD is now at 999397b b2
Switched to branch 'a2'
Merging:
b879450 a2
virtual b2
found 1 common ancestor:
cd25213 initial
CONFLICT (add/add): Merge conflict in file2
Auto-merging file2
Automatic merge failed; fix conflicts and then commit the result.
100755 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 2 file2
ok 11 - detect conflict on double mode change (recursive)
expecting success:
test -x file2
ok 12 - verify executable bit on file (recursive)
expecting success:
git reset --hard &&
git checkout -f a2 &&
test_must_fail git merge -s $strategy b2 &&
git ls-files -u >actual &&
test_cmp expect actual &&
git ls-files -s file2 | grep ^100755
HEAD is now at b879450 a2
Already on 'a2'
error: Merge requires file-level merging
Trying really trivial in-index merge...
Nope.
Trying simple merge.
Simple merge failed, trying Automatic merge.
ERROR: File file2 added identically in both branches,
ERROR: but permissions conflict 100755->100644.
fatal: merge program failed
Automatic merge failed; fix conflicts and then commit the result.
100755 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 2 file2
ok 13 - detect conflict on double mode change (resolve)
expecting success:
test -x file2
ok 14 - verify executable bit on file (resolve)
expecting success:
git reset --hard &&
git checkout -b deletion master &&
git rm file1 &&
git commit -m deletion
HEAD is now at b879450 a2
Switched to a new branch 'deletion'
rm 'file1'
[deletion 514a79f] deletion
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 file1
ok 15 - set up delete/modechange scenario
expecting success:
git reset --hard &&
git checkout $us &&
test_must_fail git merge -s $strategy $them
HEAD is now at 514a79f deletion
Switched to branch 'b1'
Merging:
6ab31ce Merge branch 'b1' into a1
virtual deletion
found 1 common ancestor:
cd25213 initial
CONFLICT (modify/delete): file1 deleted in deletion and modified in HEAD. Version HEAD of file1 left in tree.
Automatic merge failed; fix conflicts and then commit the result.
ok 16 - detect delete/modechange conflict (recursive, b1)
expecting success:
git reset --hard &&
git checkout $us &&
test_must_fail git merge -s $strategy $them
HEAD is now at 6ab31ce Merge branch 'b1' into a1
Switched to branch 'deletion'
Merging:
514a79f deletion
virtual b1
found 1 common ancestor:
cd25213 initial
CONFLICT (modify/delete): file1 deleted in HEAD and modified in b1. Version b1 of file1 left in tree.
Automatic merge failed; fix conflicts and then commit the result.
ok 17 - detect delete/modechange conflict (recursive, deletion)
expecting success:
git reset --hard &&
git checkout $us &&
test_must_fail git merge -s $strategy $them
HEAD is now at 514a79f deletion
Switched to branch 'b1'
error: Merge requires file-level merging
Trying really trivial in-index merge...
Nope.
Trying simple merge.
Simple merge failed, trying Automatic merge.
ERROR: File file1 deleted on one branch but had its
ERROR: permissions changed on the other.
fatal: merge program failed
Automatic merge failed; fix conflicts and then commit the result.
ok 18 - detect delete/modechange conflict (resolve, b1)
expecting success:
git reset --hard &&
git checkout $us &&
test_must_fail git merge -s $strategy $them
HEAD is now at 6ab31ce Merge branch 'b1' into a1
Switched to branch 'deletion'
error: Merge requires file-level merging
Trying really trivial in-index merge...
Nope.
Trying simple merge.
Simple merge failed, trying Automatic merge.
ERROR: File file1 deleted on one branch but had its
ERROR: permissions changed on the other.
fatal: merge program failed
Automatic merge failed; fix conflicts and then commit the result.
ok 19 - detect delete/modechange conflict (resolve, deletion)
# passed all 19 test(s)
1..19
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t5572-pull-submodule.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/.git/
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
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1/.git/
[master (root-commit) ea20450] Base inside first submodule
Author: A U Thor <author@example.com>
3 files changed, 4 insertions(+)
create mode 100644 .gitignore
create mode 100644 file1
create mode 100644 file2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub2/.git/
[master (root-commit) c97192e] nested submodule 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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_repo/.git/
[master (root-commit) 18f243f] 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
Switched to a new branch 'add_sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_repo/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_repo/uninitialized_sub'...
done.
[add_sub1 5ecaf5d] Add sub1
Author: A U Thor <author@example.com>
2 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 uninitialized_sub
Switched to a new branch 'remove_sub1'
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
[remove_sub1 9e43d84] Revert "Add sub1"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:32:18 2019 +0000
3 files changed, 9 deletions(-)
delete mode 100644 .gitmodules
delete mode 160000 sub1
delete mode 160000 uninitialized_sub
Switched to a new branch 'modify_sub1'
Switched to a new branch 'modifications'
[modifications 7a34903] modified file2 and added file3
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 file3
To /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1
* [new branch] modifications -> modifications
[modify_sub1 d2aacf9] Modify sub1
Author: A U Thor <author@example.com>
Switched to a new branch 'add_nested_sub'
Switched to a new branch 'add_nested_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_repo/sub1/sub2'...
done.
[add_nested_sub 1c42cb5] add a nested submodule
Author: A U Thor <author@example.com>
2 files changed, 5 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub2
[add_nested_sub 6cb49f4] update submodule, that updates a nested submodule
Author: A U Thor <author@example.com>
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
[modify_sub1_recursively 0c45139] make a change in nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
[modify_sub1_recursively 0ae4a06] update nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[modify_sub1_recursively f1a03d0] update sub1, that updates nested sub
Author: A U Thor <author@example.com>
To /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
To /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub2
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
Cleared directory 'sub2'
Submodule 'sub2' (../submodule_update_sub2) unregistered for path 'sub2'
Switched to a new branch 'replace_sub1_with_directory'
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Previous HEAD position was ea20450 Base inside first submodule
Switched to branch 'modifications'
rm 'sub1'
[replace_sub1_with_directory 0479aa2] 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
Switched to a new branch 'replace_directory_with_sub1'
Removing sub1/file3
Removing sub1/file2
Removing sub1/file1
Adding sub1
[replace_directory_with_sub1 707cc2a] Revert "Replace sub1 with directory"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:32:20 2019 +0000
4 files changed, 4 insertions(+), 3 deletions(-)
delete mode 100644 sub1/file1
delete mode 100644 sub1/file2
delete mode 100644 sub1/file3
Switched to a new branch 'replace_sub1_with_file'
rm 'sub1'
[replace_sub1_with_file ed686cf] 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'
[replace_file_with_sub1 acb3b39] Revert "Replace sub1 with file"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:32:20 2019 +0000
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
Switched to a new branch 'invalid_sub1'
[invalid_sub1 316c5a8] Invalid sub1 commit
Author: A U Thor <author@example.com>
Switched to a new branch 'valid_sub1'
[valid_sub1 b1beb7d] Revert "Invalid sub1 commit"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:32:20 2019 +0000
warning: unable to rmdir 'uninitialized_sub': Directory not empty
Switched to branch 'master'
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Deleted branch add_sub1 (was 5ecaf5d).
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Updating 18f243f..5ecaf5d
Fast-forward
.gitmodules | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 .gitmodules
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 1 - git_pull: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Deleted branch add_sub1 (was 5ecaf5d).
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Updating 18f243f..5ecaf5d
Fast-forward
.gitmodules | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 .gitmodules
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 2 - git_pull: added submodule leaves existing empty directory alone
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
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Deleted branch replace_file_with_sub1 (was acb3b39).
Switched to a new branch 'replace_file_with_sub1'
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Updating ed686cf..acb3b39
Fast-forward
.gitmodules | 4 ++++
sub1 | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 3 - git_pull: 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
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Deleted branch replace_directory_with_sub1 (was 707cc2a).
Switched to a new branch 'replace_directory_with_sub1'
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Updating 0479aa2..707cc2a
Fast-forward
.gitmodules | 4 ++++
sub1/file1 | 1 -
sub1/file2 | 1 -
sub1/file3 | 1 -
4 files changed, 4 insertions(+), 3 deletions(-)
delete mode 100644 sub1/file1
delete mode 100644 sub1/file2
delete mode 100644 sub1/file3
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 4 - git_pull: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Deleted branch remove_sub1 (was 9e43d84).
Switched to a new branch 'remove_sub1'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Updating 5ecaf5d..9e43d84
Fast-forward
.gitmodules | 7 -------
1 file changed, 7 deletions(-)
delete mode 100644 .gitmodules
ok 5 - git_pull: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Deleted branch remove_sub1 (was 9e43d84).
Switched to a new branch 'remove_sub1'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Updating 5ecaf5d..9e43d84
Fast-forward
.gitmodules | 7 -------
1 file changed, 7 deletions(-)
delete mode 100644 .gitmodules
ok 6 - git_pull: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Deleted branch replace_sub1_with_directory (was 0479aa2).
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'.
error: The following untracked working tree files would be overwritten by merge:
sub1/file1
sub1/file2
Please move or remove them before you merge.
Aborting
Updating 5ecaf5d..0479aa2
ok 7 - git_pull: replace submodule with a directory must fail
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Deleted branch replace_sub1_with_directory (was 0479aa2).
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'.
error: The following untracked working tree files would be overwritten by merge:
sub1/file1
sub1/file2
Please move or remove them before you merge.
Aborting
Updating 5ecaf5d..0479aa2
ok 8 - git_pull: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Deleted branch replace_sub1_with_file (was ed686cf).
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'.
Updating 5ecaf5d..ed686cf
Fast-forward
.gitmodules | 4 ----
sub1 | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
mode change 160000 => 100644 sub1
test_must_fail: command succeeded: git_pull replace_sub1_with_file
not ok 9 - git_pull: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Deleted branch replace_sub1_with_file (was ed686cf).
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'.
Updating 5ecaf5d..ed686cf
Fast-forward
.gitmodules | 4 ----
sub1 | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
mode change 160000 => 100644 sub1
test_must_fail: command succeeded: git_pull replace_sub1_with_file
not ok 10 - git_pull: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Deleted branch modify_sub1 (was d2aacf9).
Switched to a new branch 'modify_sub1'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Updating 5ecaf5d..d2aacf9
Fast-forward
Submodule path 'sub1': checked out '7a3490394af468838d641d072349c646ced2a4ad'
ok 11 - git_pull: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
Deleted branch invalid_sub1 (was 316c5a8).
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
Updating 5ecaf5d..316c5a8
Fast-forward
error: Server does not allow request for unadvertised object 0123456789012345678901234567890123456789
Fetched in submodule path 'sub1', but it did not contain 0123456789012345678901234567890123456789. Direct fetching of that commit failed.
ok 12 - git_pull: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Deleted branch valid_sub1 (was b1beb7d).
Switched to a new branch 'valid_sub1'
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Updating 316c5a8..b1beb7d
Fast-forward
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 13 - git_pull: 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 &&
>sub1 &&
test_must_fail $command add_sub1 &&
test_superproject_content origin/no_submodule &&
test_must_be_empty sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Deleted branch add_sub1 (was 5ecaf5d).
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
error: The following untracked working tree files would be overwritten by merge:
sub1
Please move or remove them before you merge.
Aborting
Updating 18f243f..5ecaf5d
ok 14 - git_pull: added submodule doesn't remove untracked unignored file with same name
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Deleted branch add_sub1 (was 5ecaf5d).
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Updating 18f243f..5ecaf5d
Fast-forward
.gitmodules | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 .gitmodules
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 15 - git_pull_ff: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Deleted branch add_sub1 (was 5ecaf5d).
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Updating 18f243f..5ecaf5d
Fast-forward
.gitmodules | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 .gitmodules
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 16 - git_pull_ff: added submodule leaves existing empty directory alone
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
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Deleted branch replace_file_with_sub1 (was acb3b39).
Switched to a new branch 'replace_file_with_sub1'
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Updating ed686cf..acb3b39
Fast-forward
.gitmodules | 4 ++++
sub1 | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 17 - git_pull_ff: 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
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Deleted branch replace_directory_with_sub1 (was 707cc2a).
Switched to a new branch 'replace_directory_with_sub1'
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Updating 0479aa2..707cc2a
Fast-forward
.gitmodules | 4 ++++
sub1/file1 | 1 -
sub1/file2 | 1 -
sub1/file3 | 1 -
4 files changed, 4 insertions(+), 3 deletions(-)
delete mode 100644 sub1/file1
delete mode 100644 sub1/file2
delete mode 100644 sub1/file3
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 18 - git_pull_ff: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Deleted branch remove_sub1 (was 9e43d84).
Switched to a new branch 'remove_sub1'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Updating 5ecaf5d..9e43d84
Fast-forward
.gitmodules | 7 -------
1 file changed, 7 deletions(-)
delete mode 100644 .gitmodules
ok 19 - git_pull_ff: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Deleted branch remove_sub1 (was 9e43d84).
Switched to a new branch 'remove_sub1'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Updating 5ecaf5d..9e43d84
Fast-forward
.gitmodules | 7 -------
1 file changed, 7 deletions(-)
delete mode 100644 .gitmodules
ok 20 - git_pull_ff: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Deleted branch replace_sub1_with_directory (was 0479aa2).
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'.
error: The following untracked working tree files would be overwritten by merge:
sub1/file1
sub1/file2
Please move or remove them before you merge.
Aborting
Updating 5ecaf5d..0479aa2
ok 21 - git_pull_ff: replace submodule with a directory must fail
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Deleted branch replace_sub1_with_directory (was 0479aa2).
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'.
error: The following untracked working tree files would be overwritten by merge:
sub1/file1
sub1/file2
Please move or remove them before you merge.
Aborting
Updating 5ecaf5d..0479aa2
ok 22 - git_pull_ff: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Deleted branch replace_sub1_with_file (was ed686cf).
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'.
Updating 5ecaf5d..ed686cf
Fast-forward
.gitmodules | 4 ----
sub1 | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
mode change 160000 => 100644 sub1
test_must_fail: command succeeded: git_pull_ff replace_sub1_with_file
not ok 23 - git_pull_ff: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Deleted branch replace_sub1_with_file (was ed686cf).
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'.
Updating 5ecaf5d..ed686cf
Fast-forward
.gitmodules | 4 ----
sub1 | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
mode change 160000 => 100644 sub1
test_must_fail: command succeeded: git_pull_ff replace_sub1_with_file
not ok 24 - git_pull_ff: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Deleted branch modify_sub1 (was d2aacf9).
Switched to a new branch 'modify_sub1'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Updating 5ecaf5d..d2aacf9
Fast-forward
Submodule path 'sub1': checked out '7a3490394af468838d641d072349c646ced2a4ad'
ok 25 - git_pull_ff: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
Deleted branch invalid_sub1 (was 316c5a8).
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
Updating 5ecaf5d..316c5a8
Fast-forward
error: Server does not allow request for unadvertised object 0123456789012345678901234567890123456789
Fetched in submodule path 'sub1', but it did not contain 0123456789012345678901234567890123456789. Direct fetching of that commit failed.
ok 26 - git_pull_ff: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Deleted branch valid_sub1 (was b1beb7d).
Switched to a new branch 'valid_sub1'
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Updating 316c5a8..b1beb7d
Fast-forward
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 27 - git_pull_ff: 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 &&
>sub1 &&
test_must_fail $command add_sub1 &&
test_superproject_content origin/no_submodule &&
test_must_be_empty sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Deleted branch add_sub1 (was 5ecaf5d).
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
error: The following untracked working tree files would be overwritten by merge:
sub1
Please move or remove them before you merge.
Aborting
Updating 18f243f..5ecaf5d
ok 28 - git_pull_ff: added submodule doesn't remove untracked unignored file with same name
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Deleted branch add_sub1 (was 5ecaf5d).
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Updating 18f243f..5ecaf5d
Fast-forward
.gitmodules | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 .gitmodules
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 29 - git_pull_ff_only: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Deleted branch add_sub1 (was 5ecaf5d).
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Updating 18f243f..5ecaf5d
Fast-forward
.gitmodules | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 .gitmodules
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 30 - git_pull_ff_only: added submodule leaves existing empty directory alone
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
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Deleted branch replace_file_with_sub1 (was acb3b39).
Switched to a new branch 'replace_file_with_sub1'
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Updating ed686cf..acb3b39
Fast-forward
.gitmodules | 4 ++++
sub1 | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 31 - git_pull_ff_only: 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
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Deleted branch replace_directory_with_sub1 (was 707cc2a).
Switched to a new branch 'replace_directory_with_sub1'
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Updating 0479aa2..707cc2a
Fast-forward
.gitmodules | 4 ++++
sub1/file1 | 1 -
sub1/file2 | 1 -
sub1/file3 | 1 -
4 files changed, 4 insertions(+), 3 deletions(-)
delete mode 100644 sub1/file1
delete mode 100644 sub1/file2
delete mode 100644 sub1/file3
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 32 - git_pull_ff_only: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Deleted branch remove_sub1 (was 9e43d84).
Switched to a new branch 'remove_sub1'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Updating 5ecaf5d..9e43d84
Fast-forward
.gitmodules | 7 -------
1 file changed, 7 deletions(-)
delete mode 100644 .gitmodules
ok 33 - git_pull_ff_only: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Deleted branch remove_sub1 (was 9e43d84).
Switched to a new branch 'remove_sub1'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Updating 5ecaf5d..9e43d84
Fast-forward
.gitmodules | 7 -------
1 file changed, 7 deletions(-)
delete mode 100644 .gitmodules
ok 34 - git_pull_ff_only: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Deleted branch replace_sub1_with_directory (was 0479aa2).
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'.
error: The following untracked working tree files would be overwritten by merge:
sub1/file1
sub1/file2
Please move or remove them before you merge.
Aborting
Updating 5ecaf5d..0479aa2
ok 35 - git_pull_ff_only: replace submodule with a directory must fail
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Deleted branch replace_sub1_with_directory (was 0479aa2).
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'.
error: The following untracked working tree files would be overwritten by merge:
sub1/file1
sub1/file2
Please move or remove them before you merge.
Aborting
Updating 5ecaf5d..0479aa2
ok 36 - git_pull_ff_only: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Deleted branch replace_sub1_with_file (was ed686cf).
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'.
Updating 5ecaf5d..ed686cf
Fast-forward
.gitmodules | 4 ----
sub1 | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
mode change 160000 => 100644 sub1
test_must_fail: command succeeded: git_pull_ff_only replace_sub1_with_file
not ok 37 - git_pull_ff_only: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Deleted branch replace_sub1_with_file (was ed686cf).
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'.
Updating 5ecaf5d..ed686cf
Fast-forward
.gitmodules | 4 ----
sub1 | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
mode change 160000 => 100644 sub1
test_must_fail: command succeeded: git_pull_ff_only replace_sub1_with_file
not ok 38 - git_pull_ff_only: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Deleted branch modify_sub1 (was d2aacf9).
Switched to a new branch 'modify_sub1'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Updating 5ecaf5d..d2aacf9
Fast-forward
Submodule path 'sub1': checked out '7a3490394af468838d641d072349c646ced2a4ad'
ok 39 - git_pull_ff_only: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
Deleted branch invalid_sub1 (was 316c5a8).
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
Updating 5ecaf5d..316c5a8
Fast-forward
error: Server does not allow request for unadvertised object 0123456789012345678901234567890123456789
Fetched in submodule path 'sub1', but it did not contain 0123456789012345678901234567890123456789. Direct fetching of that commit failed.
ok 40 - git_pull_ff_only: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Deleted branch valid_sub1 (was b1beb7d).
Switched to a new branch 'valid_sub1'
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Updating 316c5a8..b1beb7d
Fast-forward
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 41 - git_pull_ff_only: 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 &&
>sub1 &&
test_must_fail $command add_sub1 &&
test_superproject_content origin/no_submodule &&
test_must_be_empty sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Deleted branch add_sub1 (was 5ecaf5d).
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
error: The following untracked working tree files would be overwritten by merge:
sub1
Please move or remove them before you merge.
Aborting
Updating 18f243f..5ecaf5d
ok 42 - git_pull_ff_only: added submodule doesn't remove untracked unignored file with same name
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Deleted branch add_sub1 (was 5ecaf5d).
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Merging:
18f243f Base
virtual 5ecaf5db99df2a76faa1509574d977d083d06658
found 1 common ancestor:
18f243f Base
Merge made by the 'recursive' strategy.
.gitmodules | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 .gitmodules
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 43 - git_pull_noff: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Deleted branch add_sub1 (was 5ecaf5d).
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Merging:
18f243f Base
virtual 5ecaf5db99df2a76faa1509574d977d083d06658
found 1 common ancestor:
18f243f Base
Merge made by the 'recursive' strategy.
.gitmodules | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 .gitmodules
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 44 - git_pull_noff: added submodule leaves existing empty directory alone
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
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Deleted branch replace_file_with_sub1 (was acb3b39).
Switched to a new branch 'replace_file_with_sub1'
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Merging:
ed686cf Replace sub1 with file
virtual acb3b398c68b0b3aa02725e0a249654291c281e3
found 1 common ancestor:
ed686cf Replace sub1 with file
Merge made by the 'recursive' strategy.
.gitmodules | 4 ++++
sub1 | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 45 - git_pull_noff: replace tracked file with submodule creates empty directory
checking known breakage:
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
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Deleted branch replace_directory_with_sub1 (was 707cc2a).
Switched to a new branch 'replace_directory_with_sub1'
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Merging:
0479aa2 Replace sub1 with directory
virtual 707cc2afe3f1eec920427d5b38c5c823563b954d
found 1 common ancestor:
0479aa2 Replace sub1 with directory
Removing sub1/file3
Removing sub1/file2
Removing sub1/file1
Adding sub1
Merge made by the 'recursive' strategy.
.gitmodules | 4 ++++
sub1/file1 | 1 -
sub1/file2 | 1 -
sub1/file3 | 1 -
4 files changed, 4 insertions(+), 3 deletions(-)
delete mode 100644 sub1/file1
delete mode 100644 sub1/file2
delete mode 100644 sub1/file3
Directory sub1 doesn't exist.
not ok 46 - git_pull_noff: replace directory with submodule # TODO known breakage
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Deleted branch remove_sub1 (was 9e43d84).
Switched to a new branch 'remove_sub1'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Merging:
5ecaf5d Add sub1
virtual 9e43d84cc7b1c3e281a42208bcb8d0e4fd4b4b16
found 1 common ancestor:
5ecaf5d Add sub1
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
Merge made by the 'recursive' strategy.
.gitmodules | 7 -------
1 file changed, 7 deletions(-)
delete mode 100644 .gitmodules
ok 47 - git_pull_noff: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Deleted branch remove_sub1 (was 9e43d84).
Switched to a new branch 'remove_sub1'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
Merging:
5ecaf5d Add sub1
virtual 9e43d84cc7b1c3e281a42208bcb8d0e4fd4b4b16
found 1 common ancestor:
5ecaf5d Add sub1
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
Merge made by the 'recursive' strategy.
.gitmodules | 7 -------
1 file changed, 7 deletions(-)
delete mode 100644 .gitmodules
ok 48 - git_pull_noff: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Deleted branch replace_sub1_with_directory (was 0479aa2).
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'.
error: refusing to lose untracked file at 'sub1/file2'
error: refusing to lose untracked file at 'sub1/file1'
Merging:
5ecaf5d Add sub1
virtual 0479aa2293e76bf6554b9c6760fd878a4b171e11
found 1 common ancestor:
5ecaf5d Add sub1
Adding sub1/file3
Adding sub1/file2
Adding sub1/file1
Removing sub1
Merge made by the 'recursive' strategy.
.gitmodules | 4 ----
sub1/file1 | 1 +
sub1/file2 | 1 +
sub1/file3 | 1 +
4 files changed, 3 insertions(+), 4 deletions(-)
create mode 100644 sub1/file1
create mode 100644 sub1/file2
create mode 100644 sub1/file3
test_must_fail: command succeeded: git_pull_noff replace_sub1_with_directory
not ok 49 - git_pull_noff: replace submodule with a directory must fail # TODO known breakage
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 &&
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
Deleted branch replace_sub1_with_directory (was 0479aa2).
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'.
error: refusing to lose untracked file at 'sub1/file2'
error: refusing to lose untracked file at 'sub1/file1'
Merging:
5ecaf5d Add sub1
virtual 0479aa2293e76bf6554b9c6760fd878a4b171e11
found 1 common ancestor:
5ecaf5d Add sub1
Adding sub1/file3
Adding sub1/file2
Adding sub1/file1
Removing sub1
Merge made by the 'recursive' strategy.
.gitmodules | 4 ----
sub1/file1 | 1 +
sub1/file2 | 1 +
sub1/file3 | 1 +
4 files changed, 3 insertions(+), 4 deletions(-)
create mode 100644 sub1/file1
create mode 100644 sub1/file2
create mode 100644 sub1/file3
test_must_fail: command succeeded: git_pull_noff replace_sub1_with_directory
not ok 50 - git_pull_noff: replace submodule containing a .git directory with a directory 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 &&
test_must_fail $command replace_sub1_with_file &&
test_superproject_content origin/add_sub1 &&
test_submodule_content sub1 origin/add_sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Deleted branch replace_sub1_with_file (was ed686cf).
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'.
Merging:
5ecaf5d Add sub1
virtual ed686cfb20cb50ea1161f2dadee6b76229ed119e
found 1 common ancestor:
5ecaf5d Add sub1
Merge made by the 'recursive' strategy.
.gitmodules | 4 ----
sub1 | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
mode change 160000 => 100644 sub1
test_must_fail: command succeeded: git_pull_noff replace_sub1_with_file
not ok 51 - git_pull_noff: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Deleted branch replace_sub1_with_file (was ed686cf).
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'.
Merging:
5ecaf5d Add sub1
virtual ed686cfb20cb50ea1161f2dadee6b76229ed119e
found 1 common ancestor:
5ecaf5d Add sub1
Merge made by the 'recursive' strategy.
.gitmodules | 4 ----
sub1 | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
mode change 160000 => 100644 sub1
test_must_fail: command succeeded: git_pull_noff replace_sub1_with_file
not ok 52 - git_pull_noff: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Deleted branch modify_sub1 (was d2aacf9).
Switched to a new branch 'modify_sub1'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Merging:
5ecaf5d Add sub1
virtual d2aacf90223108b4646000ddcf85e1f5debc62a4
found 1 common ancestor:
5ecaf5d Add sub1
Merge made by the 'recursive' strategy.
Submodule path 'sub1': checked out '7a3490394af468838d641d072349c646ced2a4ad'
ok 53 - git_pull_noff: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
Deleted branch invalid_sub1 (was 316c5a8).
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
Merging:
5ecaf5d Add sub1
virtual 316c5a8aaac7fcab2ea97dd09eb399c7955a4036
found 1 common ancestor:
5ecaf5d Add sub1
Merge made by the 'recursive' strategy.
error: Server does not allow request for unadvertised object 0123456789012345678901234567890123456789
Fetched in submodule path 'sub1', but it did not contain 0123456789012345678901234567890123456789. Direct fetching of that commit failed.
ok 54 - git_pull_noff: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Deleted branch valid_sub1 (was b1beb7d).
Switched to a new branch 'valid_sub1'
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Merging:
316c5a8 Invalid sub1 commit
virtual b1beb7d7cb2c3340d8d7787ffbaf6ac1aea86964
found 1 common ancestor:
316c5a8 Invalid sub1 commit
Merge made by the 'recursive' strategy.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'ea204505481f43087938782cd434c7536e61d20b'
Submodule path 'uninitialized_sub': checked out 'ea204505481f43087938782cd434c7536e61d20b'
ok 55 - git_pull_noff: 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 &&
>sub1 &&
test_must_fail $command add_sub1 &&
test_superproject_content origin/no_submodule &&
test_must_be_empty sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Deleted branch add_sub1 (was 5ecaf5d).
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
error: The following untracked working tree files would be overwritten by merge:
sub1
Please move or remove them before you merge.
Aborting
error: merging of trees ec38489b3f8eda08fda17055ad272abc24bdf929 and 2e4720009e051cda63902e6eef61c3529c0ca10e failed
Merging:
18f243f Base
virtual 5ecaf5db99df2a76faa1509574d977d083d06658
found 1 common ancestor:
18f243f Base
ok 56 - git_pull_noff: added submodule doesn't remove untracked unignored file with same name
expecting success:
test_create_repo child &&
test_commit -C child bar &&
test_create_repo parent &&
test_commit -C child foo &&
git -C parent submodule add ../child sub &&
git -C parent commit -m "add submodule" &&
git clone --recurse-submodules parent super
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/child/.git/
[master (root-commit) 750fa6a] bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/parent/.git/
[master 0e8869f] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/parent/sub'...
done.
[master (root-commit) e852c8d] add submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub
Cloning into 'super'...
done.
Submodule 'sub' (/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/child) registered for path 'sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/super/sub'...
done.
Submodule path 'sub': checked out '0e8869f4b19abd4315a34385d48a89d57d29fcef'
ok 57 - pull --recurse-submodule setup
expecting success:
test_commit -C child merge_strategy &&
git -C parent submodule update --remote &&
git -C parent add sub &&
git -C parent commit -m "update submodule" &&
git -C super pull --no-rebase --recurse-submodules &&
test_path_is_file super/sub/merge_strategy.t
[master f5118bb] merge_strategy
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 merge_strategy.t
From /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/child
0e8869f..f5118bb master -> origin/master
* [new tag] merge_strategy -> merge_strategy
Submodule path 'sub': checked out 'f5118bbe31591c1754caa4ae107e90ff56cba7a2'
[master e22797f] update submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
From /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/parent
e852c8d..e22797f master -> origin/master
Fetching submodule sub
From /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/child
0e8869f..f5118bb master -> origin/master
* [new tag] merge_strategy -> merge_strategy
Updating e852c8d..e22797f
Fast-forward
sub | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Submodule path 'sub': checked out 'f5118bbe31591c1754caa4ae107e90ff56cba7a2'
ok 58 - recursive pull updates working tree
expecting success:
test_commit -C child merge_strategy_2 &&
git -C parent submodule update --remote &&
git -C parent add sub &&
git -C parent commit -m "update submodule" &&
git -C super -c submodule.recurse pull --no-rebase &&
test_path_is_file super/sub/merge_strategy_2.t
[master 2656b36] merge_strategy_2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 merge_strategy_2.t
From /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/child
f5118bb..2656b36 master -> origin/master
* [new tag] merge_strategy_2 -> merge_strategy_2
Submodule path 'sub': checked out '2656b365d0a47009f5a9da9ec2de04ec5d400273'
[master c804116] update submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
From /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/parent
e22797f..c804116 master -> origin/master
Fetching submodule sub
From /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/child
f5118bb..2656b36 master -> origin/master
* [new tag] merge_strategy_2 -> merge_strategy_2
Updating e22797f..c804116
Fast-forward
sub | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Submodule path 'sub': checked out '2656b365d0a47009f5a9da9ec2de04ec5d400273'
ok 59 - submodule.recurse option triggers recursive pull
expecting success:
test_commit -C child merge_strategy_3 &&
git -C parent submodule update --remote &&
git -C parent add sub &&
git -C parent commit -m "update submodule" &&
git -C super -c submodule.recurse pull --no-recurse-submodules --no-rebase &&
test_path_is_missing super/sub/merge_strategy_3.t &&
git -C super -c submodule.recurse=false pull --recurse-submodules --no-rebase &&
test_path_is_file super/sub/merge_strategy_3.t &&
test_commit -C child merge_strategy_4 &&
git -C parent submodule update --remote &&
git -C parent add sub &&
git -C parent commit -m "update submodule" &&
git -C super -c submodule.recurse=false pull --no-recurse-submodules --no-rebase &&
test_path_is_missing super/sub/merge_strategy_4.t &&
git -C super -c submodule.recurse=true pull --recurse-submodules --no-rebase &&
test_path_is_file super/sub/merge_strategy_4.t
[master 685538c] merge_strategy_3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 merge_strategy_3.t
From /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/child
2656b36..685538c master -> origin/master
* [new tag] merge_strategy_3 -> merge_strategy_3
Submodule path 'sub': checked out '685538cca6f18f91014b4629a2f9b9136c6654cf'
[master 7995336] update submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
From /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/parent
c804116..7995336 master -> origin/master
Updating c804116..7995336
Fast-forward
sub | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Fetching submodule sub
From /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/child
2656b36..685538c master -> origin/master
* [new tag] merge_strategy_3 -> merge_strategy_3
Already up to date.
Submodule path 'sub': checked out '685538cca6f18f91014b4629a2f9b9136c6654cf'
[master c05caa7] merge_strategy_4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 merge_strategy_4.t
From /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/child
685538c..c05caa7 master -> origin/master
* [new tag] merge_strategy_4 -> merge_strategy_4
Submodule path 'sub': checked out 'c05caa7403cd6cb57ebb9b5c078ede769845b6ac'
[master ab7e8d7] update submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
From /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/parent
7995336..ab7e8d7 master -> origin/master
Updating 7995336..ab7e8d7
Fast-forward
sub | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Fetching submodule sub
From /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/child
685538c..c05caa7 master -> origin/master
* [new tag] merge_strategy_4 -> merge_strategy_4
Already up to date.
Submodule path 'sub': checked out 'c05caa7403cd6cb57ebb9b5c078ede769845b6ac'
ok 60 - --[no-]recurse-submodule and submodule.recurse
expecting success:
# change upstream
test_commit -C child rebase_strategy &&
git -C parent submodule update --remote &&
git -C parent add sub &&
git -C parent commit -m "update submodule" &&
# also have local commits
test_commit -C super/sub local_stuff &&
git -C super pull --rebase --recurse-submodules &&
test_path_is_file super/sub/rebase_strategy.t &&
test_path_is_file super/sub/local_stuff.t
[master 444a38f] rebase_strategy
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 rebase_strategy.t
From /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/child
c05caa7..444a38f master -> origin/master
* [new tag] rebase_strategy -> rebase_strategy
Submodule path 'sub': checked out '444a38f268bc637531debc8ab96af23723e6738c'
[master ae4551d] update submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD de038fa] local_stuff
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 local_stuff.t
From /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/parent
ab7e8d7..ae4551d master -> origin/master
Fetching submodule sub
From /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/child
c05caa7..444a38f master -> origin/master
* [new tag] rebase_strategy -> rebase_strategy
Updating ab7e8d7..ae4551d
Fast-forward
sub | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Current branch master is up to date.
First, rewinding head to replay your work on top of it...
Applying: local_stuff
Submodule path 'sub': rebased into '444a38f268bc637531debc8ab96af23723e6738c'
ok 61 - recursive rebasing pull
expecting success:
# local changes in submodule recorded in superproject:
test_commit -C super/sub local_stuff_2 &&
git -C super add sub &&
git -C super commit -m "local update submodule" &&
# and in the remote as well:
test_commit -C child important_upstream_work &&
git -C parent submodule update --remote &&
git -C parent add sub &&
git -C parent commit -m "remote update submodule" &&
# Unfortunately we fail here, despite no conflict in the
# submodule itself, but the merge strategy in submodules
# does not support rebase:
test_must_fail git -C super pull --rebase --recurse-submodules 2>err &&
test_i18ngrep "locally recorded submodule modifications" err
[detached HEAD bf24f6d] local_stuff_2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 local_stuff_2.t
[master 8e37952] local update submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 3328e66] important_upstream_work
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 important_upstream_work.t
From /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/child
444a38f..3328e66 master -> origin/master
* [new tag] important_upstream_work -> important_upstream_work
Submodule path 'sub': checked out '3328e66275888771ad97d1742b94efec5243e45d'
[master f9ac4a8] remote update submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: cannot rebase with locally recorded submodule modifications
ok 62 - pull rebase recursing fails with conflicts
expecting success:
rm -rf parent child &&
test_create_repo a-submodule &&
test_commit -C a-submodule foo &&
test_create_repo parent &&
git -C parent submodule add "$(pwd)/a-submodule" &&
git -C parent commit -m foo &&
git clone parent child &&
# Reset master so that it has no merge base with
# refs/remotes/origin/master.
OTHER=$(git -C child commit-tree -m bar \
$(git -C child rev-parse HEAD^{tree})) &&
git -C child reset --hard "$OTHER" &&
git -C child pull --recurse-submodules --rebase
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/a-submodule/.git/
[master (root-commit) af4983b] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/parent/.git/
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t5572-pull-submodule/parent/a-submodule'...
done.
[master (root-commit) 33dde5b] foo
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 a-submodule
Cloning into 'child'...
done.
HEAD is now at 9ee7dec bar
First, rewinding head to replay your work on top of it...
ok 63 - branch has no merge base with remote-tracking counterpart
# still have 11 known breakage(s)
# passed all remaining 52 test(s)
1..63
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6022-merge-rename.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6022-merge-rename/.git/
expecting success:
cat >A <<\EOF &&
a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
c cccccccccccccccccccccccccccccccccccccccccccccccc
d dddddddddddddddddddddddddddddddddddddddddddddddd
e eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
f ffffffffffffffffffffffffffffffffffffffffffffffff
g gggggggggggggggggggggggggggggggggggggggggggggggg
h hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
i iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
j jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
k kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
l llllllllllllllllllllllllllllllllllllllllllllllll
m mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
n nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
o oooooooooooooooooooooooooooooooooooooooooooooooo
EOF
cat >M <<\EOF &&
A AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
B BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
D DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
E EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
F FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
G GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
H HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
I IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
J JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ
K KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
L LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
M MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
N NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
O OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
EOF
git add A M &&
git commit -m "initial has A and M" &&
git branch white &&
git branch red &&
git branch blue &&
git branch yellow &&
git branch change &&
git branch change+rename &&
sed -e "/^g /s/.*/g : master changes a line/" <A >A+ &&
mv A+ A &&
git commit -a -m "master updates A" &&
git checkout yellow &&
rm -f M &&
git commit -a -m "yellow removes M" &&
git checkout white &&
sed -e "/^g /s/.*/g : white changes a line/" <A >B &&
sed -e "/^G /s/.*/G : colored branch changes a line/" <M >N &&
rm -f A M &&
git update-index --add --remove A B M N &&
git commit -m "white renames A->B, M->N" &&
git checkout red &&
sed -e "/^g /s/.*/g : red changes a line/" <A >B &&
sed -e "/^G /s/.*/G : colored branch changes a line/" <M >N &&
rm -f A M &&
git update-index --add --remove A B M N &&
git commit -m "red renames A->B, M->N" &&
git checkout blue &&
sed -e "/^g /s/.*/g : blue changes a line/" <A >C &&
sed -e "/^G /s/.*/G : colored branch changes a line/" <M >N &&
rm -f A M &&
git update-index --add --remove A C M N &&
git commit -m "blue renames A->C, M->N" &&
git checkout change &&
sed -e "/^g /s/.*/g : changed line/" <A >A+ &&
mv A+ A &&
git commit -q -a -m "changed" &&
git checkout change+rename &&
sed -e "/^g /s/.*/g : changed line/" <A >B &&
rm A &&
git update-index --add B &&
git commit -q -a -m "changed and renamed" &&
git checkout master
[master (root-commit) 66b5da7] initial has A and M
Author: A U Thor <author@example.com>
2 files changed, 30 insertions(+)
create mode 100644 A
create mode 100644 M
[master d73f2e4] master updates A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'yellow'
[yellow 4f8127b] yellow removes M
Author: A U Thor <author@example.com>
1 file changed, 15 deletions(-)
delete mode 100644 M
Switched to branch 'white'
[white d9d56b9] white renames A->B, M->N
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
rename A => B (93%)
rename M => N (93%)
Switched to branch 'red'
[red 9ceb367] red renames A->B, M->N
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
rename A => B (93%)
rename M => N (93%)
Switched to branch 'blue'
[blue 3e4bdb5] blue renames A->C, M->N
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
rename A => C (93%)
rename M => N (93%)
Switched to branch 'change'
Switched to branch 'change+rename'
Switched to branch 'master'
ok 1 - setup
expecting success:
git show-branch &&
test_expect_code 1 git pull . white &&
git ls-files -s &&
git ls-files -u B >b.stages &&
test_line_count = 3 b.stages &&
git ls-files -s N >n.stages &&
test_line_count = 1 n.stages &&
sed -ne "/^g/{
p
q
}" B | grep master &&
git diff --exit-code white N
! [blue] blue renames A->C, M->N
! [change] changed
! [change+rename] changed and renamed
* [master] master updates A
! [red] red renames A->B, M->N
! [white] white renames A->B, M->N
! [yellow] yellow removes M
-------
+ [change+rename] changed and renamed
+ [change] changed
+ [blue] blue renames A->C, M->N
+ [yellow] yellow removes M
+ [white] white renames A->B, M->N
+ [red] red renames A->B, M->N
* [master] master updates A
+++*+++ [change+rename^] initial has A and M
From .
* branch white -> FETCH_HEAD
Merging:
d73f2e4 master updates A
virtual d9d56b93051c5e9b70aef33b6b6f0f8a95bcf2c4
found 1 common ancestor:
66b5da7 initial has A and M
Auto-merging B
CONFLICT (content): Merge conflict in B
Automatic merge failed; fix conflicts and then commit the result.
100644 aed72d761b68c20ffce8249a5a0426494098d376 1 B
100644 c68856fe0bfce4eb453d8e12329c47ab60c8107b 2 B
100644 2d603156dc5bdf6295c789cac08e3c9942a0b82a 3 B
100644 ba41fb96393979b22691106b06bf5231eab57b85 0 N
g : master changes a line
ok 2 - pull renaming branch into unrenaming one
expecting success:
rm -f B &&
git reset --hard &&
git checkout red &&
test_expect_code 1 git pull . white &&
git ls-files -u B >b.stages &&
test_line_count = 3 b.stages &&
git ls-files -s N >n.stages &&
test_line_count = 1 n.stages &&
sed -ne "/^g/{
p
q
}" B | grep red &&
git diff --exit-code white N
HEAD is now at d73f2e4 master updates A
Switched to branch 'red'
From .
* branch white -> FETCH_HEAD
Merging:
9ceb367 red renames A->B, M->N
virtual d9d56b93051c5e9b70aef33b6b6f0f8a95bcf2c4
found 1 common ancestor:
66b5da7 initial has A and M
Auto-merging N
Skipped N (merged same as existing)
Auto-merging B
CONFLICT (content): Merge conflict in B
Automatic merge failed; fix conflicts and then commit the result.
g : red changes a line
ok 3 - pull renaming branch into another renaming one
expecting success:
git reset --hard &&
git show-branch &&
test_expect_code 1 git pull . master &&
git ls-files -u B >b.stages &&
test_line_count = 3 b.stages &&
git ls-files -s N >n.stages &&
test_line_count = 1 n.stages &&
sed -ne "/^g/{
p
q
}" B | grep red &&
git diff --exit-code white N
HEAD is now at 9ceb367 red renames A->B, M->N
! [blue] blue renames A->C, M->N
! [change] changed
! [change+rename] changed and renamed
! [master] master updates A
* [red] red renames A->B, M->N
! [white] white renames A->B, M->N
! [yellow] yellow removes M
-------
+ [change+rename] changed and renamed
+ [change] changed
+ [blue] blue renames A->C, M->N
+ [yellow] yellow removes M
+ [white] white renames A->B, M->N
* [red] red renames A->B, M->N
+ [master] master updates A
++++*++ [change+rename^] initial has A and M
From .
* branch master -> FETCH_HEAD
Merging:
9ceb367 red renames A->B, M->N
virtual d73f2e4c7cb3600f6cbdf2a884cb7de9c94dd88e
found 1 common ancestor:
66b5da7 initial has A and M
Skipped N (merged same as existing)
Auto-merging B
CONFLICT (content): Merge conflict in B
Automatic merge failed; fix conflicts and then commit the result.
g : red changes a line
ok 4 - pull unrenaming branch into renaming one
expecting success:
git reset --hard &&
git show-branch &&
test_expect_code 1 git pull . blue &&
git ls-files -u A >a.stages &&
test_line_count = 1 a.stages &&
git ls-files -u B >b.stages &&
test_line_count = 1 b.stages &&
git ls-files -u C >c.stages &&
test_line_count = 1 c.stages &&
git ls-files -s N >n.stages &&
test_line_count = 1 n.stages &&
sed -ne "/^g/{
p
q
}" B | grep red &&
git diff --exit-code white N
HEAD is now at 9ceb367 red renames A->B, M->N
! [blue] blue renames A->C, M->N
! [change] changed
! [change+rename] changed and renamed
! [master] master updates A
* [red] red renames A->B, M->N
! [white] white renames A->B, M->N
! [yellow] yellow removes M
-------
+ [change+rename] changed and renamed
+ [change] changed
+ [blue] blue renames A->C, M->N
+ [yellow] yellow removes M
+ [white] white renames A->B, M->N
* [red] red renames A->B, M->N
+ [master] master updates A
++++*++ [change+rename^] initial has A and M
From .
* branch blue -> FETCH_HEAD
Merging:
9ceb367 red renames A->B, M->N
virtual 3e4bdb5a15003f762197dcfb4f526bd43726560c
found 1 common ancestor:
66b5da7 initial has A and M
Auto-merging N
Skipped N (merged same as existing)
CONFLICT (rename/rename): Rename "A"->"B" in branch "HEAD" rename "A"->"C" in "3e4bdb5a15003f762197dcfb4f526bd43726560c"
Auto-merging B and C, both renamed from A
Automatic merge failed; fix conflicts and then commit the result.
g : red changes a line
ok 5 - pull conflicting renames
expecting success:
git reset --hard &&
git show-branch &&
echo >A this file should not matter &&
test_expect_code 1 git pull . white &&
test_path_is_file A
HEAD is now at 9ceb367 red renames A->B, M->N
! [blue] blue renames A->C, M->N
! [change] changed
! [change+rename] changed and renamed
! [master] master updates A
* [red] red renames A->B, M->N
! [white] white renames A->B, M->N
! [yellow] yellow removes M
-------
+ [change+rename] changed and renamed
+ [change] changed
+ [blue] blue renames A->C, M->N
+ [yellow] yellow removes M
+ [white] white renames A->B, M->N
* [red] red renames A->B, M->N
+ [master] master updates A
++++*++ [change+rename^] initial has A and M
From .
* branch white -> FETCH_HEAD
Merging:
9ceb367 red renames A->B, M->N
virtual d9d56b93051c5e9b70aef33b6b6f0f8a95bcf2c4
found 1 common ancestor:
66b5da7 initial has A and M
Auto-merging N
Skipped N (merged same as existing)
Auto-merging B
CONFLICT (content): Merge conflict in B
Automatic merge failed; fix conflicts and then commit the result.
ok 6 - interference with untracked working tree file
expecting success:
git reset --hard &&
git checkout white &&
git show-branch &&
rm -f A &&
echo >A this file should not matter &&
test_expect_code 1 git pull . red &&
test_path_is_file A
HEAD is now at 9ceb367 red renames A->B, M->N
Switched to branch 'white'
! [blue] blue renames A->C, M->N
! [change] changed
! [change+rename] changed and renamed
! [master] master updates A
! [red] red renames A->B, M->N
* [white] white renames A->B, M->N
! [yellow] yellow removes M
-------
+ [change+rename] changed and renamed
+ [change] changed
+ [blue] blue renames A->C, M->N
+ [yellow] yellow removes M
* [white] white renames A->B, M->N
+ [red] red renames A->B, M->N
+ [master] master updates A
+++++*+ [change+rename^] initial has A and M
From .
* branch red -> FETCH_HEAD
Merging:
d9d56b9 white renames A->B, M->N
virtual 9ceb36758a6227b63bad73bd8f5e7cf13c453076
found 1 common ancestor:
66b5da7 initial has A and M
Auto-merging N
Skipped N (merged same as existing)
Auto-merging B
CONFLICT (content): Merge conflict in B
Automatic merge failed; fix conflicts and then commit the result.
ok 7 - interference with untracked working tree file
expecting success:
git reset --hard &&
rm -f A M &&
git checkout -f master &&
git tag -f anchor &&
git show-branch &&
git pull . yellow &&
test_path_is_missing M &&
git reset --hard anchor
HEAD is now at d9d56b9 white renames A->B, M->N
Switched to branch 'master'
! [blue] blue renames A->C, M->N
! [change] changed
! [change+rename] changed and renamed
* [master] master updates A
! [red] red renames A->B, M->N
! [white] white renames A->B, M->N
! [yellow] yellow removes M
-------
+ [change+rename] changed and renamed
+ [change] changed
+ [blue] blue renames A->C, M->N
+ [yellow] yellow removes M
+ [white] white renames A->B, M->N
+ [red] red renames A->B, M->N
* [master] master updates A
+++*+++ [change+rename^] initial has A and M
From .
* branch yellow -> FETCH_HEAD
Merging:
d73f2e4 master updates A
virtual 4f8127b3652a1a9899b9973b5260147d897598fd
found 1 common ancestor:
66b5da7 initial has A and M
Removing M
Merge made by the 'recursive' strategy.
M | 15 ---------------
1 file changed, 15 deletions(-)
delete mode 100644 M
HEAD is now at d73f2e4 master updates A
ok 8 - interference with untracked working tree file
expecting success:
git reset --hard &&
rm -f A M &&
git checkout -f master &&
git tag -f anchor &&
git show-branch &&
echo >>M one line addition &&
cat M >M.saved &&
test_expect_code 128 git pull . yellow &&
test_cmp M M.saved &&
rm -f M.saved
HEAD is now at d73f2e4 master updates A
Already on 'master'
! [blue] blue renames A->C, M->N
! [change] changed
! [change+rename] changed and renamed
* [master] master updates A
! [red] red renames A->B, M->N
! [white] white renames A->B, M->N
! [yellow] yellow removes M
-------
+ [change+rename] changed and renamed
+ [change] changed
+ [blue] blue renames A->C, M->N
+ [yellow] yellow removes M
+ [white] white renames A->B, M->N
+ [red] red renames A->B, M->N
* [master] master updates A
+++*+++ [change+rename^] initial has A and M
From .
* branch yellow -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by merge:
M
Please commit your changes or stash them before you merge.
Aborting
error: merging of trees 327b18fcbf562119811a97f5b8ed9c8ef85d5c3d and 878bb4a74cc6b899e74bcd3b56352573baeb967d failed
Merging:
d73f2e4 master updates A
virtual 4f8127b3652a1a9899b9973b5260147d897598fd
found 1 common ancestor:
66b5da7 initial has A and M
ok 9 - updated working tree file should prevent the merge
expecting success:
git reset --hard &&
rm -f A M &&
git checkout -f master &&
git tag -f anchor &&
git show-branch &&
echo >>M one line addition &&
cat M >M.saved &&
git update-index M &&
test_expect_code 128 git pull . yellow &&
test_cmp M M.saved &&
rm -f M.saved
HEAD is now at d73f2e4 master updates A
Already on 'master'
! [blue] blue renames A->C, M->N
! [change] changed
! [change+rename] changed and renamed
* [master] master updates A
! [red] red renames A->B, M->N
! [white] white renames A->B, M->N
! [yellow] yellow removes M
-------
+ [change+rename] changed and renamed
+ [change] changed
+ [blue] blue renames A->C, M->N
+ [yellow] yellow removes M
+ [white] white renames A->B, M->N
+ [red] red renames A->B, M->N
* [master] master updates A
+++*+++ [change+rename^] initial has A and M
From .
* branch yellow -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by merge:
M
Merging:
d73f2e4 master updates A
virtual 4f8127b3652a1a9899b9973b5260147d897598fd
found 1 common ancestor:
66b5da7 initial has A and M
ok 10 - updated working tree file should prevent the merge
expecting success:
git reset --hard &&
rm -f A M &&
git checkout -f yellow &&
git tag -f anchor &&
git show-branch &&
echo >M this file should not matter &&
git pull . master &&
test_path_is_file M &&
! {
git ls-files -s |
grep M
} &&
git reset --hard anchor
HEAD is now at d73f2e4 master updates A
Switched to branch 'yellow'
Updated tag 'anchor' (was d73f2e4)
! [blue] blue renames A->C, M->N
! [change] changed
! [change+rename] changed and renamed
! [master] master updates A
! [red] red renames A->B, M->N
! [white] white renames A->B, M->N
* [yellow] yellow removes M
-------
+ [change+rename] changed and renamed
+ [change] changed
+ [blue] blue renames A->C, M->N
* [yellow] yellow removes M
+ [white] white renames A->B, M->N
+ [red] red renames A->B, M->N
+ [master] master updates A
++++++* [change+rename^] initial has A and M
From .
* branch master -> FETCH_HEAD
Merging:
4f8127b yellow removes M
virtual d73f2e4c7cb3600f6cbdf2a884cb7de9c94dd88e
found 1 common ancestor:
66b5da7 initial has A and M
Merge made by the 'recursive' strategy.
A | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at 4f8127b yellow removes M
ok 11 - interference with untracked working tree file
expecting success:
rm -f A M N &&
git reset --hard &&
git checkout change+rename &&
GIT_MERGE_VERBOSITY=3 git merge change >out &&
test_i18ngrep "^Skipped B" out &&
git reset --hard HEAD^ &&
git checkout change &&
GIT_MERGE_VERBOSITY=3 git merge change+rename >out &&
test_i18ngrep ! "^Skipped B" out
HEAD is now at 4f8127b yellow removes M
Switched to branch 'change+rename'
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Skipped B (merged same as existing)
HEAD is now at 48c26e8 changed and renamed
Switched to branch 'change'
ok 12 - merge of identical changes in a renamed file
expecting success:
git reset --hard &&
git checkout --orphan dir-in-way &&
git rm -rf . &&
git clean -fdqx &&
mkdir sub &&
mkdir dir &&
printf "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n" >sub/file &&
echo foo >dir/file-in-the-way &&
git add -A &&
git commit -m "Common commit" &&
echo 11 >>sub/file &&
echo more >>dir/file-in-the-way &&
git add -u &&
git commit -m "Commit to merge, with dir in the way" &&
git checkout -b dir-not-in-way &&
git reset --soft HEAD^ &&
git rm -rf dir &&
git commit -m "Commit to merge, with dir removed" -- dir sub/file &&
git checkout -b renamed-file-has-no-conflicts dir-in-way~1 &&
git rm -rf dir &&
git rm sub/file &&
printf "1\n2\n3\n4\n5555\n6\n7\n8\n9\n10\n" >dir &&
git add dir &&
git commit -m "Independent change" &&
git checkout -b renamed-file-has-conflicts dir-in-way~1 &&
git rm -rf dir &&
git mv sub/file dir &&
echo 12 >>dir &&
git add dir &&
git commit -m "Conflicting change"
HEAD is now at f525f45 Merge branch 'change+rename' into change
Switched to a new branch 'dir-in-way'
rm 'B'
rm 'M'
[dir-in-way (root-commit) 5b806d2] Common commit
Author: A U Thor <author@example.com>
2 files changed, 11 insertions(+)
create mode 100644 dir/file-in-the-way
create mode 100644 sub/file
[dir-in-way 4cdacf5] Commit to merge, with dir in the way
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
Switched to a new branch 'dir-not-in-way'
rm 'dir/file-in-the-way'
[dir-not-in-way 2a61ee6] Commit to merge, with dir removed
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
delete mode 100644 dir/file-in-the-way
Switched to a new branch 'renamed-file-has-no-conflicts'
rm 'dir/file-in-the-way'
rm 'sub/file'
[renamed-file-has-no-conflicts ff5c554] Independent change
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 2 deletions(-)
rename sub/file => dir (79%)
delete mode 100644 dir/file-in-the-way
Switched to a new branch 'renamed-file-has-conflicts'
rm 'dir/file-in-the-way'
[renamed-file-has-conflicts 618458a] Conflicting change
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
rename sub/file => dir (87%)
delete mode 100644 dir/file-in-the-way
ok 13 - setup for rename + d/f conflicts
expecting success:
git reset --hard &&
git checkout -q renamed-file-has-no-conflicts^0 &&
git merge --strategy=recursive dir-not-in-way &&
git diff --quiet &&
test -f dir &&
test_cmp expected dir
HEAD is now at 618458a Conflicting change
Merging:
ff5c554 Independent change
virtual dir-not-in-way
found 1 common ancestor:
5b806d2 Common commit
Auto-merging dir
Merge made by the 'recursive' strategy.
dir | 1 +
1 file changed, 1 insertion(+)
ok 14 - Rename+D/F conflict; renamed file merges + dir not in way
expecting success:
git reset --hard &&
rm -rf dir~* &&
git checkout -q renamed-file-has-no-conflicts^0 &&
test_must_fail git merge --strategy=recursive dir-in-way >output &&
test_i18ngrep "CONFLICT (modify/delete): dir/file-in-the-way" output &&
test_i18ngrep "Auto-merging dir" output &&
test_i18ngrep "Adding as dir~HEAD instead" output &&
test 3 -eq "$(git ls-files -u | wc -l)" &&
test 2 -eq "$(git ls-files -u dir/file-in-the-way | wc -l)" &&
test_must_fail git diff --quiet &&
test_must_fail git diff --cached --quiet &&
test -f dir/file-in-the-way &&
test -f dir~HEAD &&
test_cmp expected dir~HEAD
HEAD is now at b565181 Merge branch 'dir-not-in-way' into HEAD
CONFLICT (modify/delete): dir/file-in-the-way deleted in HEAD and modified in dir-in-way. Version dir-in-way of dir/file-in-the-way left in tree.
Auto-merging dir
Adding as dir~HEAD instead
ok 15 - Rename+D/F conflict; renamed file merges but dir in way
expecting success:
git reset --hard &&
rm -rf dir~* &&
git checkout -q dir-in-way^0 &&
test_must_fail git merge --strategy=recursive renamed-file-has-no-conflicts >output 2>errors &&
! grep "error: refusing to lose untracked file at" errors &&
test_i18ngrep "CONFLICT (modify/delete): dir/file-in-the-way" output &&
test_i18ngrep "Auto-merging dir" output &&
test_i18ngrep "Adding as dir~renamed-file-has-no-conflicts instead" output &&
test 3 -eq "$(git ls-files -u | wc -l)" &&
test 2 -eq "$(git ls-files -u dir/file-in-the-way | wc -l)" &&
test_must_fail git diff --quiet &&
test_must_fail git diff --cached --quiet &&
test -f dir/file-in-the-way &&
test -f dir~renamed-file-has-no-conflicts &&
test_cmp expected dir~renamed-file-has-no-conflicts
HEAD is now at ff5c554 Independent change
CONFLICT (modify/delete): dir/file-in-the-way deleted in renamed-file-has-no-conflicts and modified in HEAD. Version HEAD of dir/file-in-the-way left in tree.
Auto-merging dir
Adding as dir~renamed-file-has-no-conflicts instead
ok 16 - Same as previous, but merged other way
expecting success:
git reset --hard &&
rm -rf dir~* &&
git checkout -q renamed-file-has-conflicts^0 &&
test_must_fail git merge --strategy=recursive dir-not-in-way &&
test 3 -eq "$(git ls-files -u | wc -l)" &&
test 3 -eq "$(git ls-files -u dir | wc -l)" &&
test_must_fail git diff --quiet &&
test_must_fail git diff --cached --quiet &&
test -f dir &&
test_cmp expected dir
warning: unable to unlink 'dir': Is a directory
HEAD is now at 4cdacf5 Commit to merge, with dir in the way
Merging:
618458a Conflicting change
virtual dir-not-in-way
found 1 common ancestor:
5b806d2 Common commit
Auto-merging dir
CONFLICT (content): Merge conflict in dir
Automatic merge failed; fix conflicts and then commit the result.
ok 17 - Rename+D/F conflict; renamed file cannot merge, dir not in way
expecting success:
modify s/dir-not-in-way/dir-in-way/ expected &&
git reset --hard &&
rm -rf dir~* &&
git checkout -q renamed-file-has-conflicts^0 &&
test_must_fail git merge --strategy=recursive dir-in-way &&
test 5 -eq "$(git ls-files -u | wc -l)" &&
test 3 -eq "$(git ls-files -u dir | grep -v file-in-the-way | wc -l)" &&
test 2 -eq "$(git ls-files -u dir/file-in-the-way | wc -l)" &&
test_must_fail git diff --quiet &&
test_must_fail git diff --cached --quiet &&
test -f dir/file-in-the-way &&
test -f dir~HEAD &&
test_cmp expected dir~HEAD
HEAD is now at 618458a Conflicting change
Merging:
618458a Conflicting change
virtual dir-in-way
found 1 common ancestor:
5b806d2 Common commit
CONFLICT (modify/delete): dir/file-in-the-way deleted in HEAD and modified in dir-in-way. Version dir-in-way of dir/file-in-the-way left in tree.
Removing dir to make room for subdirectory
Auto-merging dir
CONFLICT (content): Merge conflict in dir
Refusing to lose dirty file at dir
Adding as dir~HEAD instead
Automatic merge failed; fix conflicts and then commit the result.
ok 18 - Rename+D/F conflict; renamed file cannot merge and dir in the way
expecting success:
git reset --hard &&
rm -rf dir~* &&
git checkout -q dir-in-way^0 &&
test_must_fail git merge --strategy=recursive renamed-file-has-conflicts &&
test 5 -eq "$(git ls-files -u | wc -l)" &&
test 3 -eq "$(git ls-files -u dir | grep -v file-in-the-way | wc -l)" &&
test 2 -eq "$(git ls-files -u dir/file-in-the-way | wc -l)" &&
test_must_fail git diff --quiet &&
test_must_fail git diff --cached --quiet &&
test -f dir/file-in-the-way &&
test -f dir~renamed-file-has-conflicts &&
test_cmp expected dir~renamed-file-has-conflicts
HEAD is now at 618458a Conflicting change
Merging:
4cdacf5 Commit to merge, with dir in the way
virtual renamed-file-has-conflicts
found 1 common ancestor:
5b806d2 Common commit
CONFLICT (modify/delete): dir/file-in-the-way deleted in renamed-file-has-conflicts and modified in HEAD. Version HEAD of dir/file-in-the-way left in tree.
Auto-merging dir
CONFLICT (content): Merge conflict in dir
Adding as dir~renamed-file-has-conflicts instead
Automatic merge failed; fix conflicts and then commit the result.
ok 19 - Same as previous, but merged other way
expecting success:
git reset --hard &&
git checkout --orphan rename-dest &&
git rm -rf . &&
git clean -fdqx &&
mkdir one &&
echo stuff >one/file &&
git add -A &&
git commit -m "Common commit" &&
git mv one/file destdir &&
git commit -m "Renamed to destdir" &&
git checkout -b source-conflict HEAD~1 &&
git rm -rf one &&
mkdir destdir &&
touch one destdir/foo &&
git add -A &&
git commit -m "Conflicts in the way"
warning: unable to unlink 'dir': Is a directory
HEAD is now at 4cdacf5 Commit to merge, with dir in the way
Switched to a new branch 'rename-dest'
rm 'dir/file-in-the-way'
rm 'sub/file'
[rename-dest (root-commit) 117a32f] Common commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one/file
[rename-dest 6bce8e0] Renamed to destdir
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename one/file => destdir (100%)
Switched to a new branch 'source-conflict'
rm 'one/file'
[source-conflict e305ab4] Conflicts in the way
Author: A U Thor <author@example.com>
3 files changed, 1 deletion(-)
create mode 100644 destdir/foo
create mode 100644 one
delete mode 100644 one/file
ok 20 - setup both rename source and destination involved in D/F conflict
expecting success:
git reset --hard &&
rm -rf dir~* &&
git checkout -q rename-dest^0 &&
test_must_fail git merge --strategy=recursive source-conflict &&
test 1 -eq "$(git ls-files -u | wc -l)" &&
test_must_fail git diff --quiet &&
test -f destdir/foo &&
test -f one &&
test -f destdir~HEAD &&
test "stuff" = "$(cat destdir~HEAD)"
HEAD is now at e305ab4 Conflicts in the way
Merging:
6bce8e0 Renamed to destdir
virtual source-conflict
found 1 common ancestor:
117a32f Common commit
Adding one
Adding destdir/foo
Removing destdir to make room for subdirectory
CONFLICT (rename/delete): one/file deleted in source-conflict and renamed to destdir in HEAD. Version HEAD of destdir left in tree at destdir~HEAD.
Automatic merge failed; fix conflicts and then commit the result.
ok 21 - both rename source and destination involved in D/F conflict
expecting success:
git reset --hard &&
git checkout --orphan rename-two &&
git rm -rf . &&
git clean -fdqx &&
mkdir one &&
mkdir two &&
echo stuff >one/file &&
echo other >two/file &&
git add -A &&
git commit -m "Common commit" &&
git rm -rf one &&
git mv two/file one &&
git commit -m "Rename two/file -> one" &&
git checkout -b rename-one HEAD~1 &&
git rm -rf two &&
git mv one/file two &&
rm -r one &&
git commit -m "Rename one/file -> two"
HEAD is now at 6bce8e0 Renamed to destdir
Switched to a new branch 'rename-two'
rm 'destdir'
[rename-two (root-commit) c3a44ac] Common commit
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 one/file
create mode 100644 two/file
rm 'one/file'
[rename-two 28b47a5] Rename two/file -> one
Author: A U Thor <author@example.com>
2 files changed, 1 deletion(-)
rename two/file => one (100%)
delete mode 100644 one/file
Switched to a new branch 'rename-one'
rm 'two/file'
[rename-one d2bf07d] Rename one/file -> two
Author: A U Thor <author@example.com>
2 files changed, 1 deletion(-)
rename one/file => two (100%)
delete mode 100644 two/file
ok 22 - setup pair rename to parent of other (D/F conflicts)
expecting success:
git checkout -q rename-one^0 &&
mkdir one &&
test_must_fail git merge --strategy=recursive rename-two &&
test 2 -eq "$(git ls-files -u | wc -l)" &&
test 1 -eq "$(git ls-files -u one | wc -l)" &&
test 1 -eq "$(git ls-files -u two | wc -l)" &&
test_must_fail git diff --quiet &&
test 4 -eq $(find . | grep -v .git | wc -l) &&
test -d one &&
test -f one~rename-two &&
test -f two &&
test "other" = $(cat one~rename-two) &&
test "stuff" = $(cat two)
Merging:
d2bf07d Rename one/file -> two
virtual rename-two
found 1 common ancestor:
c3a44ac Common commit
CONFLICT (rename/delete): one/file deleted in rename-two and renamed to two in HEAD. Version HEAD of two left in tree.
CONFLICT (rename/delete): two/file deleted in HEAD and renamed to one in rename-two. Version rename-two of one left in tree at one~rename-two.
Automatic merge failed; fix conflicts and then commit the result.
ok 23 - pair rename to parent of other (D/F conflicts) w/ untracked dir
expecting success:
git reset --hard &&
git clean -fdqx &&
test_must_fail git merge --strategy=recursive rename-two &&
test 2 -eq "$(git ls-files -u | wc -l)" &&
test 1 -eq "$(git ls-files -u one | wc -l)" &&
test 1 -eq "$(git ls-files -u two | wc -l)" &&
test_must_fail git diff --quiet &&
test 3 -eq $(find . | grep -v .git | wc -l) &&
test -f one &&
test -f two &&
test "other" = $(cat one) &&
test "stuff" = $(cat two)
warning: unable to unlink 'one': Is a directory
HEAD is now at d2bf07d Rename one/file -> two
Merging:
d2bf07d Rename one/file -> two
virtual rename-two
found 1 common ancestor:
c3a44ac Common commit
CONFLICT (rename/delete): one/file deleted in rename-two and renamed to two in HEAD. Version HEAD of two left in tree.
CONFLICT (rename/delete): two/file deleted in HEAD and renamed to one in rename-two. Version rename-two of one left in tree.
Automatic merge failed; fix conflicts and then commit the result.
ok 24 - pair rename to parent of other (D/F conflicts) w/ clean start
expecting success:
git reset --hard &&
git checkout --orphan first-rename &&
git rm -rf . &&
git clean -fdqx &&
echo stuff >original &&
git add -A &&
git commit -m "Common commit" &&
mkdir two &&
>two/file &&
git add two/file &&
git mv original one &&
git commit -m "Put two/file in the way, rename to one" &&
git checkout -b second-rename HEAD~1 &&
mkdir one &&
>one/file &&
git add one/file &&
git mv original two &&
git commit -m "Put one/file in the way, rename to two"
HEAD is now at d2bf07d Rename one/file -> two
Switched to a new branch 'first-rename'
rm 'two'
[first-rename (root-commit) 0ddd4fa] Common commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 original
[first-rename 189fb62] Put two/file in the way, rename to one
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename original => one (100%)
create mode 100644 two/file
Switched to a new branch 'second-rename'
[second-rename b02869d] Put one/file in the way, rename to two
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 one/file
rename original => two (100%)
ok 25 - setup rename of one file to two, with directories in the way
expecting success:
git checkout -q first-rename^0 &&
test_must_fail git merge --strategy=recursive second-rename &&
test 5 -eq "$(git ls-files -s | wc -l)" &&
test 3 -eq "$(git ls-files -u | wc -l)" &&
test 1 -eq "$(git ls-files -u one | wc -l)" &&
test 1 -eq "$(git ls-files -u two | wc -l)" &&
test 1 -eq "$(git ls-files -u original | wc -l)" &&
test 2 -eq "$(git ls-files -o | wc -l)" &&
test -f one/file &&
test -f two/file &&
test -f one~HEAD &&
test -f two~second-rename &&
! test -f original
Merging:
189fb62 Put two/file in the way, rename to one
virtual second-rename
found 1 common ancestor:
0ddd4fa Common commit
Adding two/file
Adding one/file
Removing one to make room for subdirectory
CONFLICT (rename/rename): Rename "original"->"one" in branch "HEAD" rename "original"->"two" in "second-rename"
one is a directory in second-rename adding as one~HEAD instead
two is a directory in HEAD adding as two~second-rename instead
Automatic merge failed; fix conflicts and then commit the result.
ok 26 - check handling of differently renamed file with D/F conflicts
expecting success:
git reset --hard &&
git checkout --orphan first-rename-redo &&
git rm -rf . &&
git clean -fdqx &&
echo stuff >original &&
mkdir one two &&
touch one/file two/file &&
git add -A &&
git commit -m "Common commit" &&
git rm -rf one &&
git mv original one &&
git commit -m "Rename to one" &&
git checkout -b second-rename-redo HEAD~1 &&
git rm -rf two &&
git mv original two &&
git commit -m "Rename to two"
warning: unable to unlink 'two': Is a directory
HEAD is now at 189fb62 Put two/file in the way, rename to one
Switched to a new branch 'first-rename-redo'
rm 'one'
rm 'two/file'
[first-rename-redo (root-commit) 44481e4] Common commit
Author: A U Thor <author@example.com>
3 files changed, 1 insertion(+)
create mode 100644 one/file
create mode 100644 original
create mode 100644 two/file
rm 'one/file'
[first-rename-redo 40a5d20] Rename to one
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename original => one (100%)
delete mode 100644 one/file
Switched to a new branch 'second-rename-redo'
rm 'two/file'
[second-rename-redo 7a19832] Rename to two
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename original => two (100%)
delete mode 100644 two/file
ok 27 - setup rename one file to two; directories moving out of the way
expecting success:
git checkout -q first-rename-redo^0 &&
test_must_fail git merge --strategy=recursive second-rename-redo &&
test 3 -eq "$(git ls-files -u | wc -l)" &&
test 1 -eq "$(git ls-files -u one | wc -l)" &&
test 1 -eq "$(git ls-files -u two | wc -l)" &&
test 1 -eq "$(git ls-files -u original | wc -l)" &&
test 0 -eq "$(git ls-files -o | wc -l)" &&
test -f one &&
test -f two &&
! test -f original
Merging:
40a5d20 Rename to one
virtual second-rename-redo
found 1 common ancestor:
44481e4 Common commit
Removing two/file
CONFLICT (rename/rename): Rename "original"->"one" in branch "HEAD" rename "original"->"two" in "second-rename-redo"
Automatic merge failed; fix conflicts and then commit the result.
ok 28 - check handling of differently renamed file with D/F conflicts
expecting success:
git reset --hard &&
git checkout --orphan avoid-unnecessary-update-1 &&
git rm -rf . &&
git clean -fdqx &&
printf "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n" >original &&
git add -A &&
git commit -m "Common commit" &&
git mv original rename &&
echo 11 >>rename &&
git add -u &&
git commit -m "Renamed and modified" &&
git checkout -b merge-branch-1 HEAD~1 &&
echo "random content" >random-file &&
git add -A &&
git commit -m "Random, unrelated changes"
HEAD is now at 40a5d20 Rename to one
Switched to a new branch 'avoid-unnecessary-update-1'
rm 'one'
rm 'two/file'
[avoid-unnecessary-update-1 (root-commit) cf67cb2] Common commit
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 original
[avoid-unnecessary-update-1 19e6eda] Renamed and modified
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rename original => rename (87%)
Switched to a new branch 'merge-branch-1'
[merge-branch-1 4807918] Random, unrelated changes
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 random-file
ok 29 - setup avoid unnecessary update, normal rename
expecting success:
git checkout -q avoid-unnecessary-update-1^0 &&
test-tool chmtime --get =1000000000 rename >expect &&
git merge merge-branch-1 &&
test-tool chmtime --get rename >actual &&
test_cmp expect actual # "rename" should have stayed intact
Merging:
19e6eda Renamed and modified
virtual merge-branch-1
found 1 common ancestor:
cf67cb2 Common commit
Skipped rename (merged same as existing)
Merge made by the 'recursive' strategy.
random-file | 1 +
1 file changed, 1 insertion(+)
create mode 100644 random-file
ok 30 - avoid unnecessary update, normal rename
expecting success:
git reset --hard &&
git checkout --orphan avoid-unnecessary-update-2 &&
git rm -rf . &&
git clean -fdqx &&
mkdir df &&
printf "1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n" >df/file &&
git add -A &&
git commit -m "Common commit" &&
git mv df/file temp &&
rm -rf df &&
git mv temp df &&
echo 11 >>df &&
git add -u &&
git commit -m "Renamed and modified" &&
git checkout -b merge-branch-2 HEAD~1 &&
>unrelated-change &&
git add unrelated-change &&
git commit -m "Only unrelated changes"
HEAD is now at 9f2205f Merge branch 'merge-branch-1' into HEAD
Switched to a new branch 'avoid-unnecessary-update-2'
rm 'random-file'
rm 'rename'
[avoid-unnecessary-update-2 (root-commit) ccb210b] Common commit
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 df/file
[avoid-unnecessary-update-2 8559db5] Renamed and modified
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rename df/file => df (87%)
Switched to a new branch 'merge-branch-2'
[merge-branch-2 d5ea41d] Only unrelated changes
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 unrelated-change
ok 31 - setup to test avoiding unnecessary update, with D/F conflict
expecting success:
git checkout -q avoid-unnecessary-update-2^0 &&
test-tool chmtime --get =1000000000 df >expect &&
git merge merge-branch-2 &&
test-tool chmtime --get df >actual &&
test_cmp expect actual # "df" should have stayed intact
Merging:
8559db5 Renamed and modified
virtual merge-branch-2
found 1 common ancestor:
ccb210b Common commit
Skipped df (merged same as existing)
Merge made by the 'recursive' strategy.
unrelated-change | 0
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 unrelated-change
ok 32 - avoid unnecessary update, with D/F conflict
expecting success:
git rm -rf . &&
git clean -fdqx &&
rm -rf .git &&
git init &&
>irrelevant &&
mkdir df &&
>df/file &&
git add -A &&
git commit -mA &&
git checkout -b side &&
git rm -rf df &&
git commit -mB &&
git checkout master &&
git rm -rf df &&
echo bla >df &&
git add -A &&
git commit -m "Add a newfile"
rm 'df'
rm 'unrelated-change'
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6022-merge-rename/.git/
[master (root-commit) 23f326b] A
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 df/file
create mode 100644 irrelevant
Switched to a new branch 'side'
rm 'df/file'
[side 997688d] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 df/file
Switched to branch 'master'
rm 'df/file'
[master ff27f5e] Add a newfile
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 100644 df
delete mode 100644 df/file
ok 33 - setup avoid unnecessary update, dir->(file,nothing)
expecting success:
git checkout -q master^0 &&
test-tool chmtime --get =1000000000 df >expect &&
git merge side &&
test-tool chmtime --get df >actual &&
test_cmp expect actual # "df" should have stayed intact
Merging:
ff27f5e Add a newfile
virtual side
found 1 common ancestor:
23f326b A
Adding df
Merge made by the 'recursive' strategy.
ok 34 - avoid unnecessary update, dir->(file,nothing)
expecting success:
git rm -rf . &&
git clean -fdqx &&
rm -rf .git &&
git init &&
>irrelevant &&
>file &&
git add -A &&
git commit -mA &&
git checkout -b side &&
git rm -f file &&
git commit -m "Delete file" &&
git checkout master &&
echo bla >file &&
git add -A &&
git commit -m "Modify file"
rm 'df'
rm 'irrelevant'
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6022-merge-rename/.git/
[master (root-commit) 1bd7f7f] A
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
create mode 100644 irrelevant
Switched to a new branch 'side'
rm 'file'
[side ee82ad2] Delete file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 file
Switched to branch 'master'
[master 833417d] Modify file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 35 - setup avoid unnecessary update, modify/delete
expecting success:
git checkout -q master^0 &&
test-tool chmtime --get =1000000000 file >expect &&
test_must_fail git merge side &&
test-tool chmtime --get file >actual &&
test_cmp expect actual # "file" should have stayed intact
Merging:
833417d Modify file
virtual side
found 1 common ancestor:
1bd7f7f A
CONFLICT (modify/delete): file deleted in side and modified in HEAD. Version HEAD of file left in tree.
Automatic merge failed; fix conflicts and then commit the result.
ok 36 - avoid unnecessary update, modify/delete
expecting success:
git rm -rf . &&
git clean -fdqx &&
rm -rf .git &&
git init &&
printf "1\n2\n3\n4\n5\n6\n7\n8\n" >file &&
git add -A &&
git commit -mA &&
git checkout -b side &&
cp file newfile &&
git add -A &&
git commit -m "Add file copy" &&
git checkout master &&
git mv file newfile &&
git commit -m "Rename file"
rm 'file'
rm 'file'
rm 'irrelevant'
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6022-merge-rename/.git/
[master (root-commit) c897ab3] A
Author: A U Thor <author@example.com>
1 file changed, 8 insertions(+)
create mode 100644 file
Switched to a new branch 'side'
[side 7306b04] Add file copy
Author: A U Thor <author@example.com>
1 file changed, 8 insertions(+)
create mode 100644 newfile
Switched to branch 'master'
[master 3301fc8] Rename file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename file => newfile (100%)
ok 37 - setup avoid unnecessary update, rename/add-dest
expecting success:
git checkout -q master^0 &&
test-tool chmtime --get =1000000000 newfile >expect &&
git merge side &&
test-tool chmtime --get newfile >actual &&
test_cmp expect actual # "file" should have stayed intact
Merging:
3301fc8 Rename file
virtual side
found 1 common ancestor:
c897ab3 A
Merge made by the 'recursive' strategy.
ok 38 - avoid unnecessary update, rename/add-dest
expecting success:
git reset --hard &&
git checkout --orphan rename-plus-small-change &&
git rm -rf . &&
git clean -fdqx &&
echo ORIGINAL >file &&
git add file &&
test_tick &&
git commit -m Initial &&
git checkout -b rename_branch &&
git mv file renamed_file &&
git commit -m Rename &&
git checkout rename-plus-small-change &&
echo NEW-VERSION >file &&
git commit -a -m Reformat
HEAD is now at eee0b74 Merge branch 'side' into HEAD
Switched to a new branch 'rename-plus-small-change'
rm 'newfile'
[rename-plus-small-change (root-commit) e44eadc] Initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Switched to a new branch 'rename_branch'
[rename_branch f706812] Rename
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename file => renamed_file (100%)
Switched to branch 'rename-plus-small-change'
[rename-plus-small-change 068ab66] Reformat
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 39 - setup merge of rename + small change
expecting success:
git merge rename_branch &&
test 1 -eq $(git ls-files -s | wc -l) &&
test 0 -eq $(git ls-files -o | wc -l) &&
test $(git rev-parse HEAD:renamed_file) = $(git rev-parse HEAD~1:file)
Merging:
068ab66 Reformat
virtual rename_branch
found 1 common ancestor:
e44eadc Initial
Merge made by the 'recursive' strategy.
file => renamed_file | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename file => renamed_file (100%)
ok 40 - merge rename + small change
expecting success:
git rm -rf . &&
git clean -fdqx &&
rm -rf .git &&
git init &&
printf "1\n2\n3\n4\n5\n6\n7\n8\n" >original_file &&
git add original_file &&
git commit -mA &&
git checkout -b rename &&
echo 9 >>original_file &&
git add original_file &&
git mv original_file renamed_file &&
git commit -mB &&
git checkout master &&
echo 8.5 >>original_file &&
git add original_file &&
git commit -mC
rm 'renamed_file'
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6022-merge-rename/.git/
[master (root-commit) 4847e8a] A
Author: A U Thor <author@example.com>
1 file changed, 8 insertions(+)
create mode 100644 original_file
Switched to a new branch 'rename'
[rename e9adddb] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rename original_file => renamed_file (88%)
Switched to branch 'master'
[master 0487bb6] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 41 - setup for use of extended merge markers
expecting success:
git checkout rename^0 &&
test_must_fail git merge -s recursive master^0 &&
test_cmp expected renamed_file
Note: switching to 'rename^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at e9adddb B
Merging:
e9adddb B
virtual master^0
found 1 common ancestor:
4847e8a A
Auto-merging renamed_file
CONFLICT (content): Merge conflict in renamed_file
Automatic merge failed; fix conflicts and then commit the result.
ok 42 - merge master into rename has correct extended markers
expecting success:
git reset --hard &&
git checkout master^0 &&
test_must_fail git merge -s recursive rename^0 &&
test_cmp expected renamed_file
HEAD is now at e9adddb B
Previous HEAD position was e9adddb B
HEAD is now at 0487bb6 C
Merging:
0487bb6 C
virtual rename^0
found 1 common ancestor:
4847e8a A
Auto-merging renamed_file
CONFLICT (content): Merge conflict in renamed_file
Automatic merge failed; fix conflicts and then commit the result.
ok 43 - merge rename into master has correct extended markers
expecting success:
git rm -rf . &&
git clean -fdqx &&
rm -rf .git &&
git init &&
> irrelevant_file &&
printf "1\n2\n3\n4\n5\n6\n7\n8\n" >original_file &&
git add irrelevant_file original_file &&
git commit -mA &&
git checkout -b rename &&
git mv original_file renamed_file &&
git commit -mB &&
git checkout master &&
git rm original_file &&
git commit -mC
rm 'renamed_file'
rm 'renamed_file'
rm 'renamed_file'
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6022-merge-rename/.git/
[master (root-commit) e476651] A
Author: A U Thor <author@example.com>
2 files changed, 8 insertions(+)
create mode 100644 irrelevant_file
create mode 100644 original_file
Switched to a new branch 'rename'
[rename 951e2d3] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename original_file => renamed_file (100%)
Switched to branch 'master'
rm 'original_file'
[master 52b2874] C
Author: A U Thor <author@example.com>
1 file changed, 8 deletions(-)
delete mode 100644 original_file
ok 44 - setup spurious "refusing to lose untracked" message
expecting success:
git checkout master^0 &&
test_must_fail git merge rename^0 2>errors.txt &&
! grep "refusing to lose untracked file" errors.txt
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 52b2874 C
Merging:
52b2874 C
virtual rename^0
found 1 common ancestor:
e476651 A
CONFLICT (rename/delete): original_file deleted in HEAD and renamed to renamed_file in rename^0. Version rename^0 of renamed_file left in tree.
Automatic merge failed; fix conflicts and then commit the result.
ok 45 - no spurious "refusing to lose untracked" message
expecting success:
git checkout -f -b empty-base &&
>empty1 &&
git add empty1 &&
git commit -m base &&
echo content >empty1 &&
git add empty1 &&
git commit -m fill &&
git checkout -b empty-topic HEAD^ &&
git mv empty1 empty2 &&
git commit -m rename &&
test_must_fail git merge empty-base &&
test_must_be_empty empty2
Switched to a new branch 'empty-base'
[empty-base a940ee2] base
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 empty1
[empty-base d42ce4d] fill
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to a new branch 'empty-topic'
[empty-topic ab32619] rename
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename empty1 => empty2 (100%)
Merging:
ab32619 rename
virtual empty-base
found 1 common ancestor:
a940ee2 base
CONFLICT (modify/delete): empty1 deleted in HEAD and modified in empty-base. Version empty-base of empty1 left in tree.
Automatic merge failed; fix conflicts and then commit the result.
ok 46 - do not follow renames for empty files
# passed all 46 test(s)
1..46
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6033-merge-crlf.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6033-merge-crlf/.git/
expecting success:
git config core.autocrlf true &&
echo foo | append_cr >file &&
git add file &&
git commit -m "Initial" &&
git tag initial &&
git branch side &&
echo line from a | append_cr >file &&
git commit -m "add line from a" file &&
git tag a &&
git checkout side &&
echo line from b | append_cr >file &&
git commit -m "add line from b" file &&
git tag b &&
git checkout master
[master (root-commit) e268f5b] Initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 991945e] add line from a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'side'
[side 1e75c69] add line from b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'master'
ok 1 - setup
expecting success:
git reset --hard initial &&
git merge side -s ours &&
cat file | remove_cr | append_cr >file.temp &&
test_cmp file file.temp
HEAD is now at e268f5b Initial
Merge made by the 'ours' strategy.
ok 2 - Check "ours" is CRLF
expecting success:
git reset --hard a &&
test_must_fail git merge side &&
cat file | remove_cr | append_cr >file.temp &&
test_cmp file file.temp
HEAD is now at 991945e add line from a
Merging:
991945e add line from a
virtual side
found 1 common ancestor:
e268f5b Initial
Auto-merging file
CONFLICT (content): Merge conflict in file
Automatic merge failed; fix conflicts and then commit the result.
ok 3 - Check that conflict file is CRLF
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6034-merge-rename-nocruft.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6034-merge-rename-nocruft/.git/
expecting success:
cat >A <<\EOF &&
a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
c cccccccccccccccccccccccccccccccccccccccccccccccc
d dddddddddddddddddddddddddddddddddddddddddddddddd
e eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
f ffffffffffffffffffffffffffffffffffffffffffffffff
g gggggggggggggggggggggggggggggggggggggggggggggggg
h hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
i iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
j jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
k kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
l llllllllllllllllllllllllllllllllllllllllllllllll
m mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
n nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
o oooooooooooooooooooooooooooooooooooooooooooooooo
EOF
cat >M <<\EOF &&
A AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
B BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
D DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
E EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
F FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
G GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
H HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
I IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
J JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ
K KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
L LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
M MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
N NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
O OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
EOF
git add A M &&
git commit -m "initial has A and M" &&
git branch white &&
git branch red &&
git branch blue &&
git checkout white &&
sed -e "/^g /s/.*/g : white changes a line/" <A >B &&
sed -e "/^G /s/.*/G : colored branch changes a line/" <M >N &&
rm -f A M &&
git update-index --add --remove A B M N &&
git commit -m "white renames A->B, M->N" &&
git checkout red &&
echo created by red >R &&
git update-index --add R &&
git commit -m "red creates R" &&
git checkout blue &&
sed -e "/^o /s/.*/g : blue changes a line/" <A >B &&
rm -f A &&
mv B A &&
git update-index A &&
git commit -m "blue modify A" &&
git checkout master
[master (root-commit) 05885c6] initial has A and M
Author: A U Thor <author@example.com>
2 files changed, 30 insertions(+)
create mode 100644 A
create mode 100644 M
Switched to branch 'white'
[white ef222a1] white renames A->B, M->N
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
rename A => B (93%)
rename M => N (93%)
Switched to branch 'red'
[red 7633bc9] red creates R
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 R
Switched to branch 'blue'
[blue 19b3380] blue modify A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'master'
ok 1 - setup
expecting success:
git checkout -b red-white red &&
git merge white &&
git write-tree &&
test_path_is_file B &&
test_path_is_file N &&
test_path_is_file R &&
test_path_is_missing A &&
test_path_is_missing M
Switched to a new branch 'red-white'
Merging:
7633bc9 red creates R
virtual white
found 1 common ancestor:
05885c6 initial has A and M
Merge made by the 'recursive' strategy.
A => B | 2 +-
M => N | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
rename A => B (93%)
rename M => N (93%)
2f1341e5f32ecb7f45a35d122e62999a76d463cf
ok 2 - merge white into red (A->B,M->N)
expecting success:
git checkout -b white-blue white &&
echo dirty >A &&
git merge blue &&
git write-tree &&
test_path_is_file A &&
echo dirty >expect &&
test_cmp expect A &&
test_path_is_file B &&
test_path_is_file N &&
test_path_is_missing M
Switched to a new branch 'white-blue'
Merging:
ef222a1 white renames A->B, M->N
virtual blue
found 1 common ancestor:
05885c6 initial has A and M
Skipped N (merged same as existing)
Auto-merging B
Merge made by the 'recursive' strategy.
B | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
1db6abaa095ec16043333967f8d0dbaa01cdf029
ok 3 - merge blue into white (A->B, mod A, A untracked)
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6032-merge-large-rename.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6032-merge-large-rename/.git/
expecting success:
touch file &&
git add . &&
git commit -m initial &&
git tag initial
[master (root-commit) 7e701c0] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
ok 1 - setup (initial)
expecting success:
n=5 &&
expect=ok &&
git checkout -f master &&
test_might_fail git branch -D test$n &&
git reset --hard initial &&
for i in $(count $n); do
make_text $i initial initial >$i
done &&
git add . &&
git commit -m add=$n &&
for i in $(count $n); do
make_text $i changed initial >$i
done &&
git commit -a -m change=$n &&
git checkout -b test$n HEAD^ &&
for i in $(count $n); do
git rm $i
make_text $i initial changed >$i.moved
done &&
git add . &&
git commit -m change+rename=$n &&
case "$expect" in
ok) git merge master ;;
*) test_must_fail git merge master ;;
esac
Already on 'master'
error: branch 'test5' not found.
HEAD is now at 7e701c0 initial
[master f871c30] add=5
Author: A U Thor <author@example.com>
5 files changed, 110 insertions(+)
create mode 100644 1
create mode 100644 2
create mode 100644 3
create mode 100644 4
create mode 100644 5
[master 83976e9] change=5
Author: A U Thor <author@example.com>
5 files changed, 5 insertions(+), 5 deletions(-)
Switched to a new branch 'test5'
rm '1'
rm '2'
rm '3'
rm '4'
rm '5'
[test5 d914ebc] change+rename=5
Author: A U Thor <author@example.com>
5 files changed, 5 insertions(+), 5 deletions(-)
rename 1 => 1.moved (91%)
rename 2 => 2.moved (91%)
rename 3 => 3.moved (91%)
rename 4 => 4.moved (91%)
rename 5 => 5.moved (91%)
Merging:
d914ebc change+rename=5
virtual master
found 1 common ancestor:
f871c30 add=5
Auto-merging 5.moved
Auto-merging 4.moved
Auto-merging 3.moved
Auto-merging 2.moved
Auto-merging 1.moved
Merge made by the 'recursive' strategy.
1.moved | 2 +-
2.moved | 2 +-
3.moved | 2 +-
4.moved | 2 +-
5.moved | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
ok 2 - rename (5, ok)
expecting success:
git config diff.renamelimit 4
ok 3 - set diff.renamelimit to 4
expecting success:
n=4 &&
expect=ok &&
git checkout -f master &&
test_might_fail git branch -D test$n &&
git reset --hard initial &&
for i in $(count $n); do
make_text $i initial initial >$i
done &&
git add . &&
git commit -m add=$n &&
for i in $(count $n); do
make_text $i changed initial >$i
done &&
git commit -a -m change=$n &&
git checkout -b test$n HEAD^ &&
for i in $(count $n); do
git rm $i
make_text $i initial changed >$i.moved
done &&
git add . &&
git commit -m change+rename=$n &&
case "$expect" in
ok) git merge master ;;
*) test_must_fail git merge master ;;
esac
Switched to branch 'master'
error: branch 'test4' not found.
HEAD is now at 7e701c0 initial
[master cfc3211] add=4
Author: A U Thor <author@example.com>
4 files changed, 88 insertions(+)
create mode 100644 1
create mode 100644 2
create mode 100644 3
create mode 100644 4
[master 3e78a18] change=4
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+), 4 deletions(-)
Switched to a new branch 'test4'
rm '1'
rm '2'
rm '3'
rm '4'
[test4 0d22e63] change+rename=4
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+), 4 deletions(-)
rename 1 => 1.moved (91%)
rename 2 => 2.moved (91%)
rename 3 => 3.moved (91%)
rename 4 => 4.moved (91%)
Merging:
0d22e63 change+rename=4
virtual master
found 1 common ancestor:
cfc3211 add=4
Auto-merging 4.moved
Auto-merging 3.moved
Auto-merging 2.moved
Auto-merging 1.moved
Merge made by the 'recursive' strategy.
1.moved | 2 +-
2.moved | 2 +-
3.moved | 2 +-
4.moved | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
ok 4 - rename (4, ok)
expecting success:
n=5 &&
expect=fail &&
git checkout -f master &&
test_might_fail git branch -D test$n &&
git reset --hard initial &&
for i in $(count $n); do
make_text $i initial initial >$i
done &&
git add . &&
git commit -m add=$n &&
for i in $(count $n); do
make_text $i changed initial >$i
done &&
git commit -a -m change=$n &&
git checkout -b test$n HEAD^ &&
for i in $(count $n); do
git rm $i
make_text $i initial changed >$i.moved
done &&
git add . &&
git commit -m change+rename=$n &&
case "$expect" in
ok) git merge master ;;
*) test_must_fail git merge master ;;
esac
Switched to branch 'master'
Deleted branch test5 (was cfcf6ed).
HEAD is now at 7e701c0 initial
[master 7d745f6] add=5
Author: A U Thor <author@example.com>
5 files changed, 110 insertions(+)
create mode 100644 1
create mode 100644 2
create mode 100644 3
create mode 100644 4
create mode 100644 5
[master 57ee49b] change=5
Author: A U Thor <author@example.com>
5 files changed, 5 insertions(+), 5 deletions(-)
Switched to a new branch 'test5'
rm '1'
rm '2'
rm '3'
rm '4'
rm '5'
[test5 16dfedd] change+rename=5
Author: A U Thor <author@example.com>
5 files changed, 5 insertions(+), 5 deletions(-)
rename 1 => 1.moved (91%)
rename 2 => 2.moved (91%)
rename 3 => 3.moved (91%)
rename 4 => 4.moved (91%)
rename 5 => 5.moved (91%)
Merging:
16dfedd change+rename=5
virtual master
found 1 common ancestor:
7d745f6 add=5
CONFLICT (modify/delete): 5 deleted in HEAD and modified in master. Version master of 5 left in tree.
CONFLICT (modify/delete): 4 deleted in HEAD and modified in master. Version master of 4 left in tree.
CONFLICT (modify/delete): 3 deleted in HEAD and modified in master. Version master of 3 left in tree.
CONFLICT (modify/delete): 2 deleted in HEAD and modified in master. Version master of 2 left in tree.
CONFLICT (modify/delete): 1 deleted in HEAD and modified in master. Version master of 1 left in tree.
warning: inexact rename detection was skipped due to too many files.
warning: you may want to set your merge.renamelimit variable to at least 5 and retry the command.
Automatic merge failed; fix conflicts and then commit the result.
ok 5 - rename (5, fail)
expecting success:
git config merge.renamelimit 5
ok 6 - set merge.renamelimit to 5
expecting success:
n=5 &&
expect=ok &&
git checkout -f master &&
test_might_fail git branch -D test$n &&
git reset --hard initial &&
for i in $(count $n); do
make_text $i initial initial >$i
done &&
git add . &&
git commit -m add=$n &&
for i in $(count $n); do
make_text $i changed initial >$i
done &&
git commit -a -m change=$n &&
git checkout -b test$n HEAD^ &&
for i in $(count $n); do
git rm $i
make_text $i initial changed >$i.moved
done &&
git add . &&
git commit -m change+rename=$n &&
case "$expect" in
ok) git merge master ;;
*) test_must_fail git merge master ;;
esac
Switched to branch 'master'
Deleted branch test5 (was 16dfedd).
HEAD is now at 7e701c0 initial
[master 7d745f6] add=5
Author: A U Thor <author@example.com>
5 files changed, 110 insertions(+)
create mode 100644 1
create mode 100644 2
create mode 100644 3
create mode 100644 4
create mode 100644 5
[master 57ee49b] change=5
Author: A U Thor <author@example.com>
5 files changed, 5 insertions(+), 5 deletions(-)
Switched to a new branch 'test5'
rm '1'
rm '2'
rm '3'
rm '4'
rm '5'
[test5 16dfedd] change+rename=5
Author: A U Thor <author@example.com>
5 files changed, 5 insertions(+), 5 deletions(-)
rename 1 => 1.moved (91%)
rename 2 => 2.moved (91%)
rename 3 => 3.moved (91%)
rename 4 => 4.moved (91%)
rename 5 => 5.moved (91%)
Merging:
16dfedd change+rename=5
virtual master
found 1 common ancestor:
7d745f6 add=5
Auto-merging 5.moved
Auto-merging 4.moved
Auto-merging 3.moved
Auto-merging 2.moved
Auto-merging 1.moved
Merge made by the 'recursive' strategy.
1.moved | 2 +-
2.moved | 2 +-
3.moved | 2 +-
4.moved | 2 +-
5.moved | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
ok 7 - rename (5, ok)
expecting success:
n=6 &&
expect=fail &&
git checkout -f master &&
test_might_fail git branch -D test$n &&
git reset --hard initial &&
for i in $(count $n); do
make_text $i initial initial >$i
done &&
git add . &&
git commit -m add=$n &&
for i in $(count $n); do
make_text $i changed initial >$i
done &&
git commit -a -m change=$n &&
git checkout -b test$n HEAD^ &&
for i in $(count $n); do
git rm $i
make_text $i initial changed >$i.moved
done &&
git add . &&
git commit -m change+rename=$n &&
case "$expect" in
ok) git merge master ;;
*) test_must_fail git merge master ;;
esac
Switched to branch 'master'
error: branch 'test6' not found.
HEAD is now at 7e701c0 initial
[master 0e27615] add=6
Author: A U Thor <author@example.com>
6 files changed, 132 insertions(+)
create mode 100644 1
create mode 100644 2
create mode 100644 3
create mode 100644 4
create mode 100644 5
create mode 100644 6
[master 4157f3e] change=6
Author: A U Thor <author@example.com>
6 files changed, 6 insertions(+), 6 deletions(-)
Switched to a new branch 'test6'
rm '1'
rm '2'
rm '3'
rm '4'
rm '5'
rm '6'
[test6 70ca7d5] change+rename=6
Author: A U Thor <author@example.com>
6 files changed, 6 insertions(+), 6 deletions(-)
rename 1 => 1.moved (91%)
rename 2 => 2.moved (91%)
rename 3 => 3.moved (91%)
rename 4 => 4.moved (91%)
rename 5 => 5.moved (91%)
rename 6 => 6.moved (91%)
Merging:
70ca7d5 change+rename=6
virtual master
found 1 common ancestor:
0e27615 add=6
CONFLICT (modify/delete): 6 deleted in HEAD and modified in master. Version master of 6 left in tree.
CONFLICT (modify/delete): 5 deleted in HEAD and modified in master. Version master of 5 left in tree.
CONFLICT (modify/delete): 4 deleted in HEAD and modified in master. Version master of 4 left in tree.
CONFLICT (modify/delete): 3 deleted in HEAD and modified in master. Version master of 3 left in tree.
CONFLICT (modify/delete): 2 deleted in HEAD and modified in master. Version master of 2 left in tree.
CONFLICT (modify/delete): 1 deleted in HEAD and modified in master. Version master of 1 left in tree.
warning: inexact rename detection was skipped due to too many files.
warning: you may want to set your merge.renamelimit variable to at least 6 and retry the command.
Automatic merge failed; fix conflicts and then commit the result.
ok 8 - rename (6, fail)
expecting success:
git config --unset merge.renamelimit &&
git config --unset diff.renamelimit &&
git reset --hard initial &&
for i in $(count 200); do
make_text foo bar baz >$i
done &&
git add . &&
git commit -m create-files &&
git branch simple-change &&
git checkout -b simple-rename &&
mkdir builtin &&
git mv [0-9]* builtin/ &&
git commit -m renamed &&
git checkout simple-change &&
>unrelated-change &&
git add unrelated-change &&
git commit -m unrelated-change
HEAD is now at 7e701c0 initial
[test6 145d1a1] create-files
Author: A U Thor <author@example.com>
200 files changed, 4400 insertions(+)
create mode 100644 1
create mode 100644 10
create mode 100644 100
create mode 100644 101
create mode 100644 102
create mode 100644 103
create mode 100644 104
create mode 100644 105
create mode 100644 106
create mode 100644 107
create mode 100644 108
create mode 100644 109
create mode 100644 11
create mode 100644 110
create mode 100644 111
create mode 100644 112
create mode 100644 113
create mode 100644 114
create mode 100644 115
create mode 100644 116
create mode 100644 117
create mode 100644 118
create mode 100644 119
create mode 100644 12
create mode 100644 120
create mode 100644 121
create mode 100644 122
create mode 100644 123
create mode 100644 124
create mode 100644 125
create mode 100644 126
create mode 100644 127
create mode 100644 128
create mode 100644 129
create mode 100644 13
create mode 100644 130
create mode 100644 131
create mode 100644 132
create mode 100644 133
create mode 100644 134
create mode 100644 135
create mode 100644 136
create mode 100644 137
create mode 100644 138
create mode 100644 139
create mode 100644 14
create mode 100644 140
create mode 100644 141
create mode 100644 142
create mode 100644 143
create mode 100644 144
create mode 100644 145
create mode 100644 146
create mode 100644 147
create mode 100644 148
create mode 100644 149
create mode 100644 15
create mode 100644 150
create mode 100644 151
create mode 100644 152
create mode 100644 153
create mode 100644 154
create mode 100644 155
create mode 100644 156
create mode 100644 157
create mode 100644 158
create mode 100644 159
create mode 100644 16
create mode 100644 160
create mode 100644 161
create mode 100644 162
create mode 100644 163
create mode 100644 164
create mode 100644 165
create mode 100644 166
create mode 100644 167
create mode 100644 168
create mode 100644 169
create mode 100644 17
create mode 100644 170
create mode 100644 171
create mode 100644 172
create mode 100644 173
create mode 100644 174
create mode 100644 175
create mode 100644 176
create mode 100644 177
create mode 100644 178
create mode 100644 179
create mode 100644 18
create mode 100644 180
create mode 100644 181
create mode 100644 182
create mode 100644 183
create mode 100644 184
create mode 100644 185
create mode 100644 186
create mode 100644 187
create mode 100644 188
create mode 100644 189
create mode 100644 19
create mode 100644 190
create mode 100644 191
create mode 100644 192
create mode 100644 193
create mode 100644 194
create mode 100644 195
create mode 100644 196
create mode 100644 197
create mode 100644 198
create mode 100644 199
create mode 100644 2
create mode 100644 20
create mode 100644 200
create mode 100644 21
create mode 100644 22
create mode 100644 23
create mode 100644 24
create mode 100644 25
create mode 100644 26
create mode 100644 27
create mode 100644 28
create mode 100644 29
create mode 100644 3
create mode 100644 30
create mode 100644 31
create mode 100644 32
create mode 100644 33
create mode 100644 34
create mode 100644 35
create mode 100644 36
create mode 100644 37
create mode 100644 38
create mode 100644 39
create mode 100644 4
create mode 100644 40
create mode 100644 41
create mode 100644 42
create mode 100644 43
create mode 100644 44
create mode 100644 45
create mode 100644 46
create mode 100644 47
create mode 100644 48
create mode 100644 49
create mode 100644 5
create mode 100644 50
create mode 100644 51
create mode 100644 52
create mode 100644 53
create mode 100644 54
create mode 100644 55
create mode 100644 56
create mode 100644 57
create mode 100644 58
create mode 100644 59
create mode 100644 6
create mode 100644 60
create mode 100644 61
create mode 100644 62
create mode 100644 63
create mode 100644 64
create mode 100644 65
create mode 100644 66
create mode 100644 67
create mode 100644 68
create mode 100644 69
create mode 100644 7
create mode 100644 70
create mode 100644 71
create mode 100644 72
create mode 100644 73
create mode 100644 74
create mode 100644 75
create mode 100644 76
create mode 100644 77
create mode 100644 78
create mode 100644 79
create mode 100644 8
create mode 100644 80
create mode 100644 81
create mode 100644 82
create mode 100644 83
create mode 100644 84
create mode 100644 85
create mode 100644 86
create mode 100644 87
create mode 100644 88
create mode 100644 89
create mode 100644 9
create mode 100644 90
create mode 100644 91
create mode 100644 92
create mode 100644 93
create mode 100644 94
create mode 100644 95
create mode 100644 96
create mode 100644 97
create mode 100644 98
create mode 100644 99
Switched to a new branch 'simple-rename'
[simple-rename 147cb73] renamed
Author: A U Thor <author@example.com>
200 files changed, 0 insertions(+), 0 deletions(-)
rename 1 => builtin/1 (100%)
rename 10 => builtin/10 (100%)
rename 100 => builtin/100 (100%)
rename 101 => builtin/101 (100%)
rename 102 => builtin/102 (100%)
rename 103 => builtin/103 (100%)
rename 104 => builtin/104 (100%)
rename 105 => builtin/105 (100%)
rename 106 => builtin/106 (100%)
rename 107 => builtin/107 (100%)
rename 108 => builtin/108 (100%)
rename 109 => builtin/109 (100%)
rename 11 => builtin/11 (100%)
rename 110 => builtin/110 (100%)
rename 111 => builtin/111 (100%)
rename 112 => builtin/112 (100%)
rename 113 => builtin/113 (100%)
rename 114 => builtin/114 (100%)
rename 115 => builtin/115 (100%)
rename 116 => builtin/116 (100%)
rename 117 => builtin/117 (100%)
rename 118 => builtin/118 (100%)
rename 119 => builtin/119 (100%)
rename 12 => builtin/12 (100%)
rename 120 => builtin/120 (100%)
rename 121 => builtin/121 (100%)
rename 122 => builtin/122 (100%)
rename 123 => builtin/123 (100%)
rename 124 => builtin/124 (100%)
rename 125 => builtin/125 (100%)
rename 126 => builtin/126 (100%)
rename 127 => builtin/127 (100%)
rename 128 => builtin/128 (100%)
rename 129 => builtin/129 (100%)
rename 13 => builtin/13 (100%)
rename 130 => builtin/130 (100%)
rename 131 => builtin/131 (100%)
rename 132 => builtin/132 (100%)
rename 133 => builtin/133 (100%)
rename 134 => builtin/134 (100%)
rename 135 => builtin/135 (100%)
rename 136 => builtin/136 (100%)
rename 137 => builtin/137 (100%)
rename 138 => builtin/138 (100%)
rename 139 => builtin/139 (100%)
rename 14 => builtin/14 (100%)
rename 140 => builtin/140 (100%)
rename 141 => builtin/141 (100%)
rename 142 => builtin/142 (100%)
rename 143 => builtin/143 (100%)
rename 144 => builtin/144 (100%)
rename 145 => builtin/145 (100%)
rename 146 => builtin/146 (100%)
rename 147 => builtin/147 (100%)
rename 148 => builtin/148 (100%)
rename 149 => builtin/149 (100%)
rename 15 => builtin/15 (100%)
rename 150 => builtin/150 (100%)
rename 151 => builtin/151 (100%)
rename 152 => builtin/152 (100%)
rename 153 => builtin/153 (100%)
rename 154 => builtin/154 (100%)
rename 155 => builtin/155 (100%)
rename 156 => builtin/156 (100%)
rename 157 => builtin/157 (100%)
rename 158 => builtin/158 (100%)
rename 159 => builtin/159 (100%)
rename 16 => builtin/16 (100%)
rename 160 => builtin/160 (100%)
rename 161 => builtin/161 (100%)
rename 162 => builtin/162 (100%)
rename 163 => builtin/163 (100%)
rename 164 => builtin/164 (100%)
rename 165 => builtin/165 (100%)
rename 166 => builtin/166 (100%)
rename 167 => builtin/167 (100%)
rename 168 => builtin/168 (100%)
rename 169 => builtin/169 (100%)
rename 17 => builtin/17 (100%)
rename 170 => builtin/170 (100%)
rename 171 => builtin/171 (100%)
rename 172 => builtin/172 (100%)
rename 173 => builtin/173 (100%)
rename 174 => builtin/174 (100%)
rename 175 => builtin/175 (100%)
rename 176 => builtin/176 (100%)
rename 177 => builtin/177 (100%)
rename 178 => builtin/178 (100%)
rename 179 => builtin/179 (100%)
rename 18 => builtin/18 (100%)
rename 180 => builtin/180 (100%)
rename 181 => builtin/181 (100%)
rename 182 => builtin/182 (100%)
rename 183 => builtin/183 (100%)
rename 184 => builtin/184 (100%)
rename 185 => builtin/185 (100%)
rename 186 => builtin/186 (100%)
rename 187 => builtin/187 (100%)
rename 188 => builtin/188 (100%)
rename 189 => builtin/189 (100%)
rename 19 => builtin/19 (100%)
rename 190 => builtin/190 (100%)
rename 191 => builtin/191 (100%)
rename 192 => builtin/192 (100%)
rename 193 => builtin/193 (100%)
rename 194 => builtin/194 (100%)
rename 195 => builtin/195 (100%)
rename 196 => builtin/196 (100%)
rename 197 => builtin/197 (100%)
rename 198 => builtin/198 (100%)
rename 199 => builtin/199 (100%)
rename 2 => builtin/2 (100%)
rename 20 => builtin/20 (100%)
rename 200 => builtin/200 (100%)
rename 21 => builtin/21 (100%)
rename 22 => builtin/22 (100%)
rename 23 => builtin/23 (100%)
rename 24 => builtin/24 (100%)
rename 25 => builtin/25 (100%)
rename 26 => builtin/26 (100%)
rename 27 => builtin/27 (100%)
rename 28 => builtin/28 (100%)
rename 29 => builtin/29 (100%)
rename 3 => builtin/3 (100%)
rename 30 => builtin/30 (100%)
rename 31 => builtin/31 (100%)
rename 32 => builtin/32 (100%)
rename 33 => builtin/33 (100%)
rename 34 => builtin/34 (100%)
rename 35 => builtin/35 (100%)
rename 36 => builtin/36 (100%)
rename 37 => builtin/37 (100%)
rename 38 => builtin/38 (100%)
rename 39 => builtin/39 (100%)
rename 4 => builtin/4 (100%)
rename 40 => builtin/40 (100%)
rename 41 => builtin/41 (100%)
rename 42 => builtin/42 (100%)
rename 43 => builtin/43 (100%)
rename 44 => builtin/44 (100%)
rename 45 => builtin/45 (100%)
rename 46 => builtin/46 (100%)
rename 47 => builtin/47 (100%)
rename 48 => builtin/48 (100%)
rename 49 => builtin/49 (100%)
rename 5 => builtin/5 (100%)
rename 50 => builtin/50 (100%)
rename 51 => builtin/51 (100%)
rename 52 => builtin/52 (100%)
rename 53 => builtin/53 (100%)
rename 54 => builtin/54 (100%)
rename 55 => builtin/55 (100%)
rename 56 => builtin/56 (100%)
rename 57 => builtin/57 (100%)
rename 58 => builtin/58 (100%)
rename 59 => builtin/59 (100%)
rename 6 => builtin/6 (100%)
rename 60 => builtin/60 (100%)
rename 61 => builtin/61 (100%)
rename 62 => builtin/62 (100%)
rename 63 => builtin/63 (100%)
rename 64 => builtin/64 (100%)
rename 65 => builtin/65 (100%)
rename 66 => builtin/66 (100%)
rename 67 => builtin/67 (100%)
rename 68 => builtin/68 (100%)
rename 69 => builtin/69 (100%)
rename 7 => builtin/7 (100%)
rename 70 => builtin/70 (100%)
rename 71 => builtin/71 (100%)
rename 72 => builtin/72 (100%)
rename 73 => builtin/73 (100%)
rename 74 => builtin/74 (100%)
rename 75 => builtin/75 (100%)
rename 76 => builtin/76 (100%)
rename 77 => builtin/77 (100%)
rename 78 => builtin/78 (100%)
rename 79 => builtin/79 (100%)
rename 8 => builtin/8 (100%)
rename 80 => builtin/80 (100%)
rename 81 => builtin/81 (100%)
rename 82 => builtin/82 (100%)
rename 83 => builtin/83 (100%)
rename 84 => builtin/84 (100%)
rename 85 => builtin/85 (100%)
rename 86 => builtin/86 (100%)
rename 87 => builtin/87 (100%)
rename 88 => builtin/88 (100%)
rename 89 => builtin/89 (100%)
rename 9 => builtin/9 (100%)
rename 90 => builtin/90 (100%)
rename 91 => builtin/91 (100%)
rename 92 => builtin/92 (100%)
rename 93 => builtin/93 (100%)
rename 94 => builtin/94 (100%)
rename 95 => builtin/95 (100%)
rename 96 => builtin/96 (100%)
rename 97 => builtin/97 (100%)
rename 98 => builtin/98 (100%)
rename 99 => builtin/99 (100%)
Switched to branch 'simple-change'
[simple-change 2acf2cc] unrelated-change
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 unrelated-change
ok 9 - setup large simple rename
expecting success:
sane_unset GIT_MERGE_VERBOSITY &&
git merge --no-stat simple-rename | grep -v Removing >output &&
test_line_count -lt 5 output
ok 10 - massive simple rename does not spam added files
# passed all 10 test(s)
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6035-merge-dir-to-symlink.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6035-merge-dir-to-symlink/.git/
expecting success:
mkdir -p a/b/c a/b-2/c &&
> a/b/c/d &&
> a/b-2/c/d &&
> a/x &&
git add -A &&
git commit -m base &&
git tag start &&
rm -rf a/b &&
git add -A &&
test_ln_s_add b-2 a/b &&
git commit -m "dir to symlink"
[master (root-commit) 40e1916] base
Author: A U Thor <author@example.com>
3 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a/b-2/c/d
create mode 100644 a/b/c/d
create mode 100644 a/x
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
[master fc5bff0] dir to symlink
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 120000 a/b
delete mode 100644 a/b/c/d
ok 1 - create a commit where dir a/b changed to symlink
expecting success:
git checkout HEAD^0 &&
git reset --hard master &&
git rm --cached a/b &&
git commit -m "untracked symlink remains" &&
test_must_fail git checkout start^0
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at fc5bff0 dir to symlink
HEAD is now at fc5bff0 dir to symlink
rm 'a/b'
[detached HEAD 228a51d] untracked symlink remains
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 120000 a/b
error: The following untracked working tree files would be overwritten by checkout:
a/b
Please move or remove them before you switch branches.
Aborting
ok 2 - checkout does not clobber untracked symlink
expecting success:
git checkout HEAD^0 &&
git reset --hard master &&
git rm --cached a/b &&
git commit -m "untracked symlink remains" &&
git checkout -f start^0 &&
test -f a/b-2/c/d
HEAD is now at 228a51d untracked symlink remains
HEAD is now at fc5bff0 dir to symlink
rm 'a/b'
[detached HEAD 2c20907] untracked symlink remains
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 120000 a/b
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
2c20907 untracked symlink remains
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> 2c20907
HEAD is now at 40e1916 base
ok 3 - a/b-2/c/d is kept when clobbering symlink b
expecting success:
git checkout HEAD^0 &&
git reset --hard master &&
git checkout start^0 &&
test -f a/b-2/c/d
HEAD is now at 40e1916 base
HEAD is now at fc5bff0 dir to symlink
Previous HEAD position was fc5bff0 dir to symlink
HEAD is now at 40e1916 base
ok 4 - checkout should not have deleted a/b-2/c/d
expecting success:
git reset --hard &&
test -f a/b-2/c/d &&
echo x > a/x &&
git add a/x &&
git commit -m x &&
git tag baseline
HEAD is now at 40e1916 base
[detached HEAD d11427b] x
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 5 - setup for merge test
expecting success:
git reset --hard &&
git checkout baseline^0 &&
git merge -s resolve master &&
test -f a/b-2/c/d
HEAD is now at d11427b x
HEAD is now at d11427b x
error: Merge requires file-level merging
Trying really trivial in-index merge...
Nope.
Trying simple merge.
Simple merge failed, trying Automatic merge.
Adding a/b
Merge made by the 'resolve' strategy.
a/b | 1 +
a/b/c/d | 0
2 files changed, 1 insertion(+)
create mode 120000 a/b
delete mode 100644 a/b/c/d
ok 6 - Handle D/F conflict, do not lose a/b-2/c/d in merge (resolve)
expecting success:
test -h a/b
ok 7 - a/b was resolved as symlink
expecting success:
git reset --hard &&
git checkout baseline^0 &&
git merge -s recursive master &&
test -f a/b-2/c/d
HEAD is now at e7eba81 Merge branch 'master' into HEAD
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
e7eba81 Merge branch 'master' 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> e7eba81
HEAD is now at d11427b x
Merging:
d11427b x
virtual master
found 1 common ancestor:
40e1916 base
Removing a/b/c/d
Adding a/b
Merge made by the 'recursive' strategy.
a/b | 1 +
a/b/c/d | 0
2 files changed, 1 insertion(+)
create mode 120000 a/b
delete mode 100644 a/b/c/d
ok 8 - Handle D/F conflict, do not lose a/b-2/c/d in merge (recursive)
expecting success:
test -h a/b
ok 9 - a/b was resolved as symlink
expecting success:
git reset --hard &&
git checkout master^0 &&
git merge -s resolve baseline^0 &&
test -f a/b-2/c/d
HEAD is now at e7eba81 Merge branch 'master' into HEAD
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
e7eba81 Merge branch 'master' 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> e7eba81
HEAD is now at fc5bff0 dir to symlink
error: Merge requires file-level merging
Trying really trivial in-index merge...
Nope.
Trying simple merge.
Simple merge failed, trying Automatic merge.
Merge made by the 'resolve' strategy.
a/x | 1 +
1 file changed, 1 insertion(+)
ok 10 - Handle F/D conflict, do not lose a/b-2/c/d in merge (resolve)
expecting success:
test -h a/b
ok 11 - a/b was resolved as symlink
expecting success:
git reset --hard &&
git checkout master^0 &&
git merge -s recursive baseline^0 &&
test -f a/b-2/c/d
HEAD is now at c3fcfac Merge commit 'baseline^0' into HEAD
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
c3fcfac Merge commit 'baseline^0' 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> c3fcfac
HEAD is now at fc5bff0 dir to symlink
Merging:
fc5bff0 dir to symlink
virtual baseline^0
found 1 common ancestor:
40e1916 base
Adding a/b
Merge made by the 'recursive' strategy.
a/x | 1 +
1 file changed, 1 insertion(+)
ok 12 - Handle F/D conflict, do not lose a/b-2/c/d in merge (recursive)
expecting success:
test -h a/b
ok 13 - a/b was resolved as symlink
checking known breakage:
git reset --hard &&
git checkout baseline^0 &&
>a/b/c/e &&
test_must_fail git merge -s resolve master &&
test -f a/b/c/e &&
test -f a/b-2/c/d
HEAD is now at 1a21a27 Merge commit 'baseline^0' into HEAD
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
1a21a27 Merge commit 'baseline^0' 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> 1a21a27
HEAD is now at d11427b x
error: Merge requires file-level merging
Trying really trivial in-index merge...
Nope.
Trying simple merge.
Simple merge failed, trying Automatic merge.
Adding a/b
Merge made by the 'resolve' strategy.
a/b | 1 +
a/b/c/d | 0
2 files changed, 1 insertion(+)
create mode 120000 a/b
delete mode 100644 a/b/c/d
test_must_fail: command succeeded: git merge -s resolve master
not ok 14 - do not lose untracked in merge (resolve) # TODO known breakage
expecting success:
git reset --hard &&
git checkout baseline^0 &&
>a/b/c/e &&
test_must_fail git merge -s recursive master &&
test -f a/b/c/e &&
test -f a/b-2/c/d
HEAD is now at 09f5377 Merge branch 'master' into HEAD
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
09f5377 Merge branch 'master' 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> 09f5377
HEAD is now at d11427b x
Merging:
d11427b x
virtual master
found 1 common ancestor:
40e1916 base
Removing a/b/c/d
CONFLICT (directory/file): There is a directory with name a/b in HEAD. Adding a/b as a/b~master
Automatic merge failed; fix conflicts and then commit the result.
ok 15 - do not lose untracked in merge (recursive)
expecting success:
git reset --hard &&
git checkout baseline^0 &&
echo more content >>a/b/c/d &&
test_must_fail git merge -s resolve master
warning: unable to unlink 'a/b': Is a directory
HEAD is now at d11427b x
HEAD is now at d11427b x
error: Entry 'a/b/c/d' not uptodate. Cannot merge.
Trying really trivial in-index merge...
Nope.
error: Entry 'a/b/c/d' not uptodate. Cannot merge.
Merge with strategy resolve failed.
ok 16 - do not lose modifications in merge (resolve)
expecting success:
git reset --hard &&
git checkout baseline^0 &&
echo more content >>a/b/c/d &&
test_must_fail git merge -s recursive master
HEAD is now at d11427b x
HEAD is now at d11427b x
error: Your local changes to the following files would be overwritten by merge:
a/b/c/d
Please commit your changes or stash them before you merge.
Aborting
error: merging of trees 695fce9fd104d35d689ea7465b7232978f5090fc and 9b692e5ee87aae16ad6ecbfd5cddc632859a1cca failed
Merging:
d11427b x
virtual master
found 1 common ancestor:
40e1916 base
ok 17 - do not lose modifications in merge (recursive)
expecting success:
git reset --hard &&
git checkout start^0 &&
rm -rf a/b-2 &&
git add -A &&
test_ln_s_add b a/b-2 &&
git commit -m "dir a/b-2 to symlink" &&
git tag test2
HEAD is now at d11427b x
Previous HEAD position was d11427b x
HEAD is now at 40e1916 base
[detached HEAD 34afc46] dir a/b-2 to symlink
Author: A U Thor <author@example.com>
3 files changed, 2 insertions(+)
create mode 120000 a/b-2
rename a/{b-2/c/d => b/c/e} (100%)
create mode 120000 a/b~master
ok 18 - setup a merge where dir a/b-2 changed to symlink
expecting success:
git reset --hard &&
git checkout baseline^0 &&
git merge -s resolve test2 &&
test -f a/b/c/d
HEAD is now at 34afc46 dir a/b-2 to symlink
Previous HEAD position was 34afc46 dir a/b-2 to symlink
HEAD is now at d11427b x
error: Merge requires file-level merging
Trying really trivial in-index merge...
Nope.
Trying simple merge.
Simple merge failed, trying Automatic merge.
Adding a/b-2
Merge made by the 'resolve' strategy.
a/b-2 | 1 +
a/{b-2/c/d => b/c/e} | 0
a/b~master | 1 +
3 files changed, 2 insertions(+)
create mode 120000 a/b-2
rename a/{b-2/c/d => b/c/e} (100%)
create mode 120000 a/b~master
ok 19 - merge should not have D/F conflicts (resolve)
expecting success:
test -h a/b-2
ok 20 - a/b-2 was resolved as symlink
expecting success:
git reset --hard &&
git checkout baseline^0 &&
git merge -s recursive test2 &&
test -f a/b/c/d
HEAD is now at 2659007 Merge tag 'test2' into HEAD
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
2659007 Merge tag 'test2' 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> 2659007
HEAD is now at d11427b x
Merging:
d11427b x
virtual test2
found 1 common ancestor:
40e1916 base
Removing a/b-2/c/d
Adding a/b-2
Merge made by the 'recursive' strategy.
a/b-2 | 1 +
a/{b-2/c/d => b/c/e} | 0
a/b~master | 1 +
3 files changed, 2 insertions(+)
create mode 120000 a/b-2
rename a/{b-2/c/d => b/c/e} (100%)
create mode 120000 a/b~master
ok 21 - merge should not have D/F conflicts (recursive)
expecting success:
test -h a/b-2
ok 22 - a/b-2 was resolved as symlink
expecting success:
git reset --hard &&
git checkout -b foo test2 &&
git merge -s recursive baseline^0 &&
test -f a/b/c/d
HEAD is now at 871bf37 Merge tag 'test2' into HEAD
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
871bf37 Merge tag 'test2' 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> 871bf37
Switched to a new branch 'foo'
Merging:
34afc46 dir a/b-2 to symlink
virtual baseline^0
found 1 common ancestor:
40e1916 base
Adding a/b-2
Merge made by the 'recursive' strategy.
a/x | 1 +
1 file changed, 1 insertion(+)
ok 23 - merge should not have F/D conflicts (recursive)
expecting success:
test -h a/b-2
ok 24 - a/b-2 was resolved as symlink
# still have 1 known breakage(s)
# passed all remaining 23 test(s)
1..24
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6037-merge-ours-theirs.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6037-merge-ours-theirs/.git/
expecting success:
for i in 1 2 3 4 5 6 7 8 9
do
echo "$i"
done >file &&
git add file &&
cp file elif &&
git commit -m initial &&
sed -e "s/1/one/" -e "s/9/nine/" >file <elif &&
git commit -a -m ours &&
git checkout -b side HEAD^ &&
sed -e "s/9/nueve/" >file <elif &&
git commit -a -m theirs &&
git checkout master^0
[master (root-commit) e619d97] initial
Author: A U Thor <author@example.com>
1 file changed, 9 insertions(+)
create mode 100644 file
[master cedf6b1] ours
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+), 2 deletions(-)
Switched to a new branch 'side'
[side 1392fbe] theirs
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at cedf6b1 ours
ok 1 - setup
expecting success:
git reset --hard master &&
test_must_fail git merge -s recursive side &&
grep nine file &&
grep nueve file &&
! grep 9 file &&
grep one file &&
! grep 1 file
HEAD is now at cedf6b1 ours
Merging:
cedf6b1 ours
virtual side
found 1 common ancestor:
e619d97 initial
Auto-merging file
CONFLICT (content): Merge conflict in file
Automatic merge failed; fix conflicts and then commit the result.
nine
nueve
one
ok 2 - plain recursive - should conflict
expecting success:
git reset --hard master &&
git merge -s recursive -Xtheirs side &&
! grep nine file &&
grep nueve file &&
! grep 9 file &&
grep one file &&
! grep 1 file
HEAD is now at cedf6b1 ours
Merging:
cedf6b1 ours
virtual side
found 1 common ancestor:
e619d97 initial
Auto-merging file
Merge made by the 'recursive' strategy.
file | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
nueve
one
ok 3 - recursive favouring theirs
expecting success:
git reset --hard master &&
git merge -s recursive -X ours side &&
grep nine file &&
! grep nueve file &&
! grep 9 file &&
grep one file &&
! grep 1 file
HEAD is now at cedf6b1 ours
Merging:
cedf6b1 ours
virtual side
found 1 common ancestor:
e619d97 initial
Auto-merging file
Skipped file (merged same as existing)
Merge made by the 'recursive' strategy.
nine
one
ok 4 - recursive favouring ours
expecting success:
echo file binary >.gitattributes &&
git reset --hard master &&
git merge -s recursive -X theirs side &&
git diff --exit-code side HEAD -- file &&
git reset --hard master &&
git merge -s recursive -X ours side &&
git diff --exit-code master HEAD -- file
HEAD is now at cedf6b1 ours
Merging:
cedf6b1 ours
virtual side
found 1 common ancestor:
e619d97 initial
Auto-merging file
Merge made by the 'recursive' strategy.
file | Bin 23 -> 22 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
HEAD is now at cedf6b1 ours
Merging:
cedf6b1 ours
virtual side
found 1 common ancestor:
e619d97 initial
Auto-merging file
Skipped file (merged same as existing)
Merge made by the 'recursive' strategy.
ok 5 - binary file with -Xours/-Xtheirs
expecting success:
git reset --hard master && git pull -s recursive -Xours . side &&
git reset --hard master && git pull -s recursive -X ours . side &&
git reset --hard master && git pull -s recursive -Xtheirs . side &&
git reset --hard master && git pull -s recursive -X theirs . side &&
git reset --hard master && test_must_fail git pull -s recursive -X bork . side
HEAD is now at cedf6b1 ours
From .
* branch side -> FETCH_HEAD
Merging:
cedf6b1 ours
virtual 1392fbe6ceca27e3fb5dcef595245de8d62497b6
found 1 common ancestor:
e619d97 initial
Auto-merging file
Skipped file (merged same as existing)
Merge made by the 'recursive' strategy.
HEAD is now at cedf6b1 ours
From .
* branch side -> FETCH_HEAD
Merging:
cedf6b1 ours
virtual 1392fbe6ceca27e3fb5dcef595245de8d62497b6
found 1 common ancestor:
e619d97 initial
Auto-merging file
Skipped file (merged same as existing)
Merge made by the 'recursive' strategy.
HEAD is now at cedf6b1 ours
From .
* branch side -> FETCH_HEAD
Merging:
cedf6b1 ours
virtual 1392fbe6ceca27e3fb5dcef595245de8d62497b6
found 1 common ancestor:
e619d97 initial
Auto-merging file
Merge made by the 'recursive' strategy.
file | Bin 23 -> 22 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
HEAD is now at cedf6b1 ours
From .
* branch side -> FETCH_HEAD
Merging:
cedf6b1 ours
virtual 1392fbe6ceca27e3fb5dcef595245de8d62497b6
found 1 common ancestor:
e619d97 initial
Auto-merging file
Merge made by the 'recursive' strategy.
file | Bin 23 -> 22 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
HEAD is now at cedf6b1 ours
From .
* branch side -> FETCH_HEAD
fatal: Unknown option for merge-recursive: -Xbork
ok 6 - pull passes -X to underlying merge
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 reset --hard master &&
git checkout -b two master &&
ln -s target-zero link &&
git add link &&
git commit -m "add link pointing to zero" &&
ln -f -s target-two link &&
git commit -m "add link pointing to two" link &&
git checkout -b one HEAD^ &&
ln -f -s target-one link &&
git commit -m "add link pointing to one" link &&
# we expect symbolic links not to resolve automatically, of course
git checkout one^0 &&
test_must_fail git merge -s recursive two &&
# favor theirs to resolve to target-two?
git reset --hard &&
git checkout one^0 &&
git merge -s recursive -X theirs two &&
git diff --exit-code two HEAD link &&
# favor ours to resolve to target-one?
git reset --hard &&
git checkout one^0 &&
git merge -s recursive -X ours two &&
git diff --exit-code one HEAD link
HEAD is now at cedf6b1 ours
Switched to a new branch 'two'
[two d5c5b84] add link pointing to zero
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 120000 link
[two 8319a42] add link pointing to two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'one'
[one 1ba63d0] add link pointing to one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Note: switching to 'one^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 1ba63d0 add link pointing to one
Merging:
1ba63d0 add link pointing to one
virtual two
found 1 common ancestor:
d5c5b84 add link pointing to zero
Auto-merging link
CONFLICT (content): Merge conflict in link
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at 1ba63d0 add link pointing to one
HEAD is now at 1ba63d0 add link pointing to one
Merging:
1ba63d0 add link pointing to one
virtual two
found 1 common ancestor:
d5c5b84 add link pointing to zero
Auto-merging link
Merge made by the 'recursive' strategy.
link | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at c899ada Merge branch 'two' into HEAD
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
c899ada Merge branch 'two' 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> c899ada
HEAD is now at 1ba63d0 add link pointing to one
Merging:
1ba63d0 add link pointing to one
virtual two
found 1 common ancestor:
d5c5b84 add link pointing to zero
Auto-merging link
Skipped link (merged same as existing)
Merge made by the 'recursive' strategy.
ok 7 - symlink with -Xours/-Xtheirs
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6039-merge-ignorecase.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6039-merge-ignorecase/.git/
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
)
prerequisite CASE_INSENSITIVE_FS not satisfied
1..0 # SKIP skipping case insensitive tests - case sensitive file system
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6038-merge-text-auto.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6038-merge-text-auto/.git/
expecting success:
git config core.autocrlf false &&
echo first line | append_cr >file &&
echo first line >control_file &&
echo only line >inert_file &&
git add file control_file inert_file &&
test_tick &&
git commit -m "Initial" &&
git tag initial &&
git branch side &&
echo "* text=auto" >.gitattributes &&
echo first line >file &&
git add .gitattributes file &&
test_tick &&
git commit -m "normalize file" &&
echo same line | append_cr >>file &&
echo same line >>control_file &&
git add file control_file &&
test_tick &&
git commit -m "add line from a" &&
git tag a &&
git rm .gitattributes &&
rm file &&
git checkout file &&
test_tick &&
git commit -m "remove .gitattributes" &&
git tag c &&
git checkout side &&
echo same line | append_cr >>file &&
echo same line >>control_file &&
git add file control_file &&
test_tick &&
git commit -m "add line from b" &&
git tag b &&
git checkout master
[master (root-commit) 1c56df1] Initial
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 control_file
create mode 100644 file
create mode 100644 inert_file
[master 2747e77] normalize file
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 .gitattributes
warning: CRLF will be replaced by LF in file.
The file will have its original line endings in your working directory
[master 99f8882] add line from a
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
rm '.gitattributes'
Updated 1 path from the index
[master 2f716ad] remove .gitattributes
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 .gitattributes
Switched to branch 'side'
[side 0d9ffb6] add line from b
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
Switched to branch 'master'
ok 1 - setup
expecting success:
fuzz_conflict() {
sed $SED_OPTIONS -e "s/^\([<>=]......\) .*/\1/" "$@"
}
ok 2 - set up fuzz_conflict() helper
expecting success:
cat <<-\EOF >expected &&
first line
same line
EOF
if test_have_prereq NATIVE_CRLF; then
append_cr <expected >expected.temp &&
mv expected.temp expected
fi &&
git config merge.renormalize true &&
git rm -fr . &&
rm -f .gitattributes &&
git reset --hard a &&
git merge b &&
compare_files expected file
rm 'control_file'
rm 'file'
rm 'inert_file'
HEAD is now at 99f8882 add line from a
Merging:
99f8882 add line from a
virtual b
found 1 common ancestor:
1c56df1 Initial
Auto-merging file
Skipped file (merged same as existing)
Merge made by the 'recursive' strategy.
ok 3 - Merge after setting text=auto
expecting success:
git config core.eol lf &&
cat <<-\EOF >expected &&
first line
same line
EOF
git config merge.renormalize true &&
git rm -fr . &&
rm -f .gitattributes &&
git reset --hard b &&
git merge a &&
compare_files expected file
rm '.gitattributes'
rm 'control_file'
rm 'file'
rm 'inert_file'
HEAD is now at 0d9ffb6 add line from b
Merging:
0d9ffb6 add line from b
virtual a
found 1 common ancestor:
1c56df1 Initial
Auto-merging file
Merge made by the 'recursive' strategy.
.gitattributes | 1 +
file | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
create mode 100644 .gitattributes
ok 4 - Merge addition of text=auto eol=LF
expecting success:
git config core.eol crlf &&
cat <<-\EOF >expected &&
first line
same line
EOF
append_cr <expected >expected.temp &&
mv expected.temp expected &&
git config merge.renormalize true &&
git rm -fr . &&
rm -f .gitattributes &&
git reset --hard b &&
echo >&2 "After git reset --hard b" &&
git ls-files -s --eol >&2 &&
git merge a &&
compare_files expected file
rm '.gitattributes'
rm 'control_file'
rm 'file'
rm 'inert_file'
HEAD is now at 0d9ffb6 add line from b
After git reset --hard b
100644 99b633103c15c20cebebf821133ab526b0ff90b2 0 i/lf w/lf attr/ control_file
100644 ad55e240aeb42e0d9a0e18d6d8b02dd82ee3e527 0 i/crlf w/crlf attr/ file
100644 1bd3656f87a6720d97252137876e81ee56eef249 0 i/lf w/lf attr/ inert_file
Merging:
0d9ffb6 add line from b
virtual a
found 1 common ancestor:
1c56df1 Initial
Auto-merging file
Merge made by the 'recursive' strategy.
.gitattributes | 1 +
file | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
create mode 100644 .gitattributes
ok 5 - Merge addition of text=auto eol=CRLF
expecting success:
git config core.eol native &&
echo "<<<<<<<" >expected &&
echo first line >>expected &&
echo same line >>expected &&
echo ======= >>expected &&
echo first line | append_cr >>expected &&
echo same line | append_cr >>expected &&
echo ">>>>>>>" >>expected &&
git config merge.renormalize false &&
rm -f .gitattributes &&
git reset --hard a &&
test_must_fail git merge b &&
fuzz_conflict file >file.fuzzy &&
compare_files expected file.fuzzy
HEAD is now at 99f8882 add line from a
Merging:
99f8882 add line from a
virtual b
found 1 common ancestor:
1c56df1 Initial
Auto-merging file
CONFLICT (content): Merge conflict in file
Automatic merge failed; fix conflicts and then commit the result.
ok 6 - Detect CRLF/LF conflict after setting text=auto
expecting success:
echo "<<<<<<<" >expected &&
echo first line | append_cr >>expected &&
echo same line | append_cr >>expected &&
echo ======= >>expected &&
echo first line >>expected &&
echo same line >>expected &&
echo ">>>>>>>" >>expected &&
git config merge.renormalize false &&
rm -f .gitattributes &&
git reset --hard b &&
test_must_fail git merge a &&
fuzz_conflict file >file.fuzzy &&
compare_files expected file.fuzzy
HEAD is now at 0d9ffb6 add line from b
Merging:
0d9ffb6 add line from b
virtual a
found 1 common ancestor:
1c56df1 Initial
Auto-merging file
CONFLICT (content): Merge conflict in file
Automatic merge failed; fix conflicts and then commit the result.
ok 7 - Detect LF/CRLF conflict from addition of text=auto
checking known breakage:
cat <<-\EOF >expected &&
first line
same line
EOF
git config merge.renormalize true &&
git rm -fr . &&
rm -f .gitattributes &&
git reset --hard initial &&
git checkout a -- . &&
git checkout -m b &&
compare_files expected file
rm '.gitattributes'
rm 'control_file'
rm 'file'
rm 'file'
rm 'file'
rm 'inert_file'
HEAD is now at 1c56df1 Initial
fatal: cannot continue with staged changes in the following files:
.gitattributes control_file file
not ok 8 - checkout -m after setting text=auto # TODO known breakage
checking known breakage:
cat <<-\EOF >expected &&
first line
same line
EOF
git config merge.renormalize true &&
git rm -fr . &&
rm -f .gitattributes file &&
git reset --hard initial &&
git checkout b -- . &&
git checkout -m a &&
compare_files expected file
rm '.gitattributes'
rm 'control_file'
rm 'file'
rm 'inert_file'
HEAD is now at 1c56df1 Initial
fatal: cannot continue with staged changes in the following files:
control_file file
not ok 9 - checkout -m addition of text=auto # TODO known breakage
checking known breakage:
append_cr <<-\EOF >expected &&
first line
same line
EOF
git config merge.renormalize true &&
git rm -fr . &&
git reset --hard b &&
test_must_fail git cherry-pick a >err 2>&1 &&
grep "[Nn]othing added" err &&
compare_files expected file
rm 'control_file'
rm 'file'
rm 'inert_file'
HEAD is now at 0d9ffb6 add line from b
not ok 10 - cherry-pick patch from after text=auto was added # TODO known breakage
expecting success:
git checkout -f side &&
git rm -fr . &&
rm -f .gitattributes &&
git reset --hard initial &&
git rm file &&
git commit -m "remove file" &&
git checkout master &&
git reset --hard a^ &&
git merge side
Switched to branch 'side'
warning: cancelling a cherry picking in progress
rm 'control_file'
rm 'file'
rm 'inert_file'
HEAD is now at 1c56df1 Initial
rm 'file'
[side 7dc5d25] remove file
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 file
Switched to branch 'master'
HEAD is now at 2747e77 normalize file
Merging:
2747e77 normalize file
virtual side
found 1 common ancestor:
1c56df1 Initial
Removing file
Merge made by the 'recursive' strategy.
file | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 file
ok 11 - Test delete/normalize conflict
# still have 3 known breakage(s)
# passed all remaining 8 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6040-tracking-info.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6040-tracking-info/.git/
expecting success:
advance a &&
advance b &&
advance c &&
git clone . test &&
(
cd test &&
git checkout -b b1 origin &&
git reset --hard HEAD^ &&
advance d &&
git checkout -b b2 origin &&
git reset --hard b1 &&
git checkout -b b3 origin &&
git reset --hard HEAD^ &&
git checkout -b b4 origin &&
advance e &&
advance f &&
git checkout -b brokenbase origin &&
git checkout -b b5 --track brokenbase &&
advance g &&
git branch -d brokenbase &&
git checkout -b b6 origin
) &&
git checkout -b follower --track master &&
advance h
[master (root-commit) cc33353] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
[master 7e1cf2d] b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b
[master ac11e55] c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c
Cloning into 'test'...
done.
Switched to a new branch 'b1'
Branch 'b1' set up to track remote branch 'master' from 'origin'.
HEAD is now at 7e1cf2d b
[b1 afc0d66] d
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 d
Switched to a new branch 'b2'
Branch 'b2' set up to track remote branch 'master' from 'origin'.
HEAD is now at afc0d66 d
Switched to a new branch 'b3'
Branch 'b3' set up to track remote branch 'master' from 'origin'.
HEAD is now at 7e1cf2d b
Switched to a new branch 'b4'
Branch 'b4' set up to track remote branch 'master' from 'origin'.
[b4 ec9b031] e
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 e
[b4 59ecd1d] f
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 f
Switched to a new branch 'brokenbase'
Branch 'brokenbase' set up to track remote branch 'master' from 'origin'.
Switched to a new branch 'b5'
Branch 'b5' set up to track local branch 'brokenbase'.
[b5 d8d0202] g
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 g
Deleted branch brokenbase (was ac11e55).
Switched to a new branch 'b6'
Branch 'b6' set up to track remote branch 'master' from 'origin'.
Switched to a new branch 'follower'
Branch 'follower' set up to track local branch 'master'.
[follower 21abfbd] h
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 h
ok 1 - setup
expecting success:
(
cd test &&
git branch -v
) |
sed -n -e "$t6040_script" >actual &&
test_i18ncmp expect actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 2 - branch -v
expecting success:
(
cd test &&
git branch -vv
) |
sed -n -e "$t6040_script" >actual &&
test_i18ncmp expect actual
ok 3 - branch -vv
expecting success:
(
cd test && git checkout b1
) >actual &&
test_i18ngrep "have 1 and 1 different" actual
Switched to branch 'b1'
and have 1 and 1 different commits each, respectively.
ok 4 - checkout (diverged from upstream)
expecting success:
git checkout master &&
git checkout follower >actual &&
test_i18ngrep "is ahead of" actual
Switched to branch 'master'
Switched to branch 'follower'
Your branch is ahead of 'master' by 1 commit.
ok 5 - checkout with local tracked branch
expecting success:
(
cd test &&
git checkout b5
) >actual &&
test_i18ngrep "is based on .*, but the upstream is gone." actual
Switched to branch 'b5'
Your branch is based on 'brokenbase', but the upstream is gone.
ok 6 - checkout (upstream is gone)
expecting success:
(
cd test && git checkout b6
) >actual &&
test_i18ngrep "Your branch is up to date with .origin/master" actual
Switched to branch 'b6'
Your branch is up to date with 'origin/master'.
ok 7 - checkout (up-to-date with upstream)
expecting success:
(
cd test &&
git checkout b1 >/dev/null &&
# reports nothing to commit
test_must_fail git commit --dry-run
) >actual &&
test_i18ngrep "have 1 and 1 different" actual
Switched to branch 'b1'
and have 1 and 1 different commits each, respectively.
ok 8 - status (diverged from upstream)
expecting success:
(
cd test &&
git checkout b5 >/dev/null &&
# reports nothing to commit
test_must_fail git commit --dry-run
) >actual &&
test_i18ngrep "is based on .*, but the upstream is gone." actual
Switched to branch 'b5'
Your branch is based on 'brokenbase', but the upstream is gone.
ok 9 - status (upstream is gone)
expecting success:
(
cd test &&
git checkout b6 >/dev/null &&
# reports nothing to commit
test_must_fail git commit --dry-run
) >actual &&
test_i18ngrep "Your branch is up to date with .origin/master" actual
Switched to branch 'b6'
Your branch is up to date with 'origin/master'.
ok 10 - status (up-to-date with upstream)
expecting success:
(
cd test &&
git checkout b1 >/dev/null &&
git status -s -b | head -1
) >actual &&
test_i18ncmp expect actual
Switched to branch 'b1'
ok 11 - status -s -b (diverged from upstream)
expecting success:
(
cd test &&
git checkout b1 >/dev/null &&
git status -s -b --no-ahead-behind | head -1
) >actual &&
test_i18ncmp expect actual
Already on 'b1'
ok 12 - status -s -b --no-ahead-behind (diverged from upstream)
expecting success:
(
cd test &&
git checkout b1 >/dev/null &&
git -c status.aheadbehind=false status -s -b | head -1
) >actual &&
test_i18ncmp expect actual
Already on 'b1'
ok 13 - status.aheadbehind=false status -s -b (diverged from upstream)
expecting success:
(
cd test &&
git checkout b1 >/dev/null &&
git status --long -b | head -3
) >actual &&
test_i18ncmp expect actual
Already on 'b1'
ok 14 - status --long --branch
expecting success:
(
cd test &&
git checkout b1 >/dev/null &&
git -c status.aheadbehind=true status --long -b | head -3
) >actual &&
test_i18ncmp expect actual
Already on 'b1'
ok 15 - status --long --branch
expecting success:
(
cd test &&
git checkout b1 >/dev/null &&
git status --long -b --no-ahead-behind | head -2
) >actual &&
test_i18ncmp expect actual
Already on 'b1'
ok 16 - status --long --branch --no-ahead-behind
expecting success:
(
cd test &&
git checkout b1 >/dev/null &&
git -c status.aheadbehind=false status --long -b | head -2
) >actual &&
test_i18ncmp expect actual
Already on 'b1'
ok 17 - status.aheadbehind=false status --long --branch
expecting success:
(
cd test &&
git checkout b5 >/dev/null &&
git status -s -b | head -1
) >actual &&
test_i18ncmp expect actual
Switched to branch 'b5'
ok 18 - status -s -b (upstream is gone)
expecting success:
(
cd test &&
git checkout b6 >/dev/null &&
git status -s -b | head -1
) >actual &&
test_i18ncmp expect actual
Switched to branch 'b6'
ok 19 - status -s -b (up-to-date with upstream)
expecting success:
git checkout master &&
git tag light &&
test_must_fail git branch --track lighttrack light >actual &&
test_i18ngrep ! "set up to track" actual &&
test_must_fail git checkout lighttrack
Switched to branch 'master'
fatal: Cannot setup tracking information; starting point 'light' is not a branch.
error: pathspec 'lighttrack' did not match any file(s) known to git
ok 20 - fail to track lightweight tags
expecting success:
git checkout master &&
git tag -m heavy heavy &&
test_must_fail git branch --track heavytrack heavy >actual &&
test_i18ngrep ! "set up to track" actual &&
test_must_fail git checkout heavytrack
Already on 'master'
fatal: Cannot setup tracking information; starting point 'heavy' is not a branch.
error: pathspec 'heavytrack' did not match any file(s) known to git
ok 21 - fail to track annotated tags
expecting success:
git branch from-master master &&
git branch --set-upstream-to master from-master &&
git branch from-master2 master &&
test_must_fail git config branch.from-master2.merge > actual &&
git rev-list from-master2 &&
git update-ref refs/heads/from-master2 from-master2^ &&
git rev-parse from-master2 >expect2 &&
git branch --set-upstream-to master from-master2 &&
git config branch.from-master.merge > actual &&
git rev-parse from-master2 >actual2 &&
grep -q "^refs/heads/master$" actual &&
cmp expect2 actual2
Branch 'from-master' set up to track local branch 'master'.
ac11e552c8e799a6af00e91a64888439b699d9fd
7e1cf2dc889e845623128125195d11533d8aef5e
cc33353f1c71fb0fa9b4671a6a0a8539ad9ecd0a
Branch 'from-master2' set up to track local branch 'master'.
ok 22 - --set-upstream-to does not change branch
expecting success:
git checkout follower &&
git checkout from-master2 &&
git config branch.from-master2.merge > expect2 &&
git branch --set-upstream-to @{-1} from-master &&
git config branch.from-master.merge > actual &&
git config branch.from-master2.merge > actual2 &&
git branch --set-upstream-to follower from-master &&
git config branch.from-master.merge > expect &&
test_cmp expect2 actual2 &&
test_cmp expect actual
Switched to branch 'follower'
Your branch is ahead of 'master' by 1 commit.
(use "git push" to publish your local commits)
Switched to branch 'from-master2'
Your branch is behind 'master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
Branch 'from-master' set up to track local branch 'follower'.
Branch 'from-master' set up to track local branch 'follower'.
ok 23 - --set-upstream-to @{-1}
# passed all 23 test(s)
1..23
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6036-recursive-corner-cases.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/.git/
expecting success:
test_create_repo basic-rename &&
(
cd basic-rename &&
ten="0 1 2 3 4 5 6 7 8 9" &&
for i in $ten
do
echo line $i in a sample file
done >one &&
for i in $ten
do
echo line $i in another sample file
done >two &&
git add one two &&
test_tick && git commit -m initial &&
git branch L1 &&
git checkout -b R1 &&
git mv one three &&
test_tick && git commit -m R1 &&
git checkout L1 &&
git mv two three &&
test_tick && git commit -m L1 &&
git checkout L1^0 &&
test_tick && git merge -s ours R1 &&
git tag L2 &&
git checkout R1^0 &&
test_tick && git merge -s ours L1 &&
git tag R2
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/basic-rename/.git/
[master (root-commit) 4871052] initial
Author: A U Thor <author@example.com>
2 files changed, 20 insertions(+)
create mode 100644 one
create mode 100644 two
Switched to a new branch 'R1'
[R1 6592516] R1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename one => three (100%)
Switched to branch 'L1'
[L1 bd99445] L1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename two => three (100%)
Note: switching to 'L1^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at bd99445 L1
Merge made by the 'ours' strategy.
Previous HEAD position was d46c613 Merge branch 'R1' into HEAD
HEAD is now at 6592516 R1
Merge made by the 'ours' strategy.
ok 1 - setup basic criss-cross + rename with no modifications
expecting success:
(
cd basic-rename &&
git reset --hard &&
git checkout L2^0 &&
test_must_fail git merge -s recursive R2^0 &&
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >expect \
L2:three R2:three &&
git rev-parse >actual \
:2:three :3:three &&
test_cmp expect actual
)
HEAD is now at 01e4222 Merge branch 'L1' into HEAD
Previous HEAD position was 01e4222 Merge branch 'L1' into HEAD
HEAD is now at d46c613 Merge branch 'R1' into HEAD
Merging:
d46c613 Merge branch 'R1' into HEAD
virtual R2^0
found 2 common ancestors:
6592516 R1
bd99445 L1
Merging:
6592516 R1
bd99445 L1
found 1 common ancestor:
4871052 initial
CONFLICT (rename/rename): Rename one->three in Temporary merge branch 1. Rename two->three in Temporary merge branch 2
CONFLICT (rename/rename): Rename two->three in HEAD. Rename one->three in R2^0
Auto-merging three
Automatic merge failed; fix conflicts and then commit the result.
ok 2 - merge simple rename+criss-cross with no modifications
expecting success:
test_create_repo rename-modify &&
(
cd rename-modify &&
ten="0 1 2 3 4 5 6 7 8 9" &&
for i in $ten
do
echo line $i in a sample file
done >one &&
for i in $ten
do
echo line $i in another sample file
done >two &&
git add one two &&
test_tick && git commit -m initial &&
git branch L1 &&
git checkout -b R1 &&
git mv one three &&
echo more >>two &&
git add two &&
test_tick && git commit -m R1 &&
git checkout L1 &&
git mv two three &&
test_tick && git commit -m L1 &&
git checkout L1^0 &&
test_tick && git merge -s ours R1 &&
git tag L2 &&
git checkout R1^0 &&
test_tick && git merge -s ours L1 &&
git tag R2
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/rename-modify/.git/
[master (root-commit) 4871052] initial
Author: A U Thor <author@example.com>
2 files changed, 20 insertions(+)
create mode 100644 one
create mode 100644 two
Switched to a new branch 'R1'
[R1 edf7b54] R1
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
rename one => three (100%)
Switched to branch 'L1'
[L1 bd99445] L1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename two => three (100%)
Note: switching to 'L1^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at bd99445 L1
Merge made by the 'ours' strategy.
Previous HEAD position was fb0e0c9 Merge branch 'R1' into HEAD
HEAD is now at edf7b54 R1
Merge made by the 'ours' strategy.
ok 3 - setup criss-cross + rename merges with basic modification
expecting success:
(
cd rename-modify &&
git checkout L2^0 &&
test_must_fail git merge -s recursive R2^0 &&
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >expect \
L2:three R2:three &&
git rev-parse >actual \
:2:three :3:three &&
test_cmp expect actual
)
Previous HEAD position was c7add50 Merge branch 'L1' into HEAD
HEAD is now at fb0e0c9 Merge branch 'R1' into HEAD
Merging:
fb0e0c9 Merge branch 'R1' into HEAD
virtual R2^0
found 2 common ancestors:
edf7b54 R1
bd99445 L1
Merging:
edf7b54 R1
bd99445 L1
found 1 common ancestor:
4871052 initial
CONFLICT (rename/rename): Rename one->three in Temporary merge branch 1. Rename two->three in Temporary merge branch 2
CONFLICT (rename/rename): Rename two->three in HEAD. Rename one->three in R2^0
Auto-merging three
Automatic merge failed; fix conflicts and then commit the result.
ok 4 - merge criss-cross + rename merges with basic modification
expecting success:
test_create_repo rename-add &&
(
cd rename-add &&
printf "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n" >a &&
git add a &&
test_tick && git commit -m A &&
git branch B &&
git checkout -b C &&
echo 10 >>a &&
test_write_lines 0 1 2 3 4 5 6 7 foobar >new_a &&
git add a new_a &&
test_tick && git commit -m C &&
git checkout B &&
git mv a new_a &&
test_tick && git commit -m B &&
git checkout B^0 &&
test_must_fail git merge C &&
git show :2:new_a >new_a &&
git add new_a &&
test_tick && git commit -m D &&
git tag D &&
git checkout C^0 &&
test_must_fail git merge B &&
test_write_lines 0 1 2 3 4 5 6 7 bad_merge >new_a &&
git add -u &&
test_tick && git commit -m E &&
git tag E
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/rename-add/.git/
[master (root-commit) 1b84f42] A
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 a
Switched to a new branch 'C'
[C f1f358b] C
Author: A U Thor <author@example.com>
2 files changed, 10 insertions(+)
create mode 100644 new_a
Switched to branch 'B'
[B 0496200] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename a => new_a (100%)
Note: switching to 'B^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 0496200 B
Merging:
0496200 B
virtual C
found 1 common ancestor:
1b84f42 A
CONFLICT (rename/add): Rename a->new_a in HEAD. Added new_a in C
Auto-merging new_a
Automatic merge failed; fix conflicts and then commit the result.
[detached HEAD fc47f4b] D
Author: A U Thor <author@example.com>
Previous HEAD position was fc47f4b D
HEAD is now at f1f358b C
Merging:
f1f358b C
virtual B
found 1 common ancestor:
1b84f42 A
CONFLICT (rename/add): Rename a->new_a in B. Added new_a in HEAD
Auto-merging new_a
Automatic merge failed; fix conflicts and then commit the result.
[detached HEAD 1e98639] E
Author: A U Thor <author@example.com>
ok 5 - setup differently handled merges of rename/add conflict
expecting success:
(
cd rename-add &&
git checkout D^0 &&
test_must_fail git merge -s recursive E^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 3 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >expect \
C:new_a D:new_a E:new_a &&
git rev-parse >actual \
:1:new_a :2:new_a :3:new_a &&
test_cmp expect actual &&
# Test that the two-way merge in new_a is as expected
git cat-file -p D:new_a >ours &&
git cat-file -p E:new_a >theirs &&
>empty &&
test_must_fail git merge-file \
-L "HEAD" \
-L "" \
-L "E^0" \
ours empty theirs &&
sed -e "s/^\([<=>]\)/\1\1\1/" ours >expect &&
git hash-object new_a >actual &&
git hash-object ours >expect &&
test_cmp expect actual
)
Previous HEAD position was 1e98639 E
HEAD is now at fc47f4b D
Merging:
fc47f4b D
virtual E^0
found 2 common ancestors:
f1f358b C
0496200 B
Merging:
f1f358b C
0496200 B
found 1 common ancestor:
1b84f42 A
CONFLICT (rename/add): Rename a->new_a in Temporary merge branch 2. Added new_a in Temporary merge branch 1
Auto-merging new_a
CONFLICT (content): Merge conflict in new_a
Automatic merge failed; fix conflicts and then commit the result.
ok 6 - git detects differently handled merges conflict
expecting success:
(
cd rename-add &&
# Difference #1: Do cleanup from previous testrun
git reset --hard &&
git clean -fdqx &&
# Difference #2: Change commit timestamps
btime=$(git log --no-walk --date=raw --format=%cd B | awk "{print \$1}") &&
ctime=$(git log --no-walk --date=raw --format=%cd C | awk "{print \$1}") &&
newctime=$(($btime+1)) &&
git fast-export --no-data --all | sed -e s/$ctime/$newctime/ | git fast-import --force --quiet &&
# End of differences; rest is copy-paste of last test
git checkout D^0 &&
test_must_fail git merge -s recursive E^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 3 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >expect \
C:new_a D:new_a E:new_a &&
git rev-parse >actual \
:1:new_a :2:new_a :3:new_a &&
test_cmp expect actual &&
# Test that the two-way merge in new_a is as expected
git cat-file -p D:new_a >ours &&
git cat-file -p E:new_a >theirs &&
>empty &&
test_must_fail git merge-file \
-L "HEAD" \
-L "" \
-L "E^0" \
ours empty theirs &&
sed -e "s/^\([<=>]\)/\1\1\1/" ours >expect &&
git hash-object new_a >actual &&
git hash-object ours >expect &&
test_cmp expect actual
)
HEAD is now at fc47f4b D
HEAD is now at 23cad11 D
Merging:
23cad11 D
virtual E^0
found 2 common ancestors:
0496200 B
c337b20 C
Merging:
0496200 B
c337b20 C
found 1 common ancestor:
1b84f42 A
CONFLICT (rename/add): Rename a->new_a in Temporary merge branch 1. Added new_a in Temporary merge branch 2
Auto-merging new_a
CONFLICT (content): Merge conflict in new_a
Automatic merge failed; fix conflicts and then commit the result.
ok 7 - git detects differently handled merges conflict, swapped
expecting success:
test_create_repo modify-delete &&
(
cd modify-delete &&
echo A >file &&
git add file &&
test_tick &&
git commit -m A &&
git branch B &&
git checkout -b C &&
git rm file &&
test_tick &&
git commit -m C &&
git checkout B &&
echo B >file &&
git add file &&
test_tick &&
git commit -m B &&
git checkout B^0 &&
test_must_fail git merge C &&
echo B >file &&
git add file &&
test_tick &&
git commit -m D &&
git tag D &&
git checkout C^0 &&
test_must_fail git merge B &&
git rm file &&
test_tick &&
git commit -m E &&
git tag E
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/modify-delete/.git/
[master (root-commit) 518fc48] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Switched to a new branch 'C'
rm 'file'
[C cfc4799] C
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 file
Switched to branch 'B'
[B 96c9208] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Note: switching to 'B^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 96c9208 B
Merging:
96c9208 B
virtual C
found 1 common ancestor:
518fc48 A
CONFLICT (modify/delete): file deleted in C and modified in HEAD. Version HEAD of file left in tree.
Automatic merge failed; fix conflicts and then commit the result.
[detached HEAD 84ce14b] D
Author: A U Thor <author@example.com>
Previous HEAD position was 84ce14b D
HEAD is now at cfc4799 C
Merging:
cfc4799 C
virtual B
found 1 common ancestor:
518fc48 A
CONFLICT (modify/delete): file deleted in HEAD and modified in B. Version B of file left in tree.
Automatic merge failed; fix conflicts and then commit the result.
rm 'file'
[detached HEAD 75a2416] E
Author: A U Thor <author@example.com>
ok 8 - setup criss-cross + modify/delete resolved differently
expecting success:
(
cd modify-delete &&
git checkout D^0 &&
test_must_fail git merge -s recursive E^0 &&
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
git rev-parse >expect \
master:file B:file &&
git rev-parse >actual \
:1:file :2:file &&
test_cmp expect actual
)
Previous HEAD position was 75a2416 E
HEAD is now at 84ce14b D
Merging:
84ce14b D
virtual E^0
found 2 common ancestors:
cfc4799 C
96c9208 B
Merging:
cfc4799 C
96c9208 B
found 1 common ancestor:
518fc48 A
CONFLICT (modify/delete): file deleted in E^0 and modified in HEAD. Version HEAD of file left in tree.
Automatic merge failed; fix conflicts and then commit the result.
ok 9 - git detects conflict merging criss-cross+modify/delete
expecting success:
(
cd modify-delete &&
git reset --hard &&
git checkout E^0 &&
test_must_fail git merge -s recursive D^0 &&
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
git rev-parse >expect \
master:file B:file &&
git rev-parse >actual \
:1:file :3:file &&
test_cmp expect actual
)
HEAD is now at 84ce14b D
Previous HEAD position was 84ce14b D
HEAD is now at 75a2416 E
Merging:
75a2416 E
virtual D^0
found 2 common ancestors:
cfc4799 C
96c9208 B
Merging:
cfc4799 C
96c9208 B
found 1 common ancestor:
518fc48 A
CONFLICT (modify/delete): file deleted in HEAD and modified in D^0. Version D^0 of file left in tree.
Automatic merge failed; fix conflicts and then commit the result.
ok 10 - git detects conflict merging criss-cross+modify/delete, reverse direction
expecting success:
test_create_repo directory-file &&
(
cd directory-file &&
>ignore-me &&
git add ignore-me &&
test_tick &&
git commit -m A &&
git tag A &&
git branch B &&
git checkout -b C &&
mkdir a &&
test_write_lines a b c d e f g >a/file &&
git add a/file &&
test_tick &&
git commit -m C &&
git checkout B &&
test_write_lines 1 2 3 4 5 6 7 >a &&
git add a &&
test_tick &&
git commit -m B &&
git checkout B^0 &&
git merge -s ours -m D1 C^0 &&
git tag D1 &&
git checkout B^0 &&
test_must_fail git merge C^0 &&
git clean -fd &&
git rm -rf a/ &&
git rm a &&
git cat-file -p B:a >a2 &&
git add a2 &&
git commit -m D2 &&
git tag D2 &&
git checkout C^0 &&
git merge -s ours -m E1 B^0 &&
git tag E1 &&
git checkout C^0 &&
git merge -s ours -m E2 B^0 &&
test_write_lines a b c d e f g h >a/file &&
git add a/file &&
git commit --amend -C HEAD &&
git tag E2 &&
git checkout C^0 &&
test_must_fail git merge B^0 &&
git clean -fd &&
git rm -rf a/ &&
test_write_lines 1 2 3 4 5 6 7 8 >a &&
git add a &&
git commit -m E3 &&
git tag E3 &&
git checkout C^0 &&
test_must_fail git merge B^0 &&
git clean -fd &&
git rm -rf a/ &&
git rm a &&
test_write_lines 1 2 3 4 5 6 7 8 >a2 &&
git add a2 &&
git commit -m E4 &&
git tag E4
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/directory-file/.git/
[master (root-commit) a08e4c1] A
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 ignore-me
Switched to a new branch 'C'
[C 4d18708] C
Author: A U Thor <author@example.com>
1 file changed, 7 insertions(+)
create mode 100644 a/file
Switched to branch 'B'
[B fda518b] B
Author: A U Thor <author@example.com>
1 file changed, 7 insertions(+)
create mode 100644 a
Note: switching to 'B^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at fda518b B
Merge made by the 'ours' strategy.
Previous HEAD position was c17d257 D1
HEAD is now at fda518b B
Merging:
fda518b B
virtual C^0
found 1 common ancestor:
a08e4c1 A
Adding a/file
Removing a to make room for subdirectory
CONFLICT (file/directory): There is a directory with name a in C^0. Adding a as a~HEAD
Automatic merge failed; fix conflicts and then commit the result.
Removing a~HEAD
rm 'a/file'
rm 'a'
[detached HEAD 53fb160] D2
Author: A U Thor <author@example.com>
Previous HEAD position was 53fb160 D2
HEAD is now at 4d18708 C
Merge made by the 'ours' strategy.
Previous HEAD position was 4e0c96b E1
HEAD is now at 4d18708 C
Merge made by the 'ours' strategy.
[detached HEAD 56cb482] E2
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
Previous HEAD position was 56cb482 E2
HEAD is now at 4d18708 C
Merging:
4d18708 C
virtual B^0
found 1 common ancestor:
a08e4c1 A
Adding a/file
CONFLICT (directory/file): There is a directory with name a in HEAD. Adding a as a~B^0
Automatic merge failed; fix conflicts and then commit the result.
Removing a~B^0
rm 'a/file'
[detached HEAD e07b76f] E3
Author: A U Thor <author@example.com>
Previous HEAD position was e07b76f E3
HEAD is now at 4d18708 C
Merging:
4d18708 C
virtual B^0
found 1 common ancestor:
a08e4c1 A
Adding a/file
CONFLICT (directory/file): There is a directory with name a in HEAD. Adding a as a~B^0
Automatic merge failed; fix conflicts and then commit the result.
Removing a~B^0
rm 'a/file'
rm 'a'
[detached HEAD f0b11dd] E4
Author: A U Thor <author@example.com>
ok 11 - setup differently handled merges of directory/file conflict
expecting success:
test_when_finished "git -C directory-file reset --hard" &&
test_when_finished "git -C directory-file clean -fdqx" &&
(
cd directory-file &&
git checkout D1^0 &&
test_must_fail git merge -s recursive E1^0 &&
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 1 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >expect \
A:ignore-me B:a &&
git rev-parse >actual \
:0:ignore-me :2:a &&
test_cmp expect actual
)
Previous HEAD position was f0b11dd E4
HEAD is now at c17d257 D1
Merging:
c17d257 D1
virtual E1^0
found 2 common ancestors:
4d18708 C
fda518b B
Merging:
4d18708 C
fda518b B
found 1 common ancestor:
a08e4c1 A
Adding a/file
CONFLICT (directory/file): There is a directory with name a in Temporary merge branch 1. Adding a as a~Temporary merge branch 2
CONFLICT (rename/delete): a~Temporary merge branch 2 deleted in E1^0 and renamed to a in HEAD. Version HEAD of a left in tree.
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at c17d257 D1
ok 12 - merge of D1 & E1 fails but has appropriate contents
expecting success:
test_when_finished "git -C directory-file reset --hard" &&
test_when_finished "git -C directory-file clean -fdqx" &&
(
cd directory-file &&
git checkout E1^0 &&
test_must_fail git merge -s recursive D1^0 &&
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 1 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >expect \
A:ignore-me B:a &&
git rev-parse >actual \
:0:ignore-me :3:a &&
test_cmp expect actual
)
Previous HEAD position was c17d257 D1
HEAD is now at 4e0c96b E1
Merging:
4e0c96b E1
virtual D1^0
found 2 common ancestors:
4d18708 C
fda518b B
Merging:
4d18708 C
fda518b B
found 1 common ancestor:
a08e4c1 A
Adding a/file
CONFLICT (directory/file): There is a directory with name a in Temporary merge branch 1. Adding a as a~Temporary merge branch 2
Removing a/file
CONFLICT (rename/delete): a~Temporary merge branch 2 deleted in HEAD and renamed to a in D1^0. Version D1^0 of a left in tree.
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at 4e0c96b E1
ok 13 - merge of E1 & D1 fails but has appropriate contents
expecting success:
test_when_finished "git -C directory-file reset --hard" &&
test_when_finished "git -C directory-file clean -fdqx" &&
(
cd directory-file &&
git checkout D1^0 &&
test_must_fail git merge -s recursive E2^0 &&
git ls-files -s >out &&
test_line_count = 4 out &&
git ls-files -u >out &&
test_line_count = 3 out &&
git ls-files -o >out &&
test_line_count = 2 out &&
git rev-parse >expect \
B:a E2:a/file C:a/file A:ignore-me &&
git rev-parse >actual \
:2:a :3:a/file :1:a/file :0:ignore-me &&
test_cmp expect actual &&
test_path_is_file a~HEAD
)
Previous HEAD position was 4e0c96b E1
HEAD is now at c17d257 D1
Merging:
c17d257 D1
virtual E2^0
found 2 common ancestors:
4d18708 C
fda518b B
Merging:
4d18708 C
fda518b B
found 1 common ancestor:
a08e4c1 A
Adding a/file
CONFLICT (directory/file): There is a directory with name a in Temporary merge branch 1. Adding a as a~Temporary merge branch 2
CONFLICT (modify/delete): a/file deleted in HEAD and modified in E2^0. Version E2^0 of a/file left in tree.
Removing a to make room for subdirectory
CONFLICT (rename/delete): a~Temporary merge branch 2 deleted in E2^0 and renamed to a in HEAD. Version HEAD of a left in tree at a~HEAD.
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at c17d257 D1
ok 14 - merge of D1 & E2 fails but has appropriate contents
expecting success:
test_when_finished "git -C directory-file reset --hard" &&
test_when_finished "git -C directory-file clean -fdqx" &&
(
cd directory-file &&
git checkout E2^0 &&
test_must_fail git merge -s recursive D1^0 &&
git ls-files -s >out &&
test_line_count = 4 out &&
git ls-files -u >out &&
test_line_count = 3 out &&
git ls-files -o >out &&
test_line_count = 2 out &&
git rev-parse >expect \
B:a E2:a/file C:a/file A:ignore-me &&
git rev-parse >actual \
:3:a :2:a/file :1:a/file :0:ignore-me &&
test_cmp expect actual &&
test_path_is_file a~D1^0
)
Previous HEAD position was c17d257 D1
HEAD is now at 56cb482 E2
Merging:
56cb482 E2
virtual D1^0
found 2 common ancestors:
4d18708 C
fda518b B
Merging:
4d18708 C
fda518b B
found 1 common ancestor:
a08e4c1 A
Adding a/file
CONFLICT (directory/file): There is a directory with name a in Temporary merge branch 1. Adding a as a~Temporary merge branch 2
CONFLICT (modify/delete): a/file deleted in D1^0 and modified in HEAD. Version HEAD of a/file left in tree.
CONFLICT (rename/delete): a~Temporary merge branch 2 deleted in HEAD and renamed to a in D1^0. Version D1^0 of a left in tree at a~D1^0.
Automatic merge failed; fix conflicts and then commit the result.
warning: unable to unlink 'a': Is a directory
HEAD is now at 56cb482 E2
ok 15 - merge of E2 & D1 fails but has appropriate contents
expecting success:
test_when_finished "git -C directory-file reset --hard" &&
test_when_finished "git -C directory-file clean -fdqx" &&
(
cd directory-file &&
git checkout D1^0 &&
git merge -s recursive E3^0 &&
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >expect \
A:ignore-me E3:a &&
git rev-parse >actual \
:0:ignore-me :0:a &&
test_cmp expect actual
)
Previous HEAD position was 56cb482 E2
HEAD is now at c17d257 D1
Merging:
c17d257 D1
virtual E3^0
found 2 common ancestors:
4d18708 C
fda518b B
Merging:
4d18708 C
fda518b B
found 1 common ancestor:
a08e4c1 A
Adding a/file
CONFLICT (directory/file): There is a directory with name a in Temporary merge branch 1. Adding a as a~Temporary merge branch 2
Merge made by the 'recursive' strategy.
a | 1 +
1 file changed, 1 insertion(+)
HEAD is now at 996e8de Merge commit 'E3^0' into HEAD
ok 16 - merge of D1 & E3 succeeds
expecting success:
test_when_finished "git -C directory-file reset --hard" &&
test_when_finished "git -C directory-file clean -fdqx" &&
(
cd directory-file &&
git checkout D1^0 &&
test_must_fail git merge -s recursive E4^0 &&
git ls-files -s >out &&
test_line_count = 4 out &&
git ls-files -u >out &&
test_line_count = 3 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >expect \
A:ignore-me B:a D1:a E4:a2 &&
git rev-parse >actual \
:0:ignore-me :1:a~Temporary\ merge\ branch\ 2 :2:a :3:a2 &&
test_cmp expect actual
)
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
996e8de Merge commit 'E3^0' 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> 996e8de
HEAD is now at c17d257 D1
Merging:
c17d257 D1
virtual E4^0
found 2 common ancestors:
4d18708 C
fda518b B
Merging:
4d18708 C
fda518b B
found 1 common ancestor:
a08e4c1 A
Adding a/file
CONFLICT (directory/file): There is a directory with name a in Temporary merge branch 1. Adding a as a~Temporary merge branch 2
CONFLICT (rename/rename): Rename "a~Temporary merge branch 2"->"a" in branch "HEAD" rename "a~Temporary merge branch 2"->"a2" in "E4^0"
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at c17d257 D1
ok 17 - merge of D1 & E4 notifies user a and a2 are related
checking known breakage:
test_when_finished "git -C directory-file reset --hard" &&
test_when_finished "git -C directory-file clean -fdqx" &&
(
cd directory-file &&
git checkout D2^0 &&
test_must_fail git merge -s recursive E4^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 1 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >expect \
A:ignore-me E4:a2 D2:a/file &&
git rev-parse >actual \
:0:ignore-me :0:a2 :2:a/file &&
test_cmp expect actual
)
Previous HEAD position was c17d257 D1
HEAD is now at 53fb160 D2
Merging:
53fb160 D2
virtual E4^0
found 2 common ancestors:
4d18708 C
fda518b B
Merging:
4d18708 C
fda518b B
found 1 common ancestor:
a08e4c1 A
Adding a/file
CONFLICT (directory/file): There is a directory with name a in Temporary merge branch 1. Adding a as a~Temporary merge branch 2
Merge made by the 'recursive' strategy.
a2 | 1 +
1 file changed, 1 insertion(+)
test_must_fail: command succeeded: git merge -s recursive E4^0
HEAD is now at c9fb12d Merge commit 'E4^0' into HEAD
not ok 18 - merge of D2 & E4 merges a2s & reports conflict for a/file # TODO known breakage
expecting success:
test_create_repo rename-squared-squared &&
(
cd rename-squared-squared &&
printf "1\n2\n3\n4\n5\n6\n" >a &&
git add a &&
git commit -m A &&
git tag A &&
git checkout -b B A &&
git mv a b &&
echo 7 >>b &&
git add -u &&
git commit -m B &&
git checkout -b C A &&
git mv a c &&
git commit -m C &&
git checkout -q B^0 &&
git merge --no-commit -s ours C^0 &&
git mv b newname &&
git commit -m "Merge commit C^0 into HEAD" &&
git tag D &&
git checkout -q C^0 &&
git merge --no-commit -s ours B^0 &&
git mv c newname &&
printf "7\n8\n" >>newname &&
git add -u &&
git commit -m "Merge commit B^0 into HEAD" &&
git tag E
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/rename-squared-squared/.git/
[master (root-commit) 00861ca] A
Author: A U Thor <author@example.com>
1 file changed, 6 insertions(+)
create mode 100644 a
Switched to a new branch 'B'
[B 5ac8ac6] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rename a => b (85%)
Switched to a new branch 'C'
[C b377120] C
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename a => c (100%)
Automatic merge went well; stopped before committing as requested
[detached HEAD 92de235] Merge commit C^0 into HEAD
Author: A U Thor <author@example.com>
Automatic merge went well; stopped before committing as requested
[detached HEAD 9803b5d] Merge commit B^0 into HEAD
Author: A U Thor <author@example.com>
ok 19 - setup rename/rename(1to2)/modify followed by what looks like rename/rename(2to1)/modify
expecting success:
(
cd rename-squared-squared &&
git checkout D^0 &&
git merge -s recursive E^0 &&
git ls-files -s >out &&
test_line_count = 1 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
test $(git rev-parse HEAD:newname) = $(git rev-parse E:newname)
)
Previous HEAD position was 9803b5d Merge commit B^0 into HEAD
HEAD is now at 92de235 Merge commit C^0 into HEAD
Merging:
92de235 Merge commit C^0 into HEAD
virtual E^0
found 2 common ancestors:
b377120 C
5ac8ac6 B
Merging:
b377120 C
5ac8ac6 B
found 1 common ancestor:
00861ca A
CONFLICT (rename/rename): Rename "a"->"c" in branch "Temporary merge branch 1" rename "a"->"b" in "Temporary merge branch 2" (left unresolved)
Merge made by the 'recursive' strategy.
newname | 1 +
1 file changed, 1 insertion(+)
ok 20 - handle rename/rename(1to2)/modify followed by what looks like rename/rename(2to1)/modify
expecting success:
test_create_repo rename-rename-add-source &&
(
cd rename-rename-add-source &&
printf "lots\nof\nwords\nand\ncontent\n" >a &&
git add a &&
git commit -m A &&
git tag A &&
git checkout -b B A &&
git mv a b &&
git commit -m B &&
git checkout -b C A &&
git mv a c &&
printf "2\n3\n4\n5\n6\n7\n" >a &&
git add a &&
git commit -m C &&
git checkout B^0 &&
git merge --no-commit -s ours C^0 &&
git checkout C -- a c &&
mv a old_a &&
echo 1 >a &&
cat old_a >>a &&
rm old_a &&
git add -u &&
git commit -m "Merge commit C^0 into HEAD" &&
git tag D &&
git checkout C^0 &&
git merge --no-commit -s ours B^0 &&
git checkout B -- b &&
echo 8 >>a &&
git add -u &&
git commit -m "Merge commit B^0 into HEAD" &&
git tag E
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/rename-rename-add-source/.git/
[master (root-commit) 98459d3] A
Author: A U Thor <author@example.com>
1 file changed, 5 insertions(+)
create mode 100644 a
Switched to a new branch 'B'
[B 7182ef9] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename a => b (100%)
Switched to a new branch 'C'
[C 2349dcc] C
Author: A U Thor <author@example.com>
2 files changed, 11 insertions(+), 5 deletions(-)
create mode 100644 c
Note: switching to 'B^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 7182ef9 B
Automatic merge went well; stopped before committing as requested
[detached HEAD c6174eb] Merge commit C^0 into HEAD
Author: A U Thor <author@example.com>
Previous HEAD position was c6174eb Merge commit C^0 into HEAD
HEAD is now at 2349dcc C
Automatic merge went well; stopped before committing as requested
[detached HEAD 68d143f] Merge commit B^0 into HEAD
Author: A U Thor <author@example.com>
ok 21 - setup criss-cross + rename/rename/add-source + modify/modify
checking known breakage:
(
cd rename-rename-add-source &&
git checkout D^0 &&
git merge -s recursive E^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
printf "1\n2\n3\n4\n5\n6\n7\n8\n" >correct &&
git rev-parse >expect \
A:a A:a \
correct &&
git rev-parse >actual \
:0:b :0:c &&
git hash-object >>actual \
a &&
test_cmp expect actual
)
Previous HEAD position was 68d143f Merge commit B^0 into HEAD
HEAD is now at c6174eb Merge commit C^0 into HEAD
Merging:
c6174eb Merge commit C^0 into HEAD
virtual E^0
found 2 common ancestors:
7182ef9 B
2349dcc C
Merging:
7182ef9 B
2349dcc C
found 1 common ancestor:
98459d3 A
CONFLICT (add/add): Merge conflict in a
Auto-merging a
Automatic merge failed; fix conflicts and then commit the result.
not ok 22 - detect rename/rename/add-source for virtual merge-base # TODO known breakage
expecting success:
test_create_repo rename-rename-add-dest &&
(
cd rename-rename-add-dest &&
>a &&
git add a &&
git commit -m A &&
git tag A &&
git checkout -b B A &&
git mv a b &&
printf "1\n2\n3\n4\n5\n6\n7\n" >c &&
git add c &&
git commit -m B &&
git checkout -b C A &&
git mv a c &&
git commit -m C &&
git checkout B^0 &&
git merge --no-commit -s ours C^0 &&
git mv b a &&
git commit -m "D is like B but renames b back to a" &&
git tag D &&
git checkout B^0 &&
git merge --no-commit -s ours C^0 &&
git mv b a &&
echo 8 >>c &&
git add c &&
git commit -m "E like D but has mod in c" &&
git tag E
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/rename-rename-add-dest/.git/
[master (root-commit) 5617452] A
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a
Switched to a new branch 'B'
[B 52ed23d] B
Author: A U Thor <author@example.com>
2 files changed, 7 insertions(+)
rename a => b (100%)
create mode 100644 c
Switched to a new branch 'C'
[C 76f230f] C
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename a => c (100%)
Note: switching to 'B^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 52ed23d B
Automatic merge went well; stopped before committing as requested
[detached HEAD 636b702] D is like B but renames b back to a
Author: A U Thor <author@example.com>
Previous HEAD position was 636b702 D is like B but renames b back to a
HEAD is now at 52ed23d B
Automatic merge went well; stopped before committing as requested
[detached HEAD 4d57b93] E like D but has mod in c
Author: A U Thor <author@example.com>
ok 23 - setup criss-cross+rename/rename/add-dest + simple modify
expecting success:
(
cd rename-rename-add-dest &&
git checkout D^0 &&
git merge -s recursive E^0 &&
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >expect \
A:a E:c &&
git rev-parse >actual \
:0:a :0:c &&
test_cmp expect actual
)
Previous HEAD position was 4d57b93 E like D but has mod in c
HEAD is now at 636b702 D is like B but renames b back to a
Merging:
636b702 D is like B but renames b back to a
virtual E^0
found 2 common ancestors:
76f230f C
52ed23d B
Merging:
76f230f C
52ed23d B
found 1 common ancestor:
5617452 A
CONFLICT (add/add): Merge conflict in c
Auto-merging c
Merge made by the 'recursive' strategy.
c | 1 +
1 file changed, 1 insertion(+)
ok 24 - virtual merge base handles rename/rename(1to2)/add-dest
expecting success:
test_create_repo symlink-modify-modify &&
(
cd symlink-modify-modify &&
test_ln_s_add lagoon fickle &&
git commit -m A &&
git tag A &&
git checkout -b B A &&
git rm fickle &&
test_ln_s_add disneyland fickle &&
git commit -m B &&
git checkout -b C A &&
git rm fickle &&
test_ln_s_add home fickle &&
git add fickle &&
git commit -m C &&
git checkout -q B^0 &&
git merge -s ours -m D C^0 &&
git tag D &&
git checkout -q C^0 &&
git merge -s ours -m E B^0 &&
git tag E
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/symlink-modify-modify/.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
)
prerequisite SYMLINKS ok
[master (root-commit) 4b7a138] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 120000 fickle
Switched to a new branch 'B'
rm 'fickle'
[B 05ebe14] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'C'
rm 'fickle'
[C a538273] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Merge made by the 'ours' strategy.
Merge made by the 'ours' strategy.
ok 25 - setup symlink modify/modify
checking known breakage:
(
cd symlink-modify-modify &&
git checkout D^0 &&
test_must_fail git merge -s recursive E^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 3 out &&
git ls-files -o >out &&
test_line_count = 1 out
)
Previous HEAD position was 92dfc44 E
HEAD is now at 1853e16 D
Merging:
1853e16 D
virtual E^0
found 2 common ancestors:
05ebe14 B
a538273 C
Merging:
05ebe14 B
a538273 C
found 1 common ancestor:
4b7a138 A
Auto-merging fickle
CONFLICT (content): Merge conflict in fickle
Merge made by the 'recursive' strategy.
fickle | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
test_must_fail: command succeeded: git merge -s recursive E^0
not ok 26 - check symlink modify/modify # TODO known breakage
expecting success:
test_create_repo symlink-add-add &&
(
cd symlink-add-add &&
touch ignoreme &&
git add ignoreme &&
git commit -m A &&
git tag A &&
git checkout -b B A &&
test_ln_s_add disneyland fickle &&
git commit -m B &&
git checkout -b C A &&
test_ln_s_add home fickle &&
git add fickle &&
git commit -m C &&
git checkout -q B^0 &&
git merge -s ours -m D C^0 &&
git tag D &&
git checkout -q C^0 &&
git merge -s ours -m E B^0 &&
git tag E
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/symlink-add-add/.git/
[master (root-commit) c61a067] A
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 ignoreme
Switched to a new branch 'B'
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
[B 003cba6] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 120000 fickle
Switched to a new branch 'C'
[C adbfeb8] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 120000 fickle
Merge made by the 'ours' strategy.
Merge made by the 'ours' strategy.
ok 27 - setup symlink add/add
checking known breakage:
(
cd symlink-add-add &&
git checkout D^0 &&
test_must_fail git merge -s recursive E^0 &&
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 1 out
)
Previous HEAD position was a316ea0 E
HEAD is now at 7ee0d6d D
Merging:
7ee0d6d D
virtual E^0
found 2 common ancestors:
adbfeb8 C
003cba6 B
Merging:
adbfeb8 C
003cba6 B
found 1 common ancestor:
c61a067 A
CONFLICT (add/add): Merge conflict in fickle
Auto-merging fickle
Already up to date!
Merge made by the 'recursive' strategy.
test_must_fail: command succeeded: git merge -s recursive E^0
not ok 28 - check symlink add/add # TODO known breakage
expecting success:
test_create_repo submodule-modify-modify &&
(
cd submodule-modify-modify &&
test_create_repo submod &&
(
cd submod &&
touch file-A &&
git add file-A &&
git commit -m A &&
git tag A &&
git checkout -b B A &&
touch file-B &&
git add file-B &&
git commit -m B &&
git tag B &&
git checkout -b C A &&
touch file-C &&
git add file-C &&
git commit -m C &&
git tag C
) &&
git -C submod reset --hard A &&
git add submod &&
git commit -m A &&
git tag A &&
git checkout -b B A &&
git -C submod reset --hard B &&
git add submod &&
git commit -m B &&
git checkout -b C A &&
git -C submod reset --hard C &&
git add submod &&
git commit -m C &&
git checkout -q B^0 &&
git merge -s ours -m D C^0 &&
git tag D &&
git checkout -q C^0 &&
git merge -s ours -m E B^0 &&
git tag E
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/submodule-modify-modify/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/submodule-modify-modify/submod/.git/
[master (root-commit) d841aef] A
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file-A
Switched to a new branch 'B'
[B 93b6a59] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file-B
Switched to a new branch 'C'
[C 73946d8] C
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file-C
HEAD is now at d841aef A
warning: adding embedded git repository: submod
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> submod
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached submod
hint:
hint: See "git help submodule" for more information.
[master (root-commit) ef8f4cf] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 160000 submod
Switched to a new branch 'B'
warning: refname 'B' is ambiguous.
warning: refname 'B' is ambiguous.
HEAD is now at 93b6a59 B
[B 908f242] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'C'
M submod
warning: refname 'C' is ambiguous.
warning: refname 'C' is ambiguous.
HEAD is now at 73946d8 C
[C 35548a1] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Merge made by the 'ours' strategy.
Merge made by the 'ours' strategy.
ok 29 - setup submodule modify/modify
checking known breakage:
(
cd submodule-modify-modify &&
git checkout D^0 &&
test_must_fail git merge -s recursive E^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 3 out &&
git ls-files -o >out &&
test_line_count = 1 out
)
Previous HEAD position was 4090b07 E
HEAD is now at 926b206 D
M submod
Merging:
926b206 D
virtual E^0
found 2 common ancestors:
35548a1 C
908f242 B
Merging:
35548a1 C
908f242 B
found 1 common ancestor:
ef8f4cf A
Auto-merging submod
CONFLICT (submodule): Merge conflict in submod
Already up to date!
Merge made by the 'recursive' strategy.
test_must_fail: command succeeded: git merge -s recursive E^0
not ok 30 - check submodule modify/modify # TODO known breakage
expecting success:
test_create_repo submodule-add-add &&
(
cd submodule-add-add &&
test_create_repo submod &&
(
cd submod &&
touch file-A &&
git add file-A &&
git commit -m A &&
git tag A &&
git checkout -b B A &&
touch file-B &&
git add file-B &&
git commit -m B &&
git tag B &&
git checkout -b C A &&
touch file-C &&
git add file-C &&
git commit -m C &&
git tag C
) &&
touch irrelevant-file &&
git add irrelevant-file &&
git commit -m A &&
git tag A &&
git checkout -b B A &&
git -C submod reset --hard B &&
git add submod &&
git commit -m B &&
git checkout -b C A &&
git -C submod reset --hard C &&
git add submod &&
git commit -m C &&
git checkout -q B^0 &&
git merge -s ours -m D C^0 &&
git tag D &&
git checkout -q C^0 &&
git merge -s ours -m E B^0 &&
git tag E
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/submodule-add-add/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/submodule-add-add/submod/.git/
[master (root-commit) e545430] A
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file-A
Switched to a new branch 'B'
[B c72b2ca] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file-B
Switched to a new branch 'C'
[C f391af3] C
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file-C
[master (root-commit) 8e31242] A
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 irrelevant-file
Switched to a new branch 'B'
warning: refname 'B' is ambiguous.
warning: refname 'B' is ambiguous.
HEAD is now at c72b2ca B
warning: adding embedded git repository: submod
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> submod
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached submod
hint:
hint: See "git help submodule" for more information.
[B 42a73be] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 160000 submod
warning: unable to rmdir 'submod': Directory not empty
Switched to a new branch 'C'
warning: refname 'C' is ambiguous.
warning: refname 'C' is ambiguous.
HEAD is now at f391af3 C
warning: adding embedded git repository: submod
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> submod
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached submod
hint:
hint: See "git help submodule" for more information.
[C 6fdb81c] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 160000 submod
Merge made by the 'ours' strategy.
Merge made by the 'ours' strategy.
ok 31 - setup submodule add/add
checking known breakage:
(
cd submodule-add-add &&
git checkout D^0 &&
test_must_fail git merge -s recursive E^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 1 out
)
Previous HEAD position was 6f49703 E
HEAD is now at bc9e592 D
M submod
Merging:
bc9e592 D
virtual E^0
found 2 common ancestors:
6fdb81c C
42a73be B
Merging:
6fdb81c C
42a73be B
found 1 common ancestor:
8e31242 A
CONFLICT (add/add): Merge conflict in submod
Auto-merging submod
Already up to date!
Merge made by the 'recursive' strategy.
test_must_fail: command succeeded: git merge -s recursive E^0
not ok 32 - check submodule add/add # TODO known breakage
expecting success:
test_create_repo submodule-symlink-add-add &&
(
cd submodule-symlink-add-add &&
test_create_repo path &&
(
cd path &&
touch file-B &&
git add file-B &&
git commit -m B &&
git tag B
) &&
touch irrelevant-file &&
git add irrelevant-file &&
git commit -m A &&
git tag A &&
git checkout -b B A &&
git -C path reset --hard B &&
git add path &&
git commit -m B &&
git checkout -b C A &&
rm -rf path/ &&
test_ln_s_add irrelevant-file path &&
git commit -m C &&
git checkout -q B^0 &&
git merge -s ours -m D C^0 &&
git tag D &&
git checkout -q C^0 &&
git merge -s ours -m E B^0 &&
git tag E
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/submodule-symlink-add-add/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/submodule-symlink-add-add/path/.git/
[master (root-commit) f5a5c15] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file-B
[master (root-commit) 4170f20] A
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 irrelevant-file
Switched to a new branch 'B'
HEAD is now at f5a5c15 B
warning: adding embedded git repository: path
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> path
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached path
hint:
hint: See "git help submodule" for more information.
[B 7c735f8] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 160000 path
warning: unable to rmdir 'path': Directory not empty
Switched to a new branch 'C'
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
[C 965cba5] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 120000 path
Merge made by the 'ours' strategy.
Merge made by the 'ours' strategy.
ok 33 - setup conflicting entry types (submodule vs symlink)
checking known breakage:
(
cd submodule-symlink-add-add &&
git checkout D^0 &&
test_must_fail git merge -s recursive E^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 1 out
)
Previous HEAD position was f4a3a1b E
HEAD is now at 2129dfd D
Merging:
2129dfd D
virtual E^0
found 2 common ancestors:
965cba5 C
7c735f8 B
Merging:
965cba5 C
7c735f8 B
found 1 common ancestor:
4170f20 A
CONFLICT (add/add): Merge conflict in path
Merge made by the 'recursive' strategy.
path | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
mode change 160000 => 120000 path
test_must_fail: command succeeded: git merge -s recursive E^0
not ok 34 - check conflicting entry types (submodule vs symlink) # TODO known breakage
expecting success:
test_create_repo regular-file-mode-conflict &&
(
cd regular-file-mode-conflict &&
touch irrelevant-file &&
git add irrelevant-file &&
git commit -m A &&
git tag A &&
git checkout -b B A &&
echo "command_to_run" >source_me.bash &&
git add source_me.bash &&
git commit -m B &&
git checkout -b C A &&
echo "command_to_run" >source_me.bash &&
git add source_me.bash &&
test_chmod +x source_me.bash &&
git commit -m C &&
git checkout -q B^0 &&
git merge -s ours -m D C^0 &&
git tag D &&
git checkout -q C^0 &&
git merge -s ours -m E B^0 &&
git tag E
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/regular-file-mode-conflict/.git/
[master (root-commit) e1d78df] A
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 irrelevant-file
Switched to a new branch 'B'
[B e5e9e02] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 source_me.bash
Switched to a new branch 'C'
[C a195754] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100755 source_me.bash
Merge made by the 'ours' strategy.
Merge made by the 'ours' strategy.
ok 35 - setup conflicting modes for regular file
checking known breakage:
(
cd regular-file-mode-conflict &&
git checkout D^0 &&
test_must_fail git merge -s recursive E^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 1 out
)
Previous HEAD position was c83fee2 E
HEAD is now at 67852f7 D
Merging:
67852f7 D
virtual E^0
found 2 common ancestors:
a195754 C
e5e9e02 B
Merging:
a195754 C
e5e9e02 B
found 1 common ancestor:
e1d78df A
CONFLICT (add/add): Merge conflict in source_me.bash
Auto-merging source_me.bash
Already up to date!
Merge made by the 'recursive' strategy.
test_must_fail: command succeeded: git merge -s recursive E^0
not ok 36 - check conflicting modes for regular file # TODO known breakage
expecting success:
test_create_repo nested_conflicts &&
(
cd nested_conflicts &&
# Create some related files now
for i in $(test_seq 1 10)
do
echo Random base content line $i
done >initial &&
cp initial b_L1 &&
cp initial b_R1 &&
cp initial b_L2 &&
cp initial b_R2 &&
cp initial a_L1 &&
cp initial a_R1 &&
cp initial a_L2 &&
cp initial a_R2 &&
test_write_lines b b_L1 >>b_L1 &&
test_write_lines b b_R1 >>b_R1 &&
test_write_lines b b_L2 >>b_L2 &&
test_write_lines b b_R2 >>b_R2 &&
test_write_lines a a_L1 >>a_L1 &&
test_write_lines a a_R1 >>a_R1 &&
test_write_lines a a_L2 >>a_L2 &&
test_write_lines a a_R2 >>a_R2 &&
# Setup original commit (or merge-base), consisting of
# files named "b" and "a"
cp initial b &&
cp initial a &&
echo b >>b &&
echo a >>a &&
git add b a &&
test_tick && git commit -m initial &&
git branch L &&
git branch R &&
# Handle the left side
git checkout L &&
mv -f b_L1 b &&
mv -f a_L1 a &&
git add b a &&
test_tick && git commit -m "version L1 of files" &&
git tag L1 &&
# Handle the right side
git checkout R &&
mv -f b_R1 b &&
mv -f a_R1 a &&
git add b a &&
test_tick && git commit -m "verson R1 of files" &&
git tag R1 &&
# Create first merge on left side
git checkout L &&
test_must_fail git merge R1 &&
mv -f b_L2 b &&
mv -f a_L2 a &&
git add b a &&
git mv b m &&
test_tick && git commit -m "left merge, rename b->m" &&
git tag L2 &&
# Create first merge on right side
git checkout R &&
test_must_fail git merge L1 &&
mv -f b_R2 b &&
mv -f a_R2 a &&
git add b a &&
git mv a m &&
test_tick && git commit -m "right merge, rename a->m" &&
git tag R2
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/nested_conflicts/.git/
[master (root-commit) 64965f6] initial
Author: A U Thor <author@example.com>
2 files changed, 22 insertions(+)
create mode 100644 a
create mode 100644 b
Switched to branch 'L'
[L e512e8b] version L1 of files
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
Switched to branch 'R'
[R 1d29055] verson R1 of files
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
Switched to branch 'L'
Merging:
e512e8b version L1 of files
virtual R1
found 1 common ancestor:
64965f6 initial
Auto-merging b
CONFLICT (content): Merge conflict in b
Auto-merging a
CONFLICT (content): Merge conflict in a
Automatic merge failed; fix conflicts and then commit the result.
[L 8027078] left merge, rename b->m
Author: A U Thor <author@example.com>
Switched to branch 'R'
Merging:
1d29055 verson R1 of files
virtual L1
found 1 common ancestor:
64965f6 initial
Auto-merging b
CONFLICT (content): Merge conflict in b
Auto-merging a
CONFLICT (content): Merge conflict in a
Automatic merge failed; fix conflicts and then commit the result.
[R 5e3517b] right merge, rename a->m
Author: A U Thor <author@example.com>
ok 37 - setup nested conflicts
expecting success:
(
cd nested_conflicts &&
git clean -f &&
git checkout L2^0 &&
# Merge must fail; there is a conflict
test_must_fail git -c merge.conflictstyle=diff3 merge -s recursive R2^0 &&
# Make sure the index has the right number of entries
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
# Ensure we have the correct number of untracked files
git ls-files -o >out &&
test_line_count = 1 out &&
# Create a and b from virtual merge base X
git cat-file -p master:a >base &&
git cat-file -p L1:a >ours &&
git cat-file -p R1:a >theirs &&
test_must_fail git merge-file --diff3 \
-L "Temporary merge branch 1" \
-L "merged common ancestors" \
-L "Temporary merge branch 2" \
ours \
base \
theirs &&
sed -e "s/^\([<|=>]\)/\1\1/" ours >vmb_a &&
git cat-file -p master:b >base &&
git cat-file -p L1:b >ours &&
git cat-file -p R1:b >theirs &&
test_must_fail git merge-file --diff3 \
-L "Temporary merge branch 1" \
-L "merged common ancestors" \
-L "Temporary merge branch 2" \
ours \
base \
theirs &&
sed -e "s/^\([<|=>]\)/\1\1/" ours >vmb_b &&
# Compare :2:m to expected values
git cat-file -p L2:m >ours &&
git cat-file -p R2:b >theirs &&
test_must_fail git merge-file --diff3 \
-L "HEAD:m" \
-L "merged common ancestors:b" \
-L "R2^0:b" \
ours \
vmb_b \
theirs &&
sed -e "s/^\([<|=>]\)/\1\1/" ours >m_stage_2 &&
git cat-file -p :2:m >actual &&
test_cmp m_stage_2 actual &&
# Compare :3:m to expected values
git cat-file -p L2:a >ours &&
git cat-file -p R2:m >theirs &&
test_must_fail git merge-file --diff3 \
-L "HEAD:a" \
-L "merged common ancestors:a" \
-L "R2^0:m" \
ours \
vmb_a \
theirs &&
sed -e "s/^\([<|=>]\)/\1\1/" ours >m_stage_3 &&
git cat-file -p :3:m >actual &&
test_cmp m_stage_3 actual &&
# Compare m to expected contents
>empty &&
cp m_stage_2 expected_final_m &&
test_must_fail git merge-file --diff3 \
-L "HEAD" \
-L "merged common ancestors" \
-L "R2^0" \
expected_final_m \
empty \
m_stage_3 &&
test_cmp expected_final_m m
)
Removing initial
Note: switching to 'L2^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8027078 left merge, rename b->m
Merging:
8027078 left merge, rename b->m
virtual R2^0
found 2 common ancestors:
e512e8b version L1 of files
1d29055 verson R1 of files
Merging:
e512e8b version L1 of files
1d29055 verson R1 of files
found 1 common ancestor:
64965f6 initial
Auto-merging b
CONFLICT (content): Merge conflict in b
Auto-merging a
CONFLICT (content): Merge conflict in a
CONFLICT (rename/rename): Rename b->m in HEAD. Rename a->m in R2^0
Auto-merging version of m from b
Auto-merging version of m from a
Auto-merging m
Automatic merge failed; fix conflicts and then commit the result.
ok 38 - check nested conflicts
expecting success:
test_create_repo virtual_merge_base_has_nested_conflicts &&
(
cd virtual_merge_base_has_nested_conflicts &&
# Create some related files now
for i in $(test_seq 1 10)
do
echo Random base content line $i
done >content &&
# Setup original commit
git add content &&
test_tick && git commit -m initial &&
git branch L &&
git branch R &&
# Create L1
git checkout L &&
echo left >>content &&
git add content &&
test_tick && git commit -m "version L1 of content" &&
git tag L1 &&
# Create R1
git checkout R &&
echo right >>content &&
git add content &&
test_tick && git commit -m "verson R1 of content" &&
git tag R1 &&
# Create L2
git checkout L &&
test_must_fail git -c merge.conflictstyle=diff3 merge R1 &&
git checkout L1 content &&
test_tick && git commit -m "version L2 of content" &&
git tag L2 &&
# Create R2
git checkout R &&
test_must_fail git -c merge.conflictstyle=diff3 merge L1 &&
git checkout R1 content &&
test_tick && git commit -m "version R2 of content" &&
git tag R2 &&
# Create L3
git checkout L &&
test_must_fail git -c merge.conflictstyle=diff3 merge R2 &&
git checkout L1 content &&
test_tick && git commit -m "version L3 of content" &&
git tag L3 &&
# Create R3
git checkout R &&
test_must_fail git -c merge.conflictstyle=diff3 merge L2 &&
git checkout R1 content &&
test_tick && git commit -m "version R3 of content" &&
git tag R3
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6036-recursive-corner-cases/virtual_merge_base_has_nested_conflicts/.git/
[master (root-commit) 0e6d233] initial
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 content
Switched to branch 'L'
[L 80f6449] version L1 of content
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'R'
[R 1abad2a] verson R1 of content
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'L'
Merging:
80f6449 version L1 of content
virtual R1
found 1 common ancestor:
0e6d233 initial
Auto-merging content
CONFLICT (content): Merge conflict in content
Automatic merge failed; fix conflicts and then commit the result.
Updated 1 path from 42730fb
[L 51cac71] version L2 of content
Author: A U Thor <author@example.com>
Switched to branch 'R'
Merging:
1abad2a verson R1 of content
virtual L1
found 1 common ancestor:
0e6d233 initial
Auto-merging content
CONFLICT (content): Merge conflict in content
Automatic merge failed; fix conflicts and then commit the result.
Updated 1 path from 5ac3d63
[R 2a2d194] version R2 of content
Author: A U Thor <author@example.com>
Switched to branch 'L'
Merging:
51cac71 version L2 of content
virtual R2
found 2 common ancestors:
80f6449 version L1 of content
1abad2a verson R1 of content
Merging:
80f6449 version L1 of content
1abad2a verson R1 of content
found 1 common ancestor:
0e6d233 initial
Auto-merging content
CONFLICT (content): Merge conflict in content
Auto-merging content
CONFLICT (content): Merge conflict in content
Automatic merge failed; fix conflicts and then commit the result.
Updated 1 path from 42730fb
[L be19b21] version L3 of content
Author: A U Thor <author@example.com>
Switched to branch 'R'
Merging:
2a2d194 version R2 of content
virtual L2
found 2 common ancestors:
80f6449 version L1 of content
1abad2a verson R1 of content
Merging:
80f6449 version L1 of content
1abad2a verson R1 of content
found 1 common ancestor:
0e6d233 initial
Auto-merging content
CONFLICT (content): Merge conflict in content
Auto-merging content
CONFLICT (content): Merge conflict in content
Automatic merge failed; fix conflicts and then commit the result.
Updated 1 path from 5ac3d63
[R 37fcb4b] version R3 of content
Author: A U Thor <author@example.com>
ok 39 - setup virtual merge base with nested conflicts
expecting success:
(
cd virtual_merge_base_has_nested_conflicts &&
git checkout L3^0 &&
# Merge must fail; there is a conflict
test_must_fail git -c merge.conflictstyle=diff3 merge -s recursive R3^0 &&
# Make sure the index has the right number of entries
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 3 out &&
# Ensure we have the correct number of untracked files
git ls-files -o >out &&
test_line_count = 1 out &&
# Compare :[23]:content to expected values
git rev-parse L1:content R1:content >expect &&
git rev-parse :2:content :3:content >actual &&
test_cmp expect actual &&
# Imitate X1 merge base, except without long enough conflict
# markers because a subsequent sed will modify them. Put
# result into vmb.
git cat-file -p master:content >base &&
git cat-file -p L:content >left &&
git cat-file -p R:content >right &&
cp left merged-once &&
test_must_fail git merge-file --diff3 \
-L "Temporary merge branch 1" \
-L "merged common ancestors" \
-L "Temporary merge branch 2" \
merged-once \
base \
right &&
sed -e "s/^\([<|=>]\)/\1\1\1/" merged-once >vmb &&
# Imitate X2 merge base, overwriting vmb. Note that we
# extend both sets of conflict markers to make them longer
# with the sed command.
cp left merged-twice &&
test_must_fail git merge-file --diff3 \
-L "Temporary merge branch 1" \
-L "merged common ancestors" \
-L "Temporary merge branch 2" \
merged-twice \
vmb \
right &&
sed -e "s/^\([<|=>]\)/\1\1\1/" merged-twice >vmb &&
# Compare :1:content to expected value
git cat-file -p :1:content >actual &&
test_cmp vmb actual &&
# Determine expected content in final outer merge, compare to
# what the merge generated.
cp -f left expect &&
test_must_fail git merge-file --diff3 \
-L "HEAD" -L "merged common ancestors" -L "R3^0" \
expect vmb right &&
test_cmp expect content
)
Note: switching to 'L3^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at be19b21 version L3 of content
Merging:
be19b21 version L3 of content
virtual R3^0
found 2 common ancestors:
51cac71 version L2 of content
2a2d194 version R2 of content
Merging:
51cac71 version L2 of content
2a2d194 version R2 of content
found 2 common ancestors:
80f6449 version L1 of content
1abad2a verson R1 of content
Merging:
80f6449 version L1 of content
1abad2a verson R1 of content
found 1 common ancestor:
0e6d233 initial
Auto-merging content
CONFLICT (content): Merge conflict in content
Auto-merging content
CONFLICT (content): Merge conflict in content
Auto-merging content
CONFLICT (content): Merge conflict in content
Automatic merge failed; fix conflicts and then commit the result.
ok 40 - check virtual merge base with nested conflicts
# still have 8 known breakage(s)
# passed all remaining 32 test(s)
1..40
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6042-merge-rename-corner-cases.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/.git/
expecting success:
test_create_repo rename-delete-untracked &&
(
cd rename-delete-untracked &&
echo "A pretty inscription" >ring &&
git add ring &&
test_tick &&
git commit -m beginning &&
git branch people &&
git checkout -b rename-the-ring &&
git mv ring one-ring-to-rule-them-all &&
test_tick &&
git commit -m fullname &&
git checkout people &&
git rm ring &&
echo gollum >owner &&
git add owner &&
test_tick &&
git commit -m track-people-instead-of-objects &&
echo "Myyy PRECIOUSSS" >ring
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/rename-delete-untracked/.git/
[master (root-commit) f8aae21] beginning
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 ring
Switched to a new branch 'rename-the-ring'
[rename-the-ring a71a7c5] fullname
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename ring => one-ring-to-rule-them-all (100%)
Switched to branch 'people'
rm 'ring'
[people e4672ee] track-people-instead-of-objects
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
create mode 100644 owner
delete mode 100644 ring
ok 1 - setup rename/delete + untracked file
expecting success:
(
cd rename-delete-untracked &&
test_must_fail git merge -s recursive rename-the-ring &&
# Make sure git did not delete an untracked file
test_path_is_file ring
)
Merging:
e4672ee track-people-instead-of-objects
virtual rename-the-ring
found 1 common ancestor:
f8aae21 beginning
CONFLICT (rename/delete): ring deleted in HEAD and renamed to one-ring-to-rule-them-all in rename-the-ring. Version rename-the-ring of one-ring-to-rule-them-all left in tree.
Automatic merge failed; fix conflicts and then commit the result.
ok 2 - Does git preserve Gollum's precious artifact?
expecting success:
test_create_repo rename-modify-add-source &&
(
cd rename-modify-add-source &&
printf "1\n2\n3\n4\n5\n6\n7\n" >a &&
git add a &&
git commit -m A &&
git tag A &&
git checkout -b B A &&
echo 8 >>a &&
git add a &&
git commit -m B &&
git checkout -b C A &&
git mv a b &&
echo something completely different >a &&
git add a &&
git commit -m C
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/rename-modify-add-source/.git/
[master (root-commit) 43af487] A
Author: A U Thor <author@example.com>
1 file changed, 7 insertions(+)
create mode 100644 a
Switched to a new branch 'B'
[B 30e95e2] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to a new branch 'C'
[C 453910a] C
Author: A U Thor <author@example.com>
2 files changed, 8 insertions(+), 7 deletions(-)
create mode 100644 b
ok 3 - setup rename/modify/add-source conflict
checking known breakage:
(
cd rename-modify-add-source &&
git checkout B^0 &&
git merge -s recursive C^0 &&
git rev-parse >expect \
B:a C:a &&
git rev-parse >actual \
b c &&
test_cmp expect actual
)
Note: switching to 'B^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 30e95e2 B
Merging:
30e95e2 B
virtual C^0
found 1 common ancestor:
43af487 A
Auto-merging a
CONFLICT (content): Merge conflict in a
Automatic merge failed; fix conflicts and then commit the result.
not ok 4 - rename/modify/add-source conflict resolvable # TODO known breakage
expecting success:
test_create_repo break-detection-1 &&
(
cd break-detection-1 &&
printf "1\n2\n3\n4\n5\n" >a &&
echo foo >b &&
git add a b &&
git commit -m A &&
git tag A &&
git checkout -b B A &&
git mv a c &&
echo "Completely different content" >a &&
git add a &&
git commit -m B &&
git checkout -b C A &&
echo 6 >>a &&
git add a &&
git commit -m C
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/break-detection-1/.git/
[master (root-commit) 206eab2] A
Author: A U Thor <author@example.com>
2 files changed, 6 insertions(+)
create mode 100644 a
create mode 100644 b
Switched to a new branch 'B'
[B 80649a7] B
Author: A U Thor <author@example.com>
2 files changed, 6 insertions(+), 5 deletions(-)
create mode 100644 c
Switched to a new branch 'C'
[C d0f96f0] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 5 - setup resolvable conflict missed if rename missed
checking known breakage:
(
cd break-detection-1 &&
git checkout -q C^0 &&
git merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
test_line_count = 6 c &&
git rev-parse >expect \
B:a A:b &&
git rev-parse >actual \
:0:a :0:b &&
test_cmp expect actual
)
Merging:
d0f96f0 C
virtual B^0
found 1 common ancestor:
206eab2 A
Auto-merging a
CONFLICT (content): Merge conflict in a
Automatic merge failed; fix conflicts and then commit the result.
not ok 6 - conflict caused if rename not detected # TODO known breakage
expecting success:
test_create_repo break-detection-2 &&
(
cd break-detection-2 &&
printf "1\n2\n3\n4\n5\n" >a &&
echo foo >b &&
git add a b &&
git commit -m A &&
git tag A &&
git checkout -b D A &&
echo 7 >>a &&
git add a &&
git mv a c &&
echo "Completely different content" >a &&
git add a &&
git commit -m D &&
git checkout -b E A &&
git rm a &&
echo "Completely different content" >>a &&
git add a &&
git commit -m E
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/break-detection-2/.git/
[master (root-commit) 206eab2] A
Author: A U Thor <author@example.com>
2 files changed, 6 insertions(+)
create mode 100644 a
create mode 100644 b
Switched to a new branch 'D'
[D 908d01b] D
Author: A U Thor <author@example.com>
2 files changed, 7 insertions(+), 5 deletions(-)
create mode 100644 c
Switched to a new branch 'E'
rm 'a'
[E 8d2c60e] E
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 5 deletions(-)
ok 7 - setup conflict resolved wrong if rename missed
checking known breakage:
(
cd break-detection-2 &&
git checkout -q E^0 &&
test_must_fail git merge -s recursive D^0
)
Merging:
8d2c60e E
virtual D^0
found 1 common ancestor:
206eab2 A
Merge made by the 'recursive' strategy.
c | 6 ++++++
1 file changed, 6 insertions(+)
create mode 100644 c
test_must_fail: command succeeded: git merge -s recursive D^0
not ok 8 - missed conflict if rename not detected # TODO known breakage
expecting success:
test_create_repo break-detection-3 &&
(
cd break-detection-3 &&
printf "1\n2\n3\n4\n5\n" >a &&
git add a &&
git commit -m A &&
git tag A &&
git checkout -b B A &&
git mv a b &&
git commit -m B &&
git checkout -b C A &&
git mv a b &&
echo foobar >a &&
git add a &&
git commit -m C
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/break-detection-3/.git/
[master (root-commit) 52976ab] A
Author: A U Thor <author@example.com>
1 file changed, 5 insertions(+)
create mode 100644 a
Switched to a new branch 'B'
[B dc4dbd3] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename a => b (100%)
Switched to a new branch 'C'
[C 02113cd] C
Author: A U Thor <author@example.com>
2 files changed, 6 insertions(+), 5 deletions(-)
create mode 100644 b
ok 9 - setup undetected rename/add-source causes data loss
checking known breakage:
(
cd break-detection-3 &&
git checkout B^0 &&
git merge -s recursive C^0 &&
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
test_path_is_file a &&
test_path_is_file b &&
git rev-parse >expect \
A:a C:a &&
git rev-parse >actual \
:0:b :0:a &&
test_cmp expect actual
)
Note: switching to 'B^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at dc4dbd3 B
Merging:
dc4dbd3 B
virtual C^0
found 1 common ancestor:
52976ab A
Merge made by the 'recursive' strategy.
test_line_count: line count for out != 2
100644 8a1218a1024a212bb3db30becd860315f9f3ac52 0 b
not ok 10 - detect rename/add-source and preserve all data # TODO known breakage
checking known breakage:
(
cd break-detection-3 &&
git checkout C^0 &&
git merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
test_path_is_file a &&
test_path_is_file b &&
git rev-parse >expect \
A:a C:a &&
git rev-parse >actual \
:0:b :0:a &&
test_cmp expect actual
)
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
4e0dda6 Merge commit 'C^0' 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> 4e0dda6
HEAD is now at 02113cd C
Merging:
02113cd C
virtual B^0
found 1 common ancestor:
52976ab A
Merge made by the 'recursive' strategy.
a | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 a
test_line_count: line count for out != 2
100644 8a1218a1024a212bb3db30becd860315f9f3ac52 0 b
not ok 11 - detect rename/add-source and preserve all data, merge other way # TODO known breakage
expecting success:
test_create_repo rename-directory-1 &&
(
cd rename-directory-1 &&
printf "1\n2\n3\n4\n5\n6\n" >file &&
git add file &&
test_tick &&
git commit -m base &&
git tag base &&
git checkout -b right &&
echo 7 >>file &&
mkdir newfile &&
echo junk >newfile/realfile &&
git add file newfile/realfile &&
test_tick &&
git commit -m right &&
git checkout -b left-conflict base &&
echo 8 >>file &&
git add file &&
git mv file newfile &&
test_tick &&
git commit -m left &&
git checkout -b left-clean base &&
echo 0 >newfile &&
cat file >>newfile &&
git add newfile &&
git rm file &&
test_tick &&
git commit -m left
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/rename-directory-1/.git/
[master (root-commit) 5d406c8] base
Author: A U Thor <author@example.com>
1 file changed, 6 insertions(+)
create mode 100644 file
Switched to a new branch 'right'
[right dc837db] right
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 newfile/realfile
Switched to a new branch 'left-conflict'
[left-conflict f852c67] left
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rename file => newfile (85%)
Switched to a new branch 'left-clean'
rm 'file'
[left-clean d514fb5] left
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rename file => newfile (85%)
ok 12 - setup content merge + rename/directory conflict
expecting success:
(
cd rename-directory-1 &&
git checkout left-clean^0 &&
test_must_fail git merge -s recursive right^0 &&
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 1 out &&
git ls-files -o >out &&
test_line_count = 2 out &&
echo 0 >expect &&
git cat-file -p base:file >>expect &&
echo 7 >>expect &&
test_cmp expect newfile~HEAD &&
test $(git rev-parse :2:newfile) = $(git hash-object expect) &&
test_path_is_file newfile/realfile &&
test_path_is_file newfile~HEAD
)
Note: switching to 'left-clean^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d514fb5 left
Merging:
d514fb5 left
virtual right^0
found 1 common ancestor:
5d406c8 base
Adding newfile/realfile
Removing newfile to make room for subdirectory
Auto-merging newfile
Refusing to lose dirty file at newfile
Adding as newfile~HEAD instead
Automatic merge failed; fix conflicts and then commit the result.
ok 13 - rename/directory conflict + clean content merge
expecting success:
(
cd rename-directory-1 &&
git reset --hard &&
git clean -fdqx &&
git checkout left-conflict^0 &&
test_must_fail git merge -s recursive right^0 &&
git ls-files -s >out &&
test_line_count = 4 out &&
git ls-files -u >out &&
test_line_count = 3 out &&
git ls-files -o >out &&
test_line_count = 2 out &&
git cat-file -p left-conflict:newfile >left &&
git cat-file -p base:file >base &&
git cat-file -p right:file >right &&
test_must_fail git merge-file \
-L "HEAD:newfile" \
-L "" \
-L "right^0:file" \
left base right &&
test_cmp left newfile~HEAD &&
git rev-parse >expect \
base:file left-conflict:newfile right:file &&
git rev-parse >actual \
:1:newfile :2:newfile :3:newfile &&
test_cmp expect actual &&
test_path_is_file newfile/realfile &&
test_path_is_file newfile~HEAD
)
HEAD is now at d514fb5 left
Previous HEAD position was d514fb5 left
HEAD is now at f852c67 left
Merging:
f852c67 left
virtual right^0
found 1 common ancestor:
5d406c8 base
Adding newfile/realfile
Removing newfile to make room for subdirectory
Auto-merging newfile
CONFLICT (content): Merge conflict in newfile
Refusing to lose dirty file at newfile
Adding as newfile~HEAD instead
Automatic merge failed; fix conflicts and then commit the result.
ok 14 - rename/directory conflict + content merge conflict
expecting success:
test_create_repo rename-directory-2 &&
(
cd rename-directory-2 &&
mkdir sub &&
printf "1\n2\n3\n4\n5\n6\n" >sub/file &&
git add sub/file &&
test_tick &&
git commit -m base &&
git tag base &&
git checkout -b right &&
echo 7 >>sub/file &&
git add sub/file &&
test_tick &&
git commit -m right &&
git checkout -b left base &&
echo 0 >newfile &&
cat sub/file >>newfile &&
git rm sub/file &&
mv newfile sub &&
git add sub &&
test_tick &&
git commit -m left
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/rename-directory-2/.git/
[master (root-commit) e5bf87d] base
Author: A U Thor <author@example.com>
1 file changed, 6 insertions(+)
create mode 100644 sub/file
Switched to a new branch 'right'
[right b3c3df6] right
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to a new branch 'left'
rm 'sub/file'
[left 8e220aa] left
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rename sub/file => sub (85%)
ok 15 - setup content merge + rename/directory conflict w/ disappearing dir
expecting success:
(
cd rename-directory-2 &&
git checkout left^0 &&
git merge -s recursive right^0 &&
git ls-files -s >out &&
test_line_count = 1 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
echo 0 >expect &&
git cat-file -p base:sub/file >>expect &&
echo 7 >>expect &&
test_cmp expect sub &&
test_path_is_file sub
)
Note: switching to 'left^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8e220aa left
Merging:
8e220aa left
virtual right^0
found 1 common ancestor:
e5bf87d base
Auto-merging sub
Merge made by the 'recursive' strategy.
sub | 1 +
1 file changed, 1 insertion(+)
ok 16 - disappearing dir in rename/directory conflict handled
expecting success:
test_create_repo rename-with-content-merge-and-add &&
(
cd rename-with-content-merge-and-add &&
test_seq 1 5 >a &&
git add a &&
git commit -m O &&
git tag O &&
git checkout -b A O &&
git mv a b &&
test_seq 0 5 >b &&
git add b &&
git commit -m A &&
git checkout -b B O &&
echo 6 >>a &&
echo hello world >b &&
git add a b &&
git commit -m B
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/rename-with-content-merge-and-add/.git/
[master (root-commit) 5885f2f] O
Author: A U Thor <author@example.com>
1 file changed, 5 insertions(+)
create mode 100644 a
Switched to a new branch 'A'
[A 1af5c39] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rename a => b (83%)
Switched to a new branch 'B'
[B 360e678] B
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 b
ok 17 - setup rename-with-content-merge vs. add
expecting success:
(
cd rename-with-content-merge-and-add &&
git checkout A^0 &&
test_must_fail git merge -s recursive B^0 >out &&
test_i18ngrep "CONFLICT (rename/add)" out &&
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
# Also, make sure both unmerged entries are for "b"
git ls-files -u b >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
test_path_is_missing a &&
test_path_is_file b &&
test_seq 0 6 >tmp &&
git hash-object tmp >expect &&
git rev-parse B:b >>expect &&
git rev-parse >actual \
:2:b :3:b &&
test_cmp expect actual &&
# Test that the two-way merge in b is as expected
git cat-file -p :2:b >>ours &&
git cat-file -p :3:b >>theirs &&
>empty &&
test_must_fail git merge-file \
-L "HEAD" \
-L "" \
-L "B^0" \
ours empty theirs &&
test_cmp ours b
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 1af5c39 A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (rename/add): Rename a->b in HEAD. Added b in B^0
ok 18 - handle rename-with-content-merge vs. add
expecting success:
(
cd rename-with-content-merge-and-add &&
git reset --hard &&
git clean -fdx &&
git checkout B^0 &&
test_must_fail git merge -s recursive A^0 >out &&
test_i18ngrep "CONFLICT (rename/add)" out &&
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
# Also, make sure both unmerged entries are for "b"
git ls-files -u b >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
test_path_is_missing a &&
test_path_is_file b &&
test_seq 0 6 >tmp &&
git rev-parse B:b >expect &&
git hash-object tmp >>expect &&
git rev-parse >actual \
:2:b :3:b &&
test_cmp expect actual &&
# Test that the two-way merge in b is as expected
git cat-file -p :2:b >>ours &&
git cat-file -p :3:b >>theirs &&
>empty &&
test_must_fail git merge-file \
-L "HEAD" \
-L "" \
-L "A^0" \
ours empty theirs &&
test_cmp ours b
)
HEAD is now at 1af5c39 A
Removing actual
Removing empty
Removing expect
Removing ours
Removing out
Removing theirs
Removing tmp
Previous HEAD position was 1af5c39 A
HEAD is now at 360e678 B
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (rename/add): Rename a->b in A^0. Added b in HEAD
ok 19 - handle rename-with-content-merge vs. add, merge other way
expecting success:
test_create_repo rename-rename-2to1 &&
(
cd rename-rename-2to1 &&
printf "1\n2\n3\n4\n5\n" >a &&
printf "5\n4\n3\n2\n1\n" >b &&
git add a b &&
git commit -m A &&
git tag A &&
git checkout -b B A &&
git mv a c &&
echo 0 >>b &&
git add b &&
git commit -m B &&
git checkout -b C A &&
git mv b c &&
echo 6 >>a &&
git add a &&
git commit -m C
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/rename-rename-2to1/.git/
[master (root-commit) 626e9e7] A
Author: A U Thor <author@example.com>
2 files changed, 10 insertions(+)
create mode 100644 a
create mode 100644 b
Switched to a new branch 'B'
[B 46ba58f] B
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
rename a => c (100%)
Switched to a new branch 'C'
[C 0f7b324] C
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
rename b => c (100%)
ok 20 - setup rename/rename (2to1) + modify/modify
expecting success:
(
cd rename-rename-2to1 &&
git checkout B^0 &&
test_must_fail git merge -s recursive C^0 >out &&
test_i18ngrep "CONFLICT (rename/rename)" out &&
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
git ls-files -u c >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
test_path_is_missing a &&
test_path_is_missing b &&
git rev-parse >expect \
C:a B:b &&
git rev-parse >actual \
:2:c :3:c &&
test_cmp expect actual &&
# Test that the two-way merge in new_a is as expected
git cat-file -p :2:c >>ours &&
git cat-file -p :3:c >>theirs &&
>empty &&
test_must_fail git merge-file \
-L "HEAD" \
-L "" \
-L "C^0" \
ours empty theirs &&
git hash-object c >actual &&
git hash-object ours >expect &&
test_cmp expect actual
)
Note: switching to 'B^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 46ba58f B
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (rename/rename): Rename a->c in HEAD. Rename b->c in C^0
ok 21 - handle rename/rename (2to1) conflict correctly
expecting success:
test_create_repo rename-rename-1to2 &&
(
cd rename-rename-1to2 &&
echo stuff >a &&
git add a &&
test_tick &&
git commit -m A &&
git tag A &&
git checkout -b B A &&
git mv a b &&
test_tick &&
git commit -m B &&
git checkout -b C A &&
git mv a c &&
test_tick &&
git commit -m C
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/rename-rename-1to2/.git/
[master (root-commit) 11fad92] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
Switched to a new branch 'B'
[B f879db6] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename a => b (100%)
Switched to a new branch 'C'
[C e1b84e2] C
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename a => c (100%)
ok 22 - setup simple rename/rename (1to2) conflict
expecting success:
(
cd rename-rename-1to2 &&
git checkout C^0 &&
test_must_fail git merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 3 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
test_path_is_missing a &&
git rev-parse >expect \
A:a A:a A:a \
A:a A:a &&
git rev-parse >actual \
:1:a :3:b :2:c &&
git hash-object >>actual \
b c &&
test_cmp expect actual
)
Note: switching to 'C^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at e1b84e2 C
Merging:
e1b84e2 C
virtual B^0
found 1 common ancestor:
11fad92 A
CONFLICT (rename/rename): Rename "a"->"c" in branch "HEAD" rename "a"->"b" in "B^0"
Automatic merge failed; fix conflicts and then commit the result.
ok 23 - merge has correct working tree contents
expecting success:
test_create_repo rename-rename-1to2-add-source-1 &&
(
cd rename-rename-1to2-add-source-1 &&
printf "1\n2\n3\n4\n5\n6\n7\n" >a &&
git add a &&
git commit -m A &&
git tag A &&
git checkout -b B A &&
git mv a b &&
git commit -m B &&
git checkout -b C A &&
git mv a c &&
echo something completely different >a &&
git add a &&
git commit -m C
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/rename-rename-1to2-add-source-1/.git/
[master (root-commit) 4301a18] A
Author: A U Thor <author@example.com>
1 file changed, 7 insertions(+)
create mode 100644 a
Switched to a new branch 'B'
[B f1e014a] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename a => b (100%)
Switched to a new branch 'C'
[C 29fc3d1] C
Author: A U Thor <author@example.com>
2 files changed, 8 insertions(+), 7 deletions(-)
create mode 100644 c
ok 24 - setup rename/rename(1to2)/add-source conflict
checking known breakage:
(
cd rename-rename-1to2-add-source-1 &&
git checkout B^0 &&
test_must_fail git merge -s recursive C^0 &&
git ls-files -s >out &&
test_line_count = 4 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >expect \
C:a A:a B:b C:C &&
git rev-parse >actual \
:3:a :1:a :2:b :3:c &&
test_cmp expect actual &&
test_path_is_file a &&
test_path_is_file b &&
test_path_is_file c
)
Note: switching to 'B^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at f1e014a B
Merging:
f1e014a B
virtual C^0
found 1 common ancestor:
4301a18 A
Merge made by the 'recursive' strategy.
b | 8 +-------
c | 7 +++++++
2 files changed, 8 insertions(+), 7 deletions(-)
create mode 100644 c
test_must_fail: command succeeded: git merge -s recursive C^0
not ok 25 - detect conflict with rename/rename(1to2)/add-source merge # TODO known breakage
expecting success:
test_create_repo rename-rename-1to2-add-source-2 &&
(
cd rename-rename-1to2-add-source-2 &&
>a &&
git add a &&
test_tick &&
git commit -m base &&
git tag A &&
git checkout -b B A &&
git mv a b &&
test_tick &&
git commit -m one &&
git checkout -b C A &&
git mv a b &&
echo important-info >a &&
git add a &&
test_tick &&
git commit -m two
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/rename-rename-1to2-add-source-2/.git/
[master (root-commit) 43afe1f] base
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a
Switched to a new branch 'B'
[B 866948e] one
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename a => b (100%)
Switched to a new branch 'C'
[C bbf1d8f] two
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 100644 b
ok 26 - setup rename/rename(1to2)/add-source resolvable conflict
checking known breakage:
(
cd rename-rename-1to2-add-source-2 &&
git checkout C^0 &&
git merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >expect \
C:a A:a &&
git rev-parse >actual \
:0:a :0:b &&
test_cmp expect actual
)
Note: switching to 'C^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at bbf1d8f two
Merging:
bbf1d8f two
virtual B^0
found 1 common ancestor:
43afe1f base
CONFLICT (modify/delete): a deleted in B^0 and modified in HEAD. Version HEAD of a left in tree.
Automatic merge failed; fix conflicts and then commit the result.
not ok 27 - rename/rename/add-source still tracks new a file # TODO known breakage
expecting success:
test_create_repo rename-rename-1to2-add-dest &&
(
cd rename-rename-1to2-add-dest &&
echo stuff >a &&
git add a &&
test_tick &&
git commit -m base &&
git tag A &&
git checkout -b B A &&
git mv a b &&
echo precious-data >c &&
git add c &&
test_tick &&
git commit -m one &&
git checkout -b C A &&
git mv a c &&
echo important-info >b &&
git add b &&
test_tick &&
git commit -m two
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/rename-rename-1to2-add-dest/.git/
[master (root-commit) 5b8813c] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
Switched to a new branch 'B'
[B bb6254e] one
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
rename a => b (100%)
create mode 100644 c
Switched to a new branch 'C'
[C e1c123f] two
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 100644 b
rename a => c (100%)
ok 28 - setup rename/rename(1to2)/add-dest conflict
expecting success:
(
cd rename-rename-1to2-add-dest &&
git checkout C^0 &&
test_must_fail git merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 5 out &&
git ls-files -u b >out &&
test_line_count = 2 out &&
git ls-files -u c >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >expect \
A:a C:b B:b C:c B:c &&
git rev-parse >actual \
:1:a :2:b :3:b :2:c :3:c &&
test_cmp expect actual &&
# Record some contents for re-doing merges
git cat-file -p A:a >stuff &&
git cat-file -p C:b >important_info &&
git cat-file -p B:c >precious_data &&
>empty &&
# Test the merge in b
test_must_fail git merge-file \
-L "HEAD" \
-L "" \
-L "B^0" \
important_info empty stuff &&
test_cmp important_info b &&
# Test the merge in c
test_must_fail git merge-file \
-L "HEAD" \
-L "" \
-L "B^0" \
stuff empty precious_data &&
test_cmp stuff c
)
Note: switching to 'C^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at e1c123f two
Merging:
e1c123f two
virtual B^0
found 1 common ancestor:
5b8813c base
CONFLICT (rename/rename): Rename "a"->"c" in branch "HEAD" rename "a"->"b" in "B^0"
Auto-merging c
Auto-merging b
Automatic merge failed; fix conflicts and then commit the result.
ok 29 - rename/rename/add-dest merge still knows about conflicting file versions
expecting success:
test_create_repo rad &&
(
cd rad &&
echo "original file" >foo &&
git add foo &&
git commit -m "original" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git rm foo &&
echo "different file" >bar &&
git add bar &&
git commit -m "Remove foo, add bar" &&
git checkout B &&
git mv foo bar &&
git commit -m "rename foo to bar"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/rad/.git/
[master (root-commit) 0f4086e] original
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
Switched to branch 'A'
rm 'foo'
[A 25b2e41] Remove foo, add bar
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
create mode 100644 bar
delete mode 100644 foo
Switched to branch 'B'
[B c4ce4fb] rename foo to bar
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename foo => bar (100%)
ok 30 - rad-setup: rename/add/delete conflict
checking known breakage:
(
cd rad &&
git checkout B^0 &&
test_must_fail git merge -s recursive A^0 >out 2>err &&
# Not sure whether the output should contain just one
# "CONFLICT (rename/add/delete)" line, or if it should break
# it into a pair of "CONFLICT (rename/delete)" and
# "CONFLICT (rename/add)"; allow for either.
test_i18ngrep "CONFLICT (rename.*add)" out &&
test_i18ngrep "CONFLICT (rename.*delete)" out &&
test_must_be_empty err &&
git ls-files -s >file_count &&
test_line_count = 2 file_count &&
git ls-files -u >file_count &&
test_line_count = 2 file_count &&
git ls-files -o >file_count &&
test_line_count = 2 file_count &&
git rev-parse >actual \
:2:bar :3:bar &&
git rev-parse >expect \
B:bar A:bar &&
test_cmp file_is_missing foo &&
# bar should have two-way merged contents of the different
# versions of bar; check that content from both sides is
# present.
grep original bar &&
grep different bar
)
Note: switching to 'B^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at c4ce4fb rename foo to bar
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: 'grep CONFLICT (rename.*add) out' didn't find a match in:
Merging:
c4ce4fb rename foo to bar
virtual A^0
found 1 common ancestor:
0f4086e original
CONFLICT (rename/delete): foo deleted in A^0 and renamed to bar in HEAD. Version HEAD of bar left in tree.
Automatic merge failed; fix conflicts and then commit the result.
not ok 31 - rad-check: rename/add/delete conflict # TODO known breakage
expecting success:
test_create_repo rrdd &&
(
cd rrdd &&
echo foo >foo &&
echo bar >bar &&
git add foo bar &&
git commit -m O &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv foo baz &&
git rm bar &&
git commit -m "Rename foo, remove bar" &&
git checkout B &&
git mv bar baz &&
git rm foo &&
git commit -m "Rename bar, remove foo"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/rrdd/.git/
[master (root-commit) 0a63539] O
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 bar
create mode 100644 foo
Switched to branch 'A'
rm 'bar'
[A 0315bc9] Rename foo, remove bar
Author: A U Thor <author@example.com>
2 files changed, 1 deletion(-)
delete mode 100644 bar
rename foo => baz (100%)
Switched to branch 'B'
rm 'foo'
[B 261a9e3] Rename bar, remove foo
Author: A U Thor <author@example.com>
2 files changed, 1 deletion(-)
rename bar => baz (100%)
delete mode 100644 foo
ok 32 - rrdd-setup: rename/rename(2to1)/delete/delete conflict
checking known breakage:
(
cd rrdd &&
git checkout A^0 &&
test_must_fail git merge -s recursive B^0 >out 2>err &&
# Not sure whether the output should contain just one
# "CONFLICT (rename/rename/delete/delete)" line, or if it
# should break it into three: "CONFLICT (rename/rename)" and
# two "CONFLICT (rename/delete)" lines; allow for either.
test_i18ngrep "CONFLICT (rename/rename)" out &&
test_i18ngrep "CONFLICT (rename.*delete)" out &&
test_must_be_empty err &&
git ls-files -s >file_count &&
test_line_count = 2 file_count &&
git ls-files -u >file_count &&
test_line_count = 2 file_count &&
git ls-files -o >file_count &&
test_line_count = 2 file_count &&
git rev-parse >actual \
:2:baz :3:baz &&
git rev-parse >expect \
O:foo O:bar &&
test_cmp file_is_missing foo &&
test_cmp file_is_missing bar &&
# baz should have two-way merged contents of the original
# contents of foo and bar; check that content from both sides
# is present.
grep foo baz &&
grep bar baz
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 0315bc9 Rename foo, remove bar
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (rename/rename): Rename foo->baz in HEAD. Rename bar->baz in B^0
error: 'grep CONFLICT (rename.*delete) out' didn't find a match in:
Merging:
0315bc9 Rename foo, remove bar
virtual B^0
found 1 common ancestor:
0a63539 O
CONFLICT (rename/rename): Rename foo->baz in HEAD. Rename bar->baz in B^0
Auto-merging baz
Automatic merge failed; fix conflicts and then commit the result.
not ok 33 - rrdd-check: rename/rename(2to1)/delete/delete conflict # TODO known breakage
expecting success:
test_create_repo mod6 &&
(
cd mod6 &&
test_seq 11 19 >one &&
test_seq 31 39 >three &&
test_seq 51 59 >five &&
git add . &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
test_seq 10 19 >one &&
echo 40 >>three &&
git add one three &&
git mv one two &&
git mv three four &&
git mv five six &&
test_tick &&
git commit -m "A" &&
git checkout B &&
echo 20 >>one &&
echo forty >>three &&
echo 60 >>five &&
git add one three five &&
git mv one six &&
git mv three two &&
git mv five four &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/mod6/.git/
[master (root-commit) 4cc4b62] O
Author: A U Thor <author@example.com>
3 files changed, 27 insertions(+)
create mode 100644 five
create mode 100644 one
create mode 100644 three
Switched to branch 'A'
[A dc12a0b] A
Author: A U Thor <author@example.com>
3 files changed, 2 insertions(+)
rename three => four (90%)
rename five => six (100%)
rename one => two (90%)
Switched to branch 'B'
[B 822cb48] B
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
rename five => four (90%)
rename one => six (90%)
rename three => two (81%)
ok 34 - mod6-setup: chains of rename/rename(1to2) and rename/rename(2to1)
checking known breakage:
(
cd mod6 &&
git checkout A^0 &&
test_must_fail git merge -s recursive B^0 >out 2>err &&
test_i18ngrep "CONFLICT (rename/rename)" out &&
test_must_be_empty err &&
git ls-files -s >file_count &&
test_line_count = 6 file_count &&
git ls-files -u >file_count &&
test_line_count = 6 file_count &&
git ls-files -o >file_count &&
test_line_count = 3 file_count &&
test_seq 10 20 >merged-one &&
test_seq 51 60 >merged-five &&
# Determine what the merge of three would give us.
test_seq 30 40 >three-side-A &&
test_seq 31 39 >three-side-B &&
echo forty >three-side-B &&
>empty &&
test_must_fail git merge-file \
-L "HEAD" \
-L "" \
-L "B^0" \
three-side-A empty three-side-B &&
sed -e "s/^\([<=>]\)/\1\1\1/" three-side-A >merged-three &&
# Verify the index is as expected
git rev-parse >actual \
:2:two :3:two \
:2:four :3:four \
:2:six :3:six &&
git hash-object >expect \
merged-one merged-three \
merged-three merged-five \
merged-five merged-one &&
test_cmp expect actual &&
git cat-file -p :2:two >expect &&
git cat-file -p :3:two >other &&
test_must_fail git merge-file \
-L "HEAD" -L "" -L "B^0" \
expect empty other &&
test_cmp expect two &&
git cat-file -p :2:four >expect &&
git cat-file -p :3:four >other &&
test_must_fail git merge-file \
-L "HEAD" -L "" -L "B^0" \
expect empty other &&
test_cmp expect four &&
git cat-file -p :2:six >expect &&
git cat-file -p :3:six >other &&
test_must_fail git merge-file \
-L "HEAD" -L "" -L "B^0" \
expect empty other &&
test_cmp expect six
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at dc12a0b A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (rename/rename): Rename "three"->"four" in branch "HEAD" rename "three"->"two" in "B^0"
test_line_count: line count for file_count != 6
100644 3fd312e42671d4107294830fb0b0bc24c44e6cdf 1 five
100644 483dd3d725f2831851dfba446e2d2f2568ab17a8 2 four
100644 64012489f118cb4011c8902b4a635f70dcb0c0ca 3 four
100644 73fa03215520024089ba0ead656d5133fd394f67 1 one
100644 3fd312e42671d4107294830fb0b0bc24c44e6cdf 2 six
100644 fc316949efe6001c9993bad8a2471cc256dd9d91 3 six
100644 4265bf0d4252580fb95fc4ef0bbb47c1d1a9831d 1 three
100644 ea7e98aa8abd3caa27e7ba91472f47479a43697f 2 two
100644 483dd3d725f2831851dfba446e2d2f2568ab17a8 3 two
not ok 35 - mod6-check: chains of rename/rename(1to2) and rename/rename(2to1) # TODO known breakage
expecting success:
test_create_repo simple_${sideL}_${sideR} &&
(
cd simple_${sideL}_${sideR} &&
# Create some related files now
for i in $(test_seq 1 10)
do
echo Random base content line $i
done >file_v1 &&
cp file_v1 file_v2 &&
echo modification >>file_v2 &&
cp file_v1 file_v3 &&
echo more stuff >>file_v3 &&
cp file_v3 file_v4 &&
echo yet more stuff >>file_v4 &&
# Use a tag to record both these files for simple
# access, and clean out these untracked files
git tag file_v1 $(git hash-object -w file_v1) &&
git tag file_v2 $(git hash-object -w file_v2) &&
git tag file_v3 $(git hash-object -w file_v3) &&
git tag file_v4 $(git hash-object -w file_v4) &&
git clean -f &&
# Setup original commit (or merge-base), consisting of
# files named "one" and "two" if renames were involved.
touch irrelevant_file &&
git add irrelevant_file &&
if [ $sideL = "rename" ]
then
git show file_v1 >one &&
git add one
fi &&
if [ $sideR = "rename" ]
then
git show file_v3 >two &&
git add two
fi &&
test_tick && git commit -m initial &&
git branch L &&
git branch R &&
# Handle the left side
git checkout L &&
if [ $sideL = "rename" ]
then
git mv one three
else
git show file_v2 >three &&
git add three
fi &&
if [ $sideR = "rename" ]
then
git show file_v4 >two &&
git add two
fi &&
test_tick && git commit -m L &&
# Handle the right side
git checkout R &&
if [ $sideL = "rename" ]
then
git show file_v2 >one &&
git add one
fi &&
if [ $sideR = "rename" ]
then
git mv two three
else
git show file_v4 >three &&
git add three
fi &&
test_tick && git commit -m R
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/simple_rename_rename/.git/
Removing file_v1
Removing file_v2
Removing file_v3
Removing file_v4
[master (root-commit) e535363] initial
Author: A U Thor <author@example.com>
3 files changed, 21 insertions(+)
create mode 100644 irrelevant_file
create mode 100644 one
create mode 100644 two
Switched to branch 'L'
[L 174eed7] L
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
rename one => three (100%)
Switched to branch 'R'
[R 70ee38b] R
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
rename two => three (100%)
ok 36 - setup simple rename/rename conflict
expecting success:
(
cd simple_${sideL}_${sideR} &&
git checkout L^0 &&
# Merge must fail; there is a conflict
test_must_fail git merge -s recursive R^0 &&
# Make sure the index has the right number of entries
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
# Ensure we have the correct number of untracked files
git ls-files -o >out &&
test_line_count = 1 out &&
# Nothing should have touched irrelevant_file
git rev-parse >actual \
:0:irrelevant_file \
:2:three \
:3:three &&
git rev-parse >expected \
master:irrelevant_file \
file_v2 \
file_v4 &&
test_cmp expected actual &&
# Make sure we have the correct merged contents for
# three
git show file_v1 >expected &&
cat <<-\EOF >>expected &&
<<<<<<< HEAD
modification
=======
more stuff
yet more stuff
>>>>>>> R^0
EOF
test_cmp expected three
)
Note: switching to 'L^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 174eed7 L
Merging:
174eed7 L
virtual R^0
found 1 common ancestor:
e535363 initial
CONFLICT (rename/rename): Rename one->three in HEAD. Rename two->three in R^0
Auto-merging three
Automatic merge failed; fix conflicts and then commit the result.
ok 37 - check simple rename/rename conflict
expecting success:
test_create_repo simple_${sideL}_${sideR} &&
(
cd simple_${sideL}_${sideR} &&
# Create some related files now
for i in $(test_seq 1 10)
do
echo Random base content line $i
done >file_v1 &&
cp file_v1 file_v2 &&
echo modification >>file_v2 &&
cp file_v1 file_v3 &&
echo more stuff >>file_v3 &&
cp file_v3 file_v4 &&
echo yet more stuff >>file_v4 &&
# Use a tag to record both these files for simple
# access, and clean out these untracked files
git tag file_v1 $(git hash-object -w file_v1) &&
git tag file_v2 $(git hash-object -w file_v2) &&
git tag file_v3 $(git hash-object -w file_v3) &&
git tag file_v4 $(git hash-object -w file_v4) &&
git clean -f &&
# Setup original commit (or merge-base), consisting of
# files named "one" and "two" if renames were involved.
touch irrelevant_file &&
git add irrelevant_file &&
if [ $sideL = "rename" ]
then
git show file_v1 >one &&
git add one
fi &&
if [ $sideR = "rename" ]
then
git show file_v3 >two &&
git add two
fi &&
test_tick && git commit -m initial &&
git branch L &&
git branch R &&
# Handle the left side
git checkout L &&
if [ $sideL = "rename" ]
then
git mv one three
else
git show file_v2 >three &&
git add three
fi &&
if [ $sideR = "rename" ]
then
git show file_v4 >two &&
git add two
fi &&
test_tick && git commit -m L &&
# Handle the right side
git checkout R &&
if [ $sideL = "rename" ]
then
git show file_v2 >one &&
git add one
fi &&
if [ $sideR = "rename" ]
then
git mv two three
else
git show file_v4 >three &&
git add three
fi &&
test_tick && git commit -m R
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/simple_rename_add/.git/
Removing file_v1
Removing file_v2
Removing file_v3
Removing file_v4
[master (root-commit) 91a0f23] initial
Author: A U Thor <author@example.com>
2 files changed, 10 insertions(+)
create mode 100644 irrelevant_file
create mode 100644 one
Switched to branch 'L'
[L 1a5f997] L
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename one => three (100%)
Switched to branch 'R'
[R 321a394] R
Author: A U Thor <author@example.com>
2 files changed, 13 insertions(+)
create mode 100644 three
ok 38 - setup simple rename/add conflict
expecting success:
(
cd simple_${sideL}_${sideR} &&
git checkout L^0 &&
# Merge must fail; there is a conflict
test_must_fail git merge -s recursive R^0 &&
# Make sure the index has the right number of entries
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
# Ensure we have the correct number of untracked files
git ls-files -o >out &&
test_line_count = 1 out &&
# Nothing should have touched irrelevant_file
git rev-parse >actual \
:0:irrelevant_file \
:2:three \
:3:three &&
git rev-parse >expected \
master:irrelevant_file \
file_v2 \
file_v4 &&
test_cmp expected actual &&
# Make sure we have the correct merged contents for
# three
git show file_v1 >expected &&
cat <<-\EOF >>expected &&
<<<<<<< HEAD
modification
=======
more stuff
yet more stuff
>>>>>>> R^0
EOF
test_cmp expected three
)
Note: switching to 'L^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 1a5f997 L
Merging:
1a5f997 L
virtual R^0
found 1 common ancestor:
91a0f23 initial
CONFLICT (rename/add): Rename one->three in HEAD. Added three in R^0
Auto-merging three
Automatic merge failed; fix conflicts and then commit the result.
ok 39 - check simple rename/add conflict
expecting success:
test_create_repo simple_${sideL}_${sideR} &&
(
cd simple_${sideL}_${sideR} &&
# Create some related files now
for i in $(test_seq 1 10)
do
echo Random base content line $i
done >file_v1 &&
cp file_v1 file_v2 &&
echo modification >>file_v2 &&
cp file_v1 file_v3 &&
echo more stuff >>file_v3 &&
cp file_v3 file_v4 &&
echo yet more stuff >>file_v4 &&
# Use a tag to record both these files for simple
# access, and clean out these untracked files
git tag file_v1 $(git hash-object -w file_v1) &&
git tag file_v2 $(git hash-object -w file_v2) &&
git tag file_v3 $(git hash-object -w file_v3) &&
git tag file_v4 $(git hash-object -w file_v4) &&
git clean -f &&
# Setup original commit (or merge-base), consisting of
# files named "one" and "two" if renames were involved.
touch irrelevant_file &&
git add irrelevant_file &&
if [ $sideL = "rename" ]
then
git show file_v1 >one &&
git add one
fi &&
if [ $sideR = "rename" ]
then
git show file_v3 >two &&
git add two
fi &&
test_tick && git commit -m initial &&
git branch L &&
git branch R &&
# Handle the left side
git checkout L &&
if [ $sideL = "rename" ]
then
git mv one three
else
git show file_v2 >three &&
git add three
fi &&
if [ $sideR = "rename" ]
then
git show file_v4 >two &&
git add two
fi &&
test_tick && git commit -m L &&
# Handle the right side
git checkout R &&
if [ $sideL = "rename" ]
then
git show file_v2 >one &&
git add one
fi &&
if [ $sideR = "rename" ]
then
git mv two three
else
git show file_v4 >three &&
git add three
fi &&
test_tick && git commit -m R
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/simple_add_rename/.git/
Removing file_v1
Removing file_v2
Removing file_v3
Removing file_v4
[master (root-commit) c609738] initial
Author: A U Thor <author@example.com>
2 files changed, 11 insertions(+)
create mode 100644 irrelevant_file
create mode 100644 two
Switched to branch 'L'
[L 8455a46] L
Author: A U Thor <author@example.com>
2 files changed, 12 insertions(+)
create mode 100644 three
Switched to branch 'R'
[R 686dcd1] R
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename two => three (100%)
ok 40 - setup simple add/rename conflict
expecting success:
(
cd simple_${sideL}_${sideR} &&
git checkout L^0 &&
# Merge must fail; there is a conflict
test_must_fail git merge -s recursive R^0 &&
# Make sure the index has the right number of entries
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
# Ensure we have the correct number of untracked files
git ls-files -o >out &&
test_line_count = 1 out &&
# Nothing should have touched irrelevant_file
git rev-parse >actual \
:0:irrelevant_file \
:2:three \
:3:three &&
git rev-parse >expected \
master:irrelevant_file \
file_v2 \
file_v4 &&
test_cmp expected actual &&
# Make sure we have the correct merged contents for
# three
git show file_v1 >expected &&
cat <<-\EOF >>expected &&
<<<<<<< HEAD
modification
=======
more stuff
yet more stuff
>>>>>>> R^0
EOF
test_cmp expected three
)
Note: switching to 'L^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8455a46 L
Merging:
8455a46 L
virtual R^0
found 1 common ancestor:
c609738 initial
CONFLICT (rename/add): Rename two->three in R^0. Added three in HEAD
Auto-merging three
Automatic merge failed; fix conflicts and then commit the result.
ok 41 - check simple add/rename conflict
expecting success:
test_create_repo simple_${sideL}_${sideR} &&
(
cd simple_${sideL}_${sideR} &&
# Create some related files now
for i in $(test_seq 1 10)
do
echo Random base content line $i
done >file_v1 &&
cp file_v1 file_v2 &&
echo modification >>file_v2 &&
cp file_v1 file_v3 &&
echo more stuff >>file_v3 &&
cp file_v3 file_v4 &&
echo yet more stuff >>file_v4 &&
# Use a tag to record both these files for simple
# access, and clean out these untracked files
git tag file_v1 $(git hash-object -w file_v1) &&
git tag file_v2 $(git hash-object -w file_v2) &&
git tag file_v3 $(git hash-object -w file_v3) &&
git tag file_v4 $(git hash-object -w file_v4) &&
git clean -f &&
# Setup original commit (or merge-base), consisting of
# files named "one" and "two" if renames were involved.
touch irrelevant_file &&
git add irrelevant_file &&
if [ $sideL = "rename" ]
then
git show file_v1 >one &&
git add one
fi &&
if [ $sideR = "rename" ]
then
git show file_v3 >two &&
git add two
fi &&
test_tick && git commit -m initial &&
git branch L &&
git branch R &&
# Handle the left side
git checkout L &&
if [ $sideL = "rename" ]
then
git mv one three
else
git show file_v2 >three &&
git add three
fi &&
if [ $sideR = "rename" ]
then
git show file_v4 >two &&
git add two
fi &&
test_tick && git commit -m L &&
# Handle the right side
git checkout R &&
if [ $sideL = "rename" ]
then
git show file_v2 >one &&
git add one
fi &&
if [ $sideR = "rename" ]
then
git mv two three
else
git show file_v4 >three &&
git add three
fi &&
test_tick && git commit -m R
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/simple_add_add/.git/
Removing file_v1
Removing file_v2
Removing file_v3
Removing file_v4
[master (root-commit) 8052021] initial
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 irrelevant_file
Switched to branch 'L'
[L 0706354] L
Author: A U Thor <author@example.com>
1 file changed, 11 insertions(+)
create mode 100644 three
Switched to branch 'R'
[R 42323fa] R
Author: A U Thor <author@example.com>
1 file changed, 12 insertions(+)
create mode 100644 three
ok 42 - setup simple add/add conflict
expecting success:
(
cd simple_${sideL}_${sideR} &&
git checkout L^0 &&
# Merge must fail; there is a conflict
test_must_fail git merge -s recursive R^0 &&
# Make sure the index has the right number of entries
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
# Ensure we have the correct number of untracked files
git ls-files -o >out &&
test_line_count = 1 out &&
# Nothing should have touched irrelevant_file
git rev-parse >actual \
:0:irrelevant_file \
:2:three \
:3:three &&
git rev-parse >expected \
master:irrelevant_file \
file_v2 \
file_v4 &&
test_cmp expected actual &&
# Make sure we have the correct merged contents for
# three
git show file_v1 >expected &&
cat <<-\EOF >>expected &&
<<<<<<< HEAD
modification
=======
more stuff
yet more stuff
>>>>>>> R^0
EOF
test_cmp expected three
)
Note: switching to 'L^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 0706354 L
Merging:
0706354 L
virtual R^0
found 1 common ancestor:
8052021 initial
CONFLICT (add/add): Merge conflict in three
Auto-merging three
Automatic merge failed; fix conflicts and then commit the result.
ok 43 - check simple add/add conflict
expecting success:
test_create_repo nested_conflicts_from_rename_rename &&
(
cd nested_conflicts_from_rename_rename &&
# Create some related files now
for i in $(test_seq 1 10)
do
echo Random base content line $i
done >file_v1 &&
cp file_v1 file_v2 &&
cp file_v1 file_v3 &&
cp file_v1 file_v4 &&
cp file_v1 file_v5 &&
cp file_v1 file_v6 &&
echo one >>file_v1 &&
echo uno >>file_v2 &&
echo eins >>file_v3 &&
echo two >>file_v4 &&
echo dos >>file_v5 &&
echo zwei >>file_v6 &&
# Setup original commit (or merge-base), consisting of
# files named "one" and "two".
mv file_v1 one &&
mv file_v4 two &&
git add one two &&
test_tick && git commit -m english &&
git branch L &&
git branch R &&
# Handle the left side
git checkout L &&
git rm one two &&
mv -f file_v2 three &&
mv -f file_v5 two &&
git add two three &&
test_tick && git commit -m spanish &&
# Handle the right side
git checkout R &&
git rm one two &&
mv -f file_v3 one &&
mv -f file_v6 three &&
git add one three &&
test_tick && git commit -m german
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6042-merge-rename-corner-cases/nested_conflicts_from_rename_rename/.git/
[master (root-commit) 8e30406] english
Author: A U Thor <author@example.com>
2 files changed, 22 insertions(+)
create mode 100644 one
create mode 100644 two
Switched to branch 'L'
rm 'one'
rm 'two'
[L f3d294e] spanish
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
rename one => three (98%)
Switched to branch 'R'
rm 'one'
rm 'two'
[R 413cf6f] german
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
rename two => three (98%)
ok 44 - setup nested conflicts from rename/rename(2to1)
expecting success:
(
cd nested_conflicts_from_rename_rename &&
git checkout L^0 &&
# Merge must fail; there is a conflict
test_must_fail git merge -s recursive R^0 &&
# Make sure the index has the right number of entries
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
# Ensure we have the correct number of untracked files
git ls-files -o >out &&
test_line_count = 1 out &&
# Compare :2:three to expected values
git cat-file -p master:one >base &&
git cat-file -p L:three >ours &&
git cat-file -p R:one >theirs &&
test_must_fail git merge-file \
-L "HEAD:three" -L "" -L "R^0:one" \
ours base theirs &&
sed -e "s/^\([<=>]\)/\1\1/" ours >L-three &&
git cat-file -p :2:three >expect &&
test_cmp expect L-three &&
# Compare :2:three to expected values
git cat-file -p master:two >base &&
git cat-file -p L:two >ours &&
git cat-file -p R:three >theirs &&
test_must_fail git merge-file \
-L "HEAD:two" -L "" -L "R^0:three" \
ours base theirs &&
sed -e "s/^\([<=>]\)/\1\1/" ours >R-three &&
git cat-file -p :3:three >expect &&
test_cmp expect R-three &&
# Compare three to expected contents
>empty &&
test_must_fail git merge-file \
-L "HEAD" -L "" -L "R^0" \
L-three empty R-three &&
test_cmp three L-three
)
Note: switching to 'L^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at f3d294e spanish
Merging:
f3d294e spanish
virtual R^0
found 1 common ancestor:
8e30406 english
CONFLICT (rename/rename): Rename one->three in HEAD. Rename two->three in R^0
Auto-merging version of three from one
Auto-merging version of three from two
Auto-merging three
Automatic merge failed; fix conflicts and then commit the result.
ok 45 - check nested conflicts from rename/rename(2to1)
# still have 10 known breakage(s)
# passed all remaining 35 test(s)
1..45
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6044-merge-unrelated-index-changes.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6044-merge-unrelated-index-changes/.git/
expecting success:
test_seq 1 10 >a &&
git add a &&
test_tick && git commit -m A &&
git branch A &&
git branch B &&
git branch C &&
git branch D &&
git branch E &&
git branch F &&
git checkout B &&
echo b >b &&
echo 11 >>a &&
git add a b &&
test_tick && git commit -m B &&
git checkout C &&
echo c >c &&
git add c &&
test_tick && git commit -m C &&
git checkout D &&
test_seq 2 10 >a &&
echo d >d &&
git add a d &&
test_tick && git commit -m D &&
git checkout E &&
mkdir subdir &&
git mv a subdir/a &&
echo e >subdir/e &&
git add subdir &&
test_tick && git commit -m E &&
git checkout F &&
test_tick && git commit --allow-empty -m F
[master (root-commit) 87af29c] A
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 a
Switched to branch 'B'
[B ed5d5a6] B
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 b
Switched to branch 'C'
[C 4fa59ce] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c
Switched to branch 'D'
[D c3c5299] D
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
create mode 100644 d
Switched to branch 'E'
[E b615563] E
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
rename a => subdir/a (100%)
create mode 100644 subdir/e
Switched to branch 'F'
[F 83c2e21] F
Author: A U Thor <author@example.com>
ok 1 - setup trivial merges
expecting success:
git reset --hard &&
git checkout A^0 &&
touch random_file && git add random_file &&
git merge E^0 &&
test_must_fail git rev-parse HEAD:random_file &&
test "$(git diff --name-only --cached E)" = "random_file"
HEAD is now at 83c2e21 F
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 87af29c A
Updating 87af29c..b615563
Fast-forward
a => subdir/a | 0
subdir/e | 1 +
2 files changed, 1 insertion(+)
rename a => subdir/a (100%)
create mode 100644 subdir/e
fatal: Path 'random_file' exists on disk, but not in 'HEAD'.
HEAD:random_file
ok 2 - ff update
expecting success:
git reset --hard &&
git checkout A^0 &&
mkdir subdir &&
touch subdir/e &&
git add subdir/e &&
test_must_fail git merge E^0 &&
test_path_is_missing .git/MERGE_HEAD
HEAD is now at b615563 E
Previous HEAD position was b615563 E
HEAD is now at 87af29c A
error: Your local changes to the following files would be overwritten by merge:
subdir/e
Please commit your changes or stash them before you merge.
Aborting
Updating 87af29c..b615563
ok 3 - ff update, important file modified
expecting success:
git reset --hard &&
git checkout B^0 &&
touch random_file && git add random_file &&
test_must_fail git merge -s resolve C^0 &&
test_path_is_missing .git/MERGE_HEAD
HEAD is now at 87af29c A
Previous HEAD position was 87af29c A
HEAD is now at ed5d5a6 B
error: Entry 'random_file' would be overwritten by merge. Cannot merge.
Trying really trivial in-index merge...
Nope.
error: Entry 'random_file' would be overwritten by merge. Cannot merge.
Merge with strategy resolve failed.
ok 4 - resolve, trivial
expecting success:
git reset --hard &&
git checkout B^0 &&
touch random_file && git add random_file &&
test_must_fail git merge -s resolve D^0 &&
test_path_is_missing .git/MERGE_HEAD
HEAD is now at ed5d5a6 B
HEAD is now at ed5d5a6 B
error: Entry 'random_file' would be overwritten by merge. Cannot merge.
Trying really trivial in-index merge...
Nope.
error: Entry 'random_file' would be overwritten by merge. Cannot merge.
Merge with strategy resolve failed.
ok 5 - resolve, non-trivial
expecting success:
git reset --hard &&
git checkout B^0 &&
touch random_file && git add random_file &&
test_must_fail git merge -s recursive C^0 &&
test_path_is_missing .git/MERGE_HEAD
HEAD is now at ed5d5a6 B
HEAD is now at ed5d5a6 B
error: Your local changes to the following files would be overwritten by merge:
random_file
Merging:
ed5d5a6 B
virtual C^0
found 1 common ancestor:
87af29c A
ok 6 - recursive
expecting success:
git reset --hard &&
git checkout B^0 &&
touch random_file && git add random_file &&
test_must_fail git merge -s recursive F^0 &&
test_path_is_missing .git/MERGE_HEAD
HEAD is now at ed5d5a6 B
HEAD is now at ed5d5a6 B
error: Your local changes to the following files would be overwritten by merge:
random_file
Merging:
ed5d5a6 B
virtual F^0
found 1 common ancestor:
87af29c A
ok 7 - recursive, when merge branch matches merge base
expecting success:
git reset --hard &&
git checkout C^0 &&
# Make index match B
git diff C B -- | git apply --cached &&
# Merge B & F, with B as "head"
git merge-recursive A -- B F > out &&
test_i18ngrep "Already up to date" out
HEAD is now at ed5d5a6 B
Previous HEAD position was ed5d5a6 B
HEAD is now at 4fa59ce C
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Already up to date!
ok 8 - merge-recursive, when index==head but head!=HEAD
expecting success:
git reset --hard &&
git checkout B^0 &&
mkdir subdir &&
test_seq 1 10 >subdir/a &&
git add subdir/a &&
# We have staged changes; merge should error out
test_must_fail git merge -s recursive E^0 2>err &&
test_i18ngrep "changes to the following files would be overwritten" err
HEAD is now at 4fa59ce C
Previous HEAD position was 4fa59ce C
HEAD is now at ed5d5a6 B
Merging:
ed5d5a6 B
virtual E^0
found 1 common ancestor:
87af29c A
error: Your local changes to the following files would be overwritten by merge:
ok 9 - recursive, when file has staged changes not matching HEAD nor what a merge would give
expecting success:
git reset --hard &&
git checkout B^0 &&
mkdir subdir &&
test_seq 1 11 >subdir/a &&
git add subdir/a &&
# We have staged changes; merge should error out
test_must_fail git merge -s recursive E^0 2>err &&
test_i18ngrep "changes to the following files would be overwritten" err
HEAD is now at ed5d5a6 B
HEAD is now at ed5d5a6 B
Merging:
ed5d5a6 B
virtual E^0
found 1 common ancestor:
87af29c A
error: Your local changes to the following files would be overwritten by merge:
ok 10 - recursive, when file has staged changes matching what a merge would give
expecting success:
git reset --hard &&
git checkout B^0 &&
touch random_file && git add random_file &&
test_must_fail git merge C^0 D^0 &&
test_path_is_missing .git/MERGE_HEAD
HEAD is now at ed5d5a6 B
HEAD is now at ed5d5a6 B
Error: Your local changes to the following files would be overwritten by merge
random_file
Merge with strategy octopus failed.
ok 11 - octopus, unrelated file touched
expecting success:
git reset --hard &&
git checkout B^0 &&
git rm b &&
test_must_fail git merge C^0 D^0 &&
test_path_is_missing .git/MERGE_HEAD
HEAD is now at ed5d5a6 B
HEAD is now at ed5d5a6 B
rm 'b'
Error: Your local changes to the following files would be overwritten by merge
b
Merge with strategy octopus failed.
ok 12 - octopus, related file removed
expecting success:
git reset --hard &&
git checkout B^0 &&
echo 12 >>a && git add a &&
test_must_fail git merge C^0 D^0 &&
test_path_is_missing .git/MERGE_HEAD
HEAD is now at ed5d5a6 B
HEAD is now at ed5d5a6 B
Error: Your local changes to the following files would be overwritten by merge
a
Merge with strategy octopus failed.
ok 13 - octopus, related file modified
expecting success:
git reset --hard &&
git checkout B^0 &&
touch random_file && git add random_file &&
test_must_fail git merge -s ours C^0 &&
test_path_is_missing .git/MERGE_HEAD
HEAD is now at ed5d5a6 B
HEAD is now at ed5d5a6 B
Merge with strategy ours failed.
ok 14 - ours
expecting success:
git reset --hard &&
git checkout B^0 &&
touch random_file && git add random_file &&
test_must_fail git merge -s subtree E^0 &&
test_path_is_missing .git/MERGE_HEAD
HEAD is now at ed5d5a6 B
HEAD is now at ed5d5a6 B
error: Your local changes to the following files would be overwritten by merge:
random_file
Merging:
ed5d5a6 B
virtual E^0
found 1 common ancestor:
87af29c A
ok 15 - subtree
# passed all 15 test(s)
1..15
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6045-merge-rename-delete.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6045-merge-rename-delete/.git/
expecting success:
echo foo >A &&
git add A &&
git commit -m "initial" &&
git checkout -b rename &&
git mv A B &&
git commit -m "rename" &&
git checkout master &&
git rm A &&
git commit -m "delete" &&
test_must_fail git merge --strategy=recursive rename >output &&
test_i18ngrep "CONFLICT (rename/delete): A deleted in HEAD and renamed to B in rename. Version rename of B left in tree." output
[master (root-commit) 30f2ba7] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A
Switched to a new branch 'rename'
[rename 02a7de8] rename
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename A => B (100%)
Switched to branch 'master'
rm 'A'
[master f42f4b2] delete
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (rename/delete): A deleted in HEAD and renamed to B in rename. Version rename of B left in tree.
ok 1 - rename/delete
# passed all 1 test(s)
1..1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6046-merge-skip-unneeded-updates.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6046-merge-skip-unneeded-updates/.git/
expecting success:
test_create_repo 1a &&
(
cd 1a &&
test_write_lines 1 2 3 4 5 6 7 8 9 10 >b &&
git add b &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
test_write_lines 1 2 3 4 5 5.5 6 7 8 9 10 10.5 >b &&
git add b &&
test_tick &&
git commit -m "A" &&
git checkout B &&
test_write_lines 1 2 3 4 5 5.5 6 7 8 9 10 >b &&
git add b &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6046-merge-skip-unneeded-updates/1a/.git/
[master (root-commit) 105387b] O
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 b
Switched to branch 'A'
[A 14800cf] A
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
Switched to branch 'B'
[B dfd7e13] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - 1a-setup: Modify(A)/Modify(B), change on B subset of A
expecting success:
test_when_finished "git -C 1a reset --hard" &&
test_when_finished "git -C 1a clean -fd" &&
(
cd 1a &&
git checkout A^0 &&
test-tool chmtime =31337 b &&
test-tool chmtime -v +0 b >expected-mtime &&
GIT_MERGE_VERBOSITY=3 git merge -s recursive B^0 >out 2>err &&
test_i18ngrep "Skipped b" out &&
test_must_be_empty err &&
test-tool chmtime -v +0 b >actual-mtime &&
test_cmp expected-mtime actual-mtime &&
git ls-files -s >index_files &&
test_line_count = 1 index_files &&
git rev-parse >actual HEAD:b &&
git rev-parse >expect A:b &&
test_cmp expect actual &&
git hash-object b >actual &&
git rev-parse A:b >expect &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 14800cf A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Skipped b (merged same as existing)
Removing actual
Removing actual-mtime
Removing err
Removing expect
Removing expected-mtime
Removing index_files
Removing out
HEAD is now at 810852f Merge commit 'B^0' into HEAD
ok 2 - 1a-check-L: Modify(A)/Modify(B), change on B subset of A
expecting success:
test_when_finished "git -C 1a reset --hard" &&
test_when_finished "git -C 1a clean -fd" &&
(
cd 1a &&
git checkout B^0 &&
GIT_MERGE_VERBOSITY=3 git merge -s recursive A^0 >out 2>err &&
test_i18ngrep "Auto-merging b" out &&
test_must_be_empty err &&
git ls-files -s >index_files &&
test_line_count = 1 index_files &&
git rev-parse >actual HEAD:b &&
git rev-parse >expect A:b &&
test_cmp expect actual &&
git hash-object b >actual &&
git rev-parse A:b >expect &&
test_cmp expect actual
)
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
810852f Merge commit 'B^0' 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> 810852f
HEAD is now at dfd7e13 B
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Auto-merging b
Removing actual
Removing err
Removing expect
Removing index_files
Removing out
HEAD is now at cd0b62f Merge commit 'A^0' into HEAD
ok 3 - 1a-check-R: Modify(A)/Modify(B), change on B subset of A
expecting success:
test_create_repo 2a &&
(
cd 2a &&
test_seq 1 10 >b &&
git add b &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
test_seq 1 11 >b &&
git add b &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv b c &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6046-merge-skip-unneeded-updates/2a/.git/
[master (root-commit) 105387b] O
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 b
Switched to branch 'A'
[A c2d59c7] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'B'
[B 6283fcf] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename b => c (100%)
ok 4 - 2a-setup: Modify(A)/rename(B)
expecting success:
test_when_finished "git -C 2a reset --hard" &&
test_when_finished "git -C 2a clean -fd" &&
(
cd 2a &&
git checkout A^0 &&
GIT_MERGE_VERBOSITY=3 git merge -s recursive B^0 >out 2>err &&
test_i18ngrep ! "Skipped c" out &&
test_must_be_empty err &&
git ls-files -s >index_files &&
test_line_count = 1 index_files &&
git rev-parse >actual HEAD:c &&
git rev-parse >expect A:b &&
test_cmp expect actual &&
git hash-object c >actual &&
git rev-parse A:b >expect &&
test_cmp expect actual &&
test_must_fail git rev-parse HEAD:b &&
test_path_is_missing b
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at c2d59c7 A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: Path 'b' does not exist in 'HEAD'
HEAD:b
Removing actual
Removing err
Removing expect
Removing index_files
Removing out
HEAD is now at 726d22f Merge commit 'B^0' into HEAD
ok 5 - 2a-check-L: Modify/rename, merge into modify side
expecting success:
test_when_finished "git -C 2a reset --hard" &&
test_when_finished "git -C 2a clean -fd" &&
(
cd 2a &&
git checkout B^0 &&
GIT_MERGE_VERBOSITY=3 git merge -s recursive A^0 >out 2>err &&
test_i18ngrep ! "Skipped c" out &&
test_must_be_empty err &&
git ls-files -s >index_files &&
test_line_count = 1 index_files &&
git rev-parse >actual HEAD:c &&
git rev-parse >expect A:b &&
test_cmp expect actual &&
git hash-object c >actual &&
git rev-parse A:b >expect &&
test_cmp expect actual &&
test_must_fail git rev-parse HEAD:b &&
test_path_is_missing b
)
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
726d22f Merge commit 'B^0' 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> 726d22f
HEAD is now at 6283fcf B
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: Path 'b' does not exist in 'HEAD'
HEAD:b
Removing actual
Removing err
Removing expect
Removing index_files
Removing out
HEAD is now at 501d3b8 Merge commit 'A^0' into HEAD
ok 6 - 2a-check-R: Modify/rename, merge into rename side
expecting success:
test_create_repo 2b &&
(
cd 2b &&
test_write_lines 1 2 3 4 5 6 7 8 9 10 >b &&
git add b &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
test_write_lines 1 2 3 4 5 5.5 6 7 8 9 10 10.5 >b &&
git add b &&
git mv b c &&
test_tick &&
git commit -m "A" &&
git checkout B &&
test_write_lines 1 2 3 4 5 5.5 6 7 8 9 10 >b &&
git add b &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6046-merge-skip-unneeded-updates/2b/.git/
[master (root-commit) 105387b] O
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 b
Switched to branch 'A'
[A fed518a] A
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
rename b => c (70%)
Switched to branch 'B'
[B dfd7e13] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 7 - 2b-setup: Rename+Mod(A)/Mod(B), B mods subset of A
expecting success:
test_when_finished "git -C 2b reset --hard" &&
test_when_finished "git -C 2b clean -fd" &&
(
cd 2b &&
git checkout A^0 &&
test-tool chmtime =31337 c &&
test-tool chmtime -v +0 c >expected-mtime &&
GIT_MERGE_VERBOSITY=3 git merge -s recursive B^0 >out 2>err &&
test_i18ngrep "Skipped c" out &&
test_must_be_empty err &&
test-tool chmtime -v +0 c >actual-mtime &&
test_cmp expected-mtime actual-mtime &&
git ls-files -s >index_files &&
test_line_count = 1 index_files &&
git rev-parse >actual HEAD:c &&
git rev-parse >expect A:c &&
test_cmp expect actual &&
git hash-object c >actual &&
git rev-parse A:c >expect &&
test_cmp expect actual &&
test_must_fail git rev-parse HEAD:b &&
test_path_is_missing b
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at fed518a A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Skipped c (merged same as existing)
fatal: Path 'b' does not exist in 'HEAD'
HEAD:b
Removing actual
Removing actual-mtime
Removing err
Removing expect
Removing expected-mtime
Removing index_files
Removing out
HEAD is now at 43f90a7 Merge commit 'B^0' into HEAD
ok 8 - 2b-check-L: Rename+Mod(A)/Mod(B), B mods subset of A
expecting success:
test_when_finished "git -C 2b reset --hard" &&
test_when_finished "git -C 2b clean -fd" &&
(
cd 2b &&
git checkout B^0 &&
GIT_MERGE_VERBOSITY=3 git merge -s recursive A^0 >out 2>err &&
test_i18ngrep "Auto-merging c" out &&
test_must_be_empty err &&
git ls-files -s >index_files &&
test_line_count = 1 index_files &&
git rev-parse >actual HEAD:c &&
git rev-parse >expect A:c &&
test_cmp expect actual &&
git hash-object c >actual &&
git rev-parse A:c >expect &&
test_cmp expect actual &&
test_must_fail git rev-parse HEAD:b &&
test_path_is_missing b
)
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
43f90a7 Merge commit 'B^0' 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> 43f90a7
HEAD is now at dfd7e13 B
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Auto-merging c
fatal: Path 'b' does not exist in 'HEAD'
HEAD:b
Removing actual
Removing err
Removing expect
Removing index_files
Removing out
HEAD is now at 6d92d3b Merge commit 'A^0' into HEAD
ok 9 - 2b-check-R: Rename+Mod(A)/Mod(B), B mods subset of A
expecting success:
test_create_repo 2c &&
(
cd 2c &&
test_seq 1 10 >b &&
git add b &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
test_seq 1 11 >b &&
echo whatever >c &&
git add b c &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv b c &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6046-merge-skip-unneeded-updates/2c/.git/
[master (root-commit) 105387b] O
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 b
Switched to branch 'A'
[A edf631f] A
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 c
Switched to branch 'B'
[B 6283fcf] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename b => c (100%)
ok 10 - 2c-setup: Modify b & add c VS rename b->c
expecting success:
(
cd 2c &&
git checkout A^0 &&
GIT_MERGE_VERBOSITY=3 &&
export GIT_MERGE_VERBOSITY &&
test_must_fail git merge -s recursive B^0 >out 2>err &&
test_i18ngrep "CONFLICT (rename/add): Rename b->c" out &&
test_i18ngrep ! "Skipped c" out &&
test_must_be_empty err
# FIXME: rename/add conflicts are horribly broken right now;
# when I get back to my patch series fixing it and
# rename/rename(2to1) conflicts to bring them in line with
# how add/add conflicts behave, then checks like the below
# could be added. But that patch series is waiting until
# the rename-directory-detection series lands, which this
# is part of. And in the mean time, I do not want to further
# enforce broken behavior. So for now, the main test is the
# one above that err is an empty file.
#git ls-files -s >index_files &&
#test_line_count = 2 index_files &&
#git rev-parse >actual :2:c :3:c &&
#git rev-parse >expect A:b A:c &&
#test_cmp expect actual &&
#git cat-file -p A:b >>merged &&
#git cat-file -p A:c >>merge-me &&
#>empty &&
#test_must_fail git merge-file \
# -L "Temporary merge branch 1" \
# -L "" \
# -L "Temporary merge branch 2" \
# merged empty merge-me &&
#sed -e "s/^\([<=>]\)/\1\1\1/" merged >merged-internal &&
#git hash-object c >actual &&
#git hash-object merged-internal >expect &&
#test_cmp expect actual &&
#test_path_is_missing b
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at edf631f A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (rename/add): Rename b->c in B^0. Added c in HEAD
ok 11 - 2c-check: Modify b & add c VS rename b->c
expecting success:
test_create_repo 3a &&
(
cd 3a &&
mkdir foo &&
test_seq 1 10 >bq &&
test_write_lines a b c d e f g h i j k >foo/whatever &&
git add bq foo/whatever &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
test_seq 1 11 >bq &&
git add bq &&
git mv bq foo/ &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv foo/ bar/ &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6046-merge-skip-unneeded-updates/3a/.git/
[master (root-commit) 1e2aa57] O
Author: A U Thor <author@example.com>
2 files changed, 21 insertions(+)
create mode 100644 bq
create mode 100644 foo/whatever
Switched to branch 'A'
[A 5576138] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rename bq => foo/bq (87%)
Switched to branch 'B'
[B 69c0854] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename {foo => bar}/whatever (100%)
ok 12 - 3a-setup: bq_1->foo/bq_2 on A, foo/->bar/ on B
expecting success:
test_when_finished "git -C 3a reset --hard" &&
test_when_finished "git -C 3a clean -fd" &&
(
cd 3a &&
git checkout A^0 &&
GIT_MERGE_VERBOSITY=3 git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
test_i18ngrep ! "Skipped bar/bq" out &&
test_must_be_empty err &&
git ls-files -s >index_files &&
test_line_count = 2 index_files &&
git rev-parse >actual HEAD:bar/bq HEAD:bar/whatever &&
git rev-parse >expect A:foo/bq A:foo/whatever &&
test_cmp expect actual &&
git hash-object bar/bq bar/whatever >actual &&
git rev-parse A:foo/bq A:foo/whatever >expect &&
test_cmp expect actual &&
test_must_fail git rev-parse HEAD:bq HEAD:foo/bq &&
test_path_is_missing bq foo/bq foo/whatever
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 5576138 A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: Path 'bq' does not exist in 'HEAD'
HEAD:bq
Removing actual
Removing err
Removing expect
Removing index_files
Removing out
HEAD is now at 2d423cf Merge commit 'B^0' into HEAD
ok 13 - 3a-check-L: bq_1->foo/bq_2 on A, foo/->bar/ on B
expecting success:
test_when_finished "git -C 3a reset --hard" &&
test_when_finished "git -C 3a clean -fd" &&
(
cd 3a &&
git checkout B^0 &&
GIT_MERGE_VERBOSITY=3 git -c merge.directoryRenames=true merge -s recursive A^0 >out 2>err &&
test_i18ngrep ! "Skipped bar/bq" out &&
test_must_be_empty err &&
git ls-files -s >index_files &&
test_line_count = 2 index_files &&
git rev-parse >actual HEAD:bar/bq HEAD:bar/whatever &&
git rev-parse >expect A:foo/bq A:foo/whatever &&
test_cmp expect actual &&
git hash-object bar/bq bar/whatever >actual &&
git rev-parse A:foo/bq A:foo/whatever >expect &&
test_cmp expect actual &&
test_must_fail git rev-parse HEAD:bq HEAD:foo/bq &&
test_path_is_missing bq foo/bq foo/whatever
)
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
2d423cf Merge commit 'B^0' 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> 2d423cf
HEAD is now at 69c0854 B
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: Path 'bq' does not exist in 'HEAD'
HEAD:bq
Removing actual
Removing err
Removing expect
Removing index_files
Removing out
HEAD is now at 505df0f Merge commit 'A^0' into HEAD
ok 14 - 3a-check-R: bq_1->foo/bq_2 on A, foo/->bar/ on B
expecting success:
test_create_repo 3b &&
(
cd 3b &&
mkdir foo &&
test_seq 1 10 >bq &&
test_write_lines a b c d e f g h i j k >foo/whatever &&
git add bq foo/whatever &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv bq foo/ &&
test_tick &&
git commit -m "A" &&
git checkout B &&
test_seq 1 11 >bq &&
git add bq &&
git mv foo/ bar/ &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6046-merge-skip-unneeded-updates/3b/.git/
[master (root-commit) 1e2aa57] O
Author: A U Thor <author@example.com>
2 files changed, 21 insertions(+)
create mode 100644 bq
create mode 100644 foo/whatever
Switched to branch 'A'
[A d02b71c] A
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename bq => foo/bq (100%)
Switched to branch 'B'
[B 2f47892] B
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
rename {foo => bar}/whatever (100%)
ok 15 - 3b-setup: bq_1->foo/bq_2 on A, foo/->bar/ on B
expecting success:
test_when_finished "git -C 3b reset --hard" &&
test_when_finished "git -C 3b clean -fd" &&
(
cd 3b &&
git checkout A^0 &&
GIT_MERGE_VERBOSITY=3 git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
test_i18ngrep ! "Skipped bar/bq" out &&
test_must_be_empty err &&
git ls-files -s >index_files &&
test_line_count = 2 index_files &&
git rev-parse >actual HEAD:bar/bq HEAD:bar/whatever &&
git rev-parse >expect B:bq A:foo/whatever &&
test_cmp expect actual &&
git hash-object bar/bq bar/whatever >actual &&
git rev-parse B:bq A:foo/whatever >expect &&
test_cmp expect actual &&
test_must_fail git rev-parse HEAD:bq HEAD:foo/bq &&
test_path_is_missing bq foo/bq foo/whatever
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d02b71c A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: Path 'bq' does not exist in 'HEAD'
HEAD:bq
Removing actual
Removing err
Removing expect
Removing index_files
Removing out
HEAD is now at 933a7b9 Merge commit 'B^0' into HEAD
ok 16 - 3b-check-L: bq_1->foo/bq_2 on A, foo/->bar/ on B
expecting success:
test_when_finished "git -C 3b reset --hard" &&
test_when_finished "git -C 3b clean -fd" &&
(
cd 3b &&
git checkout B^0 &&
GIT_MERGE_VERBOSITY=3 git -c merge.directoryRenames=true merge -s recursive A^0 >out 2>err &&
test_i18ngrep ! "Skipped bar/bq" out &&
test_must_be_empty err &&
git ls-files -s >index_files &&
test_line_count = 2 index_files &&
git rev-parse >actual HEAD:bar/bq HEAD:bar/whatever &&
git rev-parse >expect B:bq A:foo/whatever &&
test_cmp expect actual &&
git hash-object bar/bq bar/whatever >actual &&
git rev-parse B:bq A:foo/whatever >expect &&
test_cmp expect actual &&
test_must_fail git rev-parse HEAD:bq HEAD:foo/bq &&
test_path_is_missing bq foo/bq foo/whatever
)
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
933a7b9 Merge commit 'B^0' 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> 933a7b9
HEAD is now at 2f47892 B
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: Path 'bq' does not exist in 'HEAD'
HEAD:bq
Removing actual
Removing err
Removing expect
Removing index_files
Removing out
HEAD is now at ddf9d88 Merge commit 'A^0' into HEAD
ok 17 - 3b-check-R: bq_1->foo/bq_2 on A, foo/->bar/ on B
expecting success:
test_create_repo 4a &&
(
cd 4a &&
test_write_lines 1 2 3 4 5 6 7 8 9 10 >b &&
git add b &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
test_write_lines 1 2 3 4 5 5.5 6 7 8 9 10 10.5 >b &&
git add b &&
test_tick &&
git commit -m "A" &&
git checkout B &&
test_write_lines 1 2 3 4 5 5.5 6 7 8 9 10 >b &&
git add b &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6046-merge-skip-unneeded-updates/4a/.git/
[master (root-commit) 105387b] O
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 b
Switched to branch 'A'
[A 14800cf] A
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
Switched to branch 'B'
[B dfd7e13] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 18 - 4a-setup: Change on A, change on B subset of A, dirty mods present
checking known breakage:
test_when_finished "git -C 4a reset --hard" &&
test_when_finished "git -C 4a clean -fd" &&
(
cd 4a &&
git checkout A^0 &&
echo "File rewritten" >b &&
test-tool chmtime =31337 b &&
test-tool chmtime -v +0 b >expected-mtime &&
GIT_MERGE_VERBOSITY=3 git merge -s recursive B^0 >out 2>err &&
test_i18ngrep "Skipped b" out &&
test_must_be_empty err &&
test-tool chmtime -v +0 b >actual-mtime &&
test_cmp expected-mtime actual-mtime &&
git ls-files -s >index_files &&
test_line_count = 1 index_files &&
git rev-parse >actual :0:b &&
git rev-parse >expect A:b &&
test_cmp expect actual &&
git hash-object b >actual &&
echo "File rewritten" | git hash-object --stdin >expect &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 14800cf A
Removing err
Removing expected-mtime
Removing out
HEAD is now at 14800cf A
not ok 19 - 4a-check: Change on A, change on B subset of A, dirty mods present # TODO known breakage
expecting success:
test_create_repo 4b &&
(
cd 4b &&
test_write_lines 1 2 3 4 5 6 7 8 9 10 >b &&
git add b &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
test_write_lines 1 2 3 4 5 5.5 6 7 8 9 10 10.5 >b &&
git add b &&
git mv b c &&
test_tick &&
git commit -m "A" &&
git checkout B &&
test_write_lines 1 2 3 4 5 5.5 6 7 8 9 10 >b &&
git add b &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6046-merge-skip-unneeded-updates/4b/.git/
[master (root-commit) 105387b] O
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 b
Switched to branch 'A'
[A fed518a] A
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
rename b => c (70%)
Switched to branch 'B'
[B dfd7e13] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 20 - 4b-setup: Rename+Mod(A)/Mod(B), change on B subset of A, dirty mods present
expecting success:
test_when_finished "git -C 4b reset --hard" &&
test_when_finished "git -C 4b clean -fd" &&
(
cd 4b &&
git checkout A^0 &&
echo "File rewritten" >c &&
test-tool chmtime =31337 c &&
test-tool chmtime -v +0 c >expected-mtime &&
GIT_MERGE_VERBOSITY=3 git merge -s recursive B^0 >out 2>err &&
test_i18ngrep "Skipped c" out &&
test_must_be_empty err &&
test-tool chmtime -v +0 c >actual-mtime &&
test_cmp expected-mtime actual-mtime &&
git ls-files -s >index_files &&
test_line_count = 1 index_files &&
git rev-parse >actual :0:c &&
git rev-parse >expect A:c &&
test_cmp expect actual &&
git hash-object c >actual &&
echo "File rewritten" | git hash-object --stdin >expect &&
test_cmp expect actual &&
test_must_fail git rev-parse HEAD:b &&
test_path_is_missing b
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at fed518a A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Skipped c (merged same as existing)
fatal: Path 'b' does not exist in 'HEAD'
HEAD:b
Removing actual
Removing actual-mtime
Removing err
Removing expect
Removing expected-mtime
Removing index_files
Removing out
HEAD is now at c99d194 Merge commit 'B^0' into HEAD
ok 21 - 4b-check: Rename+Mod(A)/Mod(B), change on B subset of A, dirty mods present
# still have 1 known breakage(s)
# passed all remaining 20 test(s)
1..21
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6041-bisect-submodule.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/.git/
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
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1/.git/
[master (root-commit) f0048d7] Base inside first submodule
Author: A U Thor <author@example.com>
3 files changed, 4 insertions(+)
create mode 100644 .gitignore
create mode 100644 file1
create mode 100644 file2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub2/.git/
[master (root-commit) 81b5d8a] nested submodule 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
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_repo/.git/
[master (root-commit) dc35680] 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
Switched to a new branch 'add_sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_repo/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_repo/uninitialized_sub'...
done.
[add_sub1 2929c6d] Add sub1
Author: A U Thor <author@example.com>
2 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 uninitialized_sub
Switched to a new branch 'remove_sub1'
Removing uninitialized_sub
Removing sub1
Removing .gitmodules
[remove_sub1 3fc3991] Revert "Add sub1"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:33:43 2019 +0000
3 files changed, 9 deletions(-)
delete mode 100644 .gitmodules
delete mode 160000 sub1
delete mode 160000 uninitialized_sub
Switched to a new branch 'modify_sub1'
Switched to a new branch 'modifications'
[modifications 70999f4] modified file2 and added file3
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 file3
To /<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1
* [new branch] modifications -> modifications
[modify_sub1 e0f3aee] Modify sub1
Author: A U Thor <author@example.com>
Switched to a new branch 'add_nested_sub'
Switched to a new branch 'add_nested_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_repo/sub1/sub2'...
done.
[add_nested_sub d4d64f3] add a nested submodule
Author: A U Thor <author@example.com>
2 files changed, 5 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub2
[add_nested_sub 2c366e1] update submodule, that updates a nested submodule
Author: A U Thor <author@example.com>
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
Switched to a new branch 'modify_sub1_recursively'
[modify_sub1_recursively 9949b9f] make a change in nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file3
[modify_sub1_recursively 2f8462c] update nested sub
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[modify_sub1_recursively 0ebd5c2] update sub1, that updates nested sub
Author: A U Thor <author@example.com>
To /<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
To /<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub2
* [new branch] modify_sub1_recursively -> modify_sub1_recursively
Cleared directory 'sub2'
Submodule 'sub2' (../submodule_update_sub2) unregistered for path 'sub2'
Switched to a new branch 'replace_sub1_with_directory'
Submodule path 'sub1': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
Previous HEAD position was f0048d7 Base inside first submodule
Switched to branch 'modifications'
rm 'sub1'
[replace_sub1_with_directory 73913c4] 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
Switched to a new branch 'replace_directory_with_sub1'
Removing sub1/file3
Removing sub1/file2
Removing sub1/file1
Adding sub1
[replace_directory_with_sub1 c5ed73a] Revert "Replace sub1 with directory"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:33:45 2019 +0000
4 files changed, 4 insertions(+), 3 deletions(-)
delete mode 100644 sub1/file1
delete mode 100644 sub1/file2
delete mode 100644 sub1/file3
Switched to a new branch 'replace_sub1_with_file'
rm 'sub1'
[replace_sub1_with_file 639f6af] 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'
[replace_file_with_sub1 1ef0e59] Revert "Replace sub1 with file"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:33:46 2019 +0000
2 files changed, 5 insertions(+), 1 deletion(-)
mode change 100644 => 160000 sub1
Switched to a new branch 'invalid_sub1'
[invalid_sub1 ec3cfc6] Invalid sub1 commit
Author: A U Thor <author@example.com>
Switched to a new branch 'valid_sub1'
[valid_sub1 e27b786] Revert "Invalid sub1 commit"
Author: A U Thor <author@example.com>
Date: Wed Aug 14 07:33:46 2019 +0000
warning: unable to rmdir 'uninitialized_sub': Directory not empty
Switched to branch 'master'
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to branch 'add_sub1'
Your branch is up to date with 'origin/add_sub1'.
[add_sub1 83c9946] bisect bad
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
HEAD is now at dc35680 Base
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[2929c6d742f92231547f00c0999f793ab739de13] Add sub1
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
Submodule path 'uninitialized_sub': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
ok 1 - git_bisect: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Switched to branch 'add_sub1'
Your branch is up to date with 'origin/add_sub1'.
[add_sub1 e2c0137] bisect bad
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
HEAD is now at dc35680 Base
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[2929c6d742f92231547f00c0999f793ab739de13] Add sub1
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
Submodule path 'uninitialized_sub': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
ok 2 - git_bisect: added submodule leaves existing empty directory alone
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
)
Cloning into 'submodule_update'...
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'.
fatal: Needed a single revision
Branch 'replace_file_with_sub1' set up to track remote branch 'replace_file_with_sub1' from 'origin'.
Switched to branch 'replace_file_with_sub1'
Your branch is up to date with 'origin/replace_file_with_sub1'.
[replace_file_with_sub1 4b23964] bisect bad
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
HEAD is now at 639f6af Replace sub1 with file
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[1ef0e5966b8b110d0b17aa27149e98365ccc6ae1] Revert "Replace sub1 with file"
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
Submodule path 'uninitialized_sub': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
ok 3 - git_bisect: 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
)
Cloning into 'submodule_update'...
done.
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'.
fatal: Needed a single revision
Branch 'replace_directory_with_sub1' set up to track remote branch 'replace_directory_with_sub1' from 'origin'.
Switched to branch 'replace_directory_with_sub1'
Your branch is up to date with 'origin/replace_directory_with_sub1'.
[replace_directory_with_sub1 d3d0fec] bisect bad
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
HEAD is now at 73913c4 Replace sub1 with directory
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[c5ed73a47ded2aeefa9e99beba8c4fe74448ab5d] Revert "Replace sub1 with directory"
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
Submodule path 'uninitialized_sub': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
ok 4 - git_bisect: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Switched to branch 'remove_sub1'
Your branch is up to date with 'origin/remove_sub1'.
[remove_sub1 604e2d7] bisect bad
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
HEAD is now at 2929c6d Add sub1
Bisecting: 0 revisions left to test after this (roughly 0 steps)
warning: unable to rmdir 'sub1': Directory not empty
[3fc3991816319a268f26f3bca9024f39ab8d943c] Revert "Add sub1"
ok 5 - git_bisect: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
Branch 'remove_sub1' set up to track remote branch 'remove_sub1' from 'origin'.
warning: unable to rmdir 'sub1': Directory not empty
Switched to branch 'remove_sub1'
Your branch is up to date with 'origin/remove_sub1'.
[remove_sub1 29ab4c8] bisect bad
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
HEAD is now at 2929c6d Add sub1
Bisecting: 0 revisions left to test after this (roughly 0 steps)
warning: unable to rmdir 'sub1': Directory not empty
[3fc3991816319a268f26f3bca9024f39ab8d943c] Revert "Add sub1"
ok 6 - git_bisect: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: The following untracked working tree files would be overwritten by checkout:
sub1/file1
sub1/file2
Please move or remove them before you switch branches.
Aborting
ok 7 - git_bisect: replace submodule with a directory must fail
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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
Branch 'replace_sub1_with_directory' set up to track remote branch 'replace_sub1_with_directory' from 'origin'.
error: The following untracked working tree files would be overwritten by checkout:
sub1/file1
sub1/file2
Please move or remove them before you switch branches.
Aborting
ok 8 - git_bisect: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Switched to branch 'replace_sub1_with_file'
Your branch is up to date with 'origin/replace_sub1_with_file'.
[replace_sub1_with_file 18c8d8d] bisect bad
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
HEAD is now at 2929c6d Add sub1
Submodule path 'sub1': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[639f6af1c6e71a0940e5420bbacc0dc03b8f8589] Replace sub1 with file
test_must_fail: command succeeded: git_bisect replace_sub1_with_file
not ok 9 - git_bisect: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
Branch 'replace_sub1_with_file' set up to track remote branch 'replace_sub1_with_file' from 'origin'.
Switched to branch 'replace_sub1_with_file'
Your branch is up to date with 'origin/replace_sub1_with_file'.
[replace_sub1_with_file f279131] bisect bad
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
HEAD is now at 2929c6d Add sub1
Submodule path 'sub1': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[639f6af1c6e71a0940e5420bbacc0dc03b8f8589] Replace sub1 with file
test_must_fail: command succeeded: git_bisect replace_sub1_with_file
not ok 10 - git_bisect: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
Branch 'modify_sub1' set up to track remote branch 'modify_sub1' from 'origin'.
Switched to branch 'modify_sub1'
Your branch is up to date with 'origin/modify_sub1'.
[modify_sub1 d38281f] bisect bad
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
HEAD is now at 2929c6d Add sub1
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[e0f3aee41c33e9d8da618fe707ad50b604f19f8d] Modify sub1
Submodule path 'sub1': checked out '70999f49501e55b0379b396146f3bd2833ad721f'
ok 11 - git_bisect: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'add_sub1'
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1) registered for path 'sub1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update/sub1'...
done.
Submodule path 'sub1': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
Switched to branch 'invalid_sub1'
Your branch is up to date with 'origin/invalid_sub1'.
[invalid_sub1 ebbef11] bisect bad
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
HEAD is now at 2929c6d Add sub1
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[ec3cfc655361869a561dcc99f0a6530fa9038909] Invalid sub1 commit
error: Server does not allow request for unadvertised object 0123456789012345678901234567890123456789
Fetched in submodule path 'sub1', but it did not contain 0123456789012345678901234567890123456789. Direct fetching of that commit failed.
ok 12 - git_bisect: 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
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'invalid_sub1'
Branch 'invalid_sub1' set up to track remote branch 'invalid_sub1' from 'origin'.
fatal: Needed a single revision
Branch 'valid_sub1' set up to track remote branch 'valid_sub1' from 'origin'.
Switched to branch 'valid_sub1'
Your branch is up to date with 'origin/valid_sub1'.
[valid_sub1 e022274] bisect bad
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
HEAD is now at ec3cfc6 Invalid sub1 commit
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[e27b786ca073bfba46755b2a5d73d9ceba0ff7c3] Revert "Invalid sub1 commit"
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1) registered for path 'sub1'
Submodule 'uninitialized_sub' (/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update_sub1) registered for path 'uninitialized_sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6041-bisect-submodule/submodule_update/uninitialized_sub'...
done.
Submodule path 'sub1': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
Submodule path 'uninitialized_sub': checked out 'f0048d7ea001c70952035f83391326ab5f0960b5'
ok 13 - git_bisect: 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 &&
>sub1 &&
test_must_fail $command add_sub1 &&
test_superproject_content origin/no_submodule &&
test_must_be_empty sub1
)
Cloning into 'submodule_update'...
done.
Switched to a new branch 'no_submodule'
Branch 'no_submodule' set up to track remote branch 'no_submodule' from 'origin'.
Branch 'add_sub1' set up to track remote branch 'add_sub1' from 'origin'.
error: The following untracked working tree files would be overwritten by checkout:
sub1
Please move or remove them before you switch branches.
Aborting
ok 14 - git_bisect: added submodule doesn't remove untracked unignored file with same name
# still have 2 known breakage(s)
# passed all remaining 12 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6050-replace.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6050-replace/.git/
expecting success:
echo "line 1" >>hello &&
echo "line 2" >>hello &&
echo "line 3" >>hello &&
echo "line 4" >>hello &&
add_and_commit_file hello "4 lines" &&
HASH1=$(git rev-parse --verify HEAD) &&
echo "line BUG" >>hello &&
echo "line 6" >>hello &&
echo "line 7" >>hello &&
echo "line 8" >>hello &&
add_and_commit_file hello "4 more lines with a BUG" &&
HASH2=$(git rev-parse --verify HEAD) &&
echo "line 9" >>hello &&
echo "line 10" >>hello &&
add_and_commit_file hello "2 more lines" &&
HASH3=$(git rev-parse --verify HEAD) &&
echo "line 11" >>hello &&
add_and_commit_file hello "1 more line" &&
HASH4=$(git rev-parse --verify HEAD) &&
sed -e "s/BUG/5/" hello >hello.new &&
mv hello.new hello &&
add_and_commit_file hello "BUG fixed" &&
HASH5=$(git rev-parse --verify HEAD) &&
echo "line 12" >>hello &&
echo "line 13" >>hello &&
add_and_commit_file hello "2 more lines" &&
HASH6=$(git rev-parse --verify HEAD) &&
echo "line 14" >>hello &&
echo "line 15" >>hello &&
echo "line 16" >>hello &&
add_and_commit_file hello "again 3 more lines" &&
HASH7=$(git rev-parse --verify HEAD)
ok 1 - set up buggy branch
expecting success:
git cat-file commit $HASH2 | grep "author A U Thor" &&
R=$(git cat-file commit $HASH2 | sed -e "s/A U/O/" | git hash-object -t commit --stdin -w) &&
git cat-file commit $R | grep "author O Thor" &&
git update-ref refs/replace/$HASH2 $R &&
git show HEAD~5 | grep "O Thor" &&
git show $HASH2 | grep "O Thor"
author A U Thor <author@example.com> 1112912053 -0700
author O Thor <author@example.com> 1112912053 -0700
Author: O Thor <author@example.com>
Author: O Thor <author@example.com>
ok 2 - replace the author
expecting success:
git cat-file commit $HASH2 | grep "author O Thor" &&
git --no-replace-objects cat-file commit $HASH2 | grep "author A U Thor" &&
git show $HASH2 | grep "O Thor" &&
git --no-replace-objects show $HASH2 | grep "A U Thor"
author O Thor <author@example.com> 1112912053 -0700
author A U Thor <author@example.com> 1112912053 -0700
Author: O Thor <author@example.com>
Author: A U Thor <author@example.com>
ok 3 - test --no-replace-objects option
expecting success:
GIT_NO_REPLACE_OBJECTS=1 git cat-file commit $HASH2 | grep "author A U Thor" &&
GIT_NO_REPLACE_OBJECTS=1 git show $HASH2 | grep "A U Thor"
author A U Thor <author@example.com> 1112912053 -0700
Author: A U Thor <author@example.com>
ok 4 - test GIT_NO_REPLACE_OBJECTS env variable
expecting success:
test_config core.usereplacerefs false &&
git cat-file commit $HASH2 | grep "author A U Thor" &&
git show $HASH2 | grep "A U Thor"
author A U Thor <author@example.com> 1112912053 -0700
Author: A U Thor <author@example.com>
ok 5 - test core.usereplacerefs config option
expecting success:
git mktag <tag.sig >.git/refs/tags/mytag 2>message
ok 6 - tag replaced commit
expecting success:
git fsck master >fsck_master.out &&
test_i18ngrep "dangling commit $R" fsck_master.out &&
test_i18ngrep "dangling tag $(cat .git/refs/tags/mytag)" fsck_master.out &&
test -z "$(git fsck)"
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
dangling commit c06ac9b8cd2f38349af40ec00e5d5c761b3bf513
dangling tag e25dc7954f0832d962347872884aab2dffb426c5
ok 7 - "git fsck" works
expecting success:
git repack -a -d &&
git clone --no-hardlinks . clone_dir &&
(
cd clone_dir &&
git show HEAD~5 | grep "A U Thor" &&
git show $HASH2 | grep "A U Thor" &&
git cat-file commit $R &&
git repack -a -d &&
test_must_fail git cat-file commit $R &&
git fetch ../ "refs/replace/*:refs/replace/*" &&
git show HEAD~5 | grep "O Thor" &&
git show $HASH2 | grep "O Thor" &&
git cat-file commit $R
)
Cloning into 'clone_dir'...
done.
Author: A U Thor <author@example.com>
Author: A U Thor <author@example.com>
tree 242e3e36d5c0616fbf715682c322254dadb55168
parent 00ad688edb1a79423184992de45a5f0322c8bdf5
author O Thor <author@example.com> 1112912053 -0700
committer C O Mitter <committer@example.com> 1112912053 -0700
hello: 4 more lines with a BUG
fatal: git cat-file c06ac9b8cd2f38349af40ec00e5d5c761b3bf513: bad file
From ..
* [new ref] refs/replace/4217adb325b9db7bfc0c7b223183cc8546638cf0 -> refs/replace/4217adb325b9db7bfc0c7b223183cc8546638cf0
Author: O Thor <author@example.com>
Author: O Thor <author@example.com>
tree 242e3e36d5c0616fbf715682c322254dadb55168
parent 00ad688edb1a79423184992de45a5f0322c8bdf5
author O Thor <author@example.com> 1112912053 -0700
committer C O Mitter <committer@example.com> 1112912053 -0700
hello: 4 more lines with a BUG
ok 8 - repack, clone and fetch work
expecting success:
test "$HASH2" = "$(git replace -l)" &&
test "$HASH2" = "$(git replace)" &&
aa=${HASH2%??????????????????????????????????????} &&
test "$HASH2" = "$(git replace --list "$aa*")" &&
test_must_fail git replace -d $R &&
test_must_fail git replace --delete &&
test_must_fail git replace -l -d $HASH2 &&
git replace -d $HASH2 &&
git show $HASH2 | grep "A U Thor" &&
test -z "$(git replace -l)"
error: replace ref 'c06ac9b8cd2f38349af40ec00e5d5c761b3bf513' not found
fatal: -d needs at least one argument
usage: git replace [-f] <object> <replacement>
or: git replace [-f] --edit <object>
or: git replace [-f] --graft <commit> [<parent>...]
or: git replace [-f] --convert-graft-file
or: git replace -d <object>...
or: git replace [--format=<format>] [-l [<pattern>]]
-l, --list list replace refs
-d, --delete delete replace refs
-e, --edit edit existing object
-g, --graft change a commit's parents
--convert-graft-file convert existing graft file
-f, --force replace the ref if it exists
--raw do not pretty-print contents for --edit
--format <format> use this format
error: switch `d' is incompatible with --list
Deleted replace ref '4217adb325b9db7bfc0c7b223183cc8546638cf0'
Author: A U Thor <author@example.com>
ok 9 - "git replace" listing and deleting
expecting success:
git replace $HASH2 $R &&
git show $HASH2 | grep "O Thor" &&
test_must_fail git replace $HASH2 $R &&
git replace -f $HASH2 $R &&
test_must_fail git replace -f &&
test "$HASH2" = "$(git replace)"
Author: O Thor <author@example.com>
error: replace ref 'refs/replace/4217adb325b9db7bfc0c7b223183cc8546638cf0' already exists
fatal: -f only makes sense when writing a replacement
usage: git replace [-f] <object> <replacement>
or: git replace [-f] --edit <object>
or: git replace [-f] --graft <commit> [<parent>...]
or: git replace [-f] --convert-graft-file
or: git replace -d <object>...
or: git replace [--format=<format>] [-l [<pattern>]]
-l, --list list replace refs
-d, --delete delete replace refs
-e, --edit edit existing object
-g, --graft change a commit's parents
--convert-graft-file convert existing graft file
-f, --force replace the ref if it exists
--raw do not pretty-print contents for --edit
--format <format> use this format
ok 10 - "git replace" replacing
expecting success:
SHORTHASH2=$(git rev-parse --short=8 $HASH2) &&
git replace -d $SHORTHASH2 &&
git replace $SHORTHASH2 $R &&
git show $HASH2 | grep "O Thor" &&
test_must_fail git replace $HASH2 $R &&
git replace -f $HASH2 $R &&
test_must_fail git replace --force &&
test "$HASH2" = "$(git replace)"
Deleted replace ref '4217adb325b9db7bfc0c7b223183cc8546638cf0'
Author: O Thor <author@example.com>
error: replace ref 'refs/replace/4217adb325b9db7bfc0c7b223183cc8546638cf0' already exists
fatal: -f only makes sense when writing a replacement
usage: git replace [-f] <object> <replacement>
or: git replace [-f] --edit <object>
or: git replace [-f] --graft <commit> [<parent>...]
or: git replace [-f] --convert-graft-file
or: git replace -d <object>...
or: git replace [--format=<format>] [-l [<pattern>]]
-l, --list list replace refs
-d, --delete delete replace refs
-e, --edit edit existing object
-g, --graft change a commit's parents
--convert-graft-file convert existing graft file
-f, --force replace the ref if it exists
--raw do not pretty-print contents for --edit
--format <format> use this format
ok 11 - "git replace" resolves sha1
expecting success:
git replace -d $HASH2 &&
git show $HASH2 | grep "A U Thor" &&
git checkout $HASH1 &&
git cherry-pick $HASH2 &&
git show $HASH5 | git apply &&
git commit --amend -m "hello: 4 more lines WITHOUT the bug" hello &&
PARA2=$(git rev-parse --verify HEAD) &&
git cherry-pick $HASH3 &&
PARA3=$(git rev-parse --verify HEAD) &&
git cherry-pick $HASH4 &&
PARA4=$(git rev-parse --verify HEAD) &&
git cherry-pick $HASH6 &&
PARA6=$(git rev-parse --verify HEAD) &&
git replace $HASH6 $PARA6 &&
git checkout master &&
cur=$(git rev-parse --verify HEAD) &&
test "$cur" = "$HASH7" &&
git log --pretty=oneline | grep $PARA2 &&
git remote add cloned ./clone_dir
Deleted replace ref '4217adb325b9db7bfc0c7b223183cc8546638cf0'
Author: A U Thor <author@example.com>
Note: switching to '00ad688edb1a79423184992de45a5f0322c8bdf5'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 00ad688 hello: 4 lines
[detached HEAD dcda230] hello: 4 more lines with a BUG
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 4 insertions(+)
[detached HEAD af6d994] hello: 4 more lines WITHOUT the bug
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:14:13 2005 -0700
1 file changed, 4 insertions(+)
Auto-merging hello
[detached HEAD a3fb2e1] hello: 2 more lines
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:15:13 2005 -0700
1 file changed, 2 insertions(+)
Auto-merging hello
[detached HEAD f486255] hello: 1 more line
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
1 file changed, 1 insertion(+)
[detached HEAD 911408d] hello: 2 more lines
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:18:13 2005 -0700
1 file changed, 2 insertions(+)
Previous HEAD position was 911408d hello: 2 more lines
Switched to branch 'master'
af6d994c7106b0846fb80f09fa5bcbc460432c6d hello: 4 more lines WITHOUT the bug
ok 12 - create parallel branch without the bug
expecting success:
git push cloned $HASH6^:refs/heads/parallel &&
(
cd clone_dir &&
git checkout parallel &&
git log --pretty=oneline | grep $PARA2
)
To ./clone_dir
* [new branch] 14ac020163ea60a9d683ce68e36c946f31ecc856^ -> parallel
Switched to branch 'parallel'
af6d994c7106b0846fb80f09fa5bcbc460432c6d hello: 4 more lines WITHOUT the bug
ok 13 - push to cloned repo
expecting success:
git cat-file commit $PARA3 | grep "author A U Thor" &&
S=$(git cat-file commit $PARA3 | sed -e "s/A U/O/" | git hash-object -t commit --stdin -w) &&
git cat-file commit $S | grep "author O Thor" &&
git replace $PARA3 $S &&
git show $HASH6~2 | grep "O Thor" &&
git show $PARA3 | grep "O Thor" &&
git push cloned $HASH6^:refs/heads/parallel2 &&
(
cd clone_dir &&
git checkout parallel2 &&
git log --pretty=oneline | grep $PARA3 &&
git show $PARA3 | grep "A U Thor"
)
author A U Thor <author@example.com> 1112912113 -0700
author O Thor <author@example.com> 1112912113 -0700
Author: O Thor <author@example.com>
Author: O Thor <author@example.com>
To ./clone_dir
* [new branch] 14ac020163ea60a9d683ce68e36c946f31ecc856^ -> parallel2
Switched to branch 'parallel2'
a3fb2e1845a1aaf129b7975048973414dc172173 hello: 2 more lines
Author: A U Thor <author@example.com>
ok 14 - push branch with replacement
expecting success:
git branch tofetch $HASH6 &&
(
cd clone_dir &&
git fetch origin refs/heads/tofetch:refs/heads/parallel3 &&
git log --pretty=oneline parallel3 >output.txt &&
! grep $PARA3 output.txt &&
git show $PARA3 >para3.txt &&
grep "A U Thor" para3.txt &&
git fetch origin "refs/replace/*:refs/replace/*" &&
git log --pretty=oneline parallel3 >output.txt &&
grep $PARA3 output.txt &&
git show $PARA3 >para3.txt &&
grep "O Thor" para3.txt
)
From /<<PKGBUILDDIR>>/t/trash directory.t6050-replace/.
* [new branch] tofetch -> parallel3
* [new branch] tofetch -> origin/tofetch
Author: A U Thor <author@example.com>
From /<<PKGBUILDDIR>>/t/trash directory.t6050-replace/.
* [new ref] refs/replace/14ac020163ea60a9d683ce68e36c946f31ecc856 -> refs/replace/14ac020163ea60a9d683ce68e36c946f31ecc856
* [new ref] refs/replace/a3fb2e1845a1aaf129b7975048973414dc172173 -> refs/replace/a3fb2e1845a1aaf129b7975048973414dc172173
a3fb2e1845a1aaf129b7975048973414dc172173 hello: 2 more lines
Author: O Thor <author@example.com>
ok 15 - fetch branch with replacement
expecting success:
git bisect start $HASH7 $HASH1 &&
test "$PARA3" = "$(git rev-parse --verify HEAD)" &&
git bisect reset &&
GIT_NO_REPLACE_OBJECTS=1 git bisect start $HASH7 $HASH1 &&
test "$HASH4" = "$(git rev-parse --verify HEAD)" &&
git bisect reset &&
git --no-replace-objects bisect start $HASH7 $HASH1 &&
test "$HASH4" = "$(git rev-parse --verify HEAD)" &&
git bisect reset
Bisecting: 2 revisions left to test after this (roughly 1 step)
[a3fb2e1845a1aaf129b7975048973414dc172173] hello: 2 more lines
Previous HEAD position was a3fb2e1 hello: 2 more lines
Switched to branch 'master'
Bisecting: 2 revisions left to test after this (roughly 2 steps)
[40237c8b8add42b8ca9d277edebf9dd36b4edbd8] hello: 1 more line
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
40237c8 hello: 1 more line
8fc2a8e hello: 2 more lines
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> 40237c8
Switched to branch 'master'
Bisecting: 2 revisions left to test after this (roughly 2 steps)
[40237c8b8add42b8ca9d277edebf9dd36b4edbd8] hello: 1 more line
Warning: you are leaving 2 commits behind, not connected to
any of your branches:
40237c8 hello: 1 more line
8fc2a8e hello: 2 more lines
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> 40237c8
Switched to branch 'master'
ok 16 - bisect and replacements
expecting success:
git --no-replace-objects rev-list --objects HEAD |
git --no-replace-objects pack-objects test- &&
git index-pack test-*.pack
d06bfd96e506f4513fcb3d15f2d4a0d25e23b3e7
d06bfd96e506f4513fcb3d15f2d4a0d25e23b3e7
ok 17 - index-pack and replacements
expecting success:
echo replaced >file &&
git add file &&
REPLACED=$(git rev-parse :file) &&
mv file file.replaced &&
echo original >file &&
git add file &&
ORIGINAL=$(git rev-parse :file) &&
git update-ref refs/replace/$ORIGINAL $REPLACED &&
mv file file.original &&
git checkout file &&
test_cmp file.replaced file
Updated 1 path from the index
ok 18 - not just commits
expecting success:
test_must_fail git replace mytag $HASH1 &&
test_must_fail git replace HEAD^{tree} HEAD~1 &&
BLOB=$(git rev-parse :file) &&
test_must_fail git replace HEAD^ $BLOB
error: Objects must be of the same type.
'mytag' points to a replaced object of type 'tag'
while '00ad688edb1a79423184992de45a5f0322c8bdf5' points to a replacement object of type 'commit'.
error: Objects must be of the same type.
'HEAD^{tree}' points to a replaced object of type 'tree'
while 'HEAD~1' points to a replacement object of type 'commit'.
error: Objects must be of the same type.
'HEAD^' points to a replaced object of type 'commit'
while '4b48deed3a433909bfd6b6ab3d4b91348b6af464' points to a replacement object of type 'blob'.
ok 19 - replaced and replacement objects must be of the same type
expecting success:
git replace -f mytag $HASH1 &&
git replace --force HEAD^{tree} HEAD~1 &&
git replace -f HEAD^ $BLOB
ok 20 - -f option bypasses the type check
expecting success:
git replace | grep $PARA3 &&
echo $PARA3 | git cat-file --batch
a3fb2e1845a1aaf129b7975048973414dc172173
a3fb2e1845a1aaf129b7975048973414dc172173 commit 229
tree 2b0c71265a7705e0c171a5530d9ed18d5e1c31a6
parent af6d994c7106b0846fb80f09fa5bcbc460432c6d
author O Thor <author@example.com> 1112912113 -0700
committer C O Mitter <committer@example.com> 1112912353 -0700
hello: 2 more lines
ok 21 - git cat-file --batch works on replace objects
expecting success:
test_must_fail git replace --format bogus >/dev/null 2>&1
ok 22 - test --format bogus
expecting success:
git replace --format=short >actual &&
git replace >expected &&
test_cmp expected actual
ok 23 - test --format short
expecting success:
H1=$(git --no-replace-objects rev-parse HEAD~1) &&
HT=$(git --no-replace-objects rev-parse HEAD^{tree}) &&
MYTAG=$(git --no-replace-objects rev-parse mytag) &&
{
echo "$H1 -> $BLOB" &&
echo "$BLOB -> $REPLACED" &&
echo "$HT -> $H1" &&
echo "$PARA3 -> $S" &&
echo "$MYTAG -> $HASH1"
} | sort >expected &&
git replace -l --format medium | sort >actual &&
test_cmp expected actual
ok 24 - test --format medium
expecting success:
{
echo "$H1 (commit) -> $BLOB (blob)" &&
echo "$BLOB (blob) -> $REPLACED (blob)" &&
echo "$HT (tree) -> $H1 (commit)" &&
echo "$PARA3 (commit) -> $S (commit)" &&
echo "$MYTAG (tag) -> $HASH1 (commit)"
} | sort >expected &&
git replace --format=long | sort >actual &&
test_cmp expected actual
ok 25 - test --format long
expecting success:
write_script fakeeditor <<-\EOF &&
sed -e "s/A U Thor/A fake Thor/" "$1" >"$1.new"
mv "$1.new" "$1"
EOF
write_script failingfakeeditor <<-\EOF
./fakeeditor "$@"
false
EOF
ok 26 - setup fake editors
expecting success:
test_must_fail env GIT_EDITOR=./fakeeditor git replace --edit "$PARA3" &&
GIT_EDITOR=./fakeeditor git replace --force --edit "$PARA3" &&
git replace -l | grep "$PARA3" &&
git cat-file commit "$PARA3" | grep "A fake Thor" &&
git replace -d "$PARA3" &&
GIT_EDITOR=./fakeeditor git replace --edit "$PARA3" &&
git replace -l | grep "$PARA3" &&
git cat-file commit "$PARA3" | grep "A fake Thor"
error: replace ref 'refs/replace/a3fb2e1845a1aaf129b7975048973414dc172173' already exists
a3fb2e1845a1aaf129b7975048973414dc172173
author A fake Thor <author@example.com> 1112912113 -0700
Deleted replace ref 'a3fb2e1845a1aaf129b7975048973414dc172173'
a3fb2e1845a1aaf129b7975048973414dc172173
author A fake Thor <author@example.com> 1112912113 -0700
ok 27 - --edit with and without already replaced object
expecting success:
git replace -d "$PARA3" &&
test_must_fail env GIT_EDITOR=true git replace --edit "$PARA3" &&
test_must_fail env GIT_EDITOR="./failingfakeeditor" git replace --edit "$PARA3" &&
GIT_EDITOR=./fakeeditor git replace --edit "$PARA3" &&
git replace -l | grep "$PARA3" &&
git cat-file commit "$PARA3" | grep "A fake Thor"
Deleted replace ref 'a3fb2e1845a1aaf129b7975048973414dc172173'
error: new object is the same as the old one: 'a3fb2e1845a1aaf129b7975048973414dc172173'
error: There was a problem with the editor './failingfakeeditor'.
error: editing object file failed
a3fb2e1845a1aaf129b7975048973414dc172173
author A fake Thor <author@example.com> 1112912113 -0700
ok 28 - --edit and change nothing or command failed
expecting success:
test -n "$(git replace)" &&
git replace -d $(git replace) &&
test -z "$(git replace)"
Deleted replace ref '14ac020163ea60a9d683ce68e36c946f31ecc856'
Deleted replace ref '4b48deed3a433909bfd6b6ab3d4b91348b6af464'
Deleted replace ref '5c37393794868bc8e708cccd7c9d9aaa7a5e53cb'
Deleted replace ref 'a3fb2e1845a1aaf129b7975048973414dc172173'
Deleted replace ref 'e25dc7954f0832d962347872884aab2dffb426c5'
ok 29 - replace ref cleanup
expecting success:
git log --oneline >log &&
test_line_count = 7 log &&
git replace --graft $HASH5 &&
git log --oneline >log &&
test_line_count = 3 log &&
commit_has_parents $HASH5 &&
test_must_fail git replace --graft $HASH5 $HASH4 $HASH3 &&
git replace --force -g $HASH5 $HASH4 $HASH3 &&
commit_has_parents $HASH5 $HASH4 $HASH3 &&
git replace -d $HASH5
fatal: Needed a single revision
error: replace ref 'refs/replace/093e41a79d4a8bfe3c758a96c95e5bf9e35ed89c' already exists
fatal: Needed a single revision
Deleted replace ref '093e41a79d4a8bfe3c758a96c95e5bf9e35ed89c'
ok 30 - --graft with and without already replaced object
expecting success:
git tag new_parent $HASH5 &&
git replace --graft $HASH7 new_parent &&
commit_has_parents $HASH7 $HASH5 &&
git replace -d $HASH7 &&
git tag -a -m "annotated new parent tag" annotated_new_parent $HASH5 &&
git replace --graft $HASH7 annotated_new_parent &&
commit_has_parents $HASH7 $HASH5 &&
git replace -d $HASH7
fatal: Needed a single revision
Deleted replace ref 'ffccc9d552388844dbe94a361c07e7cb1731e12f'
fatal: Needed a single revision
Deleted replace ref 'ffccc9d552388844dbe94a361c07e7cb1731e12f'
ok 31 - --graft using a tag as the new parent
expecting success:
git tag replaced_object $HASH7 &&
git replace --graft replaced_object $HASH5 &&
commit_has_parents $HASH7 $HASH5 &&
git replace -d $HASH7 &&
git tag -a -m "annotated replaced object tag" annotated_replaced_object $HASH7 &&
git replace --graft annotated_replaced_object $HASH5 &&
commit_has_parents $HASH7 $HASH5 &&
git replace -d $HASH7
fatal: Needed a single revision
Deleted replace ref 'ffccc9d552388844dbe94a361c07e7cb1731e12f'
fatal: Needed a single revision
Deleted replace ref 'ffccc9d552388844dbe94a361c07e7cb1731e12f'
ok 32 - --graft using a tag as the replaced object
expecting success:
echo "line 17" >>hello &&
echo "line 18" >>hello &&
git add hello &&
test_tick &&
git commit --quiet -S -m "hello: 2 more lines in a signed commit" &&
HASH8=$(git rev-parse --verify HEAD) &&
git verify-commit $HASH8
gpg: Signature made Wed Aug 14 07:34:07 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: checking the trustdb
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
ok 33 - set up a signed commit
expecting success:
git cat-file commit $HASH8 >orig &&
git replace --graft $HASH8 &&
git cat-file commit $HASH8 >repl &&
commit_has_parents $HASH8 &&
test_must_fail git verify-commit $HASH8 &&
sed -n -e "/^tree /p" -e "/^author /p" -e "/^committer /p" orig >expected &&
echo >>expected &&
sed -e "/^$/q" repl >actual &&
test_cmp expected actual &&
git replace -d $HASH8
warning: the original commit '421a5f3bf69d25f69b88a24806d121975b411308' has a gpg signature
warning: the signature will be removed in the replacement commit!
fatal: Needed a single revision
Deleted replace ref '421a5f3bf69d25f69b88a24806d121975b411308'
ok 34 - --graft with a signed commit
expecting success:
git reset --hard HEAD &&
git checkout -b test_branch HEAD~2 &&
echo "line 1 from test branch" >>hello &&
echo "line 2 from test branch" >>hello &&
git add hello &&
test_tick &&
git commit -m "hello: 2 more lines from a test branch" &&
HASH9=$(git rev-parse --verify HEAD) &&
git tag -s -m "tag for testing with a mergetag" test_tag HEAD &&
git checkout master &&
git merge -s ours test_tag &&
HASH10=$(git rev-parse --verify HEAD) &&
git cat-file commit $HASH10 | grep "^mergetag object"
HEAD is now at 421a5f3 hello: 2 more lines in a signed commit
Switched to a new branch 'test_branch'
[test_branch b626dba] hello: 2 more lines from a test branch
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
Switched to branch 'master'
Merge made by the 'ours' strategy.
mergetag object b626dba35124fd887689d330b4f2e827b8367cae
ok 35 - set up a merge commit with a mergetag
expecting success:
test_must_fail git replace --graft $HASH10 $HASH8^1 &&
git replace --graft $HASH10 $HASH8^1 $HASH9 &&
git replace -d $HASH10
error: original commit '10f842d28dba39fd6e560362930e2c4f1da93eed' contains mergetag '200509310c777a28e531bada9c0c3120d137a5b6' that is discarded; use --edit instead of --graft
Deleted replace ref '10f842d28dba39fd6e560362930e2c4f1da93eed'
ok 36 - --graft on a commit with a mergetag
expecting success:
git checkout -b with-graft-file &&
test_commit root2 &&
git reset --hard root2^ &&
test_commit root1 &&
test_commit after-root1 &&
test_tick &&
git merge -m merge-root2 root2 &&
: add and convert graft file &&
printf "%s\n%s %s\n\n# comment\n%s\n" \
$(git rev-parse HEAD^^ HEAD^ HEAD^^ HEAD^2) \
>.git/info/grafts &&
git status 2>stderr &&
test_i18ngrep "hint:.*grafts is deprecated" stderr &&
git replace --convert-graft-file 2>stderr &&
test_i18ngrep ! "hint:.*grafts is deprecated" stderr &&
test_path_is_missing .git/info/grafts &&
: verify that the history is now "grafted" &&
git rev-list HEAD >out &&
test_line_count = 4 out &&
: create invalid graft file and verify that it is not deleted &&
test_when_finished "rm -f .git/info/grafts" &&
echo $EMPTY_BLOB $EMPTY_TREE >.git/info/grafts &&
test_must_fail git replace --convert-graft-file 2>err &&
test_i18ngrep "$EMPTY_BLOB $EMPTY_TREE" err &&
test_i18ngrep "$EMPTY_BLOB $EMPTY_TREE" .git/info/grafts
Switched to a new branch 'with-graft-file'
[with-graft-file 75b4495] root2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 root2.t
HEAD is now at 10f842d Merge tag 'test_tag'
[with-graft-file 236c6ee] root1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 root1.t
[with-graft-file 6b82079] after-root1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 after-root1.t
Merging:
6b82079 after-root1
virtual root2
found 1 common ancestor:
10f842d Merge tag 'test_tag'
Merge made by the 'recursive' strategy.
root2.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 root2.t
On branch with-graft-file
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual
clone_dir/
err
expected
failingfakeeditor
fakeeditor
file.original
file.replaced
fsck_master.out
gpghome/
log
message
orig
payload
repl
stderr
tag.sig
test--d06bfd96e506f4513fcb3d15f2d4a0d25e23b3e7.idx
test--d06bfd96e506f4513fcb3d15f2d4a0d25e23b3e7.pack
nothing added to commit but untracked files present (use "git add" to track)
hint: Support for <GIT_DIR>/info/grafts is deprecated
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 4b825dc642cb6eb9a060e54bf8d69288fbee4904
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 4b825dc642cb6eb9a060e54bf8d69288fbee4904
ok 37 - --convert-graft-file
# passed all 37 test(s)
1..37
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6060-merge-index.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6060-merge-index/.git/
expecting success:
for i in 1 2 3 4 5 6 7 8 9 10; do
echo $i
done >file &&
git add file &&
git commit -m base &&
git tag base &&
sed s/2/two/ <file >tmp &&
mv tmp file &&
git commit -a -m two &&
git tag two &&
git checkout -b other HEAD^ &&
sed s/10/ten/ <file >tmp &&
mv tmp file &&
git commit -a -m ten &&
git tag ten
[master (root-commit) e0c69ca] base
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 file
[master 3561caa] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'other'
[other 25fafc4] ten
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup diverging branches
expecting success:
git read-tree -i -m base ten two &&
echo file >expect &&
git diff-files --name-only --diff-filter=U >unmerged &&
test_cmp expect unmerged
ok 2 - read-tree does not resolve content merge
expecting success:
git merge-index git-merge-one-file -a &&
git diff-files --name-only --diff-filter=U >unmerged &&
test_must_be_empty unmerged &&
test_cmp expect-merged file &&
git cat-file blob :file >file-index &&
test_cmp expect-merged file-index
Auto-merging file
ok 3 - git merge-index git-merge-one-file resolves
expecting success:
git clone --bare . bare.git &&
(cd bare.git &&
GIT_INDEX_FILE=$PWD/merge.index &&
export GIT_INDEX_FILE &&
git read-tree -i -m base ten two
)
Cloning into bare repository 'bare.git'...
done.
ok 4 - setup bare merge
expecting success:
(cd bare.git &&
GIT_INDEX_FILE=$PWD/merge.index &&
export GIT_INDEX_FILE &&
test_must_fail git merge-index git-merge-one-file -a
)
fatal: /<<PKGBUILDDIR>>/git-merge-one-file cannot be used without a working tree.
fatal: merge program failed
ok 5 - merge-one-file fails without a work tree
expecting success:
(cd bare.git &&
mkdir work &&
GIT_WORK_TREE=$PWD/work &&
export GIT_WORK_TREE &&
GIT_INDEX_FILE=$PWD/merge.index &&
export GIT_INDEX_FILE &&
git merge-index git-merge-one-file -a &&
git cat-file blob :file >work/file-index
) &&
test_cmp expect-merged bare.git/work/file &&
test_cmp expect-merged bare.git/work/file-index
Auto-merging file
ok 6 - merge-one-file respects GIT_WORK_TREE
expecting success:
mkdir subdir &&
git clone . subdir/child &&
(cd subdir &&
GIT_DIR=$PWD/child/.git &&
export GIT_DIR &&
git config core.worktree "$PWD/child" &&
git read-tree -i -m base ten two &&
git merge-index git-merge-one-file -a &&
git cat-file blob :file >file-index
) &&
test_cmp expect-merged subdir/child/file &&
test_cmp expect-merged subdir/file-index
Cloning into 'subdir/child'...
done.
Auto-merging file
ok 7 - merge-one-file respects core.worktree
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6100-rev-list-in-order.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6100-rev-list-in-order/.git/
expecting success:
for x in one two three four
do
echo $x >$x &&
git add $x &&
git commit -m "add file $x" ||
return 1
done &&
for x in four three
do
git rm $x &&
git commit -m "remove $x" ||
return 1
done
[master (root-commit) 3a29b5f] add file one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one
[master ac44cb0] add file two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two
[master 5b2384b] add file three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three
[master 2930115] add file four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 four
rm 'four'
[master c6c0ef6] remove four
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 four
rm 'three'
[master b2505b9] remove three
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 three
ok 1 - setup a commit history with trees, blobs
expecting success:
git rev-list --in-commit-order --objects HEAD >actual.raw &&
cut -c 1-40 >actual <actual.raw &&
git cat-file --batch-check="%(objectname)" >expect.raw <<-\EOF &&
HEAD^{commit}
HEAD^{tree}
HEAD^{tree}:one
HEAD^{tree}:two
HEAD~1^{commit}
HEAD~1^{tree}
HEAD~1^{tree}:three
HEAD~2^{commit}
HEAD~2^{tree}
HEAD~2^{tree}:four
HEAD~3^{commit}
# HEAD~3^{tree} skipped, same as HEAD~1^{tree}
HEAD~4^{commit}
# HEAD~4^{tree} skipped, same as HEAD^{tree}
HEAD~5^{commit}
HEAD~5^{tree}
EOF
grep -v "#" >expect <expect.raw &&
test_cmp expect actual
ok 2 - rev-list --in-commit-order
expecting success:
git rev-list --objects HEAD >actual.raw &&
cut -c 1-40 >actual <actual.raw &&
git cat-file --batch-check="%(objectname)" >expect.raw <<-\EOF &&
HEAD^{commit}
HEAD~1^{commit}
HEAD~2^{commit}
HEAD~3^{commit}
HEAD~4^{commit}
HEAD~5^{commit}
HEAD^{tree}
HEAD^{tree}:one
HEAD^{tree}:two
HEAD~1^{tree}
HEAD~1^{tree}:three
HEAD~2^{tree}
HEAD~2^{tree}:four
# HEAD~3^{tree} skipped, same as HEAD~1^{tree}
# HEAD~4^{tree} skipped, same as HEAD^{tree}
HEAD~5^{tree}
EOF
grep -v "#" >expect <expect.raw &&
test_cmp expect actual
ok 3 - rev-list lists blobs and trees after commits
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6102-rev-list-unexpected-objects.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6102-rev-list-unexpected-objects/.git/
expecting success:
blob="$(printf "foo" | git hash-object -w --stdin)" &&
tree="$(printf "100644 blob $blob\tfoo" | git mktree)" &&
commit="$(git commit-tree $tree -m "first commit")" &&
git cat-file commit $commit >good-commit
ok 1 - setup well-formed objects
expecting success:
printf "100644 foo\0$(echo $tree | hex2oct)" >broken-tree &&
broken_tree="$(git hash-object -w --literally -t tree broken-tree)"
ok 2 - setup unexpected non-blob entry
checking known breakage:
test_must_fail git rev-list --objects $broken_tree
f9a0e545d60bd011757113bec85ba95242fa6c4e
2f42e2c1c1afd4ef8c66a2aaba5d5e1baddcab33 foo
test_must_fail: command succeeded: git rev-list --objects f9a0e545d60bd011757113bec85ba95242fa6c4e
not ok 3 - traverse unexpected non-blob entry (lone) # TODO known breakage
expecting success:
test_must_fail git rev-list --objects $tree $broken_tree >output 2>&1 &&
test_i18ngrep "is not a blob" output
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: entry 'foo' in tree f9a0e545d60bd011757113bec85ba95242fa6c4e has blob mode, but is not a blob
ok 4 - traverse unexpected non-blob entry (seen)
expecting success:
printf "40000 foo\0$(echo $blob | hex2oct)" >broken-tree &&
broken_tree="$(git hash-object -w --literally -t tree broken-tree)"
ok 5 - setup unexpected non-tree entry
expecting success:
test_must_fail git rev-list --objects $broken_tree
error: Object 19102815663d23f8b75a47e7a01965dcdc96468c not a tree
fatal: bad tree object 19102815663d23f8b75a47e7a01965dcdc96468c
10cd09cb3996f045aaf5417c833c0fa1ee7227e9
ok 6 - traverse unexpected non-tree entry (lone)
expecting success:
test_must_fail git rev-list --objects $blob $broken_tree >output 2>&1 &&
test_i18ngrep "is not a tree" output
fatal: entry 'foo' in tree 10cd09cb3996f045aaf5417c833c0fa1ee7227e9 has tree mode, but is not a tree
ok 7 - traverse unexpected non-tree entry (seen)
expecting success:
sed "/^author/ { h; s/.*/parent $blob/; G; }" <good-commit \
>broken-commit &&
broken_commit="$(git hash-object -w --literally -t commit \
broken-commit)"
ok 8 - setup unexpected non-commit parent
expecting success:
test_must_fail git rev-list --objects $broken_commit >output 2>&1 &&
test_i18ngrep "not a commit" output
error: Object 19102815663d23f8b75a47e7a01965dcdc96468c not a commit
ok 9 - traverse unexpected non-commit parent (lone)
expecting success:
test_must_fail git rev-list --objects $commit $broken_commit \
>output 2>&1 &&
test_i18ngrep "not a commit" output
error: Object 19102815663d23f8b75a47e7a01965dcdc96468c not a commit
ok 10 - traverse unexpected non-commit parent (seen)
expecting success:
sed -e "s/$tree/$blob/" <good-commit >broken-commit &&
broken_commit="$(git hash-object -w --literally -t commit \
broken-commit)"
ok 11 - setup unexpected non-tree root
expecting success:
test_must_fail git rev-list --objects $broken_commit
error: Object 19102815663d23f8b75a47e7a01965dcdc96468c not a tree
fatal: bad tree object 19102815663d23f8b75a47e7a01965dcdc96468c
4e6e1317e41f48e66688b3020140bb0766e317ed
ok 12 - traverse unexpected non-tree root (lone)
expecting success:
test_must_fail git rev-list --objects $blob $broken_commit \
>output 2>&1 &&
test_i18ngrep "not a tree" output
error: object 19102815663d23f8b75a47e7a01965dcdc96468c is a blob, not a tree
ok 13 - traverse unexpected non-tree root (seen)
expecting success:
git tag -a -m "tagged commit" tag $commit &&
git cat-file tag tag >good-tag &&
test_when_finished "git tag -d tag" &&
sed -e "s/$commit/$blob/" <good-tag >broken-tag &&
tag=$(git hash-object -w --literally -t tag broken-tag)
Deleted tag 'tag' (was a95f468)
ok 14 - setup unexpected non-commit tag
expecting success:
test_must_fail git rev-list --objects $tag
error: object 19102815663d23f8b75a47e7a01965dcdc96468c is a commit, not a blob
fatal: bad object 19102815663d23f8b75a47e7a01965dcdc96468c
ok 15 - traverse unexpected non-commit tag (lone)
expecting success:
test_must_fail git rev-list --objects $blob $tag >output 2>&1 &&
test_i18ngrep "not a commit" output
error: object 19102815663d23f8b75a47e7a01965dcdc96468c is a blob, not a commit
ok 16 - traverse unexpected non-commit tag (seen)
expecting success:
git tag -a -m "tagged tree" tag $tree &&
git cat-file tag tag >good-tag &&
test_when_finished "git tag -d tag" &&
sed -e "s/$tree/$blob/" <good-tag >broken-tag &&
tag=$(git hash-object -w --literally -t tag broken-tag)
Deleted tag 'tag' (was fdfebea)
ok 17 - setup unexpected non-tree tag
expecting success:
test_must_fail git rev-list --objects $tag
error: object 19102815663d23f8b75a47e7a01965dcdc96468c is a tree, not a blob
fatal: bad object 19102815663d23f8b75a47e7a01965dcdc96468c
ok 18 - traverse unexpected non-tree tag (lone)
expecting success:
test_must_fail git rev-list --objects $blob $tag >output 2>&1 &&
test_i18ngrep "not a tree" output
error: object 19102815663d23f8b75a47e7a01965dcdc96468c is a blob, not a tree
ok 19 - traverse unexpected non-tree tag (seen)
expecting success:
git tag -a -m "tagged blob" tag $blob &&
git cat-file tag tag >good-tag &&
test_when_finished "git tag -d tag" &&
sed -e "s/$blob/$commit/" <good-tag >broken-tag &&
tag=$(git hash-object -w --literally -t tag broken-tag)
Deleted tag 'tag' (was eea5b40)
ok 20 - setup unexpected non-blob tag
checking known breakage:
test_must_fail git rev-list --objects $tag
49947e2eccd2a36c1d6ddcdf4405968b5c9a5437 tag
5a8e41a0f655486190e57a338f5a4e3ccfc8f90b
test_must_fail: command succeeded: git rev-list --objects 49947e2eccd2a36c1d6ddcdf4405968b5c9a5437
not ok 21 - traverse unexpected non-blob tag (lone) # TODO known breakage
expecting success:
test_must_fail git rev-list --objects $commit $tag >output 2>&1 &&
test_i18ngrep "not a blob" output
error: object 5a8e41a0f655486190e57a338f5a4e3ccfc8f90b is a commit, not a blob
ok 22 - traverse unexpected non-blob tag (seen)
# still have 2 known breakage(s)
# passed all remaining 20 test(s)
1..22
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6110-rev-list-sparse.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6110-rev-list-sparse/.git/
expecting success:
test_commit A &&
test_commit B &&
test_commit C &&
git checkout -b side HEAD^ &&
test_commit D &&
test_commit E &&
git merge master
[master (root-commit) 0ddfaf1] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
[master d9df450] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B.t
[master 35a8500] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C.t
Switched to a new branch 'side'
[side 3e6e33e] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D.t
[side dc25130] E
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 E.t
Merging:
dc25130 E
virtual master
found 1 common ancestor:
d9df450 B
Merge made by the 'recursive' strategy.
C.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 C.t
ok 1 - setup
expecting success:
git rev-list --first-parent --boundary HEAD^..
2d82c395bc1ef4846e3c35512cb70c2abc5cdab1
-35a8500a6c116c9ddf35e140fa3277a7fe0b4196
-dc25130fe5e9f5d4a18aa4e0dff022e489b22c75
ok 2 - rev-list --first-parent --boundary
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6030-bisect-porcelain.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6030-bisect-porcelain/.git/
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)
ok 1 - set up basic repo with 1 file (hello) and 4 commits
expecting success:
git bisect reset &&
git bisect start &&
git bisect bad $HASH4 &&
git bisect next
We are not bisecting.
warning: bisecting only with a bad commit
Bisecting: 1 revision left to test after this (roughly 1 step)
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
ok 2 - bisect starts with only one bad
expecting success:
git bisect reset &&
git bisect start &&
git bisect good $HASH1 &&
test_must_fail git bisect next
Previous HEAD position was 7b7f204 Add <2: A new day for git> into <hello>.
Switched to branch 'master'
error: You need to give me at least one bad|new and good|old revision.
You can use "git bisect bad|new" and "git bisect good|old" for that.
ok 3 - bisect does not start with only one good
expecting success:
git bisect reset &&
git bisect start &&
git bisect good $HASH1 &&
git bisect bad $HASH4 &&
git bisect next
Already on 'master'
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
ok 4 - bisect start with one bad and good
expecting success:
git bisect reset &&
test_must_fail git bisect start foo $HASH1 -- &&
test_must_fail git bisect start $HASH4 $HASH1 bar -- &&
test -z "$(git for-each-ref "refs/bisect/*")" &&
test -z "$(ls .git/BISECT_* 2>/dev/null)" &&
git bisect start &&
test_must_fail git bisect good foo $HASH1 &&
test_must_fail git bisect good $HASH1 bar &&
test_must_fail git bisect bad frotz &&
test_must_fail git bisect bad $HASH3 $HASH4 &&
test_must_fail git bisect skip bar $HASH3 &&
test_must_fail git bisect skip $HASH1 foo &&
test -z "$(git for-each-ref "refs/bisect/*")" &&
git bisect good $HASH1 &&
git bisect bad $HASH4
Previous HEAD position was 3de952f Add <3: Another new day for git> into <hello>.
Switched to branch 'master'
fatal: 'foo' does not appear to be a valid revision
fatal: 'bar' does not appear to be a valid revision
fatal: Needed a single revision
Bad rev input: foo
fatal: Needed a single revision
Bad rev input: bar
fatal: Needed a single revision
Bad rev input: frotz
'git bisect bad' can take only one argument.
fatal: Needed a single revision
Bad rev input: bar
fatal: Needed a single revision
Bad rev input: foo
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
ok 5 - bisect fails if given any junk instead of revs
expecting success:
git bisect reset &&
echo "* master" > branch.expect &&
git branch > branch.output &&
cmp branch.expect branch.output
Previous HEAD position was 3de952f Add <3: Another new day for git> into <hello>.
Switched to branch 'master'
ok 6 - bisect reset: back in the master branch
expecting success:
git checkout -b other &&
git bisect start &&
git bisect good $HASH1 &&
git bisect bad $HASH3 &&
git bisect reset &&
echo " master" > branch.expect &&
echo "* other" >> branch.expect &&
git branch > branch.output &&
cmp branch.expect branch.output
Switched to a new branch 'other'
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
Previous HEAD position was 7b7f204 Add <2: A new day for git> into <hello>.
Switched to branch 'other'
ok 7 - bisect reset: back in another branch
expecting success:
git bisect reset &&
git branch > branch.output &&
cmp branch.expect branch.output
We are not bisecting.
ok 8 - bisect reset when not bisecting
expecting success:
git bisect reset &&
git bisect start &&
git bisect good $HASH1 &&
git bisect bad $HASH3 &&
git pack-refs --all --prune &&
git bisect next &&
git bisect reset &&
test -z "$(git for-each-ref "refs/bisect/*")" &&
test -z "$(git for-each-ref "refs/heads/bisect")"
We are not bisecting.
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
Previous HEAD position was 7b7f204 Add <2: A new day for git> into <hello>.
Switched to branch 'other'
ok 9 - bisect reset removes packed refs
expecting success:
git bisect reset &&
git bisect start --no-checkout &&
git bisect good $HASH1 &&
git bisect bad $HASH3 &&
git bisect next &&
git bisect reset &&
test -z "$(git for-each-ref "refs/bisect/*")" &&
test -z "$(git for-each-ref "refs/heads/bisect")" &&
test -z "$(git for-each-ref "BISECT_HEAD")"
We are not bisecting.
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
ok 10 - bisect reset removes bisect state after --no-checkout
expecting success:
git branch > branch.output &&
grep "* other" branch.output > /dev/null &&
git bisect start $HASH4 $HASH1 -- &&
git bisect good &&
git bisect start $HASH4 $HASH1 -- &&
git bisect bad &&
git bisect reset &&
git branch > branch.output &&
grep "* other" branch.output > /dev/null
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
32a594a3fdac2d57cf6d02987e30eec68511498c is the first bad commit
commit 32a594a3fdac2d57cf6d02987e30eec68511498c
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
Add <4: Ciao for now> into <hello>.
hello | 1 +
1 file changed, 1 insertion(+)
Previous HEAD position was 3de952f Add <3: Another new day for git> into <hello>.
Switched to branch 'other'
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
Previous HEAD position was 7b7f204 Add <2: A new day for git> into <hello>.
Switched to branch 'other'
ok 11 - bisect start: back in good branch
expecting success:
git bisect reset &&
test_must_fail git bisect start $HASH4 foo -- &&
git branch > branch.output &&
grep "* other" branch.output > /dev/null &&
test_must_fail test -e .git/BISECT_START
We are not bisecting.
fatal: 'foo' does not appear to be a valid revision
ok 12 - bisect start: no ".git/BISECT_START" created if junk rev
expecting success:
git bisect start $HASH4 $HASH1 -- &&
git bisect good &&
cp .git/BISECT_START saved &&
test_must_fail git bisect start $HASH4 foo -- &&
git branch > branch.output &&
test_i18ngrep "* (no branch, bisect started on other)" branch.output > /dev/null &&
test_cmp saved .git/BISECT_START
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
32a594a3fdac2d57cf6d02987e30eec68511498c is the first bad commit
commit 32a594a3fdac2d57cf6d02987e30eec68511498c
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
Add <4: Ciao for now> into <hello>.
hello | 1 +
1 file changed, 1 insertion(+)
fatal: 'foo' does not appear to be a valid revision
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 13 - bisect start: existing ".git/BISECT_START" not modified if junk rev
expecting success:
git bisect start $HASH4 $HASH1 -- &&
git bisect good &&
test_must_fail git bisect start $HASH1 $HASH4 -- &&
git branch > branch.output &&
grep "* other" branch.output > /dev/null &&
test_must_fail test -e .git/BISECT_START
Previous HEAD position was 3de952f Add <3: Another new day for git> into <hello>.
Switched to branch 'other'
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
32a594a3fdac2d57cf6d02987e30eec68511498c is the first bad commit
commit 32a594a3fdac2d57cf6d02987e30eec68511498c
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
Add <4: Ciao for now> into <hello>.
hello | 1 +
1 file changed, 1 insertion(+)
Previous HEAD position was 3de952f Add <3: Another new day for git> into <hello>.
Switched to branch 'other'
Some good revs are not ancestors of the bad rev.
git bisect cannot work properly in this case.
Maybe you mistook good and bad revs?
ok 14 - bisect start: no ".git/BISECT_START" if mistaken rev
expecting success:
echo "temp stuff" > hello &&
test_must_fail git bisect start $HASH4 $HASH1 -- &&
git branch &&
git branch > branch.output &&
grep "* other" branch.output > /dev/null &&
test_must_fail test -e .git/BISECT_START &&
test -z "$(git for-each-ref "refs/bisect/*")" &&
git checkout HEAD hello
Bisecting: 0 revisions left to test after this (roughly 1 step)
error: Your local changes to the following files would be overwritten by checkout:
hello
Please commit your changes or stash them before you switch branches.
Aborting
master
* other
Updated 1 path from 2c98925
ok 15 - bisect start: no ".git/BISECT_START" if checkout error
expecting success:
test_when_finished git bisect reset &&
git bisect reset &&
git bisect start $HASH4 $HASH1 &&
git bisect skip &&
git bisect bad > my_bisect_log.txt &&
grep "$HASH2 is the first bad commit" my_bisect_log.txt
We are not bisecting.
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
Bisecting: 0 revisions left to test after this (roughly 1 step)
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
7b7f204a749c3125d5224ed61ea2ae1187ad046f is the first bad commit
Previous HEAD position was 7b7f204 Add <2: A new day for git> into <hello>.
Switched to branch 'other'
ok 16 - bisect skip: successful result
expecting success:
test_when_finished git bisect reset &&
git bisect start $HASH4 $HASH1 &&
git bisect skip &&
test_expect_code 2 git bisect skip >my_bisect_log.txt &&
grep "first bad commit could be any of" my_bisect_log.txt &&
! grep $HASH1 my_bisect_log.txt &&
grep $HASH2 my_bisect_log.txt &&
grep $HASH3 my_bisect_log.txt &&
grep $HASH4 my_bisect_log.txt
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
Bisecting: 0 revisions left to test after this (roughly 1 step)
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
The first bad commit could be any of:
7b7f204a749c3125d5224ed61ea2ae1187ad046f
3de952f2416b6084f557ec417709eac740c6818c
32a594a3fdac2d57cf6d02987e30eec68511498c
Previous HEAD position was 7b7f204 Add <2: A new day for git> into <hello>.
Switched to branch 'other'
ok 17 - bisect skip: cannot tell between 3 commits
expecting success:
test_when_finished git bisect reset &&
git bisect start $HASH4 $HASH1 &&
git bisect skip &&
test_expect_code 2 git bisect good >my_bisect_log.txt &&
grep "first bad commit could be any of" my_bisect_log.txt &&
! grep $HASH1 my_bisect_log.txt &&
! grep $HASH2 my_bisect_log.txt &&
grep $HASH3 my_bisect_log.txt &&
grep $HASH4 my_bisect_log.txt
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
Bisecting: 0 revisions left to test after this (roughly 1 step)
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
The first bad commit could be any of:
3de952f2416b6084f557ec417709eac740c6818c
32a594a3fdac2d57cf6d02987e30eec68511498c
Previous HEAD position was 7b7f204 Add <2: A new day for git> into <hello>.
Switched to branch 'other'
ok 18 - bisect skip: cannot tell between 2 commits
expecting success:
test_when_finished git bisect reset &&
git bisect start &&
git bisect skip &&
git bisect bad &&
git bisect good $HASH1 &&
git bisect skip &&
test_expect_code 2 git bisect good >my_bisect_log.txt &&
grep "first bad commit could be any of" my_bisect_log.txt &&
! grep $HASH1 my_bisect_log.txt &&
! grep $HASH2 my_bisect_log.txt &&
grep $HASH3 my_bisect_log.txt &&
grep $HASH4 my_bisect_log.txt
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
Bisecting: 0 revisions left to test after this (roughly 1 step)
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
The first bad commit could be any of:
3de952f2416b6084f557ec417709eac740c6818c
32a594a3fdac2d57cf6d02987e30eec68511498c
Previous HEAD position was 7b7f204 Add <2: A new day for git> into <hello>.
Switched to branch 'other'
ok 19 - bisect skip: with commit both bad and skipped
expecting success: echo "#"\!"/bin/sh" > test_script.sh &&
echo "grep Another hello > /dev/null" >> test_script.sh &&
echo "test \$? -ne 0" >> test_script.sh &&
chmod +x test_script.sh &&
git bisect start &&
git bisect good $HASH1 &&
git bisect bad $HASH4 &&
git bisect run ./test_script.sh > my_bisect_log.txt &&
grep "$HASH3 is the first bad commit" my_bisect_log.txt &&
git bisect reset
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
3de952f2416b6084f557ec417709eac740c6818c is the first bad commit
Previous HEAD position was 7b7f204 Add <2: A new day for git> into <hello>.
Switched to branch 'other'
ok 20 - "git bisect run" simple case
expecting success: echo "#"\!"/bin/sh" > test_script.sh &&
echo "grep Ciao hello > /dev/null" >> test_script.sh &&
echo "test \$? -ne 0" >> test_script.sh &&
chmod +x test_script.sh &&
git bisect start $HASH4 $HASH1 &&
git bisect run ./test_script.sh > my_bisect_log.txt &&
grep "$HASH4 is the first bad commit" my_bisect_log.txt &&
git bisect reset
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
32a594a3fdac2d57cf6d02987e30eec68511498c is the first bad commit
Previous HEAD position was 3de952f Add <3: Another new day for git> into <hello>.
Switched to branch 'other'
ok 21 - "git bisect run" with more complex "git bisect start"
expecting success:
add_line_into_file "5: Another new line." hello &&
HASH5=$(git rev-parse --verify HEAD) &&
git bisect start $HASH5 $HASH1 &&
git bisect skip &&
git bisect good > my_bisect_log.txt &&
grep "$HASH5 is the first bad commit" my_bisect_log.txt &&
git bisect log > log_to_replay.txt &&
git bisect reset
Bisecting: 1 revision left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
Bisecting: 1 revision left to test after this (roughly 1 step)
[32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>.
3082e11d3a0f2edca194c8ce1eb802256e38e75e is the first bad commit
Previous HEAD position was 32a594a Add <4: Ciao for now> into <hello>.
Switched to branch 'other'
ok 22 - bisect skip: add line and then a new test
expecting success:
git bisect replay log_to_replay.txt > my_bisect_log.txt &&
grep "$HASH5 is the first bad commit" my_bisect_log.txt &&
git bisect reset
3082e11d3a0f2edca194c8ce1eb802256e38e75e is the first bad commit
Previous HEAD position was 3de952f Add <3: Another new day for git> into <hello>.
Switched to branch 'other'
ok 23 - bisect skip and bisect replay
expecting success:
add_line_into_file "6: Yet a line." hello &&
HASH6=$(git rev-parse --verify HEAD) &&
echo "#"\!"/bin/sh" > test_script.sh &&
echo "sed -ne \\\$p hello | grep Ciao > /dev/null && exit 125" >> test_script.sh &&
echo "grep line hello > /dev/null" >> test_script.sh &&
echo "test \$? -ne 0" >> test_script.sh &&
chmod +x test_script.sh &&
git bisect start $HASH6 $HASH1 &&
if git bisect run ./test_script.sh > my_bisect_log.txt
then
echo Oops, should have failed.
false
else
test $? -eq 2 &&
grep "first bad commit could be any of" my_bisect_log.txt &&
! grep $HASH3 my_bisect_log.txt &&
! grep $HASH6 my_bisect_log.txt &&
grep $HASH4 my_bisect_log.txt &&
grep $HASH5 my_bisect_log.txt
fi
Bisecting: 2 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
bisect run cannot continue any more
The first bad commit could be any of:
[32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>.
32a594a3fdac2d57cf6d02987e30eec68511498c
[3082e11d3a0f2edca194c8ce1eb802256e38e75e] Add <5: Another new line.> into <hello>.
3082e11d3a0f2edca194c8ce1eb802256e38e75e
ok 24 - bisect run & skip: cannot tell between 2
expecting success:
git bisect reset &&
add_line_into_file "7: Should be the last line." hello &&
HASH7=$(git rev-parse --verify HEAD) &&
echo "#"\!"/bin/sh" > test_script.sh &&
echo "sed -ne \\\$p hello | grep Ciao > /dev/null && exit 125" >> test_script.sh &&
echo "sed -ne \\\$p hello | grep day > /dev/null && exit 125" >> test_script.sh &&
echo "grep Yet hello > /dev/null" >> test_script.sh &&
echo "test \$? -ne 0" >> test_script.sh &&
chmod +x test_script.sh &&
git bisect start $HASH7 $HASH1 &&
git bisect run ./test_script.sh > my_bisect_log.txt &&
grep "$HASH6 is the first bad commit" my_bisect_log.txt
Previous HEAD position was 32a594a Add <4: Ciao for now> into <hello>.
Switched to branch 'other'
Bisecting: 2 revisions left to test after this (roughly 2 steps)
[32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>.
ff29dcbe6fe49a0b462bddf0691a013c12a53316 is the first bad commit
ok 25 - bisect run & skip: find first bad
expecting success:
git bisect reset &&
git bisect start $HASH7 $HASH1 &&
git bisect skip $HASH1..$HASH5 &&
test "$HASH6" = "$(git rev-parse --verify HEAD)" &&
test_must_fail git bisect bad > my_bisect_log.txt &&
grep "first bad commit could be any of" my_bisect_log.txt
Previous HEAD position was ff29dcb Add <6: Yet a line.> into <hello>.
Switched to branch 'other'
Bisecting: 2 revisions left to test after this (roughly 2 steps)
[32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>.
Bisecting: 2 revisions left to test after this (roughly 2 steps)
[ff29dcbe6fe49a0b462bddf0691a013c12a53316] Add <6: Yet a line.> into <hello>.
The first bad commit could be any of:
ok 26 - bisect skip only one range
expecting success:
git bisect start $HASH7 $HASH1 &&
test "$HASH4" = "$(git rev-parse --verify HEAD)" &&
git bisect skip $HASH2 $HASH2.. ..$HASH5 &&
test "$HASH6" = "$(git rev-parse --verify HEAD)" &&
test_must_fail git bisect bad > my_bisect_log.txt &&
grep "first bad commit could be any of" my_bisect_log.txt
Previous HEAD position was ff29dcb Add <6: Yet a line.> into <hello>.
Switched to branch 'other'
Bisecting: 2 revisions left to test after this (roughly 2 steps)
[32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>.
Bisecting: 2 revisions left to test after this (roughly 2 steps)
[ff29dcbe6fe49a0b462bddf0691a013c12a53316] Add <6: Yet a line.> into <hello>.
The first bad commit could be any of:
ok 27 - bisect skip many ranges
expecting success:
git bisect reset &&
git checkout master^ &&
HEAD=$(git rev-parse --verify HEAD) &&
git bisect start &&
test $HEAD = $(cat .git/BISECT_START) &&
git bisect reset &&
test $HEAD = $(git rev-parse --verify HEAD)
Previous HEAD position was ff29dcb Add <6: Yet a line.> into <hello>.
Switched to branch 'other'
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 3de952f Add <3: Another new day for git> into <hello>.
HEAD is now at 3de952f Add <3: Another new day for git> into <hello>.
ok 28 - bisect starting with a detached HEAD
expecting success:
git bisect reset &&
test_must_fail git bisect start $HASH2 $HASH4 2> rev_list_error &&
test_i18ngrep "mistook good and bad" rev_list_error &&
git bisect reset
We are not bisecting.
Maybe you mistook good and bad revs?
We are not bisecting.
ok 29 - bisect errors out if bad and good are mistaken
expecting success:
git bisect reset &&
git bisect start $HASH7 $HASH1 &&
git branch bisect &&
rev_hash4=$(git rev-parse --verify HEAD) &&
test "$rev_hash4" = "$HASH4" &&
git branch -D bisect &&
git bisect good &&
git branch bisect &&
rev_hash6=$(git rev-parse --verify HEAD) &&
test "$rev_hash6" = "$HASH6" &&
git bisect good > my_bisect_log.txt &&
grep "$HASH7 is the first bad commit" my_bisect_log.txt &&
git bisect reset &&
rev_hash6=$(git rev-parse --verify bisect) &&
test "$rev_hash6" = "$HASH6" &&
git branch -D bisect
We are not bisecting.
Bisecting: 2 revisions left to test after this (roughly 2 steps)
[32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>.
Deleted branch bisect (was 32a594a).
Bisecting: 0 revisions left to test after this (roughly 1 step)
[ff29dcbe6fe49a0b462bddf0691a013c12a53316] Add <6: Yet a line.> into <hello>.
3659270ffa1e67547111a107f53191676dff3424 is the first bad commit
Previous HEAD position was ff29dcb Add <6: Yet a line.> into <hello>.
HEAD is now at 3de952f Add <3: Another new day for git> into <hello>.
Deleted branch bisect (was ff29dcb).
ok 30 - bisect does not create a "bisect" branch
expecting success:
git bisect reset &&
git checkout -b side $HASH4 &&
add_line_into_file "5(side): first line on a side branch" hello2 &&
SIDE_HASH5=$(git rev-parse --verify HEAD) &&
add_line_into_file "6(side): second line on a side branch" hello2 &&
SIDE_HASH6=$(git rev-parse --verify HEAD) &&
add_line_into_file "7(side): third line on a side branch" hello2 &&
SIDE_HASH7=$(git rev-parse --verify HEAD)
We are not bisecting.
Previous HEAD position was 3de952f Add <3: Another new day for git> into <hello>.
Switched to a new branch 'side'
ok 31 - side branch creation
expecting success:
git bisect start "$HASH7" "$SIDE_HASH7" > my_bisect_log.txt &&
test_i18ngrep "merge base must be tested" my_bisect_log.txt &&
grep $HASH4 my_bisect_log.txt &&
git bisect good > my_bisect_log.txt &&
! grep "merge base must be tested" my_bisect_log.txt &&
grep $HASH6 my_bisect_log.txt &&
git bisect reset
Bisecting: a merge base must be tested
[32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>.
[ff29dcbe6fe49a0b462bddf0691a013c12a53316] Add <6: Yet a line.> into <hello>.
Previous HEAD position was ff29dcb Add <6: Yet a line.> into <hello>.
Switched to branch 'side'
ok 32 - good merge base when good and bad are siblings
expecting success:
git bisect start "$SIDE_HASH7" "$HASH7" > my_bisect_log.txt &&
test_i18ngrep "merge base must be tested" my_bisect_log.txt &&
grep $HASH4 my_bisect_log.txt &&
git bisect skip > my_bisect_log.txt 2>&1 &&
grep "warning" my_bisect_log.txt &&
grep $SIDE_HASH6 my_bisect_log.txt &&
git bisect reset
Bisecting: a merge base must be tested
[32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>.
warning: the merge base between 5f781ef4cb0a9c22dd8218d08759770f336c6b8b and [3659270ffa1e67547111a107f53191676dff3424] must be skipped.
[11ec2d5fe9fe0e901ce1c6680bb1025a3431ebcf] Add <6(side): second line on a side branch> into <hello2>.
Previous HEAD position was 11ec2d5 Add <6(side): second line on a side branch> into <hello2>.
Switched to branch 'side'
ok 33 - skipped merge base when good and bad are siblings
expecting success:
git bisect start "$HASH7" HEAD > my_bisect_log.txt &&
test_i18ngrep "merge base must be tested" my_bisect_log.txt &&
grep $HASH4 my_bisect_log.txt &&
test_must_fail git bisect bad > my_bisect_log.txt 2>&1 &&
test_i18ngrep "merge base $HASH4 is bad" my_bisect_log.txt &&
test_i18ngrep "fixed between $HASH4 and \[$SIDE_HASH7\]" my_bisect_log.txt &&
git bisect reset
Bisecting: a merge base must be tested
[32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>.
The merge base 32a594a3fdac2d57cf6d02987e30eec68511498c is bad.
This means the bug has been fixed between 32a594a3fdac2d57cf6d02987e30eec68511498c and [5f781ef4cb0a9c22dd8218d08759770f336c6b8b].
Previous HEAD position was 32a594a Add <4: Ciao for now> into <hello>.
Switched to branch 'side'
ok 34 - bad merge base when good and bad are siblings
expecting success:
git checkout "$SIDE_HASH5" &&
git merge -m "merge HASH5 and SIDE_HASH5" "$HASH5" &&
A_HASH=$(git rev-parse --verify HEAD) &&
git checkout side &&
git merge -m "merge HASH7 and SIDE_HASH7" "$HASH7" &&
B_HASH=$(git rev-parse --verify HEAD) &&
git merge-base --all "$A_HASH" "$B_HASH" > merge_bases.txt &&
test_line_count = 2 merge_bases.txt &&
grep "$HASH5" merge_bases.txt &&
grep "$SIDE_HASH5" merge_bases.txt
Note: switching to '7208484534e368cca8612445f78d2afcf429f37e'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 7208484 Create file <hello2> with <5(side): first line on a side branch> inside.
Merging:
7208484 Create file <hello2> with <5(side): first line on a side branch> inside.
virtual 3082e11d3a0f2edca194c8ce1eb802256e38e75e
found 1 common ancestor:
32a594a Add <4: Ciao for now> into <hello>.
Merge made by the 'recursive' strategy.
hello | 1 +
1 file changed, 1 insertion(+)
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
b9ff094 merge HASH5 and SIDE_HASH5
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> b9ff094
Switched to branch 'side'
Merging:
5f781ef Add <7(side): third line on a side branch> into <hello2>.
virtual 3659270ffa1e67547111a107f53191676dff3424
found 1 common ancestor:
32a594a Add <4: Ciao for now> into <hello>.
Merge made by the 'recursive' strategy.
hello | 3 +++
1 file changed, 3 insertions(+)
3082e11d3a0f2edca194c8ce1eb802256e38e75e
7208484534e368cca8612445f78d2afcf429f37e
ok 35 - many merge bases creation
expecting success:
git bisect start "$B_HASH" "$A_HASH" > my_bisect_log.txt &&
test_i18ngrep "merge base must be tested" my_bisect_log.txt &&
git bisect good > my_bisect_log2.txt &&
test_i18ngrep "merge base must be tested" my_bisect_log2.txt &&
{
{
grep "$SIDE_HASH5" my_bisect_log.txt &&
grep "$HASH5" my_bisect_log2.txt
} || {
grep "$SIDE_HASH5" my_bisect_log2.txt &&
grep "$HASH5" my_bisect_log.txt
}
} &&
git bisect reset
Bisecting: a merge base must be tested
Bisecting: a merge base must be tested
[7208484534e368cca8612445f78d2afcf429f37e] Create file <hello2> with <5(side): first line on a side branch> inside.
[3082e11d3a0f2edca194c8ce1eb802256e38e75e] Add <5: Another new line.> into <hello>.
Previous HEAD position was 3082e11 Add <5: Another new line.> into <hello>.
Switched to branch 'side'
ok 36 - good merge bases when good and bad are siblings
expecting success:
git bisect start "$HASH7" "$SIDE_HASH7" > my_bisect_log.txt &&
test_i18ngrep "merge base must be tested" my_bisect_log.txt &&
grep "$HASH4" my_bisect_log.txt &&
git bisect good > my_bisect_log2.txt &&
test -f ".git/BISECT_ANCESTORS_OK" &&
test "$HASH6" = $(git rev-parse --verify HEAD) &&
git bisect bad > my_bisect_log3.txt &&
git bisect good "$A_HASH" > my_bisect_log4.txt &&
test_i18ngrep "merge base must be tested" my_bisect_log4.txt &&
test_must_fail test -f ".git/BISECT_ANCESTORS_OK"
Bisecting: a merge base must be tested
[32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>.
Bisecting: a merge base must be tested
ok 37 - optimized merge base checks
expecting success:
git bisect reset &&
git checkout -b parallel $HASH1 &&
mkdir dir1 dir2 &&
add_line_into_file "1(para): line 1 on parallel branch" dir1/file1 &&
PARA_HASH1=$(git rev-parse --verify HEAD) &&
add_line_into_file "2(para): line 2 on parallel branch" dir2/file2 &&
PARA_HASH2=$(git rev-parse --verify HEAD) &&
add_line_into_file "3(para): line 3 on parallel branch" dir2/file3 &&
PARA_HASH3=$(git rev-parse --verify HEAD) &&
git merge -m "merge HASH4 and PARA_HASH3" "$HASH4" &&
PARA_HASH4=$(git rev-parse --verify HEAD) &&
add_line_into_file "5(para): add line on parallel branch" dir1/file1 &&
PARA_HASH5=$(git rev-parse --verify HEAD) &&
add_line_into_file "6(para): add line on parallel branch" dir2/file2 &&
PARA_HASH6=$(git rev-parse --verify HEAD) &&
git merge -m "merge HASH7 and PARA_HASH6" "$HASH7" &&
PARA_HASH7=$(git rev-parse --verify HEAD)
Previous HEAD position was 3082e11 Add <5: Another new line.> into <hello>.
Switched to branch 'side'
Switched to a new branch 'parallel'
Merging:
a5a4dc8 Create file <dir2/file3> with <3(para): line 3 on parallel branch> inside.
virtual 32a594a3fdac2d57cf6d02987e30eec68511498c
found 1 common ancestor:
88bcdc1 Create file <hello> with <1: Hello World> inside.
Merge made by the 'recursive' strategy.
hello | 3 +++
1 file changed, 3 insertions(+)
Merging:
6d284ea Add <6(para): add line on parallel branch> into <dir2/file2>.
virtual 3659270ffa1e67547111a107f53191676dff3424
found 1 common ancestor:
32a594a Add <4: Ciao for now> into <hello>.
Merge made by the 'recursive' strategy.
hello | 3 +++
1 file changed, 3 insertions(+)
ok 38 - "parallel" side branch creation
expecting success:
git bisect reset &&
git bisect start HEAD $HASH1 -- dir1 &&
para1=$(git rev-parse --verify HEAD) &&
test "$para1" = "$PARA_HASH1" &&
git bisect bad > my_bisect_log.txt &&
grep "$PARA_HASH1 is the first bad commit" my_bisect_log.txt
We are not bisecting.
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[de049b9c4e10f2524a46e151b65aa4f156fd52d6] Create file <dir1/file1> with <1(para): line 1 on parallel branch> inside.
de049b9c4e10f2524a46e151b65aa4f156fd52d6 is the first bad commit
ok 39 - restricting bisection on one dir
expecting success:
git bisect reset &&
git bisect start HEAD $HASH1 -- dir1 hello &&
para4=$(git rev-parse --verify HEAD) &&
test "$para4" = "$PARA_HASH4" &&
git bisect bad &&
hash3=$(git rev-parse --verify HEAD) &&
test "$hash3" = "$HASH3" &&
git bisect good &&
hash4=$(git rev-parse --verify HEAD) &&
test "$hash4" = "$HASH4" &&
git bisect good &&
para1=$(git rev-parse --verify HEAD) &&
test "$para1" = "$PARA_HASH1" &&
git bisect good > my_bisect_log.txt &&
grep "$PARA_HASH4 is the first bad commit" my_bisect_log.txt
Previous HEAD position was de049b9 Create file <dir1/file1> with <1(para): line 1 on parallel branch> inside.
Switched to branch 'parallel'
Bisecting: 4 revisions left to test after this (roughly 2 steps)
[3f04efc661812c541a2f96ecaae46a79c6ea2464] merge HASH4 and PARA_HASH3
Bisecting: 2 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
Bisecting: 1 revision left to test after this (roughly 1 step)
[32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>.
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[de049b9c4e10f2524a46e151b65aa4f156fd52d6] Create file <dir1/file1> with <1(para): line 1 on parallel branch> inside.
3f04efc661812c541a2f96ecaae46a79c6ea2464 is the first bad commit
ok 40 - restricting bisection on one dir and a file
expecting success:
git bisect start $PARA_HASH7 $HASH1 &&
para4=$(git rev-parse --verify HEAD) &&
test "$para4" = "$PARA_HASH4" &&
git bisect skip &&
hash7=$(git rev-parse --verify HEAD) &&
test "$hash7" = "$HASH7" &&
git bisect skip &&
para3=$(git rev-parse --verify HEAD) &&
test "$para3" = "$PARA_HASH3"
Previous HEAD position was de049b9 Create file <dir1/file1> with <1(para): line 1 on parallel branch> inside.
Switched to branch 'parallel'
Bisecting: 5 revisions left to test after this (roughly 3 steps)
[3f04efc661812c541a2f96ecaae46a79c6ea2464] merge HASH4 and PARA_HASH3
Bisecting: 6 revisions left to test after this (roughly 3 steps)
[3659270ffa1e67547111a107f53191676dff3424] Add <7: Should be the last line.> into <hello>.
Bisecting: 6 revisions left to test after this (roughly 3 steps)
[a5a4dc83955e310a4f693ab6f6bcea46c8544843] Create file <dir2/file3> with <3(para): line 3 on parallel branch> inside.
ok 41 - skipping away from skipped commit
expecting success:
test_must_fail git bisect start $PARA_HASH7 $HASH1 -- foobar 2> error.txt &&
test_i18ngrep "bad path parameters" error.txt
Maybe you started with bad path parameters?
ok 42 - erroring out when using bad path parameters
expecting success:
git clone --bare . bare.nocheckout &&
(
cd bare.nocheckout &&
git bisect start --no-checkout &&
git bisect good $HASH1 &&
git bisect bad $HASH4 &&
git bisect run eval \
"test \$(git rev-list BISECT_HEAD ^$HASH2 --max-count=1 | wc -l) = 0" \
>../nocheckout.log
) &&
grep "$HASH3 is the first bad commit" nocheckout.log
Cloning into bare repository 'bare.nocheckout'...
done.
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
3de952f2416b6084f557ec417709eac740c6818c is the first bad commit
ok 43 - test bisection on bare repo - --no-checkout specified
expecting success:
git clone --bare . bare.defaulted &&
(
cd bare.defaulted &&
git bisect start &&
git bisect good $HASH1 &&
git bisect bad $HASH4 &&
git bisect run eval \
"test \$(git rev-list BISECT_HEAD ^$HASH2 --max-count=1 | wc -l) = 0" \
>../defaulted.log
) &&
grep "$HASH3 is the first bad commit" defaulted.log
Cloning into bare repository 'bare.defaulted'...
done.
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
3de952f2416b6084f557ec417709eac740c6818c is the first bad commit
ok 44 - test bisection on bare repo - --no-checkout defaulted
expecting success:
git bisect reset &&
git checkout -b broken $HASH4 &&
git tag BROKEN_HASH4 $HASH4 &&
add_line_into_file "5(broken): first line on a broken branch" hello2 &&
git tag BROKEN_HASH5 &&
mkdir missing &&
:> missing/MISSING &&
git add missing/MISSING &&
git commit -m "6(broken): Added file that will be deleted" &&
git tag BROKEN_HASH6 &&
deleted=$(git rev-parse --verify HEAD:missing) &&
add_line_into_file "7(broken): second line on a broken branch" hello2 &&
git tag BROKEN_HASH7 &&
add_line_into_file "8(broken): third line on a broken branch" hello2 &&
git tag BROKEN_HASH8 &&
git rm missing/MISSING &&
git commit -m "9(broken): Remove missing file" &&
git tag BROKEN_HASH9 &&
rm .git/objects/$(test_oid_to_path $deleted)
We are not bisecting.
Switched to a new branch 'broken'
[broken 55bdac5] 6(broken): Added file that will be deleted
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 missing/MISSING
rm 'missing/MISSING'
[broken 508db08] 9(broken): Remove missing file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 missing/MISSING
ok 45 - broken branch creation
expecting success:
git bisect reset &&
test_must_fail git bisect start BROKEN_HASH7 BROKEN_HASH4 2>error.txt &&
test_cmp expected.missing-tree.default error.txt
We are not bisecting.
Bisecting: 0 revisions left to test after this (roughly 1 step)
ok 46 - bisect fails if tree is broken on start commit
expecting success:
git bisect reset &&
test_must_fail git bisect start BROKEN_HASH9 BROKEN_HASH4 2>error.txt &&
git reset --hard broken &&
git checkout broken &&
test_cmp expected.missing-tree.default error.txt
We are not bisecting.
Bisecting: 2 revisions left to test after this (roughly 1 step)
HEAD is now at 508db08 9(broken): Remove missing file
Already on 'broken'
ok 47 - bisect fails if tree is broken on trial commit
expecting success:
git bisect reset &&
git bisect start BROKEN_HASH7 BROKEN_HASH4 --no-checkout &&
check_same BROKEN_HASH6 BISECT_HEAD &&
git bisect reset
We are not bisecting.
Bisecting: 0 revisions left to test after this (roughly 1 step)
[55bdac58da30a5a429094bf5466b8095b29ecbf0] 6(broken): Added file that will be deleted
Checking BROKEN_HASH6 is the same as BISECT_HEAD
ok 48 - bisect: --no-checkout - start commit bad
expecting success:
git bisect reset &&
git bisect start broken BROKEN_HASH4 --no-checkout &&
check_same BROKEN_HASH6 BISECT_HEAD &&
git bisect reset
We are not bisecting.
Bisecting: 2 revisions left to test after this (roughly 1 step)
[55bdac58da30a5a429094bf5466b8095b29ecbf0] 6(broken): Added file that will be deleted
Checking BROKEN_HASH6 is the same as BISECT_HEAD
ok 49 - bisect: --no-checkout - trial commit bad
expecting success:
git bisect reset &&
git bisect start broken BROKEN_HASH4 --no-checkout &&
check_same BROKEN_HASH6 BISECT_HEAD &&
git bisect bad BISECT_HEAD &&
check_same BROKEN_HASH5 BISECT_HEAD &&
git bisect bad BISECT_HEAD &&
check_same BROKEN_HASH5 bisect/bad &&
git bisect reset
We are not bisecting.
Bisecting: 2 revisions left to test after this (roughly 1 step)
[55bdac58da30a5a429094bf5466b8095b29ecbf0] 6(broken): Added file that will be deleted
Checking BROKEN_HASH6 is the same as BISECT_HEAD
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[fd9df6dc932ed4e1539696448c064bc31b947f3f] Create file <hello2> with <5(broken): first line on a broken branch> inside.
Checking BROKEN_HASH5 is the same as BISECT_HEAD
fd9df6dc932ed4e1539696448c064bc31b947f3f is the first bad commit
commit fd9df6dc932ed4e1539696448c064bc31b947f3f
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:28:13 2005 -0700
Create file <hello2> with <5(broken): first line on a broken branch> inside.
hello2 | 1 +
1 file changed, 1 insertion(+)
create mode 100644 hello2
Checking BROKEN_HASH5 is the same as bisect/bad
ok 50 - bisect: --no-checkout - target before breakage
expecting success:
git bisect reset &&
git bisect start broken BROKEN_HASH4 --no-checkout &&
check_same BROKEN_HASH6 BISECT_HEAD &&
git bisect bad BISECT_HEAD &&
check_same BROKEN_HASH5 BISECT_HEAD &&
test_must_fail git bisect good BISECT_HEAD &&
check_same BROKEN_HASH6 bisect/bad &&
git bisect reset
We are not bisecting.
Bisecting: 2 revisions left to test after this (roughly 1 step)
[55bdac58da30a5a429094bf5466b8095b29ecbf0] 6(broken): Added file that will be deleted
Checking BROKEN_HASH6 is the same as BISECT_HEAD
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[fd9df6dc932ed4e1539696448c064bc31b947f3f] Create file <hello2> with <5(broken): first line on a broken branch> inside.
Checking BROKEN_HASH5 is the same as BISECT_HEAD
fatal: unable to read tree 39f7e61a724187ab767d2e08442d9b6b9dab587d
55bdac58da30a5a429094bf5466b8095b29ecbf0 is the first bad commit
Checking BROKEN_HASH6 is the same as bisect/bad
ok 51 - bisect: --no-checkout - target in breakage
expecting success:
git bisect reset &&
git bisect start broken BROKEN_HASH4 --no-checkout &&
check_same BROKEN_HASH6 BISECT_HEAD &&
git bisect good BISECT_HEAD &&
check_same BROKEN_HASH8 BISECT_HEAD &&
test_must_fail git bisect good BISECT_HEAD &&
check_same BROKEN_HASH9 bisect/bad &&
git bisect reset
We are not bisecting.
Bisecting: 2 revisions left to test after this (roughly 1 step)
[55bdac58da30a5a429094bf5466b8095b29ecbf0] 6(broken): Added file that will be deleted
Checking BROKEN_HASH6 is the same as BISECT_HEAD
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3df15bfcf4745f4f8ff0007d5ca42e75eba04ff9] Add <8(broken): third line on a broken branch> into <hello2>.
Checking BROKEN_HASH8 is the same as BISECT_HEAD
fatal: unable to read tree 39f7e61a724187ab767d2e08442d9b6b9dab587d
508db08019a8b4b05c3cfe2447ada8a4c78fe3de is the first bad commit
Checking BROKEN_HASH9 is the same as bisect/bad
ok 52 - bisect: --no-checkout - target after breakage
expecting success:
git bisect reset &&
git checkout broken &&
git bisect start broken master --no-checkout &&
test_must_fail git bisect run "$SHELL_PATH" -c '
GOOD=$(git for-each-ref "--format=%(objectname)" refs/bisect/good-*) &&
git rev-list --objects BISECT_HEAD --not $GOOD >tmp.$$ &&
git pack-objects --stdout >/dev/null < tmp.$$
rc=$?
rm -f tmp.$$
test $rc = 0' &&
check_same BROKEN_HASH6 bisect/bad &&
git bisect reset
We are not bisecting.
Already on 'broken'
Bisecting: 2 revisions left to test after this (roughly 1 step)
[55bdac58da30a5a429094bf5466b8095b29ecbf0] 6(broken): Added file that will be deleted
running /bin/sh -c
GOOD=$(git for-each-ref "--format=%(objectname)" refs/bisect/good-*) &&
git rev-list --objects BISECT_HEAD --not $GOOD >tmp.$$ &&
git pack-objects --stdout >/dev/null < tmp.$$
rc=$?
rm -f tmp.$$
test $rc = 0
fatal: bad tree object 39f7e61a724187ab767d2e08442d9b6b9dab587d
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[fd9df6dc932ed4e1539696448c064bc31b947f3f] Create file <hello2> with <5(broken): first line on a broken branch> inside.
running /bin/sh -c
GOOD=$(git for-each-ref "--format=%(objectname)" refs/bisect/good-*) &&
git rev-list --objects BISECT_HEAD --not $GOOD >tmp.$$ &&
git pack-objects --stdout >/dev/null < tmp.$$
rc=$?
rm -f tmp.$$
test $rc = 0
fatal: unable to read tree 39f7e61a724187ab767d2e08442d9b6b9dab587d
55bdac58da30a5a429094bf5466b8095b29ecbf0 is the first bad commit
bisect run failed:
'bisect_state good' exited with error code 128
Checking BROKEN_HASH6 is the same as bisect/bad
ok 53 - bisect: demonstrate identification of damage boundary
expecting success:
git bisect reset &&
git bisect start $HASH4 $HASH2 &&
git bisect good &&
git bisect log >bisect-log.txt &&
test_cmp expected.bisect-log bisect-log.txt &&
git bisect reset
We are not bisecting.
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
32a594a3fdac2d57cf6d02987e30eec68511498c is the first bad commit
commit 32a594a3fdac2d57cf6d02987e30eec68511498c
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:16:13 2005 -0700
Add <4: Ciao for now> into <hello>.
hello | 1 +
1 file changed, 1 insertion(+)
Previous HEAD position was 3de952f Add <3: Another new day for git> into <hello>.
Switched to branch 'broken'
ok 54 - bisect log: successful result
expecting success:
git bisect reset &&
git bisect start $HASH4 $HASH2 &&
test_must_fail git bisect skip &&
git bisect log >bisect-skip-log.txt &&
test_cmp expected.bisect-skip-log bisect-skip-log.txt &&
git bisect reset
We are not bisecting.
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
There are only 'skip'ped commits left to test.
The first bad commit could be any of:
3de952f2416b6084f557ec417709eac740c6818c
32a594a3fdac2d57cf6d02987e30eec68511498c
We cannot bisect more!
Previous HEAD position was 3de952f Add <3: Another new day for git> into <hello>.
Switched to branch 'broken'
ok 55 - bisect log: only skip commits left
expecting success:
git checkout parallel &&
git bisect start HEAD $HASH1 &&
git bisect good HEAD &&
git bisect bad HEAD &&
test "$HASH6" = $(git rev-parse --verify HEAD) &&
git bisect reset
Switched to branch 'parallel'
Bisecting: 5 revisions left to test after this (roughly 3 steps)
[3f04efc661812c541a2f96ecaae46a79c6ea2464] merge HASH4 and PARA_HASH3
Bisecting: 2 revisions left to test after this (roughly 2 steps)
[3659270ffa1e67547111a107f53191676dff3424] Add <7: Should be the last line.> into <hello>.
Bisecting: 0 revisions left to test after this (roughly 1 step)
[ff29dcbe6fe49a0b462bddf0691a013c12a53316] Add <6: Yet a line.> into <hello>.
Previous HEAD position was ff29dcb Add <6: Yet a line.> into <hello>.
Switched to branch 'parallel'
ok 56 - "git bisect bad HEAD" behaves as "git bisect bad"
expecting success:
git bisect reset &&
git bisect start &&
git bisect new $HASH4 &&
git bisect next
We are not bisecting.
warning: bisecting only with a new commit
Bisecting: 1 revision left to test after this (roughly 1 step)
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
ok 57 - bisect starts with only one new
expecting success:
git bisect reset &&
git bisect start &&
git bisect old $HASH1 &&
test_must_fail git bisect next
Previous HEAD position was 7b7f204 Add <2: A new day for git> into <hello>.
Switched to branch 'parallel'
error: You need to give me at least one bad|new and good|old revision.
You can use "git bisect bad|new" and "git bisect good|old" for that.
ok 58 - bisect does not start with only one old
expecting success:
git bisect reset &&
git bisect start &&
git bisect old $HASH1 &&
git bisect new $HASH4 &&
git bisect new &&
git bisect new >bisect_result &&
grep "$HASH2 is the first new commit" bisect_result &&
git bisect log >log_to_replay.txt &&
git bisect reset
Already on 'parallel'
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
7b7f204a749c3125d5224ed61ea2ae1187ad046f is the first new commit
Previous HEAD position was 7b7f204 Add <2: A new day for git> into <hello>.
Switched to branch 'parallel'
ok 59 - bisect start with one new and old
expecting success:
git bisect replay log_to_replay.txt >bisect_result &&
grep "$HASH2 is the first new commit" bisect_result &&
git bisect reset
7b7f204a749c3125d5224ed61ea2ae1187ad046f is the first new commit
Already on 'parallel'
ok 60 - bisect replay with old and new
expecting success:
git bisect start &&
git bisect bad $HASH4 &&
test_must_fail git bisect old $HASH1
error: Invalid command: you're currently in a bad/good bisect
ok 61 - bisect cannot mix old/new and good/bad
expecting success:
git bisect reset &&
test_must_fail git bisect terms only-one &&
test_must_fail git bisect terms 1 2 &&
test_must_fail git bisect terms 2>actual &&
echo "error: no terms defined" >expected &&
test_i18ncmp expected actual
Already on 'parallel'
error: no terms defined
error: --bisect-terms requires 0 or 1 argument
ok 62 - bisect terms needs 0 or 1 argument
expecting success:
git bisect reset &&
git bisect start HEAD $HASH1 &&
git bisect terms --term-good >actual &&
echo good >expected &&
test_cmp expected actual &&
git bisect terms --term-bad >actual &&
echo bad >expected &&
test_cmp expected actual
We are not bisecting.
Bisecting: 5 revisions left to test after this (roughly 3 steps)
[3f04efc661812c541a2f96ecaae46a79c6ea2464] merge HASH4 and PARA_HASH3
ok 63 - bisect terms shows good/bad after start
expecting success:
git bisect reset &&
git bisect start --term-old term2 --term-new term1 &&
git bisect term2 $HASH1 &&
git bisect term1 $HASH4 &&
git bisect term1 &&
git bisect term1 >bisect_result &&
grep "$HASH2 is the first term1 commit" bisect_result &&
git bisect log >log_to_replay.txt &&
git bisect reset
Previous HEAD position was 3f04efc merge HASH4 and PARA_HASH3
Switched to branch 'parallel'
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
7b7f204a749c3125d5224ed61ea2ae1187ad046f is the first term1 commit
Previous HEAD position was 7b7f204 Add <2: A new day for git> into <hello>.
Switched to branch 'parallel'
ok 64 - bisect start with one term1 and term2
expecting success:
git bisect replay log_to_replay.txt >bisect_result &&
grep "$HASH2 is the first term1 commit" bisect_result &&
git bisect reset
7b7f204a749c3125d5224ed61ea2ae1187ad046f is the first term1 commit
Already on 'parallel'
ok 65 - bisect replay with term1 and term2
expecting success:
git bisect reset &&
git bisect start --term-new term1 --term-old term2 $HASH4 $HASH1 &&
git bisect term1 &&
git bisect term1 >bisect_result &&
grep "$HASH2 is the first term1 commit" bisect_result &&
git bisect log >log_to_replay.txt &&
git bisect reset
We are not bisecting.
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
7b7f204a749c3125d5224ed61ea2ae1187ad046f is the first term1 commit
Previous HEAD position was 7b7f204 Add <2: A new day for git> into <hello>.
Switched to branch 'parallel'
ok 66 - bisect start term1 term2
expecting success:
git bisect reset &&
git bisect start --term-good term1 --term-bad term2 $HASH4 $HASH1 &&
test_must_fail git bisect a &&
test_must_fail git bisect b &&
test_must_fail git bisect bad &&
test_must_fail git bisect good &&
test_must_fail git bisect new &&
test_must_fail git bisect old
We are not bisecting.
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
usage: git bisect [help|start|bad|good|new|old|terms|skip|next|reset|visualize|view|replay|log|run]
usage: git bisect [help|start|bad|good|new|old|terms|skip|next|reset|visualize|view|replay|log|run]
error: Invalid command: you're currently in a term2/term1 bisect
error: Invalid command: you're currently in a term2/term1 bisect
error: Invalid command: you're currently in a term2/term1 bisect
error: Invalid command: you're currently in a term2/term1 bisect
ok 67 - bisect cannot mix terms
expecting success:
git bisect reset &&
test_must_fail git bisect start --term-good invalid..term &&
test_must_fail git bisect terms --term-bad invalid..term &&
test_must_fail git bisect terms --term-good bad &&
test_must_fail git bisect terms --term-good old &&
test_must_fail git bisect terms --term-good skip &&
test_must_fail git bisect terms --term-good reset &&
test_path_is_missing .git/BISECT_TERMS
Previous HEAD position was 3de952f Add <3: Another new day for git> into <hello>.
Switched to branch 'parallel'
error: 'invalid..term' is not a valid term
error: --bisect-terms requires 0 or 1 argument
error: --bisect-terms requires 0 or 1 argument
error: --bisect-terms requires 0 or 1 argument
error: --bisect-terms requires 0 or 1 argument
error: --bisect-terms requires 0 or 1 argument
ok 68 - bisect terms rejects invalid terms
expecting success:
git bisect reset &&
git bisect start --term-bad=one --term-good=two &&
git bisect terms >actual &&
cat <<-EOF >expected &&
Your current terms are two for the old state
and one for the new state.
EOF
test_i18ncmp expected actual &&
git bisect terms --term-bad >actual &&
echo one >expected &&
test_cmp expected actual &&
git bisect terms --term-good >actual &&
echo two >expected &&
test_cmp expected actual
Already on 'parallel'
ok 69 - bisect start --term-* does store terms
expecting success:
git bisect reset &&
git bisect start --term-good one $HASH4 \
--term-good two --term-bad bad-term \
$HASH1 --term-good three -- &&
(git bisect terms --term-bad && git bisect terms --term-good) >actual &&
printf "%s\n%s\n" bad-term three >expected &&
test_cmp expected actual
Already on 'parallel'
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
ok 70 - bisect start takes options and revs in any order
expecting success:
git bisect reset &&
git bisect start &&
git bisect good $HASH1 &&
git bisect bad $HASH4 &&
git bisect reset &&
test -z "$(git for-each-ref "refs/bisect/*")" &&
test_path_is_missing "$GIT_DIR/BISECT_EXPECTED_REV" &&
test_path_is_missing "$GIT_DIR/BISECT_ANCESTORS_OK" &&
test_path_is_missing "$GIT_DIR/BISECT_LOG" &&
test_path_is_missing "$GIT_DIR/BISECT_RUN" &&
test_path_is_missing "$GIT_DIR/BISECT_TERMS" &&
test_path_is_missing "$GIT_DIR/head-name" &&
test_path_is_missing "$GIT_DIR/BISECT_HEAD" &&
test_path_is_missing "$GIT_DIR/BISECT_START"
Previous HEAD position was 3de952f Add <3: Another new day for git> into <hello>.
Switched to branch 'parallel'
Bisecting: 0 revisions left to test after this (roughly 1 step)
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
Previous HEAD position was 3de952f Add <3: Another new day for git> into <hello>.
Switched to branch 'parallel'
ok 71 - git bisect reset cleans bisection state properly
# passed all 71 test(s)
1..71
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6101-rev-parse-parents.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6101-rev-parse-parents/.git/
expecting success:
test_commit start &&
test_commit second &&
git checkout --orphan tmp &&
test_commit start2 &&
git checkout master &&
git merge -m next --allow-unrelated-histories start2 &&
test_commit final &&
test_seq 40 |
while read i
do
git checkout --orphan "b$i" &&
test_tick &&
git commit --allow-empty -m "$i" &&
commit=$(git rev-parse --verify HEAD) &&
printf "$commit " >>.git/info/grafts
done
[master (root-commit) bb4ab09] start
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 start.t
[master 79e4276] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 second.t
Switched to a new branch 'tmp'
[tmp (root-commit) 4c3ba1d] start2
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
Switched to branch 'master'
Merging:
79e4276 second
virtual start2
found 0 common ancestors:
Merge made by the 'recursive' strategy.
start2.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 start2.t
[master 28dcd76] final
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 final.t
Switched to a new branch 'b1'
[b1 (root-commit) f5f3b2c] 1
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b2'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b2 (root-commit) 618c8bc] 2
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b3'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b3 (root-commit) ba8105e] 3
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b4'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b4 (root-commit) 8edc64f] 4
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b5'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b5 (root-commit) e7bafe0] 5
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b6'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b6 (root-commit) 2c11482] 6
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b7'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b7 (root-commit) b7111a8] 7
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b8'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b8 (root-commit) edde8dd] 8
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b9'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b9 (root-commit) 78609ce] 9
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b10'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b10 (root-commit) 1b26416] 10
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b11'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b11 (root-commit) 85f564d] 11
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b12'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b12 (root-commit) e798eda] 12
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b13'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b13 (root-commit) 9cc2d0a] 13
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b14'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b14 (root-commit) 19a1614] 14
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b15'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b15 (root-commit) 9b6308c] 15
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b16'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b16 (root-commit) 25d33a4] 16
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b17'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b17 (root-commit) 0302283] 17
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b18'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b18 (root-commit) 4e1e05c] 18
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b19'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b19 (root-commit) 3d9cf61] 19
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b20'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b20 (root-commit) 99e88bd] 20
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b21'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b21 (root-commit) 2806eea] 21
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b22'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b22 (root-commit) a13e487] 22
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b23'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b23 (root-commit) b3430b4] 23
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b24'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b24 (root-commit) b41c7be] 24
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b25'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b25 (root-commit) b40f716] 25
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b26'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b26 (root-commit) f9b45eb] 26
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b27'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b27 (root-commit) ecd01c9] 27
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b28'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b28 (root-commit) 3d5358c] 28
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b29'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b29 (root-commit) c334e99] 29
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b30'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b30 (root-commit) ae87771] 30
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b31'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b31 (root-commit) 4a37771] 31
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b32'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b32 (root-commit) 7be2dd6] 32
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b33'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b33 (root-commit) dcbfd2a] 33
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b34'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b34 (root-commit) 7b802c2] 34
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b35'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b35 (root-commit) 507bd75] 35
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b36'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b36 (root-commit) 5ded625] 36
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b37'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b37 (root-commit) 8c1e87b] 37
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b38'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b38 (root-commit) c52a118] 38
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b39'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b39 (root-commit) aeb1d68] 39
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'b40'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b40 (root-commit) 44fb50a] 40
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 final.t
create mode 100644 second.t
create mode 100644 start.t
create mode 100644 start2.t
ok 1 - setup
expecting success:
git rev-parse start | grep "^[0-9a-f]\{40\}$"
bb4ab095e062556a5dc9dbf86833ee9040f06e90
ok 2 - start is valid
expecting success:
test_cmp_rev_output tags/start "git rev-parse start^0"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 3 - start^0
expecting success:
test_must_fail git rev-parse --verify start^1
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
fatal: Needed a single revision
ok 4 - start^1 not valid
expecting success:
test_cmp_rev_output second^ "git rev-parse second^1"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 5 - second^1 = second^
expecting success:
test_cmp_rev_output start "git rev-parse final^1^1^1"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 6 - final^1^1^1
expecting success:
test_cmp_rev_output final^^^ "git rev-parse final^1^1^1"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 7 - final^1^1^1 = final^^^
expecting success:
test_cmp_rev_output start2 "git rev-parse final^1^2"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 8 - final^1^2
expecting success:
test $(git rev-parse final^1^2) != $(git rev-parse final^1^1)
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 9 - final^1^2 != final^1^1
expecting success:
test_must_fail git rev-parse --verify final^1^3
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
fatal: Needed a single revision
ok 10 - final^1^3 not valid
expecting success:
test_must_fail git rev-parse --verify start2^1
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
fatal: Needed a single revision
ok 11 - --verify start2^1
expecting success:
git rev-parse --verify start2^0
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
4c3ba1d81bd3bb3afbb826285419970794dbc343
ok 12 - --verify start2^0
expecting success:
git rev-parse final^1^1 final^1^2 >expect &&
git rev-parse final^1^@ >actual &&
test_cmp expect actual
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 13 - final^1^@ = final^1^1 final^1^2
expecting success:
git rev-parse --symbolic final^1^1 final^1^2 >expect &&
git rev-parse --symbolic final^1^@ >actual &&
test_cmp expect actual
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 14 - symbolic final^1^@ = final^1^1 final^1^2
expecting success:
git rev-parse final^1 ^final^1^1 ^final^1^2 >expect &&
git rev-parse final^1^! >actual &&
test_cmp expect actual
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 15 - final^1^! = final^1 ^final^1^1 ^final^1^2
expecting success:
git rev-parse --symbolic final^1 ^final^1^1 ^final^1^2 >expect &&
git rev-parse --symbolic final^1^! >actual &&
test_cmp expect actual
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 16 - symbolic final^1^! = final^1 ^final^1^1 ^final^1^2
expecting success:
test_cmp_rev_output b31 "git rev-parse --verify b1^30"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 17 - large graft octopus
expecting success:
git repack -a -d
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 18 - repack for next test
expecting success:
start=$(git rev-parse --verify start) &&
test_cmp_rev_output start "git rev-parse ${start%?}"
ok 19 - short SHA-1 works
expecting success:
test_commit one &&
test_commit two &&
test_commit three &&
# Merge in a branch for testing rev^-
git checkout -b branch &&
git checkout HEAD^^ &&
git merge -m merge --no-edit --no-ff branch &&
git checkout -b merge
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b40 1d60cd0] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b40 e07f350] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
[b40 0086327] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'branch'
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 1d60cd0 one
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Merging:
1d60cd0 one
virtual branch
found 1 common ancestor:
1d60cd0 one
Merge made by the 'recursive' strategy.
three.t | 1 +
two.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 three.t
create mode 100644 two.t
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
Switched to a new branch 'merge'
ok 20 - setup for rev^- tests
expecting success:
git rev-list --count merge^..merge >expect &&
echo 3 >actual &&
test_cmp expect actual
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 21 - rev-list --count merge^- = merge^..merge
expecting success:
git rev-parse merge^..merge >expect &&
git rev-parse merge^- >actual &&
test_cmp expect actual
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 22 - rev-parse merge^- = merge^..merge
expecting success:
git rev-parse merge^1..merge >expect &&
git rev-parse merge^-1 >actual &&
test_cmp expect actual
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 23 - rev-parse merge^-1 = merge^..merge
expecting success:
git rev-parse merge^2..merge >expect &&
git rev-parse merge^-2 >actual &&
test_cmp expect actual
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 24 - rev-parse merge^-2 = merge^2..merge
expecting success:
git rev-parse --symbolic merge^1..merge >expect &&
git rev-parse --symbolic merge^-1 >actual &&
test_cmp expect actual
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 25 - symbolic merge^-1 = merge^1..merge
expecting success:
test_must_fail git rev-parse merge^-0
fatal: ambiguous argument 'merge^-0': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
merge^-0
ok 26 - rev-parse merge^-0 (invalid parent)
expecting success:
test_must_fail git rev-parse merge^-3
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
fatal: ambiguous argument 'merge^-3': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
merge^-3
ok 27 - rev-parse merge^-3 (invalid parent)
expecting success:
test_must_fail git rev-parse merge^-^
fatal: ambiguous argument 'merge^-^': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
merge^-^
ok 28 - rev-parse merge^-^ (garbage after ^-)
expecting success:
test_must_fail git rev-parse merge^-1x
fatal: ambiguous argument 'merge^-1x': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
merge^-1x
ok 29 - rev-parse merge^-1x (garbage after ^-1)
expecting success:
git rev-list merge^..merge >expect &&
git rev-list merge^- >actual &&
test_cmp expect actual
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 30 - rev-list merge^- = merge^..merge
expecting success:
git rev-list merge^1..merge >expect &&
git rev-list merge^-1 >actual &&
test_cmp expect actual
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 31 - rev-list merge^-1 = merge^1..merge
expecting success:
git rev-list merge^2..merge >expect &&
git rev-list merge^-2 >actual &&
test_cmp expect actual
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
ok 32 - rev-list merge^-2 = merge^2..merge
expecting success:
test_must_fail git rev-list merge^-0
fatal: ambiguous argument 'merge^-0': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ok 33 - rev-list merge^-0 (invalid parent)
expecting success:
test_must_fail git rev-list merge^-3
hint: Support for <GIT_DIR>/info/grafts is deprecated
hint: and will be removed in a future Git version.
hint:
hint: Please use "git replace --convert-graft-file"
hint: to convert the grafts into replace refs.
hint:
hint: Turn this message off by running
hint: "git config advice.graftFileDeprecated false"
fatal: ambiguous argument 'merge^-3': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ok 34 - rev-list merge^-3 (invalid parent)
expecting success:
test_must_fail git rev-list merge^-^
fatal: ambiguous argument 'merge^-^': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ok 35 - rev-list merge^-^ (garbage after ^-)
expecting success:
test_must_fail git rev-list merge^-1x
fatal: ambiguous argument 'merge^-1x': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ok 36 - rev-list merge^-1x (garbage after ^-1)
expecting success:
test_must_fail git rev-parse $EMPTY_TREE^@
error: object 4b825dc642cb6eb9a060e54bf8d69288fbee4904 is a tree, not a commit
fatal: ambiguous argument '4b825dc642cb6eb9a060e54bf8d69288fbee4904^@': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
4b825dc642cb6eb9a060e54bf8d69288fbee4904^@
ok 37 - rev-parse $garbage^@ does not segfault
expecting success:
test_must_fail git rev-parse $EMPTY_TREE...$EMPTY_BLOB
error: object 4b825dc642cb6eb9a060e54bf8d69288fbee4904 is a tree, not a commit
fatal: ambiguous argument '4b825dc642cb6eb9a060e54bf8d69288fbee4904...e69de29bb2d1d6434b8b29ae775ad8c2e48c5391': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
4b825dc642cb6eb9a060e54bf8d69288fbee4904
4b825dc642cb6eb9a060e54bf8d69288fbee4904...e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
ok 38 - rev-parse $garbage...$garbage does not segfault
# passed all 38 test(s)
1..38
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6112-rev-list-filters-objects.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6112-rev-list-filters-objects/.git/
expecting success:
echo "{print \$1}" >print_1.awk &&
echo "{print \$2}" >print_2.awk &&
git init r1 &&
for n in 1 2 3 4 5
do
echo "This is file: $n" > r1/file.$n
git -C r1 add file.$n
git -C r1 commit -m "$n"
done
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6112-rev-list-filters-objects/r1/.git/
[master (root-commit) 9953595] 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.1
[master cb3e842] 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.2
[master 4af4fca] 3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.3
[master dd3db37] 4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.4
[master a39d962] 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.5
ok 1 - setup r1
expecting success:
git -C r1 ls-files -s file.1 file.2 file.3 file.4 file.5 \
>ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
git -C r1 rev-list --quiet --objects --filter-print-omitted \
--filter=blob:none HEAD >revs &&
awk -f print_1.awk revs |
sed "s/~//" |
sort >observed &&
test_cmp expected observed
ok 2 - verify blob:none omits all 5 blobs
expecting success:
file_3=$(git -C r1 ls-files -s file.3 |
awk -f print_2.awk) &&
file_4=$(git -C r1 ls-files -s file.4 |
awk -f print_2.awk) &&
git -C r1 rev-list --objects --filter=blob:none HEAD $file_3 >observed &&
grep "$file_3" observed &&
! grep "$file_4" observed
d2c9288bc745d46e9af90d26e0a3b6e03c099dff
ok 3 - specify blob explicitly prevents filtering
expecting success:
git -C r1 rev-list --objects HEAD >revs &&
awk -f print_1.awk revs |
sort >expected &&
git -C r1 rev-list --objects --filter-print-omitted --filter=blob:none \
HEAD >revs &&
awk -f print_1.awk revs |
sed "s/~//" |
sort >observed &&
test_cmp expected observed
ok 4 - verify emitted+omitted == all
expecting success:
git init r2 &&
for n in 1000 10000
do
printf "%"$n"s" X > r2/large.$n
git -C r2 add large.$n
git -C r2 commit -m "$n"
done
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6112-rev-list-filters-objects/r2/.git/
[master (root-commit) 4db69ed] 1000
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 large.1000
[master 43e2d4a] 10000
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 large.10000
ok 5 - setup r2
expecting success:
git -C r2 ls-files -s large.1000 large.10000 >ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
git -C r2 rev-list --quiet --objects --filter-print-omitted \
--filter=blob:limit=500 HEAD >revs &&
awk -f print_1.awk revs |
sed "s/~//" |
sort >observed &&
test_cmp expected observed
ok 6 - verify blob:limit=500 omits all blobs
expecting success:
git -C r2 rev-list --objects HEAD >revs &&
awk -f print_1.awk revs |
sort >expected &&
git -C r2 rev-list --objects --filter-print-omitted \
--filter=blob:limit=500 HEAD >revs &&
awk -f print_1.awk revs |
sed "s/~//" |
sort >observed &&
test_cmp expected observed
ok 7 - verify emitted+omitted == all
expecting success:
git -C r2 ls-files -s large.1000 large.10000 >ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
git -C r2 rev-list --quiet --objects --filter-print-omitted \
--filter=blob:limit=1000 HEAD >revs &&
awk -f print_1.awk revs |
sed "s/~//" |
sort >observed &&
test_cmp expected observed
ok 8 - verify blob:limit=1000
expecting success:
git -C r2 ls-files -s large.10000 >ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
git -C r2 rev-list --quiet --objects --filter-print-omitted \
--filter=blob:limit=1001 HEAD >revs &&
awk -f print_1.awk revs |
sed "s/~//" |
sort >observed &&
test_cmp expected observed
ok 9 - verify blob:limit=1001
expecting success:
git -C r2 ls-files -s large.10000 >ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
git -C r2 rev-list --quiet --objects --filter-print-omitted \
--filter=blob:limit=1k HEAD >revs &&
awk -f print_1.awk revs |
sed "s/~//" |
sort >observed &&
test_cmp expected observed
ok 10 - verify blob:limit=1k
expecting success:
git -C r2 rev-list --quiet --objects --filter-print-omitted \
--filter=blob:limit=1m HEAD >revs &&
awk -f print_1.awk revs |
sed "s/~//" |
sort >observed &&
test_must_be_empty observed
ok 11 - verify blob:limit=1m
expecting success:
git init r3 &&
mkdir r3/dir1 &&
for n in sparse1 sparse2
do
echo "This is file: $n" > r3/$n
git -C r3 add $n
echo "This is file: dir1/$n" > r3/dir1/$n
git -C r3 add dir1/$n
done &&
git -C r3 commit -m "sparse" &&
echo dir1/ >pattern1 &&
echo sparse1 >pattern2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6112-rev-list-filters-objects/r3/.git/
[master (root-commit) d8eeb84] sparse
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 dir1/sparse1
create mode 100644 dir1/sparse2
create mode 100644 sparse1
create mode 100644 sparse2
ok 12 - setup r3
expecting success:
test_must_fail git -C r3 rev-list --quiet --objects \
--filter-print-omitted --filter=sparse:path=../pattern1 HEAD
fatal: sparse:path filters support has been dropped
ok 13 - verify sparse:path=pattern1 fails
expecting success:
test_must_fail git -C r3 rev-list --quiet --objects \
--filter-print-omitted --filter=sparse:path=../pattern2 HEAD
fatal: sparse:path filters support has been dropped
ok 14 - verify sparse:path=pattern2 fails
expecting success:
echo dir1/ >r3/pattern &&
git -C r3 add pattern &&
git -C r3 commit -m "pattern"
[master 3c7912d] pattern
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 pattern
ok 15 - setup r3 part 2
expecting success:
git -C r3 ls-files -s pattern sparse1 sparse2 >ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
oid=$(git -C r3 ls-files -s pattern | awk -f print_2.awk) &&
git -C r3 rev-list --quiet --objects --filter-print-omitted \
--filter=sparse:oid=$oid HEAD >revs &&
awk -f print_1.awk revs |
sed "s/~//" |
sort >observed &&
test_cmp expected observed
ok 16 - verify sparse:oid=OID omits top-level files
expecting success:
git -C r3 ls-files -s pattern sparse1 sparse2 >ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
git -C r3 rev-list --quiet --objects --filter-print-omitted \
--filter=sparse:oid=master:pattern HEAD >revs &&
awk -f print_1.awk revs |
sed "s/~//" |
sort >observed &&
test_cmp expected observed
ok 17 - verify sparse:oid=oid-ish omits top-level files
expecting success:
TREE=$(git -C r3 rev-parse HEAD:dir1) &&
# Create a spare repo because we will be deleting objects from this one.
git clone r3 r3.b &&
rm r3.b/.git/objects/$(echo $TREE | sed "s|^..|&/|") &&
git -C r3.b rev-list --quiet --missing=print --objects HEAD \
>missing_objs 2>rev_list_err &&
echo "?$TREE" >expected &&
test_cmp expected missing_objs &&
# do not complain when a missing tree cannot be parsed
test_must_be_empty rev_list_err &&
git -C r3.b rev-list --missing=allow-any --objects HEAD \
>objs 2>rev_list_err &&
! grep $TREE objs &&
test_must_be_empty rev_list_err
Cloning into 'r3.b'...
done.
ok 18 - rev-list W/ --missing=print and --missing=allow-any for trees
expecting success:
git -C r3 rev-list --quiet --objects --filter-print-omitted \
--filter=tree:0 HEAD >revs &&
awk -f print_1.awk revs |
sed s/~// |
xargs -n1 git -C r3 cat-file -t >unsorted_filtered_types &&
sort -u unsorted_filtered_types >filtered_types &&
test_write_lines blob tree >expected &&
test_cmp expected filtered_types
ok 19 - verify tree:0 includes trees in "filtered" output
expecting success:
GIT_TRACE=1 git -C r3 rev-list \
--objects --filter=tree:0 HEAD 2>filter_trace &&
grep "Skipping contents of tree [.][.][.]" filter_trace >actual &&
# One line for each commit traversed.
test_line_count = 2 actual &&
# Make sure no other trees were considered besides the root.
! grep "Skipping contents of tree [^.]" filter_trace
3c7912da15736587d067945c2fb6328beddaf1ab
d8eeb8483e8a7f32e9a473703cec6c72a4516971
ok 20 - verify skipping tree iteration when not collecting omits
expecting success:
git -C r3 rev-list --objects --filter=tree:1 HEAD >actual &&
# We should get two root directories and two commits.
expect_has HEAD "" &&
expect_has HEAD~1 "" &&
test_line_count = 4 actual
c87d0a60ab3e9c39852baa3d603a61217d40e22d
3893fc5e03af47544851c43293284679cd419b5b
ok 21 - verify tree:1 includes root trees
expecting success:
git -C r3 rev-list --objects --filter=tree:2 HEAD >actual &&
expect_has HEAD "" &&
expect_has HEAD~1 "" &&
expect_has HEAD dir1 &&
expect_has HEAD pattern &&
expect_has HEAD sparse1 &&
expect_has HEAD sparse2 &&
# There are also 2 commit objects
test_line_count = 8 actual
c87d0a60ab3e9c39852baa3d603a61217d40e22d
3893fc5e03af47544851c43293284679cd419b5b
7fb8905c4b5f7b3f55b0b3fc90d88bec9f49eab1 dir1
09b067cf80607fe0e4fa713babca9fd9939077dd pattern
0b432f4900db0d72f719347ebf446d97a8de793b sparse1
2cc3ed6c8b26d9cf6e92fdbef61b61f26068a554 sparse2
ok 22 - verify tree:2 includes root trees and immediate children
expecting success:
git -C r3 rev-list --objects --filter=tree:3 HEAD >actual &&
expect_has HEAD "" &&
expect_has HEAD~1 "" &&
expect_has HEAD dir1 &&
expect_has HEAD dir1/sparse1 &&
expect_has HEAD dir1/sparse2 &&
expect_has HEAD pattern &&
expect_has HEAD sparse1 &&
expect_has HEAD sparse2 &&
# There are also 2 commit objects
test_line_count = 10 actual
c87d0a60ab3e9c39852baa3d603a61217d40e22d
3893fc5e03af47544851c43293284679cd419b5b
7fb8905c4b5f7b3f55b0b3fc90d88bec9f49eab1 dir1
40dffed725389f7a2be11e2a3ac34f878d767cdf dir1/sparse1
b1d6d0f3744cb998a08e4bbbd93b4e20aaf8fbe3 dir1/sparse2
09b067cf80607fe0e4fa713babca9fd9939077dd pattern
0b432f4900db0d72f719347ebf446d97a8de793b sparse1
2cc3ed6c8b26d9cf6e92fdbef61b61f26068a554 sparse2
ok 23 - verify tree:3 includes everything expected
expecting success:
git init r4 &&
echo foo > r4/foo &&
mkdir r4/subdir &&
echo bar > r4/subdir/bar &&
mkdir r4/filt &&
cp -r r4/foo r4/subdir r4/filt &&
git -C r4 add foo subdir filt &&
git -C r4 commit -m "commit msg"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6112-rev-list-filters-objects/r4/.git/
[master (root-commit) 4cf8d6d] commit msg
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 filt/foo
create mode 100644 filt/subdir/bar
create mode 100644 foo
create mode 100644 subdir/bar
ok 24 - setup r4
expecting success:
git -C r4 rev-list --objects --filter-print-omitted --filter=tree:2 \
HEAD >actual &&
expect_has_with_different_name r4 filt/foo &&
expect_has_with_different_name r4 filt/subdir
257cc5642cb1a054f08cc83f2d943e56fd3ebe99 foo
ee314a31b622b027c10981acaed7903a3607dbd4 subdir
ok 25 - test tree:# filter provisional omit for blob and tree
expecting success:
GIT_TRACE=1 git -C r4 rev-list --filter-print-omitted \
--objects --filter=tree:0 HEAD 2>filter_trace &&
grep "^Skipping contents of tree " filter_trace >actual &&
echo "Skipping contents of tree subdir/..." >expect &&
test_cmp expect actual
4cf8d6d93648a4d0766dc81b0db0ebc5aea958f6
~d78556fc6f1bfbd95227fadba9ed6515b2e10d55
~5716ca5987cbf97d6bb54920bea6adde242d87e6
~ee314a31b622b027c10981acaed7903a3607dbd4
~efb93ecccaaa415ab7f4a10a9de4acb792b002d0
~257cc5642cb1a054f08cc83f2d943e56fd3ebe99
ok 26 - verify skipping tree iteration when collecting omits
expecting success:
git init r5 &&
mkdir -p r5/a/subdir/b &&
echo foo > r5/a/subdir/b/foo &&
mkdir -p r5/subdir/b &&
echo foo > r5/subdir/b/foo &&
git -C r5 add a subdir &&
git -C r5 commit -m "commit msg" &&
git -C r5 rev-list --objects --filter=tree:4 HEAD >actual &&
expect_has_with_different_name r5 a/subdir/b/foo
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6112-rev-list-filters-objects/r5/.git/
[master (root-commit) afa976c] commit msg
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 a/subdir/b/foo
create mode 100644 subdir/b/foo
257cc5642cb1a054f08cc83f2d943e56fd3ebe99 subdir/b/foo
ok 27 - tree:<depth> where we iterate over tree at two levels
expecting success:
blob_hash=$(git -C r4 rev-parse HEAD:subdir/bar) &&
git -C r4 rev-list --objects --filter=tree:1 HEAD $blob_hash >actual &&
grep ^$blob_hash actual
5716ca5987cbf97d6bb54920bea6adde242d87e6
ok 28 - tree:<depth> which filters out blob but given as arg
expecting success:
git -C r1 ls-files -s file.1 file.2 file.3 file.4 file.5 \
>ls_files_result &&
awk -f print_2.awk ls_files_result |
sort >expected &&
for id in `cat expected | sed "s|..|&/|"`
do
rm r1/.git/objects/$id
done &&
git -C r1 rev-list --quiet --missing=print --objects HEAD >revs &&
awk -f print_1.awk revs |
sed "s/?//" |
sort >observed &&
test_cmp expected observed
ok 29 - rev-list W/ --missing=print
expecting success:
test_must_fail git -C r1 rev-list --quiet --objects HEAD
fatal: missing blob object '54ff69bde100bd29db945c2fc62010675d3b5b14'
ok 30 - rev-list W/O --missing fails
expecting success:
git -C r1 rev-list --quiet --missing=allow-any --objects HEAD
ok 31 - rev-list W/ missing=allow-any
expecting success:
git -C r2 config --local uploadpack.allowfilter 1 &&
GIT_TRACE_PACKET="$(pwd)/trace" git -c protocol.version=2 clone \
--filter=blob:limit=1k "file://$(pwd)/r2" limit &&
! grep "blob:limit=1k" trace &&
grep "blob:limit=1024" trace
Cloning into 'limit'...
packet: clone> filter blob:limit=1024
packet: upload-pack< filter blob:limit=1024
ok 32 - expand blob limit in protocol
expecting success:
GIT_TRACE_PACKET="$(pwd)/tree_trace" git -c protocol.version=2 clone \
--filter=tree:0k "file://$(pwd)/r2" tree &&
! grep "tree:0k" tree_trace &&
grep "tree:0" tree_trace
Cloning into 'tree'...
packet: clone> filter tree:0
packet: upload-pack< filter tree:0
ok 33 - expand tree depth limit in protocol
# passed all 33 test(s)
1..33
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6111-rev-list-treesame.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6111-rev-list-treesame/.git/
expecting success:
test_commit "Initial file" file "Hi there" A &&
git branch other-branch &&
test_commit "file=Hello" file "Hello" B &&
git branch third-branch &&
git checkout other-branch &&
test_commit "Added other" other "Hello" C &&
git checkout master &&
test_merge D other-branch &&
git checkout third-branch &&
test_commit "Third file" third "Nothing" E &&
git checkout master &&
test_commit "file=Blah" file "Blah" F &&
test_tick && git merge --no-commit third-branch &&
git checkout third-branch file &&
git commit &&
note G &&
git branch fiddler-branch &&
git checkout -b part2-branch &&
test_commit "file=Part 2" file "Part 2" H &&
git checkout fiddler-branch &&
test_commit "Bad commit" file "Silly" I &&
test_tick && git revert I && note J &&
git checkout master &&
test_tick && git merge --no-ff fiddler-branch &&
note K &&
test_commit "file=Part 1" file "Part 1" L &&
test_tick && test_must_fail git merge part2-branch &&
test_commit M file "Parts 1+2"
[master (root-commit) bbceb0a] Initial file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 8d757e8] file=Hello
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'other-branch'
[other-branch 519d746] Added other
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 other
Switched to branch 'master'
Merging:
8d757e8 file=Hello
virtual other-branch
found 1 common ancestor:
bbceb0a Initial file
Merge made by the 'recursive' strategy.
other | 1 +
1 file changed, 1 insertion(+)
create mode 100644 other
Switched to branch 'third-branch'
[third-branch 1c8927c] Third file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 third
Switched to branch 'master'
[master 961a4fd] file=Blah
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Merging:
961a4fd file=Blah
virtual third-branch
found 1 common ancestor:
8d757e8 file=Hello
Automatic merge went well; stopped before committing as requested
Updated 1 path from a37db59
[master 9f6f8b0] Merge branch 'third-branch'
Author: A U Thor <author@example.com>
Switched to a new branch 'part2-branch'
[part2-branch 0977201] file=Part 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'fiddler-branch'
[fiddler-branch 882208b] Bad commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[fiddler-branch cc48266] Revert "Bad commit"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:22:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'master'
Merging:
9f6f8b0 Merge branch 'third-branch'
virtual fiddler-branch
found 1 common ancestor:
9f6f8b0 Merge branch 'third-branch'
Already up to date!
Merge made by the 'recursive' strategy.
[master 8e014b3] file=Part 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Merging:
8e014b3 file=Part 1
virtual part2-branch
found 1 common ancestor:
9f6f8b0 Merge branch 'third-branch'
Auto-merging file
CONFLICT (content): Merge conflict in file
Automatic merge failed; fix conflicts and then commit the result.
[master 11de2ca] M
Author: A U Thor <author@example.com>
ok 1 - setup
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 2 - log
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 3 - log
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 4 - log --topo-order
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 5 - log -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 6 - log --parents -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 7 - log --full-history -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 8 - log --full-history --parents -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 9 - log --simplify-merges -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 10 - log --first-parent
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 11 - log --first-parent -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 12 - log F..M
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 13 - log F..M --topo-order
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 14 - log F..M -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 15 - log --parents F..M -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 16 - log F..M --full-history -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 17 - log F..M --full-history --parents -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 18 - log F..M --simplify-merges -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 19 - log F..M --ancestry-path
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 20 - log F..M --ancestry-path -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 21 - log F..M --ancestry-path --parents -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 22 - log F..M --ancestry-path --simplify-merges -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 23 - log F..M --first-parent
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 24 - log F..M --first-parent -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 25 - log E..M --ancestry-path
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 26 - log E..M --ancestry-path -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 27 - log E..M --ancestry-path --parents -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 28 - log E..M --ancestry-path --simplify-merges -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 29 - log G..M
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 30 - log G..M --topo-order
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 31 - log G..M -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 32 - log G..M --parents -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 33 - log G..M --full-history -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 34 - log G..M --full-history --parents -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 35 - log G..M --simplify-merges -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 36 - log G..M --ancestry-path
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 37 - log G..M --ancestry-path -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 38 - log G..M --ancestry-path --parents -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 39 - log G..M --ancestry-path --simplify-merges -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 40 - log B..F
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 41 - log B..F -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 42 - log B..F --parents -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 43 - log B..F --full-history -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 44 - log B..F --full-history --parents -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 45 - log B..F --simplify-merges -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 46 - log B..F --ancestry-path
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 47 - log B..F --ancestry-path -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 48 - log B..F --ancestry-path --parents -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 49 - log B..F --ancestry-path --simplify-merges -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 50 - log B..F --first-parent
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 51 - log B..F --first-parent -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 52 - log E F ^B -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 53 - log E...F -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 54 - log C..F
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 55 - log C..F -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 56 - log C..F --parents -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 57 - log C..F --full-history -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 58 - log C..F --full-history --parents -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 59 - log C..F --simplify-merges -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 60 - log C..F --ancestry-path
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 61 - log C..F --ancestry-path -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 62 - log C..F --ancestry-path --parents -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 63 - log C..F --ancestry-path --simplify-merges -- file
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 64 - log C..F --first-parent
expecting success:
git log --format="$FMT" $param |
unnote >actual &&
sed -e "$munge_actual" <actual >check &&
test_cmp expect check
ok 65 - log C..F --first-parent -- file
# passed all 65 test(s)
1..65
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6130-pathspec-noglob.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6130-pathspec-noglob/.git/
expecting success:
test_commit unrelated bar &&
test_commit vanilla foo &&
# insert file "f*" in the commit, but in a way that avoids
# the name "f*" in the worktree, because it is not allowed
# on Windows (the tests below do not depend on the presence
# of the file in the worktree)
git update-index --add --cacheinfo 100644 "$(git rev-parse HEAD:foo)" "f*" &&
test_tick &&
git commit -m star &&
test_commit bracket "f[o][o]"
[master (root-commit) f600089] unrelated
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
[master 065b8fa] vanilla
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
[master 306e39a] star
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 f*
[master 48b9afb] bracket
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 f[o][o]
ok 1 - create commits with glob characters
expecting success:
echo vanilla >expect &&
git log --format=%s -- foo >actual &&
test_cmp expect actual
ok 2 - vanilla pathspec matches literally
expecting success:
cat >expect <<-\EOF &&
bracket
star
vanilla
EOF
git log --format=%s -- "f*" >actual &&
test_cmp expect actual
ok 3 - star pathspec globs
expecting success:
cat >expect <<-\EOF &&
bracket
star
vanilla
EOF
git log --format=%s -- ":(glob)f*" >actual &&
test_cmp expect actual
ok 4 - star pathspec globs
expecting success:
cat >expect <<-\EOF &&
bracket
vanilla
EOF
git log --format=%s -- "f[o][o]" >actual &&
test_cmp expect actual
ok 5 - bracket pathspec globs and matches literal brackets
expecting success:
cat >expect <<-\EOF &&
bracket
vanilla
EOF
git log --format=%s -- ":(glob)f[o][o]" >actual &&
test_cmp expect actual
ok 6 - bracket pathspec globs and matches literal brackets
expecting success:
echo vanilla >expect &&
git --literal-pathspecs log --format=%s -- foo >actual &&
test_cmp expect actual
ok 7 - no-glob option matches literally (vanilla)
expecting success:
echo vanilla >expect &&
git log --format=%s -- ":(literal)foo" >actual &&
test_cmp expect actual
ok 8 - no-glob option matches literally (vanilla)
expecting success:
echo star >expect &&
git --literal-pathspecs log --format=%s -- "f*" >actual &&
test_cmp expect actual
ok 9 - no-glob option matches literally (star)
expecting success:
echo star >expect &&
git log --format=%s -- ":(literal)f*" >actual &&
test_cmp expect actual
ok 10 - no-glob option matches literally (star)
expecting success:
echo bracket >expect &&
git --literal-pathspecs log --format=%s -- "f[o][o]" >actual &&
test_cmp expect actual
ok 11 - no-glob option matches literally (bracket)
expecting success:
echo bracket >expect &&
git log --format=%s -- ":(literal)f[o][o]" >actual &&
test_cmp expect actual
ok 12 - no-glob option matches literally (bracket)
expecting success:
git --literal-pathspecs log --format=%s -- ":(literal)foo" >actual &&
test_must_be_empty actual
ok 13 - no-glob option disables :(literal)
expecting success:
echo star >expect &&
GIT_LITERAL_PATHSPECS=1 git log --format=%s -- "f*" >actual &&
test_cmp expect actual
ok 14 - no-glob environment variable works
expecting success:
git --literal-pathspecs blame -- foo &&
git --icase-pathspecs blame -- foo &&
git --glob-pathspecs blame -- foo &&
git --noglob-pathspecs blame -- foo
065b8faf (A U Thor 2005-04-07 15:14:13 -0700 1) vanilla
065b8faf (A U Thor 2005-04-07 15:14:13 -0700 1) vanilla
065b8faf (A U Thor 2005-04-07 15:14:13 -0700 1) vanilla
065b8faf (A U Thor 2005-04-07 15:14:13 -0700 1) vanilla
ok 15 - blame takes global pathspec flags
expecting success:
mkdir xxx &&
test_commit xxx xxx/bar
[master 7cd4d15] xxx
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 xxx/bar
ok 16 - setup xxx/bar
expecting success:
cat >expect <<-\EOF &&
xxx
unrelated
EOF
git log --format=%s -- ":(glob)**/bar" >actual &&
test_cmp expect actual
ok 17 - **/ works with :(glob)
expecting success:
git --noglob-pathspecs log --format=%s -- "**/bar" >actual &&
test_must_be_empty actual
ok 18 - **/ does not work with --noglob-pathspecs
expecting success:
cat >expect <<-\EOF &&
xxx
unrelated
EOF
git --noglob-pathspecs log --format=%s -- ":(glob)**/bar" >actual &&
test_cmp expect actual
ok 19 - **/ works with :(glob) and --noglob-pathspecs
expecting success:
cat >expect <<-\EOF &&
xxx
unrelated
EOF
git --glob-pathspecs log --format=%s -- "**/bar" >actual &&
test_cmp expect actual
ok 20 - **/ works with --glob-pathspecs
expecting success:
git --glob-pathspecs log --format=%s -- ":(literal)**/bar" >actual &&
test_must_be_empty actual
ok 21 - **/ does not work with :(literal) and --glob-pathspecs
# passed all 21 test(s)
1..21
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6131-pathspec-icase.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6131-pathspec-icase/.git/
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
)
prerequisite CASE_INSENSITIVE_FS not satisfied
expecting success:
test_commit bar bar &&
test_commit bAr bAr &&
test_commit BAR BAR &&
mkdir foo &&
test_commit foo/bar foo/bar &&
test_commit foo/bAr foo/bAr &&
test_commit foo/BAR foo/BAR &&
mkdir fOo &&
test_commit fOo/bar fOo/bar &&
test_commit fOo/bAr fOo/bAr &&
test_commit fOo/BAR fOo/BAR &&
mkdir FOO &&
test_commit FOO/bar FOO/bar &&
test_commit FOO/bAr FOO/bAr &&
test_commit FOO/BAR FOO/BAR
[master (root-commit) b257e7a] bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
[master 09d2e74] bAr
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bAr
[master ae27bbe] BAR
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 BAR
[master 016d22a] foo/bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo/bar
[master f3c37ed] foo/bAr
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo/bAr
[master 98eb41e] foo/BAR
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo/BAR
[master edcb5cb] fOo/bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fOo/bar
[master ed5b100] fOo/bAr
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fOo/bAr
[master 2f49636] fOo/BAR
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 fOo/BAR
[master c65ab92] FOO/bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 FOO/bar
[master cd48380] FOO/bAr
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 FOO/bAr
[master 4e818f3] FOO/BAR
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 FOO/BAR
ok 1 - create commits with glob characters
expecting success:
echo bar >expect &&
git log --format=%s -- "bar" >actual &&
test_cmp expect actual
ok 2 - tree_entry_interesting matches bar
expecting success:
cat <<-EOF >expect &&
BAR
bAr
bar
EOF
git log --format=%s -- ":(icase)bar" >actual &&
test_cmp expect actual
ok 3 - tree_entry_interesting matches :(icase)bar
expecting success:
cat <<-EOF >expect &&
fOo/BAR
fOo/bAr
fOo/bar
EOF
( cd fOo && git log --format=%s -- ":(icase)bar" ) >actual &&
test_cmp expect actual
ok 4 - tree_entry_interesting matches :(icase)bar with prefix
expecting success:
cat <<-EOF >expect &&
FOO/BAR
FOO/bAr
FOO/bar
fOo/BAR
fOo/bAr
fOo/bar
foo/BAR
foo/bAr
foo/bar
EOF
( cd fOo && git log --format=%s -- ":(icase)../foo/bar" ) >actual &&
test_cmp expect actual
ok 5 - tree_entry_interesting matches :(icase)bar with empty prefix
expecting success:
cat <<-EOF >expect &&
BAR
bAr
bar
EOF
git ls-files ":(icase)bar" >actual &&
test_cmp expect actual
ok 6 - match_pathspec matches :(icase)bar
expecting success:
cat <<-EOF >expect &&
fOo/BAR
fOo/bAr
fOo/bar
EOF
( cd fOo && git ls-files --full-name ":(icase)bar" ) >actual &&
test_cmp expect actual
ok 7 - match_pathspec matches :(icase)bar with prefix
expecting success:
cat <<-EOF >expect &&
bar
fOo/BAR
fOo/bAr
fOo/bar
EOF
( cd fOo && git ls-files --full-name ":(icase)bar" ../bar ) >actual &&
test_cmp expect actual
ok 8 - match_pathspec matches :(icase)bar with empty prefix
expecting success:
echo FOO/BAR >expect &&
git diff --name-only HEAD^ HEAD -- ":(icase)foo/bar" >actual &&
test_cmp expect actual
ok 9 - "git diff" can take magic :(icase) pathspec
# passed all 9 test(s)
1..9
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6132-pathspec-exclude.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6132-pathspec-exclude/.git/
expecting success:
for p in file sub/file sub/sub/file sub/file2 sub/sub/sub/file sub2/file; do
if echo $p | grep /; then
mkdir -p $(dirname $p)
fi &&
: >$p &&
git add $p &&
git commit -m $p
done &&
git log --oneline --format=%s >actual &&
cat <<EOF >expect &&
sub2/file
sub/sub/sub/file
sub/file2
sub/sub/file
sub/file
file
EOF
test_cmp expect actual
[master (root-commit) addb318] file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
sub/file
[master 1990d94] sub/file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 sub/file
sub/sub/file
[master d5aefc0] sub/sub/file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 sub/sub/file
sub/file2
[master 12dba7a] sub/file2
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 sub/file2
sub/sub/sub/file
[master 836f51e] sub/sub/sub/file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 sub/sub/sub/file
sub2/file
[master ec9f1a5] sub2/file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 sub2/file
ok 1 - setup
expecting success:
git log --oneline --format=%s -- . ":(exclude)sub" >expect &&
git log --oneline --format=%s -- ":(exclude)sub" >actual &&
test_cmp expect actual
ok 2 - exclude only pathspec uses default implicit pathspec
expecting success:
git log --oneline --format=%s -- . ":(exclude)sub" >actual &&
cat <<EOF >expect &&
sub2/file
file
EOF
test_cmp expect actual
ok 3 - t_e_i() exclude sub
expecting success:
git log --oneline --format=%s -- . ":(exclude)sub/sub/file" >actual &&
cat <<EOF >expect &&
sub2/file
sub/sub/sub/file
sub/file2
sub/file
file
EOF
test_cmp expect actual
ok 4 - t_e_i() exclude sub/sub/file
expecting success:
git log --oneline --format=%s -- . ":!sub" >actual &&
cat <<EOF >expect &&
sub2/file
file
EOF
test_cmp expect actual
ok 5 - t_e_i() exclude sub using mnemonic
expecting success:
git log --oneline --format=%s -- . ":(exclude,icase)SUB" >actual &&
cat <<EOF >expect &&
sub2/file
file
EOF
test_cmp expect actual
ok 6 - t_e_i() exclude :(icase)SUB
expecting success:
(
cd sub &&
git log --oneline --format=%s -- :/ ":/!sub2" >actual &&
cat <<EOF >expect &&
sub/sub/sub/file
sub/file2
sub/sub/file
sub/file
file
EOF
test_cmp expect actual
)
ok 7 - t_e_i() exclude sub2 from sub
expecting success:
git log --oneline --format=%s -- . ":(exclude)sub/*file" >actual &&
cat <<EOF >expect &&
sub2/file
sub/file2
file
EOF
test_cmp expect actual
ok 8 - t_e_i() exclude sub/*file
expecting success:
git log --oneline --format=%s -- . ":(exclude,glob)sub/*/file" >actual &&
cat <<EOF >expect &&
sub2/file
sub/sub/sub/file
sub/file2
sub/file
file
EOF
test_cmp expect actual
ok 9 - t_e_i() exclude :(glob)sub/*/file
expecting success:
git ls-files -- . ":(exclude)sub" >actual &&
cat <<EOF >expect &&
file
sub2/file
EOF
test_cmp expect actual
ok 10 - m_p_d() exclude sub
expecting success:
git ls-files -- . ":(exclude)sub/sub/file" >actual &&
cat <<EOF >expect &&
file
sub/file
sub/file2
sub/sub/sub/file
sub2/file
EOF
test_cmp expect actual
ok 11 - m_p_d() exclude sub/sub/file
expecting success:
git ls-files -- . ":!sub" >actual &&
cat <<EOF >expect &&
file
sub2/file
EOF
test_cmp expect actual
ok 12 - m_p_d() exclude sub using mnemonic
expecting success:
git ls-files -- . ":(exclude,icase)SUB" >actual &&
cat <<EOF >expect &&
file
sub2/file
EOF
test_cmp expect actual
ok 13 - m_p_d() exclude :(icase)SUB
expecting success:
(
cd sub &&
git ls-files -- :/ ":/!sub2" >actual &&
cat <<EOF >expect &&
../file
file
file2
sub/file
sub/sub/file
EOF
test_cmp expect actual
)
ok 14 - m_p_d() exclude sub2 from sub
expecting success:
git ls-files -- . ":(exclude)sub/*file" >actual &&
cat <<EOF >expect &&
file
sub/file2
sub2/file
EOF
test_cmp expect actual
ok 15 - m_p_d() exclude sub/*file
expecting success:
git ls-files -- . ":(exclude,glob)sub/*/file" >actual &&
cat <<EOF >expect &&
file
sub/file
sub/file2
sub/sub/sub/file
sub2/file
EOF
test_cmp expect actual
ok 16 - m_p_d() exclude :(glob)sub/*/file
expecting success:
git ls-files -- ":^*/file2" ":^sub2" >actual &&
cat <<-\EOF >expect &&
file
sub/file
sub/sub/file
sub/sub/sub/file
EOF
test_cmp expect actual
ok 17 - multiple exclusions
expecting success:
git init case8 &&
(
cd case8 &&
echo file >file1 &&
echo file >file2 &&
git add file1 file2 &&
git commit -m twofiles &&
git grep -l file HEAD :^file2 >actual &&
echo HEAD:file1 >expected &&
test_cmp expected actual &&
git grep -l file HEAD :^file1 >actual &&
echo HEAD:file2 >expected &&
test_cmp expected actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6132-pathspec-exclude/case8/.git/
[master (root-commit) c8e59a4] twofiles
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 file1
create mode 100644 file2
ok 18 - t_e_i() exclude case #8
# passed all 18 test(s)
1..18
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6133-pathspec-rev-dwim.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6133-pathspec-rev-dwim/.git/
expecting success:
test_commit base &&
echo content >"br[ack]ets" &&
git add . &&
test_tick &&
git commit -m brackets
[master (root-commit) d1ff1c9] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 base.t
[master 261aa52] brackets
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 br[ack]ets
ok 1 - setup
expecting success:
git log -- "*.t" >expect &&
git log "*.t" >actual &&
test_cmp expect actual
ok 2 - non-rev wildcard dwims to pathspec
expecting success:
git show "HEAD:br[ack]ets" -- >expect &&
git show "HEAD:br[ack]ets" >actual &&
test_cmp expect actual
ok 3 - tree:path with metacharacters dwims to rev
expecting success:
git log "HEAD^{/b.*}" -- >expect &&
git log "HEAD^{/b.*}" >actual &&
test_cmp expect actual
ok 4 - ^{foo} with metacharacters dwims to rev
expecting success:
git log "HEAD@{now [or thereabouts]}" -- >expect &&
git log "HEAD@{now [or thereabouts]}" >actual &&
test_cmp expect actual
ok 5 - @{foo} with metacharacters dwims to rev
expecting success:
mkdir subdir &&
(
cd subdir &&
git log -- ":/*.t" >expect &&
git log ":/*.t" >actual &&
test_cmp expect actual
)
ok 6 - :/*.t from a subdir dwims to a pathspec
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6134-pathspec-in-submodule.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6134-pathspec-in-submodule/.git/
expecting success:
test_create_repo pretzel &&
: >pretzel/a &&
git -C pretzel add a &&
git -C pretzel commit -m "add a file" -- a &&
git submodule add ./pretzel sub &&
git commit -a -m "add submodule" &&
git submodule deinit --all
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6134-pathspec-in-submodule/pretzel/.git/
[master (root-commit) eb00912] add a file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t6134-pathspec-in-submodule/sub'...
done.
[master (root-commit) 6f7fea2] add submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub
Cleared directory 'sub'
Submodule 'sub' (./pretzel) unregistered for path 'sub'
ok 1 - setup a submodule
expecting success:
echo a >sub/a &&
test_must_fail git add sub/a 2>actual &&
test_i18ncmp expect actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 2 - error message for path inside submodule
expecting success:
test_must_fail git -C sub add . 2>actual &&
test_i18ngrep "in unpopulated submodule" actual
fatal: in unpopulated submodule 'sub'
ok 3 - error message for path inside submodule from within submodule
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6135-pathspec-with-attrs.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6135-pathspec-with-attrs/.git/
expecting success:
cat <<-\EOF >expect &&
fileA
fileAB
fileAC
fileB
fileBC
fileC
fileNoLabel
fileSetLabel
fileUnsetLabel
fileValue
fileWrongLabel
sub/fileA
sub/fileAB
sub/fileAC
sub/fileB
sub/fileBC
sub/fileC
sub/fileNoLabel
sub/fileSetLabel
sub/fileUnsetLabel
sub/fileValue
sub/fileWrongLabel
EOF
mkdir sub &&
while read path
do
echo content >$path &&
git add $path || return 1
done <expect &&
git commit -m "initial commit" &&
git ls-files >actual &&
test_cmp expect actual
[master (root-commit) 3742d11] initial commit
Author: A U Thor <author@example.com>
22 files changed, 22 insertions(+)
create mode 100644 fileA
create mode 100644 fileAB
create mode 100644 fileAC
create mode 100644 fileB
create mode 100644 fileBC
create mode 100644 fileC
create mode 100644 fileNoLabel
create mode 100644 fileSetLabel
create mode 100644 fileUnsetLabel
create mode 100644 fileValue
create mode 100644 fileWrongLabel
create mode 100644 sub/fileA
create mode 100644 sub/fileAB
create mode 100644 sub/fileAC
create mode 100644 sub/fileB
create mode 100644 sub/fileBC
create mode 100644 sub/fileC
create mode 100644 sub/fileNoLabel
create mode 100644 sub/fileSetLabel
create mode 100644 sub/fileUnsetLabel
create mode 100644 sub/fileValue
create mode 100644 sub/fileWrongLabel
ok 1 - setup a tree
expecting success:
test_must_fail git ls-files ":(attr:)"
fatal: attr spec must not be empty
ok 2 - pathspec with no attr
expecting success:
git ls-files ":(attr:label)" >actual &&
test_must_be_empty actual
ok 3 - pathspec with labels and non existent .gitattributes
expecting success:
test_must_fail git grep content HEAD -- ":(attr:label)"
ok 4 - pathspec with labels and non existent .gitattributes (2)
expecting success:
cat <<-\EOF >.gitattributes &&
fileA labelA
fileB labelB
fileC labelC
fileAB labelA labelB
fileAC labelA labelC
fileBC labelB labelC
fileUnsetLabel -label
fileSetLabel label
fileValue label=foo
fileWrongLabel label☺
EOF
git add .gitattributes &&
git commit -m "add attributes"
label☺ is not a valid attribute name: .gitattributes:10
label☺ is not a valid attribute name: .gitattributes:10
label☺ is not a valid attribute name: .gitattributes:10
[master 6902b09] add attributes
Author: A U Thor <author@example.com>
1 file changed, 10 insertions(+)
create mode 100644 .gitattributes
ok 5 - setup .gitattributes
expecting success:
cat <<-\EOF >expect &&
fileSetLabel
sub/fileSetLabel
EOF
git ls-files ":(attr:label)" >actual &&
test_cmp expect actual
label☺ is not a valid attribute name: .gitattributes:10
ok 6 - check specific set attr
expecting success:
cat <<-\EOF >expect &&
HEAD:fileSetLabel
HEAD:sub/fileSetLabel
EOF
git grep -l content HEAD ":(attr:label)" >actual &&
test_cmp expect actual
label☺ is not a valid attribute name: .gitattributes:10
label☺ is not a valid attribute name: .gitattributes:10
ok 7 - check specific set attr (2)
expecting success:
cat <<-\EOF >expect &&
fileUnsetLabel
sub/fileUnsetLabel
EOF
git ls-files ":(attr:-label)" >actual &&
test_cmp expect actual
label☺ is not a valid attribute name: .gitattributes:10
ok 8 - check specific unset attr
expecting success:
cat <<-\EOF >expect &&
HEAD:fileUnsetLabel
HEAD:sub/fileUnsetLabel
EOF
git grep -l content HEAD ":(attr:-label)" >actual &&
test_cmp expect actual
label☺ is not a valid attribute name: .gitattributes:10
label☺ is not a valid attribute name: .gitattributes:10
ok 9 - check specific unset attr (2)
expecting success:
cat <<-\EOF >expect &&
fileValue
sub/fileValue
EOF
git ls-files ":(attr:label=foo)" >actual &&
test_cmp expect actual &&
git ls-files ":(attr:label=bar)" >actual &&
test_must_be_empty actual
label☺ is not a valid attribute name: .gitattributes:10
label☺ is not a valid attribute name: .gitattributes:10
ok 10 - check specific value attr
expecting success:
cat <<-\EOF >expect &&
HEAD:fileValue
HEAD:sub/fileValue
EOF
git grep -l content HEAD ":(attr:label=foo)" >actual &&
test_cmp expect actual &&
test_must_fail git grep -l content HEAD ":(attr:label=bar)"
label☺ is not a valid attribute name: .gitattributes:10
label☺ is not a valid attribute name: .gitattributes:10
label☺ is not a valid attribute name: .gitattributes:10
ok 11 - check specific value attr (2)
expecting success:
cat <<-\EOF >expect &&
.gitattributes
fileA
fileAB
fileAC
fileB
fileBC
fileC
fileNoLabel
fileWrongLabel
sub/fileA
sub/fileAB
sub/fileAC
sub/fileB
sub/fileBC
sub/fileC
sub/fileNoLabel
sub/fileWrongLabel
EOF
git ls-files ":(attr:!label)" >actual &&
test_cmp expect actual
label☺ is not a valid attribute name: .gitattributes:10
ok 12 - check unspecified attr
expecting success:
cat <<-\EOF >expect &&
HEAD:.gitattributes
HEAD:fileA
HEAD:fileAB
HEAD:fileAC
HEAD:fileB
HEAD:fileBC
HEAD:fileC
HEAD:fileNoLabel
HEAD:fileWrongLabel
HEAD:sub/fileA
HEAD:sub/fileAB
HEAD:sub/fileAC
HEAD:sub/fileB
HEAD:sub/fileBC
HEAD:sub/fileC
HEAD:sub/fileNoLabel
HEAD:sub/fileWrongLabel
EOF
git grep -l ^ HEAD ":(attr:!label)" >actual &&
test_cmp expect actual
label☺ is not a valid attribute name: .gitattributes:10
label☺ is not a valid attribute name: .gitattributes:10
ok 13 - check unspecified attr (2)
expecting success:
cat <<-\EOF >expect &&
.gitattributes
fileC
fileNoLabel
fileWrongLabel
sub/fileC
sub/fileNoLabel
sub/fileWrongLabel
EOF
git ls-files ":(attr:!labelB !labelA !label)" >actual &&
test_cmp expect actual
label☺ is not a valid attribute name: .gitattributes:10
ok 14 - check multiple unspecified attr
expecting success:
cat <<-\EOF >expect &&
fileAB
fileB
fileBC
EOF
git ls-files ":(attr:labelB)" ":(exclude)sub/" >actual &&
test_cmp expect actual
label☺ is not a valid attribute name: .gitattributes:10
ok 15 - check label with more labels but excluded path
expecting success:
cat <<-\EOF >expect &&
fileAB
fileB
fileBC
sub/fileAB
sub/fileB
EOF
git ls-files ":(attr:labelB)" ":(exclude,attr:labelC)sub/" >actual &&
test_cmp expect actual
label☺ is not a valid attribute name: .gitattributes:10
label☺ is not a valid attribute name: .gitattributes:10
ok 16 - check label excluding other labels
expecting success:
test_must_fail git ls-files . ":(attr:labelB,attr:labelC)" 2>actual &&
test_i18ngrep "Only one" actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: Only one 'attr:' specification is allowed.
ok 17 - fail on multiple attr specifiers in one pathspec item
expecting success:
# The main purpose of this test is to check that we actually fail
# when you attempt to use attr magic in commands that do not implement
# attr magic. This test does not advocate git-add to stay that way,
# though, but git-add is convenient as it has its own internal pathspec
# parsing.
test_must_fail git add ":(attr:labelB)" 2>actual &&
test_i18ngrep "magic not supported" actual
fatal: :(attr:labelB): pathspec magic not supported by this command: 'attr'
ok 18 - fail if attr magic is used places not implemented
expecting success:
test_must_fail git ls-files . ":(attr:☺)"
fatal: invalid attribute name ☺
ok 19 - abort on giving invalid label on the command line
expecting success:
test_must_fail git ls-files . ":(attr:-label=foo)" &&
test_must_fail git ls-files . ":(attr:!label=foo)"
fatal: invalid attribute name label=foo
fatal: invalid attribute name label=foo
ok 20 - abort on asking for wrong magic
expecting success:
cat <<-EOF >>.gitattributes &&
* whitespace=indent,trail,space
EOF
git ls-files ":(attr:whitespace=indent\,trail\,space)" >actual &&
git ls-files >expect &&
test_cmp expect actual
label☺ is not a valid attribute name: .gitattributes:10
ok 21 - check attribute list
expecting success:
test_must_fail git ls-files ":(attr:label=foo\\ labelA=bar)" 2>actual &&
test_i18ngrep "not allowed as last character in attr value" actual
fatal: Escape character '\' not allowed as last character in attr value
ok 22 - backslash cannot be the last character
expecting success:
test_must_fail git ls-files ":(attr:label=f\\\oo)" 2>actual &&
test_i18ngrep "for value matching" actual
fatal: cannot use '\' for value matching
ok 23 - backslash cannot be used as a value
# passed all 23 test(s)
1..23
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6043-merge-rename-directories.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/.git/
expecting success:
test_create_repo 1a &&
(
cd 1a &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z y &&
test_tick &&
git commit -m "A" &&
git checkout B &&
echo d >z/d &&
mkdir z/e &&
echo f >z/e/f &&
git add z/d z/e/f &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/1a/.git/
[master (root-commit) 4e96174] O
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A 4e9f86d] A
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
Switched to branch 'B'
[B aa97264] B
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 z/d
create mode 100644 z/e/f
ok 1 - 1a-setup: Simple directory rename detection
expecting success:
(
cd 1a &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
git ls-files -s >out &&
test_line_count = 4 out &&
git rev-parse >actual \
HEAD:y/b HEAD:y/c HEAD:y/d HEAD:y/e/f &&
git rev-parse >expect \
O:z/b O:z/c B:z/d B:z/e/f &&
test_cmp expect actual &&
git hash-object y/d >actual &&
git rev-parse B:z/d >expect &&
test_cmp expect actual &&
test_must_fail git rev-parse HEAD:z/d &&
test_must_fail git rev-parse HEAD:z/e/f &&
test_path_is_missing z/d &&
test_path_is_missing z/e/f
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 4e9f86d A
fatal: Path 'z/d' does not exist in 'HEAD'
HEAD:z/d
fatal: Path 'z/e/f' does not exist in 'HEAD'
HEAD:z/e/f
ok 2 - 1a-check: Simple directory rename detection
expecting success:
test_create_repo 1b &&
(
cd 1b &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
mkdir y &&
echo d >y/d &&
git add z y &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
echo e >z/e &&
git add z/e &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv z/b y &&
git mv z/c y &&
rmdir z &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/1b/.git/
[master (root-commit) 828128d] O
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 y/d
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A 62cf902] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 z/e
Switched to branch 'B'
[B 2a8bd7d] B
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
ok 3 - 1b-setup: Merge a directory with another
expecting success:
(
cd 1b &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 4 out &&
git rev-parse >actual \
HEAD:y/b HEAD:y/c HEAD:y/d HEAD:y/e &&
git rev-parse >expect \
O:z/b O:z/c O:y/d A:z/e &&
test_cmp expect actual &&
test_must_fail git rev-parse HEAD:z/e
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 62cf902 A
Merging:
62cf902 A
virtual B^0
found 1 common ancestor:
828128d O
Path updated: z/e added in HEAD inside a directory that was renamed in B^0; moving it to y/e.
Merge made by the 'recursive' strategy.
{z => y}/b | 0
{z => y}/c | 0
{z => y}/e | 0
3 files changed, 0 insertions(+), 0 deletions(-)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
rename {z => y}/e (100%)
fatal: Path 'z/e' does not exist in 'HEAD'
HEAD:z/e
ok 4 - 1b-check: Merge a directory with another
expecting success:
test_create_repo 1c &&
(
cd 1c &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
mkdir x &&
echo d >x/d &&
git add z x &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z y &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv x/d z/d &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/1c/.git/
[master (root-commit) 1e3967e] O
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 x/d
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A 623f815] A
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
Switched to branch 'B'
[B c9f07f0] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename {x => z}/d (100%)
ok 5 - 1c-setup: Transitive renaming
expecting success:
(
cd 1c &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
git ls-files -s >out &&
test_line_count = 3 out &&
git rev-parse >actual \
HEAD:y/b HEAD:y/c HEAD:y/d &&
git rev-parse >expect \
O:z/b O:z/c O:x/d &&
test_cmp expect actual &&
test_must_fail git rev-parse HEAD:x/d &&
test_must_fail git rev-parse HEAD:z/d &&
test_path_is_missing z/d
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 623f815 A
fatal: Path 'x/d' does not exist in 'HEAD'
HEAD:x/d
fatal: Path 'z/d' does not exist in 'HEAD'
HEAD:z/d
ok 6 - 1c-check: Transitive renaming
expecting success:
test_create_repo 1d &&
(
cd 1d &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
mkdir y &&
echo d >y/d &&
echo e >y/e &&
git add z y &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z x &&
echo m >y/m &&
echo wham1 >y/wham &&
git add y &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv y x &&
echo n >z/n &&
echo wham2 >z/wham &&
git add z &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/1d/.git/
[master (root-commit) a5c945e] O
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 y/d
create mode 100644 y/e
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A e0494ce] A
Author: A U Thor <author@example.com>
4 files changed, 2 insertions(+)
rename {z => x}/b (100%)
rename {z => x}/c (100%)
create mode 100644 y/m
create mode 100644 y/wham
Switched to branch 'B'
[B 7f8e93c] B
Author: A U Thor <author@example.com>
4 files changed, 2 insertions(+)
rename {y => x}/d (100%)
rename {y => x}/e (100%)
create mode 100644 z/n
create mode 100644 z/wham
ok 7 - 1d-setup: Directory renames cause a rename/rename(2to1) conflict
expecting success:
(
cd 1d &&
git checkout A^0 &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
test_i18ngrep "CONFLICT (rename/rename)" out &&
git ls-files -s >out &&
test_line_count = 8 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
:0:x/b :0:x/c :0:x/d :0:x/e :0:x/m :0:x/n &&
git rev-parse >expect \
O:z/b O:z/c O:y/d O:y/e A:y/m B:z/n &&
test_cmp expect actual &&
test_must_fail git rev-parse :0:x/wham &&
git rev-parse >actual \
:2:x/wham :3:x/wham &&
git rev-parse >expect \
A:y/wham B:z/wham &&
test_cmp expect actual &&
# Test that the two-way merge in x/wham is as expected
git cat-file -p :2:x/wham >expect &&
git cat-file -p :3:x/wham >other &&
>empty &&
test_must_fail git merge-file \
-L "HEAD" \
-L "" \
-L "B^0" \
expect empty other &&
test_cmp expect x/wham
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at e0494ce A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (rename/rename): Rename y/wham->x/wham in HEAD. Rename z/wham->x/wham in B^0
fatal: Path 'x/wham' is in the index, but not at stage 0.
Did you mean ':2:x/wham'?
:0:x/wham
ok 8 - 1d-check: Directory renames cause a rename/rename(2to1) conflict
expecting success:
test_create_repo 1e &&
(
cd 1e &&
mkdir z &&
echo b >z/oldb &&
echo c >z/oldc &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
mkdir y &&
git mv z/oldb y/newb &&
git mv z/oldc y/newc &&
test_tick &&
git commit -m "A" &&
git checkout B &&
echo d >z/d &&
git add z/d &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/1e/.git/
[master (root-commit) a0c453d] O
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 z/oldb
create mode 100644 z/oldc
Switched to branch 'A'
[A e7f73d0] A
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename z/oldb => y/newb (100%)
rename z/oldc => y/newc (100%)
Switched to branch 'B'
[B b36bf99] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 z/d
ok 9 - 1e-setup: Renamed directory, with all files being renamed too
expecting success:
(
cd 1e &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git rev-parse >actual \
HEAD:y/newb HEAD:y/newc HEAD:y/d &&
git rev-parse >expect \
O:z/oldb O:z/oldc B:z/d &&
test_cmp expect actual &&
test_must_fail git rev-parse HEAD:z/d
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at e7f73d0 A
Merging:
e7f73d0 A
virtual B^0
found 1 common ancestor:
a0c453d O
Skipped y/newc (merged same as existing)
Skipped y/newb (merged same as existing)
Path updated: z/d added in B^0 inside a directory that was renamed in HEAD; moving it to y/d.
Merge made by the 'recursive' strategy.
y/d | 1 +
1 file changed, 1 insertion(+)
create mode 100644 y/d
fatal: Path 'z/d' does not exist in 'HEAD'
HEAD:z/d
ok 10 - 1e-check: Renamed directory, with all files being renamed too
expecting success:
test_create_repo 1f &&
(
cd 1f &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
echo d >z/d &&
echo e >z/e &&
echo f >z/f &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
echo g >z/g &&
git add z/g &&
test_tick &&
git commit -m "A" &&
git checkout B &&
mkdir y &&
mkdir x &&
git mv z/b y/ &&
git mv z/c y/ &&
git mv z/d x/ &&
git mv z/e x/ &&
git mv z/f x/ &&
rmdir z &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/1f/.git/
[master (root-commit) bc89ae6] O
Author: A U Thor <author@example.com>
5 files changed, 5 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
create mode 100644 z/d
create mode 100644 z/e
create mode 100644 z/f
Switched to branch 'A'
[A d83c371] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 z/g
Switched to branch 'B'
[B 2106ef0] B
Author: A U Thor <author@example.com>
5 files changed, 0 insertions(+), 0 deletions(-)
rename {z => x}/d (100%)
rename {z => x}/e (100%)
rename {z => x}/f (100%)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
ok 11 - 1f-setup: Split a directory into two other directories
expecting success:
(
cd 1f &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 6 out &&
git rev-parse >actual \
HEAD:y/b HEAD:y/c HEAD:x/d HEAD:x/e HEAD:x/f HEAD:x/g &&
git rev-parse >expect \
O:z/b O:z/c O:z/d O:z/e O:z/f A:z/g &&
test_cmp expect actual &&
test_path_is_missing z/g &&
test_must_fail git rev-parse HEAD:z/g
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d83c371 A
Merging:
d83c371 A
virtual B^0
found 1 common ancestor:
bc89ae6 O
Path updated: z/g added in HEAD inside a directory that was renamed in B^0; moving it to x/g.
Merge made by the 'recursive' strategy.
{z => x}/d | 0
{z => x}/e | 0
{z => x}/f | 0
{z => x}/g | 0
{z => y}/b | 0
{z => y}/c | 0
6 files changed, 0 insertions(+), 0 deletions(-)
rename {z => x}/d (100%)
rename {z => x}/e (100%)
rename {z => x}/f (100%)
rename {z => x}/g (100%)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
fatal: Path 'z/g' does not exist in 'HEAD'
HEAD:z/g
ok 12 - 1f-check: Split a directory into two other directories
expecting success:
test_create_repo 2a &&
(
cd 2a &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
mkdir y &&
mkdir w &&
git mv z/b y/ &&
git mv z/c w/ &&
test_tick &&
git commit -m "A" &&
git checkout B &&
echo d >z/d &&
git add z/d &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/2a/.git/
[master (root-commit) 4e96174] O
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A 6af9a4d] A
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {z => w}/c (100%)
rename {z => y}/b (100%)
Switched to branch 'B'
[B db43152] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 z/d
ok 13 - 2a-setup: Directory split into two on one side, with equal numbers of paths
expecting success:
(
cd 2a &&
git checkout A^0 &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
test_i18ngrep "CONFLICT.*directory rename split" out &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
:0:y/b :0:w/c :0:z/d &&
git rev-parse >expect \
O:z/b O:z/c B:z/d &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 6af9a4d A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (directory rename split): Unclear where to place z/d because directory z was renamed to multiple other directories, with no destination getting a majority of the files.
ok 14 - 2a-check: Directory split into two on one side, with equal numbers of paths
expecting success:
test_create_repo 2b &&
(
cd 2b &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
mkdir y &&
mkdir w &&
git mv z/b y/ &&
git mv z/c w/ &&
test_tick &&
git commit -m "A" &&
git checkout B &&
mkdir x &&
echo d >x/d &&
git add x/d &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/2b/.git/
[master (root-commit) 4e96174] O
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A 6af9a4d] A
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {z => w}/c (100%)
rename {z => y}/b (100%)
Switched to branch 'B'
[B c2fe7fb] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 x/d
ok 15 - 2b-setup: Directory split into two on one side, with equal numbers of paths
expecting success:
(
cd 2b &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
:0:y/b :0:w/c :0:x/d &&
git rev-parse >expect \
O:z/b O:z/c B:x/d &&
test_cmp expect actual &&
test_i18ngrep ! "CONFLICT.*directory rename split" out
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 6af9a4d A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 16 - 2b-check: Directory split into two on one side, with equal numbers of paths
expecting success:
test_create_repo 3a &&
(
cd 3a &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
echo d >z/d &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
test_tick &&
git commit --allow-empty -m "A" &&
git checkout B &&
mkdir y &&
mkdir x &&
git mv z/b y/ &&
git mv z/c y/ &&
git mv z/d x/ &&
rmdir z &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/3a/.git/
[master (root-commit) 6c15033] O
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
create mode 100644 z/d
Switched to branch 'A'
[A 73b131e] A
Author: A U Thor <author@example.com>
Switched to branch 'B'
[B d135340] B
Author: A U Thor <author@example.com>
3 files changed, 0 insertions(+), 0 deletions(-)
rename {z => x}/d (100%)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
ok 17 - 3a-setup: Avoid implicit rename if involved as source on other side
expecting success:
(
cd 3a &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git rev-parse >actual \
HEAD:y/b HEAD:y/c HEAD:x/d &&
git rev-parse >expect \
O:z/b O:z/c O:z/d &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 73b131e A
Merging:
73b131e A
virtual B^0
found 1 common ancestor:
6c15033 O
Merge made by the 'recursive' strategy.
{z => x}/d | 0
{z => y}/b | 0
{z => y}/c | 0
3 files changed, 0 insertions(+), 0 deletions(-)
rename {z => x}/d (100%)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
ok 18 - 3a-check: Avoid implicit rename if involved as source on other side
expecting success:
test_create_repo 3b &&
(
cd 3b &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
echo d >z/d &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
mkdir y &&
mkdir x &&
git mv z/b y/ &&
git mv z/c y/ &&
git mv z/d x/ &&
rmdir z &&
test_tick &&
git commit -m "A" &&
git checkout B &&
mkdir w &&
git mv z/d w/ &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/3b/.git/
[master (root-commit) 6c15033] O
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
create mode 100644 z/d
Switched to branch 'A'
[A 5eead67] A
Author: A U Thor <author@example.com>
3 files changed, 0 insertions(+), 0 deletions(-)
rename {z => x}/d (100%)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
Switched to branch 'B'
[B 464e387] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename {z => w}/d (100%)
ok 19 - 3b-setup: Avoid implicit rename if involved as source on current side
expecting success:
(
cd 3b &&
git checkout A^0 &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
test_i18ngrep CONFLICT.*rename/rename.*z/d.*x/d.*w/d out &&
test_i18ngrep ! CONFLICT.*rename/rename.*y/d out &&
git ls-files -s >out &&
test_line_count = 5 out &&
git ls-files -u >out &&
test_line_count = 3 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
:0:y/b :0:y/c :1:z/d :2:x/d :3:w/d &&
git rev-parse >expect \
O:z/b O:z/c O:z/d O:z/d O:z/d &&
test_cmp expect actual &&
test_path_is_missing z/d &&
git hash-object >actual \
x/d w/d &&
git rev-parse >expect \
O:z/d O:z/d &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 5eead67 A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (rename/rename): Rename "z/d"->"x/d" in branch "HEAD" rename "z/d"->"w/d" in "B^0"
ok 20 - 3b-check: Avoid implicit rename if involved as source on current side
expecting success:
test_create_repo 4a &&
(
cd 4a &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
echo d >z/d &&
echo e >z/e &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
mkdir y &&
git mv z/b y/ &&
git mv z/c y/ &&
git mv z/d y/ &&
test_tick &&
git commit -m "A" &&
git checkout B &&
echo f >z/f &&
git add z/f &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/4a/.git/
[master (root-commit) 9e2ca6f] O
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
create mode 100644 z/d
create mode 100644 z/e
Switched to branch 'A'
[A 9c11b44] A
Author: A U Thor <author@example.com>
3 files changed, 0 insertions(+), 0 deletions(-)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
rename {z => y}/d (100%)
Switched to branch 'B'
[B aa71186] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 z/f
ok 21 - 4a-setup: Directory split, with original directory still present
expecting success:
(
cd 4a &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 5 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
HEAD:y/b HEAD:y/c HEAD:y/d HEAD:z/e HEAD:z/f &&
git rev-parse >expect \
O:z/b O:z/c O:z/d O:z/e B:z/f &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 9c11b44 A
Merging:
9c11b44 A
virtual B^0
found 1 common ancestor:
9e2ca6f O
Skipped y/d (merged same as existing)
Skipped y/c (merged same as existing)
Skipped y/b (merged same as existing)
Merge made by the 'recursive' strategy.
z/f | 1 +
1 file changed, 1 insertion(+)
create mode 100644 z/f
ok 22 - 4a-check: Directory split, with original directory still present
expecting success:
test_create_repo 5a &&
(
cd 5a &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
mkdir y &&
echo d >y/d &&
git add z y &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
echo e1 >z/e &&
echo f >z/f &&
echo e2 >y/e &&
git add z/e z/f y/e &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv z/b y/ &&
git mv z/c y/ &&
rmdir z &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/5a/.git/
[master (root-commit) 828128d] O
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 y/d
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A b42bf3c] A
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 y/e
create mode 100644 z/e
create mode 100644 z/f
Switched to branch 'B'
[B 2a8bd7d] B
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
ok 23 - 5a-setup: Merge directories, other side adds files to original and target
expecting success:
(
cd 5a &&
git checkout A^0 &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
test_i18ngrep "CONFLICT.*implicit dir rename" out &&
git ls-files -s >out &&
test_line_count = 6 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
:0:y/b :0:y/c :0:y/d :0:y/e :0:z/e :0:y/f &&
git rev-parse >expect \
O:z/b O:z/c O:y/d A:y/e A:z/e A:z/f &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at b42bf3c A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (implicit dir rename): Existing file/dir at y/e in the way of implicit directory rename(s) putting the following path(s) there: z/e.
ok 24 - 5a-check: Merge directories, other side adds files to original and target
expecting success:
test_create_repo 5b &&
(
cd 5b &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
echo d1 >z/d &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git rm z/d &&
git mv z y &&
echo d2 >y/d &&
git add y/d &&
test_tick &&
git commit -m "A" &&
git checkout B &&
mkdir y &&
echo d3 >y/d &&
echo e >z/e &&
git add y/d z/e &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/5b/.git/
[master (root-commit) 66a9911] O
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
create mode 100644 z/d
Switched to branch 'A'
rm 'z/d'
[A f5563b5] A
Author: A U Thor <author@example.com>
4 files changed, 1 insertion(+), 1 deletion(-)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
create mode 100644 y/d
delete mode 100644 z/d
Switched to branch 'B'
[B 5ac66d1] B
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 y/d
create mode 100644 z/e
ok 25 - 5b-setup: Rename/delete in order to get add/add/add conflict
expecting success:
(
cd 5b &&
git checkout A^0 &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
test_i18ngrep "CONFLICT (add/add).* y/d" out &&
git ls-files -s >out &&
test_line_count = 5 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
:0:y/b :0:y/c :0:y/e :2:y/d :3:y/d &&
git rev-parse >expect \
O:z/b O:z/c B:z/e A:y/d B:y/d &&
test_cmp expect actual &&
test_must_fail git rev-parse :1:y/d &&
test_path_is_file y/d
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at f5563b5 A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (add/add): Merge conflict in y/d
fatal: Path 'y/d' is in the index, but not at stage 1.
Did you mean ':2:y/d'?
:1:y/d
ok 26 - 5b-check: Rename/delete in order to get add/add/add conflict
expecting success:
test_create_repo 5c &&
(
cd 5c &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
mkdir x &&
echo d1 >x/d &&
git add z x &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z y &&
echo d2 >y/d &&
git add y/d &&
git mv x w &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv x/d z/ &&
mkdir w &&
mkdir y &&
echo d3 >w/d &&
echo d4 >y/d &&
echo e >z/e &&
git add w/ y/ z/e &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/5c/.git/
[master (root-commit) cb15013] O
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 x/d
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A b27f493] A
Author: A U Thor <author@example.com>
4 files changed, 1 insertion(+)
rename {x => w}/d (100%)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
create mode 100644 y/d
Switched to branch 'B'
[B 535e6b3] B
Author: A U Thor <author@example.com>
4 files changed, 3 insertions(+)
create mode 100644 w/d
create mode 100644 y/d
rename {x => z}/d (100%)
create mode 100644 z/e
ok 27 - 5c-setup: Transitive rename would cause rename/rename/rename/add/add/add
expecting success:
(
cd 5c &&
git checkout A^0 &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
test_i18ngrep "CONFLICT (rename/rename).*x/d.*w/d.*z/d" out &&
test_i18ngrep "CONFLICT (add/add).* y/d" out &&
git ls-files -s >out &&
test_line_count = 9 out &&
git ls-files -u >out &&
test_line_count = 6 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
:0:y/b :0:y/c :0:y/e &&
git rev-parse >expect \
O:z/b O:z/c B:z/e &&
test_cmp expect actual &&
test_must_fail git rev-parse :1:y/d &&
git rev-parse >actual \
:2:w/d :3:w/d :1:x/d :2:y/d :3:y/d :3:z/d &&
git rev-parse >expect \
O:x/d B:w/d O:x/d A:y/d B:y/d O:x/d &&
test_cmp expect actual &&
git hash-object >actual \
z/d &&
git rev-parse >expect \
O:x/d &&
test_cmp expect actual &&
test_path_is_missing x/d &&
test_path_is_file y/d &&
grep -q "<<<<" y/d # conflict markers should be present
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at b27f493 A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (rename/rename): Rename "x/d"->"w/d" in branch "HEAD" rename "x/d"->"z/d" in "B^0"
CONFLICT (add/add): Merge conflict in y/d
fatal: Path 'y/d' is in the index, but not at stage 1.
Did you mean ':2:y/d'?
:1:y/d
ok 28 - 5c-check: Transitive rename would cause rename/rename/rename/add/add/add
expecting success:
test_create_repo 5d &&
(
cd 5d &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z y &&
echo d1 >y/d &&
git add y/d &&
test_tick &&
git commit -m "A" &&
git checkout B &&
mkdir -p y/d &&
echo e >y/d/e &&
echo d2 >z/d &&
echo f >z/f &&
git add y/d/e z/d z/f &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/5d/.git/
[master (root-commit) 4e96174] O
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A ecc7afe] A
Author: A U Thor <author@example.com>
3 files changed, 1 insertion(+)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
create mode 100644 y/d
Switched to branch 'B'
[B 67e12ad] B
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 y/d/e
create mode 100644 z/d
create mode 100644 z/f
ok 29 - 5d-setup: Directory/file/file conflict due to directory rename
expecting success:
(
cd 5d &&
git checkout A^0 &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
test_i18ngrep "CONFLICT (file/directory).*y/d" out &&
git ls-files -s >out &&
test_line_count = 6 out &&
git ls-files -u >out &&
test_line_count = 1 out &&
git ls-files -o >out &&
test_line_count = 2 out &&
git rev-parse >actual \
:0:y/b :0:y/c :0:z/d :0:y/f :2:y/d :0:y/d/e &&
git rev-parse >expect \
O:z/b O:z/c B:z/d B:z/f A:y/d B:y/d/e &&
test_cmp expect actual &&
git hash-object y/d~HEAD >actual &&
git rev-parse A:y/d >expect &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at ecc7afe A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (file/directory): There is a directory with name y/d in B^0. Adding y/d as y/d~HEAD
ok 30 - 5d-check: Directory/file/file conflict due to directory rename
expecting success:
test_create_repo 6a &&
(
cd 6a &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
echo d >z/d &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git rm z/c &&
git rm z/d &&
test_tick &&
git commit -m "A" &&
git checkout B &&
mkdir y &&
git mv z/b y/ &&
git mv z/c y/ &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/6a/.git/
[master (root-commit) 6c15033] O
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
create mode 100644 z/d
Switched to branch 'A'
rm 'z/c'
rm 'z/d'
[A 1476532] A
Author: A U Thor <author@example.com>
2 files changed, 2 deletions(-)
delete mode 100644 z/c
delete mode 100644 z/d
Switched to branch 'B'
[B 53c1aba] B
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
ok 31 - 6a-setup: Tricky rename/delete
expecting success:
(
cd 6a &&
git checkout A^0 &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
test_i18ngrep "CONFLICT (rename/delete).*z/c.*y/c" out &&
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 1 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
:0:y/b :3:y/c &&
git rev-parse >expect \
O:z/b O:z/c &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 1476532 A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (rename/delete): z/c deleted in HEAD and renamed to y/c in B^0. Version B^0 of y/c left in tree.
ok 32 - 6a-check: Tricky rename/delete
expecting success:
test_create_repo 6b &&
(
cd 6b &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z y &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv z y &&
mkdir z &&
echo d >z/d &&
git add z/d &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/6b/.git/
[master (root-commit) 4e96174] O
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A 4e9f86d] A
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
Switched to branch 'B'
[B 6ea17b2] B
Author: A U Thor <author@example.com>
3 files changed, 1 insertion(+)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
create mode 100644 z/d
ok 33 - 6b-setup: Same rename done on both sides
expecting success:
(
cd 6b &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
HEAD:y/b HEAD:y/c HEAD:z/d &&
git rev-parse >expect \
O:z/b O:z/c B:z/d &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 4e9f86d A
Merging:
4e9f86d A
virtual B^0
found 1 common ancestor:
4e96174 O
Skipped y/c (merged same as existing)
Skipped y/b (merged same as existing)
Merge made by the 'recursive' strategy.
z/d | 1 +
1 file changed, 1 insertion(+)
create mode 100644 z/d
ok 34 - 6b-check: Same rename done on both sides
expecting success:
test_create_repo 6c &&
(
cd 6c &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
test_tick &&
git commit --allow-empty -m "A" &&
git checkout B &&
git mv z y &&
mkdir z &&
echo d >z/d &&
git add z/d &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/6c/.git/
[master (root-commit) 4e96174] O
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A 405f2b4] A
Author: A U Thor <author@example.com>
Switched to branch 'B'
[B 6ea17b2] B
Author: A U Thor <author@example.com>
3 files changed, 1 insertion(+)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
create mode 100644 z/d
ok 35 - 6c-setup: Rename only done on same side
expecting success:
(
cd 6c &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
HEAD:y/b HEAD:y/c HEAD:z/d &&
git rev-parse >expect \
O:z/b O:z/c B:z/d &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 405f2b4 A
Merging:
405f2b4 A
virtual B^0
found 1 common ancestor:
4e96174 O
Merge made by the 'recursive' strategy.
{z => y}/b | 0
{z => y}/c | 0
z/d | 1 +
3 files changed, 1 insertion(+)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
create mode 100644 z/d
ok 36 - 6c-check: Rename only done on same side
expecting success:
test_create_repo 6d &&
(
cd 6d &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
mkdir x &&
echo d >x/d &&
git add z x &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
test_tick &&
git commit --allow-empty -m "A" &&
git checkout B &&
git mv z y &&
git mv x z &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/6d/.git/
[master (root-commit) 1e3967e] O
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 x/d
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A 1491553] A
Author: A U Thor <author@example.com>
Switched to branch 'B'
[B add22d4] B
Author: A U Thor <author@example.com>
3 files changed, 0 insertions(+), 0 deletions(-)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
rename {x => z}/d (100%)
ok 37 - 6d-setup: We do not always want transitive renaming
expecting success:
(
cd 6d &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
HEAD:y/b HEAD:y/c HEAD:z/d &&
git rev-parse >expect \
O:z/b O:z/c O:x/d &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 1491553 A
Merging:
1491553 A
virtual B^0
found 1 common ancestor:
1e3967e O
Merge made by the 'recursive' strategy.
{z => y}/b | 0
{z => y}/c | 0
{x => z}/d | 0
3 files changed, 0 insertions(+), 0 deletions(-)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
rename {x => z}/d (100%)
ok 38 - 6d-check: We do not always want transitive renaming
expecting success:
test_create_repo 6e &&
(
cd 6e &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
test_tick &&
git commit --allow-empty -m "A" &&
git checkout B &&
git mv z y &&
echo d1 > y/d &&
mkdir z &&
echo d2 > z/d &&
git add y/d z/d &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/6e/.git/
[master (root-commit) 4e96174] O
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A 405f2b4] A
Author: A U Thor <author@example.com>
Switched to branch 'B'
[B c2a120e] B
Author: A U Thor <author@example.com>
4 files changed, 2 insertions(+)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
create mode 100644 y/d
create mode 100644 z/d
ok 39 - 6e-setup: Add/add from one side
expecting success:
(
cd 6e &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 4 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
HEAD:y/b HEAD:y/c HEAD:y/d HEAD:z/d &&
git rev-parse >expect \
O:z/b O:z/c B:y/d B:z/d &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 405f2b4 A
Merging:
405f2b4 A
virtual B^0
found 1 common ancestor:
4e96174 O
Merge made by the 'recursive' strategy.
{z => y}/b | 0
{z => y}/c | 0
y/d | 1 +
z/d | 1 +
4 files changed, 2 insertions(+)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
create mode 100644 y/d
create mode 100644 z/d
ok 40 - 6e-check: Add/add from one side
expecting success:
test_create_repo 7a &&
(
cd 7a &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z y &&
test_tick &&
git commit -m "A" &&
git checkout B &&
mkdir w &&
mkdir x &&
git mv z/b w/ &&
git mv z/c x/ &&
echo d > z/d &&
git add z/d &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/7a/.git/
[master (root-commit) 4e96174] O
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A 4e9f86d] A
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
Switched to branch 'B'
[B e02cee0] B
Author: A U Thor <author@example.com>
3 files changed, 1 insertion(+)
rename {z => w}/b (100%)
rename {z => x}/c (100%)
create mode 100644 z/d
ok 41 - 7a-setup: rename-dir vs. rename-dir (NOT split evenly) PLUS add-other-file
expecting success:
(
cd 7a &&
git checkout A^0 &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
test_i18ngrep "CONFLICT (rename/rename).*z/b.*y/b.*w/b" out &&
test_i18ngrep "CONFLICT (rename/rename).*z/c.*y/c.*x/c" out &&
git ls-files -s >out &&
test_line_count = 7 out &&
git ls-files -u >out &&
test_line_count = 6 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
:1:z/b :2:y/b :3:w/b :1:z/c :2:y/c :3:x/c :0:y/d &&
git rev-parse >expect \
O:z/b O:z/b O:z/b O:z/c O:z/c O:z/c B:z/d &&
test_cmp expect actual &&
git hash-object >actual \
y/b w/b y/c x/c &&
git rev-parse >expect \
O:z/b O:z/b O:z/c O:z/c &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 4e9f86d A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (rename/rename): Rename "z/b"->"y/b" in branch "HEAD" rename "z/b"->"w/b" in "B^0"
CONFLICT (rename/rename): Rename "z/c"->"y/c" in branch "HEAD" rename "z/c"->"x/c" in "B^0"
ok 42 - 7a-check: rename-dir vs. rename-dir (NOT split evenly) PLUS add-other-file
expecting success:
test_create_repo 7b &&
(
cd 7b &&
mkdir z &&
mkdir x &&
mkdir w &&
echo b >z/b &&
echo c >z/c &&
echo d1 > x/d &&
echo d2 > w/d &&
git add z x w &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z y &&
git mv w/d y/ &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv x/d z/ &&
rmdir x &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/7b/.git/
[master (root-commit) 3a7ba74] O
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 w/d
create mode 100644 x/d
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A 0808992] A
Author: A U Thor <author@example.com>
3 files changed, 0 insertions(+), 0 deletions(-)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
rename {w => y}/d (100%)
Switched to branch 'B'
[B 946a998] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename {x => z}/d (100%)
ok 43 - 7b-setup: rename/rename(2to1), but only due to transitive rename
expecting success:
(
cd 7b &&
git checkout A^0 &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
test_i18ngrep "CONFLICT (rename/rename)" out &&
git ls-files -s >out &&
test_line_count = 4 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
:0:y/b :0:y/c :2:y/d :3:y/d &&
git rev-parse >expect \
O:z/b O:z/c O:w/d O:x/d &&
test_cmp expect actual &&
# Test that the two-way merge in y/d is as expected
git cat-file -p :2:y/d >expect &&
git cat-file -p :3:y/d >other &&
>empty &&
test_must_fail git merge-file \
-L "HEAD" \
-L "" \
-L "B^0" \
expect empty other &&
test_cmp expect y/d
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 0808992 A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (rename/rename): Rename w/d->y/d in HEAD. Rename x/d->y/d in B^0
ok 44 - 7b-check: rename/rename(2to1), but only due to transitive rename
expecting success:
test_create_repo 7c &&
(
cd 7c &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
mkdir x &&
echo d >x/d &&
git add z x &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z y &&
git mv x w &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv x/d z/ &&
rmdir x &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/7c/.git/
[master (root-commit) 1e3967e] O
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 x/d
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A 1e0f8cf] A
Author: A U Thor <author@example.com>
3 files changed, 0 insertions(+), 0 deletions(-)
rename {x => w}/d (100%)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
Switched to branch 'B'
[B c9f07f0] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename {x => z}/d (100%)
ok 45 - 7c-setup: rename/rename(1to...2or3); transitive rename may add complexity
expecting success:
(
cd 7c &&
git checkout A^0 &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
test_i18ngrep "CONFLICT (rename/rename).*x/d.*w/d.*y/d" out &&
git ls-files -s >out &&
test_line_count = 5 out &&
git ls-files -u >out &&
test_line_count = 3 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
:0:y/b :0:y/c :1:x/d :2:w/d :3:y/d &&
git rev-parse >expect \
O:z/b O:z/c O:x/d O:x/d O:x/d &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 1e0f8cf A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (rename/rename): Rename "x/d"->"w/d" in branch "HEAD" rename "x/d"->"y/d" in "B^0"
ok 46 - 7c-check: rename/rename(1to...2or3); transitive rename may add complexity
expecting success:
test_create_repo 7d &&
(
cd 7d &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
mkdir x &&
echo d >x/d &&
git add z x &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z y &&
git rm -rf x &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv x/d z/ &&
rmdir x &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/7d/.git/
[master (root-commit) 1e3967e] O
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 x/d
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
rm 'x/d'
[A 202563c] A
Author: A U Thor <author@example.com>
3 files changed, 1 deletion(-)
delete mode 100644 x/d
rename {z => y}/b (100%)
rename {z => y}/c (100%)
Switched to branch 'B'
[B c9f07f0] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename {x => z}/d (100%)
ok 47 - 7d-setup: transitive rename involved in rename/delete; how is it reported?
expecting success:
(
cd 7d &&
git checkout A^0 &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
test_i18ngrep "CONFLICT (rename/delete).*x/d.*y/d" out &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 1 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
:0:y/b :0:y/c :3:y/d &&
git rev-parse >expect \
O:z/b O:z/c O:x/d &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 202563c A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (rename/delete): x/d deleted in HEAD and renamed to y/d in B^0. Version B^0 of y/d left in tree.
ok 48 - 7d-check: transitive rename involved in rename/delete; how is it reported?
expecting success:
test_create_repo 7e &&
(
cd 7e &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
mkdir x &&
echo d1 >x/d &&
git add z x &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z y &&
git rm x/d &&
mkdir -p x/d &&
mkdir -p y/d &&
echo f >x/d/f &&
echo g >y/d/g &&
git add x/d/f y/d/g &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv x/d z/ &&
rmdir x &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/7e/.git/
[master (root-commit) cb15013] O
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 x/d
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
rm 'x/d'
[A 3ba9059] A
Author: A U Thor <author@example.com>
5 files changed, 2 insertions(+), 1 deletion(-)
delete mode 100644 x/d
create mode 100644 x/d/f
rename {z => y}/b (100%)
rename {z => y}/c (100%)
create mode 100644 y/d/g
Switched to branch 'B'
[B 0710b4b] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename {x => z}/d (100%)
ok 49 - 7e-setup: transitive rename in rename/delete AND dirs in the way
expecting success:
(
cd 7e &&
git checkout A^0 &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
test_i18ngrep "CONFLICT (rename/delete).*x/d.*y/d" out &&
git ls-files -s >out &&
test_line_count = 5 out &&
git ls-files -u >out &&
test_line_count = 1 out &&
git ls-files -o >out &&
test_line_count = 2 out &&
git rev-parse >actual \
:0:x/d/f :0:y/d/g :0:y/b :0:y/c :3:y/d &&
git rev-parse >expect \
A:x/d/f A:y/d/g O:z/b O:z/c O:x/d &&
test_cmp expect actual &&
git hash-object y/d~B^0 >actual &&
git rev-parse O:x/d >expect &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 3ba9059 A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (rename/delete): x/d deleted in HEAD and renamed to y/d in B^0. Version B^0 of y/d left in tree at y/d~B^0.
ok 50 - 7e-check: transitive rename in rename/delete AND dirs in the way
expecting success:
test_create_repo 8a &&
(
cd 8a &&
mkdir x &&
mkdir y &&
echo a >x/a &&
echo b >x/b &&
echo c >y/c &&
echo d >y/d &&
git add x y &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
echo e >x/e &&
echo f >y/f &&
git add x/e y/f &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv y z &&
git mv x y &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/8a/.git/
[master (root-commit) 644420a] O
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 x/a
create mode 100644 x/b
create mode 100644 y/c
create mode 100644 y/d
Switched to branch 'A'
[A 6afefa0] A
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 x/e
create mode 100644 y/f
Switched to branch 'B'
[B ccdb287] B
Author: A U Thor <author@example.com>
4 files changed, 0 insertions(+), 0 deletions(-)
rename {x => y}/a (100%)
rename {x => y}/b (100%)
rename {y => z}/c (100%)
rename {y => z}/d (100%)
ok 51 - 8a-setup: Dual-directory rename, one into the others way
expecting success:
(
cd 8a &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 6 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
HEAD:y/a HEAD:y/b HEAD:y/e HEAD:y/f HEAD:z/c HEAD:z/d &&
git rev-parse >expect \
O:x/a O:x/b A:x/e A:y/f O:y/c O:y/d &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 6afefa0 A
Merging:
6afefa0 A
virtual B^0
found 1 common ancestor:
644420a O
Path updated: x/e added in HEAD inside a directory that was renamed in B^0; moving it to y/e.
Merge made by the 'recursive' strategy.
{x => y}/a | 0
{x => y}/b | 0
{x => y}/e | 0
{y => z}/c | 0
{y => z}/d | 0
5 files changed, 0 insertions(+), 0 deletions(-)
rename {x => y}/a (100%)
rename {x => y}/b (100%)
rename {x => y}/e (100%)
rename {y => z}/c (100%)
rename {y => z}/d (100%)
ok 52 - 8a-check: Dual-directory rename, one into the others way
expecting success:
test_create_repo 8b &&
(
cd 8b &&
mkdir x &&
mkdir y &&
echo a1 >x/a &&
echo b1 >x/b &&
echo a2 >y/a &&
echo b2 >y/b &&
git add x y &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
echo e1 >x/e &&
echo e2 >y/e &&
git add x/e y/e &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv y z &&
git mv x y &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/8b/.git/
[master (root-commit) d95116f] O
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 x/a
create mode 100644 x/b
create mode 100644 y/a
create mode 100644 y/b
Switched to branch 'A'
[A 8d5e46a] A
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 x/e
create mode 100644 y/e
Switched to branch 'B'
[B a7bdbf9] B
Author: A U Thor <author@example.com>
6 files changed, 4 insertions(+), 4 deletions(-)
delete mode 100644 x/a
delete mode 100644 x/b
create mode 100644 z/a
create mode 100644 z/b
ok 53 - 8b-setup: Dual-directory rename, one into the others way, with conflicting filenames
expecting success:
(
cd 8b &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 6 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
HEAD:y/a HEAD:y/b HEAD:z/a HEAD:z/b HEAD:x/e HEAD:y/e &&
git rev-parse >expect \
O:x/a O:x/b O:y/a O:y/b A:x/e A:y/e &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8d5e46a A
Merging:
8d5e46a A
virtual B^0
found 1 common ancestor:
d95116f O
Removing x/b
Removing x/a
Merge made by the 'recursive' strategy.
x/a | 1 -
x/b | 1 -
y/a | 2 +-
y/b | 2 +-
z/a | 1 +
z/b | 1 +
6 files changed, 4 insertions(+), 4 deletions(-)
delete mode 100644 x/a
delete mode 100644 x/b
create mode 100644 z/a
create mode 100644 z/b
ok 54 - 8b-check: Dual-directory rename, one into the others way, with conflicting filenames
expecting success:
test_create_repo 8c &&
(
cd 8c &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
test_seq 1 10 >z/d &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git rm z/d &&
git mv z y &&
test_tick &&
git commit -m "A" &&
git checkout B &&
echo 11 >z/d &&
test_chmod +x z/d &&
echo e >z/e &&
git add z/d z/e &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/8c/.git/
[master (root-commit) a8ba9b3] O
Author: A U Thor <author@example.com>
3 files changed, 12 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
create mode 100644 z/d
Switched to branch 'A'
rm 'z/d'
[A d5ba1c0] A
Author: A U Thor <author@example.com>
3 files changed, 10 deletions(-)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
delete mode 100644 z/d
Switched to branch 'B'
[B 1757e3f] B
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 10 deletions(-)
mode change 100644 => 100755 z/d
create mode 100644 z/e
ok 55 - 8c-setup: modify/delete or rename+modify/delete?
expecting success:
(
cd 8c &&
git checkout A^0 &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
test_i18ngrep "CONFLICT (modify/delete).* z/d" out &&
git ls-files -s >out &&
test_line_count = 5 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
:0:y/b :0:y/c :0:y/e :1:z/d :3:z/d &&
git rev-parse >expect \
O:z/b O:z/c B:z/e O:z/d B:z/d &&
test_cmp expect actual &&
test_must_fail git rev-parse :2:z/d &&
git ls-files -s z/d | grep ^100755 &&
test_path_is_file z/d &&
test_path_is_missing y/d
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d5ba1c0 A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (modify/delete): z/d deleted in HEAD and modified in B^0. Version B^0 of z/d left in tree.
fatal: Path 'z/d' is in the index, but not at stage 2.
Did you mean ':1:z/d'?
:2:z/d
100755 b4de3947675361a7770d29b8982c407b0ec6b2a0 3 z/d
ok 56 - 8c-check: modify/delete or rename+modify/delete
expecting success:
test_create_repo 8d &&
(
cd 8d &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
test_seq 1 10 >z/d &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git rm z/d &&
git mv z y &&
test_tick &&
git commit -m "A" &&
git checkout B &&
echo e >z/e &&
git add z/e &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/8d/.git/
[master (root-commit) a8ba9b3] O
Author: A U Thor <author@example.com>
3 files changed, 12 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
create mode 100644 z/d
Switched to branch 'A'
rm 'z/d'
[A d5ba1c0] A
Author: A U Thor <author@example.com>
3 files changed, 10 deletions(-)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
delete mode 100644 z/d
Switched to branch 'B'
[B 12eaccc] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 z/e
ok 57 - 8d-setup: rename/delete...or not?
expecting success:
(
cd 8d &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git rev-parse >actual \
HEAD:y/b HEAD:y/c HEAD:y/e &&
git rev-parse >expect \
O:z/b O:z/c B:z/e &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d5ba1c0 A
Merging:
d5ba1c0 A
virtual B^0
found 1 common ancestor:
a8ba9b3 O
Path updated: z/e added in B^0 inside a directory that was renamed in HEAD; moving it to y/e.
Skipped y/c (merged same as existing)
Skipped y/b (merged same as existing)
Merge made by the 'recursive' strategy.
y/e | 1 +
1 file changed, 1 insertion(+)
create mode 100644 y/e
ok 58 - 8d-check: rename/delete...or not?
expecting success:
test_create_repo 8e &&
(
cd 8e &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z y &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv z w &&
mkdir z &&
echo d >z/d &&
git add z/d &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/8e/.git/
[master (root-commit) 4e96174] O
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A 4e9f86d] A
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
Switched to branch 'B'
[B 7a02f25] B
Author: A U Thor <author@example.com>
3 files changed, 1 insertion(+)
rename {z => w}/b (100%)
rename {z => w}/c (100%)
create mode 100644 z/d
ok 59 - 8e-setup: Both sides rename, one side adds to original directory
expecting success:
(
cd 8e &&
git checkout A^0 &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
test_i18ngrep CONFLICT.*rename/rename.*z/c.*y/c.*w/c out &&
test_i18ngrep CONFLICT.*rename/rename.*z/b.*y/b.*w/b out &&
git ls-files -s >out &&
test_line_count = 7 out &&
git ls-files -u >out &&
test_line_count = 6 out &&
git ls-files -o >out &&
test_line_count = 2 out &&
git rev-parse >actual \
:1:z/b :2:y/b :3:w/b :1:z/c :2:y/c :3:w/c :0:y/d &&
git rev-parse >expect \
O:z/b O:z/b O:z/b O:z/c O:z/c O:z/c B:z/d &&
test_cmp expect actual &&
git hash-object >actual \
y/b w/b y/c w/c &&
git rev-parse >expect \
O:z/b O:z/b O:z/c O:z/c &&
test_cmp expect actual &&
test_path_is_missing z/b &&
test_path_is_missing z/c
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 4e9f86d A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
CONFLICT (rename/rename): Rename "z/c"->"y/c" in branch "HEAD" rename "z/c"->"w/c" in "B^0"
CONFLICT (rename/rename): Rename "z/b"->"y/b" in branch "HEAD" rename "z/b"->"w/b" in "B^0"
ok 60 - 8e-check: Both sides rename, one side adds to original directory
expecting success:
test_create_repo 9a &&
(
cd 9a &&
mkdir -p z/d &&
echo b >z/b &&
echo c >z/c &&
echo e >z/d/e &&
echo f >z/d/f &&
echo g >z/d/g &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
mkdir x &&
git mv z/d x/w &&
git mv z y &&
test_tick &&
git commit -m "A" &&
git checkout B &&
echo h >z/d/h &&
echo i >z/i &&
git add z &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/9a/.git/
[master (root-commit) ad6f8a2] O
Author: A U Thor <author@example.com>
5 files changed, 5 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
create mode 100644 z/d/e
create mode 100644 z/d/f
create mode 100644 z/d/g
Switched to branch 'A'
[A 9bfe686] A
Author: A U Thor <author@example.com>
5 files changed, 0 insertions(+), 0 deletions(-)
rename {z/d => x/w}/e (100%)
rename {z/d => x/w}/f (100%)
rename {z/d => x/w}/g (100%)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
Switched to branch 'B'
[B 004af77] B
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 z/d/h
create mode 100644 z/i
ok 61 - 9a-setup: Inner renamed directory within outer renamed directory
expecting success:
(
cd 9a &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 7 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
HEAD:y/b HEAD:y/c HEAD:y/i &&
git rev-parse >expect \
O:z/b O:z/c B:z/i &&
test_cmp expect actual &&
git rev-parse >actual \
HEAD:x/w/e HEAD:x/w/f HEAD:x/w/g HEAD:x/w/h &&
git rev-parse >expect \
O:z/d/e O:z/d/f O:z/d/g B:z/d/h &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 9bfe686 A
Merging:
9bfe686 A
virtual B^0
found 1 common ancestor:
ad6f8a2 O
Path updated: z/i added in B^0 inside a directory that was renamed in HEAD; moving it to y/i.
Skipped y/c (merged same as existing)
Skipped y/b (merged same as existing)
Path updated: z/d/h added in B^0 inside a directory that was renamed in HEAD; moving it to x/w/h.
Skipped x/w/g (merged same as existing)
Skipped x/w/f (merged same as existing)
Skipped x/w/e (merged same as existing)
Merge made by the 'recursive' strategy.
x/w/h | 1 +
y/i | 1 +
2 files changed, 2 insertions(+)
create mode 100644 x/w/h
create mode 100644 y/i
ok 62 - 9a-check: Inner renamed directory within outer renamed directory
expecting success:
test_create_repo 9b &&
(
cd 9b &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
mkdir x &&
test_seq 1 10 >x/d &&
git add z x &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z y &&
test_seq 1 11 >x/d &&
git add x/d &&
test_tick &&
git commit -m "A" &&
git checkout B &&
test_seq 0 10 >x/d &&
git mv x/d z/d &&
git add z/d &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/9b/.git/
[master (root-commit) f84ec32] O
Author: A U Thor <author@example.com>
3 files changed, 12 insertions(+)
create mode 100644 x/d
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A a2010ab] A
Author: A U Thor <author@example.com>
3 files changed, 1 insertion(+)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
Switched to branch 'B'
[B ded5d1d] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rename {x => z}/d (91%)
ok 63 - 9b-setup: Transitive rename with content merge
expecting success:
(
cd 9b &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
test_seq 0 11 >expected &&
test_cmp expected y/d &&
git add expected &&
git rev-parse >actual \
HEAD:y/b HEAD:y/c HEAD:y/d &&
git rev-parse >expect \
O:z/b O:z/c :0:expected &&
test_cmp expect actual &&
test_must_fail git rev-parse HEAD:x/d &&
test_must_fail git rev-parse HEAD:z/d &&
test_path_is_missing z/d &&
test $(git rev-parse HEAD:y/d) != $(git rev-parse O:x/d) &&
test $(git rev-parse HEAD:y/d) != $(git rev-parse A:x/d) &&
test $(git rev-parse HEAD:y/d) != $(git rev-parse B:z/d)
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at a2010ab A
Merging:
a2010ab A
virtual B^0
found 1 common ancestor:
f84ec32 O
Path updated: x/d renamed to z/d in B^0, inside a directory that was renamed in HEAD; moving it to y/d.
Auto-merging y/d
Skipped y/c (merged same as existing)
Skipped y/b (merged same as existing)
Merge made by the 'recursive' strategy.
{x => y}/d | 1 +
1 file changed, 1 insertion(+)
rename {x => y}/d (92%)
fatal: Path 'x/d' does not exist in 'HEAD'
HEAD:x/d
fatal: Path 'z/d' does not exist in 'HEAD'
HEAD:z/d
ok 64 - 9b-check: Transitive rename with content merge
expecting success:
test_create_repo 9c &&
(
cd 9c &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
mkdir x &&
echo d >x/d &&
echo e >x/e &&
mkdir w &&
echo f >w/f &&
git add z x w &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z y &&
git mv w/f x/ &&
echo g >x/g &&
git add x/g &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv x/d z/d &&
git mv x/e z/e &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/9c/.git/
[master (root-commit) f3e903b] O
Author: A U Thor <author@example.com>
5 files changed, 5 insertions(+)
create mode 100644 w/f
create mode 100644 x/d
create mode 100644 x/e
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A 8a6c5f2] A
Author: A U Thor <author@example.com>
4 files changed, 1 insertion(+)
rename {w => x}/f (100%)
create mode 100644 x/g
rename {z => y}/b (100%)
rename {z => y}/c (100%)
Switched to branch 'B'
[B 3f509fc] B
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {x => z}/d (100%)
rename {x => z}/e (100%)
ok 65 - 9c-setup: Doubly transitive rename?
expecting success:
(
cd 9c &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
test_i18ngrep "WARNING: Avoiding applying x -> z rename to x/f" out &&
git ls-files -s >out &&
test_line_count = 6 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
HEAD:y/b HEAD:y/c HEAD:y/d HEAD:y/e HEAD:x/f HEAD:x/g &&
git rev-parse >expect \
O:z/b O:z/c O:x/d O:x/e O:w/f A:x/g &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8a6c5f2 A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
WARNING: Avoiding applying x -> z rename to x/f, because z itself was renamed.
ok 66 - 9c-check: Doubly transitive rename?
expecting success:
test_create_repo 9d &&
(
cd 9d &&
mkdir z y x w v u &&
echo a >z/a &&
echo b >y/b &&
echo c >x/c &&
echo d >w/d &&
echo e >v/e &&
echo f >u/f &&
git add z y x w v u &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z/a y/ &&
git mv x/c w/ &&
git mv v/e u/ &&
test_tick &&
git commit -m "A" &&
git checkout B &&
echo t >z/t &&
git mv y/b x/ &&
git mv w/d v/ &&
git add z/t &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/9d/.git/
[master (root-commit) a77ae1c] O
Author: A U Thor <author@example.com>
6 files changed, 6 insertions(+)
create mode 100644 u/f
create mode 100644 v/e
create mode 100644 w/d
create mode 100644 x/c
create mode 100644 y/b
create mode 100644 z/a
Switched to branch 'A'
[A 67d374b] A
Author: A U Thor <author@example.com>
3 files changed, 0 insertions(+), 0 deletions(-)
rename {v => u}/e (100%)
rename {x => w}/c (100%)
rename {z => y}/a (100%)
Switched to branch 'B'
[B 9c7db88] B
Author: A U Thor <author@example.com>
3 files changed, 1 insertion(+)
rename {w => v}/d (100%)
rename {y => x}/b (100%)
create mode 100644 z/t
ok 67 - 9d-setup: N-way transitive rename?
expecting success:
(
cd 9d &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
test_i18ngrep "WARNING: Avoiding applying z -> y rename to z/t" out &&
test_i18ngrep "WARNING: Avoiding applying y -> x rename to y/a" out &&
test_i18ngrep "WARNING: Avoiding applying x -> w rename to x/b" out &&
test_i18ngrep "WARNING: Avoiding applying w -> v rename to w/c" out &&
git ls-files -s >out &&
test_line_count = 7 out &&
git ls-files -o >out &&
test_line_count = 1 out &&
git rev-parse >actual \
HEAD:z/t \
HEAD:y/a HEAD:x/b HEAD:w/c \
HEAD:u/d HEAD:u/e HEAD:u/f &&
git rev-parse >expect \
B:z/t \
O:z/a O:y/b O:x/c \
O:w/d O:v/e A:u/f &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 67d374b A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
WARNING: Avoiding applying z -> y rename to z/t, because y itself was renamed.
WARNING: Avoiding applying y -> x rename to y/a, because x itself was renamed.
WARNING: Avoiding applying x -> w rename to x/b, because w itself was renamed.
WARNING: Avoiding applying w -> v rename to w/c, because v itself was renamed.
ok 68 - 9d-check: N-way transitive rename?
expecting success:
test_create_repo 9e &&
(
cd 9e &&
mkdir dir1 dir2 dir3 dirN &&
echo a >dir1/a &&
echo b >dir1/b &&
echo d >dir2/d &&
echo e >dir2/e &&
echo g >dir3/g &&
echo h >dir3/h &&
echo j >dirN/j &&
echo k >dirN/k &&
git add dir* &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
echo c >dir1/c &&
echo yo >dir1/yo &&
echo f >dir2/f &&
echo yo >dir2/yo &&
echo i >dir3/i &&
echo yo >dir3/yo &&
echo l >dirN/l &&
echo yo >dirN/yo &&
git add dir* &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv dir1 combined &&
git mv dir2/* combined/ &&
git mv dir3/* combined/ &&
git mv dirN/* combined/ &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/9e/.git/
[master (root-commit) 6b1b942] O
Author: A U Thor <author@example.com>
8 files changed, 8 insertions(+)
create mode 100644 dir1/a
create mode 100644 dir1/b
create mode 100644 dir2/d
create mode 100644 dir2/e
create mode 100644 dir3/g
create mode 100644 dir3/h
create mode 100644 dirN/j
create mode 100644 dirN/k
Switched to branch 'A'
[A 1129f61] A
Author: A U Thor <author@example.com>
8 files changed, 8 insertions(+)
create mode 100644 dir1/c
create mode 100644 dir1/yo
create mode 100644 dir2/f
create mode 100644 dir2/yo
create mode 100644 dir3/i
create mode 100644 dir3/yo
create mode 100644 dirN/l
create mode 100644 dirN/yo
Switched to branch 'B'
[B e5547de] B
Author: A U Thor <author@example.com>
8 files changed, 0 insertions(+), 0 deletions(-)
rename {dir1 => combined}/a (100%)
rename {dir1 => combined}/b (100%)
rename {dir2 => combined}/d (100%)
rename {dir2 => combined}/e (100%)
rename {dir3 => combined}/g (100%)
rename {dir3 => combined}/h (100%)
rename {dirN => combined}/j (100%)
rename {dirN => combined}/k (100%)
ok 69 - 9e-setup: N-to-1 whammo
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
expecting success:
(
cd 9e &&
git checkout A^0 &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out &&
grep "CONFLICT (implicit dir rename): Cannot map more than one path to combined/yo" out >error_line &&
grep -q dir1/yo error_line &&
grep -q dir2/yo error_line &&
grep -q dir3/yo error_line &&
grep -q dirN/yo error_line &&
git ls-files -s >out &&
test_line_count = 16 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 2 out &&
git rev-parse >actual \
:0:combined/a :0:combined/b :0:combined/c \
:0:combined/d :0:combined/e :0:combined/f \
:0:combined/g :0:combined/h :0:combined/i \
:0:combined/j :0:combined/k :0:combined/l &&
git rev-parse >expect \
O:dir1/a O:dir1/b A:dir1/c \
O:dir2/d O:dir2/e A:dir2/f \
O:dir3/g O:dir3/h A:dir3/i \
O:dirN/j O:dirN/k A:dirN/l &&
test_cmp expect actual &&
git rev-parse >actual \
:0:dir1/yo :0:dir2/yo :0:dir3/yo :0:dirN/yo &&
git rev-parse >expect \
A:dir1/yo A:dir2/yo A:dir3/yo A:dirN/yo &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 1129f61 A
ok 70 - 9e-check: N-to-1 whammo
expecting success:
test_create_repo 9f &&
(
cd 9f &&
mkdir -p goal/a &&
mkdir -p goal/b &&
echo foo >goal/a/foo &&
echo bar >goal/b/bar &&
echo baz >goal/b/baz &&
git add goal &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv goal/ priority &&
test_tick &&
git commit -m "A" &&
git checkout B &&
echo c >goal/c &&
git add goal/c &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/9f/.git/
[master (root-commit) 6480e53] O
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 goal/a/foo
create mode 100644 goal/b/bar
create mode 100644 goal/b/baz
Switched to branch 'A'
[A 96c4122] A
Author: A U Thor <author@example.com>
3 files changed, 0 insertions(+), 0 deletions(-)
rename {goal => priority}/a/foo (100%)
rename {goal => priority}/b/bar (100%)
rename {goal => priority}/b/baz (100%)
Switched to branch 'B'
[B 08998f4] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 goal/c
ok 71 - 9f-setup: Renamed directory that only contained immediate subdirs
expecting success:
(
cd 9f &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 4 out &&
git rev-parse >actual \
HEAD:priority/a/foo \
HEAD:priority/b/bar \
HEAD:priority/b/baz \
HEAD:priority/c &&
git rev-parse >expect \
O:goal/a/foo \
O:goal/b/bar \
O:goal/b/baz \
B:goal/c &&
test_cmp expect actual &&
test_must_fail git rev-parse HEAD:goal/c
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 96c4122 A
Merging:
96c4122 A
virtual B^0
found 1 common ancestor:
6480e53 O
Path updated: goal/c added in B^0 inside a directory that was renamed in HEAD; moving it to priority/c.
Skipped priority/b/baz (merged same as existing)
Skipped priority/b/bar (merged same as existing)
Skipped priority/a/foo (merged same as existing)
Merge made by the 'recursive' strategy.
priority/c | 1 +
1 file changed, 1 insertion(+)
create mode 100644 priority/c
fatal: Path 'goal/c' does not exist in 'HEAD'
HEAD:goal/c
ok 72 - 9f-check: Renamed directory that only contained immediate subdirs
expecting success:
test_create_repo 9g &&
(
cd 9g &&
mkdir -p goal/a &&
mkdir -p goal/b &&
echo foo >goal/a/foo &&
echo bar >goal/b/bar &&
echo baz >goal/b/baz &&
git add goal &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
mkdir priority &&
git mv goal/a/ priority/alpha &&
git mv goal/b/ priority/beta &&
rmdir goal/ &&
test_tick &&
git commit -m "A" &&
git checkout B &&
echo c >goal/c &&
git add goal/c &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/9g/.git/
[master (root-commit) 6480e53] O
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 goal/a/foo
create mode 100644 goal/b/bar
create mode 100644 goal/b/baz
Switched to branch 'A'
[A f7fdc05] A
Author: A U Thor <author@example.com>
3 files changed, 0 insertions(+), 0 deletions(-)
rename {goal/a => priority/alpha}/foo (100%)
rename {goal/b => priority/beta}/bar (100%)
rename {goal/b => priority/beta}/baz (100%)
Switched to branch 'B'
[B 08998f4] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 goal/c
ok 73 - 9g-setup: Renamed directory that only contained immediate subdirs, immediate subdirs renamed
checking known breakage:
(
cd 9g &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 4 out &&
git rev-parse >actual \
HEAD:priority/alpha/foo \
HEAD:priority/beta/bar \
HEAD:priority/beta/baz \
HEAD:priority/c &&
git rev-parse >expect \
O:goal/a/foo \
O:goal/b/bar \
O:goal/b/baz \
B:goal/c &&
test_cmp expect actual &&
test_must_fail git rev-parse HEAD:goal/c
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at f7fdc05 A
Merging:
f7fdc05 A
virtual B^0
found 1 common ancestor:
6480e53 O
Skipped priority/beta/baz (merged same as existing)
Skipped priority/beta/bar (merged same as existing)
Skipped priority/alpha/foo (merged same as existing)
Merge made by the 'recursive' strategy.
goal/c | 1 +
1 file changed, 1 insertion(+)
create mode 100644 goal/c
fatal: Path 'priority/c' does not exist in 'HEAD'
not ok 74 - 9g-check: Renamed directory that only contained immediate subdirs, immediate subdirs renamed # TODO known breakage
expecting success:
test_create_repo 9h &&
(
cd 9h &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
printf "1\n2\n3\n4\n5\n6\n7\n8\nd\n" >z/d &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
test_tick &&
echo more >>z/d &&
git add z/d &&
git commit -m "A" &&
git checkout B &&
mkdir y &&
mkdir x &&
git mv z/b y/ &&
git mv z/c y/ &&
git mv z/d x/ &&
rmdir z &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/9h/.git/
[master (root-commit) 714b322] O
Author: A U Thor <author@example.com>
3 files changed, 11 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
create mode 100644 z/d
Switched to branch 'A'
[A d51a99d] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'B'
[B 0435868] B
Author: A U Thor <author@example.com>
3 files changed, 0 insertions(+), 0 deletions(-)
rename {z => x}/d (100%)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
ok 75 - 9h-setup: Avoid dir rename on merely modified path
expecting success:
(
cd 9h &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git rev-parse >actual \
HEAD:y/b HEAD:y/c HEAD:x/d &&
git rev-parse >expect \
O:z/b O:z/c A:z/d &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at d51a99d A
Merging:
d51a99d A
virtual B^0
found 1 common ancestor:
714b322 O
Merge made by the 'recursive' strategy.
{z => x}/d | 0
{z => y}/b | 0
{z => y}/c | 0
3 files changed, 0 insertions(+), 0 deletions(-)
rename {z => x}/d (100%)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
ok 76 - 9h-check: Avoid dir rename on merely modified path
expecting success:
test_create_repo 10a &&
(
cd 10a &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git rm z/c &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv z/c z/d &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/10a/.git/
[master (root-commit) 4e96174] O
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
rm 'z/c'
[A bc21cd8] A
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 z/c
Switched to branch 'B'
[B 7bb44f1] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename z/{c => d} (100%)
ok 77 - 10a-setup: Overwrite untracked with normal rename/delete
expecting success:
(
cd 10a &&
git checkout A^0 &&
echo very >z/c &&
echo important >z/d &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
test_i18ngrep "The following untracked working tree files would be overwritten by merge" err &&
git ls-files -s >out &&
test_line_count = 1 out &&
git ls-files -o >out &&
test_line_count = 4 out &&
echo very >expect &&
test_cmp expect z/c &&
echo important >expect &&
test_cmp expect z/d &&
git rev-parse HEAD:z/b >actual &&
git rev-parse O:z/b >expect &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at bc21cd8 A
error: The following untracked working tree files would be overwritten by merge:
ok 78 - 10a-check: Overwrite untracked with normal rename/delete
expecting success:
test_create_repo 10b &&
(
cd 10b &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git rm z/c &&
git mv z/ y/ &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv z/c z/d &&
echo e >z/e &&
git add z/e &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/10b/.git/
[master (root-commit) 4e96174] O
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
rm 'z/c'
[A 3a1dd27] A
Author: A U Thor <author@example.com>
2 files changed, 1 deletion(-)
rename {z => y}/b (100%)
delete mode 100644 z/c
Switched to branch 'B'
[B 13c0b2e] B
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
rename z/{c => d} (100%)
create mode 100644 z/e
ok 79 - 10b-setup: Overwrite untracked with dir rename + delete
expecting success:
(
cd 10b &&
git checkout A^0 &&
echo very >y/c &&
echo important >y/d &&
echo contents >y/e &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
test_i18ngrep "CONFLICT (rename/delete).*Version B\^0 of y/d left in tree at y/d~B\^0" out &&
test_i18ngrep "Error: Refusing to lose untracked file at y/e; writing to y/e~B\^0 instead" out &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 5 out &&
git rev-parse >actual \
:0:y/b :3:y/d :3:y/e &&
git rev-parse >expect \
O:z/b O:z/c B:z/e &&
test_cmp expect actual &&
echo very >expect &&
test_cmp expect y/c &&
echo important >expect &&
test_cmp expect y/d &&
echo contents >expect &&
test_cmp expect y/e
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 3a1dd27 A
CONFLICT (rename/delete): z/c deleted in HEAD and renamed to y/d in B^0. Version B^0 of y/d left in tree at y/d~B^0.
Error: Refusing to lose untracked file at y/e; writing to y/e~B^0 instead.
ok 80 - 10b-check: Overwrite untracked with dir rename + delete
expecting success:
test_create_repo 10c &&
(
cd 10c &&
mkdir z x &&
echo a >z/a &&
echo b >z/b &&
echo c >x/c &&
echo d >x/d &&
git add z x &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
mkdir w &&
git mv x/c w/c &&
git mv z/ y/ &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv x/c z/ &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/10c/.git/
[master (root-commit) 1ee9006] O
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 x/c
create mode 100644 x/d
create mode 100644 z/a
create mode 100644 z/b
Switched to branch 'A'
[A e6a4b22] A
Author: A U Thor <author@example.com>
3 files changed, 0 insertions(+), 0 deletions(-)
rename {x => w}/c (100%)
rename {z => y}/a (100%)
rename {z => y}/b (100%)
Switched to branch 'B'
[B b8dbf85] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename {x => z}/c (100%)
ok 81 - 10c-setup: Overwrite untracked with dir rename/rename(1to2)
expecting success:
(
cd 10c &&
git checkout A^0 &&
echo important >y/c &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
test_i18ngrep "CONFLICT (rename/rename)" out &&
test_i18ngrep "Refusing to lose untracked file at y/c; adding as y/c~B\^0 instead" out &&
git ls-files -s >out &&
test_line_count = 6 out &&
git ls-files -u >out &&
test_line_count = 3 out &&
git ls-files -o >out &&
test_line_count = 3 out &&
git rev-parse >actual \
:0:y/a :0:y/b :0:x/d :1:x/c :2:w/c :3:y/c &&
git rev-parse >expect \
O:z/a O:z/b O:x/d O:x/c O:x/c O:x/c &&
test_cmp expect actual &&
git hash-object y/c~B^0 >actual &&
git rev-parse O:x/c >expect &&
test_cmp expect actual &&
echo important >expect &&
test_cmp expect y/c
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at e6a4b22 A
CONFLICT (rename/rename): Rename "x/c"->"w/c" in branch "HEAD" rename "x/c"->"y/c" in "B^0"
Refusing to lose untracked file at y/c; adding as y/c~B^0 instead
ok 82 - 10c-check: Overwrite untracked with dir rename/rename(1to2)
expecting success:
(
cd 10c &&
git reset --hard &&
git clean -fdqx &&
git checkout B^0 &&
mkdir y &&
echo important >y/c &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive A^0 >out 2>err &&
test_i18ngrep "CONFLICT (rename/rename)" out &&
test_i18ngrep "Refusing to lose untracked file at y/c; adding as y/c~HEAD instead" out &&
git ls-files -s >out &&
test_line_count = 6 out &&
git ls-files -u >out &&
test_line_count = 3 out &&
git ls-files -o >out &&
test_line_count = 3 out &&
git rev-parse >actual \
:0:y/a :0:y/b :0:x/d :1:x/c :3:w/c :2:y/c &&
git rev-parse >expect \
O:z/a O:z/b O:x/d O:x/c O:x/c O:x/c &&
test_cmp expect actual &&
git hash-object y/c~HEAD >actual &&
git rev-parse O:x/c >expect &&
test_cmp expect actual &&
echo important >expect &&
test_cmp expect y/c
)
HEAD is now at e6a4b22 A
Previous HEAD position was e6a4b22 A
HEAD is now at b8dbf85 B
CONFLICT (rename/rename): Rename "x/c"->"y/c" in branch "HEAD" rename "x/c"->"w/c" in "A^0"
Refusing to lose untracked file at y/c; adding as y/c~HEAD instead
ok 83 - 10c-check: Overwrite untracked with dir rename/rename(1to2), other direction
expecting success:
test_create_repo 10d &&
(
cd 10d &&
mkdir z x &&
echo a >z/a &&
echo b >z/b &&
echo c >z/c &&
echo d >x/d &&
echo e >x/e &&
echo f >x/f &&
git add z x &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z/c x/wham &&
git mv z/ y/ &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv x/f z/wham &&
git mv x/ y/ &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/10d/.git/
[master (root-commit) 1a4b546] O
Author: A U Thor <author@example.com>
6 files changed, 6 insertions(+)
create mode 100644 x/d
create mode 100644 x/e
create mode 100644 x/f
create mode 100644 z/a
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A 9f961af] A
Author: A U Thor <author@example.com>
3 files changed, 0 insertions(+), 0 deletions(-)
rename z/c => x/wham (100%)
rename {z => y}/a (100%)
rename {z => y}/b (100%)
Switched to branch 'B'
[B 6a20b58] B
Author: A U Thor <author@example.com>
3 files changed, 0 insertions(+), 0 deletions(-)
rename {x => y}/d (100%)
rename {x => y}/e (100%)
rename x/f => z/wham (100%)
ok 84 - 10d-setup: Delete untracked with dir rename/rename(2to1)
expecting success:
(
cd 10d &&
git checkout A^0 &&
echo important >y/wham &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
test_i18ngrep "CONFLICT (rename/rename)" out &&
test_i18ngrep "Refusing to lose untracked file at y/wham" out &&
git ls-files -s >out &&
test_line_count = 6 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 3 out &&
git rev-parse >actual \
:0:y/a :0:y/b :0:y/d :0:y/e :2:y/wham :3:y/wham &&
git rev-parse >expect \
O:z/a O:z/b O:x/d O:x/e O:z/c O:x/f &&
test_cmp expect actual &&
test_must_fail git rev-parse :1:y/wham &&
echo important >expect &&
test_cmp expect y/wham &&
# Test that the two-way merge in y/wham~merged is as expected
git cat-file -p :2:y/wham >expect &&
git cat-file -p :3:y/wham >other &&
>empty &&
test_must_fail git merge-file \
-L "HEAD" \
-L "" \
-L "B^0" \
expect empty other &&
test_cmp expect y/wham~merged
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 9f961af A
CONFLICT (rename/rename): Rename z/c->y/wham in HEAD. Rename x/f->y/wham in B^0
Refusing to lose untracked file at y/wham, even though it's in the way.
fatal: Path 'y/wham' is in the index, but not at stage 1.
Did you mean ':2:y/wham'?
:1:y/wham
ok 85 - 10d-check: Delete untracked with dir rename/rename(2to1)
expecting success:
test_create_repo 10e &&
(
cd 10e &&
mkdir z &&
echo a >z/a &&
echo b >z/b &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z/ y/ &&
test_tick &&
git commit -m "A" &&
git checkout B &&
echo c >z/c &&
git add z/c &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/10e/.git/
[master (root-commit) 75ee182] O
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 z/a
create mode 100644 z/b
Switched to branch 'A'
[A ac1ed31] A
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {z => y}/a (100%)
rename {z => y}/b (100%)
Switched to branch 'B'
[B 095ac3d] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 z/c
ok 86 - 10e-setup: Does git complain about untracked file that is not really in the way?
checking known breakage:
(
cd 10e &&
git checkout A^0 &&
mkdir z &&
echo random >z/c &&
git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
test_i18ngrep ! "following untracked working tree files would be overwritten by merge" err &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 3 out &&
git rev-parse >actual \
:0:y/a :0:y/b :0:y/c &&
git rev-parse >expect \
O:z/a O:z/b B:z/c &&
test_cmp expect actual &&
echo random >expect &&
test_cmp expect z/c
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at ac1ed31 A
not ok 87 - 10e-check: Does git complain about untracked file that is not really in the way? # TODO known breakage
expecting success:
test_create_repo 11a &&
(
cd 11a &&
mkdir z &&
echo a >z/a &&
test_seq 1 10 >z/b &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z/b z/c &&
test_tick &&
git commit -m "A" &&
git checkout B &&
echo 11 >>z/b &&
git add z/b &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/11a/.git/
[master (root-commit) d2da13d] O
Author: A U Thor <author@example.com>
2 files changed, 11 insertions(+)
create mode 100644 z/a
create mode 100644 z/b
Switched to branch 'A'
[A 7a0ff52] A
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename z/{b => c} (100%)
Switched to branch 'B'
[B b7a4243] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 88 - 11a-setup: Avoid losing dirty contents with simple rename
expecting success:
(
cd 11a &&
git checkout A^0 &&
echo stuff >>z/c &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
test_i18ngrep "Refusing to lose dirty file at z/c" out &&
test_seq 1 10 >expected &&
echo stuff >>expected &&
test_cmp expected z/c &&
git ls-files -s >out &&
test_line_count = 2 out &&
git ls-files -u >out &&
test_line_count = 1 out &&
git ls-files -o >out &&
test_line_count = 4 out &&
git rev-parse >actual \
:0:z/a :2:z/c &&
git rev-parse >expect \
O:z/a B:z/b &&
test_cmp expect actual &&
git hash-object z/c~HEAD >actual &&
git rev-parse B:z/b >expect &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 7a0ff52 A
Refusing to lose dirty file at z/c
ok 89 - 11a-check: Avoid losing dirty contents with simple rename
expecting success:
test_create_repo 11b &&
(
cd 11b &&
mkdir z x &&
echo a >z/a &&
echo b >x/b &&
test_seq 1 10 >x/c &&
git add z x &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv x/c z/c &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv z y &&
echo 11 >>x/c &&
git add x/c &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/11b/.git/
[master (root-commit) 8ba0ed2] O
Author: A U Thor <author@example.com>
3 files changed, 12 insertions(+)
create mode 100644 x/b
create mode 100644 x/c
create mode 100644 z/a
Switched to branch 'A'
[A 331ae41] A
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename {x => z}/c (100%)
Switched to branch 'B'
[B 0b664da] B
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
rename {z => y}/a (100%)
ok 90 - 11b-setup: Avoid losing dirty file involved in directory rename
expecting success:
(
cd 11b &&
git checkout A^0 &&
echo stuff >>z/c &&
git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
test_i18ngrep "Refusing to lose dirty file at z/c" out &&
grep -q stuff z/c &&
test_seq 1 10 >expected &&
echo stuff >>expected &&
test_cmp expected z/c &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -m >out &&
test_line_count = 0 out &&
git ls-files -o >out &&
test_line_count = 4 out &&
git rev-parse >actual \
:0:x/b :0:y/a :0:y/c &&
git rev-parse >expect \
O:x/b O:z/a B:x/c &&
test_cmp expect actual &&
git hash-object y/c >actual &&
git rev-parse B:x/c >expect &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 331ae41 A
Refusing to lose dirty file at z/c
ok 91 - 11b-check: Avoid losing dirty file involved in directory rename
expecting success:
test_create_repo 11c &&
(
cd 11c &&
mkdir y x &&
echo a >y/a &&
echo b >x/b &&
test_seq 1 10 >x/c &&
git add y x &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv x/c y/c &&
test_tick &&
git commit -m "A" &&
git checkout B &&
mkdir y/c &&
echo d >y/c/d &&
echo 11 >>x/c &&
git add x/c y/c/d &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/11c/.git/
[master (root-commit) c615350] O
Author: A U Thor <author@example.com>
3 files changed, 12 insertions(+)
create mode 100644 x/b
create mode 100644 x/c
create mode 100644 y/a
Switched to branch 'A'
[A b42d3e1] A
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename {x => y}/c (100%)
Switched to branch 'B'
[B 78faa62] B
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 y/c/d
ok 92 - 11c-setup: Avoid losing not-uptodate with rename + D/F conflict
expecting success:
(
cd 11c &&
git checkout A^0 &&
echo stuff >>y/c &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
test_i18ngrep "following files would be overwritten by merge" err &&
grep -q stuff y/c &&
test_seq 1 10 >expected &&
echo stuff >>expected &&
test_cmp expected y/c &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 0 out &&
git ls-files -m >out &&
test_line_count = 1 out &&
git ls-files -o >out &&
test_line_count = 3 out
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at b42d3e1 A
error: Your local changes to the following files would be overwritten by merge:
ok 93 - 11c-check: Avoid losing not-uptodate with rename + D/F conflict
expecting success:
test_create_repo 11d &&
(
cd 11d &&
mkdir z x &&
echo a >z/a &&
echo b >x/b &&
test_seq 1 10 >x/c &&
git add z x &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv x/c z/c &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv z y &&
mkdir y/c &&
echo d >y/c/d &&
echo 11 >>x/c &&
git add x/c y/c/d &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/11d/.git/
[master (root-commit) 8ba0ed2] O
Author: A U Thor <author@example.com>
3 files changed, 12 insertions(+)
create mode 100644 x/b
create mode 100644 x/c
create mode 100644 z/a
Switched to branch 'A'
[A 331ae41] A
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename {x => z}/c (100%)
Switched to branch 'B'
[B cbf14e5] B
Author: A U Thor <author@example.com>
3 files changed, 2 insertions(+)
rename {z => y}/a (100%)
create mode 100644 y/c/d
ok 94 - 11d-setup: Avoid losing not-uptodate with rename + D/F conflict
expecting success:
(
cd 11d &&
git checkout A^0 &&
echo stuff >>z/c &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
test_i18ngrep "Refusing to lose dirty file at z/c" out &&
grep -q stuff z/c &&
test_seq 1 10 >expected &&
echo stuff >>expected &&
test_cmp expected z/c &&
git ls-files -s >out &&
test_line_count = 4 out &&
git ls-files -u >out &&
test_line_count = 1 out &&
git ls-files -o >out &&
test_line_count = 5 out &&
git rev-parse >actual \
:0:x/b :0:y/a :0:y/c/d :3:y/c &&
git rev-parse >expect \
O:x/b O:z/a B:y/c/d B:x/c &&
test_cmp expect actual &&
git hash-object y/c~HEAD >actual &&
git rev-parse B:x/c >expect &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 331ae41 A
Refusing to lose dirty file at z/c
ok 95 - 11d-check: Avoid losing not-uptodate with rename + D/F conflict
expecting success:
test_create_repo 11e &&
(
cd 11e &&
mkdir z x &&
echo a >z/a &&
echo b >z/b &&
echo c >x/c &&
echo d >x/d &&
git add z x &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z/ y/ &&
echo different >y/c &&
mkdir w &&
git mv x/c w/ &&
git add y/c &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv x/c z/ &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/11e/.git/
[master (root-commit) 1ee9006] O
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 x/c
create mode 100644 x/d
create mode 100644 z/a
create mode 100644 z/b
Switched to branch 'A'
[A 0006594] A
Author: A U Thor <author@example.com>
4 files changed, 1 insertion(+)
rename {x => w}/c (100%)
rename {z => y}/a (100%)
rename {z => y}/b (100%)
create mode 100644 y/c
Switched to branch 'B'
[B b8dbf85] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename {x => z}/c (100%)
ok 96 - 11e-setup: Avoid deleting not-uptodate with dir rename/rename(1to2)/add
expecting success:
(
cd 11e &&
git checkout A^0 &&
echo mods >>y/c &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
test_i18ngrep "CONFLICT (rename/rename)" out &&
test_i18ngrep "Refusing to lose dirty file at y/c" out &&
git ls-files -s >out &&
test_line_count = 7 out &&
git ls-files -u >out &&
test_line_count = 4 out &&
git ls-files -o >out &&
test_line_count = 3 out &&
echo different >expected &&
echo mods >>expected &&
test_cmp expected y/c &&
git rev-parse >actual \
:0:y/a :0:y/b :0:x/d :1:x/c :2:w/c :2:y/c :3:y/c &&
git rev-parse >expect \
O:z/a O:z/b O:x/d O:x/c O:x/c A:y/c O:x/c &&
test_cmp expect actual &&
# See if y/c~merged has expected contents; requires manually
# doing the expected file merge
git cat-file -p A:y/c >c1 &&
git cat-file -p B:z/c >c2 &&
>empty &&
test_must_fail git merge-file \
-L "HEAD" \
-L "" \
-L "B^0" \
c1 empty c2 &&
test_cmp c1 y/c~merged
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 0006594 A
CONFLICT (rename/rename): Rename "x/c"->"w/c" in branch "HEAD" rename "x/c"->"y/c" in "B^0"
Refusing to lose dirty file at y/c
ok 97 - 11e-check: Avoid deleting not-uptodate with dir rename/rename(1to2)/add
expecting success:
test_create_repo 11f &&
(
cd 11f &&
mkdir z x &&
echo a >z/a &&
echo b >z/b &&
test_seq 1 10 >x/c &&
echo d >x/d &&
git add z x &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z/ y/ &&
git mv x/c y/wham &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv x/d z/wham &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/11f/.git/
[master (root-commit) 2274342] O
Author: A U Thor <author@example.com>
4 files changed, 13 insertions(+)
create mode 100644 x/c
create mode 100644 x/d
create mode 100644 z/a
create mode 100644 z/b
Switched to branch 'A'
[A 6299452] A
Author: A U Thor <author@example.com>
3 files changed, 0 insertions(+), 0 deletions(-)
rename {z => y}/a (100%)
rename {z => y}/b (100%)
rename x/c => y/wham (100%)
Switched to branch 'B'
[B 42fa76f] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename x/d => z/wham (100%)
ok 98 - 11f-setup: Avoid deleting not-uptodate with dir rename/rename(2to1)
expecting success:
(
cd 11f &&
git checkout A^0 &&
echo important >>y/wham &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
test_i18ngrep "CONFLICT (rename/rename)" out &&
test_i18ngrep "Refusing to lose dirty file at y/wham" out &&
git ls-files -s >out &&
test_line_count = 4 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
git ls-files -o >out &&
test_line_count = 3 out &&
test_seq 1 10 >expected &&
echo important >>expected &&
test_cmp expected y/wham &&
test_must_fail git rev-parse :1:y/wham &&
git rev-parse >actual \
:0:y/a :0:y/b :2:y/wham :3:y/wham &&
git rev-parse >expect \
O:z/a O:z/b O:x/c O:x/d &&
test_cmp expect actual &&
# Test that the two-way merge in y/wham~merged is as expected
git cat-file -p :2:y/wham >expect &&
git cat-file -p :3:y/wham >other &&
>empty &&
test_must_fail git merge-file \
-L "HEAD" \
-L "" \
-L "B^0" \
expect empty other &&
test_cmp expect y/wham~merged
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 6299452 A
CONFLICT (rename/rename): Rename x/c->y/wham in HEAD. Rename x/d->y/wham in B^0
Refusing to lose dirty file at y/wham
fatal: Path 'y/wham' is in the index, but not at stage 1.
Did you mean ':2:y/wham'?
:1:y/wham
ok 99 - 11f-check: Avoid deleting not-uptodate with dir rename/rename(2to1)
expecting success:
test_create_repo 12a &&
(
cd 12a &&
mkdir -p node1 node2 &&
echo leaf1 >node1/leaf1 &&
echo leaf2 >node1/leaf2 &&
echo leaf3 >node2/leaf3 &&
echo leaf4 >node2/leaf4 &&
git add node1 node2 &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv node2/ node1/ &&
test_tick &&
git commit -m "A" &&
git checkout B &&
echo leaf5 >node1/leaf5 &&
echo leaf6 >node2/leaf6 &&
git add node1 node2 &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/12a/.git/
[master (root-commit) 674d36e] O
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 node1/leaf1
create mode 100644 node1/leaf2
create mode 100644 node2/leaf3
create mode 100644 node2/leaf4
Switched to branch 'A'
[A 494e77b] A
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {node2 => node1/node2}/leaf3 (100%)
rename {node2 => node1/node2}/leaf4 (100%)
Switched to branch 'B'
[B 139a75f] B
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 node1/leaf5
create mode 100644 node2/leaf6
ok 100 - 12a-setup: Moving one directory hierarchy into another
expecting success:
(
cd 12a &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 6 out &&
git rev-parse >actual \
HEAD:node1/leaf1 HEAD:node1/leaf2 HEAD:node1/leaf5 \
HEAD:node1/node2/leaf3 \
HEAD:node1/node2/leaf4 \
HEAD:node1/node2/leaf6 &&
git rev-parse >expect \
O:node1/leaf1 O:node1/leaf2 B:node1/leaf5 \
O:node2/leaf3 \
O:node2/leaf4 \
B:node2/leaf6 &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 494e77b A
Merging:
494e77b A
virtual B^0
found 1 common ancestor:
674d36e O
Path updated: node2/leaf6 added in B^0 inside a directory that was renamed in HEAD; moving it to node1/node2/leaf6.
Skipped node1/node2/leaf4 (merged same as existing)
Skipped node1/node2/leaf3 (merged same as existing)
Merge made by the 'recursive' strategy.
node1/leaf5 | 1 +
node1/node2/leaf6 | 1 +
2 files changed, 2 insertions(+)
create mode 100644 node1/leaf5
create mode 100644 node1/node2/leaf6
ok 101 - 12a-check: Moving one directory hierarchy into another
expecting success:
test_create_repo 12b &&
(
cd 12b &&
mkdir -p node1 node2 &&
echo leaf1 >node1/leaf1 &&
echo leaf2 >node1/leaf2 &&
echo leaf3 >node2/leaf3 &&
echo leaf4 >node2/leaf4 &&
git add node1 node2 &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv node2/ node1/ &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv node1/ node2/ &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/12b/.git/
[master (root-commit) 674d36e] O
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 node1/leaf1
create mode 100644 node1/leaf2
create mode 100644 node2/leaf3
create mode 100644 node2/leaf4
Switched to branch 'A'
[A 494e77b] A
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {node2 => node1/node2}/leaf3 (100%)
rename {node2 => node1/node2}/leaf4 (100%)
Switched to branch 'B'
[B 634f1d4] B
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {node1 => node2/node1}/leaf1 (100%)
rename {node1 => node2/node1}/leaf2 (100%)
ok 102 - 12b-setup: Moving two directory hierarchies into each other
expecting success:
(
cd 12b &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -s >out &&
test_line_count = 4 out &&
git rev-parse >actual \
HEAD:node1/node2/node1/leaf1 \
HEAD:node1/node2/node1/leaf2 \
HEAD:node2/node1/node2/leaf3 \
HEAD:node2/node1/node2/leaf4 &&
git rev-parse >expect \
O:node1/leaf1 \
O:node1/leaf2 \
O:node2/leaf3 \
O:node2/leaf4 &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 494e77b A
Merging:
494e77b A
virtual B^0
found 1 common ancestor:
674d36e O
Path updated: node2/leaf4 renamed to node1/node2/leaf4 in HEAD, inside a directory that was renamed in B^0; moving it to node2/node1/node2/leaf4.
Path updated: node2/leaf3 renamed to node1/node2/leaf3 in HEAD, inside a directory that was renamed in B^0; moving it to node2/node1/node2/leaf3.
Path updated: node1/leaf2 renamed to node2/node1/leaf2 in B^0, inside a directory that was renamed in HEAD; moving it to node1/node2/node1/leaf2.
Path updated: node1/leaf1 renamed to node2/node1/leaf1 in B^0, inside a directory that was renamed in HEAD; moving it to node1/node2/node1/leaf1.
Merge made by the 'recursive' strategy.
node1/{ => node2/node1}/leaf1 | 0
node1/{ => node2/node1}/leaf2 | 0
{node1 => node2/node1}/node2/leaf3 | 0
{node1 => node2/node1}/node2/leaf4 | 0
4 files changed, 0 insertions(+), 0 deletions(-)
rename node1/{ => node2/node1}/leaf1 (100%)
rename node1/{ => node2/node1}/leaf2 (100%)
rename {node1 => node2/node1}/node2/leaf3 (100%)
rename {node1 => node2/node1}/node2/leaf4 (100%)
ok 103 - 12b-check: Moving two directory hierarchies into each other
expecting success:
test_create_repo 12c &&
(
cd 12c &&
mkdir -p node1 node2 &&
printf "1\n2\n3\n4\n5\n6\n7\n8\nleaf1\n" >node1/leaf1 &&
printf "1\n2\n3\n4\n5\n6\n7\n8\nleaf2\n" >node1/leaf2 &&
printf "1\n2\n3\n4\n5\n6\n7\n8\nleaf3\n" >node2/leaf3 &&
printf "1\n2\n3\n4\n5\n6\n7\n8\nleaf4\n" >node2/leaf4 &&
git add node1 node2 &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv node2/ node1/ &&
for i in `git ls-files`; do echo side A >>$i; done &&
git add -u &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv node1/ node2/ &&
for i in `git ls-files`; do echo side B >>$i; done &&
git add -u &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/12c/.git/
[master (root-commit) 0cf2f73] O
Author: A U Thor <author@example.com>
4 files changed, 36 insertions(+)
create mode 100644 node1/leaf1
create mode 100644 node1/leaf2
create mode 100644 node2/leaf3
create mode 100644 node2/leaf4
Switched to branch 'A'
[A 18ec7be] A
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
rename {node2 => node1/node2}/leaf3 (75%)
rename {node2 => node1/node2}/leaf4 (75%)
Switched to branch 'B'
[B 705044c] B
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
rename {node1 => node2/node1}/leaf1 (75%)
rename {node1 => node2/node1}/leaf2 (75%)
ok 104 - 12c-setup: Moving one directory hierarchy into another w/ content merge
expecting success:
(
cd 12c &&
git checkout A^0 &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 &&
git ls-files -u >out &&
test_line_count = 12 out &&
git rev-parse >actual \
:1:node1/node2/node1/leaf1 \
:1:node1/node2/node1/leaf2 \
:1:node2/node1/node2/leaf3 \
:1:node2/node1/node2/leaf4 \
:2:node1/node2/node1/leaf1 \
:2:node1/node2/node1/leaf2 \
:2:node2/node1/node2/leaf3 \
:2:node2/node1/node2/leaf4 \
:3:node1/node2/node1/leaf1 \
:3:node1/node2/node1/leaf2 \
:3:node2/node1/node2/leaf3 \
:3:node2/node1/node2/leaf4 &&
git rev-parse >expect \
O:node1/leaf1 \
O:node1/leaf2 \
O:node2/leaf3 \
O:node2/leaf4 \
A:node1/leaf1 \
A:node1/leaf2 \
A:node1/node2/leaf3 \
A:node1/node2/leaf4 \
B:node2/node1/leaf1 \
B:node2/node1/leaf2 \
B:node2/leaf3 \
B:node2/leaf4 &&
test_cmp expect actual
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 18ec7be A
Merging:
18ec7be A
virtual B^0
found 1 common ancestor:
0cf2f73 O
Path updated: node2/leaf4 renamed to node1/node2/leaf4 in HEAD, inside a directory that was renamed in B^0; moving it to node2/node1/node2/leaf4.
Auto-merging node2/node1/node2/leaf4
CONFLICT (content): Merge conflict in node2/node1/node2/leaf4
Path updated: node2/leaf3 renamed to node1/node2/leaf3 in HEAD, inside a directory that was renamed in B^0; moving it to node2/node1/node2/leaf3.
Auto-merging node2/node1/node2/leaf3
CONFLICT (content): Merge conflict in node2/node1/node2/leaf3
Path updated: node1/leaf2 renamed to node2/node1/leaf2 in B^0, inside a directory that was renamed in HEAD; moving it to node1/node2/node1/leaf2.
Auto-merging node1/node2/node1/leaf2
CONFLICT (content): Merge conflict in node1/node2/node1/leaf2
Path updated: node1/leaf1 renamed to node2/node1/leaf1 in B^0, inside a directory that was renamed in HEAD; moving it to node1/node2/node1/leaf1.
Auto-merging node1/node2/node1/leaf1
CONFLICT (content): Merge conflict in node1/node2/node1/leaf1
Automatic merge failed; fix conflicts and then commit the result.
ok 105 - 12c-check: Moving one directory hierarchy into another w/ content merge
expecting success:
test_create_repo 13a &&
(
cd 13a &&
mkdir z &&
echo b >z/b &&
echo c >z/c &&
git add z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z y &&
test_tick &&
git commit -m "A" &&
git checkout B &&
echo d >z/d &&
mkdir z/e &&
echo f >z/e/f &&
git add z/d z/e/f &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/13a/.git/
[master (root-commit) 4e96174] O
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A 4e9f86d] A
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
Switched to branch 'B'
[B aa97264] B
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 z/d
create mode 100644 z/e/f
ok 106 - 13a-setup: messages for newly added files
expecting success:
(
cd 13a &&
git checkout A^0 &&
test_must_fail git merge -s recursive B^0 >out 2>err &&
test_i18ngrep CONFLICT..file.location.*z/e/f.added.in.B^0.*y/e/f out &&
test_i18ngrep CONFLICT..file.location.*z/d.added.in.B^0.*y/d out &&
git ls-files >paths &&
! grep z/ paths &&
grep "y/[de]" paths &&
test_path_is_missing z/d &&
test_path_is_file y/d &&
test_path_is_missing z/e/f &&
test_path_is_file y/e/f
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 4e9f86d A
CONFLICT (file location): z/e/f added in B^0 inside a directory that was renamed in HEAD, suggesting it should perhaps be moved to y/e/f.
CONFLICT (file location): z/d added in B^0 inside a directory that was renamed in HEAD, suggesting it should perhaps be moved to y/d.
y/d
y/e/f
ok 107 - 13a-check(conflict): messages for newly added files
expecting success:
(
cd 13a &&
git reset --hard &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
test_i18ngrep Path.updated:.*z/e/f.added.in.B^0.*y/e/f out &&
test_i18ngrep Path.updated:.*z/d.added.in.B^0.*y/d out &&
git ls-files >paths &&
! grep z/ paths &&
grep "y/[de]" paths &&
test_path_is_missing z/d &&
test_path_is_file y/d &&
test_path_is_missing z/e/f &&
test_path_is_file y/e/f
)
HEAD is now at 4e9f86d A
HEAD is now at 4e9f86d A
Path updated: z/e/f added in B^0 inside a directory that was renamed in HEAD; moving it to y/e/f.
Path updated: z/d added in B^0 inside a directory that was renamed in HEAD; moving it to y/d.
y/d
y/e/f
ok 108 - 13a-check(info): messages for newly added files
expecting success:
test_create_repo 13b &&
(
cd 13b &&
mkdir x &&
mkdir z &&
test_seq 1 10 >x/d &&
echo b >z/b &&
echo c >z/c &&
git add x z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z y &&
echo 11 >>x/d &&
git add x/d &&
test_tick &&
git commit -m "A" &&
git checkout B &&
echo eleven >>x/d &&
git mv x/d z/d &&
git add z/d &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/13b/.git/
[master (root-commit) f84ec32] O
Author: A U Thor <author@example.com>
3 files changed, 12 insertions(+)
create mode 100644 x/d
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A a2010ab] A
Author: A U Thor <author@example.com>
3 files changed, 1 insertion(+)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
Switched to branch 'B'
[B cd61ab0] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rename {x => z}/d (75%)
ok 109 - 13b-setup: messages for transitive rename with conflicted content
expecting success:
(
cd 13b &&
git checkout A^0 &&
test_must_fail git merge -s recursive B^0 >out 2>err &&
test_i18ngrep CONFLICT.*content.*Merge.conflict.in.y/d out &&
test_i18ngrep CONFLICT..file.location.*x/d.renamed.to.z/d.*moved.to.y/d out &&
git ls-files >paths &&
! grep z/ paths &&
grep "y/d" paths &&
test_path_is_missing z/d &&
test_path_is_file y/d
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at a2010ab A
CONFLICT (content): Merge conflict in y/d
CONFLICT (file location): x/d renamed to z/d in B^0, inside a directory that was renamed in HEAD, suggesting it should perhaps be moved to y/d.
y/d
y/d
y/d
ok 110 - 13b-check(conflict): messages for transitive rename with conflicted content
expecting success:
(
cd 13b &&
git reset --hard &&
git checkout A^0 &&
test_must_fail git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
test_i18ngrep CONFLICT.*content.*Merge.conflict.in.y/d out &&
test_i18ngrep Path.updated:.*x/d.renamed.to.z/d.in.B^0.*moving.it.to.y/d out &&
git ls-files >paths &&
! grep z/ paths &&
grep "y/d" paths &&
test_path_is_missing z/d &&
test_path_is_file y/d
)
HEAD is now at a2010ab A
HEAD is now at a2010ab A
CONFLICT (content): Merge conflict in y/d
Path updated: x/d renamed to z/d in B^0, inside a directory that was renamed in HEAD; moving it to y/d.
y/d
y/d
y/d
ok 111 - 13b-check(info): messages for transitive rename with conflicted content
expecting success:
test_create_repo 13c &&
(
cd 13c &&
mkdir x &&
mkdir z &&
test_seq 1 10 >x/d &&
echo e >x/e &&
echo b >z/b &&
echo c >z/c &&
git add x z &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv z y &&
git mv x/d y/ &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv x/d z/d &&
git add z/d &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/13c/.git/
[master (root-commit) 868129a] O
Author: A U Thor <author@example.com>
4 files changed, 13 insertions(+)
create mode 100644 x/d
create mode 100644 x/e
create mode 100644 z/b
create mode 100644 z/c
Switched to branch 'A'
[A 230cc6a] A
Author: A U Thor <author@example.com>
3 files changed, 0 insertions(+), 0 deletions(-)
rename {z => y}/b (100%)
rename {z => y}/c (100%)
rename {x => y}/d (100%)
Switched to branch 'B'
[B e9512b7] B
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename {x => z}/d (100%)
ok 112 - 13c-setup: messages for rename/rename(1to1) via transitive rename
expecting success:
(
cd 13c &&
git checkout A^0 &&
test_must_fail git merge -s recursive B^0 >out 2>err &&
test_i18ngrep CONFLICT..file.location.*x/d.renamed.to.z/d.*moved.to.y/d out &&
git ls-files >paths &&
! grep z/ paths &&
grep "y/d" paths &&
test_path_is_missing z/d &&
test_path_is_file y/d
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 230cc6a A
CONFLICT (file location): x/d renamed to z/d in B^0, inside a directory that was renamed in HEAD, suggesting it should perhaps be moved to y/d.
y/d
ok 113 - 13c-check(conflict): messages for rename/rename(1to1) via transitive rename
expecting success:
(
cd 13c &&
git reset --hard &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
test_i18ngrep Path.updated:.*x/d.renamed.to.z/d.in.B^0.*moving.it.to.y/d out &&
git ls-files >paths &&
! grep z/ paths &&
grep "y/d" paths &&
test_path_is_missing z/d &&
test_path_is_file y/d
)
HEAD is now at 230cc6a A
HEAD is now at 230cc6a A
Path updated: x/d renamed to z/d in B^0, inside a directory that was renamed in HEAD; moving it to y/d.
y/d
ok 114 - 13c-check(info): messages for rename/rename(1to1) via transitive rename
expecting success:
test_create_repo 13d &&
(
cd 13d &&
mkdir a &&
mkdir b &&
mkdir c &&
echo z >a/z &&
echo y >a/y &&
echo x >b/x &&
echo w >c/w &&
git add a b c &&
test_tick &&
git commit -m "O" &&
git branch O &&
git branch A &&
git branch B &&
git checkout A &&
git mv a/y b/ &&
git mv c/ d/ &&
test_tick &&
git commit -m "A" &&
git checkout B &&
git mv a/y c/ &&
git mv b/ d/ &&
test_tick &&
git commit -m "B"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6043-merge-rename-directories/13d/.git/
[master (root-commit) c14d00a] O
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 a/y
create mode 100644 a/z
create mode 100644 b/x
create mode 100644 c/w
Switched to branch 'A'
[A e246998] A
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {a => b}/y (100%)
rename {c => d}/w (100%)
Switched to branch 'B'
[B 0624e26] B
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {a => c}/y (100%)
rename {b => d}/x (100%)
ok 115 - 13d-setup: messages for rename/rename(1to1) via dual transitive rename
expecting success:
(
cd 13d &&
git checkout A^0 &&
test_must_fail git merge -s recursive B^0 >out 2>err &&
test_i18ngrep CONFLICT..file.location.*a/y.renamed.to.b/y.*moved.to.d/y out &&
test_i18ngrep CONFLICT..file.location.*a/y.renamed.to.c/y.*moved.to.d/y out &&
git ls-files >paths &&
! grep b/ paths &&
! grep c/ paths &&
grep "d/y" paths &&
test_path_is_missing b/y &&
test_path_is_missing c/y &&
test_path_is_file d/y
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at e246998 A
CONFLICT (file location): a/y renamed to b/y in HEAD, inside a directory that was renamed in B^0, suggesting it should perhaps be moved to d/y.
CONFLICT (file location): a/y renamed to c/y in B^0, inside a directory that was renamed in HEAD, suggesting it should perhaps be moved to d/y.
d/y
ok 116 - 13d-check(conflict): messages for rename/rename(1to1) via dual transitive rename
expecting success:
(
cd 13d &&
git reset --hard &&
git checkout A^0 &&
git -c merge.directoryRenames=true merge -s recursive B^0 >out 2>err &&
test_i18ngrep Path.updated.*a/y.renamed.to.b/y.*moving.it.to.d/y out &&
test_i18ngrep Path.updated.*a/y.renamed.to.c/y.*moving.it.to.d/y out &&
git ls-files >paths &&
! grep b/ paths &&
! grep c/ paths &&
grep "d/y" paths &&
test_path_is_missing b/y &&
test_path_is_missing c/y &&
test_path_is_file d/y
)
HEAD is now at e246998 A
HEAD is now at e246998 A
Path updated: a/y renamed to b/y in HEAD, inside a directory that was renamed in B^0; moving it to d/y.
Path updated: a/y renamed to c/y in B^0, inside a directory that was renamed in HEAD; moving it to d/y.
d/y
ok 117 - 13d-check(info): messages for rename/rename(1to1) via dual transitive rename
# still have 2 known breakage(s)
# passed all remaining 115 test(s)
1..117
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6301-for-each-ref-errors.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6301-for-each-ref-errors/.git/
expecting success:
git commit --allow-empty -m "Initial" &&
git tag testtag &&
git for-each-ref >full-list &&
git for-each-ref --format="%(objectname) %(refname)" >brief-list
[master (root-commit) f45683e] Initial
Author: A U Thor <author@example.com>
ok 1 - setup
expecting success:
r=refs/heads/bogus &&
: >.git/$r &&
test_when_finished "rm -f .git/$r" &&
echo "warning: ignoring broken ref $r" >broken-err &&
git for-each-ref >out 2>err &&
test_i18ncmp full-list out &&
test_i18ncmp broken-err err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 2 - Broken refs are reported correctly
expecting success:
r=refs/heads/zeros &&
echo $ZEROS >.git/$r &&
test_when_finished "rm -f .git/$r" &&
echo "warning: ignoring broken ref $r" >zeros-err &&
git for-each-ref >out 2>err &&
test_cmp full-list out &&
test_i18ncmp zeros-err err &&
git for-each-ref --format="%(objectname) %(refname)" >brief-out 2>brief-err &&
test_cmp brief-list brief-out &&
test_i18ncmp zeros-err brief-err
ok 3 - NULL_SHA1 refs are reported correctly
expecting success:
r=refs/heads/missing &&
echo $MISSING >.git/$r &&
test_when_finished "rm -f .git/$r" &&
echo "fatal: missing object $MISSING for $r" >missing-err &&
test_must_fail git for-each-ref 2>err &&
test_i18ncmp missing-err err &&
(
cat brief-list &&
echo "$MISSING $r"
) | sort -k 2 >missing-brief-expected &&
git for-each-ref --format="%(objectname) %(refname)" >brief-out 2>brief-err &&
test_cmp missing-brief-expected brief-out &&
test_must_be_empty brief-err
ok 4 - Missing objects are reported correctly
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6302-for-each-ref-filter.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6302-for-each-ref-filter/.git/
expecting success:
test_commit one &&
test_commit two &&
test_commit three &&
git checkout -b side &&
test_commit four &&
git tag -m "An annotated tag" annotated-tag &&
git tag -m "Annonated doubly" doubly-annotated-tag annotated-tag &&
# Note that these "signed" tags might not actually be signed.
# Tests which care about the distinction should be marked
# with the GPG prereq.
if test_have_prereq GPG
then
sign=-s
else
sign=
fi &&
git tag $sign -m "A signed tag" signed-tag &&
git tag $sign -m "Signed doubly" doubly-signed-tag signed-tag &&
git checkout master &&
git update-ref refs/odd/spot master
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[master 7c7cd71] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
Switched to a new branch 'side'
[side fd8d77e] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 four.t
hint: You have created a nested tag. The object referred to by your new tag is
hint: already a tag. If you meant to tag the object that it points to, use:
hint:
hint: git tag -f doubly-annotated-tag annotated-tag^{}
hint: You have created a nested tag. The object referred to by your new tag is
hint: already a tag. If you meant to tag the object that it points to, use:
hint:
hint: git tag -f doubly-signed-tag signed-tag^{}
Switched to branch 'master'
ok 1 - setup some history and refs
expecting success:
cat >expect <<-\EOF &&
refs/heads/master
refs/odd/spot
refs/tags/three
EOF
git for-each-ref --format="%(refname)" --points-at=master >actual &&
test_cmp expect actual
ok 2 - filtering with --points-at
expecting success:
sed -e "s/Z$//" >expect <<-\EOF &&
refs/heads/side Z
refs/tags/annotated-tag four
refs/tags/four Z
refs/tags/signed-tag four
EOF
git for-each-ref --format="%(refname) %(*subject)" --points-at=side >actual &&
test_cmp expect actual
ok 3 - check signed tags with --points-at
expecting success:
cat >expect <<-\EOF &&
refs/heads/master
refs/odd/spot
refs/tags/one
refs/tags/three
refs/tags/two
EOF
git for-each-ref --format="%(refname)" --merged=master >actual &&
test_cmp expect actual
ok 4 - filtering with --merged
expecting success:
cat >expect <<-\EOF &&
refs/heads/side
refs/tags/annotated-tag
refs/tags/doubly-annotated-tag
refs/tags/doubly-signed-tag
refs/tags/four
refs/tags/signed-tag
EOF
git for-each-ref --format="%(refname)" --no-merged=master >actual &&
test_cmp expect actual
ok 5 - filtering with --no-merged
expecting success:
cat >expect <<-\EOF &&
refs/heads/master
refs/heads/side
refs/odd/spot
refs/tags/annotated-tag
refs/tags/doubly-annotated-tag
refs/tags/doubly-signed-tag
refs/tags/four
refs/tags/signed-tag
refs/tags/three
refs/tags/two
EOF
git for-each-ref --format="%(refname)" --contains=two >actual &&
test_cmp expect actual
ok 6 - filtering with --contains
expecting success:
cat >expect <<-\EOF &&
refs/tags/one
EOF
git for-each-ref --format="%(refname)" --no-contains=two >actual &&
test_cmp expect actual
ok 7 - filtering with --no-contains
expecting success:
cat >expect <<-\EOF &&
refs/tags/two
EOF
git for-each-ref --format="%(refname)" --contains=two --no-contains=three >actual &&
test_cmp expect actual
ok 8 - filtering with --contains and --no-contains
expecting success:
test_must_fail git for-each-ref --format="%(color)%(refname)"
fatal: expected format: %(color:<color>)
ok 9 - %(color) must fail
expecting success:
cat >expect <<-\EOF &&
refname is refs/heads/master |refs/heads/master
refname is refs/heads/side |refs/heads/side
refname is refs/odd/spot |refs/odd/spot
refname is refs/tags/annotated-tag|refs/tags/annotated-tag
refname is refs/tags/doubly-annotated-tag|refs/tags/doubly-annotated-tag
refname is refs/tags/doubly-signed-tag|refs/tags/doubly-signed-tag
refname is refs/tags/four |refs/tags/four
refname is refs/tags/one |refs/tags/one
refname is refs/tags/signed-tag|refs/tags/signed-tag
refname is refs/tags/three |refs/tags/three
refname is refs/tags/two |refs/tags/two
EOF
git for-each-ref --format="%(align:30)refname is %(refname)%(end)|%(refname)" >actual &&
test_cmp expect actual
ok 10 - left alignment is default
expecting success:
cat >expect <<-\EOF &&
| refname is refs/heads/master |refs/heads/master
| refname is refs/heads/side |refs/heads/side
| refname is refs/odd/spot |refs/odd/spot
|refname is refs/tags/annotated-tag|refs/tags/annotated-tag
|refname is refs/tags/doubly-annotated-tag|refs/tags/doubly-annotated-tag
|refname is refs/tags/doubly-signed-tag|refs/tags/doubly-signed-tag
| refname is refs/tags/four |refs/tags/four
| refname is refs/tags/one |refs/tags/one
|refname is refs/tags/signed-tag|refs/tags/signed-tag
| refname is refs/tags/three |refs/tags/three
| refname is refs/tags/two |refs/tags/two
EOF
git for-each-ref --format="|%(align:middle,30)refname is %(refname)%(end)|%(refname)" >actual &&
test_cmp expect actual
ok 11 - middle alignment
expecting success:
cat >expect <<-\EOF &&
| refname is refs/heads/master|refs/heads/master
| refname is refs/heads/side|refs/heads/side
| refname is refs/odd/spot|refs/odd/spot
|refname is refs/tags/annotated-tag|refs/tags/annotated-tag
|refname is refs/tags/doubly-annotated-tag|refs/tags/doubly-annotated-tag
|refname is refs/tags/doubly-signed-tag|refs/tags/doubly-signed-tag
| refname is refs/tags/four|refs/tags/four
| refname is refs/tags/one|refs/tags/one
|refname is refs/tags/signed-tag|refs/tags/signed-tag
| refname is refs/tags/three|refs/tags/three
| refname is refs/tags/two|refs/tags/two
EOF
git for-each-ref --format="|%(align:30,right)refname is %(refname)%(end)|%(refname)" >actual &&
test_cmp expect actual
ok 12 - right alignment
expecting success:
git for-each-ref --format="|%(align:$option)refname is %(refname)%(end)|%(refname)" >actual &&
test_cmp expect actual
ok 13 - align:middle,42
expecting success:
git for-each-ref --format="|%(align:$option)refname is %(refname)%(end)|%(refname)" >actual &&
test_cmp expect actual
ok 14 - align:42,middle
expecting success:
git for-each-ref --format="|%(align:$option)refname is %(refname)%(end)|%(refname)" >actual &&
test_cmp expect actual
ok 15 - align:position=middle,42
expecting success:
git for-each-ref --format="|%(align:$option)refname is %(refname)%(end)|%(refname)" >actual &&
test_cmp expect actual
ok 16 - align:42,position=middle
expecting success:
git for-each-ref --format="|%(align:$option)refname is %(refname)%(end)|%(refname)" >actual &&
test_cmp expect actual
ok 17 - align:middle,width=42
expecting success:
git for-each-ref --format="|%(align:$option)refname is %(refname)%(end)|%(refname)" >actual &&
test_cmp expect actual
ok 18 - align:width=42,middle
expecting success:
git for-each-ref --format="|%(align:$option)refname is %(refname)%(end)|%(refname)" >actual &&
test_cmp expect actual
ok 19 - align:position=middle,width=42
expecting success:
git for-each-ref --format="|%(align:$option)refname is %(refname)%(end)|%(refname)" >actual &&
test_cmp expect actual
ok 20 - align:width=42,position=middle
expecting success:
git for-each-ref --format="|%(align:$option)refname is %(refname)%(end)|%(refname)" >actual &&
test_cmp expect actual
ok 21 - align:32,width=42,middle
expecting success:
git for-each-ref --format="|%(align:$option)refname is %(refname)%(end)|%(refname)" >actual &&
test_cmp expect actual
ok 22 - align:width=30,42,middle
expecting success:
git for-each-ref --format="|%(align:$option)refname is %(refname)%(end)|%(refname)" >actual &&
test_cmp expect actual
ok 23 - align:width=42,position=right,middle
expecting success:
git for-each-ref --format="|%(align:$option)refname is %(refname)%(end)|%(refname)" >actual &&
test_cmp expect actual
ok 24 - align:42,right,position=middle
expecting success:
cat >expect <<-\EOF &&
|' '\''master| A U Thor'\'' '|
|' '\''side| A U Thor'\'' '|
|' '\''odd/spot| A U Thor'\'' '|
|' '\''annotated-tag| '\'' '|
|' '\''doubly-annotated-tag| '\'' '|
|' '\''doubly-signed-tag| '\'' '|
|' '\''four| A U Thor'\'' '|
|' '\''one| A U Thor'\'' '|
|' '\''signed-tag| '\'' '|
|' '\''three| A U Thor'\'' '|
|' '\''two| A U Thor'\'' '|
EOF
git for-each-ref --shell --format="|%(align:30,middle)'%(refname:short)| %(authorname)'%(end)|" >actual &&
test_cmp expect actual
ok 25 - alignment with format quote
expecting success:
cat >expect <<-\EOF &&
|' master '|
|' side '|
|' odd/spot '|
|' annotated-tag '|
|'doubly-annotated-tag '|
|'doubly-signed-tag '|
|' four '|
|' one '|
|' signed-tag '|
|' three '|
|' two '|
EOF
git for-each-ref --shell --format='|%(align:30,left)%(align:15,right)%(refname:short)%(end)%(end)|' >actual &&
test_cmp expect actual
ok 26 - nested alignment with quote formatting
expecting success:
cat >expect <<-\EOF &&
master |three
side |four
odd/spot |three
annotated-tag |An annotated tag
doubly-annotated-tag |Annonated doubly
doubly-signed-tag |Signed doubly
four |four
one |one
signed-tag |A signed tag
three |three
two |two
EOF
git for-each-ref --format="%(refname:short) |%(contents:lines=1)" >actual &&
test_cmp expect actual
ok 27 - check `%(contents:lines=1)`
expecting success:
cat >expect <<-\EOF &&
master |
side |
odd/spot |
annotated-tag |
doubly-annotated-tag |
doubly-signed-tag |
four |
one |
signed-tag |
three |
two |
EOF
git for-each-ref --format="%(refname:short) |%(contents:lines=0)" >actual &&
test_cmp expect actual
ok 28 - check `%(contents:lines=0)`
expecting success:
cat >expect <<-\EOF &&
master |three
side |four
odd/spot |three
annotated-tag |An annotated tag
doubly-annotated-tag |Annonated doubly
doubly-signed-tag |Signed doubly
four |four
one |one
signed-tag |A signed tag
three |three
two |two
EOF
git for-each-ref --format="%(refname:short) |%(contents:lines=99999)" >actual &&
test_cmp expect actual
ok 29 - check `%(contents:lines=99999)`
expecting success:
test_must_fail git for-each-ref --format="%(refname:short) |%(contents:lines=-1)"
fatal: positive value expected contents:lines=-1
ok 30 - `%(contents:lines=-1)` should fail
expecting success:
test_commit foo1.3 &&
test_commit foo1.6 &&
test_commit foo1.10
[master a83f331] foo1.3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo1.3.t
[master 3b57b15] foo1.6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo1.6.t
[master bef9c52] foo1.10
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo1.10.t
ok 31 - setup for version sort
expecting success:
git for-each-ref --sort=version:refname --format="%(refname:short)" refs/tags/ | grep "foo" >actual &&
cat >expect <<-\EOF &&
foo1.3
foo1.6
foo1.10
EOF
test_cmp expect actual
ok 32 - version sort
expecting success:
git for-each-ref --sort=v:refname --format="%(refname:short)" refs/tags/ | grep "foo" >actual &&
cat >expect <<-\EOF &&
foo1.3
foo1.6
foo1.10
EOF
test_cmp expect actual
ok 33 - version sort (shortened)
expecting success:
git for-each-ref --sort=-version:refname --format="%(refname:short)" refs/tags/ | grep "foo" >actual &&
cat >expect <<-\EOF &&
foo1.10
foo1.6
foo1.3
EOF
test_cmp expect actual
ok 34 - reverse version sort
expecting success:
test_must_fail git for-each-ref --format="%(if)" &&
test_must_fail git for-each-ref --format="%(then) %(end)" &&
test_must_fail git for-each-ref --format="%(else) %(end)" &&
test_must_fail git for-each-ref --format="%(if) %(else) %(end)" &&
test_must_fail git for-each-ref --format="%(if) %(then) %(then) %(end)" &&
test_must_fail git for-each-ref --format="%(then) %(else) %(end)" &&
test_must_fail git for-each-ref --format="%(if) %(else) %(end)" &&
test_must_fail git for-each-ref --format="%(if) %(then) %(else)" &&
test_must_fail git for-each-ref --format="%(if) %(else) %(then) %(end)" &&
test_must_fail git for-each-ref --format="%(if) %(then) %(else) %(else) %(end)" &&
test_must_fail git for-each-ref --format="%(if) %(end)"
fatal: format: %(end) atom missing
fatal: format: %(then) atom used without an %(if) atom
fatal: format: %(else) atom used without an %(if) atom
fatal: format: %(else) atom used without a %(then) atom
fatal: format: %(then) atom used more than once
fatal: format: %(then) atom used without an %(if) atom
fatal: format: %(else) atom used without a %(then) atom
fatal: format: %(end) atom missing
fatal: format: %(else) atom used without a %(then) atom
fatal: format: %(else) atom used more than once
fatal: format: %(if) atom used without a %(then) atom
ok 35 - improper usage of %(if), %(then), %(else) and %(end) atoms
expecting success:
git for-each-ref --format="%(refname)%(if)%(authorname)%(then) Author: %(authorname)%(end)" >actual &&
cat >expect <<-\EOF &&
refs/heads/master Author: A U Thor
refs/heads/side Author: A U Thor
refs/odd/spot Author: A U Thor
refs/tags/annotated-tag
refs/tags/doubly-annotated-tag
refs/tags/doubly-signed-tag
refs/tags/foo1.10 Author: A U Thor
refs/tags/foo1.3 Author: A U Thor
refs/tags/foo1.6 Author: A U Thor
refs/tags/four Author: A U Thor
refs/tags/one Author: A U Thor
refs/tags/signed-tag
refs/tags/three Author: A U Thor
refs/tags/two Author: A U Thor
EOF
test_cmp expect actual
ok 36 - check %(if)...%(then)...%(end) atoms
expecting success:
git for-each-ref --format="%(if)%(authorname)%(then)%(authorname)%(else)No author%(end): %(refname)" >actual &&
cat >expect <<-\EOF &&
A U Thor: refs/heads/master
A U Thor: refs/heads/side
A U Thor: refs/odd/spot
No author: refs/tags/annotated-tag
No author: refs/tags/doubly-annotated-tag
No author: refs/tags/doubly-signed-tag
A U Thor: refs/tags/foo1.10
A U Thor: refs/tags/foo1.3
A U Thor: refs/tags/foo1.6
A U Thor: refs/tags/four
A U Thor: refs/tags/one
No author: refs/tags/signed-tag
A U Thor: refs/tags/three
A U Thor: refs/tags/two
EOF
test_cmp expect actual
ok 37 - check %(if)...%(then)...%(else)...%(end) atoms
expecting success:
git for-each-ref --format="%(refname:short): %(if)%(HEAD)%(then)Head ref%(else)Not Head ref%(end)" >actual &&
cat >expect <<-\EOF &&
master: Head ref
side: Not Head ref
odd/spot: Not Head ref
annotated-tag: Not Head ref
doubly-annotated-tag: Not Head ref
doubly-signed-tag: Not Head ref
foo1.10: Not Head ref
foo1.3: Not Head ref
foo1.6: Not Head ref
four: Not Head ref
one: Not Head ref
signed-tag: Not Head ref
three: Not Head ref
two: Not Head ref
EOF
test_cmp expect actual
ok 38 - ignore spaces in %(if) atom usage
expecting success:
git for-each-ref --format="%(if:equals=master)%(refname:short)%(then)Found master%(else)Not master%(end)" refs/heads/ >actual &&
cat >expect <<-\EOF &&
Found master
Not master
EOF
test_cmp expect actual
ok 39 - check %(if:equals=<string>)
expecting success:
git for-each-ref --format="%(if:notequals=master)%(refname:short)%(then)Not master%(else)Found master%(end)" refs/heads/ >actual &&
cat >expect <<-\EOF &&
Found master
Not master
EOF
test_cmp expect actual
ok 40 - check %(if:notequals=<string>)
expecting success:
test_must_fail git for-each-ref --merged HEAD --no-merged HEAD
error: option `no-merged' is incompatible with --merged
ok 41 - --merged is incompatible with --no-merged
expecting success:
cat >expect <<-EOF &&
master: $(pwd)
master_worktree: $(pwd)/worktree_dir
side: not checked out
EOF
git worktree add -b master_worktree worktree_dir master &&
git for-each-ref --format="%(refname:short): %(if)%(worktreepath)%(then)%(worktreepath)%(else)not checked out%(end)" refs/heads/ >actual &&
rm -r worktree_dir &&
git worktree prune &&
test_cmp expect actual
Preparing worktree (new branch 'master_worktree')
HEAD is now at bef9c52 foo1.10
ok 42 - validate worktree atom
# passed all 42 test(s)
1..42
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6200-fmt-merge-msg.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6200-fmt-merge-msg/.git/
expecting success:
echo one >one &&
git add one &&
test_tick &&
git commit -m "Initial" &&
git clone . remote &&
echo uno >one &&
echo dos >two &&
git add two &&
test_tick &&
git commit -a -m "Second" &&
git checkout -b left &&
echo "c1" >one &&
test_tick &&
git commit -a -m "Common #1" &&
echo "c2" >one &&
test_tick &&
git commit -a -m "Common #2" &&
git branch right &&
echo "l3" >two &&
test_tick &&
GIT_COMMITTER_NAME="Another Committer" \
GIT_AUTHOR_NAME="Another Author" git commit -a -m "Left #3" &&
echo "l4" >two &&
test_tick &&
GIT_COMMITTER_NAME="Another Committer" \
GIT_AUTHOR_NAME="Another Author" git commit -a -m "Left #4" &&
echo "l5" >two &&
test_tick &&
GIT_COMMITTER_NAME="Another Committer" \
GIT_AUTHOR_NAME="Another Author" git commit -a -m "Left #5" &&
git tag tag-l5 &&
git checkout right &&
echo "r3" >three &&
git add three &&
test_tick &&
git commit -a -m "Right #3" &&
git tag tag-r3 &&
echo "r4" >three &&
test_tick &&
git commit -a -m "Right #4" &&
echo "r5" >three &&
test_tick &&
git commit -a -m "Right #5" &&
git checkout -b long &&
test_commit_bulk --start=0 --message=%s --filename=one 30 &&
git show-branch &&
apos="'"
[master (root-commit) 883c9d3] Initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one
Cloning into 'remote'...
done.
[master 2935695] Second
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 two
Switched to a new branch 'left'
[left b86daf8] Common #1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[left 9f2fd7e] Common #2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[left 5b6ed2c] Left #3
Author: Another Author <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[left e382d03] Left #4
Author: Another Author <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[left 558a9dc] Left #5
Author: Another Author <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'right'
[right 00c8e89] Right #3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three
[right ef8635d] Right #4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[right 2d2f597] Right #5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'long'
2d2f59764b2b471b254e97b85d19c5ba8d1ed287
/<<PKGBUILDDIR>>/git-fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects: 5000
Total objects: 90 ( 0 duplicates )
blobs : 30 ( 0 duplicates 0 deltas of 0 attempts)
trees : 30 ( 0 duplicates 29 deltas of 29 attempts)
commits: 30 ( 0 duplicates 0 deltas of 0 attempts)
tags : 0 ( 0 duplicates 0 deltas of 0 attempts)
Total branches: 1 ( 1 loads )
marks: 1024 ( 0 unique )
atoms: 3
Memory total: 2395 KiB
pools: 2122 KiB
objects: 273 KiB
---------------------------------------------------------------------
pack_report: getpagesize() = 4096
pack_report: core.packedGitWindowSize = 33554432
pack_report: core.packedGitLimit = 268435456
pack_report: pack_used_ctr = 31
pack_report: pack_mmap_calls = 1
pack_report: pack_open_windows = 1 / 1
pack_report: pack_mapped = 6806 / 6806
---------------------------------------------------------------------
! [left] Left #5
* [long] 29
! [master] Second
! [right] Right #5
----
* [long] 29
* [long^] 28
* [long~2] 27
* [long~3] 26
* [long~4] 25
* [long~5] 24
* [long~6] 23
* [long~7] 22
* [long~8] 21
* [long~9] 20
* [long~10] 19
* [long~11] 18
* [long~12] 17
* [long~13] 16
* [long~14] 15
* [long~15] 14
* [long~16] 13
* [long~17] 12
* [long~18] 11
* [long~19] 10
* [long~20] 9
* [long~21] 8
* [long~22] 7
* [long~23] 6
* [long~24] 5
* [long~25] 4
* [long~26] 3
* [long~27] 2
* [long~28] 1
* [long~29] 0
* + [right] Right #5
* + [right^] Right #4
* + [right~2] Right #3
+ [left] Left #5
+ [left^] Left #4
+ [left~2] Left #3
+* + [right~3] Common #2
+* + [right~4] Common #1
+*++ [master] Second
ok 1 - setup
expecting success:
echo "Merge branch ${apos}left${apos}" >expected &&
git checkout master &&
git fetch . left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
test_cmp expected actual
Switched to branch 'master'
From .
* branch left -> FETCH_HEAD
ok 2 - message for merging local branch
expecting success:
echo "Merge branch ${apos}left${apos} of $(pwd)" >expected &&
git checkout master &&
git fetch "$(pwd)" left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
test_cmp expected actual
Already on 'master'
From /<<PKGBUILDDIR>>/t/trash directory.t6200-fmt-merge-msg
* branch left -> FETCH_HEAD
ok 3 - message for merging external branch
expecting success:
cat >expected <<-EOF &&
Merge branch ${apos}left${apos}
# By Another Author (3) and A U Thor (2)
# Via Another Committer
* left:
Left #5
Left #4
Left #3
Common #2
Common #1
EOF
test_config merge.log true &&
test_unconfig merge.summary &&
git checkout master &&
test_tick &&
git fetch . left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual1 &&
test_unconfig merge.log &&
test_config merge.summary true &&
git checkout master &&
test_tick &&
git fetch . left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual2 &&
test_cmp expected actual1 &&
test_cmp expected actual2
Already on 'master'
From .
* branch left -> FETCH_HEAD
Already on 'master'
From .
* branch left -> FETCH_HEAD
ok 4 - [merge] summary/log configuration
expecting success:
git checkout master &&
test_tick &&
git fetch . left
Already on 'master'
From .
* branch left -> FETCH_HEAD
ok 5 - setup FETCH_HEAD
expecting success:
cat >expected <<-EOF &&
Merge branch ${apos}left${apos}
# By Another Author (3) and A U Thor (2)
# Via Another Committer
* left: (5 commits)
Left #5
Left #4
Left #3
...
EOF
git -c merge.log=3 fmt-merge-msg <.git/FETCH_HEAD >actual &&
test_cmp expected actual
ok 6 - merge.log=3 limits shortlog length
expecting success:
cat >expected <<-EOF &&
Merge branch ${apos}left${apos}
# By Another Author (3) and A U Thor (2)
# Via Another Committer
* left:
Left #5
Left #4
Left #3
Common #2
Common #1
EOF
git -c merge.log=5 fmt-merge-msg <.git/FETCH_HEAD >actual &&
test_cmp expected actual
ok 7 - merge.log=5 shows all 5 commits
expecting success:
cat >expected <<-EOF &&
Merge branch ${apos}left${apos}
x By Another Author (3) and A U Thor (2)
x Via Another Committer
* left:
Left #5
Left #4
Left #3
Common #2
Common #1
EOF
git -c core.commentchar="x" fmt-merge-msg --log=5 <.git/FETCH_HEAD >actual &&
test_cmp expected actual
ok 8 - --log=5 with custom comment character
expecting success:
echo "Merge branch ${apos}left${apos}" >expected &&
git -c merge.log=0 fmt-merge-msg <.git/FETCH_HEAD >actual &&
test_cmp expected actual
ok 9 - merge.log=0 disables shortlog
expecting success:
cat >expected <<-EOF &&
Merge branch ${apos}left${apos}
# By Another Author (3) and A U Thor (2)
# Via Another Committer
* left: (5 commits)
Left #5
Left #4
Left #3
...
EOF
git fmt-merge-msg --log=3 <.git/FETCH_HEAD >actual &&
test_cmp expected actual
ok 10 - --log=3 limits shortlog length
expecting success:
cat >expected <<-EOF &&
Merge branch ${apos}left${apos}
# By Another Author (3) and A U Thor (2)
# Via Another Committer
* left:
Left #5
Left #4
Left #3
Common #2
Common #1
EOF
git fmt-merge-msg --log=5 <.git/FETCH_HEAD >actual &&
test_cmp expected actual
ok 11 - --log=5 shows all 5 commits
expecting success:
echo "Merge branch ${apos}left${apos}" >expected &&
git fmt-merge-msg --no-log <.git/FETCH_HEAD >actual &&
test_cmp expected actual
ok 12 - --no-log disables shortlog
expecting success:
echo "Merge branch ${apos}left${apos}" >expected &&
git fmt-merge-msg --no-log <.git/FETCH_HEAD >actual &&
test_cmp expected actual
ok 13 - --log=0 disables shortlog
expecting success:
echo "Sync with left" >expected &&
cat >expected.log <<-EOF &&
Sync with left
# By Another Author (3) and A U Thor (2)
# Via Another Committer
* ${apos}left${apos} of $(pwd):
Left #5
Left #4
Left #3
Common #2
Common #1
EOF
test_unconfig merge.log &&
test_unconfig merge.summary &&
git checkout master &&
git fetch "$(pwd)" left &&
git fmt-merge-msg -m "Sync with left" <.git/FETCH_HEAD >actual &&
git fmt-merge-msg --log -m "Sync with left" \
<.git/FETCH_HEAD >actual.log &&
test_config merge.log true &&
git fmt-merge-msg -m "Sync with left" \
<.git/FETCH_HEAD >actual.log-config &&
git fmt-merge-msg --no-log -m "Sync with left" \
<.git/FETCH_HEAD >actual.nolog &&
test_cmp expected actual &&
test_cmp expected.log actual.log &&
test_cmp expected.log actual.log-config &&
test_cmp expected actual.nolog
Already on 'master'
From /<<PKGBUILDDIR>>/t/trash directory.t6200-fmt-merge-msg
* branch left -> FETCH_HEAD
ok 14 - fmt-merge-msg -m
expecting success:
cat >expected <<-EOF
Merge branches ${apos}left${apos} and ${apos}right${apos}
# By Another Author (3) and A U Thor (2)
# Via Another Committer
* left:
Left #5
Left #4
Left #3
Common #2
Common #1
* right:
Right #5
Right #4
Right #3
Common #2
Common #1
EOF
ok 15 - setup: expected shortlog for two branches
expecting success:
test_config merge.log true &&
test_unconfig merge.summary &&
git checkout master &&
test_tick &&
git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual1 &&
test_unconfig merge.log &&
test_config merge.summary true &&
git checkout master &&
test_tick &&
git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual2 &&
test_config merge.log yes &&
test_unconfig merge.summary &&
git checkout master &&
test_tick &&
git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual3 &&
test_unconfig merge.log &&
test_config merge.summary yes &&
git checkout master &&
test_tick &&
git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual4 &&
test_cmp expected actual1 &&
test_cmp expected actual2 &&
test_cmp expected actual3 &&
test_cmp expected actual4
Already on 'master'
From .
* branch left -> FETCH_HEAD
* branch right -> FETCH_HEAD
Already on 'master'
From .
* branch left -> FETCH_HEAD
* branch right -> FETCH_HEAD
Already on 'master'
From .
* branch left -> FETCH_HEAD
* branch right -> FETCH_HEAD
Already on 'master'
From .
* branch left -> FETCH_HEAD
* branch right -> FETCH_HEAD
ok 16 - shortlog for two branches
expecting success:
test_unconfig merge.log &&
test_config merge.summary yes &&
git checkout master &&
test_tick &&
git fetch . left right &&
git fmt-merge-msg -F .git/FETCH_HEAD >actual &&
test_cmp expected actual
Already on 'master'
From .
* branch left -> FETCH_HEAD
* branch right -> FETCH_HEAD
ok 17 - merge-msg -F
expecting success:
test_unconfig merge.log &&
test_config merge.summary yes &&
git checkout master &&
test_tick &&
git fetch . left right &&
mkdir sub &&
cp .git/FETCH_HEAD sub/FETCH_HEAD &&
(
cd sub &&
git fmt-merge-msg -F FETCH_HEAD >../actual
) &&
test_cmp expected actual
Already on 'master'
From .
* branch left -> FETCH_HEAD
* branch right -> FETCH_HEAD
ok 18 - merge-msg -F in subdirectory
expecting success:
test_unconfig merge.log &&
test_config merge.summary yes &&
(
cd remote &&
git checkout -b unrelated &&
test_tick &&
git fetch origin &&
git fmt-merge-msg <.git/FETCH_HEAD >../actual
) &&
test_must_be_empty actual
Switched to a new branch 'unrelated'
From /<<PKGBUILDDIR>>/t/trash directory.t6200-fmt-merge-msg/.
* [new branch] left -> origin/left
* [new branch] long -> origin/long
883c9d3..2935695 master -> origin/master
* [new branch] right -> origin/right
* [new tag] tag-l5 -> tag-l5
* [new tag] tag-r3 -> tag-r3
ok 19 - merge-msg with nothing to merge
expecting success:
cat >expected <<-EOF &&
Merge tag ${apos}tag-r3${apos}
* tag ${apos}tag-r3${apos}:
Right #3
Common #2
Common #1
EOF
test_unconfig merge.log &&
test_config merge.summary yes &&
git checkout master &&
test_tick &&
git fetch . tag tag-r3 &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
test_cmp expected actual
Already on 'master'
ok 20 - merge-msg tag
expecting success:
cat >expected <<-EOF &&
Merge tags ${apos}tag-r3${apos} and ${apos}tag-l5${apos}
* tag ${apos}tag-r3${apos}:
Right #3
Common #2
Common #1
# By Another Author (3) and A U Thor (2)
# Via Another Committer
* tag ${apos}tag-l5${apos}:
Left #5
Left #4
Left #3
Common #2
Common #1
EOF
test_unconfig merge.log &&
test_config merge.summary yes &&
git checkout master &&
test_tick &&
git fetch . tag tag-r3 tag tag-l5 &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
test_cmp expected actual
Already on 'master'
ok 21 - merge-msg two tags
expecting success:
cat >expected <<-EOF &&
Merge branch ${apos}left${apos}, tag ${apos}tag-r3${apos}
* tag ${apos}tag-r3${apos}:
Right #3
Common #2
Common #1
# By Another Author (3) and A U Thor (2)
# Via Another Committer
* left:
Left #5
Left #4
Left #3
Common #2
Common #1
EOF
test_unconfig merge.log &&
test_config merge.summary yes &&
git checkout master &&
test_tick &&
git fetch . tag tag-r3 left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
test_cmp expected actual
Already on 'master'
From .
* branch left -> FETCH_HEAD
ok 22 - merge-msg tag and branch
expecting success:
{
cat <<-EOF &&
Merge branch ${apos}long${apos}
* long: (35 commits)
EOF
i=29 &&
while test $i -gt 9
do
echo " $i" &&
i=$(($i-1))
done &&
echo " ..."
} >expected &&
test_config merge.summary yes &&
git checkout master &&
test_tick &&
git fetch . long &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
test_cmp expected actual
Already on 'master'
From .
* branch long -> FETCH_HEAD
ok 23 - merge-msg lots of commits
expecting success:
test_config merge.log true &&
git checkout master^0 &&
git commit --allow-empty -m "One step ahead" &&
git tag -a -m "An annotated one" annote HEAD &&
git checkout master &&
git fetch . annote &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
{
cat <<-\EOF
Merge tag 'annote'
An annotated one
* tag 'annote':
One step ahead
EOF
} >expected &&
test_cmp expected actual &&
test_when_finished "git reset --hard" &&
annote=$(git rev-parse annote) &&
git merge --no-commit --no-ff $annote &&
{
cat <<-EOF
Merge tag '$annote'
An annotated one
* tag '$annote':
One step ahead
EOF
} >expected &&
test_cmp expected .git/MERGE_MSG
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 2935695 Second
[detached HEAD a1b29db] One step ahead
Author: A U Thor <author@example.com>
Previous HEAD position was a1b29db One step ahead
Switched to branch 'master'
From .
* tag annote -> FETCH_HEAD
Merging:
2935695 Second
virtual 8b46c6aacb57c799d0614a94329ab758b2fc5b2e
found 1 common ancestor:
2935695 Second
Already up to date!
Automatic merge went well; stopped before committing as requested
HEAD is now at 2935695 Second
ok 24 - merge-msg with "merging" an annotated tag
# passed all 24 test(s)
1..24
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6120-describe.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6120-describe/.git/
expecting success:
test_tick &&
echo one >file && git add file && git commit -m initial &&
one=$(git rev-parse HEAD) &&
git describe --always HEAD &&
test_tick &&
echo two >file && git add file && git commit -m second &&
two=$(git rev-parse HEAD) &&
test_tick &&
echo three >file && git add file && git commit -m third &&
test_tick &&
echo A >file && git add file && git commit -m A &&
test_tick &&
git tag -a -m A A &&
test_tick &&
echo c >file && git add file && git commit -m c &&
test_tick &&
git tag c &&
git reset --hard $two &&
test_tick &&
echo B >side && git add side && git commit -m B &&
test_tick &&
git tag -a -m B B &&
test_tick &&
git merge -m Merged c &&
merged=$(git rev-parse HEAD) &&
git reset --hard $two &&
test_tick &&
echo D >another && git add another && git commit -m D &&
test_tick &&
git tag -a -m D D &&
test_tick &&
git tag -a -m R R &&
test_tick &&
echo DD >another && git commit -a -m another &&
test_tick &&
git tag e &&
test_tick &&
echo DDD >another && git commit -a -m "yet another" &&
test_tick &&
git merge -m Merged $merged &&
test_tick &&
echo X >file && echo X >side && git add file side &&
git commit -m x
[master (root-commit) 50b0198] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
50b0198
[master 612fe8f] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master c48449d] third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 4185ee1] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 2ad5867] c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at 612fe8f second
[master 3acd34f] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 side
Merging:
3acd34f B
virtual c
found 1 common ancestor:
612fe8f second
Merge made by the 'recursive' strategy.
file | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
HEAD is now at 612fe8f second
[master 84aba8f] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 another
[master f459448] another
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master a4198f8] yet another
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Merging:
a4198f8 yet another
virtual 7cac7e2f60e76f6f6a9eaf950c5e927f3115672f
found 1 common ancestor:
612fe8f second
Merge made by the 'recursive' strategy.
file | 2 +-
side | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 side
[master a3aae96] x
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
ok 1 - setup
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 2 - describe HEAD
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 3 - describe HEAD^
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 4 - describe HEAD^^
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 5 - describe HEAD^^2
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 6 - describe HEAD^^2^
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 7 - describe HEAD^^^
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 8 - describe --tags HEAD
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 9 - describe --tags HEAD^
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 10 - describe --tags HEAD^^
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 11 - describe --tags HEAD^^2
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 12 - describe --tags HEAD^^2^
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 13 - describe --tags HEAD^^^
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 14 - describe --all HEAD
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 15 - describe --all HEAD^
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 16 - describe --all HEAD^^^
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 17 - describe --long HEAD^^2^
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 18 - describe --long HEAD^^2
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 19 - describe --tags
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 20 - describe --first-parent --tags
expecting success:
echo "A^0" >expect &&
git checkout A &&
test_when_finished "git checkout -" &&
git describe --contains >actual &&
test_cmp expect actual
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 4185ee1 A
Previous HEAD position was 4185ee1 A
Switched to branch 'master'
ok 21 - describe --contains defaults to HEAD without commit-ish
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 22 - describe --all A^0
expecting success:
test_must_be_empty err.actual
ok 23 - no warning was displayed for A
expecting success:
mv .git/refs/tags/A .git/refs/tags/Q
ok 24 - rename tag A to Q locally
warning: tag 'A' is really 'Q' here
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 25 - describe HEAD
expecting success:
test_i18ncmp err.expect err.actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 26 - warning was displayed for Q
expecting success:
mv .git/refs/tags/Q .git/refs/tags/A
ok 27 - rename tag Q back to A
expecting success: git pack-refs
ok 28 - pack tag refs
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 29 - describe HEAD
expecting success:
git clone --bare "$TRASH_DIRECTORY" "$TRASH_DIRECTORY/bare" &&
git --git-dir "$TRASH_DIRECTORY/bare" describe >out &&
grep -E "^A-[1-9][0-9]?-g[0-9a-f]+$" out
Cloning into bare repository '/<<PKGBUILDDIR>>/t/trash directory.t6120-describe/bare'...
done.
A-8-ga3aae96
ok 30 - describe works from outside repo using --git-dir
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 31 - describe --dirty
expecting success:
(
cd "$TEST_DIRECTORY" &&
git --git-dir "$TRASH_DIRECTORY/.git" --work-tree "$TRASH_DIRECTORY" describe --dirty >"$TRASH_DIRECTORY/out"
) &&
grep -E "^A-[1-9][0-9]?-g[0-9a-f]+$" out
A-8-ga3aae96
ok 32 - describe --dirty with --work-tree
expecting success:
echo >>file
ok 33 - set-up dirty work tree
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 34 - describe --dirty
expecting success:
(
cd "$TEST_DIRECTORY" &&
git --git-dir "$TRASH_DIRECTORY/.git" --work-tree "$TRASH_DIRECTORY" describe --dirty >"$TRASH_DIRECTORY/out"
) &&
grep -E "^A-[1-9][0-9]?-g[0-9a-f]+-dirty$" out
A-8-ga3aae96-dirty
ok 35 - describe --dirty with --work-tree (dirty)
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 36 - describe --dirty=.mod
expecting success:
(
cd "$TEST_DIRECTORY" &&
git --git-dir "$TRASH_DIRECTORY/.git" --work-tree "$TRASH_DIRECTORY" describe --dirty=.mod >"$TRASH_DIRECTORY/out"
) &&
grep -E "^A-[1-9][0-9]?-g[0-9a-f]+.mod$" out
A-8-ga3aae96.mod
ok 37 - describe --dirty=.mod with --work-tree (dirty)
expecting success:
test_must_fail git describe --dirty HEAD
fatal: --dirty is incompatible with commit-ishes
ok 38 - describe --dirty HEAD
expecting success:
git tag -a -m test-annotated test-annotated &&
echo >>file &&
test_tick &&
git commit -a -m "one more" &&
git tag test1-lightweight &&
echo >>file &&
test_tick &&
git commit -a -m "yet another" &&
git tag test2-lightweight &&
echo >>file &&
test_tick &&
git commit -a -m "even more"
[master bf36909] one more
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
[master eb002ce] yet another
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master ca3eb51] even more
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 39 - set-up matching pattern tests
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 40 - describe --match=test-*
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 41 - describe --tags --match=test1-*
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 42 - describe --tags --match=test2-*
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 43 - describe --long --tags --match=test2-* HEAD^
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 44 - describe --long --tags --match=test1-* --match=test2-* HEAD^
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 45 - describe --long --tags --match=test1-* --no-match --match=test2-* HEAD^
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 46 - describe --long --tags --match=test1-* --match=test3-* HEAD
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 47 - describe --long --tags --match=test3-* --match=test1-* HEAD
expecting success:
git branch branch_A A &&
git branch branch_C c &&
git update-ref refs/remotes/origin/remote_branch_A "A^{commit}" &&
git update-ref refs/remotes/origin/remote_branch_C "c^{commit}" &&
git update-ref refs/original/original_branch_A test-annotated~2
ok 48 - set-up branches
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 49 - describe --all --match=branch_* --exclude=branch_C HEAD
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 50 - describe --all --match=origin/remote_branch_* --exclude=origin/remote_branch_C HEAD
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 51 - describe --all test-annotated~1
expecting success:
test_must_fail git describe --all --match="*original_branch_*" test-annotated~1
fatal: No names found, cannot describe anything.
ok 52 - --match does not work for other types
expecting success:
R=$(git describe --all --exclude="any_pattern_even_not_matching" test-annotated~1) &&
case "$R" in
*original_branch_A*) echo "fail: Found unknown reference $R with --exclude"
false;;
*) echo ok: Found some known type;;
esac
ok: Found some known type
ok 53 - --exclude does not work for other types
expecting success:
echo A >expect &&
tag_object=$(git rev-parse refs/tags/A) &&
git name-rev --tags --name-only $tag_object >actual &&
test_cmp expect actual &&
echo "A^0" >expect &&
tagged_commit=$(git rev-parse "refs/tags/A^0") &&
git name-rev --tags --name-only $tagged_commit >actual &&
test_cmp expect actual
ok 54 - name-rev with exact tags
expecting success:
>expect.unsorted &&
for rev in $(git rev-list --all)
do
git name-rev $rev >>expect.unsorted
done &&
sort <expect.unsorted >expect &&
git name-rev --all >actual.unsorted &&
sort <actual.unsorted >actual &&
test_cmp expect actual
ok 55 - name-rev --all
expecting success:
>expect.unsorted &&
for rev in $(git rev-list --all)
do
name=$(git name-rev --name-only $rev) &&
echo "$rev ($name)" >>expect.unsorted
done &&
sort <expect.unsorted >expect &&
git rev-list --all | git name-rev --stdin >actual.unsorted &&
sort <actual.unsorted >actual &&
test_cmp expect actual
ok 56 - name-rev --stdin
expecting success:
echo "A^0" >expect &&
tag_object=$(git rev-parse refs/tags/A) &&
git describe --contains $tag_object >actual &&
test_cmp expect actual &&
echo "A^0" >expect &&
tagged_commit=$(git rev-parse "refs/tags/A^0") &&
git describe --contains $tagged_commit >actual &&
test_cmp expect actual
ok 57 - describe --contains with the exact tags
expecting success:
echo "A^0" >expect &&
tagged_commit=$(git rev-parse "refs/tags/A^0") &&
test_must_fail git describe --contains --match="B" $tagged_commit &&
git describe --contains --match="B" --match="A" $tagged_commit >actual &&
test_cmp expect actual
fatal: cannot describe '4185ee1c25ca8fa52bf846677e8fb33c39a38326'
ok 58 - describe --contains and --match
expecting success:
echo "c~1" >expect &&
tagged_commit=$(git rev-parse "refs/tags/A^0") &&
test_must_fail git describe --contains --match="B" $tagged_commit &&
git describe --contains --match="?" --exclude="A" $tagged_commit >actual &&
test_cmp expect actual
fatal: cannot describe '4185ee1c25ca8fa52bf846677e8fb33c39a38326'
ok 59 - describe --exclude
expecting success:
echo "A^0" >expect &&
tagged_commit=$(git rev-parse "refs/tags/A^0") &&
git describe --contains --match="B" --no-match $tagged_commit >actual &&
test_cmp expect actual
ok 60 - describe --contains and --no-match
expecting success:
test_create_repo sub1 &&
test_commit -C sub1 initial &&
git submodule add ./sub1 &&
git submodule absorbgitdirs &&
git commit -a -m "add submodule" &&
git describe --dirty >expect &&
git describe --broken >out &&
test_cmp expect out
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6120-describe/sub1/.git/
[master (root-commit) 96ce1d0] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
Adding existing repo at 'sub1' to the index
Migrating git directory of 'sub1' from
'/<<PKGBUILDDIR>>/t/trash directory.t6120-describe/sub1/.git' to
'/<<PKGBUILDDIR>>/t/trash directory.t6120-describe/.git/modules/sub1'
[master 19a2e67] add submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub1
ok 61 - setup and absorb a submodule
expecting success:
mv .git/modules/sub1/ .git/modules/sub_moved &&
test_must_fail git describe --dirty
fatal: not a git repository: sub1/../.git/modules/sub1
ok 62 - describe chokes on severely broken submodules
expecting success:
git describe --broken >out &&
grep broken out
fatal: not a git repository: sub1/../.git/modules/sub1
test-annotated-4-g19a2e67-broken
ok 63 - describe ignoring a broken submodule
expecting success:
(
cd "$TEST_DIRECTORY" &&
git --git-dir "$TRASH_DIRECTORY/.git" --work-tree "$TRASH_DIRECTORY" describe --broken >"$TRASH_DIRECTORY/out"
) &&
test_when_finished "mv .git/modules/sub_moved .git/modules/sub1" &&
grep broken out
fatal: not a git repository: sub1/../.git/modules/sub1
test-annotated-4-g19a2e67-broken
ok 64 - describe with --work-tree ignoring a broken submodule
expecting success:
echo "make it a unique blob" >file &&
git add file && git commit -m "content in file" &&
git tag -a -m "latest annotated tag" unique-file &&
git describe HEAD:file >actual &&
echo "unique-file:file" >expect &&
test_cmp expect actual
[master 2d5f540] content in file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 5 deletions(-)
ok 65 - describe a blob at a directly tagged commit
expecting success:
git commit --allow-empty -m "empty commit" &&
git rm file &&
git commit -m "delete blob" &&
git revert HEAD &&
git commit --allow-empty -m "empty commit" &&
git describe HEAD:file >actual &&
echo "unique-file:file" >expect &&
test_cmp expect actual
[master b6993a3] empty commit
Author: A U Thor <author@example.com>
rm 'file'
[master bf12599] delete blob
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 file
[master abcd4aa] Revert "delete blob"
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:34:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 file
[master bb0bee0] empty commit
Author: A U Thor <author@example.com>
ok 66 - describe a blob with its first introduction
expecting success:
git tag test-blob unique-file:file &&
git describe test-blob >actual &&
echo "unique-file:file" >expect &&
# suboptimal: we rather want to see "test-blob"
test_cmp expect actual
ok 67 - describe directly tagged blob
expecting success:
git tag test-blob-1 -a -m msg unique-file:file &&
test_must_fail git describe test-blob-1 2>actual &&
test_i18ngrep "fatal: test-blob-1 is neither a commit nor blob" actual
fatal: test-blob-1 is neither a commit nor blob
ok 68 - describe tag object
checking prerequisite: ULIMIT_STACK_SIZE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq !MINGW,!CYGWIN &&
run_with_limited_stack true
)
prerequisite ULIMIT_STACK_SIZE ok
checking known breakage:
i=1 &&
while test $i -lt 8000
do
echo "commit refs/heads/master
committer A U Thor <author@example.com> $((1000000000 + $i * 100)) +0200
data <<EOF
commit #$i
EOF"
test $i = 1 && echo "from refs/heads/master^0"
i=$(($i + 1))
done | git fast-import &&
git checkout master &&
git tag far-far-away HEAD^ &&
echo "HEAD~4000 tags/far-far-away~3999" >expect &&
git name-rev HEAD~4000 >actual &&
test_cmp expect actual &&
run_with_limited_stack git name-rev HEAD~4000 >actual &&
test_cmp expect actual
/<<PKGBUILDDIR>>/git-fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects: 10000
Total objects: 7999 ( 0 duplicates )
blobs : 0 ( 0 duplicates 0 deltas of 0 attempts)
trees : 0 ( 0 duplicates 0 deltas of 0 attempts)
commits: 7999 ( 0 duplicates 0 deltas of 0 attempts)
tags : 0 ( 0 duplicates 0 deltas of 0 attempts)
Total branches: 1 ( 1 loads )
marks: 1024 ( 0 unique )
atoms: 5
Memory total: 2669 KiB
pools: 2122 KiB
objects: 546 KiB
---------------------------------------------------------------------
pack_report: getpagesize() = 4096
pack_report: core.packedGitWindowSize = 33554432
pack_report: core.packedGitLimit = 268435456
pack_report: pack_used_ctr = 8000
pack_report: pack_mmap_calls = 1
pack_report: pack_open_windows = 1 / 1
pack_report: pack_mapped = 1178164 / 1178164
---------------------------------------------------------------------
Already on 'master'
Segmentation fault
not ok 69 - name-rev works in a deep repo # TODO known breakage
expecting success:
git tag -f far-far-away HEAD~7999 &&
echo "far-far-away" >expect &&
git describe --tags --abbrev=0 HEAD~4000 >actual &&
test_cmp expect actual &&
run_with_limited_stack git describe --tags --abbrev=0 HEAD~4000 >actual &&
test_cmp expect actual
Updated tag 'far-far-away' (was cb6ab2c)
ok 70 - describe works in a deep repo
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 71 - describe --all A
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 72 - describe --all c
expecting success:
test $S = 0 &&
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
ok 73 - describe --all --match=branch_* branch_A
expecting success:
test_must_fail git describe HEAD^{tree}
fatal: HEAD^{tree} is neither a commit nor blob
ok 74 - describe complains about tree object
expecting success:
test_must_fail git describe $ZERO_OID
fatal: 0000000000000000000000000000000000000000 is neither a commit nor blob
ok 75 - describe complains about missing object
# still have 1 known breakage(s)
# passed all remaining 74 test(s)
1..75
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6501-freshen-objects.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6501-freshen-objects/.git/
expecting success:
rm -rf .git &&
git init
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6501-freshen-objects/.git/
ok 1 - make repo completely empty (loose)
expecting success:
git config core.logallrefupdates false &&
git reflog expire --expire=all --all
ok 2 - disable reflogs (loose)
expecting success:
commit base
[master (root-commit) 8539479] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 base
ok 3 - setup basic history (loose)
expecting success:
git checkout -b experiment &&
commit abandon &&
maybe_repack &&
git checkout master &&
git branch -D experiment
Switched to a new branch 'experiment'
[experiment 20673e5] abandon
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 abandon
Switched to branch 'master'
Deleted branch experiment (was 20673e5).
ok 4 - create and abandon some objects (loose)
expecting success:
test-tool chmtime --get -86400 $(find .git/objects -type f)
1565681663
1565681663
1565681663
1565681663
1565681663
1565681663
ok 5 - simulate time passing (loose)
expecting success:
tree=$(
GIT_INDEX_FILE=index.tmp &&
export GIT_INDEX_FILE &&
git read-tree HEAD &&
add unrelated &&
add abandon &&
git write-tree
)
ok 6 - start writing new commit with old blob (loose)
expecting success:
git gc --prune=12.hours.ago
ok 7 - simultaneous gc (loose)
expecting success:
commit=$(echo foo | git commit-tree -p HEAD $tree) &&
git update-ref HEAD $commit
ok 8 - finish writing out commit (loose)
expecting success:
git fsck
ok 9 - repository passes fsck (loose)
expecting success:
git reset --hard HEAD^ &&
test-tool chmtime --get -86400 $(find .git/objects -type f)
HEAD is now at 8539479 base
1565681664
1565681664
1565681664
1565681664
1565681664
1565681664
1565681664
ok 10 - abandon objects again (loose)
expecting success:
tree=$(
GIT_INDEX_FILE=index.tmp &&
export GIT_INDEX_FILE &&
git read-tree HEAD &&
add abandon &&
add unrelated &&
git write-tree
)
ok 11 - start writing new commit with same tree (loose)
expecting success:
git gc --prune=12.hours.ago
ok 12 - simultaneous gc (loose)
expecting success:
commit=$(echo foo | git commit-tree -p HEAD $tree) &&
git update-ref HEAD $commit
ok 13 - finish writing out commit (loose)
expecting success:
rm -rf .git &&
git init
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6501-freshen-objects/.git/
ok 14 - make repo completely empty (repack)
expecting success:
git config core.logallrefupdates false &&
git reflog expire --expire=all --all
ok 15 - disable reflogs (repack)
expecting success:
commit base
[master (root-commit) aa8ecd7] base
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 base
ok 16 - setup basic history (repack)
expecting success:
git checkout -b experiment &&
commit abandon &&
maybe_repack &&
git checkout master &&
git branch -D experiment
Switched to a new branch 'experiment'
[experiment ff26f38] abandon
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 abandon
Switched to branch 'master'
Deleted branch experiment (was ff26f38).
ok 17 - create and abandon some objects (repack)
expecting success:
test-tool chmtime --get -86400 $(find .git/objects -type f)
1565681665
1565681665
1565681665
ok 18 - simulate time passing (repack)
expecting success:
tree=$(
GIT_INDEX_FILE=index.tmp &&
export GIT_INDEX_FILE &&
git read-tree HEAD &&
add unrelated &&
add abandon &&
git write-tree
)
ok 19 - start writing new commit with old blob (repack)
expecting success:
git gc --prune=12.hours.ago
ok 20 - simultaneous gc (repack)
expecting success:
commit=$(echo foo | git commit-tree -p HEAD $tree) &&
git update-ref HEAD $commit
ok 21 - finish writing out commit (repack)
expecting success:
git fsck
dangling commit ff26f380b0104eb69bd2bf57d64d6e29a12ae5fd
ok 22 - repository passes fsck (repack)
expecting success:
git reset --hard HEAD^ &&
test-tool chmtime --get -86400 $(find .git/objects -type f)
HEAD is now at aa8ecd7 base
1565681665
1565681665
1565681665
1565681665
1565681665
1565681665
1565681665
1565681665
1565681665
ok 23 - abandon objects again (repack)
expecting success:
tree=$(
GIT_INDEX_FILE=index.tmp &&
export GIT_INDEX_FILE &&
git read-tree HEAD &&
add abandon &&
add unrelated &&
git write-tree
)
ok 24 - start writing new commit with same tree (repack)
expecting success:
git gc --prune=12.hours.ago
ok 25 - simultaneous gc (repack)
expecting success:
commit=$(echo foo | git commit-tree -p HEAD $tree) &&
git update-ref HEAD $commit
ok 26 - finish writing out commit (repack)
expecting success:
cat >broken-commit <<-\EOF &&
tree 0000000000000000000000000000000000000001
parent 0000000000000000000000000000000000000002
author whatever <whatever@example.com> 1234 -0000
committer whatever <whatever@example.com> 1234 -0000
some message
EOF
commit=$(git hash-object -t commit -w broken-commit) &&
git gc 2>stderr &&
verbose git cat-file -e $commit &&
test_must_be_empty stderr
ok 27 - do not complain about existing broken links (commit)
expecting success:
cat >broken-tree <<-\EOF &&
100644 blob 0000000000000000000000000000000000000003 foo
EOF
tree=$(git mktree --missing <broken-tree) &&
git gc 2>stderr &&
git cat-file -e $tree &&
test_must_be_empty stderr
ok 28 - do not complain about existing broken links (tree)
expecting success:
cat >broken-tag <<-\EOF &&
object 0000000000000000000000000000000000000004
type commit
tag broken
tagger whatever <whatever@example.com> 1234 -0000
this is a broken tag
EOF
tag=$(git hash-object -t tag -w broken-tag) &&
git gc 2>stderr &&
git cat-file -e $tag &&
test_must_be_empty stderr
ok 29 - do not complain about existing broken links (tag)
# passed all 29 test(s)
1..29
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6500-gc.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6500-gc/.git/
expecting success:
# do not let the amount of physical memory affects gc
# behavior, make sure we always pack everything to one pack by
# default
git config gc.bigPackThreshold 2g
ok 1 - setup
expecting success:
git gc
Nothing new to pack.
ok 2 - gc empty repository
expecting success:
git gc &&
test_path_is_missing .git/gc.pid
Nothing new to pack.
ok 3 - gc does not leave behind pid file
expecting success:
test_expect_code 129 git gc --nonsense 2>err &&
test_i18ngrep "[Uu]sage: git gc" err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
usage: git gc [<options>]
ok 4 - gc --gobbledegook
expecting success:
mkdir broken &&
(
cd broken &&
git init &&
echo "[gc] pruneexpire = CORRUPT" >>.git/config &&
test_expect_code 129 git gc -h >usage 2>&1
) &&
test_i18ngrep "[Uu]sage" broken/usage
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6500-gc/broken/.git/
usage: git gc [<options>]
ok 5 - gc -h with invalid configuration
expecting success:
git init remote &&
(
cd remote &&
test_commit initial &&
git clone . ../client &&
git branch -m develop &&
cd ../client &&
git fetch --prune &&
git gc
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6500-gc/remote/.git/
[master (root-commit) 24b24cf] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
Cloning into '../client'...
done.
From /<<PKGBUILDDIR>>/t/trash directory.t6500-gc/remote/.
- [deleted] (none) -> origin/master
(refs/remotes/origin/HEAD has become dangling)
* [new branch] develop -> origin/develop
ok 6 - gc is not aborted due to a stale symref
expecting success:
test_create_repo keep-pack &&
(
cd keep-pack &&
test_commit one &&
test_commit two &&
test_commit three &&
git gc &&
( cd .git/objects/pack && ls *.pack ) >pack-list &&
test_line_count = 1 pack-list &&
BASE_PACK=.git/objects/pack/pack-*.pack &&
test_commit four &&
git repack -d &&
test_commit five &&
git repack -d &&
( cd .git/objects/pack && ls *.pack ) >pack-list &&
test_line_count = 3 pack-list &&
git gc --keep-largest-pack &&
( cd .git/objects/pack && ls *.pack ) >pack-list &&
test_line_count = 2 pack-list &&
awk "/^P /{print \$2}" <.git/objects/info/packs >pack-info &&
test_line_count = 2 pack-info &&
test_path_is_file $BASE_PACK &&
git fsck
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6500-gc/keep-pack/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[master 7c7cd71] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
[master fd8d77e] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 four.t
[master a383792] five
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 five.t
ok 7 - gc --keep-largest-pack
expecting success:
test_config gc.auto 3 &&
test_config gc.autodetach false &&
test_config pack.writebitmaps true &&
# We need to create two object whose sha1s start with 17
# since this is what git gc counts. As it happens, these
# two blobs will do so.
test_commit 263 &&
test_commit 410 &&
# Our first gc will create a pack; our second will create a second pack
git gc --auto &&
ls .git/objects/pack | sort >existing_packs &&
test_commit 523 &&
test_commit 790 &&
git gc --auto 2>err &&
test_i18ngrep ! "^warning:" err &&
ls .git/objects/pack/ | sort >post_packs &&
comm -1 -3 existing_packs post_packs >new &&
comm -2 -3 existing_packs post_packs >del &&
test_line_count = 0 del && # No packs are deleted
test_line_count = 2 new # There is one new pack and its .idx
[master (root-commit) 1808a60] 263
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 263.t
Auto packing the repository for optimum performance.
See "git help gc" for manual housekeeping.
[master 9a14344] 410
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 410.t
[master 54e21e7] 523
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 523.t
Auto packing the repository for optimum performance.
See "git help gc" for manual housekeeping.
[master 60dd8ad] 790
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 790.t
ok 8 - auto gc with too many loose objects does not attempt to create bitmaps
expecting success:
git -c gc.writeCommitGraph=true gc --no-quiet >stdout 2>stderr &&
test_must_be_empty stdout &&
test_line_count = 1 stderr &&
test_i18ngrep "Computing commit graph generation numbers" stderr
Computing commit graph generation numbers: 25% (1/4)
Computing commit graph generation numbers: 50% (2/4)
Computing commit graph generation numbers: 75% (3/4)
Computing commit graph generation numbers: 100% (4/4)
Computing commit graph generation numbers: 100% (4/4), done.
ok 9 - gc --no-quiet
checking prerequisite: TTY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq PERL &&
# Reading from the pty master seems to get stuck _sometimes_
# on Mac OS X 10.5.0, using Perl 5.10.0 or 5.8.9.
#
# Reproduction recipe: run
#
# i=0
# while ./test-terminal.perl echo hi $i
# do
# : $((i = $i + 1))
# done
#
# After 2000 iterations or so it hangs.
# https://rt.cpan.org/Ticket/Display.html?id=65692
#
test "$(uname -s)" != Darwin &&
perl "$TEST_DIRECTORY"/test-terminal.perl \
sh -c "test -t 1 && test -t 2"
)
prerequisite TTY ok
expecting success:
test_terminal git -c gc.writeCommitGraph=true gc --no-quiet >stdout 2>stderr &&
test_must_be_empty stdout &&
test_i18ngrep "Enumerating objects" stderr &&
test_i18ngrep "Computing commit graph generation numbers" stderr
[KEnumerating objects: 12, done.
[KComputing commit graph generation numbers: 25% (1/4)
[KComputing commit graph generation numbers: 50% (2/4)
[KComputing commit graph generation numbers: 75% (3/4)
[KComputing commit graph generation numbers: 100% (4/4)
[KComputing commit graph generation numbers: 100% (4/4), done.
ok 10 - with TTY: gc --no-quiet
expecting success:
git -c gc.writeCommitGraph=true gc --quiet >stdout 2>stderr &&
test_must_be_empty stdout &&
test_must_be_empty stderr
ok 11 - gc --quiet
expecting success:
test_config gc.reflogExpire never &&
test_config gc.reflogExpireUnreachable never &&
GIT_TRACE=$(pwd)/trace.out git gc &&
# Check that git-pack-refs is run as a sanity check (done via
# gc_before_repack()) but that git-expire is not.
grep -E "^trace: (built-in|exec|run_command): git pack-refs --" trace.out &&
! grep -E "^trace: (built-in|exec|run_command): git reflog expire --" trace.out
trace: run_command: git pack-refs --all --prune
trace: built-in: git pack-refs --all --prune
ok 12 - gc.reflogExpire{Unreachable,}=never skips "expire" via "gc"
expecting success:
>trace.out &&
test_config gc.reflogExpire never &&
GIT_TRACE=$(pwd)/trace.out git gc &&
grep -E "^trace: (built-in|exec|run_command): git reflog expire --" trace.out
trace: run_command: git reflog expire --all
trace: built-in: git reflog expire --all
ok 13 - one of gc.reflogExpire{Unreachable,}=never does not skip "expire" via "gc"
expecting success:
test_commit foo &&
test_commit bar &&
git repack &&
test_config gc.autopacklimit 1 &&
test_config gc.autodetach true &&
echo fleem >.git/gc.log &&
git gc --auto 2>err &&
test_i18ngrep "^warning:" err &&
test_config gc.logexpiry 5.days &&
test-tool chmtime =-345600 .git/gc.log &&
git gc --auto &&
test_config gc.logexpiry 2.days &&
run_and_wait_for_auto_gc &&
ls .git/objects/pack/pack-*.pack >packs &&
test_line_count = 1 packs
[master b16b551] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
[master fc616a4] bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar.t
warning: The last gc run reported the following. Please correct the root cause
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
warning: The last gc run reported the following. Please correct the root cause
and remove .git/gc.log.
Automatic cleanup will not be performed until the file is removed.
fleem
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
ok 14 - background auto gc does not run if gc.log is present and recent but does if it is old
expecting success:
# make sure we run a background auto-gc
test_commit make-pack &&
git repack &&
test_config gc.autopacklimit 1 &&
test_config gc.autodetach true &&
# create a ref whose loose presence we can use to detect a pack-refs run
git update-ref refs/heads/should-be-loose HEAD &&
test_path_is_file .git/refs/heads/should-be-loose &&
# now fake a concurrent gc that holds the lock; we can use our
# shell pid so that it looks valid.
hostname=$(hostname || echo unknown) &&
shell_pid=$$ &&
if test_have_prereq MINGW && test -f /proc/$shell_pid/winpid
then
# In Git for Windows, Bash (actually, the MSYS2 runtime) has a
# different idea of PIDs than git.exe (actually Windows). Use
# the Windows PID in this case.
shell_pid=$(cat /proc/$shell_pid/winpid)
fi &&
printf "%d %s" "$shell_pid" "$hostname" >.git/gc.pid &&
# our gc should exit zero without doing anything
run_and_wait_for_auto_gc &&
test_path_is_file .git/refs/heads/should-be-loose
[master 28ecdda] make-pack
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 make-pack.t
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
ok 15 - background auto gc respects lock for all operations
# passed all 15 test(s)
1..15
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6300-for-each-ref.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6300-for-each-ref/.git/
expecting success:
setdate_and_increment &&
echo "Using $datestamp" > one &&
git add one &&
git commit -m "Initial" &&
setdate_and_increment &&
git tag -a -m "Tagging at $datestamp" testtag &&
git update-ref refs/remotes/origin/master master &&
git remote add origin nowhere &&
git config branch.master.remote origin &&
git config branch.master.merge refs/heads/master &&
git remote add myfork elsewhere &&
git config remote.pushdefault myfork &&
git config push.default current
[master (root-commit) ea12284] Initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one
ok 1 - setup
expecting success:
git for-each-ref --format='%(refname)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 2 - basic atom: head refname
expecting success:
git for-each-ref --format='%(refname:)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 3 - basic atom: head refname:
expecting success:
git for-each-ref --format='%(refname:short)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 4 - basic atom: head refname:short
expecting success:
git for-each-ref --format='%(refname:lstrip=1)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 5 - basic atom: head refname:lstrip=1
expecting success:
git for-each-ref --format='%(refname:lstrip=2)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 6 - basic atom: head refname:lstrip=2
expecting success:
git for-each-ref --format='%(refname:lstrip=-1)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 7 - basic atom: head refname:lstrip=-1
expecting success:
git for-each-ref --format='%(refname:lstrip=-2)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 8 - basic atom: head refname:lstrip=-2
expecting success:
git for-each-ref --format='%(refname:rstrip=1)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 9 - basic atom: head refname:rstrip=1
expecting success:
git for-each-ref --format='%(refname:rstrip=2)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 10 - basic atom: head refname:rstrip=2
expecting success:
git for-each-ref --format='%(refname:rstrip=-1)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 11 - basic atom: head refname:rstrip=-1
expecting success:
git for-each-ref --format='%(refname:rstrip=-2)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 12 - basic atom: head refname:rstrip=-2
expecting success:
git for-each-ref --format='%(refname:strip=1)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 13 - basic atom: head refname:strip=1
expecting success:
git for-each-ref --format='%(refname:strip=2)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 14 - basic atom: head refname:strip=2
expecting success:
git for-each-ref --format='%(refname:strip=-1)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 15 - basic atom: head refname:strip=-1
expecting success:
git for-each-ref --format='%(refname:strip=-2)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 16 - basic atom: head refname:strip=-2
expecting success:
git for-each-ref --format='%(upstream)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 17 - basic atom: head upstream
expecting success:
git for-each-ref --format='%(upstream:short)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 18 - basic atom: head upstream:short
expecting success:
git for-each-ref --format='%(upstream:lstrip=2)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 19 - basic atom: head upstream:lstrip=2
expecting success:
git for-each-ref --format='%(upstream:lstrip=-2)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 20 - basic atom: head upstream:lstrip=-2
expecting success:
git for-each-ref --format='%(upstream:rstrip=2)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 21 - basic atom: head upstream:rstrip=2
expecting success:
git for-each-ref --format='%(upstream:rstrip=-2)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 22 - basic atom: head upstream:rstrip=-2
expecting success:
git for-each-ref --format='%(upstream:strip=2)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 23 - basic atom: head upstream:strip=2
expecting success:
git for-each-ref --format='%(upstream:strip=-2)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 24 - basic atom: head upstream:strip=-2
expecting success:
git for-each-ref --format='%(push)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 25 - basic atom: head push
expecting success:
git for-each-ref --format='%(push:short)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 26 - basic atom: head push:short
expecting success:
git for-each-ref --format='%(push:lstrip=1)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 27 - basic atom: head push:lstrip=1
expecting success:
git for-each-ref --format='%(push:lstrip=-1)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 28 - basic atom: head push:lstrip=-1
expecting success:
git for-each-ref --format='%(push:rstrip=1)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 29 - basic atom: head push:rstrip=1
expecting success:
git for-each-ref --format='%(push:rstrip=-1)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 30 - basic atom: head push:rstrip=-1
expecting success:
git for-each-ref --format='%(push:strip=1)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 31 - basic atom: head push:strip=1
expecting success:
git for-each-ref --format='%(push:strip=-1)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 32 - basic atom: head push:strip=-1
expecting success:
git for-each-ref --format='%(objecttype)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 33 - basic atom: head objecttype
expecting success:
git for-each-ref --format='%(objectsize)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 34 - basic atom: head objectsize
expecting success:
git for-each-ref --format='%(objectsize:disk)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 35 - basic atom: head objectsize:disk
expecting success:
git for-each-ref --format='%(deltabase)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 36 - basic atom: head deltabase
expecting success:
git for-each-ref --format='%(objectname)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 37 - basic atom: head objectname
expecting success:
git for-each-ref --format='%(objectname:short)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 38 - basic atom: head objectname:short
expecting success:
git for-each-ref --format='%(objectname:short=1)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 39 - basic atom: head objectname:short=1
expecting success:
git for-each-ref --format='%(objectname:short=10)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 40 - basic atom: head objectname:short=10
expecting success:
git for-each-ref --format='%(tree)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 41 - basic atom: head tree
expecting success:
git for-each-ref --format='%(parent)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 42 - basic atom: head parent
expecting success:
git for-each-ref --format='%(numparent)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 43 - basic atom: head numparent
expecting success:
git for-each-ref --format='%(object)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 44 - basic atom: head object
expecting success:
git for-each-ref --format='%(type)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 45 - basic atom: head type
expecting success:
git for-each-ref --format='%(*objectname)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 46 - basic atom: head *objectname
expecting success:
git for-each-ref --format='%(*objecttype)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 47 - basic atom: head *objecttype
expecting success:
git for-each-ref --format='%(author)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 48 - basic atom: head author
expecting success:
git for-each-ref --format='%(authorname)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 49 - basic atom: head authorname
expecting success:
git for-each-ref --format='%(authoremail)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 50 - basic atom: head authoremail
expecting success:
git for-each-ref --format='%(authordate)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 51 - basic atom: head authordate
expecting success:
git for-each-ref --format='%(committer)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 52 - basic atom: head committer
expecting success:
git for-each-ref --format='%(committername)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 53 - basic atom: head committername
expecting success:
git for-each-ref --format='%(committeremail)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 54 - basic atom: head committeremail
expecting success:
git for-each-ref --format='%(committerdate)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 55 - basic atom: head committerdate
expecting success:
git for-each-ref --format='%(tag)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 56 - basic atom: head tag
expecting success:
git for-each-ref --format='%(tagger)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 57 - basic atom: head tagger
expecting success:
git for-each-ref --format='%(taggername)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 58 - basic atom: head taggername
expecting success:
git for-each-ref --format='%(taggeremail)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 59 - basic atom: head taggeremail
expecting success:
git for-each-ref --format='%(taggerdate)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 60 - basic atom: head taggerdate
expecting success:
git for-each-ref --format='%(creator)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 61 - basic atom: head creator
expecting success:
git for-each-ref --format='%(creatordate)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 62 - basic atom: head creatordate
expecting success:
git for-each-ref --format='%(subject)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 63 - basic atom: head subject
expecting success:
git for-each-ref --format='%(contents:subject)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 64 - basic atom: head contents:subject
expecting success:
git for-each-ref --format='%(body)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 65 - basic atom: head body
expecting success:
git for-each-ref --format='%(contents:body)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 66 - basic atom: head contents:body
expecting success:
git for-each-ref --format='%(contents:signature)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 67 - basic atom: head contents:signature
expecting success:
git for-each-ref --format='%(contents)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 68 - basic atom: head contents
expecting success:
git for-each-ref --format='%(HEAD)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 69 - basic atom: head HEAD
expecting success:
git for-each-ref --format='%(refname)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 70 - basic atom: tag refname
expecting success:
git for-each-ref --format='%(refname:short)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 71 - basic atom: tag refname:short
expecting success:
git for-each-ref --format='%(upstream)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 72 - basic atom: tag upstream
expecting success:
git for-each-ref --format='%(push)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 73 - basic atom: tag push
expecting success:
git for-each-ref --format='%(objecttype)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 74 - basic atom: tag objecttype
expecting success:
git for-each-ref --format='%(objectsize)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 75 - basic atom: tag objectsize
expecting success:
git for-each-ref --format='%(objectsize:disk)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 76 - basic atom: tag objectsize:disk
expecting success:
git for-each-ref --format='%(*objectsize:disk)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 77 - basic atom: tag *objectsize:disk
expecting success:
git for-each-ref --format='%(deltabase)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 78 - basic atom: tag deltabase
expecting success:
git for-each-ref --format='%(*deltabase)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 79 - basic atom: tag *deltabase
expecting success:
git for-each-ref --format='%(objectname)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 80 - basic atom: tag objectname
expecting success:
git for-each-ref --format='%(objectname:short)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 81 - basic atom: tag objectname:short
expecting success:
git for-each-ref --format='%(objectname:short=1)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 82 - basic atom: head objectname:short=1
expecting success:
git for-each-ref --format='%(objectname:short=10)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 83 - basic atom: head objectname:short=10
expecting success:
git for-each-ref --format='%(tree)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 84 - basic atom: tag tree
expecting success:
git for-each-ref --format='%(parent)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 85 - basic atom: tag parent
expecting success:
git for-each-ref --format='%(numparent)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 86 - basic atom: tag numparent
expecting success:
git for-each-ref --format='%(object)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 87 - basic atom: tag object
expecting success:
git for-each-ref --format='%(type)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 88 - basic atom: tag type
expecting success:
git for-each-ref --format='%(*objectname)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 89 - basic atom: tag *objectname
expecting success:
git for-each-ref --format='%(*objecttype)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 90 - basic atom: tag *objecttype
expecting success:
git for-each-ref --format='%(author)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 91 - basic atom: tag author
expecting success:
git for-each-ref --format='%(authorname)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 92 - basic atom: tag authorname
expecting success:
git for-each-ref --format='%(authoremail)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 93 - basic atom: tag authoremail
expecting success:
git for-each-ref --format='%(authordate)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 94 - basic atom: tag authordate
expecting success:
git for-each-ref --format='%(committer)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 95 - basic atom: tag committer
expecting success:
git for-each-ref --format='%(committername)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 96 - basic atom: tag committername
expecting success:
git for-each-ref --format='%(committeremail)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 97 - basic atom: tag committeremail
expecting success:
git for-each-ref --format='%(committerdate)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 98 - basic atom: tag committerdate
expecting success:
git for-each-ref --format='%(tag)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 99 - basic atom: tag tag
expecting success:
git for-each-ref --format='%(tagger)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 100 - basic atom: tag tagger
expecting success:
git for-each-ref --format='%(taggername)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 101 - basic atom: tag taggername
expecting success:
git for-each-ref --format='%(taggeremail)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 102 - basic atom: tag taggeremail
expecting success:
git for-each-ref --format='%(taggerdate)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 103 - basic atom: tag taggerdate
expecting success:
git for-each-ref --format='%(creator)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 104 - basic atom: tag creator
expecting success:
git for-each-ref --format='%(creatordate)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 105 - basic atom: tag creatordate
expecting success:
git for-each-ref --format='%(subject)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 106 - basic atom: tag subject
expecting success:
git for-each-ref --format='%(contents:subject)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 107 - basic atom: tag contents:subject
expecting success:
git for-each-ref --format='%(body)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 108 - basic atom: tag body
expecting success:
git for-each-ref --format='%(contents:body)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 109 - basic atom: tag contents:body
expecting success:
git for-each-ref --format='%(contents:signature)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 110 - basic atom: tag contents:signature
expecting success:
git for-each-ref --format='%(contents)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 111 - basic atom: tag contents
expecting success:
git for-each-ref --format='%(HEAD)' refs/tags/testtag >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 112 - basic atom: tag HEAD
expecting success:
test_must_fail git for-each-ref --format="%(INVALID)" refs/heads
fatal: unknown field name: INVALID
ok 113 - Check invalid atoms names are errors
expecting success:
git for-each-ref --format="%(authordate)" refs/heads &&
git for-each-ref --format="%(authordate:default) %(authordate)" refs/heads &&
git for-each-ref --format="%(authordate) %(authordate:default)" refs/heads &&
git for-each-ref --format="%(authordate:default) %(authordate:default)" refs/heads
Tue Jul 4 01:18:44 2006 +0200
Tue Jul 4 01:18:44 2006 +0200 Tue Jul 4 01:18:44 2006 +0200
Tue Jul 4 01:18:44 2006 +0200 Tue Jul 4 01:18:44 2006 +0200
Tue Jul 4 01:18:44 2006 +0200 Tue Jul 4 01:18:44 2006 +0200
ok 114 - Check format specifiers are ignored in naming date atoms
expecting success:
git for-each-ref --format="%(authordate:default)" refs/heads &&
git for-each-ref --format="%(authordate:relative)" refs/heads &&
git for-each-ref --format="%(authordate:short)" refs/heads &&
git for-each-ref --format="%(authordate:local)" refs/heads &&
git for-each-ref --format="%(authordate:iso8601)" refs/heads &&
git for-each-ref --format="%(authordate:rfc2822)" refs/heads
Tue Jul 4 01:18:44 2006 +0200
13 years ago
2006-07-04
Mon Jul 3 23:18:44 2006
2006-07-04 01:18:44 +0200
Tue, 4 Jul 2006 01:18:44 +0200
ok 115 - Check valid format specifiers for date fields
expecting success:
test_must_fail git for-each-ref --format="%(authordate:INVALID)" refs/heads
fatal: unknown date format INVALID
ok 116 - Check invalid format specifiers are errors
expecting success:
test_must_fail git for-each-ref --format="%(objectname:short=0)" &&
test_must_fail git for-each-ref --format="%(objectname:short=-1)" &&
test_must_fail git for-each-ref --format="%(objectname:short=foo)"
fatal: positive value expected objectname:short=0
fatal: positive value expected objectname:short=-1
fatal: positive value expected objectname:short=foo
ok 117 - arguments to %(objectname:short=) must be positive integers
expecting success:
test_date "" \
"Tue Jul 4 01:18:43 2006 +0200" \
"Tue Jul 4 01:18:44 2006 +0200" \
"Tue Jul 4 01:18:45 2006 +0200"
ok 118 - Check unformatted date fields output
expecting success:
test_date default \
"Tue Jul 4 01:18:43 2006 +0200" \
"Tue Jul 4 01:18:44 2006 +0200" \
"Tue Jul 4 01:18:45 2006 +0200"
ok 119 - Check format "default" formatted date fields output
expecting success:
test_date default-local "Mon Jul 3 23:18:43 2006" "Mon Jul 3 23:18:44 2006" "Mon Jul 3 23:18:45 2006"
ok 120 - Check format "default-local" date fields output
expecting success:
f=relative &&
(git for-each-ref --shell --format="%(refname) %(committerdate:$f) %(authordate:$f)" refs/heads &&
git for-each-ref --shell --format="%(refname) %(taggerdate:$f)" refs/tags) >actual
ok 121 - Check format "relative" date fields output
expecting success:
test_date relative-local \
"$(git for-each-ref --format="%(committerdate:relative)" refs/heads)" \
"$(git for-each-ref --format="%(authordate:relative)" refs/heads)" \
"$(git for-each-ref --format="%(taggerdate:relative)" refs/tags)"
ok 122 - Check format "relative-local" date fields output
expecting success:
test_date short 2006-07-04 2006-07-04 2006-07-04
ok 123 - Check format "short" date fields output
expecting success:
test_date short-local 2006-07-03 2006-07-03 2006-07-03
ok 124 - Check format "short-local" date fields output
expecting success:
test_date local \
"Mon Jul 3 23:18:43 2006" \
"Mon Jul 3 23:18:44 2006" \
"Mon Jul 3 23:18:45 2006"
ok 125 - Check format "local" date fields output
expecting success:
test_date iso8601 \
"2006-07-04 01:18:43 +0200" \
"2006-07-04 01:18:44 +0200" \
"2006-07-04 01:18:45 +0200"
ok 126 - Check format "iso8601" date fields output
expecting success:
test_date iso8601-local "2006-07-03 23:18:43 +0000" "2006-07-03 23:18:44 +0000" "2006-07-03 23:18:45 +0000"
ok 127 - Check format "iso8601-local" date fields output
expecting success:
test_date rfc2822 \
"Tue, 4 Jul 2006 01:18:43 +0200" \
"Tue, 4 Jul 2006 01:18:44 +0200" \
"Tue, 4 Jul 2006 01:18:45 +0200"
ok 128 - Check format "rfc2822" date fields output
expecting success:
test_date rfc2822-local "Mon, 3 Jul 2006 23:18:43 +0000" "Mon, 3 Jul 2006 23:18:44 +0000" "Mon, 3 Jul 2006 23:18:45 +0000"
ok 129 - Check format "rfc2822-local" date fields output
expecting success:
test_date raw "1151968723 +0200" "1151968724 +0200" "1151968725 +0200"
ok 130 - Check format "raw" date fields output
expecting success:
test_date raw-local "1151968723 +0000" "1151968724 +0000" "1151968725 +0000"
ok 131 - Check format "raw-local" date fields output
expecting success:
echo "my date is 2006-07-04" >expected &&
git for-each-ref \
--format="%(authordate:format:my date is %Y-%m-%d)" \
refs/heads >actual &&
test_cmp expected actual
ok 132 - Check format of strftime date fields
expecting success:
echo "my date is 2006-07-03" >expected &&
git for-each-ref \
--format="%(authordate:format-local:my date is %Y-%m-%d)" \
refs/heads >actual &&
test_cmp expected actual
ok 133 - Check format of strftime-local date fields
expecting success:
echo >expected &&
git for-each-ref --format="%(authordate:format:)" refs/heads >actual &&
test_cmp expected actual &&
long="long format -- $ZERO_OID$ZERO_OID$ZERO_OID$ZERO_OID$ZERO_OID$ZERO_OID$ZERO_OID" &&
echo $long >expected &&
git for-each-ref --format="%(authordate:format:$long)" refs/heads >actual &&
test_cmp expected actual
ok 134 - exercise strftime with odd fields
expecting success:
git for-each-ref --format="%(refname)" --sort=refname >actual &&
test_cmp expected actual
ok 135 - Verify ascending sort
expecting success:
git for-each-ref --format="%(refname)" --sort=-refname >actual &&
test_cmp expected actual
ok 136 - Verify descending sort
expecting success:
git tag testtag-2 &&
test_when_finished "git tag -d testtag-2" &&
git for-each-ref --format="%(refname)" \
refs/tags/testtag refs/tags/testtag-2 >actual &&
test_cmp expected actual
Deleted tag 'testtag-2' (was ea12284)
ok 137 - exercise patterns with prefixes
expecting success:
git tag testtag-2 &&
test_when_finished "git tag -d testtag-2" &&
git for-each-ref --format="%(refname)" \
refs/tags/testtag "refs/tags/testtag-*" >actual &&
test_cmp expected actual
Deleted tag 'testtag-2' (was ea12284)
ok 138 - exercise glob patterns with prefixes
expecting success:
git for-each-ref --shell --format="%(refname)" >actual &&
test_cmp expected actual
ok 139 - Quoting style: shell
expecting success:
git for-each-ref --perl --format="%(refname)" >actual &&
test_cmp expected actual
ok 140 - Quoting style: perl
expecting success:
git for-each-ref --python --format="%(refname)" >actual &&
test_cmp expected actual
ok 141 - Quoting style: python
expecting success:
git for-each-ref --tcl --format="%(refname)" >actual &&
test_cmp expected actual
ok 142 - Quoting style: tcl
expecting success:
test_must_fail git for-each-ref --perl --shell 2>err &&
grep '^error: more than one quoting style' err
error: more than one quoting style?
ok 143 - more than one quoting style: --perl --shell
expecting success:
test_must_fail git for-each-ref -s --python 2>err &&
grep '^error: more than one quoting style' err
error: more than one quoting style?
ok 144 - more than one quoting style: -s --python
expecting success:
test_must_fail git for-each-ref --python --tcl 2>err &&
grep '^error: more than one quoting style' err
error: more than one quoting style?
ok 145 - more than one quoting style: --python --tcl
expecting success:
test_must_fail git for-each-ref --tcl --perl 2>err &&
grep '^error: more than one quoting style' err
error: more than one quoting style?
ok 146 - more than one quoting style: --tcl --perl
expecting success:
test_commit two
[master 4ddde45] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
ok 147 - setup for upstream:track[short]
expecting success:
git for-each-ref --format='%(upstream:track)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 148 - basic atom: head upstream:track
expecting success:
git for-each-ref --format='%(upstream:trackshort)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 149 - basic atom: head upstream:trackshort
expecting success:
git for-each-ref --format='%(upstream:track,nobracket)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 150 - basic atom: head upstream:track,nobracket
expecting success:
git for-each-ref --format='%(upstream:nobracket,track)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 151 - basic atom: head upstream:nobracket,track
expecting success:
test_commit third &&
git update-ref refs/remotes/myfork/master master &&
git reset master~1
[master f6c71aa] third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 third.t
ok 152 - setup for push:track[short]
expecting success:
git for-each-ref --format='%(push:track)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 153 - basic atom: head push:track
expecting success:
git for-each-ref --format='%(push:trackshort)' refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 154 - basic atom: head push:trackshort
expecting success:
test_must_fail git for-each-ref --format="%(refname:track)" 2>/dev/null &&
test_must_fail git for-each-ref --format="%(refname:trackshort)" 2>/dev/null
ok 155 - Check that :track[short] cannot be used with other atoms
expecting success:
cat >expected <<-\EOF &&
[gone]
EOF
test_when_finished "git config branch.master.merge refs/heads/master" &&
git config branch.master.merge refs/heads/does-not-exist &&
git for-each-ref \
--format="%(upstream:track)$LF%(upstream:trackshort)" \
refs/heads >actual &&
test_cmp expected actual
ok 156 - Check that :track[short] works when upstream is invalid
expecting success:
test_must_fail git for-each-ref --format="%(refname:INVALID)"
fatal: unrecognized %(refname:INVALID) argument: INVALID
ok 157 - Check for invalid refname format
expecting success:
cat >expected.color <<-EOF &&
$(git rev-parse --short refs/heads/master) <GREEN>master<RESET>
$(git rev-parse --short refs/remotes/myfork/master) <GREEN>myfork/master<RESET>
$(git rev-parse --short refs/remotes/origin/master) <GREEN>origin/master<RESET>
$(git rev-parse --short refs/tags/testtag) <GREEN>testtag<RESET>
$(git rev-parse --short refs/tags/third) <GREEN>third<RESET>
$(git rev-parse --short refs/tags/two) <GREEN>two<RESET>
EOF
sed "s/<[^>]*>//g" <expected.color >expected.bare &&
color_format="%(objectname:short) %(color:green)%(refname:short)"
ok 158 - set up color tests
checking prerequisite: TTY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq PERL &&
# Reading from the pty master seems to get stuck _sometimes_
# on Mac OS X 10.5.0, using Perl 5.10.0 or 5.8.9.
#
# Reproduction recipe: run
#
# i=0
# while ./test-terminal.perl echo hi $i
# do
# : $((i = $i + 1))
# done
#
# After 2000 iterations or so it hangs.
# https://rt.cpan.org/Ticket/Display.html?id=65692
#
test "$(uname -s)" != Darwin &&
perl "$TEST_DIRECTORY"/test-terminal.perl \
sh -c "test -t 1 && test -t 2"
)
prerequisite TTY ok
expecting success:
test_terminal git for-each-ref --format="$color_format" >actual.raw &&
test_decode_color <actual.raw >actual &&
test_cmp expected.color actual
ok 159 - %(color) shows color with a tty
expecting success:
TERM=vt100 git for-each-ref --format="$color_format" >actual &&
test_cmp expected.bare actual
ok 160 - %(color) does not show color without tty
expecting success:
git for-each-ref --color --format="$color_format" >actual.raw &&
test_decode_color <actual.raw >actual &&
test_cmp expected.color actual
ok 161 - --color can override tty check
expecting success:
git -c color.ui=always for-each-ref --format="$color_format" >actual &&
test_cmp expected.bare actual
ok 162 - color.ui=always does not override tty check
expecting success:
git config --bool core.warnambiguousrefs true &&
git checkout -b newtag &&
echo "Using $datestamp" > one &&
git add one &&
git commit -m "Branch" &&
setdate_and_increment &&
git tag -m "Tagging at $datestamp" master &&
git for-each-ref --format "%(refname:short)" refs/heads/master refs/tags/master >actual &&
test_cmp expected actual
Switched to a new branch 'newtag'
[newtag dd26b11] Branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 163 - Check ambiguous head and tag refs (strict)
expecting success:
git config --bool core.warnambiguousrefs false &&
git for-each-ref --format "%(refname:short)" refs/heads/master refs/tags/master >actual &&
test_cmp expected actual
ok 164 - Check ambiguous head and tag refs (loose)
expecting success:
git checkout master &&
git tag ambiguous testtag^0 &&
git branch ambiguous testtag^0 &&
git for-each-ref --format "%(refname:short)" refs/heads/ambiguous refs/tags/ambiguous >actual &&
test_cmp expected actual
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
ok 165 - Check ambiguous head and tag refs II (loose)
expecting success:
git tag -m "bogo" bogo &&
bogo=$(git cat-file tag bogo) &&
bogo=$(printf "%s" "$bogo" | git mktag) &&
git tag -f bogo "$bogo" &&
git for-each-ref --format "%(body)" refs/tags/bogo
Updated tag 'bogo' (was 89437ea)
ok 166 - an unusual tag with an incomplete line
expecting success:
cat >>msg <<-\EOF &&
the subject line
first body line
second body line
EOF
git tag -F msg subject-body
ok 167 - create tag with subject and body content
expecting success:
git for-each-ref --format='%(subject)' refs/tags/subject-body >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 168 - basic atom: refs/tags/subject-body subject
expecting success:
git for-each-ref --format='%(body)' refs/tags/subject-body >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 169 - basic atom: refs/tags/subject-body body
expecting success:
git for-each-ref --format='%(contents)' refs/tags/subject-body >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 170 - basic atom: refs/tags/subject-body contents
expecting success:
cat >msg <<-\EOF &&
first subject line
second subject line
first body line
second body line
EOF
git tag -F msg multiline
ok 171 - create tag with multiline subject
expecting success:
git for-each-ref --format='%(subject)' refs/tags/multiline >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 172 - basic atom: refs/tags/multiline subject
expecting success:
git for-each-ref --format='%(contents:subject)' refs/tags/multiline >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 173 - basic atom: refs/tags/multiline contents:subject
expecting success:
git for-each-ref --format='%(body)' refs/tags/multiline >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 174 - basic atom: refs/tags/multiline body
expecting success:
git for-each-ref --format='%(contents:body)' refs/tags/multiline >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 175 - basic atom: refs/tags/multiline contents:body
expecting success:
git for-each-ref --format='%(contents:signature)' refs/tags/multiline >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 176 - basic atom: refs/tags/multiline contents:signature
expecting success:
git for-each-ref --format='%(contents)' refs/tags/multiline >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 177 - basic atom: refs/tags/multiline contents
expecting success:
git tag -s -m "" signed-empty &&
git tag -s -m "subject line" signed-short &&
cat >msg <<-\EOF &&
subject line
body contents
EOF
git tag -s -F msg signed-long
ok 178 - create signed tags
expecting success:
git for-each-ref --format='%(subject)' refs/tags/signed-empty >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 179 - basic atom: refs/tags/signed-empty subject
expecting success:
git for-each-ref --format='%(contents:subject)' refs/tags/signed-empty >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 180 - basic atom: refs/tags/signed-empty contents:subject
expecting success:
git for-each-ref --format='%(body)' refs/tags/signed-empty >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 181 - basic atom: refs/tags/signed-empty body
expecting success:
git for-each-ref --format='%(contents:body)' refs/tags/signed-empty >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 182 - basic atom: refs/tags/signed-empty contents:body
expecting success:
git for-each-ref --format='%(contents:signature)' refs/tags/signed-empty >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 183 - basic atom: refs/tags/signed-empty contents:signature
expecting success:
git for-each-ref --format='%(contents)' refs/tags/signed-empty >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 184 - basic atom: refs/tags/signed-empty contents
expecting success:
git for-each-ref --format='%(subject)' refs/tags/signed-short >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 185 - basic atom: refs/tags/signed-short subject
expecting success:
git for-each-ref --format='%(contents:subject)' refs/tags/signed-short >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 186 - basic atom: refs/tags/signed-short contents:subject
expecting success:
git for-each-ref --format='%(body)' refs/tags/signed-short >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 187 - basic atom: refs/tags/signed-short body
expecting success:
git for-each-ref --format='%(contents:body)' refs/tags/signed-short >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 188 - basic atom: refs/tags/signed-short contents:body
expecting success:
git for-each-ref --format='%(contents:signature)' refs/tags/signed-short >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 189 - basic atom: refs/tags/signed-short contents:signature
expecting success:
git for-each-ref --format='%(contents)' refs/tags/signed-short >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 190 - basic atom: refs/tags/signed-short contents
expecting success:
git for-each-ref --format='%(subject)' refs/tags/signed-long >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 191 - basic atom: refs/tags/signed-long subject
expecting success:
git for-each-ref --format='%(contents:subject)' refs/tags/signed-long >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 192 - basic atom: refs/tags/signed-long contents:subject
expecting success:
git for-each-ref --format='%(body)' refs/tags/signed-long >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 193 - basic atom: refs/tags/signed-long body
expecting success:
git for-each-ref --format='%(contents:body)' refs/tags/signed-long >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 194 - basic atom: refs/tags/signed-long contents:body
expecting success:
git for-each-ref --format='%(contents:signature)' refs/tags/signed-long >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 195 - basic atom: refs/tags/signed-long contents:signature
expecting success:
git for-each-ref --format='%(contents)' refs/tags/signed-long >actual &&
sanitize_pgp <actual >actual.clean &&
test_cmp expected actual.clean
ok 196 - basic atom: refs/tags/signed-long contents
expecting success:
git for-each-ref --format="%(objectname) %(taggeremail) %(refname)" --sort=objectname --sort=taggeremail \
refs/tags/bogo refs/tags/master > actual &&
test_cmp expected actual
ok 197 - Verify sort with multiple keys
expecting success:
test_when_finished "git checkout master" &&
git for-each-ref --format="%(HEAD) %(refname:short)" refs/heads/ >actual &&
sed -e "s/^\* / /" actual >expect &&
git checkout --orphan orphaned-branch &&
git for-each-ref --format="%(HEAD) %(refname:short)" refs/heads/ >actual &&
test_cmp expect actual
Switched to a new branch 'orphaned-branch'
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
ok 198 - do not dereference NULL upon %(HEAD) on unborn branch
expecting success:
echo "Some contents" > two &&
git add two &&
git commit -F - <<-EOF
trailers: this commit message has trailers
Some message contents
$(cat trailers)
EOF
[master 36c72cc] trailers: this commit message has trailers
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two
ok 199 - set up trailers for next test
expecting success:
git for-each-ref --format="%(trailers:unfold)" refs/heads/master >actual &&
{
unfold <trailers
echo
} >expect &&
test_cmp expect actual
ok 200 - %(trailers:unfold) unfolds trailers
expecting success:
git for-each-ref --format="%(trailers:only)" refs/heads/master >actual &&
{
grep -v patch.description <trailers &&
echo
} >expect &&
test_cmp expect actual
ok 201 - %(trailers:only) shows only "key: value" trailers
expecting success:
git for-each-ref --format="%(trailers:only,unfold)" refs/heads/master >actual &&
git for-each-ref --format="%(trailers:unfold,only)" refs/heads/master >reverse &&
test_cmp actual reverse &&
{
grep -v patch.description <trailers | unfold &&
echo
} >expect &&
test_cmp expect actual
ok 202 - %(trailers:only) and %(trailers:unfold) work together
expecting success:
git for-each-ref --format="%(contents:trailers:unfold)" refs/heads/master >actual &&
{
unfold <trailers
echo
} >expect &&
test_cmp expect actual
ok 203 - %(contents:trailers:unfold) unfolds trailers
expecting success:
git for-each-ref --format="%(contents:trailers:only)" refs/heads/master >actual &&
{
grep -v patch.description <trailers &&
echo
} >expect &&
test_cmp expect actual
ok 204 - %(contents:trailers:only) shows only "key: value" trailers
expecting success:
git for-each-ref --format="%(contents:trailers:only,unfold)" refs/heads/master >actual &&
git for-each-ref --format="%(contents:trailers:unfold,only)" refs/heads/master >reverse &&
test_cmp actual reverse &&
{
grep -v patch.description <trailers | unfold &&
echo
} >expect &&
test_cmp expect actual
ok 205 - %(contents:trailers:only) and %(contents:trailers:unfold) work together
expecting success:
# error message cannot be checked under i18n
cat >expect <<-EOF &&
fatal: unknown %(trailers) argument: unsupported
EOF
test_must_fail git for-each-ref --format="%(trailers:unsupported)" 2>actual &&
test_i18ncmp expect actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 206 - %(trailers) rejects unknown trailers arguments
expecting success:
# error message cannot be checked under i18n
cat >expect <<-EOF &&
fatal: unknown %(trailers) argument: unsupported
EOF
test_must_fail git for-each-ref --format="%(contents:trailers:unsupported)" 2>actual &&
test_i18ncmp expect actual
ok 207 - %(contents:trailers) rejects unknown trailers arguments
expecting success:
git for-each-ref --format="%(contents:trailers)" refs/heads/master >actual &&
sanitize_pgp <actual >actual.clean &&
# git for-each-ref ends with a blank line
cat >expect <<-EOF &&
$(cat trailers)
EOF
test_cmp expect actual.clean
ok 208 - basic atom: head contents:trailers
expecting success:
git commit --allow-empty -F - <<-\EOF &&
this is the subject
This is the body. The message has a "---" line which would confuse a
message+patch parser. But here we know we have only a commit message,
so we get it right.
trailer: wrong
---
This is more body.
trailer: right
EOF
{
echo "trailer: right" &&
echo
} >expect &&
git for-each-ref --format="%(trailers)" refs/heads/master >actual &&
test_cmp expect actual
[master 162c31a] this is the subject
Author: A U Thor <author@example.com>
ok 209 - trailer parsing not fooled by --- line
expecting success:
git symbolic-ref refs/heads/sym refs/heads/master
ok 210 - Add symbolic ref for the following tests
expecting success:
git for-each-ref --format="%(symref)" refs/heads/sym >actual &&
test_cmp expected actual
ok 211 - Verify usage of %(symref) atom
expecting success:
git for-each-ref --format="%(symref:short)" refs/heads/sym >actual &&
test_cmp expected actual
ok 212 - Verify usage of %(symref:short) atom
expecting success:
git for-each-ref --format="%(symref:lstrip=2)" refs/heads/sym > actual &&
git for-each-ref --format="%(symref:lstrip=-2)" refs/heads/sym >> actual &&
test_cmp expected actual &&
git for-each-ref --format="%(symref:strip=2)" refs/heads/sym > actual &&
git for-each-ref --format="%(symref:strip=-2)" refs/heads/sym >> actual &&
test_cmp expected actual
ok 213 - Verify usage of %(symref:lstrip) atom
expecting success:
git for-each-ref --format="%(symref:rstrip=2)" refs/heads/sym > actual &&
git for-each-ref --format="%(symref:rstrip=-2)" refs/heads/sym >> actual &&
test_cmp expected actual
ok 214 - Verify usage of %(symref:rstrip) atom
expecting success:
git init remote-tests &&
(
cd remote-tests &&
test_commit initial &&
git remote add from fifth.coffee:blub &&
git config branch.master.remote from &&
git config branch.master.merge refs/heads/stable &&
git remote add to southridge.audio:repo &&
git config remote.to.push "refs/heads/*:refs/heads/pushed/*" &&
git config branch.master.pushRemote to &&
for pair in "%(upstream)=refs/remotes/from/stable" \
"%(upstream:remotename)=from" \
"%(upstream:remoteref)=refs/heads/stable" \
"%(push)=refs/remotes/to/pushed/master" \
"%(push:remotename)=to" \
"%(push:remoteref)=refs/heads/pushed/master"
do
echo "${pair#*=}" >expect &&
git for-each-ref --format="${pair%=*}" \
refs/heads/master >actual &&
test_cmp expect actual
done &&
git branch push-simple &&
git config branch.push-simple.pushRemote from &&
actual="$(git for-each-ref \
--format="%(push:remotename),%(push:remoteref)" \
refs/heads/push-simple)" &&
test from, = "$actual"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6300-for-each-ref/remote-tests/.git/
[master (root-commit) d39e3de] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
ok 215 - :remotename and :remoteref
expecting success:
git for-each-ref --format="%(refname)" refs/heads/MASTER >actual &&
test_must_be_empty actual &&
echo refs/heads/master >expect &&
git for-each-ref --format="%(refname)" --ignore-case \
refs/heads/MASTER >actual &&
test_cmp expect actual
ok 216 - for-each-ref --ignore-case ignores case
# passed all 216 test(s)
1..216
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7001-mv.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7001-mv/.git/
expecting success: mkdir path0 path1 &&
cp "$TEST_DIRECTORY"/../COPYING path0/COPYING &&
git add path0/COPYING &&
git commit -m add -a
[master (root-commit) 8af6091] add
Author: A U Thor <author@example.com>
1 file changed, 360 insertions(+)
create mode 100644 path0/COPYING
ok 1 - prepare reference tree
expecting success: cd path0 && git mv COPYING ../path1/COPYING
ok 2 - moving the file out of subdirectory
expecting success: cd .. && git commit -m move-out -a
[master 67d7dd9] move-out
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename {path0 => path1}/COPYING (100%)
ok 3 - commiting the change
expecting success: git diff-tree -r -M --name-status HEAD^ HEAD >actual &&
grep "^R100..*path0/COPYING..*path1/COPYING" actual
R100 path0/COPYING path1/COPYING
ok 4 - checking the commit
expecting success: cd path0 && git mv ../path1/COPYING COPYING
ok 5 - moving the file back into subdirectory
expecting success: cd .. && git commit -m move-in -a
[master 102f22f] move-in
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename {path1 => path0}/COPYING (100%)
ok 6 - commiting the change
expecting success: git diff-tree -r -M --name-status HEAD^ HEAD >actual &&
grep "^R100..*path1/COPYING..*path0/COPYING" actual
R100 path1/COPYING path0/COPYING
ok 7 - checking the commit
expecting success: git mv -n path0/COPYING MOVED &&
test -f path0/COPYING &&
test ! -f MOVED
Checking rename of 'path0/COPYING' to 'MOVED'
Renaming path0/COPYING to MOVED
ok 8 - mv --dry-run does not move file
expecting success: git mv -k idontexist path0
ok 9 - checking -k on non-existing file
expecting success: touch untracked1 &&
git mv -k untracked1 path0 &&
test -f untracked1 &&
test ! -f path0/untracked1
ok 10 - checking -k on untracked file
expecting success: touch untracked2 &&
git mv -k untracked1 untracked2 path0 &&
test -f untracked1 &&
test -f untracked2 &&
test ! -f path0/untracked1 &&
test ! -f path0/untracked2
ok 11 - checking -k on multiple untracked files
expecting success: touch path0/untracked1 &&
test_must_fail git mv -f untracked1 path0 &&
test ! -f .git/index.lock &&
test -f untracked1 &&
test -f path0/untracked1
fatal: not under version control, source=untracked1, destination=path0/untracked1
ok 12 - checking -f on untracked file with existing target
expecting success: test_must_fail git mv path0/COPYING no-such-dir/ &&
test_must_fail git mv path0/COPYING no-such-dir// &&
git mv path0/ no-such-dir/ &&
test_path_is_dir no-such-dir
fatal: destination directory does not exist, source=path0/COPYING, destination=no-such-dir/
fatal: destination directory does not exist, source=path0/COPYING, destination=no-such-dir/
ok 13 - moving to absent target with trailing slash
expecting success: git reset --hard
HEAD is now at 102f22f move-in
ok 14 - clean up
expecting success: mkdir path1 &&
git mv path0/ path1/ &&
test_path_is_dir path1/path0/
ok 15 - moving to existing untracked target with trailing slash
expecting success: mkdir path2 &&
>path2/file && git add path2/file &&
git mv path1/path0/ path2/ &&
test_path_is_dir path2/path0/
ok 16 - moving to existing tracked target with trailing slash
expecting success: git reset --hard
HEAD is now at 102f22f move-in
ok 17 - clean up
expecting success: cp "$TEST_DIRECTORY"/../README.md path0/README &&
git add path0/README &&
git commit -m add2 -a
[master e9372e5] add2
Author: A U Thor <author@example.com>
1 file changed, 66 insertions(+)
create mode 100644 path0/README
ok 18 - adding another file
expecting success: git mv path0 path2
ok 19 - moving whole subdirectory
expecting success: git commit -m dir-move -a
[master ff171a2] dir-move
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename {path0 => path2}/COPYING (100%)
rename {path0 => path2}/README (100%)
ok 20 - commiting the change
expecting success: git diff-tree -r -M --name-status HEAD^ HEAD >actual &&
grep "^R100..*path0/COPYING..*path2/COPYING" actual &&
grep "^R100..*path0/README..*path2/README" actual
R100 path0/COPYING path2/COPYING
R100 path0/README path2/README
ok 21 - checking the commit
expecting success: git mv path2/COPYING path2/COPYING-renamed
ok 22 - succeed when source is a prefix of destination
expecting success: git mv path2 path1
ok 23 - moving whole subdirectory into subdirectory
expecting success: git commit -m dir-move -a
[master 8e2be23] dir-move
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
rename path2/COPYING => path1/path2/COPYING-renamed (100%)
rename {path2 => path1/path2}/README (100%)
ok 24 - commiting the change
expecting success: git diff-tree -r -M --name-status HEAD^ HEAD >actual &&
grep "^R100..*path2/COPYING..*path1/path2/COPYING" actual &&
grep "^R100..*path2/README..*path1/path2/README" actual
R100 path2/COPYING path1/path2/COPYING-renamed
R100 path2/README path1/path2/README
ok 25 - checking the commit
expecting success: mkdir path0 && mkdir path0/path2 && test_must_fail git mv path2 path0
fatal: bad source, source=path2, destination=path0/path2
ok 26 - do not move directory over existing directory
expecting success: git mv path1/path2/ .
ok 27 - move into "."
expecting success:
rm -fr .git papers partA &&
git init &&
mkdir -p papers/unsorted papers/all-papers partA &&
echo a > papers/unsorted/Thesis.pdf &&
echo b > partA/outline.txt &&
echo c > papers/unsorted/_another &&
git add papers partA &&
T1=$(git write-tree) &&
git mv papers/unsorted/Thesis.pdf papers/all-papers/moo-blah.pdf &&
T=$(git write-tree) &&
git ls-tree -r $T | verbose grep partA/outline.txt
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7001-mv/.git/
100644 blob 61780798228d17af2d34fce4cfbdf35556832472 partA/outline.txt
ok 28 - Michael Cassar's test case
expecting success:
rm -fr .git &&
git init &&
mkdir ab &&
date >ab.c &&
date >ab/d &&
git add ab.c ab &&
git commit -m initial &&
git mv ab a
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7001-mv/.git/
[master (root-commit) dd40d28] initial
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 ab.c
create mode 100644 ab/d
ok 29 - Sergey Vlasov's test case
expecting success: (
rm -fr mine &&
mkdir mine &&
cd mine &&
test_create_repo one &&
cd one &&
mkdir sub &&
>sub/file &&
git add sub/file &&
git mv sub "$(pwd)/in" &&
! test -d sub &&
test -d in &&
git ls-files --error-unmatch in/file
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7001-mv/mine/one/.git/
in/file
ok 30 - absolute pathname
expecting success: (
rm -fr mine &&
mkdir mine &&
cd mine &&
out=$(pwd) &&
test_create_repo one &&
cd one &&
mkdir sub &&
>sub/file &&
git add sub/file &&
test_must_fail git mv sub "$out/out" &&
test -d sub &&
! test -d ../in &&
git ls-files --error-unmatch sub/file
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7001-mv/mine/one/.git/
fatal: '/<<PKGBUILDDIR>>/t/trash directory.t7001-mv/mine/out' is outside repository
sub/file
ok 31 - absolute pathname outside should fail
expecting success:
rm -fr .git && git init &&
mkdir dir other &&
>dir/a.txt &&
>dir/b.txt &&
git add dir/?.txt &&
git mv dir/a.txt dir/b.txt other &&
git ls-files >actual &&
{ echo other/a.txt; echo other/b.txt; } >expect &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7001-mv/.git/
ok 32 - git mv to move multiple sources into a directory
expecting success:
rm -fr .git &&
git init &&
echo 1 >dirty &&
git add dirty &&
entry="$(git ls-files --stage dirty | cut -f 1)" &&
git mv dirty dirty2 &&
[ "$entry" = "$(git ls-files --stage dirty2 | cut -f 1)" ] &&
echo 2 >dirty2 &&
git mv dirty2 dirty &&
[ "$entry" = "$(git ls-files --stage dirty | cut -f 1)" ]
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7001-mv/.git/
ok 33 - git mv should not change sha1 of moved cache entry
expecting success:
rm -fr .git &&
git init &&
echo 1 >moved &&
test_ln_s_add moved symlink &&
git add moved &&
test_must_fail git mv moved symlink &&
git mv -f moved symlink &&
! test -e moved &&
test -f symlink &&
test "$(cat symlink)" = 1 &&
git update-index --refresh &&
git diff-files --quiet
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7001-mv/.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
)
prerequisite SYMLINKS ok
fatal: destination exists, source=moved, destination=symlink
ok 34 - git mv should overwrite symlink to a file
expecting success:
rm -fr .git &&
git init &&
echo 1 >moved &&
test_ln_s_add moved symlink &&
git add moved &&
test_must_fail git mv symlink moved &&
git mv -f symlink moved &&
! test -e symlink &&
git update-index --refresh &&
git diff-files --quiet
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7001-mv/.git/
fatal: destination exists, source=symlink, destination=moved
ok 35 - git mv should overwrite file with a symlink
expecting success:
test -h moved
ok 36 - check moved symlink
expecting success:
git commit -m initial &&
git reset --hard &&
git submodule add ./. sub &&
echo content >file &&
git add file &&
git commit -m "added sub and file" &&
mkdir -p deep/directory/hierarchy &&
git submodule add ./. deep/directory/hierarchy/sub &&
git commit -m "added another submodule" &&
git branch submodule
[master (root-commit) 6db9916] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 120000 moved
HEAD is now at 6db9916 initial
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7001-mv/sub'...
done.
[master 1503a1f] added sub and file
Author: A U Thor <author@example.com>
3 files changed, 5 insertions(+)
create mode 100644 .gitmodules
create mode 100644 file
create mode 160000 sub
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7001-mv/deep/directory/hierarchy/sub'...
done.
[master a6abfc8] added another submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 160000 deep/directory/hierarchy/sub
ok 37 - setup submodule
expecting success:
test_must_fail git mv sub file
fatal: cannot move directory over file, source=sub, destination=file
ok 38 - git mv cannot move a submodule in a file
expecting success:
entry="$(git ls-files --stage sub | cut -f 1)" &&
git rm .gitmodules &&
(
cd sub &&
rm -f .git &&
cp -R -P -p ../.git/modules/sub .git &&
GIT_WORK_TREE=. git config --unset core.worktree
) &&
mkdir mod &&
git mv sub mod/sub &&
! test -e sub &&
[ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
(
cd mod/sub &&
git status
) &&
git update-index --refresh &&
git diff-files --quiet
rm '.gitmodules'
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
ok 39 - git mv moves a submodule with a .git directory and no .gitmodules
expecting success:
rm -rf mod &&
git reset --hard &&
git submodule update &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
(
cd sub &&
rm -f .git &&
cp -R -P -p ../.git/modules/sub .git &&
GIT_WORK_TREE=. git config --unset core.worktree
) &&
mkdir mod &&
git mv sub mod/sub &&
! test -e sub &&
[ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
(
cd mod/sub &&
git status
) &&
echo mod/sub >expected &&
git config -f .gitmodules submodule.sub.path >actual &&
test_cmp expected actual &&
git update-index --refresh &&
git diff-files --quiet
HEAD is now at a6abfc8 added another submodule
Submodule path 'sub': checked out '6db991652a9ae28e9e0c664cc1ca566aae814de8'
HEAD detached at 6db9916
nothing to commit, working tree clean
ok 40 - git mv moves a submodule with a .git directory and .gitmodules
expecting success:
rm -rf mod &&
git reset --hard &&
git submodule update &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
mkdir mod &&
(
cd mod &&
git mv ../sub/ .
) &&
! test -e sub &&
[ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
(
cd mod/sub &&
git status
) &&
echo mod/sub >expected &&
git config -f .gitmodules submodule.sub.path >actual &&
test_cmp expected actual &&
git update-index --refresh &&
git diff-files --quiet
HEAD is now at a6abfc8 added another submodule
Submodule path 'sub': checked out '6db991652a9ae28e9e0c664cc1ca566aae814de8'
HEAD detached at 6db9916
nothing to commit, working tree clean
ok 41 - git mv moves a submodule with gitfile
expecting success:
rm -rf mod &&
git reset --hard &&
git submodule update &&
git rm .gitmodules &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
mkdir mod &&
git mv sub mod/sub 2>actual.err &&
test_must_be_empty actual.err &&
! test -e sub &&
[ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
(
cd mod/sub &&
git status
) &&
git update-index --refresh &&
git diff-files --quiet
HEAD is now at a6abfc8 added another submodule
Submodule path 'sub': checked out '6db991652a9ae28e9e0c664cc1ca566aae814de8'
rm '.gitmodules'
HEAD detached at 6db9916
nothing to commit, working tree clean
ok 42 - mv does not complain when no .gitmodules file is found
expecting success:
rm -rf mod &&
git reset --hard &&
git submodule update &&
git config -f .gitmodules foo.bar true &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
mkdir mod &&
test_must_fail git mv sub mod/sub 2>actual.err &&
test -s actual.err &&
test -e sub &&
git diff-files --quiet -- sub &&
git add .gitmodules &&
git mv sub mod/sub 2>actual.err &&
test_must_be_empty actual.err &&
! test -e sub &&
[ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
(
cd mod/sub &&
git status
) &&
git update-index --refresh &&
git diff-files --quiet
HEAD is now at a6abfc8 added another submodule
Submodule path 'sub': checked out '6db991652a9ae28e9e0c664cc1ca566aae814de8'
HEAD detached at 6db9916
nothing to commit, working tree clean
ok 43 - mv will error out on a modified .gitmodules file unless staged
expecting success:
rm -rf mod &&
git reset --hard &&
git submodule update &&
git config -f .gitmodules --remove-section submodule.sub &&
git add .gitmodules &&
entry="$(git ls-files --stage sub | cut -f 1)" &&
echo "warning: Could not find section in .gitmodules where path=sub" >expect.err &&
mkdir mod &&
git mv sub mod/sub 2>actual.err &&
test_i18ncmp expect.err actual.err &&
! test -e sub &&
[ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
(
cd mod/sub &&
git status
) &&
git update-index --refresh &&
git diff-files --quiet
HEAD is now at a6abfc8 added another submodule
Submodule path 'sub': checked out '6db991652a9ae28e9e0c664cc1ca566aae814de8'
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
HEAD detached at 6db9916
nothing to commit, working tree clean
ok 44 - mv issues a warning when section is not found in .gitmodules
expecting success:
rm -rf mod &&
git reset --hard &&
git submodule update &&
mkdir mod &&
git mv -n sub mod/sub 2>actual.err &&
test -f sub/.git &&
git diff-index --exit-code HEAD &&
git update-index --refresh &&
git diff-files --quiet -- sub .gitmodules
HEAD is now at a6abfc8 added another submodule
Submodule path 'sub': checked out '6db991652a9ae28e9e0c664cc1ca566aae814de8'
Checking rename of 'sub' to 'mod/sub'
Renaming sub to mod/sub
ok 45 - mv --dry-run does not touch the submodule or .gitmodules
expecting success:
git mv sub sub2 &&
git commit -m "moved sub to sub2" &&
git checkout -q HEAD^ 2>actual &&
test_i18ngrep "^warning: unable to rmdir 'sub2':" actual &&
git status -s sub2 >actual &&
echo "?? sub2/" >expected &&
test_cmp expected actual &&
! test -f sub/.git &&
test -f sub2/.git &&
git submodule update &&
test -f sub/.git &&
rm -rf sub2 &&
git diff-index --exit-code HEAD &&
git update-index --refresh &&
git diff-files --quiet -- sub .gitmodules &&
git status -s sub2 >actual &&
test_must_be_empty actual
[master cfab97d] moved sub to sub2
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
rename sub => sub2 (100%)
warning: unable to rmdir 'sub2': Directory not empty
Submodule path 'sub': checked out '6db991652a9ae28e9e0c664cc1ca566aae814de8'
ok 46 - checking out a commit before submodule moved needs manual updates
expecting success:
git checkout submodule &&
mkdir dummy dest &&
git mv -k dummy sub dest &&
git status --porcelain >actual &&
grep "^R sub -> dest/sub" actual &&
git reset --hard &&
git checkout .
Switched to branch 'submodule'
R sub -> dest/sub
warning: unable to rmdir 'dest/sub': Directory not empty
HEAD is now at a6abfc8 added another submodule
Updated 0 paths from the index
ok 47 - mv -k does not accidentally destroy submodules
expecting success:
(
cd deep &&
git mv directory ../ &&
# git status would fail if the update of linking git dir to
# work dir of the submodule failed.
git status &&
git config -f ../.gitmodules submodule.deep/directory/hierarchy/sub.path >../actual &&
echo "directory/hierarchy/sub" >../expect
) &&
test_cmp expect actual
On branch submodule
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: ../.gitmodules
renamed: directory/hierarchy/sub -> ../directory/hierarchy/sub
Untracked files:
(use "git add <file>..." to include in what will be committed)
../a/
../ab.c
../actual
../actual.err
../dest/
../expect
../expect.err
../expected
../mine/
../other/
ok 48 - moving a submodule in nested directories
expecting success:
git commit -am "cleanup commit" &&
mkdir sub_nested_nested &&
(cd sub_nested_nested &&
touch nested_level2 &&
git init &&
git add . &&
git commit -m "nested level 2"
) &&
mkdir sub_nested &&
(cd sub_nested &&
touch nested_level1 &&
git init &&
git add . &&
git commit -m "nested level 1" &&
git submodule add ../sub_nested_nested &&
git commit -m "add nested level 2"
) &&
git submodule add ./sub_nested nested_move &&
git commit -m "add nested_move" &&
git submodule update --init --recursive &&
git mv nested_move sub_nested_moved &&
git status
[submodule fcf3326] cleanup commit
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
rename {deep/directory => directory}/hierarchy/sub (100%)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7001-mv/sub_nested_nested/.git/
[master (root-commit) 46927eb] nested level 2
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 nested_level2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7001-mv/sub_nested/.git/
[master (root-commit) 2338138] nested level 1
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 nested_level1
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7001-mv/sub_nested/sub_nested_nested'...
done.
[master f3f1d8a] add nested level 2
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub_nested_nested
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7001-mv/nested_move'...
done.
[submodule b8a4623] add nested_move
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 160000 nested_move
Submodule 'sub' (/<<PKGBUILDDIR>>/t/trash directory.t7001-mv/./.) registered for path 'directory/hierarchy/sub/sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7001-mv/directory/hierarchy/sub/sub'...
done.
Submodule path 'directory/hierarchy/sub/sub': checked out '6db991652a9ae28e9e0c664cc1ca566aae814de8'
Submodule 'sub_nested_nested' (/<<PKGBUILDDIR>>/t/trash directory.t7001-mv/sub_nested_nested) registered for path 'nested_move/sub_nested_nested'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7001-mv/nested_move/sub_nested_nested'...
done.
Submodule path 'nested_move/sub_nested_nested': checked out '46927ebb95840f4ec776ac434b99c52f1306c8c7'
Submodule path 'sub': checked out '6db991652a9ae28e9e0c664cc1ca566aae814de8'
On branch submodule
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: .gitmodules
renamed: nested_move -> sub_nested_moved
Untracked files:
(use "git add <file>..." to include in what will be committed)
a/
ab.c
actual
actual.err
dest/
expect
expect.err
expected
mine/
other/
sub_nested/
sub_nested_nested/
ok 49 - moving nested submodules
# passed all 49 test(s)
1..49
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t6600-test-reach.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t6600-test-reach/.git/
expecting success:
for i in $(test_seq 1 10)
do
test_commit "1-$i" &&
git branch -f commit-1-$i &&
git tag -a -m "1-$i" tag-1-$i commit-1-$i
done &&
for j in $(test_seq 1 9)
do
git reset --hard commit-$j-1 &&
x=$(($j + 1)) &&
test_commit "$x-1" &&
git branch -f commit-$x-1 &&
git tag -a -m "$x-1" tag-$x-1 commit-$x-1 &&
for i in $(test_seq 2 10)
do
git merge commit-$j-$i -m "$x-$i" &&
git branch -f commit-$x-$i &&
git tag -a -m "$x-$i" tag-$x-$i commit-$x-$i
done
done &&
git commit-graph write --reachable &&
mv .git/objects/info/commit-graph commit-graph-full &&
git show-ref -s commit-5-5 | git commit-graph write --stdin-commits &&
mv .git/objects/info/commit-graph commit-graph-half &&
git config core.commitGraph true
[master (root-commit) 0d15007] 1-1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1-1.t
[master d299b7f] 1-2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1-2.t
[master 4824988] 1-3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1-3.t
[master 365457e] 1-4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1-4.t
[master c37c079] 1-5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1-5.t
[master a87f56a] 1-6
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1-6.t
[master e7afdd6] 1-7
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1-7.t
[master 2855ea4] 1-8
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1-8.t
[master 5d90ff6] 1-9
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1-9.t
[master be2c2f9] 1-10
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 1-10.t
HEAD is now at 0d15007 1-1
[master 7393be9] 2-1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 2-1.t
Merging:
7393be9 2-1
virtual commit-1-2
found 1 common ancestor:
0d15007 1-1
Merge made by the 'recursive' strategy.
1-2.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-2.t
Merging:
1bf5db8 2-2
virtual commit-1-3
found 1 common ancestor:
d299b7f 1-2
Merge made by the 'recursive' strategy.
1-3.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-3.t
Merging:
92bd651 2-3
virtual commit-1-4
found 1 common ancestor:
4824988 1-3
Merge made by the 'recursive' strategy.
1-4.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-4.t
Merging:
a4e7c8a 2-4
virtual commit-1-5
found 1 common ancestor:
365457e 1-4
Merge made by the 'recursive' strategy.
1-5.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-5.t
Merging:
2e8320d 2-5
virtual commit-1-6
found 1 common ancestor:
c37c079 1-5
Merge made by the 'recursive' strategy.
1-6.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-6.t
Merging:
cad3ed9 2-6
virtual commit-1-7
found 1 common ancestor:
a87f56a 1-6
Merge made by the 'recursive' strategy.
1-7.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-7.t
Merging:
aac73ea 2-7
virtual commit-1-8
found 1 common ancestor:
e7afdd6 1-7
Merge made by the 'recursive' strategy.
1-8.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-8.t
Merging:
239f00a 2-8
virtual commit-1-9
found 1 common ancestor:
2855ea4 1-8
Merge made by the 'recursive' strategy.
1-9.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-9.t
Merging:
7d3e798 2-9
virtual commit-1-10
found 1 common ancestor:
5d90ff6 1-9
Merge made by the 'recursive' strategy.
1-10.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-10.t
HEAD is now at 7393be9 2-1
[master 3195915] 3-1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 3-1.t
Merging:
3195915 3-1
virtual commit-2-2
found 1 common ancestor:
7393be9 2-1
Merge made by the 'recursive' strategy.
1-2.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-2.t
Merging:
ffdcde5 3-2
virtual commit-2-3
found 1 common ancestor:
1bf5db8 2-2
Merge made by the 'recursive' strategy.
1-3.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-3.t
Merging:
8ef79ca 3-3
virtual commit-2-4
found 1 common ancestor:
92bd651 2-3
Merge made by the 'recursive' strategy.
1-4.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-4.t
Merging:
8a1d716 3-4
virtual commit-2-5
found 1 common ancestor:
a4e7c8a 2-4
Merge made by the 'recursive' strategy.
1-5.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-5.t
Merging:
8db6a6c 3-5
virtual commit-2-6
found 1 common ancestor:
2e8320d 2-5
Merge made by the 'recursive' strategy.
1-6.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-6.t
Merging:
491496e 3-6
virtual commit-2-7
found 1 common ancestor:
cad3ed9 2-6
Merge made by the 'recursive' strategy.
1-7.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-7.t
Merging:
eb0ba81 3-7
virtual commit-2-8
found 1 common ancestor:
aac73ea 2-7
Merge made by the 'recursive' strategy.
1-8.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-8.t
Merging:
90b5f9f 3-8
virtual commit-2-9
found 1 common ancestor:
239f00a 2-8
Merge made by the 'recursive' strategy.
1-9.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-9.t
Merging:
a78eaa3 3-9
virtual commit-2-10
found 1 common ancestor:
7d3e798 2-9
Merge made by the 'recursive' strategy.
1-10.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-10.t
HEAD is now at 3195915 3-1
[master af41a20] 4-1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 4-1.t
Merging:
af41a20 4-1
virtual commit-3-2
found 1 common ancestor:
3195915 3-1
Merge made by the 'recursive' strategy.
1-2.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-2.t
Merging:
b6ad88f 4-2
virtual commit-3-3
found 1 common ancestor:
ffdcde5 3-2
Merge made by the 'recursive' strategy.
1-3.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-3.t
Merging:
a3e50c3 4-3
virtual commit-3-4
found 1 common ancestor:
8ef79ca 3-3
Merge made by the 'recursive' strategy.
1-4.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-4.t
Merging:
52bf1f6 4-4
virtual commit-3-5
found 1 common ancestor:
8a1d716 3-4
Merge made by the 'recursive' strategy.
1-5.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-5.t
Merging:
aaafa12 4-5
virtual commit-3-6
found 1 common ancestor:
8db6a6c 3-5
Merge made by the 'recursive' strategy.
1-6.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-6.t
Merging:
9fb3c9b 4-6
virtual commit-3-7
found 1 common ancestor:
491496e 3-6
Merge made by the 'recursive' strategy.
1-7.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-7.t
Merging:
92fb89f 4-7
virtual commit-3-8
found 1 common ancestor:
eb0ba81 3-7
Merge made by the 'recursive' strategy.
1-8.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-8.t
Merging:
ee4640a 4-8
virtual commit-3-9
found 1 common ancestor:
90b5f9f 3-8
Merge made by the 'recursive' strategy.
1-9.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-9.t
Merging:
d5102f0 4-9
virtual commit-3-10
found 1 common ancestor:
a78eaa3 3-9
Merge made by the 'recursive' strategy.
1-10.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-10.t
HEAD is now at af41a20 4-1
[master 2948e13] 5-1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 5-1.t
Merging:
2948e13 5-1
virtual commit-4-2
found 1 common ancestor:
af41a20 4-1
Merge made by the 'recursive' strategy.
1-2.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-2.t
Merging:
b4e848b 5-2
virtual commit-4-3
found 1 common ancestor:
b6ad88f 4-2
Merge made by the 'recursive' strategy.
1-3.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-3.t
Merging:
4364d77 5-3
virtual commit-4-4
found 1 common ancestor:
a3e50c3 4-3
Merge made by the 'recursive' strategy.
1-4.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-4.t
Merging:
95c9df8 5-4
virtual commit-4-5
found 1 common ancestor:
52bf1f6 4-4
Merge made by the 'recursive' strategy.
1-5.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-5.t
Merging:
4174002 5-5
virtual commit-4-6
found 1 common ancestor:
aaafa12 4-5
Merge made by the 'recursive' strategy.
1-6.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-6.t
Merging:
20b3a70 5-6
virtual commit-4-7
found 1 common ancestor:
9fb3c9b 4-6
Merge made by the 'recursive' strategy.
1-7.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-7.t
Merging:
06046bd 5-7
virtual commit-4-8
found 1 common ancestor:
92fb89f 4-7
Merge made by the 'recursive' strategy.
1-8.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-8.t
Merging:
48b11e0 5-8
virtual commit-4-9
found 1 common ancestor:
ee4640a 4-8
Merge made by the 'recursive' strategy.
1-9.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-9.t
Merging:
17d7515 5-9
virtual commit-4-10
found 1 common ancestor:
d5102f0 4-9
Merge made by the 'recursive' strategy.
1-10.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-10.t
HEAD is now at 2948e13 5-1
[master d213662] 6-1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 6-1.t
Merging:
d213662 6-1
virtual commit-5-2
found 1 common ancestor:
2948e13 5-1
Merge made by the 'recursive' strategy.
1-2.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-2.t
Merging:
b611247 6-2
virtual commit-5-3
found 1 common ancestor:
b4e848b 5-2
Merge made by the 'recursive' strategy.
1-3.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-3.t
Merging:
a14f9cb 6-3
virtual commit-5-4
found 1 common ancestor:
4364d77 5-3
Merge made by the 'recursive' strategy.
1-4.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-4.t
Merging:
8f21391 6-4
virtual commit-5-5
found 1 common ancestor:
95c9df8 5-4
Merge made by the 'recursive' strategy.
1-5.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-5.t
Merging:
2bb630e 6-5
virtual commit-5-6
found 1 common ancestor:
4174002 5-5
Merge made by the 'recursive' strategy.
1-6.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-6.t
Merging:
98cc5ec 6-6
virtual commit-5-7
found 1 common ancestor:
20b3a70 5-6
Merge made by the 'recursive' strategy.
1-7.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-7.t
Merging:
9c0ab3e 6-7
virtual commit-5-8
found 1 common ancestor:
06046bd 5-7
Merge made by the 'recursive' strategy.
1-8.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-8.t
Merging:
3824dbc 6-8
virtual commit-5-9
found 1 common ancestor:
48b11e0 5-8
Merge made by the 'recursive' strategy.
1-9.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-9.t
Merging:
e8b8a49 6-9
virtual commit-5-10
found 1 common ancestor:
17d7515 5-9
Merge made by the 'recursive' strategy.
1-10.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-10.t
HEAD is now at d213662 6-1
[master 3c4cef0] 7-1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 7-1.t
Merging:
3c4cef0 7-1
virtual commit-6-2
found 1 common ancestor:
d213662 6-1
Merge made by the 'recursive' strategy.
1-2.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-2.t
Merging:
fc239af 7-2
virtual commit-6-3
found 1 common ancestor:
b611247 6-2
Merge made by the 'recursive' strategy.
1-3.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-3.t
Merging:
772be73 7-3
virtual commit-6-4
found 1 common ancestor:
a14f9cb 6-3
Merge made by the 'recursive' strategy.
1-4.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-4.t
Merging:
3ca79c9 7-4
virtual commit-6-5
found 1 common ancestor:
8f21391 6-4
Merge made by the 'recursive' strategy.
1-5.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-5.t
Merging:
d023c5c 7-5
virtual commit-6-6
found 1 common ancestor:
2bb630e 6-5
Merge made by the 'recursive' strategy.
1-6.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-6.t
Merging:
254441b 7-6
virtual commit-6-7
found 1 common ancestor:
98cc5ec 6-6
Merge made by the 'recursive' strategy.
1-7.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-7.t
Merging:
194d475 7-7
virtual commit-6-8
found 1 common ancestor:
9c0ab3e 6-7
Merge made by the 'recursive' strategy.
1-8.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-8.t
Merging:
001094e 7-8
virtual commit-6-9
found 1 common ancestor:
3824dbc 6-8
Merge made by the 'recursive' strategy.
1-9.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-9.t
Merging:
bfd4d81 7-9
virtual commit-6-10
found 1 common ancestor:
e8b8a49 6-9
Merge made by the 'recursive' strategy.
1-10.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-10.t
HEAD is now at 3c4cef0 7-1
[master 25a847a] 8-1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 8-1.t
Merging:
25a847a 8-1
virtual commit-7-2
found 1 common ancestor:
3c4cef0 7-1
Merge made by the 'recursive' strategy.
1-2.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-2.t
Merging:
6ea0ec6 8-2
virtual commit-7-3
found 1 common ancestor:
fc239af 7-2
Merge made by the 'recursive' strategy.
1-3.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-3.t
Merging:
0968afe 8-3
virtual commit-7-4
found 1 common ancestor:
772be73 7-3
Merge made by the 'recursive' strategy.
1-4.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-4.t
Merging:
c6a12b0 8-4
virtual commit-7-5
found 1 common ancestor:
3ca79c9 7-4
Merge made by the 'recursive' strategy.
1-5.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-5.t
Merging:
e223128 8-5
virtual commit-7-6
found 1 common ancestor:
d023c5c 7-5
Merge made by the 'recursive' strategy.
1-6.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-6.t
Merging:
f863cb8 8-6
virtual commit-7-7
found 1 common ancestor:
254441b 7-6
Merge made by the 'recursive' strategy.
1-7.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-7.t
Merging:
6337e52 8-7
virtual commit-7-8
found 1 common ancestor:
194d475 7-7
Merge made by the 'recursive' strategy.
1-8.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-8.t
Merging:
c59194d 8-8
virtual commit-7-9
found 1 common ancestor:
001094e 7-8
Merge made by the 'recursive' strategy.
1-9.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-9.t
Merging:
ccddb60 8-9
virtual commit-7-10
found 1 common ancestor:
bfd4d81 7-9
Merge made by the 'recursive' strategy.
1-10.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-10.t
HEAD is now at 25a847a 8-1
[master 48082f2] 9-1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 9-1.t
Merging:
48082f2 9-1
virtual commit-8-2
found 1 common ancestor:
25a847a 8-1
Merge made by the 'recursive' strategy.
1-2.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-2.t
Merging:
af387a3 9-2
virtual commit-8-3
found 1 common ancestor:
6ea0ec6 8-2
Merge made by the 'recursive' strategy.
1-3.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-3.t
Merging:
d6b5c7e 9-3
virtual commit-8-4
found 1 common ancestor:
0968afe 8-3
Merge made by the 'recursive' strategy.
1-4.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-4.t
Merging:
208d869 9-4
virtual commit-8-5
found 1 common ancestor:
c6a12b0 8-4
Merge made by the 'recursive' strategy.
1-5.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-5.t
Merging:
04ce14a 9-5
virtual commit-8-6
found 1 common ancestor:
e223128 8-5
Merge made by the 'recursive' strategy.
1-6.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-6.t
Merging:
95ec0bb 9-6
virtual commit-8-7
found 1 common ancestor:
f863cb8 8-6
Merge made by the 'recursive' strategy.
1-7.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-7.t
Merging:
9db19ce 9-7
virtual commit-8-8
found 1 common ancestor:
6337e52 8-7
Merge made by the 'recursive' strategy.
1-8.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-8.t
Merging:
1140e64 9-8
virtual commit-8-9
found 1 common ancestor:
c59194d 8-8
Merge made by the 'recursive' strategy.
1-9.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-9.t
Merging:
b96ffc8 9-9
virtual commit-8-10
found 1 common ancestor:
ccddb60 8-9
Merge made by the 'recursive' strategy.
1-10.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-10.t
HEAD is now at 48082f2 9-1
[master b42f416] 10-1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 10-1.t
Merging:
b42f416 10-1
virtual commit-9-2
found 1 common ancestor:
48082f2 9-1
Merge made by the 'recursive' strategy.
1-2.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-2.t
Merging:
08aefe5 10-2
virtual commit-9-3
found 1 common ancestor:
af387a3 9-2
Merge made by the 'recursive' strategy.
1-3.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-3.t
Merging:
1f1c74f 10-3
virtual commit-9-4
found 1 common ancestor:
d6b5c7e 9-3
Merge made by the 'recursive' strategy.
1-4.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-4.t
Merging:
97ae747 10-4
virtual commit-9-5
found 1 common ancestor:
208d869 9-4
Merge made by the 'recursive' strategy.
1-5.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-5.t
Merging:
edcde8e 10-5
virtual commit-9-6
found 1 common ancestor:
04ce14a 9-5
Merge made by the 'recursive' strategy.
1-6.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-6.t
Merging:
aa4c999 10-6
virtual commit-9-7
found 1 common ancestor:
95ec0bb 9-6
Merge made by the 'recursive' strategy.
1-7.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-7.t
Merging:
6d7cc92 10-7
virtual commit-9-8
found 1 common ancestor:
9db19ce 9-7
Merge made by the 'recursive' strategy.
1-8.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-8.t
Merging:
4ad1d23 10-8
virtual commit-9-9
found 1 common ancestor:
1140e64 9-8
Merge made by the 'recursive' strategy.
1-9.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-9.t
Merging:
28a5e4c 10-9
virtual commit-9-10
found 1 common ancestor:
b96ffc8 9-9
Merge made by the 'recursive' strategy.
1-10.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 1-10.t
Computing commit graph generation numbers: 1% (1/100)
Computing commit graph generation numbers: 2% (2/100)
Computing commit graph generation numbers: 3% (3/100)
Computing commit graph generation numbers: 4% (4/100)
Computing commit graph generation numbers: 5% (5/100)
Computing commit graph generation numbers: 6% (6/100)
Computing commit graph generation numbers: 7% (7/100)
Computing commit graph generation numbers: 8% (8/100)
Computing commit graph generation numbers: 9% (9/100)
Computing commit graph generation numbers: 10% (10/100)
Computing commit graph generation numbers: 11% (11/100)
Computing commit graph generation numbers: 12% (12/100)
Computing commit graph generation numbers: 13% (13/100)
Computing commit graph generation numbers: 14% (14/100)
Computing commit graph generation numbers: 15% (15/100)
Computing commit graph generation numbers: 16% (16/100)
Computing commit graph generation numbers: 17% (17/100)
Computing commit graph generation numbers: 18% (18/100)
Computing commit graph generation numbers: 19% (19/100)
Computing commit graph generation numbers: 20% (20/100)
Computing commit graph generation numbers: 21% (21/100)
Computing commit graph generation numbers: 22% (22/100)
Computing commit graph generation numbers: 23% (23/100)
Computing commit graph generation numbers: 24% (24/100)
Computing commit graph generation numbers: 25% (25/100)
Computing commit graph generation numbers: 26% (26/100)
Computing commit graph generation numbers: 27% (27/100)
Computing commit graph generation numbers: 28% (28/100)
Computing commit graph generation numbers: 29% (29/100)
Computing commit graph generation numbers: 30% (30/100)
Computing commit graph generation numbers: 31% (31/100)
Computing commit graph generation numbers: 32% (32/100)
Computing commit graph generation numbers: 33% (33/100)
Computing commit graph generation numbers: 34% (34/100)
Computing commit graph generation numbers: 35% (35/100)
Computing commit graph generation numbers: 36% (36/100)
Computing commit graph generation numbers: 37% (37/100)
Computing commit graph generation numbers: 38% (38/100)
Computing commit graph generation numbers: 39% (39/100)
Computing commit graph generation numbers: 40% (40/100)
Computing commit graph generation numbers: 41% (41/100)
Computing commit graph generation numbers: 42% (42/100)
Computing commit graph generation numbers: 43% (43/100)
Computing commit graph generation numbers: 44% (44/100)
Computing commit graph generation numbers: 45% (45/100)
Computing commit graph generation numbers: 46% (46/100)
Computing commit graph generation numbers: 47% (47/100)
Computing commit graph generation numbers: 48% (48/100)
Computing commit graph generation numbers: 49% (49/100)
Computing commit graph generation numbers: 50% (50/100)
Computing commit graph generation numbers: 51% (51/100)
Computing commit graph generation numbers: 52% (52/100)
Computing commit graph generation numbers: 53% (53/100)
Computing commit graph generation numbers: 54% (54/100)
Computing commit graph generation numbers: 55% (55/100)
Computing commit graph generation numbers: 56% (56/100)
Computing commit graph generation numbers: 57% (57/100)
Computing commit graph generation numbers: 58% (58/100)
Computing commit graph generation numbers: 59% (59/100)
Computing commit graph generation numbers: 60% (60/100)
Computing commit graph generation numbers: 61% (61/100)
Computing commit graph generation numbers: 62% (62/100)
Computing commit graph generation numbers: 63% (63/100)
Computing commit graph generation numbers: 64% (64/100)
Computing commit graph generation numbers: 65% (65/100)
Computing commit graph generation numbers: 66% (66/100)
Computing commit graph generation numbers: 67% (67/100)
Computing commit graph generation numbers: 68% (68/100)
Computing commit graph generation numbers: 69% (69/100)
Computing commit graph generation numbers: 70% (70/100)
Computing commit graph generation numbers: 71% (71/100)
Computing commit graph generation numbers: 72% (72/100)
Computing commit graph generation numbers: 73% (73/100)
Computing commit graph generation numbers: 74% (74/100)
Computing commit graph generation numbers: 75% (75/100)
Computing commit graph generation numbers: 76% (76/100)
Computing commit graph generation numbers: 77% (77/100)
Computing commit graph generation numbers: 78% (78/100)
Computing commit graph generation numbers: 79% (79/100)
Computing commit graph generation numbers: 80% (80/100)
Computing commit graph generation numbers: 81% (81/100)
Computing commit graph generation numbers: 82% (82/100)
Computing commit graph generation numbers: 83% (83/100)
Computing commit graph generation numbers: 84% (84/100)
Computing commit graph generation numbers: 85% (85/100)
Computing commit graph generation numbers: 86% (86/100)
Computing commit graph generation numbers: 87% (87/100)
Computing commit graph generation numbers: 88% (88/100)
Computing commit graph generation numbers: 89% (89/100)
Computing commit graph generation numbers: 90% (90/100)
Computing commit graph generation numbers: 91% (91/100)
Computing commit graph generation numbers: 92% (92/100)
Computing commit graph generation numbers: 93% (93/100)
Computing commit graph generation numbers: 94% (94/100)
Computing commit graph generation numbers: 95% (95/100)
Computing commit graph generation numbers: 96% (96/100)
Computing commit graph generation numbers: 97% (97/100)
Computing commit graph generation numbers: 98% (98/100)
Computing commit graph generation numbers: 99% (99/100)
Computing commit graph generation numbers: 100% (100/100)
Computing commit graph generation numbers: 100% (100/100), done.
Computing commit graph generation numbers: 4% (1/25)
Computing commit graph generation numbers: 8% (2/25)
Computing commit graph generation numbers: 12% (3/25)
Computing commit graph generation numbers: 16% (4/25)
Computing commit graph generation numbers: 20% (5/25)
Computing commit graph generation numbers: 24% (6/25)
Computing commit graph generation numbers: 28% (7/25)
Computing commit graph generation numbers: 32% (8/25)
Computing commit graph generation numbers: 36% (9/25)
Computing commit graph generation numbers: 40% (10/25)
Computing commit graph generation numbers: 44% (11/25)
Computing commit graph generation numbers: 48% (12/25)
Computing commit graph generation numbers: 52% (13/25)
Computing commit graph generation numbers: 56% (14/25)
Computing commit graph generation numbers: 60% (15/25)
Computing commit graph generation numbers: 64% (16/25)
Computing commit graph generation numbers: 68% (17/25)
Computing commit graph generation numbers: 72% (18/25)
Computing commit graph generation numbers: 76% (19/25)
Computing commit graph generation numbers: 80% (20/25)
Computing commit graph generation numbers: 84% (21/25)
Computing commit graph generation numbers: 88% (22/25)
Computing commit graph generation numbers: 92% (23/25)
Computing commit graph generation numbers: 96% (24/25)
Computing commit graph generation numbers: 100% (25/25)
Computing commit graph generation numbers: 100% (25/25), done.
ok 1 - setup
expecting success:
cat >input <<-\EOF &&
A:commit-5-7
B:commit-4-9
EOF
echo "ref_newer(A,B):0" >expect &&
test_three_modes ref_newer
ok 2 - ref_newer:miss
expecting success:
cat >input <<-\EOF &&
A:commit-5-7
B:commit-2-3
EOF
echo "ref_newer(A,B):1" >expect &&
test_three_modes ref_newer
ok 3 - ref_newer:hit
expecting success:
cat >input <<-\EOF &&
A:commit-5-7
B:commit-8-8
EOF
echo "in_merge_bases(A,B):1" >expect &&
test_three_modes in_merge_bases
ok 4 - in_merge_bases:hit
expecting success:
cat >input <<-\EOF &&
A:commit-6-8
B:commit-5-9
EOF
echo "in_merge_bases(A,B):0" >expect &&
test_three_modes in_merge_bases
ok 5 - in_merge_bases:miss
expecting success:
cat >input <<-\EOF &&
A:commit-5-7
X:commit-4-8
X:commit-6-6
X:commit-1-1
EOF
echo "is_descendant_of(A,X):1" >expect &&
test_three_modes is_descendant_of
ok 6 - is_descendant_of:hit
expecting success:
cat >input <<-\EOF &&
A:commit-6-8
X:commit-5-9
X:commit-4-10
X:commit-7-6
EOF
echo "is_descendant_of(A,X):0" >expect &&
test_three_modes is_descendant_of
ok 7 - is_descendant_of:miss
expecting success:
cat >input <<-\EOF &&
A:commit-5-7
X:commit-4-8
X:commit-6-6
X:commit-8-3
EOF
{
echo "get_merge_bases_many(A,X):" &&
git rev-parse commit-5-6 \
commit-4-7 | sort
} >expect &&
test_three_modes get_merge_bases_many
ok 8 - get_merge_bases_many
expecting success:
cat >input <<-\EOF &&
X:commit-1-10
X:commit-2-8
X:commit-3-6
X:commit-4-4
X:commit-1-7
X:commit-2-5
X:commit-3-3
X:commit-5-1
EOF
{
echo "reduce_heads(X):" &&
git rev-parse commit-5-1 \
commit-4-4 \
commit-3-6 \
commit-2-8 \
commit-1-10 | sort
} >expect &&
test_three_modes reduce_heads
ok 9 - reduce_heads
expecting success:
cat >input <<-\EOF &&
X:commit-2-10
X:commit-3-9
X:commit-4-8
X:commit-5-7
X:commit-6-6
X:commit-7-5
X:commit-8-4
X:commit-9-3
Y:commit-1-9
Y:commit-2-8
Y:commit-3-7
Y:commit-4-6
Y:commit-5-5
Y:commit-6-4
Y:commit-7-3
Y:commit-8-1
EOF
echo "can_all_from_reach(X,Y):1" >expect &&
test_three_modes can_all_from_reach
ok 10 - can_all_from_reach:hit
expecting success:
cat >input <<-\EOF &&
X:commit-2-10
X:commit-3-9
X:commit-4-8
X:commit-5-7
X:commit-6-6
X:commit-7-5
X:commit-8-4
X:commit-9-3
Y:commit-1-9
Y:commit-2-8
Y:commit-3-7
Y:commit-4-6
Y:commit-5-5
Y:commit-6-4
Y:commit-8-5
EOF
echo "can_all_from_reach(X,Y):0" >expect &&
test_three_modes can_all_from_reach
ok 11 - can_all_from_reach:miss
expecting success:
cat >input <<-\EOF &&
X:tag-2-10
X:tag-3-9
X:tag-4-8
X:commit-5-7
X:commit-6-6
X:commit-7-5
X:commit-8-4
X:commit-9-3
Y:tag-1-9
Y:tag-2-8
Y:tag-3-7
Y:commit-4-6
Y:commit-5-5
Y:commit-6-4
Y:commit-7-3
Y:commit-8-1
EOF
echo "can_all_from_reach_with_flag(X,_,_,0,0):1" >expect &&
test_three_modes can_all_from_reach_with_flag
ok 12 - can_all_from_reach_with_flag: tags case
expecting success:
cat >input <<-\EOF &&
A:commit-7-7
X:commit-2-10
X:commit-3-9
X:commit-4-8
X:commit-5-7
X:commit-6-6
X:commit-7-5
X:commit-8-4
X:commit-9-3
EOF
echo "commit_contains(_,A,X,_):1" >expect &&
test_three_modes commit_contains &&
test_three_modes commit_contains --tag
ok 13 - commit_contains:hit
expecting success:
cat >input <<-\EOF &&
A:commit-6-5
X:commit-2-10
X:commit-3-9
X:commit-4-8
X:commit-5-7
X:commit-6-6
X:commit-7-5
X:commit-8-4
X:commit-9-3
EOF
echo "commit_contains(_,A,X,_):0" >expect &&
test_three_modes commit_contains &&
test_three_modes commit_contains --tag
ok 14 - commit_contains:miss
expecting success:
git rev-parse \
commit-6-6 commit-5-6 commit-4-6 commit-3-6 commit-2-6 commit-1-6 \
commit-6-5 commit-5-5 commit-4-5 commit-3-5 commit-2-5 commit-1-5 \
commit-6-4 commit-5-4 commit-4-4 commit-3-4 commit-2-4 commit-1-4 \
commit-6-3 commit-5-3 commit-4-3 commit-3-3 commit-2-3 commit-1-3 \
commit-6-2 commit-5-2 commit-4-2 commit-3-2 commit-2-2 commit-1-2 \
commit-6-1 commit-5-1 commit-4-1 commit-3-1 commit-2-1 commit-1-1 \
>expect &&
run_three_modes git rev-list --topo-order commit-6-6
ok 15 - rev-list: basic topo-order
expecting success:
git rev-parse \
commit-6-6 \
commit-6-5 \
commit-6-4 \
commit-6-3 \
commit-6-2 \
commit-6-1 commit-5-1 commit-4-1 commit-3-1 commit-2-1 commit-1-1 \
>expect &&
run_three_modes git rev-list --first-parent --topo-order commit-6-6
ok 16 - rev-list: first-parent topo-order
expecting success:
git rev-parse \
commit-6-6 commit-5-6 commit-4-6 commit-3-6 commit-2-6 commit-1-6 \
commit-6-5 commit-5-5 commit-4-5 commit-3-5 commit-2-5 commit-1-5 \
commit-6-4 commit-5-4 commit-4-4 commit-3-4 commit-2-4 commit-1-4 \
commit-6-3 commit-5-3 commit-4-3 \
commit-6-2 commit-5-2 commit-4-2 \
commit-6-1 commit-5-1 commit-4-1 \
>expect &&
run_three_modes git rev-list --topo-order commit-3-3..commit-6-6
ok 17 - rev-list: range topo-order
expecting success:
git rev-parse \
commit-6-6 commit-5-6 commit-4-6 \
commit-6-5 commit-5-5 commit-4-5 \
commit-6-4 commit-5-4 commit-4-4 \
commit-6-3 commit-5-3 commit-4-3 \
commit-6-2 commit-5-2 commit-4-2 \
commit-6-1 commit-5-1 commit-4-1 \
>expect &&
run_three_modes git rev-list --topo-order commit-3-8..commit-6-6
ok 18 - rev-list: range topo-order
expecting success:
git rev-parse \
commit-6-6 \
commit-6-5 \
commit-6-4 \
commit-6-3 \
commit-6-2 \
commit-6-1 commit-5-1 commit-4-1 \
>expect &&
run_three_modes git rev-list --first-parent --topo-order commit-3-8..commit-6-6
ok 19 - rev-list: first-parent range topo-order
expecting success:
git rev-parse \
commit-6-6 commit-5-6 commit-4-6 commit-3-6 \
commit-6-5 commit-5-5 commit-4-5 commit-3-5 \
commit-6-4 commit-5-4 commit-4-4 commit-3-4 \
commit-6-3 commit-5-3 commit-4-3 \
>expect &&
run_three_modes git rev-list --topo-order --ancestry-path commit-3-3..commit-6-6
ok 20 - rev-list: ancestry-path topo-order
expecting success:
git rev-parse \
commit-6-6 commit-5-6 commit-4-6 \
commit-6-5 commit-5-5 commit-4-5 \
commit-6-4 commit-5-4 commit-4-4 \
commit-6-3 commit-5-3 commit-4-3 \
commit-6-2 commit-5-2 commit-4-2 \
commit-6-1 commit-5-1 commit-4-1 \
commit-3-8 commit-2-8 commit-1-8 \
commit-3-7 commit-2-7 commit-1-7 \
>expect &&
run_three_modes git rev-list --topo-order commit-3-8...commit-6-6
ok 21 - rev-list: symmetric difference topo-order
expecting success:
cat >input <<-\EOF &&
X:commit-9-1
X:commit-8-3
X:commit-7-5
X:commit-6-6
X:commit-1-7
Y:commit-3-3
Y:commit-1-7
Y:commit-5-6
EOF
(
echo "get_reachable_subset(X,Y)" &&
git rev-parse commit-3-3 \
commit-1-7 \
commit-5-6 | sort
) >expect &&
test_three_modes get_reachable_subset
ok 22 - get_reachable_subset:all
expecting success:
cat >input <<-\EOF &&
X:commit-9-1
X:commit-8-3
X:commit-7-5
X:commit-1-7
Y:commit-3-3
Y:commit-1-7
Y:commit-5-6
EOF
(
echo "get_reachable_subset(X,Y)" &&
git rev-parse commit-3-3 \
commit-1-7 | sort
) >expect &&
test_three_modes get_reachable_subset
ok 23 - get_reachable_subset:some
expecting success:
cat >input <<-\EOF &&
X:commit-9-1
X:commit-8-3
X:commit-7-5
X:commit-1-7
Y:commit-9-3
Y:commit-7-6
Y:commit-2-8
EOF
echo "get_reachable_subset(X,Y)" >expect &&
test_three_modes get_reachable_subset
ok 24 - get_reachable_subset:none
# passed all 24 test(s)
1..24
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7005-editor.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7005-editor/.git/
expecting success:
vi=$(TERM=vt100 git var GIT_EDITOR) &&
test -n "$vi"
ok 1 - determine default editor
expecting success:
msg="Hand-edited" &&
test_commit "$msg" &&
echo "$msg" >expect &&
git show -s --format=%s > actual &&
test_cmp expect actual
[master (root-commit) 2ddcc77] Hand-edited
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 Hand-edited.t
ok 2 - setup
expecting success:
if git commit --amend
then
echo "Oops?"
false
else
: happy
fi
error: Terminal is dumb, but EDITOR unset
Please supply the message using either -m or -F option.
ok 3 - dumb should error out when falling back on vi
expecting success:
EDITOR=./e-EDITOR.sh &&
VISUAL=./e-VISUAL.sh &&
export EDITOR VISUAL &&
git commit --amend &&
test "$(git show -s --format=%s)" = "Edited by EDITOR"
[master 7eecd8c] Edited by EDITOR
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 Hand-edited.t
ok 4 - dumb should prefer EDITOR to VISUAL
expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
test_cmp expect actual
[master 5b7078a] Edited by editor
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 Hand-edited.t
ok 5 - Using editor
expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
test_cmp expect actual
[master 7eecd8c] Edited by EDITOR
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 Hand-edited.t
ok 6 - Using EDITOR
expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
test_cmp expect actual
[master 2ee1d44] Edited by VISUAL
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 Hand-edited.t
ok 7 - Using VISUAL
expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
test_cmp expect actual
[master 1c851bb] Edited by core_editor
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 Hand-edited.t
ok 8 - Using core_editor
expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
test_cmp expect actual
[master 1bdd03b] Edited by GIT_EDITOR
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 Hand-edited.t
ok 9 - Using GIT_EDITOR
expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
test_cmp expect actual
[master 5b7078a] Edited by editor
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 Hand-edited.t
ok 10 - Using editor (override)
expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
test_cmp expect actual
[master 7eecd8c] Edited by EDITOR
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 Hand-edited.t
ok 11 - Using EDITOR (override)
expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
test_cmp expect actual
[master 2ee1d44] Edited by VISUAL
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 Hand-edited.t
ok 12 - Using VISUAL (override)
expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
test_cmp expect actual
[master 1c851bb] Edited by core_editor
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 Hand-edited.t
ok 13 - Using core_editor (override)
expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
test_cmp expect actual
[master 1bdd03b] Edited by GIT_EDITOR
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 Hand-edited.t
ok 14 - Using GIT_EDITOR (override)
expecting success:
echo "echo space >\"\$1\"" >"e space.sh" &&
chmod a+x "e space.sh" &&
GIT_EDITOR="./e\ space.sh" git commit --amend &&
test space = "$(git show -s --pretty=format:%s)"
[master 5d9c28a] space
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 Hand-edited.t
ok 15 - editor with a space
expecting success:
git config core.editor \"./e\ space.sh\" &&
git commit --amend &&
test space = "$(git show -s --pretty=format:%s)"
[master 5d9c28a] space
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 1 insertion(+)
create mode 100644 Hand-edited.t
ok 16 - core.editor with a space
# passed all 16 test(s)
1..16
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7007-show.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7007-show/.git/
expecting success:
echo hello world >foo &&
H=$(git hash-object -w foo) &&
git tag -a foo-tag -m "Tags $H" $H &&
HH=$(expr "$H" : "\(..\)") &&
H38=$(expr "$H" : "..\(.*\)") &&
rm -f .git/objects/$HH/$H38
ok 1 - setup
expecting success:
test_must_fail git --no-pager show foo-tag
error: could not read object 3b18e512dba79e4c8300dd08aeb37f8e728b8dad
tag foo-tag
Tagger: C O Mitter <committer@example.com>
Date: Wed Aug 14 07:34:37 2019 +0000
Tags 3b18e512dba79e4c8300dd08aeb37f8e728b8dad
ok 2 - showing a tag that point at a missing object
expecting success:
test_commit main1 &&
test_commit main2 &&
test_commit main3 &&
git tag -m "annotated tag" annotated &&
git checkout -b side HEAD^^ &&
test_commit side2 &&
test_commit side3 &&
test_merge merge main3
[master (root-commit) 9ca29bf] main1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 main1.t
[master 6983cd6] main2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 main2.t
[master 75daec8] main3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 main3.t
Switched to a new branch 'side'
[side 2e812aa] side2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 side2.t
[side 42b83a8] side3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 side3.t
Merging:
42b83a8 side3
virtual main3
found 1 common ancestor:
9ca29bf main1
Merge made by the 'recursive' strategy.
main2.t | 1 +
main3.t | 1 +
2 files changed, 2 insertions(+)
create mode 100644 main2.t
create mode 100644 main3.t
ok 3 - set up a bit of history
expecting success:
cat >expect <<-EOF &&
commit $(git rev-parse main2)
commit $(git rev-parse main3)
EOF
git show main2 main3 >actual &&
grep ^commit actual >actual.filtered &&
test_cmp expect actual.filtered
ok 4 - showing two commits
expecting success:
cat >expect <<-EOF &&
commit $(git rev-parse main3)
commit $(git rev-parse main2)
EOF
git show main1..main3 >actual &&
grep ^commit actual >actual.filtered &&
test_cmp expect actual.filtered
ok 5 - showing a range walks (linear)
expecting success:
cat >expect <<-EOF &&
commit $(git rev-parse main3)
commit $(git rev-parse main2)
EOF
git show ^side3 main3 >actual &&
grep ^commit actual >actual.filtered &&
test_cmp expect actual.filtered
ok 6 - showing a range walks (Y shape, ^ first)
expecting success:
cat >expect <<-EOF &&
commit $(git rev-parse main3)
commit $(git rev-parse main2)
EOF
git show main3 ^side3 >actual &&
grep ^commit actual >actual.filtered &&
test_cmp expect actual.filtered
ok 7 - showing a range walks (Y shape, ^ last)
expecting success:
cat >expect <<-EOF &&
commit $(git rev-parse main3)
commit $(git rev-parse main2)
EOF
git show -2 main3 >actual &&
grep ^commit actual >actual.filtered &&
test_cmp expect actual.filtered
ok 8 - showing with -N walks
expecting success:
cat >expect <<-EOF &&
tag annotated
commit $(git rev-parse annotated^{commit})
EOF
git show annotated >actual &&
grep -E "^(commit|tag)" actual >actual.filtered &&
test_cmp expect actual.filtered
ok 9 - showing annotated tag
expecting success:
cat >expect <<-EOF &&
tag annotated
commit $(git rev-parse annotated^{commit})
commit $(git rev-parse side3)
EOF
git show annotated side3 >actual &&
grep -E "^(commit|tag)" actual >actual.filtered &&
test_cmp expect actual.filtered
ok 10 - showing annotated tag plus commit
expecting success:
cat >expect <<-EOF &&
commit $(git rev-parse main3)
commit $(git rev-parse main2)
EOF
git show ^side3 annotated >actual &&
grep -E "^(commit|tag)" actual >actual.filtered &&
test_cmp expect actual.filtered
ok 11 - showing range
expecting success:
cat >expect <<-\EOF &&
merge
main3
EOF
git show -s --format=%s merge main3 >actual &&
test_cmp expect actual
ok 12 - -s suppresses diff
expecting success:
echo main3 >expect &&
git show --quiet --format=%s main3 >actual &&
test_cmp expect actual
ok 13 - --quiet suppresses diff
expecting success:
test_must_fail git show --graph HEAD
fatal: cannot combine --no-walk with --graph
ok 14 - show --graph is forbidden
# passed all 14 test(s)
1..14
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7008-grep-binary.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7008-grep-binary/.git/
expecting success:
echo 'binaryQfileQm[*]cQ*æQð' | q_to_nul >a &&
git add a &&
git commit -m.
[master (root-commit) 09b64a3] .
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a
ok 1 - setup
expecting success:
echo Binary file a matches >expect &&
git grep ina a >actual &&
test_cmp expect actual
ok 2 - git grep ina a
expecting success:
git grep -ah ina a >actual &&
test_cmp a actual
ok 3 - git grep -ah ina a
expecting success:
test_must_fail git grep -I ina a >actual &&
test_must_be_empty actual
ok 4 - git grep -I ina a
expecting success:
echo a:1 >expect &&
git grep -c ina a >actual &&
test_cmp expect actual
ok 5 - git grep -c ina a
expecting success:
echo a >expect &&
git grep -l ina a >actual &&
test_cmp expect actual
ok 6 - git grep -l ina a
expecting success:
echo a >expect &&
git grep -L bar a >actual &&
test_cmp expect actual
ok 7 - git grep -L bar a
expecting success:
git grep -q ina a >actual &&
test_must_be_empty actual
ok 8 - git grep -q ina a
expecting success:
git grep -F ile a
Binary file a matches
ok 9 - git grep -F ile a
expecting success:
git grep -Fi iLE a
Binary file a matches
ok 10 - git grep -Fi iLE a
expecting success:
git grep ile a
Binary file a matches
ok 11 - git grep ile a
checking known breakage:
git grep .fi a
not ok 12 - git grep .fi a # TODO known breakage
expecting success:
printf 'yQf' | q_to_nul >f &&
git grep -f f -F a
Binary file a matches
ok 13 - git grep -f f -F 'y<NUL>f' a
expecting success:
printf 'yQx' | q_to_nul >f &&
test_must_fail git grep -f f -F a
ok 14 - git grep -f f -F 'y<NUL>x' a
expecting success:
printf 'YQf' | q_to_nul >f &&
git grep -f f -Fi a
Binary file a matches
ok 15 - git grep -f f -Fi 'Y<NUL>f' a
expecting success:
printf 'YQx' | q_to_nul >f &&
test_must_fail git grep -f f -Fi a
ok 16 - git grep -f f -Fi 'Y<NUL>x' a
expecting success:
printf 'yQf' | q_to_nul >f &&
git grep -f f a
Binary file a matches
ok 17 - git grep -f f 'y<NUL>f' a
expecting success:
printf 'yQx' | q_to_nul >f &&
test_must_fail git grep -f f a
ok 18 - git grep -f f 'y<NUL>x' a
expecting success:
printf 'æQð' | q_to_nul >f &&
git grep -f f a
Binary file a matches
ok 19 - git grep -f f 'æ<NUL>ð' a
expecting success:
printf 'eQm[*]c' | q_to_nul >f &&
git grep -f f -F a
Binary file a matches
ok 20 - git grep -f f -F 'e<NUL>m[*]c' a
expecting success:
printf 'EQM[*]C' | q_to_nul >f &&
git grep -f f -Fi a
Binary file a matches
ok 21 - git grep -f f -Fi 'E<NUL>M[*]C' a
expecting success:
printf 'yQ[f]' | q_to_nul >f &&
test_must_fail git grep -f f -F a
ok 22 - git grep -f f -F 'y<NUL>[f]' a
expecting success:
printf '[y]Qf' | q_to_nul >f &&
test_must_fail git grep -f f -F a
ok 23 - git grep -f f -F '[y]<NUL>f' a
expecting success:
printf 'YQ[F]' | q_to_nul >f &&
test_must_fail git grep -f f -Fi a
ok 24 - git grep -f f -Fi 'Y<NUL>[F]' a
expecting success:
printf '[Y]QF' | q_to_nul >f &&
test_must_fail git grep -f f -Fi a
ok 25 - git grep -f f -Fi '[Y]<NUL>F' a
expecting success:
printf 'æQ[ð]' | q_to_nul >f &&
test_must_fail git grep -f f -F a
ok 26 - git grep -f f -F 'æ<NUL>[ð]' a
expecting success:
printf '[æ]Qð' | q_to_nul >f &&
test_must_fail git grep -f f -F a
ok 27 - git grep -f f -F '[æ]<NUL>ð' a
expecting success:
printf 'ÆQ[Ð]' | q_to_nul >f &&
test_must_fail git grep -f f -Fi a
ok 28 - git grep -f f -Fi 'Æ<NUL>[Ð]' a
expecting success:
printf '[Æ]QÐ' | q_to_nul >f &&
test_must_fail git grep -f f -Fi a
ok 29 - git grep -f f -Fi '[Æ]<NUL>Ð' a
checking known breakage:
printf 'ÆQÐ' | q_to_nul >f &&
git grep -f f -i a
not ok 30 - git grep -f f -i 'Æ<NUL>Ð' a # TODO known breakage
checking known breakage:
printf 'yQ[f]' | q_to_nul >f &&
git grep -f f a
not ok 31 - git grep -f f 'y<NUL>[f]' a # TODO known breakage
checking known breakage:
printf '[y]Qf' | q_to_nul >f &&
git grep -f f a
not ok 32 - git grep -f f '[y]<NUL>f' a # TODO known breakage
checking known breakage:
printf 'YQ[F]' | q_to_nul >f &&
git grep -f f -i a
not ok 33 - git grep -f f -i 'Y<NUL>[F]' a # TODO known breakage
checking known breakage:
printf '[Y]Qf' | q_to_nul >f &&
git grep -f f -i a
not ok 34 - git grep -f f -i '[Y]<NUL>f' a # TODO known breakage
checking known breakage:
printf 'æQ[ð]' | q_to_nul >f &&
git grep -f f a
not ok 35 - git grep -f f 'æ<NUL>[ð]' a # TODO known breakage
checking known breakage:
printf '[æ]Qð' | q_to_nul >f &&
git grep -f f a
not ok 36 - git grep -f f '[æ]<NUL>ð' a # TODO known breakage
checking known breakage:
printf 'ÆQ[Ð]' | q_to_nul >f &&
git grep -f f -i a
not ok 37 - git grep -f f -i 'Æ<NUL>[Ð]' a # TODO known breakage
checking known breakage:
printf 'eQm.*cQ' | q_to_nul >f &&
git grep -f f a
not ok 38 - git grep -f f 'e<NUL>m.*c<NUL>' a # TODO known breakage
checking known breakage:
printf 'EQM.*cQ' | q_to_nul >f &&
git grep -f f -i a
not ok 39 - git grep -f f -i 'E<NUL>M.*c<NUL>' a # TODO known breakage
checking known breakage:
printf 'eQm[*]c' | q_to_nul >f &&
test_must_fail git grep -f f a
Binary file a matches
test_must_fail: command succeeded: git grep -f f a
not ok 40 - git grep -f f 'e<NUL>m[*]c' a # TODO known breakage
checking known breakage:
printf 'EQM[*]C' | q_to_nul >f &&
test_must_fail git grep -f f -i a
Binary file a matches
test_must_fail: command succeeded: git grep -f f -i a
not ok 41 - git grep -f f -i 'E<NUL>M[*]C' a # TODO known breakage
expecting success:
printf 'NOMATCHQð' | q_to_nul >f &&
test_must_fail git grep -f f -i a
ok 42 - git grep -f f -i 'NOMATCH<NUL>ð' a
checking known breakage:
printf '[Æ]QNOMATCH' | q_to_nul >f &&
test_must_fail git grep -f f -i a
Binary file a matches
test_must_fail: command succeeded: git grep -f f -i a
not ok 43 - git grep -f f -i '[Æ]<NUL>NOMATCH' a # TODO known breakage
checking known breakage:
printf '[æ]QNOMATCH' | q_to_nul >f &&
test_must_fail git grep -f f -i a
Binary file a matches
test_must_fail: command succeeded: git grep -f f -i a
not ok 44 - git grep -f f -i '[æ]<NUL>NOMATCH' a # TODO known breakage
expecting success:
printf '[Æ]Qð' | q_to_nul >f &&
git grep -f f -i a
Binary file a matches
ok 45 - git grep -f f -i '[Æ]<NUL>ð' a
expecting success:
printf '[æ]Qð' | q_to_nul >f &&
git grep -f f -i a
Binary file a matches
ok 46 - git grep -f f -i '[æ]<NUL>ð' a
expecting success:
printf 'yQ[f]' | q_to_nul >f &&
test_must_fail git grep -f f -F a
ok 47 - git grep -f f -F 'y<NUL>[f]' a
expecting success:
printf 'YQ[F]' | q_to_nul >f &&
test_must_fail git grep -f f -Fi a
ok 48 - git grep -f f -Fi 'Y<NUL>[F]' a
expecting success:
printf 'yQNOMATCH' | q_to_nul >f &&
test_must_fail git grep -f f a
ok 49 - git grep -f f 'y<NUL>NOMATCH' a
expecting success:
printf 'QNOMATCH' | q_to_nul >f &&
test_must_fail git grep -f f a
ok 50 - git grep -f f '<NUL>NOMATCH' a
expecting success:
printf 'YQNOMATCH' | q_to_nul >f &&
test_must_fail git grep -f f -i a
ok 51 - git grep -f f -i 'Y<NUL>NOMATCH' a
expecting success:
printf 'QNOMATCH' | q_to_nul >f &&
test_must_fail git grep -f f -i a
ok 52 - git grep -f f -i '<NUL>NOMATCH' a
expecting success:
printf 'æQ[ð]' | q_to_nul >f &&
test_must_fail git grep -f f -F a
ok 53 - git grep -f f -F 'æ<NUL>[ð]' a
expecting success:
printf 'ÆQ[Ð]' | q_to_nul >f &&
test_must_fail git grep -f f -Fi a
ok 54 - git grep -f f -Fi 'Æ<NUL>[Ð]' a
expecting success:
printf 'yQNÓMATCH' | q_to_nul >f &&
test_must_fail git grep -f f a
ok 55 - git grep -f f 'y<NUL>NÓMATCH' a
expecting success:
printf 'QNÓMATCH' | q_to_nul >f &&
test_must_fail git grep -f f a
ok 56 - git grep -f f '<NUL>NÓMATCH' a
expecting success:
printf 'YQNÓMATCH' | q_to_nul >f &&
test_must_fail git grep -f f -i a
ok 57 - git grep -f f -i 'Y<NUL>NÓMATCH' a
expecting success:
printf 'QNÓMATCH' | q_to_nul >f &&
test_must_fail git grep -f f -i a
ok 58 - git grep -f f -i '<NUL>NÓMATCH' a
expecting success:
echo text >t &&
git add t &&
echo t:text >expect &&
git grep text t >actual &&
test_cmp expect actual &&
echo "t -diff" >.gitattributes &&
echo "Binary file t matches" >expect &&
git grep text t >actual &&
test_cmp expect actual
ok 59 - grep respects binary diff attribute
expecting success:
git grep --cached text t >actual &&
test_cmp expect actual
ok 60 - grep --cached respects binary diff attribute
expecting success:
git add .gitattributes &&
rm .gitattributes &&
git grep --cached text t >actual &&
test_when_finished "git rm --cached .gitattributes" &&
test_when_finished "git checkout .gitattributes" &&
test_cmp expect actual
Updated 1 path from the index
rm '.gitattributes'
ok 61 - grep --cached respects binary diff attribute (2)
expecting success:
git commit -m new &&
echo "Binary file HEAD:t matches" >expect &&
git grep text HEAD -- t >actual &&
test_when_finished "git reset HEAD^" &&
test_cmp expect actual
[master ed1dea2] new
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 t
ok 62 - grep revision respects binary diff attribute
expecting success:
echo binQary | q_to_nul >b &&
git add b &&
echo "Binary file b matches" >expect &&
git grep bin b >actual &&
test_cmp expect actual &&
echo "b diff" >.gitattributes &&
echo "b:binQary" >expect &&
git grep bin b >actual.raw &&
nul_to_q <actual.raw >actual &&
test_cmp expect actual
ok 63 - grep respects not-binary diff attribute
expecting success:
echo a diff=foo >.gitattributes &&
git config diff.foo.textconv "\"$(pwd)\""/nul_to_q_textconv
ok 64 - setup textconv filters
expecting success:
test_must_fail git grep Qfile
ok 65 - grep does not honor textconv
expecting success:
echo "a:binaryQfileQm[*]cQ*æQð" >expect &&
git grep --textconv Qfile >actual &&
test_cmp expect actual
ok 66 - grep --textconv honors textconv
expecting success:
test_must_fail git grep --no-textconv Qfile
ok 67 - grep --no-textconv does not honor textconv
expecting success:
echo "HEAD:a:binaryQfileQm[*]cQ*æQð" >expect &&
git grep --textconv Qfile HEAD:a >actual &&
test_cmp expect actual
ok 68 - grep --textconv blob honors textconv
# still have 15 known breakage(s)
# passed all remaining 53 test(s)
1..68
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7009-filter-branch-null-sha1.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7009-filter-branch-null-sha1/.git/
expecting success:
test_commit one &&
test_commit two &&
test_commit three
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master 139b20d] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[master 7c7cd71] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
ok 1 - setup: base commits
expecting success:
{
git ls-tree HEAD &&
printf "160000 commit $ZERO_OID\\tbroken\\n"
} >broken-tree &&
echo "add broken entry" >msg &&
tree=$(git mktree <broken-tree) &&
test_tick &&
commit=$(git commit-tree $tree -p HEAD <msg) &&
git update-ref HEAD "$commit"
ok 2 - setup: a commit with a bogus null sha1 in the tree
expecting success:
test_tick &&
git commit -a -m "back to normal"
[master 6fc1982] back to normal
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 160000 broken
ok 3 - setup: bring HEAD and index in sync
expecting success:
test_must_fail git filter-branch \
--force --prune-empty \
--index-filter "true"
Rewrite d79ce1670bdcb76e6d1da2ae095e890ccb326ae9 (1/5) (0 seconds passed, remaining 0 predicted)
Rewrite 139b20d8e6c5b496de61f033f642d0e3dbff528d (2/5) (0 seconds passed, remaining 0 predicted)
Rewrite 7c7cd714e262561f73f3079dfca4e8724682ac21 (3/5) (0 seconds passed, remaining 0 predicted)
Rewrite e3ed0c3a94f05540151bd8cb9ac647b8777964a6 (4/5) (0 seconds passed, remaining 0 predicted) error: invalid object 160000 0000000000000000000000000000000000000000 for 'broken'
warning: cache entry has null sha1: broken
error: invalid object 160000 0000000000000000000000000000000000000000 for 'broken'
fatal: git-write-tree: error building trees
fatal: not a valid object name
could not write rewritten commit
ok 4 - noop filter-branch complains
expecting success:
test_must_fail git filter-branch \
--force --prune-empty \
--index-filter "git rm --cached --ignore-unmatch three.t"
Rewrite d79ce1670bdcb76e6d1da2ae095e890ccb326ae9 (1/5) (0 seconds passed, remaining 0 predicted)
Rewrite 139b20d8e6c5b496de61f033f642d0e3dbff528d (2/5) (0 seconds passed, remaining 0 predicted)
Rewrite 7c7cd714e262561f73f3079dfca4e8724682ac21 (3/5) (0 seconds passed, remaining 0 predicted) rm 'three.t'
Rewrite e3ed0c3a94f05540151bd8cb9ac647b8777964a6 (4/5) (0 seconds passed, remaining 0 predicted) error: invalid object 160000 0000000000000000000000000000000000000000 for 'broken'
warning: cache entry has null sha1: broken
error: cache entry has null sha1: broken
fatal: Unable to write new index file
rm 'three.t'
index filter failed: git rm --cached --ignore-unmatch three.t
ok 5 - filter commands are still checked
expecting success:
echo three >expect &&
git filter-branch \
--force --prune-empty \
--index-filter "git rm --cached --ignore-unmatch broken" &&
git log -1 --format=%s >actual &&
test_cmp expect actual
Rewrite d79ce1670bdcb76e6d1da2ae095e890ccb326ae9 (1/5) (0 seconds passed, remaining 0 predicted)
Rewrite 139b20d8e6c5b496de61f033f642d0e3dbff528d (2/5) (0 seconds passed, remaining 0 predicted)
Rewrite 7c7cd714e262561f73f3079dfca4e8724682ac21 (3/5) (0 seconds passed, remaining 0 predicted)
Rewrite e3ed0c3a94f05540151bd8cb9ac647b8777964a6 (4/5) (0 seconds passed, remaining 0 predicted) error: invalid object 160000 0000000000000000000000000000000000000000 for 'broken'
warning: cache entry has null sha1: broken
rm 'broken'
Rewrite 6fc1982a7cbeec7380180353ef341fd996ac21f7 (5/5) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/master' was rewritten
ok 6 - removing the broken entry works
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7010-setup.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7010-setup/.git/
expecting success:
mkdir -p a/b/c a/e &&
D=$(pwd) &&
>a/b/c/d &&
>a/e/f
ok 1 - setup
expecting success:
git add "$D/a/b/c/d" &&
git ls-files >current &&
echo a/b/c/d >expect &&
test_cmp expect current
ok 2 - git add (absolute)
expecting success:
rm -f .git/index &&
(
cd a/b &&
git add "../e/./f"
) &&
git ls-files >current &&
echo a/e/f >expect &&
test_cmp expect current
ok 3 - git add (funny relative)
expecting success:
rm -f .git/index &&
git add a &&
git rm -f --cached "$D/a/b/c/d" &&
git ls-files >current &&
echo a/e/f >expect &&
test_cmp expect current
rm 'a/b/c/d'
ok 4 - git rm (absolute)
expecting success:
rm -f .git/index &&
git add a &&
(
cd a/b &&
git rm -f --cached "../e/./f"
) &&
git ls-files >current &&
echo a/b/c/d >expect &&
test_cmp expect current
rm 'a/e/f'
ok 5 - git rm (funny relative)
expecting success:
rm -f .git/index &&
git add a &&
git ls-files "$D/a/e/../b" >current &&
echo a/b/c/d >expect &&
test_cmp expect current
ok 6 - git ls-files (absolute)
expecting success:
rm -f .git/index &&
git add a &&
(
cd a/b &&
git ls-files "../b/c"
) >current &&
echo c/d >expect &&
test_cmp expect current
ok 7 - git ls-files (relative #1)
expecting success:
rm -f .git/index &&
git add a &&
(
cd a/b &&
git ls-files --full-name "../e/f"
) >current &&
echo a/e/f >expect &&
test_cmp expect current
ok 8 - git ls-files (relative #2)
expecting success:
rm -f .git/index &&
git add a &&
(
cd a/b &&
git ls-files "../e/f"
) >current &&
echo ../e/f >expect &&
test_cmp expect current
ok 9 - git ls-files (relative #3)
expecting success:
git commit -m "foo" &&
echo aa >>a/b/c/d &&
git commit -m "aa" "$(pwd)/a/b/c/d"
[master (root-commit) 0f517cd] foo
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a/b/c/d
create mode 100644 a/e/f
[master b91425f] aa
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 10 - commit using absolute path names
expecting success:
echo bb >>a/b/c/d &&
git commit -m "bb" "$(pwd)/a/b/c/d" &&
git log a/b/c/d >f1.txt &&
git log "$(pwd)/a/b/c/d" >f2.txt &&
test_cmp f1.txt f2.txt
[master 3e74dc2] bb
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 11 - log using absolute path names
expecting success:
git blame a/b/c/d >f1.txt &&
git blame "$(pwd)/a/b/c/d" >f2.txt &&
test_cmp f1.txt f2.txt
ok 12 - blame using absolute path names
expecting success:
test_create_repo tester
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7010-setup/tester/.git/
ok 13 - setup deeper work tree
expecting success: (
cd tester &&
d1="$(cd .. ; pwd)" &&
test_must_fail git add "$d1"
)
fatal: /<<PKGBUILDDIR>>/t/trash directory.t7010-setup: '/<<PKGBUILDDIR>>/t/trash directory.t7010-setup' is outside repository
ok 14 - add a directory outside the work tree
expecting success: (
cd tester &&
f="$(pwd)x" &&
echo "$f" &&
touch "$f" &&
test_must_fail git add "$f"
)
/<<PKGBUILDDIR>>/t/trash directory.t7010-setup/testerx
fatal: /<<PKGBUILDDIR>>/t/trash directory.t7010-setup/testerx: '/<<PKGBUILDDIR>>/t/trash directory.t7010-setup/testerx' is outside repository
ok 15 - add a file outside the work tree, nasty case 1
expecting success: (
cd tester &&
f="$(pwd | sed "s/.$//")x" &&
echo "$f" &&
touch "$f" &&
test_must_fail git add "$f"
)
/<<PKGBUILDDIR>>/t/trash directory.t7010-setup/testex
fatal: /<<PKGBUILDDIR>>/t/trash directory.t7010-setup/testex: '/<<PKGBUILDDIR>>/t/trash directory.t7010-setup/testex' is outside repository
ok 16 - add a file outside the work tree, nasty case 2
# passed all 16 test(s)
1..16
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7011-skip-worktree-reading.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7011-skip-worktree-reading/.git/
expecting success:
test_commit init &&
mkdir sub &&
touch ./1 ./2 sub/1 sub/2 &&
git add 1 2 sub/1 sub/2 &&
git update-index --skip-worktree 1 sub/1 &&
git ls-files -t > result &&
test_cmp expect.skip result
[master (root-commit) 2519212] init
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 init.t
ok 1 - setup
expecting success:
setup_absent &&
git update-index 1 &&
test_absent
ok 2 - update-index
expecting success:
setup_dirty &&
git update-index 1 &&
test_dirty
ok 3 - update-index
expecting success:
setup_absent &&
git update-index --remove 1 &&
test -z "$(git ls-files 1)" &&
test ! -f 1
ok 4 - update-index --remove
expecting success:
setup_dirty &&
git update-index --remove 1 &&
test -z "$(git ls-files 1)" &&
echo dirty > expected &&
test_cmp expected 1
ok 5 - update-index --remove
expecting success:
setup_absent &&
test -z "$(git ls-files -d)"
ok 6 - ls-files --deleted
expecting success:
setup_dirty &&
test -z "$(git ls-files -d)"
ok 7 - ls-files --deleted
expecting success:
setup_absent &&
test -z "$(git ls-files -m)"
ok 8 - ls-files --modified
expecting success:
setup_dirty &&
test -z "$(git ls-files -m)"
ok 9 - ls-files --modified
expecting success:
git update-index --no-skip-worktree 1 &&
echo test > 1 &&
git update-index 1 &&
git update-index --skip-worktree 1 &&
rm 1 &&
test "$(git grep --no-ext-grep test)" = "1:test"
ok 10 - grep with skip-worktree file
expecting success:
setup_absent &&
git diff-index HEAD -- 1 > result &&
test_cmp expected result
ok 11 - diff-index does not examine skip-worktree absent entries
expecting success:
setup_dirty &&
git diff-index HEAD -- 1 > result &&
test_cmp expected result
ok 12 - diff-index does not examine skip-worktree dirty entries
expecting success:
setup_absent &&
test -z "$(git diff-files -- one)"
ok 13 - diff-files does not examine skip-worktree absent entries
expecting success:
setup_dirty &&
test -z "$(git diff-files -- one)"
ok 14 - diff-files does not examine skip-worktree dirty entries
expecting success:
setup_absent &&
git rm 1
rm '1'
ok 15 - git-rm succeeds on skip-worktree absent entries
expecting success:
git reset &&
setup_absent &&
test_must_fail git commit -m null 1
On branch master
Untracked files:
2
expect.full
expect.skip
expected
result
sub/
nothing added to commit but untracked files present
ok 16 - commit on skip-worktree absent entries
expecting success:
git reset &&
setup_dirty &&
test_must_fail git commit -m null 1
On branch master
Untracked files:
1
2
expect.full
expect.skip
expected
result
sub/
nothing added to commit but untracked files present
ok 17 - commit on skip-worktree dirty entries
# passed all 17 test(s)
1..17
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7012-skip-worktree-writing.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7012-skip-worktree-writing/.git/
expecting success:
test_commit init &&
echo modified >> init.t &&
touch added &&
git add init.t added &&
git commit -m "modified and added" &&
git tag top
[master (root-commit) 2519212] init
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 init.t
[master fa1ce8e] modified and added
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 100644 added
ok 1 - setup
expecting success:
git checkout -f top &&
git update-index --skip-worktree init.t &&
rm init.t &&
git read-tree -m -u HEAD^ &&
echo init > expected &&
test_cmp expected init.t
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at fa1ce8e modified and added
ok 2 - read-tree updates worktree, absent case
expecting success:
git checkout -f top &&
git update-index --skip-worktree init.t &&
echo dirty >> init.t &&
test_must_fail git read-tree -m -u HEAD^ &&
grep -q dirty init.t &&
test "$(git ls-files -t init.t)" = "S init.t" &&
git update-index --no-skip-worktree init.t
HEAD is now at fa1ce8e modified and added
error: Entry 'init.t' not uptodate. Cannot merge.
ok 3 - read-tree updates worktree, dirty case
expecting success:
git checkout -f top &&
git update-index --skip-worktree added &&
rm added &&
git read-tree -m -u HEAD^ &&
test ! -f added
HEAD is now at fa1ce8e modified and added
ok 4 - read-tree removes worktree, absent case
expecting success:
git checkout -f top &&
git update-index --skip-worktree added &&
echo dirty >> added &&
test_must_fail git read-tree -m -u HEAD^ &&
grep -q dirty added &&
test "$(git ls-files -t added)" = "S added" &&
git update-index --no-skip-worktree added
HEAD is now at fa1ce8e modified and added
error: Entry 'added' not uptodate. Cannot merge.
ok 5 - read-tree removes worktree, dirty case
expecting success:
git checkout -f init &&
mkdir sub &&
touch ./1 ./2 sub/1 sub/2 &&
git add 1 2 sub/1 sub/2 &&
git update-index --skip-worktree 1 sub/1 &&
git ls-files -t > result &&
test_cmp expected result
Previous HEAD position was fa1ce8e modified and added
HEAD is now at 2519212 init
ok 6 - index setup
expecting success:
setup_absent &&
git add 1 &&
test_absent
ok 7 - git-add ignores worktree content
expecting success:
setup_dirty &&
git add 1 &&
test_dirty
ok 8 - git-add ignores worktree content
expecting success:
setup_dirty &&
test_must_fail git rm 1 &&
test_dirty
error: the following file has changes staged in the index:
1
(use --cached to keep the file, or -f to force removal)
ok 9 - git-rm fails if worktree is dirty
expecting success:
setup_absent &&
git clean -n > result &&
test_i18ncmp expected result
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 10 - git-clean, absent case
expecting success:
setup_dirty &&
git clean -n > result &&
test_i18ncmp expected result
ok 11 - git-clean, dirty case
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7030-verify-tag.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7030-verify-tag/.git/
expecting success:
echo 1 >file && git add file &&
test_tick && git commit -m initial &&
git tag -s -m initial initial &&
git branch side &&
echo 2 >file && test_tick && git commit -a -m second &&
git tag -s -m second second &&
git checkout side &&
echo 3 >elif && git add elif &&
test_tick && git commit -m "third on side" &&
git checkout master &&
test_tick && git merge -S side &&
git tag -s -m merge merge &&
echo 4 >file && test_tick && git commit -a -S -m "fourth unsigned" &&
git tag -a -m fourth-unsigned fourth-unsigned &&
test_tick && git commit --amend -S -m "fourth signed" &&
git tag -s -m fourth fourth-signed &&
echo 5 >file && test_tick && git commit -a -m "fifth" &&
git tag fifth-unsigned &&
git config commit.gpgsign true &&
echo 6 >file && test_tick && git commit -a -m "sixth" &&
git tag -a -m sixth sixth-unsigned &&
test_tick && git rebase -f HEAD^^ && git tag -s -m 6th sixth-signed HEAD^ &&
git tag -m seventh -s seventh-signed &&
echo 8 >file && test_tick && git commit -a -m eighth &&
git tag -uB7227189 -m eighth eighth-signed-alt
[master (root-commit) 777c62c] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 38545ae] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'side'
[side 684a8f8] third on side
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 elif
Switched to branch 'master'
Merging:
38545ae second
virtual side
found 1 common ancestor:
777c62c initial
Merge made by the 'recursive' strategy.
elif | 1 +
1 file changed, 1 insertion(+)
create mode 100644 elif
[master cbf408d] fourth unsigned
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 2938fad] fourth signed
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:17:13 2005 -0700
1 file changed, 1 insertion(+), 1 deletion(-)
[master 7822a0c] fifth
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master b1788e3] sixth
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Current branch master is up to date, rebase forced.
First, rewinding head to replay your work on top of it...
Applying: fifth
Applying: sixth
[master b088e10] eighth
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - create signed tags
expecting success:
test_config gpg.format x509 &&
test_config user.signingkey $GIT_COMMITTER_EMAIL &&
echo 9 >file && test_tick && git commit -a -m "nineth gpgsm-signed" &&
git tag -s -m nineth nineth-signed-x509
[master c61cafa] nineth gpgsm-signed
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 2 - create signed tags x509
expecting success:
(
for tag in initial second merge fourth-signed sixth-signed seventh-signed
do
git verify-tag $tag 2>actual &&
grep "Good signature from" actual &&
! grep "BAD signature from" actual &&
echo $tag OK || exit 1
done
) &&
(
for tag in fourth-unsigned fifth-unsigned sixth-unsigned
do
test_must_fail git verify-tag $tag 2>actual &&
! grep "Good signature from" actual &&
! grep "BAD signature from" actual &&
echo $tag OK || exit 1
done
) &&
(
for tag in eighth-signed-alt
do
git verify-tag $tag 2>actual &&
grep "Good signature from" actual &&
! grep "BAD signature from" actual &&
grep "not certified" actual &&
echo $tag OK || exit 1
done
)
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
initial OK
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
second OK
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
merge OK
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
fourth-signed OK
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
sixth-signed OK
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
seventh-signed OK
fourth-unsigned OK
fifth-unsigned OK
sixth-unsigned OK
gpg: Good signature from "Eris Discordia <discord@example.net>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
eighth-signed-alt OK
ok 3 - verify and show signatures
expecting success:
git verify-tag nineth-signed-x509 2>actual &&
grep "Good signature from" actual &&
! grep "BAD signature from" actual &&
echo nineth-signed-x509 OK
gpgsm: Good signature from "/CN=C O Mitter/O=Example/SN=C O/GN=Mitter"
nineth-signed-x509 OK
ok 4 - verify and show signatures x509
expecting success:
git cat-file tag seventh-signed >raw &&
sed -e "/^tag / s/seventh/7th forged/" raw >forged1 &&
git hash-object -w -t tag forged1 >forged1.tag &&
test_must_fail git verify-tag $(cat forged1.tag) 2>actual1 &&
grep "BAD signature from" actual1 &&
! grep "Good signature from" actual1
gpg: BAD signature from "C O Mitter <committer@example.com>" [ultimate]
ok 5 - detect fudged signature
expecting success:
(
for tag in initial second merge fourth-signed sixth-signed seventh-signed
do
git verify-tag --raw $tag 2>actual &&
grep "GOODSIG" actual &&
! grep "BADSIG" actual &&
echo $tag OK || exit 1
done
) &&
(
for tag in fourth-unsigned fifth-unsigned sixth-unsigned
do
test_must_fail git verify-tag --raw $tag 2>actual &&
! grep "GOODSIG" actual &&
! grep "BADSIG" actual &&
echo $tag OK || exit 1
done
) &&
(
for tag in eighth-signed-alt
do
git verify-tag --raw $tag 2>actual &&
grep "GOODSIG" actual &&
! grep "BADSIG" actual &&
grep "TRUST_UNDEFINED" actual &&
echo $tag OK || exit 1
done
)
[GNUPG:] GOODSIG 13B6F51ECDDE430D C O Mitter <committer@example.com>
initial OK
[GNUPG:] GOODSIG 13B6F51ECDDE430D C O Mitter <committer@example.com>
second OK
[GNUPG:] GOODSIG 13B6F51ECDDE430D C O Mitter <committer@example.com>
merge OK
[GNUPG:] GOODSIG 13B6F51ECDDE430D C O Mitter <committer@example.com>
fourth-signed OK
[GNUPG:] GOODSIG 13B6F51ECDDE430D C O Mitter <committer@example.com>
sixth-signed OK
[GNUPG:] GOODSIG 13B6F51ECDDE430D C O Mitter <committer@example.com>
seventh-signed OK
fourth-unsigned OK
fifth-unsigned OK
sixth-unsigned OK
[GNUPG:] GOODSIG 65A0EEA02E30CAD7 Eris Discordia <discord@example.net>
[GNUPG:] TRUST_UNDEFINED 0 pgp
eighth-signed-alt OK
ok 6 - verify signatures with --raw
expecting success:
git verify-tag --raw nineth-signed-x509 2>actual &&
grep "GOODSIG" actual &&
! grep "BADSIG" actual &&
echo nineth-signed-x509 OK
[GNUPG:] GOODSIG F8BF62E0693D0694816377099909C779FA23FD65 /CN=C O Mitter/O=Example/SN=C O/GN=Mitter
nineth-signed-x509 OK
ok 7 - verify signatures with --raw x509
expecting success:
tags="fourth-signed sixth-signed seventh-signed" &&
for i in $tags
do
git verify-tag -v --raw $i || return 1
done >expect.stdout 2>expect.stderr.1 &&
grep "^.GNUPG:." <expect.stderr.1 >expect.stderr &&
git verify-tag -v --raw $tags >actual.stdout 2>actual.stderr.1 &&
grep "^.GNUPG:." <actual.stderr.1 >actual.stderr &&
test_cmp expect.stdout actual.stdout &&
test_cmp expect.stderr actual.stderr
ok 8 - verify multiple tags
expecting success:
tags="seventh-signed nineth-signed-x509" &&
for i in $tags
do
git verify-tag -v --raw $i || return 1
done >expect.stdout 2>expect.stderr.1 &&
grep "^.GNUPG:." <expect.stderr.1 >expect.stderr &&
git verify-tag -v --raw $tags >actual.stdout 2>actual.stderr.1 &&
grep "^.GNUPG:." <actual.stderr.1 >actual.stderr &&
test_cmp expect.stdout actual.stdout &&
test_cmp expect.stderr actual.stderr
ok 9 - verify multiple tags x509
expecting success:
cat >expect <<-\EOF &&
tagname : fourth-signed
EOF
git verify-tag --format="tagname : %(tag)" "fourth-signed" >actual &&
test_cmp expect actual
ok 10 - verifying tag with --format
expecting success:
test_must_fail git verify-tag --format="tagname : %(tag)" $(cat forged1.tag) >actual-forged &&
test_must_be_empty actual-forged
ok 11 - verifying a forged tag with --format should fail silently
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7004-tag.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7004-tag/.git/
expecting success:
git tag -l &&
git tag
ok 1 - listing all tags in an empty tree should succeed
expecting success:
test $(git tag -l | wc -l) -eq 0 &&
test $(git tag | wc -l) -eq 0
ok 2 - listing all tags in an empty tree should output nothing
expecting success:
(
git init sort &&
cd sort &&
test_commit initial &&
git tag tag-one &&
git tag TAG-two &&
git tag -l >actual &&
cat >expected <<-\EOF &&
TAG-two
initial
tag-one
EOF
test_cmp expected actual &&
git tag -l -i >actual &&
cat >expected <<-\EOF &&
initial
tag-one
TAG-two
EOF
test_cmp expected actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7004-tag/sort/.git/
[master (root-commit) 24b24cf] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
ok 3 - sort tags, ignore case
expecting success: ! (tag_exists mytag)
ok 4 - looking for a tag in an empty tree should fail
expecting success:
test_must_fail git tag mynotag &&
! tag_exists mynotag
fatal: Failed to resolve 'HEAD' as a valid ref.
ok 5 - creating a tag in an empty tree should fail
expecting success:
test_must_fail git tag mytaghead HEAD &&
! tag_exists mytaghead
fatal: Failed to resolve 'HEAD' as a valid ref.
ok 6 - creating a tag for HEAD in an empty tree should fail
expecting success:
test_must_fail git tag mytagnorev aaaaaaaaaaa &&
! tag_exists mytagnorev
fatal: Failed to resolve 'aaaaaaaaaaa' as a valid ref.
ok 7 - creating a tag for an unknown revision should fail
expecting success:
test_config core.logAllRefUpdates true &&
test_tick &&
echo foo >foo &&
git add foo &&
git commit -m Foo &&
git tag mytag &&
test_must_fail git reflog exists refs/tags/mytag
[master (root-commit) 86e17e4] Foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
ok 8 - creating a tag using default HEAD should succeed
expecting success:
git log -1 \
--format="format:tag: tagging %h (%s, %cd)%n" \
--date=format:%Y-%m-%d >expected &&
test_when_finished "git tag -d tag_with_reflog" &&
git tag --create-reflog tag_with_reflog &&
git reflog exists refs/tags/tag_with_reflog &&
sed -e "s/^.* //" .git/logs/refs/tags/tag_with_reflog >actual &&
test_i18ncmp expected actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Deleted tag 'tag_with_reflog' (was 86e17e4)
ok 9 - creating a tag with --create-reflog should create reflog
expecting success:
git log -1 \
--format="format:tag: tagging %h (%s, %cd)%n" \
--date=format:%Y-%m-%d >expected &&
test_when_finished "git tag -d tag_with_reflog" &&
git tag -m "annotated tag" --create-reflog tag_with_reflog &&
git reflog exists refs/tags/tag_with_reflog &&
sed -e "s/^.* //" .git/logs/refs/tags/tag_with_reflog >actual &&
test_i18ncmp expected actual
Deleted tag 'tag_with_reflog' (was a52ecb7)
ok 10 - annotated tag with --create-reflog has correct message
expecting success:
test_must_fail git tag --create-reflog mytag &&
test_must_fail git reflog exists refs/tags/mytag
fatal: tag 'mytag' already exists
ok 11 - --create-reflog does not create reflog on failure
expecting success:
test_when_finished "git tag -d tag_with_reflog" &&
test_config core.logAllRefUpdates always &&
git tag tag_with_reflog &&
git reflog exists refs/tags/tag_with_reflog
Deleted tag 'tag_with_reflog' (was 86e17e4)
ok 12 - option core.logAllRefUpdates=always creates reflog
expecting success:
git tag -l &&
git tag
mytag
mytag
ok 13 - listing all tags if one exists should succeed
expecting success:
git tag -l -l >actual &&
test_cmp expect actual &&
git tag --list --list >actual &&
test_cmp expect actual &&
git tag --list -l --list >actual &&
test_cmp expect actual
ok 14 - Multiple -l or --list options are equivalent to one -l option
expecting success:
test $(git tag -l) = mytag &&
test $(git tag) = mytag
ok 15 - listing all tags if one exists should output that tag
expecting success: git tag -l mytag
mytag
ok 16 - listing a tag using a matching pattern should succeed
expecting success: test $(git tag -l --ignore-case MYTAG) = mytag
ok 17 - listing a tag with --ignore-case
expecting success: test $(git tag -l mytag) = mytag
ok 18 - listing a tag using a matching pattern should output that tag
expecting success: git tag -l xxx
ok 19 - listing tags using a non-matching pattern should succeed
expecting success: test $(git tag -l xxx | wc -l) -eq 0
ok 20 - listing tags using a non-matching pattern should output nothing
expecting success: test_must_fail git tag mytag
fatal: tag 'mytag' already exists
ok 21 - trying to create a tag with the name of one existing should fail
expecting success:
test $(git tag -l | wc -l) -eq 1 &&
test_must_fail git tag "" &&
test_must_fail git tag .othertag &&
test_must_fail git tag "other tag" &&
test_must_fail git tag "othertag^" &&
test_must_fail git tag "other~tag" &&
test $(git tag -l | wc -l) -eq 1
fatal: '' is not a valid tag name.
fatal: '.othertag' is not a valid tag name.
fatal: 'other tag' is not a valid tag name.
fatal: 'othertag^' is not a valid tag name.
fatal: 'other~tag' is not a valid tag name.
ok 22 - trying to create a tag with a non-valid name should fail
expecting success:
git tag myhead HEAD &&
tag_exists myhead
ok 23 - creating a tag using HEAD directly should succeed
expecting success:
tag_exists mytag &&
git tag --force mytag &&
tag_exists mytag
ok 24 - --force can create a tag with the name of one existing
expecting success:
test_when_finished git tag -d newtag forcetag &&
git tag newtag >expect &&
git tag --force forcetag >actual &&
test_cmp expect actual
Deleted tag 'newtag' (was 86e17e4)
Deleted tag 'forcetag' (was 86e17e4)
ok 25 - --force is moot with a non-existing tag name
expecting success:
! tag_exists unknown-tag &&
test_must_fail git tag -d unknown-tag
error: tag 'unknown-tag' not found.
ok 26 - trying to delete an unknown tag should fail
expecting success:
git tag -l > actual && test_cmp expect actual &&
git tag -d &&
git tag -l > actual && test_cmp expect actual
ok 27 - trying to delete tags without params should succeed and do nothing
expecting success:
tag_exists mytag &&
tag_exists myhead &&
git tag -d mytag myhead &&
! tag_exists mytag &&
! tag_exists myhead
Deleted tag 'mytag' (was 86e17e4)
Deleted tag 'myhead' (was 86e17e4)
ok 28 - deleting two existing tags in one command should succeed
expecting success:
! tag_exists mytag &&
git tag mytag &&
tag_exists mytag
ok 29 - creating a tag with the name of another deleted one should succeed
expecting success:
tag_exists mytag &&
! tag_exists myhead &&
test_must_fail git tag -d mytag anothertag &&
! tag_exists mytag &&
! tag_exists myhead
error: tag 'anothertag' not found.
Deleted tag 'mytag' (was 86e17e4)
ok 30 - trying to delete two tags, existing and not, should fail in the 2nd
expecting success: test_must_fail git tag -d mytag
error: tag 'mytag' not found.
ok 31 - trying to delete an already deleted tag should fail
expecting success:
git tag v1.0.1 &&
git tag t211 &&
git tag aa1 &&
git tag v0.2.1 &&
git tag v1.1.3 &&
git tag cba &&
git tag a1 &&
git tag v1.0 &&
git tag t210 &&
git tag -l > actual &&
test_cmp expect actual &&
git tag > actual &&
test_cmp expect actual
ok 32 - listing all tags should print them ordered
expecting success:
rm *a* &&
git tag -l "*a*" > current &&
test_cmp expect current
ok 33 - listing tags with substring as pattern must print those matching
expecting success:
git tag -l "*.1" > actual &&
test_cmp expect actual
ok 34 - listing tags with a suffix as pattern must print those matching
expecting success:
git tag -l "t21*" > actual &&
test_cmp expect actual
ok 35 - listing tags with a prefix as pattern must print those matching
expecting success:
git tag -l a1 > actual &&
test_cmp expect actual
ok 36 - listing tags using a name as pattern must print that one matching
expecting success:
git tag -l v1.0 > actual &&
test_cmp expect actual
ok 37 - listing tags using a name as pattern must print that one matching
expecting success:
git tag -l "v1.?.?" > actual &&
test_cmp expect actual
ok 38 - listing tags with ? in the pattern should print those matching
expecting success:
git tag -l "v.*" > actual &&
test_must_be_empty actual
ok 39 - listing tags using v.* should print nothing because none have v.
expecting success:
git tag -l "v*" > actual &&
test_cmp expect actual
ok 40 - listing tags using v* should print only those having v
expecting success:
git tag -l "v1*" "v0*" >actual &&
test_cmp expect actual
ok 41 - tag -l can accept multiple patterns
expecting success:
git tag -l "v1*" -l "v0*" >actual &&
test_cmp expect actual
ok 42 - tag -l <pattern> -l <pattern> works, as our buggy documentation previously suggested
expecting success:
COLUMNS=41 git tag -l --column=row >actual &&
cat >expected <<\EOF &&
a1 aa1 cba t210 t211
v0.2.1 v1.0 v1.0.1 v1.1.3
EOF
test_cmp expected actual
ok 43 - listing tags in column
expecting success:
test_config column.tag row &&
test_config column.ui dense &&
COLUMNS=40 git tag -l >actual &&
cat >expected <<\EOF &&
a1 aa1 cba t210 t211
v0.2.1 v1.0 v1.0.1 v1.1.3
EOF
test_cmp expected actual
ok 44 - listing tags in column with column.*
expecting success:
test_must_fail git tag --column -n
fatal: --column and -n are incompatible
ok 45 - listing tag with -n --column should fail
expecting success:
test_config column.ui "row dense" &&
COLUMNS=40 git tag -l -n >actual &&
cat >expected <<\EOF &&
a1 Foo
aa1 Foo
cba Foo
t210 Foo
t211 Foo
v0.2.1 Foo
v1.0 Foo
v1.0.1 Foo
v1.1.3 Foo
EOF
test_cmp expected actual
ok 46 - listing tags -n in column with column.ui ignored
expecting success:
git tag non-annotated-tag &&
test $(git cat-file -t non-annotated-tag) = commit &&
test $(git rev-parse non-annotated-tag) = $(git rev-parse HEAD)
ok 47 - a non-annotated tag created without parameters should point to HEAD
expecting success: test_must_fail git tag -v unknown-tag
error: tag 'unknown-tag' not found.
ok 48 - trying to verify an unknown tag should fail
expecting success: test_must_fail git tag -v non-annotated-tag
error: non-annotated-tag: cannot verify a non-tag object of type commit.
ok 49 - trying to verify a non-annotated and non-signed tag should fail
expecting success: test_must_fail git tag -v unknown-tag1 non-annotated-tag unknown-tag2
error: tag 'unknown-tag1' not found.
error: non-annotated-tag: cannot verify a non-tag object of type commit.
error: tag 'unknown-tag2' not found.
ok 50 - trying to verify many non-annotated or unknown tags, should fail
expecting success:
git tag -m "A message" annotated-tag &&
get_tag_msg annotated-tag >actual &&
test_cmp expect actual
ok 51 - creating an annotated tag with -m message should succeed
expecting success:
write_script fakeeditor <<-\EOF
sed -e "s/A message/An edited message/g" <"$1" >"$1-"
mv "$1-" "$1"
EOF
ok 52 - set up editor
expecting success:
GIT_EDITOR=./fakeeditor git tag -m "A message" --edit annotated-tag-edit &&
get_tag_msg annotated-tag-edit >actual &&
test_cmp expect actual
ok 53 - creating an annotated tag with -m message --edit should succeed
expecting success:
git tag -F msgfile file-annotated-tag &&
get_tag_msg file-annotated-tag >actual &&
test_cmp expect actual
ok 54 - creating an annotated tag with -F messagefile should succeed
expecting success:
write_script fakeeditor <<-\EOF
sed -e "s/Another message/Another edited message/g" <"$1" >"$1-"
mv "$1-" "$1"
EOF
ok 55 - set up editor
expecting success:
GIT_EDITOR=./fakeeditor git tag -F msgfile --edit file-annotated-tag-edit &&
get_tag_msg file-annotated-tag-edit >actual &&
test_cmp expect actual
ok 56 - creating an annotated tag with -F messagefile --edit should succeed
expecting success:
git tag -F - stdin-annotated-tag <inputmsg &&
get_tag_msg stdin-annotated-tag >actual &&
test_cmp expect actual
ok 57 - creating an annotated tag with -F - should succeed
expecting success:
! test -f nonexistingfile &&
! tag_exists notag &&
test_must_fail git tag -F nonexistingfile notag &&
! tag_exists notag
fatal: could not open or read 'nonexistingfile': No such file or directory
ok 58 - trying to create a tag with a non-existing -F file should fail
expecting success:
echo "message file 1" >msgfile1 &&
echo "message file 2" >msgfile2 &&
! tag_exists msgtag &&
test_must_fail git tag -m "message 1" -F msgfile1 msgtag &&
! tag_exists msgtag &&
test_must_fail git tag -F msgfile1 -m "message 1" msgtag &&
! tag_exists msgtag &&
test_must_fail git tag -m "message 1" -F msgfile1 \
-m "message 2" msgtag &&
! tag_exists msgtag
fatal: only one -F or -m option is allowed.
fatal: only one -F or -m option is allowed.
fatal: only one -F or -m option is allowed.
ok 59 - trying to create tags giving both -m or -F options should fail
expecting success:
git tag -m "" empty-annotated-tag &&
get_tag_msg empty-annotated-tag >actual &&
test_cmp expect actual
ok 60 - creating a tag with an empty -m message should succeed
expecting success:
git tag -F emptyfile emptyfile-annotated-tag &&
get_tag_msg emptyfile-annotated-tag >actual &&
test_cmp expect actual
ok 61 - creating a tag with an empty -F messagefile should succeed
expecting success:
git tag -F blanksfile blanks-annotated-tag &&
get_tag_msg blanks-annotated-tag >actual &&
test_cmp expect actual
ok 62 - extra blanks in the message for an annotated tag should be removed
expecting success:
git tag -m " " blank-annotated-tag &&
get_tag_msg blank-annotated-tag >actual &&
test_cmp expect actual
ok 63 - creating a tag with blank -m message with spaces should succeed
expecting success:
git tag -F blankfile blankfile-annotated-tag &&
get_tag_msg blankfile-annotated-tag >actual &&
test_cmp expect actual
ok 64 - creating a tag with blank -F messagefile with spaces should succeed
expecting success:
git tag -F blanknonlfile blanknonlfile-annotated-tag &&
get_tag_msg blanknonlfile-annotated-tag >actual &&
test_cmp expect actual
ok 65 - creating a tag with -F file of spaces and no newline should succeed
expecting success:
git tag -F commentsfile comments-annotated-tag &&
get_tag_msg comments-annotated-tag >actual &&
test_cmp expect actual
ok 66 - creating a tag using a -F messagefile with #comments should succeed
expecting success:
git tag -m "#comment" comment-annotated-tag &&
get_tag_msg comment-annotated-tag >actual &&
test_cmp expect actual
ok 67 - creating a tag with a #comment in the -m message should succeed
expecting success:
git tag -F commentfile commentfile-annotated-tag &&
get_tag_msg commentfile-annotated-tag >actual &&
test_cmp expect actual
ok 68 - creating a tag with #comments in the -F messagefile should succeed
expecting success:
git tag -F commentnonlfile commentnonlfile-annotated-tag &&
get_tag_msg commentnonlfile-annotated-tag >actual &&
test_cmp expect actual
ok 69 - creating a tag with a file of #comment and no newline should succeed
expecting success:
git tag -m "A msg" tag-one-line &&
echo "tag-one-line" >expect &&
git tag -l | grep "^tag-one-line" >actual &&
test_cmp expect actual &&
git tag -n0 -l | grep "^tag-one-line" >actual &&
test_cmp expect actual &&
git tag -n0 -l tag-one-line >actual &&
test_cmp expect actual &&
git tag -n0 | grep "^tag-one-line" >actual &&
test_cmp expect actual &&
git tag -n0 tag-one-line >actual &&
test_cmp expect actual &&
echo "tag-one-line A msg" >expect &&
git tag -n1 -l | grep "^tag-one-line" >actual &&
test_cmp expect actual &&
git tag -n -l | grep "^tag-one-line" >actual &&
test_cmp expect actual &&
git tag -n1 -l tag-one-line >actual &&
test_cmp expect actual &&
git tag -n2 -l tag-one-line >actual &&
test_cmp expect actual &&
git tag -n999 -l tag-one-line >actual &&
test_cmp expect actual
ok 70 - listing the one-line message of a non-signed tag should succeed
expecting success:
git tag -n 100 >actual &&
test_must_be_empty actual &&
git tag -m "A msg" 100 &&
echo "100 A msg" >expect &&
git tag -n 100 >actual &&
test_cmp expect actual
ok 71 - The -n 100 invocation means -n --list 100, not -n100
expecting success:
git tag -m "" tag-zero-lines &&
echo "tag-zero-lines" >expect &&
git tag -l | grep "^tag-zero-lines" >actual &&
test_cmp expect actual &&
git tag -n0 -l | grep "^tag-zero-lines" >actual &&
test_cmp expect actual &&
git tag -n0 -l tag-zero-lines >actual &&
test_cmp expect actual &&
echo "tag-zero-lines " >expect &&
git tag -n1 -l | grep "^tag-zero-lines" >actual &&
test_cmp expect actual &&
git tag -n -l | grep "^tag-zero-lines" >actual &&
test_cmp expect actual &&
git tag -n1 -l tag-zero-lines >actual &&
test_cmp expect actual &&
git tag -n2 -l tag-zero-lines >actual &&
test_cmp expect actual &&
git tag -n999 -l tag-zero-lines >actual &&
test_cmp expect actual
ok 72 - listing the zero-lines message of a non-signed tag should succeed
expecting success:
git tag -F annotagmsg tag-lines &&
echo "tag-lines" >expect &&
git tag -l | grep "^tag-lines" >actual &&
test_cmp expect actual &&
git tag -n0 -l | grep "^tag-lines" >actual &&
test_cmp expect actual &&
git tag -n0 -l tag-lines >actual &&
test_cmp expect actual &&
echo "tag-lines tag line one" >expect &&
git tag -n1 -l | grep "^tag-lines" >actual &&
test_cmp expect actual &&
git tag -n -l | grep "^tag-lines" >actual &&
test_cmp expect actual &&
git tag -n1 -l tag-lines >actual &&
test_cmp expect actual &&
echo " tag line two" >>expect &&
git tag -n2 -l | grep "^ *tag.line" >actual &&
test_cmp expect actual &&
git tag -n2 -l tag-lines >actual &&
test_cmp expect actual &&
echo " tag line three" >>expect &&
git tag -n3 -l | grep "^ *tag.line" >actual &&
test_cmp expect actual &&
git tag -n3 -l tag-lines >actual &&
test_cmp expect actual &&
git tag -n4 -l | grep "^ *tag.line" >actual &&
test_cmp expect actual &&
git tag -n4 -l tag-lines >actual &&
test_cmp expect actual &&
git tag -n99 -l | grep "^ *tag.line" >actual &&
test_cmp expect actual &&
git tag -n99 -l tag-lines >actual &&
test_cmp expect actual
ok 73 - listing many message lines of a non-signed tag should succeed
expecting success:
blob=$(git hash-object -w --stdin <<-\EOF
Blob paragraph 1.
Blob paragraph 2.
EOF
) &&
git tag tag-blob $blob &&
echo "tag-blob " >expect &&
git tag -n1 -l tag-blob >actual &&
test_cmp expect actual
ok 74 - annotations for blobs are empty
expecting success:
tag_exists annotated-tag &&
test_must_fail git tag -v annotated-tag
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag annotated-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
A message
error: no signature found
ok 75 - trying to verify an annotated non-signed tag should fail
expecting success:
tag_exists file-annotated-tag &&
test_must_fail git tag -v file-annotated-tag
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag file-annotated-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
Another message
in a file.
error: no signature found
ok 76 - trying to verify a file-annotated non-signed tag should fail
expecting success:
tag_exists annotated-tag file-annotated-tag &&
test_must_fail git tag -v annotated-tag file-annotated-tag
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag annotated-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
A message
error: no signature found
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag file-annotated-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
Another message
in a file.
error: no signature found
ok 77 - trying to verify two annotated non-signed tags should fail
expecting success:
git tag -s -m "A signed tag message" signed-tag &&
get_tag_msg signed-tag >actual &&
test_cmp expect actual
ok 78 - creating a signed tag with -m message should succeed
expecting success:
git tag -u committer@example.com -m "Another message" u-signed-tag &&
get_tag_msg u-signed-tag >actual &&
test_cmp expect actual
ok 79 - sign with a given key id
expecting success:
test_must_fail git tag -u author@example.com \
-m "Another message" o-signed-tag
error: gpg failed to sign the data
error: unable to sign the tag
ok 80 - sign with an unknown id (1)
expecting success:
test_must_fail git tag -u DEADBEEF -m "Another message" o-signed-tag
error: gpg failed to sign the data
error: unable to sign the tag
ok 81 - sign with an unknown id (2)
expecting success:
GIT_EDITOR=./fakeeditor git tag -u CDDE430D implied-sign &&
get_tag_msg implied-sign >actual &&
test_cmp expect actual
ok 82 - -u implies signed tag
expecting success:
git tag -s -F sigmsgfile file-signed-tag &&
get_tag_msg file-signed-tag >actual &&
test_cmp expect actual
ok 83 - creating a signed tag with -F messagefile should succeed
expecting success:
git tag -s -F - stdin-signed-tag <siginputmsg &&
get_tag_msg stdin-signed-tag >actual &&
test_cmp expect actual
ok 84 - creating a signed tag with -F - should succeed
expecting success:
GIT_EDITOR=./fakeeditor git tag -s implied-annotate &&
get_tag_msg implied-annotate >actual &&
test_cmp expect actual
ok 85 - -s implies annotated tag
expecting success: test_config tag.forcesignannotated true &&
git tag -m "A message" forcesignannotated-implied-sign &&
get_tag_msg forcesignannotated-implied-sign >actual &&
test_cmp expect actual
ok 86 - git tag -s implied if configured with tag.forcesignannotated
expecting success: test_config tag.forcesignannotated true &&
git tag forcesignannotated-lightweight &&
tag_exists forcesignannotated-lightweight &&
test_must_fail git tag -v forcesignannotated-no-message
error: tag 'forcesignannotated-no-message' not found.
ok 87 - lightweight with no message when configured with tag.forcesignannotated
expecting success: test_config tag.forcesignannotated true &&
git tag -a -m "A message" forcesignannotated-annotate &&
get_tag_msg forcesignannotated-annotate >actual &&
test_cmp expect actual &&
test_must_fail git tag -v forcesignannotated-annotate
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag forcesignannotated-annotate
tagger C O Mitter <committer@example.com> 1112911993 -0700
A message
error: no signature found
ok 88 - git tag -a disable configured tag.forcesignannotated
expecting success: test_config tag.forcesignannotated false &&
git tag --sign -m "A message" forcesignannotated-disabled &&
get_tag_msg forcesignannotated-disabled >actual &&
test_cmp expect actual
ok 89 - git tag --sign enable GPG sign
expecting success: test_config tag.gpgsign true &&
git tag -m "A message" gpgsign-enabled &&
get_tag_msg gpgsign-enabled>actual &&
test_cmp expect actual
ok 90 - git tag configured tag.gpgsign enables GPG sign
expecting success: test_config tag.gpgsign true &&
git tag -a --no-sign -m "A message" no-sign &&
get_tag_msg no-sign>actual &&
test_cmp expect actual
ok 91 - git tag --no-sign configured tag.gpgsign skip GPG sign
expecting success:
! test -f nonexistingfile &&
! tag_exists nosigtag &&
test_must_fail git tag -s -F nonexistingfile nosigtag &&
! tag_exists nosigtag
fatal: could not open or read 'nonexistingfile': No such file or directory
ok 92 - trying to create a signed tag with non-existing -F file should fail
expecting success: git tag -v signed-tag
gpg: Signature made Wed Aug 14 07:34:39 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: checking the trustdb
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
A signed tag message
ok 93 - verifying a signed tag should succeed
expecting success: git tag -v signed-tag file-signed-tag
gpg: Signature made Wed Aug 14 07:34:39 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
A signed tag message
gpg: Signature made Wed Aug 14 07:34:39 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag file-signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
Another signed tag
message in a file.
ok 94 - verifying two signed tags in one command should succeed
expecting success:
test_must_fail git tag -v signed-tag annotated-tag &&
test_must_fail git tag -v file-annotated-tag file-signed-tag &&
test_must_fail git tag -v annotated-tag \
file-signed-tag file-annotated-tag &&
test_must_fail git tag -v signed-tag annotated-tag file-signed-tag
gpg: Signature made Wed Aug 14 07:34:39 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag annotated-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
A message
error: no signature found
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
A signed tag message
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag file-annotated-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
Another message
in a file.
error: no signature found
gpg: Signature made Wed Aug 14 07:34:39 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag file-signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
Another signed tag
message in a file.
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag annotated-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
A message
error: no signature found
gpg: Signature made Wed Aug 14 07:34:39 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag file-annotated-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
Another message
in a file.
error: no signature found
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag file-signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
Another signed tag
message in a file.
gpg: Signature made Wed Aug 14 07:34:39 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag annotated-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
A message
error: no signature found
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
A signed tag message
gpg: Signature made Wed Aug 14 07:34:39 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag file-signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
Another signed tag
message in a file.
ok 95 - verifying many signed and non-signed tags should fail
expecting success:
forged=$(git cat-file tag signed-tag |
sed -e "s/signed-tag/forged-tag/" |
git mktag) &&
git tag forged-tag $forged &&
test_must_fail git tag -v forged-tag
gpg: Signature made Wed Aug 14 07:34:39 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: BAD signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag forged-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
A signed tag message
ok 96 - verifying a forged tag should fail
expecting success:
cat >expect <<-\EOF &&
tagname : signed-tag
EOF
git tag -v --format="tagname : %(tag)" "signed-tag" >actual &&
test_cmp expect actual
ok 97 - verifying a proper tag with --format pass and format accordingly
expecting success:
test_must_fail git tag -v --format="tagname : %(tag)" "forged-tag" >actual &&
test_must_be_empty actual
ok 98 - verifying a forged tag with --format should fail silently
expecting success:
git tag -s -m "" empty-signed-tag &&
get_tag_msg empty-signed-tag >actual &&
test_cmp expect actual &&
git tag -v empty-signed-tag
gpg: Signature made Wed Aug 14 07:34:40 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag empty-signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
ok 99 - creating a signed tag with an empty -m message should succeed
expecting success:
git tag -s -F sigemptyfile emptyfile-signed-tag &&
get_tag_msg emptyfile-signed-tag >actual &&
test_cmp expect actual &&
git tag -v emptyfile-signed-tag
gpg: Signature made Wed Aug 14 07:34:40 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag emptyfile-signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
ok 100 - creating a signed tag with an empty -F messagefile should succeed
expecting success:
git tag -s -F sigblanksfile blanks-signed-tag &&
get_tag_msg blanks-signed-tag >actual &&
test_cmp expect actual &&
git tag -v blanks-signed-tag
gpg: Signature made Wed Aug 14 07:34:40 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag blanks-signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
Leading blank lines
Repeated blank lines
Trailing spaces
Trailing blank lines
ok 101 - extra blanks in the message for a signed tag should be removed
expecting success:
git tag -s -m " " blank-signed-tag &&
get_tag_msg blank-signed-tag >actual &&
test_cmp expect actual &&
git tag -v blank-signed-tag
gpg: Signature made Wed Aug 14 07:34:41 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag blank-signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
ok 102 - creating a signed tag with a blank -m message should succeed
expecting success:
git tag -s -F sigblankfile blankfile-signed-tag &&
get_tag_msg blankfile-signed-tag >actual &&
test_cmp expect actual &&
git tag -v blankfile-signed-tag
gpg: Signature made Wed Aug 14 07:34:41 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag blankfile-signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
ok 103 - creating a signed tag with blank -F file with spaces should succeed
expecting success:
git tag -s -F sigblanknonlfile blanknonlfile-signed-tag &&
get_tag_msg blanknonlfile-signed-tag >actual &&
test_cmp expect actual &&
git tag -v blanknonlfile-signed-tag
gpg: Signature made Wed Aug 14 07:34:41 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag blanknonlfile-signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
ok 104 - creating a signed tag with spaces and no newline should succeed
expecting success:
cat >msg <<-\EOF &&
-----BEGIN PGP MESSAGE-----
this is not a real PGP message
-----END PGP MESSAGE-----
EOF
git tag -s -F msg confusing-pgp-message &&
git tag -v confusing-pgp-message
gpg: Signature made Wed Aug 14 07:34:41 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag confusing-pgp-message
tagger C O Mitter <committer@example.com> 1112911993 -0700
-----BEGIN PGP MESSAGE-----
this is not a real PGP message
-----END PGP MESSAGE-----
ok 105 - signed tag with embedded PGP message
expecting success:
git tag -s -F sigcommentsfile comments-signed-tag &&
get_tag_msg comments-signed-tag >actual &&
test_cmp expect actual &&
git tag -v comments-signed-tag
gpg: Signature made Wed Aug 14 07:34:41 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag comments-signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
The message.
One line.
Another line.
Last line.
ok 106 - creating a signed tag with a -F file with #comments should succeed
expecting success:
git tag -s -m "#comment" comment-signed-tag &&
get_tag_msg comment-signed-tag >actual &&
test_cmp expect actual &&
git tag -v comment-signed-tag
gpg: Signature made Wed Aug 14 07:34:41 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag comment-signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
ok 107 - creating a signed tag with #commented -m message should succeed
expecting success:
git tag -s -F sigcommentfile commentfile-signed-tag &&
get_tag_msg commentfile-signed-tag >actual &&
test_cmp expect actual &&
git tag -v commentfile-signed-tag
gpg: Signature made Wed Aug 14 07:34:41 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag commentfile-signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
ok 108 - creating a signed tag with #commented -F messagefile should succeed
expecting success:
git tag -s -F sigcommentnonlfile commentnonlfile-signed-tag &&
get_tag_msg commentnonlfile-signed-tag >actual &&
test_cmp expect actual &&
git tag -v commentnonlfile-signed-tag
gpg: Signature made Wed Aug 14 07:34:41 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Good signature from "C O Mitter <committer@example.com>" [ultimate]
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag commentnonlfile-signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
ok 109 - creating a signed tag with a #comment and no newline should succeed
expecting success:
git tag -s -m "A message line signed" stag-one-line &&
echo "stag-one-line" >expect &&
git tag -l | grep "^stag-one-line" >actual &&
test_cmp expect actual &&
git tag -n0 -l | grep "^stag-one-line" >actual &&
test_cmp expect actual &&
git tag -n0 -l stag-one-line >actual &&
test_cmp expect actual &&
echo "stag-one-line A message line signed" >expect &&
git tag -n1 -l | grep "^stag-one-line" >actual &&
test_cmp expect actual &&
git tag -n -l | grep "^stag-one-line" >actual &&
test_cmp expect actual &&
git tag -n1 -l stag-one-line >actual &&
test_cmp expect actual &&
git tag -n2 -l stag-one-line >actual &&
test_cmp expect actual &&
git tag -n999 -l stag-one-line >actual &&
test_cmp expect actual
ok 110 - listing the one-line message of a signed tag should succeed
expecting success:
git tag -s -m "" stag-zero-lines &&
echo "stag-zero-lines" >expect &&
git tag -l | grep "^stag-zero-lines" >actual &&
test_cmp expect actual &&
git tag -n0 -l | grep "^stag-zero-lines" >actual &&
test_cmp expect actual &&
git tag -n0 -l stag-zero-lines >actual &&
test_cmp expect actual &&
echo "stag-zero-lines " >expect &&
git tag -n1 -l | grep "^stag-zero-lines" >actual &&
test_cmp expect actual &&
git tag -n -l | grep "^stag-zero-lines" >actual &&
test_cmp expect actual &&
git tag -n1 -l stag-zero-lines >actual &&
test_cmp expect actual &&
git tag -n2 -l stag-zero-lines >actual &&
test_cmp expect actual &&
git tag -n999 -l stag-zero-lines >actual &&
test_cmp expect actual
ok 111 - listing the zero-lines message of a signed tag should succeed
expecting success:
git tag -s -F sigtagmsg stag-lines &&
echo "stag-lines" >expect &&
git tag -l | grep "^stag-lines" >actual &&
test_cmp expect actual &&
git tag -n0 -l | grep "^stag-lines" >actual &&
test_cmp expect actual &&
git tag -n0 -l stag-lines >actual &&
test_cmp expect actual &&
echo "stag-lines stag line one" >expect &&
git tag -n1 -l | grep "^stag-lines" >actual &&
test_cmp expect actual &&
git tag -n -l | grep "^stag-lines" >actual &&
test_cmp expect actual &&
git tag -n1 -l stag-lines >actual &&
test_cmp expect actual &&
echo " stag line two" >>expect &&
git tag -n2 -l | grep "^ *stag.line" >actual &&
test_cmp expect actual &&
git tag -n2 -l stag-lines >actual &&
test_cmp expect actual &&
echo " stag line three" >>expect &&
git tag -n3 -l | grep "^ *stag.line" >actual &&
test_cmp expect actual &&
git tag -n3 -l stag-lines >actual &&
test_cmp expect actual &&
git tag -n4 -l | grep "^ *stag.line" >actual &&
test_cmp expect actual &&
git tag -n4 -l stag-lines >actual &&
test_cmp expect actual &&
git tag -n99 -l | grep "^ *stag.line" >actual &&
test_cmp expect actual &&
git tag -n99 -l stag-lines >actual &&
test_cmp expect actual
ok 112 - listing many message lines of a signed tag should succeed
expecting success:
git tag -s -m "A message for a tree" tree-signed-tag HEAD^{tree} &&
get_tag_msg tree-signed-tag >actual &&
test_cmp expect actual
ok 113 - creating a signed tag pointing to a tree should succeed
expecting success:
git tag -s -m "A message for a blob" blob-signed-tag HEAD:foo &&
get_tag_msg blob-signed-tag >actual &&
test_cmp expect actual
ok 114 - creating a signed tag pointing to a blob should succeed
expecting success:
git tag -s -m "A message for another tag" tag-signed-tag signed-tag &&
get_tag_msg tag-signed-tag >actual &&
test_cmp expect actual
hint: You have created a nested tag. The object referred to by your new tag is
hint: already a tag. If you meant to tag the object that it points to, use:
hint:
hint: git tag -f tag-signed-tag signed-tag^{}
ok 115 - creating a signed tag pointing to another tag should succeed
skipping test: creating a signed tag with rfc1991
echo "rfc1991" >gpghome/gpg.conf &&
git tag -s -m "RFC1991 signed tag" rfc1991-signed-tag $commit &&
get_tag_msg rfc1991-signed-tag >actual &&
test_cmp expect actual
ok 116 # skip creating a signed tag with rfc1991 (missing RFC1991 of GPG,RFC1991)
skipping test: reediting a signed tag body omits signature
echo "rfc1991" >gpghome/gpg.conf &&
echo "RFC1991 signed tag" >expect &&
GIT_EDITOR=./fakeeditor git tag -f -s rfc1991-signed-tag $commit &&
test_cmp expect actual
ok 117 # skip reediting a signed tag body omits signature (missing RFC1991 of GPG,RFC1991)
skipping test: verifying rfc1991 signature
echo "rfc1991" >gpghome/gpg.conf &&
git tag -v rfc1991-signed-tag
ok 118 # skip verifying rfc1991 signature (missing RFC1991 of GPG,RFC1991)
skipping test: list tag with rfc1991 signature
echo "rfc1991" >gpghome/gpg.conf &&
echo "rfc1991-signed-tag RFC1991 signed tag" >expect &&
git tag -l -n1 rfc1991-signed-tag >actual &&
test_cmp expect actual &&
git tag -l -n2 rfc1991-signed-tag >actual &&
test_cmp expect actual &&
git tag -l -n999 rfc1991-signed-tag >actual &&
test_cmp expect actual
ok 119 # skip list tag with rfc1991 signature (missing RFC1991 of GPG,RFC1991)
skipping test: verifying rfc1991 signature without --rfc1991
git tag -v rfc1991-signed-tag
ok 120 # skip verifying rfc1991 signature without --rfc1991 (missing RFC1991 of GPG,RFC1991)
skipping test: list tag with rfc1991 signature without --rfc1991
echo "rfc1991-signed-tag RFC1991 signed tag" >expect &&
git tag -l -n1 rfc1991-signed-tag >actual &&
test_cmp expect actual &&
git tag -l -n2 rfc1991-signed-tag >actual &&
test_cmp expect actual &&
git tag -l -n999 rfc1991-signed-tag >actual &&
test_cmp expect actual
ok 121 # skip list tag with rfc1991 signature without --rfc1991 (missing RFC1991 of GPG,RFC1991)
skipping test: reediting a signed tag body omits signature
echo "RFC1991 signed tag" >expect &&
GIT_EDITOR=./fakeeditor git tag -f -s rfc1991-signed-tag $commit &&
test_cmp expect actual
ok 122 # skip reediting a signed tag body omits signature (missing RFC1991 of GPG,RFC1991)
expecting success: test_config user.signingkey BobTheMouse &&
test_must_fail git tag -s -m tail tag-gpg-failure
error: gpg failed to sign the data
error: unable to sign the tag
ok 123 - git tag -s fails if gpg is misconfigured (bad key)
expecting success: test_config gpg.program echo &&
test_must_fail git tag -s -m tail tag-gpg-failure
error: gpg failed to sign the data
error: unable to sign the tag
ok 124 - git tag -s fails if gpg is misconfigured (bad signature format)
expecting success: test_config user.signingkey BobTheMouse &&
test_config gpg.format x509 &&
test_must_fail git tag -s -m tail tag-gpg-failure
error: gpg failed to sign the data
error: unable to sign the tag
ok 125 - git tag -s fails if gpgsm is misconfigured (bad key)
expecting success: test_config gpg.x509.program echo &&
test_config gpg.format x509 &&
test_must_fail git tag -s -m tail tag-gpg-failure
error: gpg failed to sign the data
error: unable to sign the tag
ok 126 - git tag -s fails if gpgsm is misconfigured (bad signature format)
expecting success: test_must_fail git tag -v signed-tag
gpg: keyblock resource '/<<PKGBUILDDIR>>/t/trash directory.t7004-tag/gpghome/pubring.kbx': No such file or directory
gpg: Signature made Wed Aug 14 07:34:39 2019 UTC
gpg: using DSA key 73D758744BE721698EC54E8713B6F51ECDDE430D
gpg: issuer "committer@example.com"
gpg: Can't check signature: No public key
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag signed-tag
tagger C O Mitter <committer@example.com> 1112911993 -0700
A signed tag message
ok 127 - verify signed tag fails when public key is not present
expecting success:
! (GIT_EDITOR=cat git tag -a initial-comment)
#
# Write a message for tag:
# initial-comment
# Lines starting with '#' will be ignored.
fatal: no tag message?
ok 128 - git tag -a fails if tag annotation is empty
expecting success:
! (GIT_EDITOR=cat git tag -a initial-comment > actual)
fatal: no tag message?
ok 129 - message in editor has initial comment
expecting success:
# check the first line --- should be empty
echo >first.expect &&
sed -e 1q <actual >first.actual &&
test_i18ncmp first.expect first.actual
ok 130 - message in editor has initial comment: first line
expecting success:
# remove commented lines from the remainder -- should be empty
sed -e 1d -e "/^#/d" <actual >rest.actual &&
test_must_be_empty rest.actual
ok 131 - message in editor has initial comment: remainder
expecting success:
git tag -a -m "An annotation to be reused" reuse &&
GIT_EDITOR=true git tag -f -a reuse &&
get_tag_msg reuse >actual &&
test_cmp expect actual
ok 132 - overwriting an annoted tag should use its previous body
expecting success:
mkdir subdir &&
echo "Tag message in top directory" >msgfile-5 &&
echo "Tag message in sub directory" >subdir/msgfile-5 &&
(
cd subdir &&
git tag -a -F msgfile-5 tag-from-subdir
) &&
git cat-file tag tag-from-subdir | grep "in sub directory"
Tag message in sub directory
ok 133 - filename for the message is relative to cwd
expecting success:
echo "Tag message in sub directory" >subdir/msgfile-6 &&
(
cd subdir &&
git tag -a -F msgfile-6 tag-from-subdir-2
) &&
git cat-file tag tag-from-subdir-2 | grep "in sub directory"
Tag message in sub directory
ok 134 - filename for the message is relative to cwd
expecting success:
echo foo-2.0 >foo &&
git add foo &&
git commit -m second &&
git tag v2.0
[master d3200cb] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 135 - creating second commit and tag
expecting success:
echo foo-dev >foo &&
git add foo &&
git commit -m third
[master c282771] third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 136 - creating third commit without tag
expecting success:
git tag -l --contains 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b v* >actual &&
test_cmp expected actual
ok 137 - checking that first commit is in all tags (hash)
expecting success:
git tag -l --contains v1.0 v* >actual &&
test_cmp expected actual
ok 138 - checking that first commit is in all tags (tag)
expecting success:
git tag -l --contains HEAD~2 v* >actual &&
test_cmp expected actual
ok 139 - checking that first commit is in all tags (relative)
expecting success:
git tag -l --no-contains 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b v* >actual &&
test_must_be_empty actual
ok 140 - checking that first commit is not listed in any tag with --no-contains (hash)
expecting success:
git tag -l --no-contains v1.0 v* >actual &&
test_must_be_empty actual
ok 141 - checking that first commit is in all tags (tag)
expecting success:
git tag -l --no-contains HEAD~2 v* >actual &&
test_must_be_empty actual
ok 142 - checking that first commit is in all tags (relative)
expecting success:
git tag -l --contains d3200cb2a2a0c653d5ddeedfef2b94eba9226013 v* >actual &&
test_cmp expected actual
ok 143 - checking that second commit only has one tag
expecting success:
git tag -l --no-contains d3200cb2a2a0c653d5ddeedfef2b94eba9226013 v* >actual &&
test_cmp expected actual
ok 144 - inverse of the last test, with --no-contains
expecting success:
git tag -l --contains c282771867dd40cef6c1f87644fce5e5bc6b13ad v* >actual &&
test_must_be_empty actual
ok 145 - checking that third commit has no tags
expecting success:
git tag -l --no-contains c282771867dd40cef6c1f87644fce5e5bc6b13ad v* >actual &&
test_cmp expected actual
ok 146 - conversely --no-contains on the third commit lists all tags
expecting success:
git branch stable v2.0 &&
git checkout stable &&
echo foo-3.0 > foo &&
git commit foo -m fourth &&
git tag v3.0
Switched to branch 'stable'
[stable 820ea75] fourth
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 147 - creating simple branch
expecting success:
git tag -l --contains 820ea75a3bc5b6aafd076dbee5f2daa3dea70df9 v* >actual &&
test_cmp expected actual
ok 148 - checking that branch head only has one tag
expecting success:
git tag -l --no-contains 820ea75a3bc5b6aafd076dbee5f2daa3dea70df9 v* >actual &&
test_cmp expected actual
ok 149 - checking that branch head with --no-contains lists all but one tag
expecting success:
git merge --strategy=ours master &&
git tag v4.0
Merge made by the 'ours' strategy.
ok 150 - merging original branch into this branch
expecting success:
git tag -l --contains c282771867dd40cef6c1f87644fce5e5bc6b13ad v* >actual &&
test_cmp expected actual
ok 151 - checking that original branch head has one tag now
expecting success:
git tag -l --no-contains c282771867dd40cef6c1f87644fce5e5bc6b13ad v* >actual &&
test_cmp expected actual
ok 152 - checking that original branch head with --no-contains lists all but one tag now
expecting success:
git tag -l --contains 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b v* >actual &&
test_cmp expected actual
ok 153 - checking that initial commit is in all tags
expecting success:
git tag --contains $hash1 v* >actual &&
test_cmp expected actual
ok 154 - checking that --contains can be used in non-list mode
expecting success:
git tag -l --no-contains 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b v* >actual &&
test_must_be_empty actual
ok 155 - checking that initial commit is in all tags with --no-contains
expecting success:
test_must_fail git tag -a &&
test_must_fail git tag -a -l &&
test_must_fail git tag -s &&
test_must_fail git tag -s -l &&
test_must_fail git tag -m &&
test_must_fail git tag -m -l &&
test_must_fail git tag -m "hlagh" &&
test_must_fail git tag -m "hlagh" -l &&
test_must_fail git tag -F &&
test_must_fail git tag -F -l &&
test_must_fail git tag -f &&
test_must_fail git tag -f -l &&
test_must_fail git tag -a -s -m -F &&
test_must_fail git tag -a -s -m -F -l &&
test_must_fail git tag -l -v &&
test_must_fail git tag -l -d &&
test_must_fail git tag -l -v -d &&
test_must_fail git tag -n 100 -v &&
test_must_fail git tag -l -m msg &&
test_must_fail git tag -l -F some file &&
test_must_fail git tag -v -s &&
test_must_fail git tag --contains tag-tree &&
test_must_fail git tag --contains tag-blob &&
test_must_fail git tag --no-contains tag-tree &&
test_must_fail git tag --no-contains tag-blob &&
test_must_fail git tag --contains --no-contains &&
test_must_fail git tag --no-with HEAD &&
test_must_fail git tag --no-without HEAD
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
<tagname> [<head>]
or: git tag -d <tagname>...
or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]
[--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
-l, --list list tag names
-n[<n>] print <n> lines of each tag message
-d, --delete delete tags
-v, --verify verify tags
Tag creation options
-a, --annotate annotated tag, needs a message
-m, --message <message>
tag message
-F, --file <file> read message from file
-e, --edit force edit of tag message
-s, --sign annotated and GPG-signed tag
--cleanup <mode> how to strip spaces and #comments from message
-u, --local-user <key-id>
use another key to sign the tag
-f, --force replace the tag if exists
--create-reflog create a reflog
Tag listing options
--column[=<style>] show tag list in columns
--contains <commit> print only tags that contain the commit
--no-contains <commit>
print only tags that don't contain the commit
--merged <commit> print only tags that are merged
--no-merged <commit> print only tags that are not merged
--sort <key> field name to sort on
--points-at <object> print only tags of the object
--format <format> format to use for the output
--color[=<when>] respect format colors
-i, --ignore-case sorting and filtering are case insensitive
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
<tagname> [<head>]
or: git tag -d <tagname>...
or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]
[--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
-l, --list list tag names
-n[<n>] print <n> lines of each tag message
-d, --delete delete tags
-v, --verify verify tags
Tag creation options
-a, --annotate annotated tag, needs a message
-m, --message <message>
tag message
-F, --file <file> read message from file
-e, --edit force edit of tag message
-s, --sign annotated and GPG-signed tag
--cleanup <mode> how to strip spaces and #comments from message
-u, --local-user <key-id>
use another key to sign the tag
-f, --force replace the tag if exists
--create-reflog create a reflog
Tag listing options
--column[=<style>] show tag list in columns
--contains <commit> print only tags that contain the commit
--no-contains <commit>
print only tags that don't contain the commit
--merged <commit> print only tags that are merged
--no-merged <commit> print only tags that are not merged
--sort <key> field name to sort on
--points-at <object> print only tags of the object
--format <format> format to use for the output
--color[=<when>] respect format colors
-i, --ignore-case sorting and filtering are case insensitive
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
<tagname> [<head>]
or: git tag -d <tagname>...
or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]
[--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
-l, --list list tag names
-n[<n>] print <n> lines of each tag message
-d, --delete delete tags
-v, --verify verify tags
Tag creation options
-a, --annotate annotated tag, needs a message
-m, --message <message>
tag message
-F, --file <file> read message from file
-e, --edit force edit of tag message
-s, --sign annotated and GPG-signed tag
--cleanup <mode> how to strip spaces and #comments from message
-u, --local-user <key-id>
use another key to sign the tag
-f, --force replace the tag if exists
--create-reflog create a reflog
Tag listing options
--column[=<style>] show tag list in columns
--contains <commit> print only tags that contain the commit
--no-contains <commit>
print only tags that don't contain the commit
--merged <commit> print only tags that are merged
--no-merged <commit> print only tags that are not merged
--sort <key> field name to sort on
--points-at <object> print only tags of the object
--format <format> format to use for the output
--color[=<when>] respect format colors
-i, --ignore-case sorting and filtering are case insensitive
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
<tagname> [<head>]
or: git tag -d <tagname>...
or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]
[--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
-l, --list list tag names
-n[<n>] print <n> lines of each tag message
-d, --delete delete tags
-v, --verify verify tags
Tag creation options
-a, --annotate annotated tag, needs a message
-m, --message <message>
tag message
-F, --file <file> read message from file
-e, --edit force edit of tag message
-s, --sign annotated and GPG-signed tag
--cleanup <mode> how to strip spaces and #comments from message
-u, --local-user <key-id>
use another key to sign the tag
-f, --force replace the tag if exists
--create-reflog create a reflog
Tag listing options
--column[=<style>] show tag list in columns
--contains <commit> print only tags that contain the commit
--no-contains <commit>
print only tags that don't contain the commit
--merged <commit> print only tags that are merged
--no-merged <commit> print only tags that are not merged
--sort <key> field name to sort on
--points-at <object> print only tags of the object
--format <format> format to use for the output
--color[=<when>] respect format colors
-i, --ignore-case sorting and filtering are case insensitive
error: switch `m' requires a value
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
<tagname> [<head>]
or: git tag -d <tagname>...
or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]
[--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
-l, --list list tag names
-n[<n>] print <n> lines of each tag message
-d, --delete delete tags
-v, --verify verify tags
Tag creation options
-a, --annotate annotated tag, needs a message
-m, --message <message>
tag message
-F, --file <file> read message from file
-e, --edit force edit of tag message
-s, --sign annotated and GPG-signed tag
--cleanup <mode> how to strip spaces and #comments from message
-u, --local-user <key-id>
use another key to sign the tag
-f, --force replace the tag if exists
--create-reflog create a reflog
Tag listing options
--column[=<style>] show tag list in columns
--contains <commit> print only tags that contain the commit
--no-contains <commit>
print only tags that don't contain the commit
--merged <commit> print only tags that are merged
--no-merged <commit> print only tags that are not merged
--sort <key> field name to sort on
--points-at <object> print only tags of the object
--format <format> format to use for the output
--color[=<when>] respect format colors
-i, --ignore-case sorting and filtering are case insensitive
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
<tagname> [<head>]
or: git tag -d <tagname>...
or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]
[--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
-l, --list list tag names
-n[<n>] print <n> lines of each tag message
-d, --delete delete tags
-v, --verify verify tags
Tag creation options
-a, --annotate annotated tag, needs a message
-m, --message <message>
tag message
-F, --file <file> read message from file
-e, --edit force edit of tag message
-s, --sign annotated and GPG-signed tag
--cleanup <mode> how to strip spaces and #comments from message
-u, --local-user <key-id>
use another key to sign the tag
-f, --force replace the tag if exists
--create-reflog create a reflog
Tag listing options
--column[=<style>] show tag list in columns
--contains <commit> print only tags that contain the commit
--no-contains <commit>
print only tags that don't contain the commit
--merged <commit> print only tags that are merged
--no-merged <commit> print only tags that are not merged
--sort <key> field name to sort on
--points-at <object> print only tags of the object
--format <format> format to use for the output
--color[=<when>] respect format colors
-i, --ignore-case sorting and filtering are case insensitive
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
<tagname> [<head>]
or: git tag -d <tagname>...
or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]
[--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
-l, --list list tag names
-n[<n>] print <n> lines of each tag message
-d, --delete delete tags
-v, --verify verify tags
Tag creation options
-a, --annotate annotated tag, needs a message
-m, --message <message>
tag message
-F, --file <file> read message from file
-e, --edit force edit of tag message
-s, --sign annotated and GPG-signed tag
--cleanup <mode> how to strip spaces and #comments from message
-u, --local-user <key-id>
use another key to sign the tag
-f, --force replace the tag if exists
--create-reflog create a reflog
Tag listing options
--column[=<style>] show tag list in columns
--contains <commit> print only tags that contain the commit
--no-contains <commit>
print only tags that don't contain the commit
--merged <commit> print only tags that are merged
--no-merged <commit> print only tags that are not merged
--sort <key> field name to sort on
--points-at <object> print only tags of the object
--format <format> format to use for the output
--color[=<when>] respect format colors
-i, --ignore-case sorting and filtering are case insensitive
error: switch `F' requires a value
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
<tagname> [<head>]
or: git tag -d <tagname>...
or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]
[--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
-l, --list list tag names
-n[<n>] print <n> lines of each tag message
-d, --delete delete tags
-v, --verify verify tags
Tag creation options
-a, --annotate annotated tag, needs a message
-m, --message <message>
tag message
-F, --file <file> read message from file
-e, --edit force edit of tag message
-s, --sign annotated and GPG-signed tag
--cleanup <mode> how to strip spaces and #comments from message
-u, --local-user <key-id>
use another key to sign the tag
-f, --force replace the tag if exists
--create-reflog create a reflog
Tag listing options
--column[=<style>] show tag list in columns
--contains <commit> print only tags that contain the commit
--no-contains <commit>
print only tags that don't contain the commit
--merged <commit> print only tags that are merged
--no-merged <commit> print only tags that are not merged
--sort <key> field name to sort on
--points-at <object> print only tags of the object
--format <format> format to use for the output
--color[=<when>] respect format colors
-i, --ignore-case sorting and filtering are case insensitive
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
<tagname> [<head>]
or: git tag -d <tagname>...
or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]
[--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
-l, --list list tag names
-n[<n>] print <n> lines of each tag message
-d, --delete delete tags
-v, --verify verify tags
Tag creation options
-a, --annotate annotated tag, needs a message
-m, --message <message>
tag message
-F, --file <file> read message from file
-e, --edit force edit of tag message
-s, --sign annotated and GPG-signed tag
--cleanup <mode> how to strip spaces and #comments from message
-u, --local-user <key-id>
use another key to sign the tag
-f, --force replace the tag if exists
--create-reflog create a reflog
Tag listing options
--column[=<style>] show tag list in columns
--contains <commit> print only tags that contain the commit
--no-contains <commit>
print only tags that don't contain the commit
--merged <commit> print only tags that are merged
--no-merged <commit> print only tags that are not merged
--sort <key> field name to sort on
--points-at <object> print only tags of the object
--format <format> format to use for the output
--color[=<when>] respect format colors
-i, --ignore-case sorting and filtering are case insensitive
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
<tagname> [<head>]
or: git tag -d <tagname>...
or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]
[--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
-l, --list list tag names
-n[<n>] print <n> lines of each tag message
-d, --delete delete tags
-v, --verify verify tags
Tag creation options
-a, --annotate annotated tag, needs a message
-m, --message <message>
tag message
-F, --file <file> read message from file
-e, --edit force edit of tag message
-s, --sign annotated and GPG-signed tag
--cleanup <mode> how to strip spaces and #comments from message
-u, --local-user <key-id>
use another key to sign the tag
-f, --force replace the tag if exists
--create-reflog create a reflog
Tag listing options
--column[=<style>] show tag list in columns
--contains <commit> print only tags that contain the commit
--no-contains <commit>
print only tags that don't contain the commit
--merged <commit> print only tags that are merged
--no-merged <commit> print only tags that are not merged
--sort <key> field name to sort on
--points-at <object> print only tags of the object
--format <format> format to use for the output
--color[=<when>] respect format colors
-i, --ignore-case sorting and filtering are case insensitive
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
<tagname> [<head>]
or: git tag -d <tagname>...
or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]
[--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
-l, --list list tag names
-n[<n>] print <n> lines of each tag message
-d, --delete delete tags
-v, --verify verify tags
Tag creation options
-a, --annotate annotated tag, needs a message
-m, --message <message>
tag message
-F, --file <file> read message from file
-e, --edit force edit of tag message
-s, --sign annotated and GPG-signed tag
--cleanup <mode> how to strip spaces and #comments from message
-u, --local-user <key-id>
use another key to sign the tag
-f, --force replace the tag if exists
--create-reflog create a reflog
Tag listing options
--column[=<style>] show tag list in columns
--contains <commit> print only tags that contain the commit
--no-contains <commit>
print only tags that don't contain the commit
--merged <commit> print only tags that are merged
--no-merged <commit> print only tags that are not merged
--sort <key> field name to sort on
--points-at <object> print only tags of the object
--format <format> format to use for the output
--color[=<when>] respect format colors
-i, --ignore-case sorting and filtering are case insensitive
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
<tagname> [<head>]
or: git tag -d <tagname>...
or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]
[--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
-l, --list list tag names
-n[<n>] print <n> lines of each tag message
-d, --delete delete tags
-v, --verify verify tags
Tag creation options
-a, --annotate annotated tag, needs a message
-m, --message <message>
tag message
-F, --file <file> read message from file
-e, --edit force edit of tag message
-s, --sign annotated and GPG-signed tag
--cleanup <mode> how to strip spaces and #comments from message
-u, --local-user <key-id>
use another key to sign the tag
-f, --force replace the tag if exists
--create-reflog create a reflog
Tag listing options
--column[=<style>] show tag list in columns
--contains <commit> print only tags that contain the commit
--no-contains <commit>
print only tags that don't contain the commit
--merged <commit> print only tags that are merged
--no-merged <commit> print only tags that are not merged
--sort <key> field name to sort on
--points-at <object> print only tags of the object
--format <format> format to use for the output
--color[=<when>] respect format colors
-i, --ignore-case sorting and filtering are case insensitive
error: switch `v' is incompatible with --list
error: switch `d' is incompatible with --list
error: switch `v' is incompatible with --list
fatal: -n option is only allowed in list mode
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
<tagname> [<head>]
or: git tag -d <tagname>...
or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]
[--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
-l, --list list tag names
-n[<n>] print <n> lines of each tag message
-d, --delete delete tags
-v, --verify verify tags
Tag creation options
-a, --annotate annotated tag, needs a message
-m, --message <message>
tag message
-F, --file <file> read message from file
-e, --edit force edit of tag message
-s, --sign annotated and GPG-signed tag
--cleanup <mode> how to strip spaces and #comments from message
-u, --local-user <key-id>
use another key to sign the tag
-f, --force replace the tag if exists
--create-reflog create a reflog
Tag listing options
--column[=<style>] show tag list in columns
--contains <commit> print only tags that contain the commit
--no-contains <commit>
print only tags that don't contain the commit
--merged <commit> print only tags that are merged
--no-merged <commit> print only tags that are not merged
--sort <key> field name to sort on
--points-at <object> print only tags of the object
--format <format> format to use for the output
--color[=<when>] respect format colors
-i, --ignore-case sorting and filtering are case insensitive
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
<tagname> [<head>]
or: git tag -d <tagname>...
or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]
[--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
-l, --list list tag names
-n[<n>] print <n> lines of each tag message
-d, --delete delete tags
-v, --verify verify tags
Tag creation options
-a, --annotate annotated tag, needs a message
-m, --message <message>
tag message
-F, --file <file> read message from file
-e, --edit force edit of tag message
-s, --sign annotated and GPG-signed tag
--cleanup <mode> how to strip spaces and #comments from message
-u, --local-user <key-id>
use another key to sign the tag
-f, --force replace the tag if exists
--create-reflog create a reflog
Tag listing options
--column[=<style>] show tag list in columns
--contains <commit> print only tags that contain the commit
--no-contains <commit>
print only tags that don't contain the commit
--merged <commit> print only tags that are merged
--no-merged <commit> print only tags that are not merged
--sort <key> field name to sort on
--points-at <object> print only tags of the object
--format <format> format to use for the output
--color[=<when>] respect format colors
-i, --ignore-case sorting and filtering are case insensitive
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
<tagname> [<head>]
or: git tag -d <tagname>...
or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]
[--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
-l, --list list tag names
-n[<n>] print <n> lines of each tag message
-d, --delete delete tags
-v, --verify verify tags
Tag creation options
-a, --annotate annotated tag, needs a message
-m, --message <message>
tag message
-F, --file <file> read message from file
-e, --edit force edit of tag message
-s, --sign annotated and GPG-signed tag
--cleanup <mode> how to strip spaces and #comments from message
-u, --local-user <key-id>
use another key to sign the tag
-f, --force replace the tag if exists
--create-reflog create a reflog
Tag listing options
--column[=<style>] show tag list in columns
--contains <commit> print only tags that contain the commit
--no-contains <commit>
print only tags that don't contain the commit
--merged <commit> print only tags that are merged
--no-merged <commit> print only tags that are not merged
--sort <key> field name to sort on
--points-at <object> print only tags of the object
--format <format> format to use for the output
--color[=<when>] respect format colors
-i, --ignore-case sorting and filtering are case insensitive
error: malformed object name tag-tree
error: object fc33d716ad1ef3e46e3c05586c188aef7c225de9 is a blob, not a commit
error: no such commit tag-blob
error: malformed object name tag-tree
error: object fc33d716ad1ef3e46e3c05586c188aef7c225de9 is a blob, not a commit
error: no such commit tag-blob
error: malformed object name --no-contains
error: unknown option `no-with'
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
<tagname> [<head>]
or: git tag -d <tagname>...
or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]
[--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
-l, --list list tag names
-n[<n>] print <n> lines of each tag message
-d, --delete delete tags
-v, --verify verify tags
Tag creation options
-a, --annotate annotated tag, needs a message
-m, --message <message>
tag message
-F, --file <file> read message from file
-e, --edit force edit of tag message
-s, --sign annotated and GPG-signed tag
--cleanup <mode> how to strip spaces and #comments from message
-u, --local-user <key-id>
use another key to sign the tag
-f, --force replace the tag if exists
--create-reflog create a reflog
Tag listing options
--column[=<style>] show tag list in columns
--contains <commit> print only tags that contain the commit
--no-contains <commit>
print only tags that don't contain the commit
--merged <commit> print only tags that are merged
--no-merged <commit> print only tags that are not merged
--sort <key> field name to sort on
--points-at <object> print only tags of the object
--format <format> format to use for the output
--color[=<when>] respect format colors
-i, --ignore-case sorting and filtering are case insensitive
error: unknown option `no-without'
usage: git tag [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>]
<tagname> [<head>]
or: git tag -d <tagname>...
or: git tag -l [-n[<num>]] [--contains <commit>] [--no-contains <commit>] [--points-at <object>]
[--format=<format>] [--[no-]merged [<commit>]] [<pattern>...]
or: git tag -v [--format=<format>] <tagname>...
-l, --list list tag names
-n[<n>] print <n> lines of each tag message
-d, --delete delete tags
-v, --verify verify tags
Tag creation options
-a, --annotate annotated tag, needs a message
-m, --message <message>
tag message
-F, --file <file> read message from file
-e, --edit force edit of tag message
-s, --sign annotated and GPG-signed tag
--cleanup <mode> how to strip spaces and #comments from message
-u, --local-user <key-id>
use another key to sign the tag
-f, --force replace the tag if exists
--create-reflog create a reflog
Tag listing options
--column[=<style>] show tag list in columns
--contains <commit> print only tags that contain the commit
--no-contains <commit>
print only tags that don't contain the commit
--merged <commit> print only tags that are merged
--no-merged <commit> print only tags that are not merged
--sort <key> field name to sort on
--points-at <object> print only tags of the object
--format <format> format to use for the output
--color[=<when>] respect format colors
-i, --ignore-case sorting and filtering are case insensitive
ok 156 - mixing incompatibles modes and options is forbidden
expecting success:
test_must_fail git tag -d --contains HEAD &&
test_must_fail git tag -d --contains HEAD some-tag &&
test_must_fail git tag -v --contains HEAD
fatal: --contains option is only allowed in list mode
fatal: --contains option is only allowed in list mode
fatal: --contains option is only allowed in list mode
ok 157 - mixing incompatible modes with --contains is forbidden
expecting success:
git tag -n --contains HEAD HEAD &&
git tag --contains HEAD HEAD &&
git tag --contains
v4.0
ok 158 - Doing 'git tag --list-like --contains <commit> <pattern> is permitted
expecting success:
test_must_fail git tag -d --with HEAD &&
test_must_fail git tag -d --with HEAD some-tag &&
test_must_fail git tag -v --with HEAD
fatal: --contains option is only allowed in list mode
fatal: --contains option is only allowed in list mode
fatal: --contains option is only allowed in list mode
ok 159 - mixing incompatible modes with --with is forbidden
expecting success:
git tag -n --with HEAD HEAD &&
git tag --with HEAD HEAD &&
git tag --with
v4.0
ok 160 - Doing 'git tag --list-like --with <commit> <pattern> is permitted
expecting success:
test_must_fail git tag -d --no-contains HEAD &&
test_must_fail git tag -d --no-contains HEAD some-tag &&
test_must_fail git tag -v --no-contains HEAD
fatal: --no-contains option is only allowed in list mode
fatal: --no-contains option is only allowed in list mode
fatal: --no-contains option is only allowed in list mode
ok 161 - mixing incompatible modes with --no-contains is forbidden
expecting success:
git tag -n --no-contains HEAD HEAD &&
git tag --no-contains HEAD HEAD &&
git tag --no-contains
100
a1
aa1
annotated-tag
annotated-tag-edit
blank-annotated-tag
blank-signed-tag
blankfile-annotated-tag
blankfile-signed-tag
blanknonlfile-annotated-tag
blanknonlfile-signed-tag
blanks-annotated-tag
blanks-signed-tag
cba
comment-annotated-tag
comment-signed-tag
commentfile-annotated-tag
commentfile-signed-tag
commentnonlfile-annotated-tag
commentnonlfile-signed-tag
comments-annotated-tag
comments-signed-tag
confusing-pgp-message
empty-annotated-tag
empty-signed-tag
emptyfile-annotated-tag
emptyfile-signed-tag
file-annotated-tag
file-annotated-tag-edit
file-signed-tag
forcesignannotated-annotate
forcesignannotated-disabled
forcesignannotated-implied-sign
forcesignannotated-lightweight
forged-tag
gpgsign-enabled
implied-annotate
implied-sign
no-sign
non-annotated-tag
reuse
signed-tag
stag-lines
stag-one-line
stag-zero-lines
stdin-annotated-tag
stdin-signed-tag
t210
t211
tag-from-subdir
tag-from-subdir-2
tag-lines
tag-one-line
tag-signed-tag
tag-zero-lines
u-signed-tag
v0.2.1
v1.0
v1.0.1
v1.1.3
v2.0
v3.0
ok 162 - Doing 'git tag --list-like --no-contains <commit> <pattern> is permitted
expecting success:
test_must_fail git tag -d --without HEAD &&
test_must_fail git tag -d --without HEAD some-tag &&
test_must_fail git tag -v --without HEAD
fatal: --no-contains option is only allowed in list mode
fatal: --no-contains option is only allowed in list mode
fatal: --no-contains option is only allowed in list mode
ok 163 - mixing incompatible modes with --without is forbidden
expecting success:
git tag -n --without HEAD HEAD &&
git tag --without HEAD HEAD &&
git tag --without
100
a1
aa1
annotated-tag
annotated-tag-edit
blank-annotated-tag
blank-signed-tag
blankfile-annotated-tag
blankfile-signed-tag
blanknonlfile-annotated-tag
blanknonlfile-signed-tag
blanks-annotated-tag
blanks-signed-tag
cba
comment-annotated-tag
comment-signed-tag
commentfile-annotated-tag
commentfile-signed-tag
commentnonlfile-annotated-tag
commentnonlfile-signed-tag
comments-annotated-tag
comments-signed-tag
confusing-pgp-message
empty-annotated-tag
empty-signed-tag
emptyfile-annotated-tag
emptyfile-signed-tag
file-annotated-tag
file-annotated-tag-edit
file-signed-tag
forcesignannotated-annotate
forcesignannotated-disabled
forcesignannotated-implied-sign
forcesignannotated-lightweight
forged-tag
gpgsign-enabled
implied-annotate
implied-sign
no-sign
non-annotated-tag
reuse
signed-tag
stag-lines
stag-one-line
stag-zero-lines
stdin-annotated-tag
stdin-signed-tag
t210
t211
tag-from-subdir
tag-from-subdir-2
tag-lines
tag-one-line
tag-signed-tag
tag-zero-lines
u-signed-tag
v0.2.1
v1.0
v1.0.1
v1.1.3
v2.0
v3.0
ok 164 - Doing 'git tag --list-like --without <commit> <pattern> is permitted
expecting success:
test_must_fail git tag -d --merged HEAD &&
test_must_fail git tag -d --merged HEAD some-tag &&
test_must_fail git tag -v --merged HEAD
fatal: --merged and --no-merged options are only allowed in list mode
fatal: --merged and --no-merged options are only allowed in list mode
fatal: --merged and --no-merged options are only allowed in list mode
ok 165 - mixing incompatible modes with --merged is forbidden
expecting success:
git tag -n --merged HEAD HEAD &&
git tag --merged HEAD HEAD &&
git tag --merged
100
a1
aa1
annotated-tag
annotated-tag-edit
blank-annotated-tag
blank-signed-tag
blankfile-annotated-tag
blankfile-signed-tag
blanknonlfile-annotated-tag
blanknonlfile-signed-tag
blanks-annotated-tag
blanks-signed-tag
cba
comment-annotated-tag
comment-signed-tag
commentfile-annotated-tag
commentfile-signed-tag
commentnonlfile-annotated-tag
commentnonlfile-signed-tag
comments-annotated-tag
comments-signed-tag
confusing-pgp-message
empty-annotated-tag
empty-signed-tag
emptyfile-annotated-tag
emptyfile-signed-tag
file-annotated-tag
file-annotated-tag-edit
file-signed-tag
forcesignannotated-annotate
forcesignannotated-disabled
forcesignannotated-implied-sign
forcesignannotated-lightweight
forged-tag
gpgsign-enabled
implied-annotate
implied-sign
no-sign
non-annotated-tag
reuse
signed-tag
stag-lines
stag-one-line
stag-zero-lines
stdin-annotated-tag
stdin-signed-tag
t210
t211
tag-from-subdir
tag-from-subdir-2
tag-lines
tag-one-line
tag-signed-tag
tag-zero-lines
u-signed-tag
v0.2.1
v1.0
v1.0.1
v1.1.3
v2.0
v3.0
v4.0
ok 166 - Doing 'git tag --list-like --merged <commit> <pattern> is permitted
expecting success:
test_must_fail git tag -d --no-merged HEAD &&
test_must_fail git tag -d --no-merged HEAD some-tag &&
test_must_fail git tag -v --no-merged HEAD
fatal: --merged and --no-merged options are only allowed in list mode
fatal: --merged and --no-merged options are only allowed in list mode
fatal: --merged and --no-merged options are only allowed in list mode
ok 167 - mixing incompatible modes with --no-merged is forbidden
expecting success:
git tag -n --no-merged HEAD HEAD &&
git tag --no-merged HEAD HEAD &&
git tag --no-merged
ok 168 - Doing 'git tag --list-like --no-merged <commit> <pattern> is permitted
expecting success:
test_must_fail git tag -d --points-at HEAD &&
test_must_fail git tag -d --points-at HEAD some-tag &&
test_must_fail git tag -v --points-at HEAD
fatal: --points-at option is only allowed in list mode
fatal: --points-at option is only allowed in list mode
fatal: --points-at option is only allowed in list mode
ok 169 - mixing incompatible modes with --points-at is forbidden
expecting success:
git tag -n --points-at HEAD HEAD &&
git tag --points-at HEAD HEAD &&
git tag --points-at
v4.0
ok 170 - Doing 'git tag --list-like --points-at <commit> <pattern> is permitted
expecting success:
echo v4.0 >expect &&
git tag --points-at=v4.0 "v*" >actual &&
test_cmp expect actual
ok 171 - --points-at can be used in non-list mode
expecting success:
echo v4.0 >expect &&
git tag --points-at >actual &&
test_cmp expect actual
ok 172 - --points-at is a synonym for --points-at HEAD
expecting success:
echo v4.0 >expect &&
git tag --points-at v4.0 >actual &&
test_cmp expect actual
ok 173 - --points-at finds lightweight tags
expecting success:
git tag -m "v4.0, annotated" annotated-v4.0 v4.0 &&
echo annotated-v4.0 >expect &&
git tag -l --points-at v4.0 "annotated*" >actual &&
test_cmp expect actual
ok 174 - --points-at finds annotated tags of commits
expecting success:
git tag -m "describing the v4.0 tag object" \
annotated-again-v4.0 annotated-v4.0 &&
cat >expect <<-\EOF &&
annotated-again-v4.0
annotated-v4.0
EOF
git tag --points-at=annotated-v4.0 >actual &&
test_cmp expect actual
hint: You have created a nested tag. The object referred to by your new tag is
hint: already a tag. If you meant to tag the object that it points to, use:
hint:
hint: git tag -f annotated-again-v4.0 annotated-v4.0^{}
ok 175 - --points-at finds annotated tags of tags
expecting success:
sed -e "s/|$//" <<-EOF >expect &&
hint: You have created a nested tag. The object referred to by your new tag is
hint: already a tag. If you meant to tag the object that it points to, use:
hint: |
hint: git tag -f nested annotated-v4.0^{}
EOF
git tag -m nested nested annotated-v4.0 2>actual &&
test_i18ncmp expect actual
ok 176 - recursive tagging should give advice
expecting success:
cat >expect <<-\EOF &&
v2.0
v3.0
EOF
git tag --points-at=v2.0 --points-at=v3.0 >actual &&
test_cmp expect actual
ok 177 - multiple --points-at are OR-ed together
expecting success:
git tag foo1.3 &&
git tag foo1.6 &&
git tag foo1.10 &&
git tag -l --sort=refname "foo*" >actual &&
cat >expect <<-\EOF &&
foo1.10
foo1.3
foo1.6
EOF
test_cmp expect actual
ok 178 - lexical sort
expecting success:
git tag -l --sort=version:refname "foo*" >actual &&
cat >expect <<-\EOF &&
foo1.3
foo1.6
foo1.10
EOF
test_cmp expect actual
ok 179 - version sort
expecting success:
git tag -l --sort=-version:refname "foo*" >actual &&
cat >expect <<-\EOF &&
foo1.10
foo1.6
foo1.3
EOF
test_cmp expect actual
ok 180 - reverse version sort
expecting success:
git tag -l --sort=-refname "foo*" >actual &&
cat >expect <<-\EOF &&
foo1.6
foo1.3
foo1.10
EOF
test_cmp expect actual
ok 181 - reverse lexical sort
expecting success:
test_config tag.sort "v:refname" &&
git tag -l "foo*" >actual &&
cat >expect <<-\EOF &&
foo1.3
foo1.6
foo1.10
EOF
test_cmp expect actual
ok 182 - configured lexical sort
expecting success:
test_config tag.sort "v:refname" &&
git tag -l --sort=-refname "foo*" >actual &&
cat >expect <<-\EOF &&
foo1.6
foo1.3
foo1.10
EOF
test_cmp expect actual
ok 183 - option override configured sort
expecting success:
test_must_fail git tag -l --sort=notvalid "foo*" >actual
fatal: unknown field name: notvalid
ok 184 - invalid sort parameter on command line
expecting success:
test_config tag.sort "v:notvalid" &&
test_must_fail git tag -l "foo*"
fatal: unknown field name: notvalid
ok 185 - invalid sort parameter in configuratoin
expecting success:
test_config versionsort.prereleaseSuffix -rc &&
git tag foo1.6-rc1 &&
git tag foo1.6-rc2 &&
git tag -l --sort=version:refname "foo*" >actual &&
cat >expect <<-\EOF &&
foo1.3
foo1.6-rc1
foo1.6-rc2
foo1.6
foo1.10
EOF
test_cmp expect actual
ok 186 - version sort with prerelease reordering
expecting success:
test_config versionsort.prereleaseSuffix -rc &&
git tag -l --sort=-version:refname "foo*" >actual &&
cat >expect <<-\EOF &&
foo1.10
foo1.6
foo1.6-rc2
foo1.6-rc1
foo1.3
EOF
test_cmp expect actual
ok 187 - reverse version sort with prerelease reordering
expecting success:
test_config versionsort.prereleaseSuffix -before &&
git tag foo1.7-before1 &&
git tag foo1.7 &&
git tag foo1.7-after1 &&
git tag -l --sort=version:refname "foo1.7*" >actual &&
cat >expect <<-\EOF &&
foo1.7-before1
foo1.7
foo1.7-after1
EOF
test_cmp expect actual
ok 188 - version sort with prerelease reordering and common leading character
expecting success:
test_config versionsort.prereleaseSuffix -before &&
git config --add versionsort.prereleaseSuffix -after &&
git tag -l --sort=version:refname "foo1.7*" >actual &&
cat >expect <<-\EOF &&
foo1.7-before1
foo1.7-after1
foo1.7
EOF
test_cmp expect actual
ok 189 - version sort with prerelease reordering, multiple suffixes and common leading character
expecting success:
test_config versionsort.prereleaseSuffix -bar &&
git config --add versionsort.prereleaseSuffix -foo-baz &&
git config --add versionsort.prereleaseSuffix -foo-bar &&
git tag foo1.8-foo-bar &&
git tag foo1.8-foo-baz &&
git tag foo1.8 &&
git tag -l --sort=version:refname "foo1.8*" >actual &&
cat >expect <<-\EOF &&
foo1.8-foo-baz
foo1.8-foo-bar
foo1.8
EOF
test_cmp expect actual
ok 190 - version sort with prerelease reordering, multiple suffixes match the same tag
expecting success:
test_config versionsort.prereleaseSuffix -pre &&
git config --add versionsort.prereleaseSuffix -prerelease &&
git tag foo1.9-pre1 &&
git tag foo1.9-pre2 &&
git tag foo1.9-prerelease1 &&
git tag -l --sort=version:refname "foo1.9*" >actual &&
cat >expect <<-\EOF &&
foo1.9-pre1
foo1.9-pre2
foo1.9-prerelease1
EOF
test_cmp expect actual
ok 191 - version sort with prerelease reordering, multiple suffixes match starting at the same position
expecting success:
test_config versionsort.suffix -alpha &&
git config --add versionsort.suffix -beta &&
git config --add versionsort.suffix "" &&
git config --add versionsort.suffix -gamma &&
git config --add versionsort.suffix -delta &&
git tag foo1.10-alpha &&
git tag foo1.10-beta &&
git tag foo1.10-gamma &&
git tag foo1.10-delta &&
git tag foo1.10-unlisted-suffix &&
git tag -l --sort=version:refname "foo1.10*" >actual &&
cat >expect <<-\EOF &&
foo1.10-alpha
foo1.10-beta
foo1.10
foo1.10-unlisted-suffix
foo1.10-gamma
foo1.10-delta
EOF
test_cmp expect actual
ok 192 - version sort with general suffix reordering
expecting success:
test_config versionsort.suffix -before &&
test_config versionsort.prereleaseSuffix -after &&
git tag -l --sort=version:refname "foo1.7*" >actual &&
cat >expect <<-\EOF &&
foo1.7-before1
foo1.7
foo1.7-after1
EOF
test_cmp expect actual
warning: ignoring versionsort.prereleasesuffix because versionsort.suffix is set
ok 193 - versionsort.suffix overrides versionsort.prereleaseSuffix
expecting success:
test_config versionsort.prereleaseSuffix -very-looooooooooooooooooooooooong-prerelease-suffix &&
git tag -l --sort=version:refname
100
a1
aa1
annotated-again-v4.0
annotated-tag
annotated-tag-edit
annotated-v4.0
blank-annotated-tag
blank-signed-tag
blankfile-annotated-tag
blankfile-signed-tag
blanknonlfile-annotated-tag
blanknonlfile-signed-tag
blanks-annotated-tag
blanks-signed-tag
blob-signed-tag
cba
comment-annotated-tag
comment-signed-tag
commentfile-annotated-tag
commentfile-signed-tag
commentnonlfile-annotated-tag
commentnonlfile-signed-tag
comments-annotated-tag
comments-signed-tag
confusing-pgp-message
empty-annotated-tag
empty-signed-tag
emptyfile-annotated-tag
emptyfile-signed-tag
file-annotated-tag
file-annotated-tag-edit
file-signed-tag
foo1.3
foo1.6
foo1.6-rc1
foo1.6-rc2
foo1.7
foo1.7-after1
foo1.7-before1
foo1.8
foo1.8-foo-bar
foo1.8-foo-baz
foo1.9-pre1
foo1.9-pre2
foo1.9-prerelease1
foo1.10
foo1.10-alpha
foo1.10-beta
foo1.10-delta
foo1.10-gamma
foo1.10-unlisted-suffix
forcesignannotated-annotate
forcesignannotated-disabled
forcesignannotated-implied-sign
forcesignannotated-lightweight
forged-tag
gpgsign-enabled
implied-annotate
implied-sign
nested
no-sign
non-annotated-tag
reuse
signed-tag
stag-lines
stag-one-line
stag-zero-lines
stdin-annotated-tag
stdin-signed-tag
t210
t211
tag-blob
tag-from-subdir
tag-from-subdir-2
tag-lines
tag-one-line
tag-signed-tag
tag-zero-lines
tree-signed-tag
u-signed-tag
v0.2.1
v1.0
v1.0.1
v1.1.3
v2.0
v3.0
v4.0
ok 194 - version sort with very long prerelease suffix
checking prerequisite: ULIMIT_STACK_SIZE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq !MINGW,!CYGWIN &&
run_with_limited_stack true
)
prerequisite ULIMIT_STACK_SIZE ok
expecting success:
i=1 &&
while test $i -lt 8000
do
echo "commit refs/heads/master
committer A U Thor <author@example.com> $((1000000000 + $i * 100)) +0200
data <<EOF
commit #$i
EOF"
test $i = 1 && echo "from refs/heads/master^0"
i=$(($i + 1))
done | git fast-import &&
git checkout master &&
git tag far-far-away HEAD^ &&
run_with_limited_stack git tag --contains HEAD >actual &&
test_must_be_empty actual &&
run_with_limited_stack git tag --no-contains HEAD >actual &&
test_line_count "-gt" 10 actual
/<<PKGBUILDDIR>>/git-fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects: 10000
Total objects: 7999 ( 0 duplicates )
blobs : 0 ( 0 duplicates 0 deltas of 0 attempts)
trees : 0 ( 0 duplicates 0 deltas of 0 attempts)
commits: 7999 ( 0 duplicates 0 deltas of 0 attempts)
tags : 0 ( 0 duplicates 0 deltas of 0 attempts)
Total branches: 1 ( 1 loads )
marks: 1024 ( 0 unique )
atoms: 1
Memory total: 2669 KiB
pools: 2122 KiB
objects: 546 KiB
---------------------------------------------------------------------
pack_report: getpagesize() = 4096
pack_report: core.packedGitWindowSize = 33554432
pack_report: core.packedGitLimit = 268435456
pack_report: pack_used_ctr = 8000
pack_report: pack_mmap_calls = 1
pack_report: pack_open_windows = 1 / 1
pack_report: pack_mapped = 1177891 / 1177891
---------------------------------------------------------------------
Switched to branch 'master'
ok 195 - --contains and --no-contains work in a deep repo
expecting success:
cat >expect <<-\EOF &&
refname : refs/tags/v1.0
refname : refs/tags/v1.0.1
refname : refs/tags/v1.1.3
EOF
git tag -l --format="refname : %(refname)" "v1*" >actual &&
test_cmp expect actual
ok 196 - --format should list tags as per format given
expecting success:
echo "<RED>v1.0<RESET>" >expect.color &&
echo "v1.0" >expect.bare &&
color_args="--format=%(color:red)%(refname:short) --list v1.0"
ok 197 - set up color tests
expecting success:
TERM=vt100 git tag $color_args >actual.raw &&
test_decode_color <actual.raw >actual &&
test_cmp expect.bare actual
ok 198 - %(color) omitted without tty
checking prerequisite: TTY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq PERL &&
# Reading from the pty master seems to get stuck _sometimes_
# on Mac OS X 10.5.0, using Perl 5.10.0 or 5.8.9.
#
# Reproduction recipe: run
#
# i=0
# while ./test-terminal.perl echo hi $i
# do
# : $((i = $i + 1))
# done
#
# After 2000 iterations or so it hangs.
# https://rt.cpan.org/Ticket/Display.html?id=65692
#
test "$(uname -s)" != Darwin &&
perl "$TEST_DIRECTORY"/test-terminal.perl \
sh -c "test -t 1 && test -t 2"
)
prerequisite TTY ok
expecting success:
test_terminal git tag $color_args >actual.raw &&
test_decode_color <actual.raw >actual &&
test_cmp expect.color actual
ok 199 - %(color) present with tty
expecting success:
git tag --color $color_args >actual.raw &&
test_decode_color <actual.raw >actual &&
test_cmp expect.color actual
ok 200 - --color overrides auto-color
expecting success:
git -c color.ui=always tag $color_args >actual.raw &&
test_decode_color <actual.raw >actual &&
test_cmp expect.color actual
ok 201 - color.ui=always overrides auto-color
expecting success:
git tag mergetest-1 HEAD~2 &&
git tag mergetest-2 HEAD~1 &&
git tag mergetest-3 HEAD
ok 202 - setup --merged test tags
expecting success:
cat >expect <<-\EOF &&
mergetest-1
mergetest-2
EOF
git tag --merged=mergetest-2 "mergetest*" >actual &&
test_cmp expect actual
ok 203 - --merged can be used in non-list mode
expecting success:
test_must_fail git tag --merged HEAD --no-merged HEAD
error: option `no-merged' is incompatible with --merged
ok 204 - --merged is incompatible with --no-merged
expecting success:
cat >expect <<-\EOF &&
mergetest-1
mergetest-2
EOF
git tag -l --merged=mergetest-2 mergetest-* >actual &&
test_cmp expect actual
ok 205 - --merged shows merged tags
expecting success:
cat >expect <<-\EOF &&
mergetest-3
EOF
git tag -l --no-merged=mergetest-2 mergetest-* >actual &&
test_cmp expect actual
ok 206 - --no-merged show unmerged tags
expecting success:
git tag --no-merged=mergetest-2 mergetest-* >actual &&
test_cmp expect actual
ok 207 - --no-merged can be used in non-list mode
expecting success:
git tag ambiguous &&
git branch ambiguous &&
echo ambiguous >expect &&
git tag -l ambiguous >actual &&
test_cmp expect actual
ok 208 - ambiguous branch/tags not marked
expecting success:
(
git init no-contains &&
cd no-contains &&
test_commit v0.1 &&
test_commit v0.2 &&
test_commit v0.3 &&
test_commit v0.4 &&
test_commit v0.5 &&
cat >expected <<-\EOF &&
v0.2
v0.3
v0.4
EOF
git tag --contains v0.2 --no-contains v0.5 >actual &&
test_cmp expected actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7004-tag/no-contains/.git/
[master (root-commit) fdf35a1] v0.1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 v0.1.t
[master 82f1d18] v0.2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 v0.2.t
[master 4c097b6] v0.3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 v0.3.t
[master 8804202] v0.4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 v0.4.t
[master 947a091] v0.5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 v0.5.t
ok 209 - --contains combined with --no-contains
expecting success:
cd no-contains &&
blob=$(git rev-parse v0.3:v0.3.t) &&
tree=$(git rev-parse v0.3^{tree}) &&
git tag tag-blob $blob &&
git tag tag-tree $tree &&
git tag --contains v0.3 >actual &&
cat >expected <<-\EOF &&
v0.3
v0.4
v0.5
EOF
test_cmp expected actual &&
git tag --no-contains v0.3 >actual &&
cat >expected <<-\EOF &&
v0.1
v0.2
EOF
test_cmp expected actual
ok 210 - Does --[no-]contains stop at commits? Yes!
# passed all 210 test(s)
1..210
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7060-wtstatus.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7060-wtstatus/.git/
expecting success:
git config --global advice.statusuoption false &&
test_commit A &&
test_commit B oneside added &&
git checkout A^0 &&
test_commit C oneside created
[master (root-commit) 0ddfaf1] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
[master 5747a32] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 oneside
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 0ddfaf1 A
[detached HEAD f7fe030] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 oneside
ok 1 - setup
expecting success:
git checkout B^0 &&
test_must_fail git merge C
Previous HEAD position was f7fe030 C
HEAD is now at 5747a32 B
Merging:
5747a32 B
virtual C
found 1 common ancestor:
0ddfaf1 A
CONFLICT (add/add): Merge conflict in oneside
Auto-merging oneside
Automatic merge failed; fix conflicts and then commit the result.
ok 2 - A/A conflict
expecting success:
git diff --cached --name-status >actual &&
echo "U oneside" >expect &&
test_cmp expect actual
ok 3 - Report path with conflict
expecting success:
git diff --cached --name-status HEAD^ >actual &&
echo "U oneside" >expect &&
test_cmp expect actual
ok 4 - Report new path with conflict
expecting success:
cat >expect <<EOF &&
On branch side
You have unmerged paths.
(fix conflicts and run "git commit")
(use "git merge --abort" to abort the merge)
Unmerged paths:
(use "git add/rm <file>..." as appropriate to mark resolution)
deleted by us: foo
no changes added to commit (use "git add" and/or "git commit -a")
EOF
mkdir mdconflict &&
(
cd mdconflict &&
git init &&
test_commit initial foo "" &&
test_commit modify foo foo &&
git checkout -b side HEAD^ &&
git rm foo &&
git commit -m delete &&
test_must_fail git merge master &&
test_must_fail git commit --dry-run >../actual &&
test_i18ncmp ../expect ../actual &&
git status >../actual &&
test_i18ncmp ../expect ../actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7060-wtstatus/mdconflict/.git/
[master (root-commit) a3c5375] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
[master efd4a38] modify
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'side'
rm 'foo'
[side 0599bc2] delete
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 foo
Merging:
0599bc2 delete
virtual master
found 1 common ancestor:
a3c5375 initial
CONFLICT (modify/delete): foo deleted in HEAD and modified in master. Version master of foo left in tree.
Automatic merge failed; fix conflicts and then commit the result.
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 5 - M/D conflict does not segfault
expecting success:
git rm -f -r . &&
cat "$TEST_DIRECTORY/README" >ONE &&
git add ONE &&
test_tick &&
git commit -m "One commit with ONE" &&
echo Modified >TWO &&
cat ONE >>TWO &&
cat ONE >>THREE &&
git add TWO THREE &&
sha1=$(git rev-parse :ONE) &&
git rm --cached ONE &&
(
echo "100644 $sha1 1 ONE" &&
echo "100644 $sha1 2 ONE" &&
echo "100644 $sha1 3 ONE"
) | git update-index --index-info &&
echo Further >>THREE
rm 'A.t'
rm 'oneside'
rm 'oneside'
[detached HEAD 61aebb6] One commit with ONE
Author: A U Thor <author@example.com>
rm 'ONE'
ok 6 - rename & unmerged setup
expecting success:
git status -suno >actual &&
cat >expect <<-EOF &&
UU ONE
AM THREE
A TWO
EOF
test_cmp expect actual
ok 7 - rename & unmerged status
expecting success:
cat >expected <<-EOF &&
U ONE
A THREE
A TWO
EOF
git diff-index --cached --name-status HEAD >actual &&
test_cmp expected actual
ok 8 - git diff-index --cached shows 2 added + 1 unmerged
expecting success:
cat >expected <<-EOF &&
U ONE
A THREE
A TWO
EOF
git diff-index --cached -M --name-status HEAD >actual &&
test_cmp expected actual
ok 9 - git diff-index --cached -M shows 2 added + 1 unmerged
expecting success:
cat >expected <<-EOF &&
U ONE
C ONE THREE
C ONE TWO
EOF
git diff-index --cached -C --name-status HEAD |
sed "s/^C[0-9]*/C/g" >actual &&
test_cmp expected actual
ok 10 - git diff-index --cached -C shows 2 copies + 1 unmerged
expecting success:
git reset --hard &&
git checkout master &&
test_commit init main.txt init &&
git checkout -b second_branch &&
git rm main.txt &&
git commit -m "main.txt deleted on second_branch" &&
test_commit second conflict.txt second &&
git checkout master &&
test_commit on_second main.txt on_second &&
test_commit master conflict.txt master &&
test_must_fail git merge second_branch &&
cat >expected <<\EOF &&
On branch master
You have unmerged paths.
(fix conflicts and run "git commit")
(use "git merge --abort" to abort the merge)
Unmerged paths:
(use "git add/rm <file>..." as appropriate to mark resolution)
both added: conflict.txt
deleted by them: main.txt
no changes added to commit (use "git add" and/or "git commit -a")
EOF
git status --untracked-files=no >actual &&
test_i18ncmp expected actual
HEAD is now at 61aebb6 One commit with ONE
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
61aebb6 One commit with ONE
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> 61aebb6
Switched to branch 'master'
[master e5fc44e] init
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 main.txt
Switched to a new branch 'second_branch'
rm 'main.txt'
[second_branch 1fd8046] main.txt deleted on second_branch
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 main.txt
[second_branch e4d0ede] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 conflict.txt
Switched to branch 'master'
[master 9824e6a] on_second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master b29dd8b] master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 conflict.txt
Merging:
b29dd8b master
virtual second_branch
found 1 common ancestor:
e5fc44e init
CONFLICT (modify/delete): main.txt deleted in second_branch and modified in HEAD. Version HEAD of main.txt left in tree.
CONFLICT (add/add): Merge conflict in conflict.txt
Auto-merging conflict.txt
Automatic merge failed; fix conflicts and then commit the result.
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 11 - status when conflicts with add and rm advice (deleted by them)
expecting success:
git reset --hard &&
git checkout -b conflict &&
test_commit one main.txt one &&
git branch conflict_second &&
git mv main.txt sub_master.txt &&
git commit -m "main.txt renamed in sub_master.txt" &&
git checkout conflict_second &&
git mv main.txt sub_second.txt &&
git commit -m "main.txt renamed in sub_second.txt"
HEAD is now at b29dd8b master
Switched to a new branch 'conflict'
[conflict 21bce8e] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[conflict e06d4c6] main.txt renamed in sub_master.txt
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename main.txt => sub_master.txt (100%)
Switched to branch 'conflict_second'
[conflict_second 6b2443c] main.txt renamed in sub_second.txt
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename main.txt => sub_second.txt (100%)
ok 12 - prepare for conflicts
expecting success:
test_must_fail git merge conflict &&
cat >expected <<\EOF &&
On branch conflict_second
You have unmerged paths.
(fix conflicts and run "git commit")
(use "git merge --abort" to abort the merge)
Unmerged paths:
(use "git add/rm <file>..." as appropriate to mark resolution)
both deleted: main.txt
added by them: sub_master.txt
added by us: sub_second.txt
no changes added to commit (use "git add" and/or "git commit -a")
EOF
git status --untracked-files=no >actual &&
test_i18ncmp expected actual
Merging:
6b2443c main.txt renamed in sub_second.txt
virtual conflict
found 1 common ancestor:
21bce8e one
CONFLICT (rename/rename): Rename "main.txt"->"sub_second.txt" in branch "HEAD" rename "main.txt"->"sub_master.txt" in "conflict"
Automatic merge failed; fix conflicts and then commit the result.
ok 13 - status when conflicts with add and rm advice (both deleted)
expecting success:
git reset --hard conflict_second &&
test_must_fail git merge conflict &&
git add sub_master.txt &&
git add sub_second.txt &&
cat >expected <<\EOF &&
On branch conflict_second
You have unmerged paths.
(fix conflicts and run "git commit")
(use "git merge --abort" to abort the merge)
Changes to be committed:
new file: sub_master.txt
Unmerged paths:
(use "git rm <file>..." to mark resolution)
both deleted: main.txt
Untracked files not listed (use -u option to show untracked files)
EOF
git status --untracked-files=no >actual &&
test_i18ncmp expected actual &&
git reset --hard &&
git checkout master
HEAD is now at 6b2443c main.txt renamed in sub_second.txt
Merging:
6b2443c main.txt renamed in sub_second.txt
virtual conflict
found 1 common ancestor:
21bce8e one
CONFLICT (rename/rename): Rename "main.txt"->"sub_second.txt" in branch "HEAD" rename "main.txt"->"sub_master.txt" in "conflict"
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at 6b2443c main.txt renamed in sub_second.txt
warning: refname 'master' is ambiguous.
Switched to branch 'master'
ok 14 - status when conflicts with only rm advice (both deleted)
expecting success:
git reset --hard &&
git checkout master^0 &&
git status --branch --porcelain >actual &&
cat >expected <<-EOF &&
## HEAD (no branch)
?? .gitconfig
?? actual
?? expect
?? expected
?? mdconflict/
EOF
test_i18ncmp expected actual
HEAD is now at b29dd8b master
warning: refname 'master' is ambiguous.
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at b29dd8b master
ok 15 - status --branch with detached HEAD
expecting success:
git reset --hard &&
git checkout master^0 &&
git status --branch --porcelain=v1 >actual &&
cat >expected <<-EOF &&
## HEAD (no branch)
?? .gitconfig
?? actual
?? expect
?? expected
?? mdconflict/
EOF
test_i18ncmp expected actual
HEAD is now at b29dd8b master
warning: refname 'master' is ambiguous.
HEAD is now at b29dd8b master
ok 16 - status --porcelain=v1 --branch with detached HEAD
expecting success:
test_must_fail git status --porcelain=bogus
fatal: unsupported porcelain version 'bogus'
ok 17 - status --porcelain=bogus
# passed all 17 test(s)
1..17
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7062-wtstatus-ignorecase.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7062-wtstatus-ignorecase/.git/
expecting success:
# note: "V/", "V/XQANY/" and "WURZAUP/" produce the same hash code
# in name-hash.c::hash_name
mkdir V &&
mkdir V/XQANY &&
mkdir WURZAUP &&
touch V/XQANY/test &&
git config core.ignorecase true &&
git add . &&
# test is successful if git status completes (no endless loop)
git status
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: V/XQANY/test
ok 1 - status with hash collisions
# passed all 1 test(s)
1..1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7061-wtstatus-ignore.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7061-wtstatus-ignore/.git/
expecting success:
echo "ignored" >.gitignore &&
mkdir untracked &&
: >untracked/ignored &&
: >untracked/uncommitted &&
git status --porcelain --ignored >actual &&
test_cmp expected actual
ok 1 - status untracked directory with --ignored
expecting success:
printf "\357\273\277ignored\n" >.gitignore &&
mkdir -p untracked &&
: >untracked/ignored &&
: >untracked/uncommitted &&
git status --porcelain --ignored >actual &&
test_cmp expected actual
ok 2 - same with gitignore starting with BOM
expecting success:
git status --porcelain --ignored -u >actual &&
test_cmp expected actual
ok 3 - status untracked directory with --ignored -u
expecting success:
git status --porcelain --ignored untracked/ >actual &&
test_cmp expected actual
ok 4 - status prefixed untracked directory with --ignored
expecting success:
git status --porcelain --ignored -u untracked/ >actual &&
test_cmp expected actual
ok 5 - status prefixed untracked sub-directory with --ignored -u
expecting success:
rm -rf untracked &&
mkdir ignored &&
: >ignored/uncommitted &&
git status --porcelain --ignored >actual &&
test_cmp expected actual
ok 6 - status ignored directory with --ignore
expecting success:
git status --porcelain --ignored -u >actual &&
test_cmp expected actual
ok 7 - status ignored directory with --ignore -u
expecting success:
rm -rf ignored &&
mkdir untracked-ignored &&
mkdir untracked-ignored/test &&
git status --porcelain --ignored >actual &&
test_cmp expected actual
ok 8 - status empty untracked directory with --ignore
expecting success:
git status --porcelain --ignored -u >actual &&
test_cmp expected actual
ok 9 - status empty untracked directory with --ignore -u
expecting success:
: >untracked-ignored/ignored &&
: >untracked-ignored/test/ignored &&
git status --porcelain --ignored >actual &&
test_cmp expected actual
ok 10 - status untracked directory with ignored files with --ignore
expecting success:
git status --porcelain --ignored -u >actual &&
test_cmp expected actual
ok 11 - status untracked directory with ignored files with --ignore -u
expecting success:
rm -rf untracked-ignored &&
mkdir tracked &&
: >tracked/committed &&
git add tracked/committed &&
git commit -m. &&
echo "tracked" >.gitignore &&
git status --porcelain --ignored >actual &&
test_cmp expected actual
[master (root-commit) 1386016] .
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 tracked/committed
ok 12 - status ignored tracked directory with --ignore
expecting success:
git status --porcelain --ignored -u >actual &&
test_cmp expected actual
ok 13 - status ignored tracked directory with --ignore -u
expecting success:
echo "committed" >>.gitignore &&
git status --porcelain --ignored >actual &&
test_cmp expected actual
ok 14 - status ignored tracked directory and ignored file with --ignore
expecting success:
git status --porcelain --ignored -u >actual &&
test_cmp expected actual
ok 15 - status ignored tracked directory and ignored file with --ignore -u
expecting success:
echo "tracked" >.gitignore &&
: >tracked/uncommitted &&
git status --porcelain --ignored >actual &&
test_cmp expected actual
ok 16 - status ignored tracked directory and uncommitted file with --ignore
expecting success:
git status --porcelain --ignored -u >actual &&
test_cmp expected actual
ok 17 - status ignored tracked directory and uncommitted file with --ignore -u
expecting success:
rm -rf tracked/uncommitted &&
mkdir tracked/ignored &&
: >tracked/ignored/uncommitted &&
git status --porcelain --ignored >actual &&
test_cmp expected actual
ok 18 - status ignored tracked directory with uncommitted file in untracked subdir with --ignore
expecting success:
git status --porcelain --ignored -u >actual &&
test_cmp expected actual
ok 19 - status ignored tracked directory with uncommitted file in untracked subdir with --ignore -u
expecting success:
: >tracked/ignored/committed &&
git add -f tracked/ignored/committed &&
git commit -m. &&
git status --porcelain --ignored >actual &&
test_cmp expected actual
[master 30a77bf] .
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 tracked/ignored/committed
ok 20 - status ignored tracked directory with uncommitted file in tracked subdir with --ignore
expecting success:
git status --porcelain --ignored -u >actual &&
test_cmp expected actual
ok 21 - status ignored tracked directory with uncommitted file in tracked subdir with --ignore -u
expecting success:
git init tracked/submodule &&
test_commit -C tracked/submodule initial &&
git status --porcelain --ignored -u tracked/submodule >actual &&
test_cmp expected actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7061-wtstatus-ignore/tracked/submodule/.git/
[master (root-commit) 24b24cf] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
ok 22 - status ignores submodule in excluded directory
# passed all 22 test(s)
1..22
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7064-wtstatus-pv2.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7064-wtstatus-pv2/.git/
expecting success:
test_tick &&
git config core.autocrlf false &&
echo x >file_x &&
echo y >file_y &&
echo z >file_z &&
mkdir dir1 &&
echo a >dir1/file_a &&
echo b >dir1/file_b
ok 1 - setup
expecting success:
cat >expect <<-EOF &&
# branch.oid (initial)
# branch.head master
? actual
? dir1/
? expect
? file_x
? file_y
? file_z
EOF
git status --porcelain=v2 --branch --untracked-files=normal >actual &&
test_cmp expect actual
ok 2 - before initial commit, nothing added, only untracked
expecting success:
git add file_x file_y file_z dir1 &&
OID_A=$(git hash-object -t blob -- dir1/file_a) &&
OID_B=$(git hash-object -t blob -- dir1/file_b) &&
OID_X=$(git hash-object -t blob -- file_x) &&
OID_Y=$(git hash-object -t blob -- file_y) &&
OID_Z=$(git hash-object -t blob -- file_z) &&
cat >expect <<-EOF &&
# branch.oid (initial)
# branch.head master
1 A. N... 000000 100644 100644 $ZERO_OID $OID_A dir1/file_a
1 A. N... 000000 100644 100644 $ZERO_OID $OID_B dir1/file_b
1 A. N... 000000 100644 100644 $ZERO_OID $OID_X file_x
1 A. N... 000000 100644 100644 $ZERO_OID $OID_Y file_y
1 A. N... 000000 100644 100644 $ZERO_OID $OID_Z file_z
? actual
? expect
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
ok 3 - before initial commit, things added
expecting success:
lf_to_nul >expect <<-EOF &&
# branch.oid (initial)
# branch.head master
1 A. N... 000000 100644 100644 $ZERO_OID $OID_A dir1/file_a
1 A. N... 000000 100644 100644 $ZERO_OID $OID_B dir1/file_b
1 A. N... 000000 100644 100644 $ZERO_OID $OID_X file_x
1 A. N... 000000 100644 100644 $ZERO_OID $OID_Y file_y
1 A. N... 000000 100644 100644 $ZERO_OID $OID_Z file_z
? actual
? expect
EOF
git status -z --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
ok 4 - before initial commit, things added (-z)
expecting success:
git commit -m initial &&
H0=$(git rev-parse HEAD) &&
cat >expect <<-EOF &&
# branch.oid $H0
# branch.head master
? actual
? expect
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
[master (root-commit) bbc01be] initial
Author: A U Thor <author@example.com>
5 files changed, 5 insertions(+)
create mode 100644 dir1/file_a
create mode 100644 dir1/file_b
create mode 100644 file_x
create mode 100644 file_y
create mode 100644 file_z
ok 5 - make first commit, comfirm HEAD oid and branch
expecting success:
echo x >>file_x &&
OID_X1=$(git hash-object -t blob -- file_x) &&
rm file_z &&
H0=$(git rev-parse HEAD) &&
cat >expect <<-EOF &&
# branch.oid $H0
# branch.head master
1 .M N... 100644 100644 100644 $OID_X $OID_X file_x
1 .D N... 100644 100644 000000 $OID_Z $OID_Z file_z
? actual
? expect
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
ok 6 - after first commit, create unstaged changes
expecting success:
cat >expect <<-EOF &&
1 .M N... 100644 100644 100644 $OID_X $OID_X file_x
1 .D N... 100644 100644 000000 $OID_Z $OID_Z file_z
EOF
git status --porcelain=v2 --untracked-files=no >actual &&
test_cmp expect actual
ok 7 - after first commit but omit untracked files and branch
expecting success:
git add file_x &&
git rm file_z &&
H0=$(git rev-parse HEAD) &&
cat >expect <<-EOF &&
# branch.oid $H0
# branch.head master
1 M. N... 100644 100644 100644 $OID_X $OID_X1 file_x
1 D. N... 100644 000000 000000 $OID_Z $ZERO_OID file_z
? actual
? expect
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
rm 'file_z'
ok 8 - after first commit, stage existing changes
expecting success:
git mv file_y renamed_y &&
H0=$(git rev-parse HEAD) &&
q_to_tab >expect <<-EOF &&
# branch.oid $H0
# branch.head master
1 M. N... 100644 100644 100644 $OID_X $OID_X1 file_x
1 D. N... 100644 000000 000000 $OID_Z $ZERO_OID file_z
2 R. N... 100644 100644 100644 $OID_Y $OID_Y R100 renamed_yQfile_y
? actual
? expect
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
ok 9 - rename causes 2 path lines
expecting success:
H0=$(git rev-parse HEAD) &&
## Lines use NUL path separator and line terminator, so double transform here.
q_to_nul <<-EOF | lf_to_nul >expect &&
# branch.oid $H0
# branch.head master
1 M. N... 100644 100644 100644 $OID_X $OID_X1 file_x
1 D. N... 100644 000000 000000 $OID_Z $ZERO_OID file_z
2 R. N... 100644 100644 100644 $OID_Y $OID_Y R100 renamed_yQfile_y
? actual
? expect
EOF
git status --porcelain=v2 --branch --untracked-files=all -z >actual &&
test_cmp expect actual
ok 10 - rename causes 2 path lines (-z)
expecting success:
git commit -m second &&
H1=$(git rev-parse HEAD) &&
cat >expect <<-EOF &&
# branch.oid $H1
# branch.head master
? actual
? expect
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
[master 84bf28d] second
Author: A U Thor <author@example.com>
3 files changed, 1 insertion(+), 1 deletion(-)
delete mode 100644 file_z
rename file_y => renamed_y (100%)
ok 11 - make second commit, confirm clean and new HEAD oid
expecting success:
test_when_finished "rm -f x.ign .gitignore" &&
echo x.ign >.gitignore &&
echo "ignore me" >x.ign &&
cat >expect <<-EOF &&
? .gitignore
? actual
? expect
EOF
git status --porcelain=v2 --untracked-files=all >actual &&
test_cmp expect actual
ok 12 - confirm ignored files are not printed
expecting success:
test_when_finished "rm -f x.ign .gitignore" &&
echo x.ign >.gitignore &&
echo "ignore me" >x.ign &&
cat >expect <<-EOF &&
? .gitignore
? actual
? expect
! x.ign
EOF
git status --porcelain=v2 --ignored --untracked-files=all >actual &&
test_cmp expect actual
ok 13 - ignored files are printed with --ignored
expecting success:
cat >.gitignore <<-EOF &&
actual*
expect*
EOF
git add .gitignore &&
git commit -m ignore_trash &&
H1=$(git rev-parse HEAD) &&
cat >expect <<-EOF &&
# branch.oid $H1
# branch.head master
EOF
git status --porcelain=v2 --branch >actual &&
test_cmp expect actual
[master f09abb9] ignore_trash
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
create mode 100644 .gitignore
ok 14 - create and commit permanent ignore file
expecting success:
test_when_finished "git rm -f intent1.add intent2.add" &&
touch intent1.add &&
echo test >intent2.add &&
git add --intent-to-add intent1.add intent2.add &&
cat >expect <<-EOF &&
1 .A N... 000000 000000 100644 $ZERO_OID $ZERO_OID intent1.add
1 .A N... 000000 000000 100644 $ZERO_OID $ZERO_OID intent2.add
EOF
git status --porcelain=v2 >actual &&
test_cmp expect actual
rm 'intent1.add'
rm 'intent2.add'
ok 15 - verify --intent-to-add output
expecting success:
test_when_finished "git reset --hard" &&
git branch AA_A master &&
git checkout AA_A &&
echo "Branch AA_A" >conflict.txt &&
OID_AA_A=$(git hash-object -t blob -- conflict.txt) &&
git add conflict.txt &&
git commit -m "branch aa_a" &&
git branch AA_B master &&
git checkout AA_B &&
echo "Branch AA_B" >conflict.txt &&
OID_AA_B=$(git hash-object -t blob -- conflict.txt) &&
git add conflict.txt &&
git commit -m "branch aa_b" &&
git branch AA_M AA_B &&
git checkout AA_M &&
test_must_fail git merge AA_A &&
HM=$(git rev-parse HEAD) &&
cat >expect <<-EOF &&
# branch.oid $HM
# branch.head AA_M
u AA N... 000000 100644 100644 100644 $ZERO_OID $OID_AA_B $OID_AA_A conflict.txt
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
Switched to branch 'AA_A'
[AA_A 55eca05] branch aa_a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 conflict.txt
Switched to branch 'AA_B'
[AA_B 307553c] branch aa_b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 conflict.txt
Switched to branch 'AA_M'
Merging:
307553c branch aa_b
virtual AA_A
found 1 common ancestor:
f09abb9 ignore_trash
CONFLICT (add/add): Merge conflict in conflict.txt
Auto-merging conflict.txt
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at 307553c branch aa_b
ok 16 - verify AA (add-add) conflict
expecting success:
test_when_finished "git reset --hard" &&
git branch UU_ANC master &&
git checkout UU_ANC &&
echo "Ancestor" >conflict.txt &&
OID_UU_ANC=$(git hash-object -t blob -- conflict.txt) &&
git add conflict.txt &&
git commit -m "UU_ANC" &&
git branch UU_A UU_ANC &&
git checkout UU_A &&
echo "Branch UU_A" >conflict.txt &&
OID_UU_A=$(git hash-object -t blob -- conflict.txt) &&
git add conflict.txt &&
git commit -m "branch uu_a" &&
git branch UU_B UU_ANC &&
git checkout UU_B &&
echo "Branch UU_B" >conflict.txt &&
OID_UU_B=$(git hash-object -t blob -- conflict.txt) &&
git add conflict.txt &&
git commit -m "branch uu_b" &&
git branch UU_M UU_B &&
git checkout UU_M &&
test_must_fail git merge UU_A &&
HM=$(git rev-parse HEAD) &&
cat >expect <<-EOF &&
# branch.oid $HM
# branch.head UU_M
u UU N... 100644 100644 100644 100644 $OID_UU_ANC $OID_UU_B $OID_UU_A conflict.txt
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
Switched to branch 'UU_ANC'
[UU_ANC 70071ed] UU_ANC
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 conflict.txt
Switched to branch 'UU_A'
[UU_A a088b5d] branch uu_a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'UU_B'
[UU_B c5f3cc7] branch uu_b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'UU_M'
Merging:
c5f3cc7 branch uu_b
virtual UU_A
found 1 common ancestor:
70071ed UU_ANC
Auto-merging conflict.txt
CONFLICT (content): Merge conflict in conflict.txt
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at c5f3cc7 branch uu_b
ok 17 - verify UU (edit-edit) conflict
expecting success:
git checkout master &&
test_when_finished "rm -rf sub_repo" &&
git clone . sub_repo &&
(
## Confirm local master tracks remote master.
cd sub_repo &&
HUF=$(git rev-parse HEAD) &&
cat >expect <<-EOF &&
# branch.oid $HUF
# branch.head master
# branch.upstream origin/master
# branch.ab +0 -0
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual &&
## Test ahead/behind.
echo xyz >file_xyz &&
git add file_xyz &&
git commit -m xyz &&
HUF=$(git rev-parse HEAD) &&
cat >expect <<-EOF &&
# branch.oid $HUF
# branch.head master
# branch.upstream origin/master
# branch.ab +1 -0
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual &&
## Repeat the above but without --branch.
git status --porcelain=v2 --untracked-files=all >actual &&
test_must_be_empty actual &&
## Test upstream-gone case. Fake this by pointing origin/master at
## a non-existing commit.
OLD=$(git rev-parse origin/master) &&
NEW=$ZERO_OID &&
mv .git/packed-refs .git/old-packed-refs &&
sed "s/$OLD/$NEW/g" <.git/old-packed-refs >.git/packed-refs &&
HUF=$(git rev-parse HEAD) &&
cat >expect <<-EOF &&
# branch.oid $HUF
# branch.head master
# branch.upstream origin/master
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
)
Switched to branch 'master'
Cloning into 'sub_repo'...
done.
[master 638bb2b] xyz
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file_xyz
ok 18 - verify upstream fields in branch header
expecting success:
git checkout master &&
test_when_finished "rm -rf sub_repo" &&
git clone . sub_repo &&
(
## Confirm local master tracks remote master.
cd sub_repo &&
HUF=$(git rev-parse HEAD) &&
# Confirm --no-ahead-behind reports traditional branch.ab with 0/0 for equal branches.
cat >expect <<-EOF &&
# branch.oid $HUF
# branch.head master
# branch.upstream origin/master
# branch.ab +0 -0
EOF
git status --no-ahead-behind --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual &&
# Confirm --ahead-behind reports traditional branch.ab with 0/0.
cat >expect <<-EOF &&
# branch.oid $HUF
# branch.head master
# branch.upstream origin/master
# branch.ab +0 -0
EOF
git status --ahead-behind --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual &&
## Test non-equal ahead/behind.
echo xyz >file_xyz &&
git add file_xyz &&
git commit -m xyz &&
HUF=$(git rev-parse HEAD) &&
# Confirm --no-ahead-behind reports branch.ab with ?/? for non-equal branches.
cat >expect <<-EOF &&
# branch.oid $HUF
# branch.head master
# branch.upstream origin/master
# branch.ab +? -?
EOF
git status --no-ahead-behind --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual &&
# Confirm --ahead-behind reports traditional branch.ab with 1/0.
cat >expect <<-EOF &&
# branch.oid $HUF
# branch.head master
# branch.upstream origin/master
# branch.ab +1 -0
EOF
git status --ahead-behind --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual &&
# Confirm that "status.aheadbehind" DOES NOT work on V2 format.
git -c status.aheadbehind=false status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual &&
# Confirm that "status.aheadbehind" DOES NOT work on V2 format.
git -c status.aheadbehind=true status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
)
Already on 'master'
Cloning into 'sub_repo'...
done.
[master 638bb2b] xyz
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file_xyz
ok 19 - verify --[no-]ahead-behind with V2 format
expecting success:
git checkout master &&
git clone . sub_repo &&
git clone . super_repo &&
( cd super_repo &&
git submodule add ../sub_repo sub1 &&
## Confirm stage/add of clean submodule.
HMOD=$(git hash-object -t blob -- .gitmodules) &&
HSUP=$(git rev-parse HEAD) &&
HSUB=$HSUP &&
cat >expect <<-EOF &&
# branch.oid $HSUP
# branch.head master
# branch.upstream origin/master
# branch.ab +0 -0
1 A. N... 000000 100644 100644 $ZERO_OID $HMOD .gitmodules
1 A. S... 000000 160000 160000 $ZERO_OID $HSUB sub1
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
)
Already on 'master'
Cloning into 'sub_repo'...
done.
Cloning into 'super_repo'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7064-wtstatus-pv2/super_repo/sub1'...
done.
ok 20 - create and add submodule, submodule appears clean (A. S...)
expecting success:
( cd super_repo &&
## create untracked file in the submodule.
( cd sub1 &&
echo "xxxx" >file_in_sub
) &&
HMOD=$(git hash-object -t blob -- .gitmodules) &&
HSUP=$(git rev-parse HEAD) &&
HSUB=$HSUP &&
cat >expect <<-EOF &&
# branch.oid $HSUP
# branch.head master
# branch.upstream origin/master
# branch.ab +0 -0
1 A. N... 000000 100644 100644 $ZERO_OID $HMOD .gitmodules
1 AM S..U 000000 160000 160000 $ZERO_OID $HSUB sub1
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
)
ok 21 - untracked changes in added submodule (AM S..U)
expecting success:
( cd super_repo &&
## stage the changes in the submodule.
( cd sub1 &&
git add file_in_sub
) &&
HMOD=$(git hash-object -t blob -- .gitmodules) &&
HSUP=$(git rev-parse HEAD) &&
HSUB=$HSUP &&
cat >expect <<-EOF &&
# branch.oid $HSUP
# branch.head master
# branch.upstream origin/master
# branch.ab +0 -0
1 A. N... 000000 100644 100644 $ZERO_OID $HMOD .gitmodules
1 AM S.M. 000000 160000 160000 $ZERO_OID $HSUB sub1
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
)
ok 22 - staged changes in added submodule (AM S.M.)
expecting success:
( cd super_repo &&
( cd sub1 &&
## make additional unstaged changes (on the same file) in the submodule.
## This does not cause us to get S.MU (because the submodule does not report
## a "?" line for the unstaged changes).
echo "more changes" >>file_in_sub
) &&
HMOD=$(git hash-object -t blob -- .gitmodules) &&
HSUP=$(git rev-parse HEAD) &&
HSUB=$HSUP &&
cat >expect <<-EOF &&
# branch.oid $HSUP
# branch.head master
# branch.upstream origin/master
# branch.ab +0 -0
1 A. N... 000000 100644 100644 $ZERO_OID $HMOD .gitmodules
1 AM S.M. 000000 160000 160000 $ZERO_OID $HSUB sub1
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
)
ok 23 - staged and unstaged changes in added (AM S.M.)
expecting success:
( cd super_repo &&
( cd sub1 &&
## stage new changes in tracked file.
git add file_in_sub &&
## create new untracked file.
echo "yyyy" >>another_file_in_sub
) &&
HMOD=$(git hash-object -t blob -- .gitmodules) &&
HSUP=$(git rev-parse HEAD) &&
HSUB=$HSUP &&
cat >expect <<-EOF &&
# branch.oid $HSUP
# branch.head master
# branch.upstream origin/master
# branch.ab +0 -0
1 A. N... 000000 100644 100644 $ZERO_OID $HMOD .gitmodules
1 AM S.MU 000000 160000 160000 $ZERO_OID $HSUB sub1
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
)
ok 24 - staged and untracked changes in added submodule (AM S.MU)
expecting success:
( cd super_repo &&
( cd sub1 &&
## Make a new commit in the submodule.
git add file_in_sub &&
rm -f another_file_in_sub &&
git commit -m "new commit"
) &&
HMOD=$(git hash-object -t blob -- .gitmodules) &&
HSUP=$(git rev-parse HEAD) &&
HSUB=$HSUP &&
cat >expect <<-EOF &&
# branch.oid $HSUP
# branch.head master
# branch.upstream origin/master
# branch.ab +0 -0
1 A. N... 000000 100644 100644 $ZERO_OID $HMOD .gitmodules
1 AM SC.. 000000 160000 160000 $ZERO_OID $HSUB sub1
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
)
[master 49ed2bd] new commit
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+)
create mode 100644 file_in_sub
ok 25 - commit within the submodule appears as new commit in super (AM SC..)
expecting success:
( cd super_repo &&
## Stage the new submodule commit in the super.
git add sub1 &&
## Commit the super so that the sub no longer appears as added.
git commit -m "super commit" &&
HSUP=$(git rev-parse HEAD) &&
cat >expect <<-EOF &&
# branch.oid $HSUP
# branch.head master
# branch.upstream origin/master
# branch.ab +1 -0
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
)
[master 9939ebd] super commit
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub1
ok 26 - stage submodule in super and commit
expecting success:
( cd super_repo &&
( cd sub1 &&
echo "zzzz" >>file_in_sub
) &&
HSUP=$(git rev-parse HEAD) &&
HSUB=$(cd sub1 && git rev-parse HEAD) &&
cat >expect <<-EOF &&
# branch.oid $HSUP
# branch.head master
# branch.upstream origin/master
# branch.ab +1 -0
1 .M S.M. 160000 160000 160000 $HSUB $HSUB sub1
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
test_cmp expect actual
)
ok 27 - make unstaged changes in existing submodule (.M S.M.)
# passed all 27 test(s)
1..27
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7101-reset-empty-subdirs.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7101-reset-empty-subdirs/.git/
expecting success: mkdir path0 &&
cp "$TEST_DIRECTORY"/../COPYING path0/COPYING &&
git add path0/COPYING &&
git commit -m add -a
[master (root-commit) 3dd90fb] add
Author: A U Thor <author@example.com>
1 file changed, 360 insertions(+)
create mode 100644 path0/COPYING
ok 1 - creating initial files
expecting success: mkdir path1 &&
mkdir path1/path2 &&
cp "$TEST_DIRECTORY"/../COPYING path1/path2/COPYING &&
cp "$TEST_DIRECTORY"/../COPYING path1/COPYING &&
cp "$TEST_DIRECTORY"/../COPYING COPYING &&
cp "$TEST_DIRECTORY"/../COPYING path0/COPYING-TOO &&
git add path1/path2/COPYING &&
git add path1/COPYING &&
git add COPYING &&
git add path0/COPYING-TOO &&
git commit -m change -a
[master 8b661fd] change
Author: A U Thor <author@example.com>
4 files changed, 1440 insertions(+)
create mode 100644 COPYING
create mode 100644 path0/COPYING-TOO
create mode 100644 path1/COPYING
create mode 100644 path1/path2/COPYING
ok 2 - creating second files
expecting success: git reset --hard HEAD^
HEAD is now at 3dd90fb add
ok 3 - resetting tree HEAD^
expecting success: test -d path0 &&
test -f path0/COPYING
ok 4 - checking initial files exist after rewind
expecting success: ! test -f path1/path2/COPYING
ok 5 - checking lack of path1/path2/COPYING
expecting success: ! test -f path1/COPYING
ok 6 - checking lack of path1/COPYING
expecting success: ! test -f COPYING
ok 7 - checking lack of COPYING
expecting success: ! test -f path0/COPYING-TOO
ok 8 - checking checking lack of path1/COPYING-TOO
expecting success: ! test -d path1/path2
ok 9 - checking lack of path1/path2
expecting success: ! test -d path1
ok 10 - checking lack of path1
# passed all 10 test(s)
1..10
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7102-reset.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7102-reset/.git/
expecting success:
test_tick &&
echo "1st file" >first &&
git add first &&
git commit -m "create 1st file" &&
echo "2nd file" >second &&
git add second &&
git commit -m "create 2nd file" &&
echo "2nd line 1st file" >>first &&
git commit -a -m "modify 1st file" &&
git rm first &&
git mv second secondfile &&
git commit -a -m "remove 1st and rename 2nd" &&
echo "1st line 2nd file" >secondfile &&
echo "2nd line 2nd file" >>secondfile &&
# "git commit -m" would break MinGW, as Windows refuse to pass
# $test_encoding encoded parameter to git.
commit_msg $test_encoding | git -c "i18n.commitEncoding=$test_encoding" commit -a -F - &&
head5=$(git rev-parse --verify HEAD)
[master (root-commit) 811bbdf] create 1st file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 first
[master ba22ccd] create 2nd file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 second
[master ddaefe0] modify 1st file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rm 'first'
[master d1a4bc3] remove 1st and rename 2nd
Author: A U Thor <author@example.com>
2 files changed, 2 deletions(-)
delete mode 100644 first
rename second => secondfile (100%)
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+), 1 deletion(-)
ok 1 - creating initial files and commits
expecting success:
hex=$(git log -1 --format="%h") &&
git reset --hard > .actual &&
echo HEAD is now at $hex $(commit_msg) > .expected &&
test_i18ncmp .expected .actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 2 - reset --hard message
expecting success:
hex=$(git log -1 --format="%h") &&
git -c "i18n.logOutputEncoding=$test_encoding" reset --hard > .actual &&
echo HEAD is now at $hex $(commit_msg $test_encoding) > .expected &&
test_i18ncmp .expected .actual
ok 3 - reset --hard message (ISO8859-1 logoutputencoding)
expecting success:
test_must_fail git reset aaaaaa &&
test_must_fail git reset --mixed aaaaaa &&
test_must_fail git reset --soft aaaaaa &&
test_must_fail git reset --hard aaaaaa &&
check_changes $head5
fatal: ambiguous argument 'aaaaaa': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'aaaaaa': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'aaaaaa': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'aaaaaa': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ok 4 - giving a non existing revision should fail
expecting success:
touch .git/MERGE_HEAD &&
echo "100644 44c5b5884550c17758737edcced463447b91d42b 1 un" |
git update-index --index-info &&
test_must_fail git reset --soft HEAD &&
rm .git/MERGE_HEAD &&
git rm --cached -- un
fatal: Cannot do a soft reset in the middle of a merge.
rm 'un'
ok 5 - reset --soft with unmerged index should fail
expecting success:
test_must_fail git reset --soft -- first &&
test_must_fail git reset --hard -- first &&
test_must_fail git reset --soft HEAD^ -- first &&
test_must_fail git reset --hard HEAD^ -- first &&
check_changes $head5
fatal: Cannot do soft reset with paths.
fatal: Cannot do hard reset with paths.
fatal: Cannot do soft reset with paths.
fatal: Cannot do hard reset with paths.
ok 6 - giving paths with options different than --mixed should fail
expecting success:
test_must_fail git reset --other &&
test_must_fail git reset -o &&
test_must_fail git reset --mixed --other &&
test_must_fail git reset --mixed -o &&
test_must_fail git reset --soft --other &&
test_must_fail git reset --soft -o &&
test_must_fail git reset --hard --other &&
test_must_fail git reset --hard -o &&
check_changes $head5
error: unknown option `other'
usage: git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [<commit>]
or: git reset [-q] [<tree-ish>] [--] <paths>...
or: git reset --patch [<tree-ish>] [--] [<paths>...]
-q, --quiet be quiet, only report errors
--mixed reset HEAD and index
--soft reset only HEAD
--hard reset HEAD, index and working tree
--merge reset HEAD, index and working tree
--keep reset HEAD but keep local changes
--recurse-submodules[=<reset>]
control recursive updating of submodules
-p, --patch select hunks interactively
-N, --intent-to-add record only the fact that removed paths will be added later
error: unknown switch `o'
usage: git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [<commit>]
or: git reset [-q] [<tree-ish>] [--] <paths>...
or: git reset --patch [<tree-ish>] [--] [<paths>...]
-q, --quiet be quiet, only report errors
--mixed reset HEAD and index
--soft reset only HEAD
--hard reset HEAD, index and working tree
--merge reset HEAD, index and working tree
--keep reset HEAD but keep local changes
--recurse-submodules[=<reset>]
control recursive updating of submodules
-p, --patch select hunks interactively
-N, --intent-to-add record only the fact that removed paths will be added later
error: unknown option `other'
usage: git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [<commit>]
or: git reset [-q] [<tree-ish>] [--] <paths>...
or: git reset --patch [<tree-ish>] [--] [<paths>...]
-q, --quiet be quiet, only report errors
--mixed reset HEAD and index
--soft reset only HEAD
--hard reset HEAD, index and working tree
--merge reset HEAD, index and working tree
--keep reset HEAD but keep local changes
--recurse-submodules[=<reset>]
control recursive updating of submodules
-p, --patch select hunks interactively
-N, --intent-to-add record only the fact that removed paths will be added later
error: unknown switch `o'
usage: git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [<commit>]
or: git reset [-q] [<tree-ish>] [--] <paths>...
or: git reset --patch [<tree-ish>] [--] [<paths>...]
-q, --quiet be quiet, only report errors
--mixed reset HEAD and index
--soft reset only HEAD
--hard reset HEAD, index and working tree
--merge reset HEAD, index and working tree
--keep reset HEAD but keep local changes
--recurse-submodules[=<reset>]
control recursive updating of submodules
-p, --patch select hunks interactively
-N, --intent-to-add record only the fact that removed paths will be added later
error: unknown option `other'
usage: git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [<commit>]
or: git reset [-q] [<tree-ish>] [--] <paths>...
or: git reset --patch [<tree-ish>] [--] [<paths>...]
-q, --quiet be quiet, only report errors
--mixed reset HEAD and index
--soft reset only HEAD
--hard reset HEAD, index and working tree
--merge reset HEAD, index and working tree
--keep reset HEAD but keep local changes
--recurse-submodules[=<reset>]
control recursive updating of submodules
-p, --patch select hunks interactively
-N, --intent-to-add record only the fact that removed paths will be added later
error: unknown switch `o'
usage: git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [<commit>]
or: git reset [-q] [<tree-ish>] [--] <paths>...
or: git reset --patch [<tree-ish>] [--] [<paths>...]
-q, --quiet be quiet, only report errors
--mixed reset HEAD and index
--soft reset only HEAD
--hard reset HEAD, index and working tree
--merge reset HEAD, index and working tree
--keep reset HEAD but keep local changes
--recurse-submodules[=<reset>]
control recursive updating of submodules
-p, --patch select hunks interactively
-N, --intent-to-add record only the fact that removed paths will be added later
error: unknown option `other'
usage: git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [<commit>]
or: git reset [-q] [<tree-ish>] [--] <paths>...
or: git reset --patch [<tree-ish>] [--] [<paths>...]
-q, --quiet be quiet, only report errors
--mixed reset HEAD and index
--soft reset only HEAD
--hard reset HEAD, index and working tree
--merge reset HEAD, index and working tree
--keep reset HEAD but keep local changes
--recurse-submodules[=<reset>]
control recursive updating of submodules
-p, --patch select hunks interactively
-N, --intent-to-add record only the fact that removed paths will be added later
error: unknown switch `o'
usage: git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [<commit>]
or: git reset [-q] [<tree-ish>] [--] <paths>...
or: git reset --patch [<tree-ish>] [--] [<paths>...]
-q, --quiet be quiet, only report errors
--mixed reset HEAD and index
--soft reset only HEAD
--hard reset HEAD, index and working tree
--merge reset HEAD, index and working tree
--keep reset HEAD but keep local changes
--recurse-submodules[=<reset>]
control recursive updating of submodules
-p, --patch select hunks interactively
-N, --intent-to-add record only the fact that removed paths will be added later
ok 7 - giving unrecognized options should fail
expecting success:
git branch branch1 &&
git branch branch2 &&
git checkout branch1 &&
echo "3rd line in branch1" >>secondfile &&
git commit -a -m "change in branch1" &&
git checkout branch2 &&
echo "3rd line in branch2" >>secondfile &&
git commit -a -m "change in branch2" &&
test_must_fail git merge branch1 &&
test_must_fail git reset --soft &&
printf "1st line 2nd file\n2nd line 2nd file\n3rd line" >secondfile &&
git commit -a -m "the change in branch2" &&
git checkout master &&
git branch -D branch1 branch2 &&
check_changes $head5
Switched to branch 'branch1'
[branch1 6b78ea5] change in branch1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'branch2'
[branch2 f8a209f] change in branch2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Merging:
f8a209f change in branch2
virtual branch1
found 1 common ancestor:
Auto-merging secondfile
CONFLICT (content): Merge conflict in secondfile
Automatic merge failed; fix conflicts and then commit the result.
fatal: Cannot do a soft reset in the middle of a merge.
[branch2 8e8e261] the change in branch2
Author: A U Thor <author@example.com>
Switched to branch 'master'
Deleted branch branch1 (was 6b78ea5).
Deleted branch branch2 (was 8e8e261).
ok 8 - trying to do reset --soft with pending merge should fail
expecting success:
git branch branch3 &&
git branch branch4 &&
git checkout branch3 &&
echo "3rd line in branch3" >>secondfile &&
git commit -a -m "line in branch3" &&
git checkout branch4 &&
echo "3rd line in branch4" >>secondfile &&
git checkout -m branch3 &&
test_must_fail git reset --soft &&
printf "1st line 2nd file\n2nd line 2nd file\n3rd line" >secondfile &&
git commit -a -m "the line in branch3" &&
git checkout master &&
git branch -D branch3 branch4 &&
check_changes $head5
Switched to branch 'branch3'
[branch3 0b5021a] line in branch3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'branch4'
Switched to branch 'branch3'
M secondfile
fatal: Cannot do a soft reset in the middle of a merge.
[branch3 dbe96ed] the line in branch3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'master'
Deleted branch branch3 (was dbe96ed).
Deleted branch branch4 (was eed6733).
ok 9 - trying to do reset --soft with pending checkout merge should fail
expecting success:
git reset --hard &&
check_changes $head5 &&
git reset --hard HEAD &&
check_changes $head5 &&
git reset --soft &&
check_changes $head5 &&
git reset --soft HEAD &&
check_changes $head5 &&
git reset --mixed &&
check_changes $head5 &&
git reset --mixed HEAD &&
check_changes $head5 &&
git reset &&
check_changes $head5 &&
git reset HEAD &&
check_changes $head5
HEAD is now at eed6733 modify 2nd file (geändert)
HEAD is now at eed6733 modify 2nd file (geändert)
ok 10 - resetting to HEAD with no changes should succeed and do nothing
expecting success:
git reset --soft HEAD^ &&
check_changes d1a4bc3abce4829628ae2dcb0d60ef3d1a78b1c4 &&
test "$(git rev-parse ORIG_HEAD)" = \
$head5
ok 11 - --soft reset only should show changes in diff --cached
expecting success:
echo "3rd line 2nd file" >>secondfile &&
git commit -a -C ORIG_HEAD &&
head4=$(git rev-parse --verify HEAD) &&
check_changes $head4 &&
test "$(git rev-parse ORIG_HEAD)" = \
$head5
[master b052eb8] modify 2nd file (geändert)
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
1 file changed, 3 insertions(+), 1 deletion(-)
ok 12 - changing files and redo the last commit should succeed
expecting success:
git reset --hard HEAD~2 &&
check_changes ddaefe00f1da16864591c61fdc7adb5d7cd6b74e &&
test "$(git rev-parse ORIG_HEAD)" = \
$head4
HEAD is now at ddaefe0 modify 1st file
ok 13 - --hard reset should change the files and undo commits permanently
expecting success:
git rm first &&
git mv second secondfile &&
echo "1st line 2nd file" >secondfile &&
echo "2nd line 2nd file" >>secondfile &&
git add secondfile &&
check_changes ddaefe00f1da16864591c61fdc7adb5d7cd6b74e
rm 'first'
ok 14 - redoing changes adding them without commit them should succeed
expecting success:
git reset &&
check_changes ddaefe00f1da16864591c61fdc7adb5d7cd6b74e &&
test "$(git rev-parse ORIG_HEAD)" = \
ddaefe00f1da16864591c61fdc7adb5d7cd6b74e
Unstaged changes after reset:
D first
D second
ok 15 - --mixed reset to HEAD should unadd the files
expecting success:
git add secondfile &&
git reset --hard ddaefe00f1da16864591c61fdc7adb5d7cd6b74e &&
git rm first &&
git mv second secondfile &&
git commit -a -m "remove 1st and rename 2nd" &&
echo "1st line 2nd file" >secondfile &&
echo "2nd line 2nd file" >>secondfile &&
# "git commit -m" would break MinGW, as Windows refuse to pass
# $test_encoding encoded parameter to git.
commit_msg $test_encoding | git -c "i18n.commitEncoding=$test_encoding" commit -a -F - &&
check_changes $head5
HEAD is now at ddaefe0 modify 1st file
rm 'first'
[master d1a4bc3] remove 1st and rename 2nd
Author: A U Thor <author@example.com>
2 files changed, 2 deletions(-)
delete mode 100644 first
rename second => secondfile (100%)
Author: A U Thor <author@example.com>
1 file changed, 2 insertions(+), 1 deletion(-)
ok 16 - redoing the last two commits should succeed
expecting success:
git branch branch1 &&
git branch branch2 &&
git checkout branch1 &&
echo "3rd line in branch1" >>secondfile &&
git commit -a -m "change in branch1" &&
git checkout branch2 &&
echo "3rd line in branch2" >>secondfile &&
git commit -a -m "change in branch2" &&
head3=$(git rev-parse --verify HEAD) &&
test_must_fail git pull . branch1 &&
git reset --hard &&
check_changes $head3
Switched to branch 'branch1'
[branch1 6b78ea5] change in branch1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'branch2'
[branch2 f8a209f] change in branch2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
From .
* branch branch1 -> FETCH_HEAD
Merging:
f8a209f change in branch2
virtual 6b78ea5a18fcfce43fc7d5b8980e339547a633be
found 1 common ancestor:
Auto-merging secondfile
CONFLICT (content): Merge conflict in secondfile
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at f8a209f change in branch2
ok 17 - --hard reset to HEAD should clear a failed merge
expecting success:
git reset --hard HEAD^ &&
check_changes $head5 &&
git pull . branch1 &&
git reset --hard ORIG_HEAD &&
check_changes $head5 &&
git checkout master &&
git branch -D branch1 branch2 &&
check_changes $head5
HEAD is now at eed6733 modify 2nd file (geändert)
From .
* branch branch1 -> FETCH_HEAD
Updating eed6733..6b78ea5
Fast-forward
secondfile | 1 +
1 file changed, 1 insertion(+)
HEAD is now at eed6733 modify 2nd file (geändert)
Switched to branch 'master'
Deleted branch branch1 (was 6b78ea5).
Deleted branch branch2 (was eed6733).
ok 18 - --hard reset to ORIG_HEAD should clear a fast-forward merge
expecting success:
echo 1 > file1 &&
echo 2 > file2 &&
git add file1 file2 &&
test_tick &&
git commit -m files &&
git rm file2 &&
echo 3 > file3 &&
echo 4 > file4 &&
echo 5 > file1 &&
git add file1 file3 file4 &&
git reset HEAD -- file1 file2 file3 &&
test_must_fail git diff --quiet &&
git diff > output &&
test_cmp expect output &&
git diff --cached > output &&
test_cmp cached_expect output
[master 14b96fb] files
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 file1
create mode 100644 file2
rm 'file2'
Unstaged changes after reset:
M file1
D file2
ok 19 - test --mixed <paths>
expecting success:
mkdir sub &&
>sub/file1 &&
>sub/file2 &&
git update-index --add sub/file1 sub/file2 &&
T=$(git write-tree) &&
git reset HEAD sub/file2 &&
test_must_fail git diff --quiet &&
U=$(git write-tree) &&
echo "$T" &&
echo "$U" &&
test_must_fail git diff-index --cached --exit-code "$T" &&
test "$T" != "$U"
Unstaged changes after reset:
M file1
D file2
9571d9b5fb34d9c1274612948c5356f0615744bc
88880074c0c9957f91fd21817fee120b773fc32c
:100644 000000 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 D sub/file2
ok 20 - test resetting the index at give paths
expecting success:
git reset --hard &&
git reset -- file1 &&
git diff-files --exit-code &&
git diff-index --cached --exit-code HEAD
HEAD is now at 14b96fb files
ok 21 - resetting an unmodified path is a no-op
expecting success:
echo 123 >> file2 &&
git reset --mixed HEAD > output &&
test_i18ncmp expect output
ok 22 - --mixed refreshes the index
expecting success:
git rm --cached file2 &&
F1=$(git rev-parse HEAD:file1) &&
F2=$(git rev-parse HEAD:file2) &&
F3=$(git rev-parse HEAD:secondfile) &&
{
echo "100644 $F1 1 file2" &&
echo "100644 $F2 2 file2" &&
echo "100644 $F3 3 file2"
} | git update-index --index-info &&
git ls-files -u &&
git reset HEAD file2 &&
test_must_fail git diff --quiet &&
git diff-index --exit-code --cached HEAD
rm 'file2'
100644 d00491fd7e5bb6fa28c517a0bb32b8b506539d4d 1 file2
100644 0cfbf08886fca9a91cb753ec8734c84fcbe52c9f 2 file2
100644 44c5b5884550c17758737edcced463447b91d42b 3 file2
Unstaged changes after reset:
M file2
ok 23 - resetting specific path that is unmerged
expecting success:
git reset --hard &&
>secondfile &&
git add secondfile &&
git reset secondfile &&
test_must_fail git diff --quiet -- secondfile &&
test -z "$(git diff --cached --name-only)" &&
test -f secondfile &&
test_must_be_empty secondfile
HEAD is now at 14b96fb files
Unstaged changes after reset:
M secondfile
ok 24 - disambiguation (1)
expecting success:
git reset --hard &&
>secondfile &&
git add secondfile &&
rm -f secondfile &&
test_must_fail git reset secondfile &&
test -n "$(git diff --cached --name-only -- secondfile)" &&
test ! -f secondfile
HEAD is now at 14b96fb files
fatal: ambiguous argument 'secondfile': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ok 25 - disambiguation (2)
expecting success:
git reset --hard &&
>secondfile &&
git add secondfile &&
rm -f secondfile &&
git reset HEAD secondfile &&
test_must_fail git diff --quiet &&
test -z "$(git diff --cached --name-only)" &&
test ! -f secondfile
HEAD is now at 14b96fb files
Unstaged changes after reset:
D secondfile
ok 26 - disambiguation (3)
expecting success:
git reset --hard &&
>secondfile &&
git add secondfile &&
rm -f secondfile &&
git reset -- secondfile &&
test_must_fail git diff --quiet &&
test -z "$(git diff --cached --name-only)" &&
test ! -f secondfile
HEAD is now at 14b96fb files
Unstaged changes after reset:
D secondfile
ok 27 - disambiguation (4)
expecting success:
# for simpler tests, drop last commit containing added files
git reset --hard HEAD^ &&
git reset HEAD^^{tree} -- . &&
git diff --cached HEAD^ --exit-code &&
git diff HEAD --exit-code
HEAD is now at eed6733 modify 2nd file (geändert)
Unstaged changes after reset:
M secondfile
ok 28 - reset with paths accepts tree
expecting success:
echo new-file >new-file &&
git add new-file &&
git reset -N HEAD &&
tree=$(git write-tree) &&
git ls-tree $tree new-file >actual &&
test_must_be_empty actual &&
git diff --name-only >actual &&
echo new-file >expect &&
test_cmp expect actual
Unstaged changes after reset:
A new-file
ok 29 - reset -N keeps removed files as intent-to-add
expecting success:
git init mixed_worktree &&
(
cd mixed_worktree &&
test_commit dummy
) &&
git --git-dir=mixed_worktree/.git --work-tree=mixed_worktree reset >actual &&
test_must_be_empty actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7102-reset/mixed_worktree/.git/
[master (root-commit) b737dfa] dummy
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dummy.t
ok 30 - reset --mixed sets up work tree
# passed all 30 test(s)
1..30
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7103-reset-bare.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7103-reset-bare/.git/
expecting success:
echo one >file &&
git add file &&
git commit -m one &&
echo two >file &&
git commit -a -m two
[master (root-commit) 5531e95] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
[master 7769a21] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup non-bare
expecting success:
(cd .git &&
test_must_fail git reset --hard)
fatal: this operation must be run in a work tree
ok 2 - "hard" reset requires a worktree
expecting success:
(cd .git &&
test_must_fail git reset --merge)
fatal: this operation must be run in a work tree
ok 3 - "merge" reset requires a worktree
expecting success:
(cd .git &&
test_must_fail git reset --keep)
fatal: this operation must be run in a work tree
ok 4 - "keep" reset requires a worktree
expecting success:
(cd .git && git reset)
ok 5 - "mixed" reset is ok
expecting success:
(cd .git && git reset --soft)
ok 6 - "soft" reset is ok
expecting success:
mkdir worktree &&
GIT_WORK_TREE=$PWD/worktree GIT_DIR=$PWD/.git git reset --hard &&
test_cmp file worktree/file
HEAD is now at 7769a21 two
ok 7 - hard reset works with GIT_WORK_TREE
expecting success:
git clone --bare . bare.git &&
cd bare.git
Cloning into bare repository 'bare.git'...
done.
ok 8 - setup bare
expecting success:
test_must_fail git reset --hard HEAD^
fatal: this operation must be run in a work tree
ok 9 - "hard" reset is not allowed in bare
expecting success:
test_must_fail git reset --merge HEAD^
fatal: this operation must be run in a work tree
ok 10 - "merge" reset is not allowed in bare
expecting success:
test_must_fail git reset --keep HEAD^
fatal: this operation must be run in a work tree
ok 11 - "keep" reset is not allowed in bare
expecting success:
test_must_fail git reset --mixed HEAD^
fatal: mixed reset is not allowed in a bare repository
ok 12 - "mixed" reset is not allowed in bare
expecting success:
git reset --soft HEAD^ &&
test "$(git show --pretty=format:%s | head -n 1)" = "one"
ok 13 - "soft" reset is allowed in bare
# passed all 13 test(s)
1..13
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7104-reset-hard.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7104-reset-hard/.git/
expecting success:
mkdir before later &&
>before/1 &&
>before/2 &&
>hello &&
>later/3 &&
git add before hello later &&
git commit -m world &&
H=$(git rev-parse :hello) &&
git rm --cached hello &&
echo "100644 $H 2 hello" | git update-index --index-info &&
rm -f hello &&
mkdir -p hello &&
>hello/world &&
test "$(git ls-files -o)" = hello/world
[master (root-commit) 3da9c92] world
Author: A U Thor <author@example.com>
4 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 before/1
create mode 100644 before/2
create mode 100644 hello
create mode 100644 later/3
rm 'hello'
ok 1 - setup
expecting success:
git reset --hard &&
git ls-files --error-unmatch before/1 before/2 hello later/3 &&
test -f hello
HEAD is now at 3da9c92 world
before/1
before/2
hello
later/3
ok 2 - reset --hard should restore unmerged ones
expecting success:
T=$(git write-tree) &&
rm -f .git/index &&
git add before hello later &&
U=$(git write-tree) &&
test "$T" = "$U"
ok 3 - reset --hard did not corrupt index or cached-tree
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7003-filter-branch.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7003-filter-branch/.git/
expecting success:
test_commit A &&
GIT_COMMITTER_DATE="@0 +0000" GIT_AUTHOR_DATE="@0 +0000" &&
test_commit --notick B &&
git checkout -b branch B &&
test_commit D &&
mkdir dir &&
test_commit dir/D &&
test_commit E &&
git checkout master &&
test_commit C &&
git checkout branch &&
git merge C &&
git tag F &&
test_commit G &&
test_commit H
[master (root-commit) 0ddfaf1] A
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 A.t
[master e86e545] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B.t
Switched to a new branch 'branch'
[branch bd662c1] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D.t
[branch 3abb9b5] dir/D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dir/D.t
[branch 48ac83b] E
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 E.t
Switched to branch 'master'
[master 0e63577] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C.t
Switched to branch 'branch'
Merging:
48ac83b E
virtual C
found 1 common ancestor:
e86e545 B
Merge made by the 'recursive' strategy.
C.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 C.t
[branch 3c39262] G
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 G.t
[branch 110eac9] H
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 H.t
ok 1 - setup
expecting success:
git filter-branch branch
Rewrite 0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050 (1/9) (0 seconds passed, remaining 0 predicted)
Rewrite e86e54590a6764f0c4219b3fe8b5e971cd5a0ed8 (2/9) (0 seconds passed, remaining 0 predicted)
Rewrite bd662c15882f4e7910b78fc26a3d8fe1ffa802e5 (3/9) (0 seconds passed, remaining 0 predicted)
Rewrite 3abb9b554927997a06e6fafc3c62469a75ef32a3 (4/9) (0 seconds passed, remaining 0 predicted)
Rewrite 48ac83b9774bbddb9c1cd6fe140d5380297aa69c (5/9) (0 seconds passed, remaining 0 predicted)
Rewrite 0e63577b8a9dce52b69167d9c008f6a0e30de818 (6/9) (0 seconds passed, remaining 0 predicted)
Rewrite 013e089e8403f3749848f7aafc6f271fb7179dbc (7/9) (0 seconds passed, remaining 0 predicted)
Rewrite 3c39262d23e70569701d337b4d27a1e97512c2d9 (8/9) (0 seconds passed, remaining 0 predicted)
Rewrite 110eac945dc1713b27bdf49e74e5805db66971f0 (9/9) (0 seconds passed, remaining 0 predicted)
WARNING: Ref 'refs/heads/branch' is unchanged
ok 2 - rewrite identically
expecting success:
test $H = $(git rev-parse HEAD)
ok 3 - result is really identical
expecting success:
(git config core.bare true && cd .git &&
git filter-branch branch > filter-output 2>&1 &&
! fgrep fatal filter-output)
ok 4 - rewrite bare repository identically
expecting success:
test $H = $(git rev-parse HEAD)
ok 5 - result is really identical
expecting success:
mkdir drepo &&
( cd drepo &&
git init &&
test_commit drepo &&
git filter-branch -d "$TRASHDIR/dfoo" \
--index-filter "cp \"$TRASHDIR\"/dfoo/backup-refs \"$TRASHDIR\"" \
) &&
grep drepo "$TRASHDIR/backup-refs"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7003-filter-branch/drepo/.git/
[master (root-commit) 9f96758] drepo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 drepo.t
Rewrite 9f9675864b1443cf5a1e281c740a8ba331951fba (1/1) (0 seconds passed, remaining 0 predicted)
WARNING: Ref 'refs/heads/master' is unchanged
9f9675864b1443cf5a1e281c740a8ba331951fba commit refs/tags/drepo
ok 6 - correct GIT_DIR while using -d
expecting success:
git init drepo-tree &&
(
cd drepo-tree &&
test_commit one &&
git filter-branch -d "$TRASHDIR/dfoo" \
--tree-filter "echo changed >one.t" &&
echo changed >expect &&
git cat-file blob HEAD:one.t >actual &&
test_cmp expect actual &&
test_cmp one.t actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7003-filter-branch/drepo-tree/.git/
[master (root-commit) d944c64] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
Rewrite d944c643197c4e8b1e89974e6d9ba85df421b65d (1/1) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/master' was rewritten
ok 7 - tree-filter works with -d
expecting success:
test_must_fail git filter-branch -f --commit-filter "exit 1" HEAD
Rewrite 0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050 (1/9) (0 seconds passed, remaining 0 predicted) could not write rewritten commit
ok 8 - Fail if commit filter fails
expecting success:
git filter-branch -f --tree-filter "mv D.t doh || :" HEAD
Rewrite 0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050 (1/9) (0 seconds passed, remaining 0 predicted) mv: cannot stat 'D.t': No such file or directory
Rewrite e86e54590a6764f0c4219b3fe8b5e971cd5a0ed8 (2/9) (0 seconds passed, remaining 0 predicted) mv: cannot stat 'D.t': No such file or directory
Rewrite bd662c15882f4e7910b78fc26a3d8fe1ffa802e5 (3/9) (0 seconds passed, remaining 0 predicted)
Rewrite 3abb9b554927997a06e6fafc3c62469a75ef32a3 (4/9) (0 seconds passed, remaining 0 predicted)
Rewrite 48ac83b9774bbddb9c1cd6fe140d5380297aa69c (5/9) (0 seconds passed, remaining 0 predicted)
Rewrite 0e63577b8a9dce52b69167d9c008f6a0e30de818 (6/9) (0 seconds passed, remaining 0 predicted) mv: cannot stat 'D.t': No such file or directory
Rewrite 013e089e8403f3749848f7aafc6f271fb7179dbc (7/9) (1 seconds passed, remaining 0 predicted)
Rewrite 3c39262d23e70569701d337b4d27a1e97512c2d9 (7/9) (1 seconds passed, remaining 0 predicted)
Rewrite 110eac945dc1713b27bdf49e74e5805db66971f0 (7/9) (1 seconds passed, remaining 0 predicted)
Ref 'refs/heads/branch' was rewritten
ok 9 - rewrite, renaming a specific file
expecting success:
test D = "$(git show HEAD:doh --)" &&
! test -f D.t &&
test -f doh &&
test D = "$(cat doh)"
ok 10 - test that the file was renamed
expecting success:
git filter-branch -f --tree-filter "mv dir diroh || :" HEAD
Rewrite 0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050 (1/9) (0 seconds passed, remaining 0 predicted) mv: cannot stat 'dir': No such file or directory
Rewrite e86e54590a6764f0c4219b3fe8b5e971cd5a0ed8 (2/9) (0 seconds passed, remaining 0 predicted) mv: cannot stat 'dir': No such file or directory
Rewrite 3d6c5360ccb48d27bbc524f53496821309a1fc79 (3/9) (1 seconds passed, remaining 2 predicted) mv: cannot stat 'dir': No such file or directory
Rewrite 28e3b83a5f2c2b87fa77b674df1529da9f4a66b4 (3/9) (1 seconds passed, remaining 2 predicted)
Rewrite b0e1a7fc77c44f8710a324ce0cdaa5f0e3f41f41 (3/9) (1 seconds passed, remaining 2 predicted)
Rewrite 0e63577b8a9dce52b69167d9c008f6a0e30de818 (3/9) (1 seconds passed, remaining 2 predicted) mv: cannot stat 'dir': No such file or directory
Rewrite 284d35b48d5c7cf8f258f9d25690e5c3c38bb8c3 (7/9) (1 seconds passed, remaining 0 predicted)
Rewrite 8d77ce9a0f051fe4d6b311099cfc061fc8fa238e (7/9) (1 seconds passed, remaining 0 predicted)
Rewrite 3623c2fd76a1257ce6cfb529b64aa3e51d851ffd (7/9) (1 seconds passed, remaining 0 predicted)
Ref 'refs/heads/branch' was rewritten
ok 11 - rewrite, renaming a specific directory
expecting success:
test dir/D = "$(git show HEAD:diroh/D.t --)" &&
! test -d dir &&
test -d diroh &&
! test -d diroh/dir &&
test -f diroh/D.t &&
test dir/D = "$(cat diroh/D.t)"
ok 12 - test that the directory was renamed
expecting success:
git filter-branch --state-branch state -f --tree-filter "touch file || :" HEAD
Branch state does not exist. Will create
Rewrite 0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050 (1/9) (0 seconds passed, remaining 0 predicted)
Rewrite e86e54590a6764f0c4219b3fe8b5e971cd5a0ed8 (2/9) (0 seconds passed, remaining 0 predicted)
Rewrite 3d6c5360ccb48d27bbc524f53496821309a1fc79 (3/9) (0 seconds passed, remaining 0 predicted)
Rewrite ef5df644a239016a9035ed6fe3e7f2b4b4a349bd (4/9) (0 seconds passed, remaining 0 predicted)
Rewrite d66aa888e8e10ccecac31b04a73b006afcfb6ab2 (5/9) (0 seconds passed, remaining 0 predicted)
Rewrite 0e63577b8a9dce52b69167d9c008f6a0e30de818 (6/9) (1 seconds passed, remaining 0 predicted)
Rewrite 095b78eb9c1f77139224464f38f1e0aff8add3cf (6/9) (1 seconds passed, remaining 0 predicted)
Rewrite 20d07e95852c2683da5bd70d3badbd5028484552 (6/9) (1 seconds passed, remaining 0 predicted)
Rewrite 8a3423ee5559c5e0c32440a860f6b09a0e6020fc (6/9) (1 seconds passed, remaining 0 predicted)
Ref 'refs/heads/branch' was rewritten
Saving rewrite state to state
ok 13 - populate --state-branch
expecting success:
test_when_finished git reset --hard $V &&
git reset --hard $V &&
git filter-branch --state-branch state -f --tree-filter "touch file || :" HEAD &&
test_cmp_rev $W HEAD
HEAD is now at 8a3423e H
Populating map from state (62b9c9fa908324bba33ac79ad962e765fd9a3958)
Rewrite 0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050 (1/9) (0 seconds passed, remaining 0 predicted)
Rewrite e86e54590a6764f0c4219b3fe8b5e971cd5a0ed8 (2/9) (0 seconds passed, remaining 0 predicted)
Rewrite 3d6c5360ccb48d27bbc524f53496821309a1fc79 (3/9) (0 seconds passed, remaining 0 predicted)
Rewrite ef5df644a239016a9035ed6fe3e7f2b4b4a349bd (4/9) (0 seconds passed, remaining 0 predicted)
Rewrite d66aa888e8e10ccecac31b04a73b006afcfb6ab2 (5/9) (0 seconds passed, remaining 0 predicted)
Rewrite 0e63577b8a9dce52b69167d9c008f6a0e30de818 (6/9) (0 seconds passed, remaining 0 predicted)
Rewrite 095b78eb9c1f77139224464f38f1e0aff8add3cf (7/9) (0 seconds passed, remaining 0 predicted)
Rewrite 20d07e95852c2683da5bd70d3badbd5028484552 (8/9) (0 seconds passed, remaining 0 predicted)
Rewrite 8a3423ee5559c5e0c32440a860f6b09a0e6020fc (9/9) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/branch' was rewritten
Saving rewrite state to state
HEAD is now at 8a3423e H
ok 14 - using --state-branch to skip already rewritten commits
expecting success:
git branch modD oldD &&
git filter-branch -f --tree-filter "mv B.t boh || :" D..modD
Rewrite 3d6c5360ccb48d27bbc524f53496821309a1fc79 (1/2) (0 seconds passed, remaining 0 predicted)
Rewrite ef5df644a239016a9035ed6fe3e7f2b4b4a349bd (2/2) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/modD' was rewritten
ok 15 - rewrite one branch, keeping a side branch
expecting success:
test "$(git merge-base modD D)" = "$(git rev-parse B)"
ok 16 - common ancestor is still common (unchanged)
expecting success:
mkdir subdir &&
touch subdir/new &&
git add subdir/new &&
test_tick &&
git commit -m "subdir" &&
echo H > A.t &&
test_tick &&
git commit -m "not subdir" A.t &&
echo A > subdir/new &&
test_tick &&
git commit -m "again subdir" subdir/new &&
git rm A.t &&
test_tick &&
git commit -m "again not subdir" &&
git branch sub &&
git branch sub-earlier HEAD~2 &&
git filter-branch -f --subdirectory-filter subdir \
refs/heads/sub refs/heads/sub-earlier
[branch bb8f80d] subdir
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 subdir/new
[branch 5bae69c] not subdir
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[branch 140072e] again subdir
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
rm 'A.t'
[branch ead226b] again not subdir
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 A.t
Rewrite bb8f80d463b54137409c5a381ad07ea6bf4b1867 (1/2) (0 seconds passed, remaining 0 predicted)
Rewrite 140072ead29d56d10c1c5c473c117e3aed45a333 (2/2) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/sub' was rewritten
Ref 'refs/heads/sub-earlier' was rewritten
ok 17 - filter subdirectory only
expecting success:
test 2 = $(git rev-list sub | wc -l) &&
git show sub:new &&
test_must_fail git show sub:subdir &&
git show sub-earlier:new &&
test_must_fail git show sub-earlier:subdir
A
fatal: Path 'subdir' exists on disk, but not in 'sub'.
fatal: Path 'subdir' exists on disk, but not in 'sub-earlier'.
ok 18 - subdirectory filter result looks okay
expecting success:
git checkout master &&
mkdir subdir &&
echo A > subdir/new &&
git add subdir/new &&
test_tick &&
git commit -m "subdir on master" subdir/new &&
git rm A.t &&
test_tick &&
git commit -m "again subdir on master" &&
git merge branch
Switched to branch 'master'
[master 2744380] subdir on master
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 subdir/new
rm 'A.t'
[master d349444] again subdir on master
Author: A U Thor <author@example.com>
1 file changed, 1 deletion(-)
delete mode 100644 A.t
Merging:
d349444 again subdir on master
virtual branch
found 1 common ancestor:
0e63577 C
Skipped subdir/new (merged same as existing)
Merge made by the 'recursive' strategy.
E.t | 1 +
G.t | 1 +
H.t | 1 +
diroh/D.t | 1 +
doh | 1 +
5 files changed, 5 insertions(+)
create mode 100644 E.t
create mode 100644 G.t
create mode 100644 H.t
create mode 100644 diroh/D.t
create mode 100644 doh
ok 19 - more setup
expecting success:
git branch directorymoved &&
git filter-branch -f --index-filter \
"git ls-files -s | sed \"s- -&newsubdir/-\" |
GIT_INDEX_FILE=\$GIT_INDEX_FILE.new \
git update-index --index-info &&
mv \"\$GIT_INDEX_FILE.new\" \"\$GIT_INDEX_FILE\"" directorymoved &&
git diff --exit-code HEAD directorymoved:newsubdir
Rewrite 0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050 (1/16) (0 seconds passed, remaining 0 predicted)
Rewrite e86e54590a6764f0c4219b3fe8b5e971cd5a0ed8 (2/16) (0 seconds passed, remaining 0 predicted)
Rewrite 0e63577b8a9dce52b69167d9c008f6a0e30de818 (3/16) (0 seconds passed, remaining 0 predicted)
Rewrite 2744380f4984748b7b4c121c182e9c3330a609c5 (4/16) (0 seconds passed, remaining 0 predicted)
Rewrite d3494446ffa0b10a4a22ad9db09ce4fe83ff7648 (5/16) (0 seconds passed, remaining 0 predicted)
Rewrite 3d6c5360ccb48d27bbc524f53496821309a1fc79 (6/16) (0 seconds passed, remaining 0 predicted)
Rewrite ef5df644a239016a9035ed6fe3e7f2b4b4a349bd (7/16) (0 seconds passed, remaining 0 predicted)
Rewrite d66aa888e8e10ccecac31b04a73b006afcfb6ab2 (8/16) (0 seconds passed, remaining 0 predicted)
Rewrite 095b78eb9c1f77139224464f38f1e0aff8add3cf (9/16) (0 seconds passed, remaining 0 predicted)
Rewrite 20d07e95852c2683da5bd70d3badbd5028484552 (10/16) (1 seconds passed, remaining 0 predicted)
Rewrite 8a3423ee5559c5e0c32440a860f6b09a0e6020fc (10/16) (1 seconds passed, remaining 0 predicted)
Rewrite bb8f80d463b54137409c5a381ad07ea6bf4b1867 (10/16) (1 seconds passed, remaining 0 predicted)
Rewrite 5bae69c6543c34be1d98816e26501bcda79d1d6b (10/16) (1 seconds passed, remaining 0 predicted)
Rewrite 140072ead29d56d10c1c5c473c117e3aed45a333 (10/16) (1 seconds passed, remaining 0 predicted)
Rewrite ead226bc0b53c5d210f2326ae871b0fea3004df3 (10/16) (1 seconds passed, remaining 0 predicted)
Rewrite 7329f31555df2545350d15ecd0f5eab05e7142e1 (10/16) (1 seconds passed, remaining 0 predicted)
Ref 'refs/heads/directorymoved' was rewritten
ok 20 - use index-filter to move into a subdirectory
expecting success:
old=$(git rev-parse HEAD) &&
test_must_fail git filter-branch -f --msg-filter false HEAD &&
test $old = $(git rev-parse HEAD) &&
rm -rf .git-rewrite
Rewrite 0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050 (1/16) (0 seconds passed, remaining 0 predicted) msg filter failed: false
ok 21 - stops when msg filter fails
expecting success:
: > i &&
git add i &&
test_tick &&
GIT_AUTHOR_NAME="B V Uips" git commit -m bvuips &&
git branch preserved-author &&
(sane_unset GIT_AUTHOR_NAME &&
git filter-branch -f --msg-filter "cat; \
test \$GIT_COMMIT != $(git rev-parse master) || \
echo Hallo" \
preserved-author) &&
git rev-list --author="B V Uips" preserved-author >actual &&
test_line_count = 1 actual
[master 2bfc21d] bvuips
Author: B V Uips <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 i
Rewrite 0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050 (1/17) (0 seconds passed, remaining 0 predicted)
Rewrite e86e54590a6764f0c4219b3fe8b5e971cd5a0ed8 (2/17) (0 seconds passed, remaining 0 predicted)
Rewrite 0e63577b8a9dce52b69167d9c008f6a0e30de818 (3/17) (0 seconds passed, remaining 0 predicted)
Rewrite 2744380f4984748b7b4c121c182e9c3330a609c5 (4/17) (0 seconds passed, remaining 0 predicted)
Rewrite d3494446ffa0b10a4a22ad9db09ce4fe83ff7648 (5/17) (0 seconds passed, remaining 0 predicted)
Rewrite 3d6c5360ccb48d27bbc524f53496821309a1fc79 (6/17) (0 seconds passed, remaining 0 predicted)
Rewrite ef5df644a239016a9035ed6fe3e7f2b4b4a349bd (7/17) (0 seconds passed, remaining 0 predicted)
Rewrite d66aa888e8e10ccecac31b04a73b006afcfb6ab2 (8/17) (0 seconds passed, remaining 0 predicted)
Rewrite 095b78eb9c1f77139224464f38f1e0aff8add3cf (9/17) (1 seconds passed, remaining 0 predicted)
Rewrite 20d07e95852c2683da5bd70d3badbd5028484552 (9/17) (1 seconds passed, remaining 0 predicted)
Rewrite 8a3423ee5559c5e0c32440a860f6b09a0e6020fc (9/17) (1 seconds passed, remaining 0 predicted)
Rewrite bb8f80d463b54137409c5a381ad07ea6bf4b1867 (9/17) (1 seconds passed, remaining 0 predicted)
Rewrite 5bae69c6543c34be1d98816e26501bcda79d1d6b (9/17) (1 seconds passed, remaining 0 predicted)
Rewrite 140072ead29d56d10c1c5c473c117e3aed45a333 (9/17) (1 seconds passed, remaining 0 predicted)
Rewrite ead226bc0b53c5d210f2326ae871b0fea3004df3 (9/17) (1 seconds passed, remaining 0 predicted)
Rewrite 7329f31555df2545350d15ecd0f5eab05e7142e1 (9/17) (1 seconds passed, remaining 0 predicted)
Rewrite 2bfc21d43f33a03177145ce5f42ee28e86b0e4d2 (9/17) (1 seconds passed, remaining 0 predicted)
Ref 'refs/heads/preserved-author' was rewritten
ok 22 - author information is preserved
expecting success:
echo i > i &&
test_tick &&
git commit -m i i &&
git branch removed-author &&
git filter-branch -f --commit-filter "\
if [ \"\$GIT_AUTHOR_NAME\" = \"B V Uips\" ];\
then\
skip_commit \"\$@\";
else\
git commit-tree \"\$@\";\
fi" removed-author &&
cnt1=$(git rev-list master | wc -l) &&
cnt2=$(git rev-list removed-author | wc -l) &&
test $cnt1 -eq $(($cnt2 + 1)) &&
git rev-list --author="B V Uips" removed-author >actual &&
test_line_count = 0 actual
[master 68862b3] i
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Rewrite 0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050 (1/18) (0 seconds passed, remaining 0 predicted)
Rewrite e86e54590a6764f0c4219b3fe8b5e971cd5a0ed8 (2/18) (0 seconds passed, remaining 0 predicted)
Rewrite 0e63577b8a9dce52b69167d9c008f6a0e30de818 (3/18) (0 seconds passed, remaining 0 predicted)
Rewrite 2744380f4984748b7b4c121c182e9c3330a609c5 (4/18) (0 seconds passed, remaining 0 predicted)
Rewrite d3494446ffa0b10a4a22ad9db09ce4fe83ff7648 (5/18) (0 seconds passed, remaining 0 predicted)
Rewrite 3d6c5360ccb48d27bbc524f53496821309a1fc79 (6/18) (0 seconds passed, remaining 0 predicted)
Rewrite ef5df644a239016a9035ed6fe3e7f2b4b4a349bd (7/18) (0 seconds passed, remaining 0 predicted)
Rewrite d66aa888e8e10ccecac31b04a73b006afcfb6ab2 (8/18) (0 seconds passed, remaining 0 predicted)
Rewrite 095b78eb9c1f77139224464f38f1e0aff8add3cf (9/18) (1 seconds passed, remaining 1 predicted)
Rewrite 20d07e95852c2683da5bd70d3badbd5028484552 (9/18) (1 seconds passed, remaining 1 predicted)
Rewrite 8a3423ee5559c5e0c32440a860f6b09a0e6020fc (9/18) (1 seconds passed, remaining 1 predicted)
Rewrite bb8f80d463b54137409c5a381ad07ea6bf4b1867 (9/18) (1 seconds passed, remaining 1 predicted)
Rewrite 5bae69c6543c34be1d98816e26501bcda79d1d6b (9/18) (1 seconds passed, remaining 1 predicted)
Rewrite 140072ead29d56d10c1c5c473c117e3aed45a333 (9/18) (1 seconds passed, remaining 1 predicted)
Rewrite ead226bc0b53c5d210f2326ae871b0fea3004df3 (9/18) (1 seconds passed, remaining 1 predicted)
Rewrite 7329f31555df2545350d15ecd0f5eab05e7142e1 (9/18) (1 seconds passed, remaining 1 predicted)
Rewrite 2bfc21d43f33a03177145ce5f42ee28e86b0e4d2 (9/18) (1 seconds passed, remaining 1 predicted)
Rewrite 68862b396e34e966159af1904a1560522f345981 (9/18) (1 seconds passed, remaining 1 predicted)
Ref 'refs/heads/removed-author' was rewritten
ok 23 - remove a certain author's commits
expecting success:
test_must_fail git filter-branch -f master xy-problem &&
test_must_fail git filter-branch -f HEAD^
fatal: ambiguous argument 'xy-problem': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
You must specify a ref to rewrite.
ok 24 - barf on invalid name
expecting success:
git filter-branch -f --commit-filter "\
parent=\$(git rev-parse \$GIT_COMMIT^) &&
mapped=\$(map \$parent) &&
actual=\$(echo \"\$@\" | sed \"s/^.*-p //\") &&
test \$mapped = \$actual &&
git commit-tree \"\$@\";" master~2..master &&
git rev-parse --verify master
Rewrite 2bfc21d43f33a03177145ce5f42ee28e86b0e4d2 (1/2) (0 seconds passed, remaining 0 predicted)
Rewrite 68862b396e34e966159af1904a1560522f345981 (2/2) (0 seconds passed, remaining 0 predicted)
WARNING: Ref 'refs/heads/master' is unchanged
68862b396e34e966159af1904a1560522f345981
ok 25 - "map" works in commit filter
expecting success:
git checkout -b rerere A &&
mkdir foo &&
name="れれれ" &&
>foo/$name &&
git add foo &&
git commit -m "Adding a file" &&
git filter-branch --tree-filter "rm -fr foo" &&
test_must_fail git ls-files --error-unmatch "foo/$name" &&
test $(git rev-parse --verify rerere) != $(git rev-parse --verify A)
Switched to a new branch 'rerere'
[rerere 1d45e88] Adding a file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 "foo/\343\202\214\343\202\214\343\202\214"
Rewrite 0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050 (1/2) (0 seconds passed, remaining 0 predicted)
Rewrite 1d45e8854f1dd5452938be2dedb173087134c05c (2/2) (1 seconds passed, remaining 0 predicted)
Ref 'refs/heads/rerere' was rewritten
error: pathspec 'foo/れれれ' did not match any file(s) known to git
Did you forget to 'git add'?
ok 26 - Name needing quotes
expecting success:
git reset --hard &&
git checkout master &&
mkdir foo &&
touch foo/bar &&
git add foo &&
test_tick &&
git commit -m "Adding foo" &&
git rm -r foo &&
test_tick &&
git commit -m "Removing foo" &&
mkdir foo &&
touch foo/bar &&
git add foo &&
test_tick &&
git commit -m "Re-adding foo" &&
git filter-branch -f --subdirectory-filter foo &&
git rev-list master >actual &&
test_line_count = 3 actual
HEAD is now at 643bd56 Adding a file
Switched to branch 'master'
[master 3305444] Adding foo
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 foo/bar
rm 'foo/bar'
[master 19fad5f] Removing foo
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 foo/bar
[master 7aafb76] Re-adding foo
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 foo/bar
Rewrite 3305444c998d38f6e0ae04b8b2dde079396fbd96 (1/3) (0 seconds passed, remaining 0 predicted)
Rewrite 19fad5fb6ee227e558ea3a23a347d3c375fde390 (2/3) (0 seconds passed, remaining 0 predicted)
Rewrite 7aafb762e4a3130535b3e68ddc425c6c7c339d3b (3/3) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/master' was rewritten
ok 27 - Subdirectory filter with disappearing trees
expecting success:
git tag -m atag T &&
git cat-file tag T > expect &&
git filter-branch -f --tag-name-filter cat &&
git cat-file tag T > actual &&
test_cmp expect actual
Rewrite f78b0905e139f6556b004c5f87cfe750aa8e3286 (1/3) (0 seconds passed, remaining 0 predicted)
Rewrite c9fbe965b33cbcb81865d123297fe4df816d7555 (2/3) (0 seconds passed, remaining 0 predicted)
Rewrite fea59ed4667894c7bd682b11f147174ab39c40bd (3/3) (0 seconds passed, remaining 0 predicted)
WARNING: Ref 'refs/heads/master' is unchanged
T -> T (fea59ed4667894c7bd682b11f147174ab39c40bd -> fea59ed4667894c7bd682b11f147174ab39c40bd)
ok 28 - Tag name filtering retains tag message
expecting success:
sha1=$(git rev-parse HEAD) &&
sha1t=$(echo "$faux_gpg_tag" | sed -e s/XXXXXX/$sha1/ | git mktag) &&
git update-ref "refs/tags/S" "$sha1t" &&
echo "$faux_gpg_tag" | sed -e s/XXXXXX/$sha1/ | head -n 6 > expect &&
git filter-branch -f --tag-name-filter cat &&
git cat-file tag S > actual &&
test_cmp expect actual
Rewrite f78b0905e139f6556b004c5f87cfe750aa8e3286 (1/3) (0 seconds passed, remaining 0 predicted)
Rewrite c9fbe965b33cbcb81865d123297fe4df816d7555 (2/3) (0 seconds passed, remaining 0 predicted)
Rewrite fea59ed4667894c7bd682b11f147174ab39c40bd (3/3) (0 seconds passed, remaining 0 predicted)
WARNING: Ref 'refs/heads/master' is unchanged
S -> S (fea59ed4667894c7bd682b11f147174ab39c40bd -> fea59ed4667894c7bd682b11f147174ab39c40bd)
gpg signature stripped from tag object 5e10caf7d74c3ace8930aa1d5449d4d0ceb2e9e0
T -> T (fea59ed4667894c7bd682b11f147174ab39c40bd -> fea59ed4667894c7bd682b11f147174ab39c40bd)
ok 29 - Tag name filtering strips gpg signature
expecting success:
mkdir gpg &&
touch gpg/foo &&
git add gpg &&
test_tick &&
git commit -S -m "Adding gpg" &&
git log -1 --format="%s" > expect &&
git filter-branch -f --msg-filter "cat" &&
git log -1 --format="%s" > actual &&
test_cmp expect actual
[master 0605caf] Adding gpg
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 gpg/foo
Rewrite f78b0905e139f6556b004c5f87cfe750aa8e3286 (1/4) (0 seconds passed, remaining 0 predicted)
Rewrite c9fbe965b33cbcb81865d123297fe4df816d7555 (2/4) (0 seconds passed, remaining 0 predicted)
Rewrite fea59ed4667894c7bd682b11f147174ab39c40bd (3/4) (0 seconds passed, remaining 0 predicted)
Rewrite 0605caf1ab7479b896eed397d46d14fcec86e878 (4/4) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/master' was rewritten
ok 30 - Filtering retains message of gpg signed commit
expecting success:
git tag -m tag-with-slash X/1 &&
git cat-file tag X/1 | sed -e s,X/1,X/2, > expect &&
git filter-branch -f --tag-name-filter "echo X/2" &&
git cat-file tag X/2 > actual &&
test_cmp expect actual
Rewrite f78b0905e139f6556b004c5f87cfe750aa8e3286 (1/4) (0 seconds passed, remaining 0 predicted)
Rewrite c9fbe965b33cbcb81865d123297fe4df816d7555 (2/4) (0 seconds passed, remaining 0 predicted)
Rewrite fea59ed4667894c7bd682b11f147174ab39c40bd (3/4) (0 seconds passed, remaining 0 predicted)
Rewrite ecd85101fddd95209f80a2603d99c1decb1c32b3 (4/4) (0 seconds passed, remaining 0 predicted)
WARNING: Ref 'refs/heads/master' is unchanged
S -> X/2 (fea59ed4667894c7bd682b11f147174ab39c40bd -> fea59ed4667894c7bd682b11f147174ab39c40bd)
T -> X/2 (fea59ed4667894c7bd682b11f147174ab39c40bd -> fea59ed4667894c7bd682b11f147174ab39c40bd)
X/1 -> X/2 (ecd85101fddd95209f80a2603d99c1decb1c32b3 -> ecd85101fddd95209f80a2603d99c1decb1c32b3)
ok 31 - Tag name filtering allows slashes in tag names
expecting success:
git checkout --orphan master-no-a &&
git rm -rf . &&
unset test_tick &&
test_tick &&
GIT_COMMITTER_DATE="@0 +0000" GIT_AUTHOR_DATE="@0 +0000" &&
test_commit --notick B B.t B Bx &&
git checkout -b branch-no-a Bx &&
test_commit D D.t D Dx &&
mkdir dir &&
test_commit dir/D dir/D.t dir/D dir/Dx &&
test_commit E E.t E Ex &&
git checkout master-no-a &&
test_commit C C.t C Cx &&
git checkout branch-no-a &&
git merge Cx -m "Merge tag 'C' into branch" &&
git tag Fx &&
test_commit G G.t G Gx &&
test_commit H H.t H Hx &&
git checkout branch
Switched to a new branch 'master-no-a'
rm 'bar'
rm 'gpg/foo'
[master-no-a (root-commit) 8d95d31] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 B.t
Switched to a new branch 'branch-no-a'
[branch-no-a 2d0b6b2] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 D.t
[branch-no-a 6b73242] dir/D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dir/D.t
[branch-no-a 6e45985] E
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 E.t
Switched to branch 'master-no-a'
[master-no-a 5a68040] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 C.t
Switched to branch 'branch-no-a'
Merging:
6e45985 E
virtual Cx
found 1 common ancestor:
8d95d31 B
Merge made by the 'recursive' strategy.
C.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 C.t
[branch-no-a f0368e4] G
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 G.t
[branch-no-a 00fc75b] H
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 H.t
Switched to branch 'branch'
ok 32 - setup --prune-empty comparisons
expecting success:
git rev-list HEAD > expect &&
test_commit to_remove &&
git filter-branch -f --index-filter "git update-index --remove to_remove.t" --prune-empty HEAD &&
git rev-list HEAD > actual &&
test_cmp expect actual
[branch 219a992] to_remove
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 to_remove.t
Rewrite 0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050 (1/14) (0 seconds passed, remaining 0 predicted)
Rewrite e86e54590a6764f0c4219b3fe8b5e971cd5a0ed8 (2/14) (0 seconds passed, remaining 0 predicted)
Rewrite 3d6c5360ccb48d27bbc524f53496821309a1fc79 (3/14) (0 seconds passed, remaining 0 predicted)
Rewrite ef5df644a239016a9035ed6fe3e7f2b4b4a349bd (4/14) (0 seconds passed, remaining 0 predicted)
Rewrite d66aa888e8e10ccecac31b04a73b006afcfb6ab2 (5/14) (0 seconds passed, remaining 0 predicted)
Rewrite 0e63577b8a9dce52b69167d9c008f6a0e30de818 (6/14) (0 seconds passed, remaining 0 predicted)
Rewrite 095b78eb9c1f77139224464f38f1e0aff8add3cf (7/14) (1 seconds passed, remaining 1 predicted)
Rewrite 20d07e95852c2683da5bd70d3badbd5028484552 (7/14) (1 seconds passed, remaining 1 predicted)
Rewrite 8a3423ee5559c5e0c32440a860f6b09a0e6020fc (7/14) (1 seconds passed, remaining 1 predicted)
Rewrite bb8f80d463b54137409c5a381ad07ea6bf4b1867 (7/14) (1 seconds passed, remaining 1 predicted)
Rewrite 5bae69c6543c34be1d98816e26501bcda79d1d6b (7/14) (1 seconds passed, remaining 1 predicted)
Rewrite 140072ead29d56d10c1c5c473c117e3aed45a333 (7/14) (1 seconds passed, remaining 1 predicted)
Rewrite ead226bc0b53c5d210f2326ae871b0fea3004df3 (7/14) (1 seconds passed, remaining 1 predicted)
Rewrite 219a992bdcfa9f21a6ac93c218579aed7936acdd (7/14) (1 seconds passed, remaining 1 predicted)
Ref 'refs/heads/branch' was rewritten
ok 33 - Prune empty commits
expecting success:
test_config merge.ff false &&
git rev-list HEAD >expect &&
test_commit to_remove_2 &&
git reset --hard HEAD^ &&
test_merge non-ff to_remove_2 &&
git filter-branch -f --index-filter "git update-index --remove to_remove_2.t" --prune-empty HEAD &&
git rev-list HEAD >actual &&
test_cmp expect actual
[branch cb86908] to_remove_2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 to_remove_2.t
HEAD is now at ead226b again not subdir
Merging:
ead226b again not subdir
virtual to_remove_2
found 1 common ancestor:
ead226b again not subdir
Merge made by the 'recursive' strategy.
to_remove_2.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 to_remove_2.t
Rewrite 0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050 (1/15) (0 seconds passed, remaining 0 predicted)
Rewrite e86e54590a6764f0c4219b3fe8b5e971cd5a0ed8 (2/15) (1 seconds passed, remaining 6 predicted)
Rewrite 3d6c5360ccb48d27bbc524f53496821309a1fc79 (2/15) (1 seconds passed, remaining 6 predicted)
Rewrite ef5df644a239016a9035ed6fe3e7f2b4b4a349bd (2/15) (1 seconds passed, remaining 6 predicted)
Rewrite d66aa888e8e10ccecac31b04a73b006afcfb6ab2 (5/15) (1 seconds passed, remaining 2 predicted)
Rewrite 0e63577b8a9dce52b69167d9c008f6a0e30de818 (5/15) (1 seconds passed, remaining 2 predicted)
Rewrite 095b78eb9c1f77139224464f38f1e0aff8add3cf (5/15) (1 seconds passed, remaining 2 predicted)
Rewrite 20d07e95852c2683da5bd70d3badbd5028484552 (5/15) (1 seconds passed, remaining 2 predicted)
Rewrite 8a3423ee5559c5e0c32440a860f6b09a0e6020fc (5/15) (1 seconds passed, remaining 2 predicted)
Rewrite bb8f80d463b54137409c5a381ad07ea6bf4b1867 (5/15) (1 seconds passed, remaining 2 predicted)
Rewrite 5bae69c6543c34be1d98816e26501bcda79d1d6b (11/15) (1 seconds passed, remaining 0 predicted)
Rewrite 140072ead29d56d10c1c5c473c117e3aed45a333 (11/15) (1 seconds passed, remaining 0 predicted)
Rewrite ead226bc0b53c5d210f2326ae871b0fea3004df3 (11/15) (1 seconds passed, remaining 0 predicted)
Rewrite cb86908a399a1a40c4270055e48259f9034a5458 (11/15) (1 seconds passed, remaining 0 predicted)
Rewrite 61efb63b91ac2be151fa30bc4f43e001cd3b8c86 (11/15) (1 seconds passed, remaining 0 predicted)
Ref 'refs/heads/branch' was rewritten
ok 34 - prune empty collapsed merges
expecting success:
git rev-list HEAD >expect &&
git commit --allow-empty -m empty &&
git filter-branch -f --prune-empty HEAD &&
git rev-list HEAD >actual &&
test_cmp expect actual
[branch 5b6cb84] empty
Author: A U Thor <author@example.com>
Rewrite 0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050 (1/14) (0 seconds passed, remaining 0 predicted)
Rewrite e86e54590a6764f0c4219b3fe8b5e971cd5a0ed8 (2/14) (0 seconds passed, remaining 0 predicted)
Rewrite 3d6c5360ccb48d27bbc524f53496821309a1fc79 (3/14) (0 seconds passed, remaining 0 predicted)
Rewrite ef5df644a239016a9035ed6fe3e7f2b4b4a349bd (4/14) (0 seconds passed, remaining 0 predicted)
Rewrite d66aa888e8e10ccecac31b04a73b006afcfb6ab2 (5/14) (0 seconds passed, remaining 0 predicted)
Rewrite 0e63577b8a9dce52b69167d9c008f6a0e30de818 (6/14) (0 seconds passed, remaining 0 predicted)
Rewrite 095b78eb9c1f77139224464f38f1e0aff8add3cf (7/14) (1 seconds passed, remaining 1 predicted)
Rewrite 20d07e95852c2683da5bd70d3badbd5028484552 (7/14) (1 seconds passed, remaining 1 predicted)
Rewrite 8a3423ee5559c5e0c32440a860f6b09a0e6020fc (7/14) (1 seconds passed, remaining 1 predicted)
Rewrite bb8f80d463b54137409c5a381ad07ea6bf4b1867 (7/14) (1 seconds passed, remaining 1 predicted)
Rewrite 5bae69c6543c34be1d98816e26501bcda79d1d6b (7/14) (1 seconds passed, remaining 1 predicted)
Rewrite 140072ead29d56d10c1c5c473c117e3aed45a333 (7/14) (1 seconds passed, remaining 1 predicted)
Rewrite ead226bc0b53c5d210f2326ae871b0fea3004df3 (7/14) (1 seconds passed, remaining 1 predicted)
Rewrite 5b6cb848f343668f1f75c3258a59d12c1680d67f (7/14) (1 seconds passed, remaining 1 predicted)
Ref 'refs/heads/branch' was rewritten
ok 35 - prune empty works even without index/tree filters
expecting success:
git rev-list branch-no-a >expect &&
git branch testing H &&
git filter-branch -f --prune-empty --index-filter "git update-index --remove A.t" testing &&
git rev-list testing >actual &&
git branch -D testing &&
test_cmp expect actual
Rewrite 0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050 (1/9) (0 seconds passed, remaining 0 predicted)
Rewrite e86e54590a6764f0c4219b3fe8b5e971cd5a0ed8 (2/9) (0 seconds passed, remaining 0 predicted)
Rewrite bd662c15882f4e7910b78fc26a3d8fe1ffa802e5 (3/9) (0 seconds passed, remaining 0 predicted)
Rewrite 3abb9b554927997a06e6fafc3c62469a75ef32a3 (4/9) (0 seconds passed, remaining 0 predicted)
Rewrite 48ac83b9774bbddb9c1cd6fe140d5380297aa69c (5/9) (0 seconds passed, remaining 0 predicted)
Rewrite 0e63577b8a9dce52b69167d9c008f6a0e30de818 (6/9) (0 seconds passed, remaining 0 predicted)
Rewrite 013e089e8403f3749848f7aafc6f271fb7179dbc (7/9) (0 seconds passed, remaining 0 predicted)
Rewrite 3c39262d23e70569701d337b4d27a1e97512c2d9 (8/9) (1 seconds passed, remaining 0 predicted)
Rewrite 110eac945dc1713b27bdf49e74e5805db66971f0 (8/9) (1 seconds passed, remaining 0 predicted)
Ref 'refs/heads/testing' was rewritten
Deleted branch testing (was 00fc75b).
ok 36 - --prune-empty is able to prune root commit
expecting success:
git branch prune-entire B &&
git filter-branch -f --prune-empty --index-filter "git update-index --remove A.t B.t" prune-entire &&
test_path_is_missing .git/refs/heads/prune-entire &&
test_must_fail git reflog exists refs/heads/prune-entire
Rewrite 0ddfaf193ff13d6ab39b7cbd9eed645e3ee2f050 (1/2) (0 seconds passed, remaining 0 predicted)
Rewrite e86e54590a6764f0c4219b3fe8b5e971cd5a0ed8 (2/2) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/prune-entire' was deleted
ok 37 - --prune-empty is able to prune entire branch
expecting success:
git checkout master &&
git reset --hard A &&
test_commit add-foo foo 1 &&
git branch moved-foo &&
test_commit add-bar bar a &&
git branch invariant &&
orig_invariant=$(git rev-parse invariant) &&
git branch moved-bar &&
test_commit change-foo foo 2 &&
git filter-branch -f --remap-to-ancestor \
moved-foo moved-bar A..master \
-- -- foo &&
test $(git rev-parse moved-foo) = $(git rev-parse moved-bar) &&
test $(git rev-parse moved-foo) = $(git rev-parse master^) &&
test $orig_invariant = $(git rev-parse invariant)
Switched to branch 'master'
HEAD is now at 0ddfaf1 A
[master 7d21991] add-foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
[master 2ff770b] add-bar
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
[master b2d4813] change-foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rewrite 7d219912875c3b539add35fdb1e3d70e5572ca7c (1/2) (0 seconds passed, remaining 0 predicted)
Rewrite b2d4813d3ebe523582008cb287d933f8c14917be (2/2) (0 seconds passed, remaining 0 predicted)
WARNING: Ref 'refs/heads/moved-foo' is unchanged
Ref 'refs/heads/moved-bar' was rewritten
Ref 'refs/heads/master' was rewritten
ok 38 - --remap-to-ancestor with filename filters
expecting success:
git checkout master &&
git reset --hard A &&
test_commit add-foo2 foo 1 &&
git branch moved-foo2 &&
test_commit add-bar2 bar a &&
git branch invariant2 &&
orig_invariant=$(git rev-parse invariant2) &&
git branch moved-bar2 &&
test_commit change-foo2 foo 2 &&
git filter-branch -f \
moved-foo2 moved-bar2 A..master \
-- -- foo &&
test $(git rev-parse moved-foo2) = $(git rev-parse moved-bar2) &&
test $(git rev-parse moved-foo2) = $(git rev-parse master^) &&
test $orig_invariant = $(git rev-parse invariant2)
Already on 'master'
HEAD is now at 0ddfaf1 A
[master 59b5b5a] add-foo2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo
[master 20d4afa] add-bar2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar
[master 1fe7e14] change-foo2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Rewrite 59b5b5af49738cc3e3cc6618c173c3d768334f67 (1/2) (0 seconds passed, remaining 0 predicted)
Rewrite 1fe7e1483a7337eb5fecbd426d19506d3422d75d (2/2) (0 seconds passed, remaining 0 predicted)
WARNING: Ref 'refs/heads/moved-foo2' is unchanged
Ref 'refs/heads/moved-bar2' was rewritten
Ref 'refs/heads/master' was rewritten
ok 39 - automatic remapping to ancestor with filename filters
expecting success:
rm -fr ?* .git &&
git init &&
test_commit file &&
mkdir submod &&
submodurl="$PWD/submod" &&
( cd submod &&
git init &&
test_commit file-in-submod ) &&
git submodule add "$submodurl" &&
git commit -m "added submodule" &&
test_commit add-file &&
( cd submod && test_commit add-in-submodule ) &&
git add submod &&
git commit -m "changed submodule" &&
git branch original HEAD
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7003-filter-branch/.git/
[master (root-commit) cc5d755] file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7003-filter-branch/submod/.git/
[master (root-commit) bd0b946] file-in-submod
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file-in-submod.t
Adding existing repo at 'submod' to the index
[master 3881b40] added submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 submod
[master a55f90a] add-file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 add-file.t
[master bf0f869] add-in-submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 add-in-submodule.t
[master 72c18f2] changed submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 40 - setup submodule
expecting success:
git filter-branch --tree-filter "test -d submod && {
rm -rf submod &&
git rm -rf --quiet submod &&
mkdir submod &&
: > submod/file
} || :" HEAD &&
test $orig_head != $(git show-ref --hash --head HEAD)
Rewrite cc5d7558673710c1da61856fa53718f4fe4029c5 (1/4) (0 seconds passed, remaining 0 predicted)
Rewrite 3881b403bca14f89f498004ebc18215549e57321 (2/4) (0 seconds passed, remaining 0 predicted)
Rewrite a55f90a1763a8f25b54c4c3c382060ba2d956e42 (3/4) (0 seconds passed, remaining 0 predicted)
Rewrite 72c18f29119e806113ed5df35686aaf9075908db (4/4) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/master' was rewritten
warning: unable to rmdir 'submod': Directory not empty
ok 41 - rewrite submodule with another content
expecting success:
git reset --hard original &&
git filter-branch -f --tree-filter \
"if git ls-files --error-unmatch -- submod > /dev/null 2>&1
then git update-index --cacheinfo 160000 0123456789012345678901234567890123456789 submod
fi" HEAD &&
test $orig_head != $(git show-ref --hash --head HEAD)
HEAD is now at 72c18f2 changed submodule
Rewrite cc5d7558673710c1da61856fa53718f4fe4029c5 (1/4) (0 seconds passed, remaining 0 predicted)
Rewrite 3881b403bca14f89f498004ebc18215549e57321 (2/4) (0 seconds passed, remaining 0 predicted)
Rewrite a55f90a1763a8f25b54c4c3c382060ba2d956e42 (3/4) (0 seconds passed, remaining 0 predicted)
Rewrite 72c18f29119e806113ed5df35686aaf9075908db (4/4) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/master' was rewritten
ok 42 - replace submodule revision
expecting success:
git reset --hard original &&
commit=$(printf "no newline" | git commit-tree HEAD^{tree}) &&
git update-ref refs/heads/no-newline $commit &&
git filter-branch -f refs/heads/no-newline &&
echo $commit >expect &&
git rev-parse refs/heads/no-newline >actual &&
test_cmp expect actual
HEAD is now at 72c18f2 changed submodule
Rewrite d3d062daddf8366eef780c9b2b6257a1baffd855 (1/1) (0 seconds passed, remaining 0 predicted)
WARNING: Ref 'refs/heads/no-newline' is unchanged
ok 43 - filter commit message without trailing newline
expecting success:
test_when_finished "git reset --hard original" &&
ambiguous=$(git rev-list -1 HEAD) &&
git filter-branch --tree-filter "mv file.t $ambiguous" HEAD^.. &&
git show HEAD:$ambiguous
Rewrite 72c18f29119e806113ed5df35686aaf9075908db (1/1) (0 seconds passed, remaining 0 predicted)
Ref 'refs/heads/master' was rewritten
file
HEAD is now at 72c18f2 changed submodule
ok 44 - tree-filter deals with object name vs pathname ambiguity
expecting success:
test_when_finished "git reset --hard original" &&
tree=$(git rev-parse HEAD^{tree}) &&
test_when_finished "git replace -d $tree" &&
echo A >new &&
git add new &&
new_tree=$(git write-tree) &&
git replace $tree $new_tree &&
git tag -a -m "tag to a tree" treetag $new_tree &&
git reset --hard HEAD &&
git filter-branch -f -- --all >filter-output 2>&1 &&
! fgrep fatal filter-output
HEAD is now at 72c18f2 changed submodule
Deleted replace ref '7af7bfc750dda177151ae12902b78ecba62279d0'
HEAD is now at 72c18f2 changed submodule
ok 45 - rewrite repository including refs that point at non-commit object
# passed all 45 test(s)
1..45
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7106-reset-unborn-branch.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7106-reset-unborn-branch/.git/
expecting success:
echo a >a &&
echo b >b
ok 1 - setup
expecting success:
git add a b &&
git reset &&
git ls-files >actual &&
test_must_be_empty actual
ok 2 - reset
expecting success:
rm .git/index &&
git add a b &&
test_must_fail git reset HEAD
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
ok 3 - reset HEAD
expecting success:
rm .git/index &&
git add a b &&
git reset a &&
echo b >expect &&
git ls-files >actual &&
test_cmp expect actual
ok 4 - reset $file
expecting success:
rm .git/index &&
git add a &&
echo y >yes &&
git reset -p <yes >output &&
git ls-files >actual &&
test_must_be_empty actual &&
test_i18ngrep "Unstage" output
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Unstage this hunk [y,n,q,a,d,e,?]?
ok 5 - reset -p
expecting success:
rm .git/index &&
git add a &&
git reset --soft &&
echo a >expect &&
git ls-files >actual &&
test_cmp expect actual
ok 6 - reset --soft is a no-op
expecting success:
rm .git/index &&
git add a &&
test_when_finished "echo a >a" &&
git reset --hard &&
git ls-files >actual &&
test_must_be_empty actual &&
test_path_is_missing a
ok 7 - reset --hard
# passed all 7 test(s)
1..7
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7105-reset-patch.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7105-reset-patch/.git/
expecting success:
mkdir dir &&
echo parent > dir/foo &&
echo dummy > bar &&
git add dir &&
git commit -m initial &&
test_tick &&
test_commit second dir/foo head &&
set_and_save_state bar bar_work bar_index &&
save_head
[master (root-commit) a13d53b] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 dir/foo
[master 66d1df3] second
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup
expecting success:
set_and_save_state dir/foo work work &&
test_write_lines n n | git reset -p &&
verify_saved_state dir/foo &&
verify_saved_state bar
diff --git a/bar b/bar
new file mode 100644
index 0000000..7780244
--- /dev/null
+++ b/bar
@@ -0,0 +1 @@
+bar_index
Unstage this hunk [y,n,q,a,d,e,?]?
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Unstage this hunk [y,n,q,a,d,e,?]?
ok 2 - saying "n" does nothing
expecting success:
test_write_lines n y | git reset -p >output &&
verify_state dir/foo work head &&
verify_saved_state bar &&
test_i18ngrep "Unstage" output
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Unstage this hunk [y,n,q,a,d,e,?]?
Unstage this hunk [y,n,q,a,d,e,?]?
ok 3 - git reset -p
expecting success:
test_write_lines n y | git reset -p HEAD^ >output &&
verify_state dir/foo work parent &&
verify_saved_state bar &&
test_i18ngrep "Apply" output
Apply deletion to index [y,n,q,a,d,?]?
Apply this hunk to index [y,n,q,a,d,e,?]?
ok 4 - git reset -p HEAD^
expecting success:
set_state dir/foo work work &&
test_write_lines y n | git reset -p dir &&
verify_state dir/foo work head &&
verify_saved_state bar
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Unstage this hunk [y,n,q,a,d,e,?]?
ok 5 - git reset -p dir
expecting success:
set_state dir/foo work work &&
test_write_lines y n | (cd dir && git reset -p -- foo) &&
verify_state dir/foo work head &&
verify_saved_state bar
diff --git a/dir/foo b/dir/foo
index 564b12f..b8f99f5 100644
--- a/dir/foo
+++ b/dir/foo
@@ -1 +1 @@
-head
+work
Unstage this hunk [y,n,q,a,d,e,?]?
ok 6 - git reset -p -- foo (inside dir)
expecting success:
test_write_lines y n | git reset -p HEAD^ -- dir &&
verify_state dir/foo work parent &&
verify_saved_state bar
diff --git b/dir/foo a/dir/foo
index 564b12f..9676f5b 100644
--- b/dir/foo
+++ a/dir/foo
@@ -1 +1 @@
-head
+parent
Apply this hunk to index [y,n,q,a,d,e,?]?
ok 7 - git reset -p HEAD^ -- dir
expecting success:
verify_saved_head
ok 8 - none of this moved HEAD
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7110-reset-merge.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7110-reset-merge/.git/
expecting success:
for i in 1 2 3; do echo line $i; done >file1 &&
cat file1 >file2 &&
git add file1 file2 &&
test_tick &&
git commit -m "Initial commit" &&
git tag initial &&
echo line 4 >>file1 &&
cat file1 >file2 &&
test_tick &&
git commit -m "add line 4 to file1" file1 &&
git tag second
[master (root-commit) 294b13e] Initial commit
Author: A U Thor <author@example.com>
2 files changed, 6 insertions(+)
create mode 100644 file1
create mode 100644 file2
[master 91b6f65] add line 4 to file1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 1 - setup
expecting success:
git reset --merge HEAD^ &&
! grep 4 file1 &&
grep 4 file2 &&
test "$(git rev-parse HEAD)" = "$(git rev-parse initial)" &&
test -z "$(git diff --cached)"
line 4
ok 2 - reset --merge is ok with changes in file it does not touch
expecting success:
git reset --merge second &&
grep 4 file1 &&
grep 4 file2 &&
test "$(git rev-parse HEAD)" = "$(git rev-parse second)" &&
test -z "$(git diff --cached)"
line 4
line 4
ok 3 - reset --merge is ok when switching back
expecting success:
git reset --hard second &&
cat file1 >file2 &&
git reset --keep HEAD^ &&
! grep 4 file1 &&
grep 4 file2 &&
test "$(git rev-parse HEAD)" = "$(git rev-parse initial)" &&
test -z "$(git diff --cached)"
HEAD is now at 91b6f65 add line 4 to file1
line 4
ok 4 - reset --keep is ok with changes in file it does not touch
expecting success:
git reset --keep second &&
grep 4 file1 &&
grep 4 file2 &&
test "$(git rev-parse HEAD)" = "$(git rev-parse second)" &&
test -z "$(git diff --cached)"
line 4
line 4
ok 5 - reset --keep is ok when switching back
expecting success:
git reset --hard second &&
cat file1 >file2 &&
echo "line 5" >> file1 &&
git add file1 &&
git reset --merge HEAD^ &&
! grep 4 file1 &&
! grep 5 file1 &&
grep 4 file2 &&
test "$(git rev-parse HEAD)" = "$(git rev-parse initial)" &&
test -z "$(git diff --cached)"
HEAD is now at 91b6f65 add line 4 to file1
line 4
ok 6 - reset --merge discards changes added to index (1)
expecting success:
git reset --hard initial &&
echo "line 5" >> file2 &&
git add file2 &&
git reset --merge second &&
! grep 4 file2 &&
! grep 5 file1 &&
grep 4 file1 &&
test "$(git rev-parse HEAD)" = "$(git rev-parse second)" &&
test -z "$(git diff --cached)"
HEAD is now at 294b13e Initial commit
line 4
ok 7 - reset --merge is ok again when switching back (1)
expecting success:
git reset --hard second &&
echo "line 5" >> file1 &&
git add file1 &&
test_must_fail git reset --keep HEAD^
HEAD is now at 91b6f65 add line 4 to file1
error: Entry 'file1' would be overwritten by merge. Cannot merge.
fatal: Could not reset index file to revision 'HEAD^'.
ok 8 - reset --keep fails with changes in index in files it touches
expecting success:
git reset --hard second &&
echo "line 4" >> file2 &&
git add file2 &&
git reset --merge HEAD^ &&
! grep 4 file2 &&
test "$(git rev-parse HEAD)" = "$(git rev-parse initial)" &&
test -z "$(git diff)" &&
test -z "$(git diff --cached)"
HEAD is now at 91b6f65 add line 4 to file1
ok 9 - reset --merge discards changes added to index (2)
expecting success:
git reset --hard initial &&
git reset --merge second &&
! grep 4 file2 &&
grep 4 file1 &&
test "$(git rev-parse HEAD)" = "$(git rev-parse second)" &&
test -z "$(git diff --cached)"
HEAD is now at 294b13e Initial commit
line 4
ok 10 - reset --merge is ok again when switching back (2)
expecting success:
git reset --hard second &&
echo "line 4" >> file2 &&
git add file2 &&
git reset --keep HEAD^ &&
grep 4 file2 &&
test "$(git rev-parse HEAD)" = "$(git rev-parse initial)" &&
test -z "$(git diff --cached)"
HEAD is now at 91b6f65 add line 4 to file1
line 4
ok 11 - reset --keep keeps changes it does not touch
expecting success:
git reset --keep second &&
grep 4 file2 &&
grep 4 file1 &&
test "$(git rev-parse HEAD)" = "$(git rev-parse second)" &&
test -z "$(git diff --cached)"
line 4
line 4
ok 12 - reset --keep keeps changes when switching back
expecting success:
git reset --hard second &&
echo "line 5" >> file1 &&
test_tick &&
git commit -m "add line 5" file1 &&
sed -e "s/line 1/changed line 1/" <file1 >file3 &&
mv file3 file1 &&
test_must_fail git reset --merge HEAD^ 2>err.log &&
grep file1 err.log | grep "not uptodate"
HEAD is now at 91b6f65 add line 4 to file1
[master 7799e7c] add line 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
error: Entry 'file1' not uptodate. Cannot merge.
ok 13 - reset --merge fails with changes in file it touches
expecting success:
git reset --hard second &&
echo "line 5" >> file1 &&
test_tick &&
git commit -m "add line 5" file1 &&
sed -e "s/line 1/changed line 1/" <file1 >file3 &&
mv file3 file1 &&
test_must_fail git reset --keep HEAD^ 2>err.log &&
grep file1 err.log | grep "not uptodate"
HEAD is now at 91b6f65 add line 4 to file1
[master f1894d3] add line 5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
error: Entry 'file1' not uptodate. Cannot merge.
ok 14 - reset --keep fails with changes in file it touches
expecting success:
git reset --hard second &&
git branch branch1 &&
git branch branch2 &&
git branch branch3 &&
git checkout branch1 &&
echo "line 5 in branch1" >> file1 &&
test_tick &&
git commit -a -m "change in branch1" &&
git checkout branch2 &&
echo "line 5 in branch2" >> file1 &&
test_tick &&
git commit -a -m "change in branch2" &&
git tag third &&
git checkout branch3 &&
echo a new file >file3 &&
rm -f file1 &&
git add file3 &&
test_tick &&
git commit -a -m "change in branch3"
HEAD is now at 91b6f65 add line 4 to file1
Switched to branch 'branch1'
[branch1 4afd189] change in branch1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'branch2'
[branch2 077fd6d] change in branch2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'branch3'
[branch3 05419f2] change in branch3
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 4 deletions(-)
delete mode 100644 file1
create mode 100644 file3
ok 15 - setup 3 different branches
expecting success:
git checkout third &&
test_must_fail git merge branch1 &&
git reset --merge HEAD^ &&
test "$(git rev-parse HEAD)" = "$(git rev-parse second)" &&
test -z "$(git diff --cached)" &&
test -z "$(git diff)"
Note: switching to 'third'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 077fd6d change in branch2
Merging:
077fd6d change in branch2
virtual branch1
found 1 common ancestor:
91b6f65 add line 4 to file1
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Automatic merge failed; fix conflicts and then commit the result.
ok 16 - "reset --merge HEAD^" is ok with pending merge
expecting success:
git reset --hard third &&
test_must_fail git merge branch1 &&
test_must_fail git reset --keep HEAD^ 2>err.log &&
test_i18ngrep "middle of a merge" err.log
HEAD is now at 077fd6d change in branch2
Merging:
077fd6d change in branch2
virtual branch1
found 1 common ancestor:
91b6f65 add line 4 to file1
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Automatic merge failed; fix conflicts and then commit the result.
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: Cannot do a keep reset in the middle of a merge.
ok 17 - "reset --keep HEAD^" fails with pending merge
expecting success:
git reset --hard third &&
test_must_fail git merge branch1 &&
git reset --merge HEAD &&
test "$(git rev-parse HEAD)" = "$(git rev-parse third)" &&
test -z "$(git diff --cached)" &&
test -z "$(git diff)"
HEAD is now at 077fd6d change in branch2
Merging:
077fd6d change in branch2
virtual branch1
found 1 common ancestor:
91b6f65 add line 4 to file1
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Automatic merge failed; fix conflicts and then commit the result.
ok 18 - "reset --merge HEAD" is ok with pending merge
expecting success:
git reset --hard third &&
test_must_fail git merge branch1 &&
test_must_fail git reset --keep HEAD 2>err.log &&
test_i18ngrep "middle of a merge" err.log
HEAD is now at 077fd6d change in branch2
Merging:
077fd6d change in branch2
virtual branch1
found 1 common ancestor:
91b6f65 add line 4 to file1
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Automatic merge failed; fix conflicts and then commit the result.
fatal: Cannot do a keep reset in the middle of a merge.
ok 19 - "reset --keep HEAD" fails with pending merge
expecting success:
git reset --hard third &&
rm -f file2 &&
test_must_fail git merge branch3 &&
! test -f file2 &&
test -f file3 &&
git diff --exit-code file3 &&
git diff --exit-code branch3 file3 &&
git reset --merge HEAD &&
! test -f file3 &&
! test -f file2 &&
git diff --exit-code --cached
HEAD is now at 077fd6d change in branch2
Merging:
077fd6d change in branch2
virtual branch3
found 1 common ancestor:
91b6f65 add line 4 to file1
CONFLICT (modify/delete): file1 deleted in branch3 and modified in HEAD. Version HEAD of file1 left in tree.
Automatic merge failed; fix conflicts and then commit the result.
ok 20 - --merge is ok with added/deleted merge
expecting success:
git reset --hard third &&
rm -f file2 &&
test_must_fail git merge branch3 &&
! test -f file2 &&
test -f file3 &&
git diff --exit-code file3 &&
git diff --exit-code branch3 file3 &&
test_must_fail git reset --keep HEAD 2>err.log &&
test_i18ngrep "middle of a merge" err.log
HEAD is now at 077fd6d change in branch2
Merging:
077fd6d change in branch2
virtual branch3
found 1 common ancestor:
91b6f65 add line 4 to file1
CONFLICT (modify/delete): file1 deleted in branch3 and modified in HEAD. Version HEAD of file1 left in tree.
Automatic merge failed; fix conflicts and then commit the result.
fatal: Cannot do a keep reset in the middle of a merge.
ok 21 - --keep fails with added/deleted merge
# passed all 21 test(s)
1..21
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7111-reset-table.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7111-reset-table/.git/
expecting success:
test_commit E file1 &&
test_commit D file1 &&
test_commit C file1
[master (root-commit) 8464dc0] E
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1
[master 2131783] D
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 4bb0b07] C
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - creating initial commits
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
ok 2 - check: A B C D --soft A B D
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
Unstaged changes after reset:
M file1
ok 3 - check: A B C D --mixed A D D
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
HEAD is now at 2131783 D
ok 4 - check: A B C D --hard D D D
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
error: Entry 'file1' not uptodate. Cannot merge.
fatal: Could not reset index file to revision 'D'.
ok 5 - check: A B C D --merge XXXXX
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
error: Entry 'file1' would be overwritten by merge. Cannot merge.
fatal: Could not reset index file to revision 'D'.
ok 6 - check: A B C D --keep XXXXX
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
ok 7 - check: A B C C --soft A B C
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
Unstaged changes after reset:
M file1
ok 8 - check: A B C C --mixed A C C
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
HEAD is now at 4bb0b07 C
ok 9 - check: A B C C --hard C C C
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
error: Entry 'file1' not uptodate. Cannot merge.
fatal: Could not reset index file to revision 'C'.
ok 10 - check: A B C C --merge XXXXX
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
ok 11 - check: A B C C --keep A C C
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
ok 12 - check: B B C D --soft B B D
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
Unstaged changes after reset:
M file1
ok 13 - check: B B C D --mixed B D D
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
HEAD is now at 2131783 D
ok 14 - check: B B C D --hard D D D
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
ok 15 - check: B B C D --merge D D D
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
error: Entry 'file1' would be overwritten by merge. Cannot merge.
fatal: Could not reset index file to revision 'D'.
ok 16 - check: B B C D --keep XXXXX
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
ok 17 - check: B B C C --soft B B C
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
Unstaged changes after reset:
M file1
ok 18 - check: B B C C --mixed B C C
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
HEAD is now at 4bb0b07 C
ok 19 - check: B B C C --hard C C C
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
ok 20 - check: B B C C --merge C C C
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
ok 21 - check: B B C C --keep B C C
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
ok 22 - check: B C C D --soft B C D
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
Unstaged changes after reset:
M file1
ok 23 - check: B C C D --mixed B D D
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
HEAD is now at 2131783 D
ok 24 - check: B C C D --hard D D D
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
error: Entry 'file1' not uptodate. Cannot merge.
fatal: Could not reset index file to revision 'D'.
ok 25 - check: B C C D --merge XXXXX
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
error: Entry 'file1' not uptodate. Cannot merge.
fatal: Could not reset index file to revision 'D'.
ok 26 - check: B C C D --keep XXXXX
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
ok 27 - check: B C C C --soft B C C
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
Unstaged changes after reset:
M file1
ok 28 - check: B C C C --mixed B C C
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
HEAD is now at 4bb0b07 C
ok 29 - check: B C C C --hard C C C
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
ok 30 - check: B C C C --merge B C C
expecting success:
git reset --hard C &&
if test "$I1" != "$H1"
then
echo "$I1" >file1 &&
git add file1
fi &&
if test "$W1" != "$I1"
then
echo "$W1" >file1
fi &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
test "$(cat file1)" = "$W2" &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at 4bb0b07 C
ok 31 - check: B C C C --keep B C C
expecting success:
git reset --hard C &&
git branch branch1 &&
git branch branch2 &&
git checkout branch1 &&
test_commit B1 file1 &&
git checkout branch2 &&
test_commit B file1
HEAD is now at 4bb0b07 C
Switched to branch 'branch1'
[branch1 5456cd2] B1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'branch2'
[branch2 aa272d3] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 32 - setting up branches to test with unmerged entries
expecting success:
git reset --hard B &&
test_must_fail git merge branch1 &&
cat file1 >X_file1 &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
if test "$W2" = "X"
then
test_cmp file1 X_file1
else
test "$(cat file1)" = "$W2"
fi &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at aa272d3 B
Merging:
aa272d3 B
virtual branch1
found 1 common ancestor:
4bb0b07 C
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Automatic merge failed; fix conflicts and then commit the result.
fatal: Cannot do a soft reset in the middle of a merge.
ok 33 - check: X U B C --soft XXXXX
expecting success:
git reset --hard B &&
test_must_fail git merge branch1 &&
cat file1 >X_file1 &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
if test "$W2" = "X"
then
test_cmp file1 X_file1
else
test "$(cat file1)" = "$W2"
fi &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at aa272d3 B
Merging:
aa272d3 B
virtual branch1
found 1 common ancestor:
4bb0b07 C
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Automatic merge failed; fix conflicts and then commit the result.
Unstaged changes after reset:
M file1
ok 34 - check: X U B C --mixed X C C
expecting success:
git reset --hard B &&
test_must_fail git merge branch1 &&
cat file1 >X_file1 &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
if test "$W2" = "X"
then
test_cmp file1 X_file1
else
test "$(cat file1)" = "$W2"
fi &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at aa272d3 B
Merging:
aa272d3 B
virtual branch1
found 1 common ancestor:
4bb0b07 C
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at 4bb0b07 C
ok 35 - check: X U B C --hard C C C
expecting success:
git reset --hard B &&
test_must_fail git merge branch1 &&
cat file1 >X_file1 &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
if test "$W2" = "X"
then
test_cmp file1 X_file1
else
test "$(cat file1)" = "$W2"
fi &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at aa272d3 B
Merging:
aa272d3 B
virtual branch1
found 1 common ancestor:
4bb0b07 C
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Automatic merge failed; fix conflicts and then commit the result.
ok 36 - check: X U B C --merge C C C
expecting success:
git reset --hard B &&
test_must_fail git merge branch1 &&
cat file1 >X_file1 &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
if test "$W2" = "X"
then
test_cmp file1 X_file1
else
test "$(cat file1)" = "$W2"
fi &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at aa272d3 B
Merging:
aa272d3 B
virtual branch1
found 1 common ancestor:
4bb0b07 C
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Automatic merge failed; fix conflicts and then commit the result.
fatal: Cannot do a keep reset in the middle of a merge.
ok 37 - check: X U B C --keep XXXXX
expecting success:
git reset --hard B &&
test_must_fail git merge branch1 &&
cat file1 >X_file1 &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
if test "$W2" = "X"
then
test_cmp file1 X_file1
else
test "$(cat file1)" = "$W2"
fi &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at aa272d3 B
Merging:
aa272d3 B
virtual branch1
found 1 common ancestor:
4bb0b07 C
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Automatic merge failed; fix conflicts and then commit the result.
fatal: Cannot do a soft reset in the middle of a merge.
ok 38 - check: X U B B --soft XXXXX
expecting success:
git reset --hard B &&
test_must_fail git merge branch1 &&
cat file1 >X_file1 &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
if test "$W2" = "X"
then
test_cmp file1 X_file1
else
test "$(cat file1)" = "$W2"
fi &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at aa272d3 B
Merging:
aa272d3 B
virtual branch1
found 1 common ancestor:
4bb0b07 C
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Automatic merge failed; fix conflicts and then commit the result.
Unstaged changes after reset:
M file1
ok 39 - check: X U B B --mixed X B B
expecting success:
git reset --hard B &&
test_must_fail git merge branch1 &&
cat file1 >X_file1 &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
if test "$W2" = "X"
then
test_cmp file1 X_file1
else
test "$(cat file1)" = "$W2"
fi &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at aa272d3 B
Merging:
aa272d3 B
virtual branch1
found 1 common ancestor:
4bb0b07 C
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at aa272d3 B
ok 40 - check: X U B B --hard B B B
expecting success:
git reset --hard B &&
test_must_fail git merge branch1 &&
cat file1 >X_file1 &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
if test "$W2" = "X"
then
test_cmp file1 X_file1
else
test "$(cat file1)" = "$W2"
fi &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at aa272d3 B
Merging:
aa272d3 B
virtual branch1
found 1 common ancestor:
4bb0b07 C
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Automatic merge failed; fix conflicts and then commit the result.
ok 41 - check: X U B B --merge B B B
expecting success:
git reset --hard B &&
test_must_fail git merge branch1 &&
cat file1 >X_file1 &&
if test "$W2" != "XXXXX"
then
git reset --$opt $T &&
if test "$W2" = "X"
then
test_cmp file1 X_file1
else
test "$(cat file1)" = "$W2"
fi &&
git checkout-index -f -- file1 &&
test "$(cat file1)" = "$I2" &&
git checkout -f HEAD -- file1 &&
test "$(cat file1)" = "$H2"
else
test_must_fail git reset --$opt $T
fi
HEAD is now at aa272d3 B
Merging:
aa272d3 B
virtual branch1
found 1 common ancestor:
4bb0b07 C
Auto-merging file1
CONFLICT (content): Merge conflict in file1
Automatic merge failed; fix conflicts and then commit the result.
fatal: Cannot do a keep reset in the middle of a merge.
ok 42 - check: X U B B --keep XXXXX
# passed all 42 test(s)
1..42
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7113-post-index-change-hook.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7113-post-index-change-hook/.git/
expecting success:
mkdir -p dir1 &&
touch dir1/file1.txt &&
echo testing >dir1/file2.txt &&
git add . &&
git commit -m "initial"
[master (root-commit) a604016] initial
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 100644 dir1/file1.txt
create mode 100644 dir1/file2.txt
ok 1 - setup
expecting success:
mkdir -p .git/hooks &&
write_script .git/hooks/post-index-change <<-\EOF &&
if test "$1" -eq 1; then
echo "Invalid combination of flags passed to hook; updated_workdir is set." >testfailure
exit 1
fi
if test "$2" -eq 1; then
echo "Invalid combination of flags passed to hook; updated_skipworktree is set." >testfailure
exit 1
fi
if test -f ".git/index.lock"; then
echo ".git/index.lock exists" >testfailure
exit 3
fi
if ! test -f ".git/index"; then
echo ".git/index does not exist" >testfailure
exit 3
fi
echo "success" >testsuccess
EOF
mkdir -p dir2 &&
touch dir2/file1.txt &&
touch dir2/file2.txt &&
: force index to be dirty &&
test-tool chmtime +60 dir1/file1.txt &&
git status &&
test_path_is_file testsuccess && rm -f testsuccess &&
test_path_is_missing testfailure &&
git add . &&
test_path_is_file testsuccess && rm -f testsuccess &&
test_path_is_missing testfailure &&
git commit -m "second" &&
test_path_is_file testsuccess && rm -f testsuccess &&
test_path_is_missing testfailure &&
git checkout -- dir1/file1.txt &&
test_path_is_file testsuccess && rm -f testsuccess &&
test_path_is_missing testfailure &&
git update-index &&
test_path_is_missing testsuccess &&
test_path_is_missing testfailure &&
git reset --soft &&
test_path_is_missing testsuccess &&
test_path_is_missing testfailure
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
dir2/
nothing added to commit but untracked files present (use "git add" to track)
[master 8494e4e] second
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 dir2/file1.txt
create mode 100644 dir2/file2.txt
ok 2 - test status, add, commit, others trigger hook without flags set
expecting success:
write_script .git/hooks/post-index-change <<-\EOF &&
if test "$1" -eq 1 && test "$2" -eq 1; then
echo "Invalid combination of flags passed to hook; updated_workdir and updated_skipworktree are both set." >testfailure
exit 1
fi
if test "$1" -eq 0 && test "$2" -eq 0; then
echo "Invalid combination of flags passed to hook; neither updated_workdir or updated_skipworktree are set." >testfailure
exit 2
fi
if test "$1" -eq 1; then
if test -f ".git/index.lock"; then
echo "updated_workdir set but .git/index.lock exists" >testfailure
exit 3
fi
if ! test -f ".git/index"; then
echo "updated_workdir set but .git/index does not exist" >testfailure
exit 3
fi
else
echo "update_workdir should be set for checkout" >testfailure
exit 4
fi
echo "success" >testsuccess
EOF
: force index to be dirty &&
test-tool chmtime +60 dir1/file1.txt &&
git checkout master &&
test_path_is_file testsuccess && rm -f testsuccess &&
test_path_is_missing testfailure &&
test-tool chmtime +60 dir1/file1.txt &&
git checkout HEAD &&
test_path_is_file testsuccess && rm -f testsuccess &&
test_path_is_missing testfailure &&
test-tool chmtime +60 dir1/file1.txt &&
git reset --hard &&
test_path_is_file testsuccess && rm -f testsuccess &&
test_path_is_missing testfailure &&
git checkout -B test &&
test_path_is_file testsuccess && rm -f testsuccess &&
test_path_is_missing testfailure
Already on 'master'
HEAD is now at 8494e4e second
Switched to a new branch 'test'
ok 3 - test checkout and reset trigger the hook
expecting success:
write_script .git/hooks/post-index-change <<-\EOF &&
if test "$1" -eq 1 && test "$2" -eq 1; then
echo "Invalid combination of flags passed to hook; updated_workdir and updated_skipworktree are both set." >testfailure
exit 1
fi
if test "$1" -eq 0 && test "$2" -eq 0; then
echo "Invalid combination of flags passed to hook; neither updated_workdir or updated_skipworktree are set." >testfailure
exit 2
fi
if test "$2" -eq 1; then
if test -f ".git/index.lock"; then
echo "updated_skipworktree set but .git/index.lock exists" >testfailure
exit 3
fi
if ! test -f ".git/index"; then
echo "updated_skipworktree set but .git/index does not exist" >testfailure
exit 3
fi
else
echo "updated_skipworktree should be set for reset --mixed and update-index" >testfailure
exit 4
fi
echo "success" >testsuccess
EOF
: force index to be dirty &&
test-tool chmtime +60 dir1/file1.txt &&
git reset --mixed --quiet HEAD~1 &&
test_path_is_file testsuccess && rm -f testsuccess &&
test_path_is_missing testfailure &&
git hash-object -w --stdin <dir1/file2.txt >expect &&
git update-index --cacheinfo 100644 "$(cat expect)" dir1/file1.txt &&
test_path_is_file testsuccess && rm -f testsuccess &&
test_path_is_missing testfailure &&
git update-index --skip-worktree dir1/file2.txt &&
git update-index --remove dir1/file2.txt &&
test_path_is_file testsuccess && rm -f testsuccess &&
test_path_is_missing testfailure
ok 4 - test reset --mixed and update-index triggers the hook
# passed all 4 test(s)
1..4
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7006-pager.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7006-pager/.git/
expecting success:
test_might_fail git config --unset core.pager &&
less=$(
unset PAGER GIT_PAGER;
git var GIT_PAGER
) &&
test -n "$less"
ok 1 - determine default pager
expecting success:
sane_unset GIT_PAGER GIT_PAGER_IN_USE &&
test_unconfig core.pager &&
PAGER="cat >paginated.out" &&
export PAGER &&
test_commit initial
[master (root-commit) 24b24cf] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
ok 2 - setup
checking prerequisite: TTY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq PERL &&
# Reading from the pty master seems to get stuck _sometimes_
# on Mac OS X 10.5.0, using Perl 5.10.0 or 5.8.9.
#
# Reproduction recipe: run
#
# i=0
# while ./test-terminal.perl echo hi $i
# do
# : $((i = $i + 1))
# done
#
# After 2000 iterations or so it hangs.
# https://rt.cpan.org/Ticket/Display.html?id=65692
#
test "$(uname -s)" != Darwin &&
perl "$TEST_DIRECTORY"/test-terminal.perl \
sh -c "test -t 1 && test -t 2"
)
prerequisite TTY ok
expecting success:
rm -f paginated.out &&
test_terminal git log &&
test -e paginated.out
ok 3 - some commands use a pager
checking known breakage:
echo subdir/paginated.out >expected &&
mkdir -p subdir &&
rm -f paginated.out subdir/paginated.out &&
(
cd subdir &&
test_terminal git log
) &&
{
ls paginated.out subdir/paginated.out ||
:
} >actual &&
test_cmp expected actual
ls: cannot access 'subdir/paginated.out': No such file or directory
--- expected 2019-08-14 07:34:37.236079428 +0000
+++ actual 2019-08-14 07:34:37.644083608 +0000
@@ -1 +1 @@
-subdir/paginated.out
+paginated.out
not ok 4 - pager runs from subdir # TODO known breakage
expecting success:
(
sane_unset LESS LV &&
PAGER="env >pager-env.out; wc" &&
export PAGER &&
test_terminal git log
) &&
grep ^LESS= pager-env.out &&
grep ^LV= pager-env.out
5 20 230
LESS=FRX
LV=-c
ok 5 - LESS and LV envvars are set for pagination
expecting success:
(
sane_unset LESS LV &&
PAGER="env >pager-env.out; wc" &&
export PAGER &&
PATH="$(git --exec-path):$PATH" &&
export PATH &&
test_terminal sh -c ". git-sh-setup && git_pager"
) &&
grep ^LESS= pager-env.out &&
grep ^LV= pager-env.out
0 0 0
LESS=FRX
LV=-c
ok 6 - LESS and LV envvars set by git-sh-setup
expecting success:
rm -f paginated.out &&
test_terminal git rev-list HEAD &&
! test -e paginated.out
24b24cf8a829f5b8c30dfc018b0a459a2ccaf380
ok 7 - some commands do not use a pager
expecting success:
rm -f paginated.out &&
git log | cat &&
! test -e paginated.out
commit 24b24cf8a829f5b8c30dfc018b0a459a2ccaf380
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
initial
ok 8 - no pager when stdout is a pipe
expecting success:
rm -f paginated.out &&
git log >file &&
! test -e paginated.out
ok 9 - no pager when stdout is a regular file
expecting success:
rm -f paginated.out &&
test_terminal git --paginate rev-list HEAD &&
test -e paginated.out
ok 10 - git --paginate rev-list uses a pager
expecting success:
rm -f file paginated.out &&
git --paginate log | cat &&
! test -e paginated.out
commit 24b24cf8a829f5b8c30dfc018b0a459a2ccaf380
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
initial
ok 11 - no pager even with --paginate when stdout is a pipe
expecting success:
rm -f paginated.out &&
test_terminal git --no-pager log &&
! test -e paginated.out
[33mcommit 24b24cf8a829f5b8c30dfc018b0a459a2ccaf380[m[33m ([m[1;36mHEAD -> [m[1;32mmaster[m[33m, [m[1;33mtag: initial[m[33m)[m
Author: A U Thor <author@example.com>
Date: Thu Apr 7 15:13:13 2005 -0700
initial
ok 12 - no pager with --no-pager
expecting success:
rm -f paginated.out &&
test_unconfig pager.grep &&
test_terminal git grep initial &&
test -e paginated.out &&
rm -f paginated.out &&
test_config pager.grep false &&
test_terminal git grep initial &&
! test -e paginated.out
initial.t[36m:[m[1;31minitial[m
ok 13 - configuration can disable pager
expecting success:
rm -f paginated.out &&
mkdir -p subdir &&
test_config pager.bundle true &&
git bundle create test.bundle --all &&
rm -f paginated.out subdir/paginated.out &&
(
cd subdir &&
test_terminal git bundle unbundle ../test.bundle
) &&
{
test -e paginated.out ||
test -e subdir/paginated.out
}
ok 14 - configuration can enable pager (from subdir)
expecting success:
rm -f paginated.out &&
test_terminal git tag -l &&
test -e paginated.out
ok 15 - git tag -l defaults to paging
expecting success:
rm -f paginated.out &&
test_terminal git -c pager.tag=false tag -l &&
! test -e paginated.out
initial
ok 16 - git tag -l respects pager.tag
expecting success:
rm -f paginated.out &&
test_terminal git -c pager.tag --no-pager tag -l &&
! test -e paginated.out
initial
ok 17 - git tag -l respects --no-pager
expecting success:
# no args implies -l so this should page like -l
rm -f paginated.out &&
test_terminal git tag &&
test -e paginated.out
ok 18 - git tag with no args defaults to paging
expecting success:
# no args implies -l so this should page like -l
rm -f paginated.out &&
test_terminal git -c pager.tag=false tag &&
! test -e paginated.out
initial
died of signal 15 at /<<PKGBUILDDIR>>/t/test-terminal.perl line 35.
ok 19 - git tag with no args respects pager.tag
expecting success:
# --contains implies -l so this should page like -l
rm -f paginated.out &&
test_terminal git tag --contains &&
test -e paginated.out
ok 20 - git tag --contains defaults to paging
expecting success:
# --contains implies -l so this should page like -l
rm -f paginated.out &&
test_terminal git -c pager.tag=false tag --contains &&
! test -e paginated.out
initial
ok 21 - git tag --contains respects pager.tag
expecting success:
test_when_finished "git tag -d newtag" &&
rm -f paginated.out &&
test_terminal git tag -am message newtag &&
! test -e paginated.out
Deleted tag 'newtag' (was a052248)
ok 22 - git tag -a defaults to not paging
expecting success:
test_when_finished "git tag -d newtag" &&
rm -f paginated.out &&
test_terminal git -c pager.tag tag -am message newtag &&
! test -e paginated.out
Deleted tag 'newtag' (was a052248)
ok 23 - git tag -a ignores pager.tag
expecting success:
test_when_finished "git tag -d newtag" &&
rm -f paginated.out &&
test_terminal git --paginate tag -am message newtag &&
test -e paginated.out
Deleted tag 'newtag' (was a052248)
ok 24 - git tag -a respects --paginate
expecting success:
test_when_finished "git tag -d newtag" &&
rm -f paginated.out &&
test_terminal git -c pager.tag -c alias.t=tag t -am message newtag &&
! test -e paginated.out
Deleted tag 'newtag' (was a052248)
ok 25 - git tag as alias ignores pager.tag with -a
expecting success:
rm -f paginated.out &&
test_terminal git -c pager.tag=false -c alias.t=tag t -l &&
! test -e paginated.out
initial
ok 26 - git tag as alias respects pager.tag with -l
expecting success:
rm -f paginated.out &&
test_terminal git branch &&
test -e paginated.out
ok 27 - git branch defaults to paging
expecting success:
rm -f paginated.out &&
test_terminal git -c pager.branch=false branch &&
! test -e paginated.out
* [32mmaster[m
ok 28 - git branch respects pager.branch
expecting success:
rm -f paginated.out &&
test_terminal git --no-pager branch &&
! test -e paginated.out
* [32mmaster[m
died of signal 15 at /<<PKGBUILDDIR>>/t/test-terminal.perl line 35.
ok 29 - git branch respects --no-pager
expecting success:
rm -f paginated.out editor.used &&
write_script editor <<-\EOF &&
echo "New description" >"$1"
touch editor.used
EOF
EDITOR=./editor test_terminal git -c pager.branch branch --edit-description &&
! test -e paginated.out &&
test -e editor.used
hint: Waiting for your editor to close the file...
[Kok 30 - git branch --edit-description ignores pager.branch
expecting success:
rm -f paginated.out &&
git branch other &&
test_when_finished "git branch -D other" &&
test_terminal git -c pager.branch branch --set-upstream-to=other &&
test_when_finished "git branch --unset-upstream" &&
! test -e paginated.out
Branch 'master' set up to track local branch 'other'.
Deleted branch other (was 24b24cf).
ok 31 - git branch --set-upstream-to ignores pager.branch
expecting success:
rm -f paginated.out &&
test_terminal git -c pager.config config foo.bar bar &&
! test -e paginated.out
ok 32 - git config ignores pager.config when setting
expecting success:
rm -f paginated.out editor.used &&
write_script editor <<-\EOF &&
touch editor.used
EOF
EDITOR=./editor test_terminal git -c pager.config config --edit &&
! test -e paginated.out &&
test -e editor.used
hint: Waiting for your editor to close the file...
[Kok 33 - git config --edit ignores pager.config
expecting success:
rm -f paginated.out &&
test_terminal git -c pager.config config --get foo.bar &&
! test -e paginated.out
bar
ok 34 - git config --get ignores pager.config
expecting success:
rm -f paginated.out &&
test_terminal git -c http."https://foo.com/".bar=foo \
config --get-urlmatch http https://foo.com &&
test -e paginated.out
ok 35 - git config --get-urlmatch defaults to paging
expecting success:
rm -f paginated.out &&
test_terminal git -c pager.config=false config --get-all foo.bar &&
! test -e paginated.out
bar
ok 36 - git config --get-all respects pager.config
expecting success:
rm -f paginated.out &&
test_terminal git config --list &&
test -e paginated.out
ok 37 - git config --list defaults to paging
expecting success:
rm -f colorful.log colorless.log &&
git log --no-color >colorless.log &&
git log --color >colorful.log &&
! colorful colorless.log &&
colorful colorful.log
ok 38 - tests can detect color
expecting success:
rm -f colorless.log &&
test_config color.ui auto &&
git log >colorless.log &&
! colorful colorless.log
ok 39 - no color when stdout is a regular file
expecting success:
rm -f paginated.out &&
test_config color.ui auto &&
test_terminal git log &&
colorful paginated.out
ok 40 - color when writing to a pager
expecting success:
rm -f paginated.out &&
test_config color.ui auto &&
test_config color.pager false &&
test_terminal git log &&
! colorful paginated.out
ok 41 - colors are suppressed by color.pager
expecting success:
rm -f colorful.log &&
test_config color.ui auto &&
(
TERM=vt100 &&
GIT_PAGER_IN_USE=true &&
export TERM GIT_PAGER_IN_USE &&
git log >colorful.log
) &&
colorful colorful.log
ok 42 - color when writing to a file intended for a pager
expecting success:
test_config alias.externallog "!git log" &&
test_config color.ui auto &&
test_terminal git -p externallog &&
colorful paginated.out
ok 43 - colors are sent to pager for external commands
expecting success:
git config alias.aliasedlog log &&
git config alias.true "!true"
ok 44 - setup: some aliases
expecting success:
sane_unset PAGER GIT_PAGER &&
test_unconfig core.pager &&
rm -f default_pager_used &&
cat >$less <<-\EOF &&
#!/bin/sh
wc >default_pager_used
EOF
chmod +x $less &&
(
PATH=.:$PATH &&
export PATH &&
test_terminal git log
) &&
test -e default_pager_used
ok 45 - git log - default pager is used by default
expecting success:
sane_unset GIT_PAGER &&
test_unconfig core.pager &&
rm -f PAGER_used &&
PAGER='wc >PAGER_used' &&
export PAGER &&
test_terminal git log &&
test -e PAGER_used
ok 46 - git log - PAGER overrides default pager
expecting success:
sane_unset GIT_PAGER &&
rm -f core.pager_used &&
PAGER=wc &&
export PAGER &&
test_config core.pager 'wc >core.pager_used' &&
test_terminal git log &&
test -e core.pager_used
ok 47 - git log - repository-local core.pager setting overrides PAGER
expecting success:
sane_unset GIT_PAGER &&
rm -f core.pager_used &&
rm -fr sub &&
PAGER=wc &&
stampname=$(pwd)/core.pager_used &&
export PAGER stampname &&
test_config core.pager 'wc >"$stampname"' &&
mkdir sub &&
(
cd sub &&
test_terminal git log
) &&
test -e core.pager_used
ok 48 - git log - core.pager overrides PAGER from subdirectory
expecting success:
rm -f GIT_PAGER_used &&
test_config core.pager wc &&
GIT_PAGER='wc >GIT_PAGER_used' &&
export GIT_PAGER &&
test_terminal git log &&
test -e GIT_PAGER_used
ok 49 - git log - GIT_PAGER overrides core.pager
expecting success:
sane_unset PAGER GIT_PAGER &&
test_unconfig core.pager &&
rm -f default_pager_used &&
cat >$less <<-\EOF &&
#!/bin/sh
wc >default_pager_used
EOF
chmod +x $less &&
(
PATH=.:$PATH &&
export PATH &&
test_terminal git -p log
) &&
test -e default_pager_used
ok 50 - git -p log - default pager is used by default
expecting success:
sane_unset GIT_PAGER &&
test_unconfig core.pager &&
rm -f PAGER_used &&
PAGER='wc >PAGER_used' &&
export PAGER &&
test_terminal git -p log &&
test -e PAGER_used
ok 51 - git -p log - PAGER overrides default pager
expecting success:
sane_unset GIT_PAGER &&
rm -f core.pager_used &&
PAGER=wc &&
export PAGER &&
test_config core.pager 'wc >core.pager_used' &&
test_terminal git -p log &&
test -e core.pager_used
ok 52 - git -p log - repository-local core.pager setting overrides PAGER
expecting success:
sane_unset GIT_PAGER &&
rm -f core.pager_used &&
rm -fr sub &&
PAGER=wc &&
stampname=$(pwd)/core.pager_used &&
export PAGER stampname &&
test_config core.pager 'wc >"$stampname"' &&
mkdir sub &&
(
cd sub &&
test_terminal git -p log
) &&
test -e core.pager_used
ok 53 - git -p log - core.pager overrides PAGER from subdirectory
expecting success:
rm -f GIT_PAGER_used &&
test_config core.pager wc &&
GIT_PAGER='wc >GIT_PAGER_used' &&
export GIT_PAGER &&
test_terminal git -p log &&
test -e GIT_PAGER_used
ok 54 - git -p log - GIT_PAGER overrides core.pager
expecting success:
sane_unset PAGER GIT_PAGER &&
test_unconfig core.pager &&
rm -f default_pager_used &&
cat >$less <<-\EOF &&
#!/bin/sh
wc >default_pager_used
EOF
chmod +x $less &&
(
PATH=.:$PATH &&
export PATH &&
test_terminal git aliasedlog
) &&
test -e default_pager_used
ok 55 - git aliasedlog - default pager is used by default
expecting success:
sane_unset GIT_PAGER &&
test_unconfig core.pager &&
rm -f PAGER_used &&
PAGER='wc >PAGER_used' &&
export PAGER &&
test_terminal git aliasedlog &&
test -e PAGER_used
ok 56 - git aliasedlog - PAGER overrides default pager
expecting success:
sane_unset GIT_PAGER &&
rm -f core.pager_used &&
PAGER=wc &&
export PAGER &&
test_config core.pager 'wc >core.pager_used' &&
test_terminal git aliasedlog &&
test -e core.pager_used
ok 57 - git aliasedlog - repository-local core.pager setting overrides PAGER
expecting success:
sane_unset GIT_PAGER &&
rm -f core.pager_used &&
rm -fr sub &&
PAGER=wc &&
stampname=$(pwd)/core.pager_used &&
export PAGER stampname &&
test_config core.pager 'wc >"$stampname"' &&
mkdir sub &&
(
cd sub &&
test_terminal git aliasedlog
) &&
test -e core.pager_used
ok 58 - git aliasedlog - core.pager overrides PAGER from subdirectory
expecting success:
rm -f GIT_PAGER_used &&
test_config core.pager wc &&
GIT_PAGER='wc >GIT_PAGER_used' &&
export GIT_PAGER &&
test_terminal git aliasedlog &&
test -e GIT_PAGER_used
ok 59 - git aliasedlog - GIT_PAGER overrides core.pager
expecting success:
sane_unset PAGER GIT_PAGER &&
test_unconfig core.pager &&
rm -f default_pager_used &&
cat >$less <<-\EOF &&
#!/bin/sh
wc >default_pager_used
EOF
chmod +x $less &&
(
PATH=.:$PATH &&
export PATH &&
test_terminal git -p aliasedlog
) &&
test -e default_pager_used
ok 60 - git -p aliasedlog - default pager is used by default
expecting success:
sane_unset GIT_PAGER &&
test_unconfig core.pager &&
rm -f PAGER_used &&
PAGER='wc >PAGER_used' &&
export PAGER &&
test_terminal git -p aliasedlog &&
test -e PAGER_used
ok 61 - git -p aliasedlog - PAGER overrides default pager
expecting success:
sane_unset GIT_PAGER &&
rm -f core.pager_used &&
PAGER=wc &&
export PAGER &&
test_config core.pager 'wc >core.pager_used' &&
test_terminal git -p aliasedlog &&
test -e core.pager_used
ok 62 - git -p aliasedlog - repository-local core.pager setting overrides PAGER
expecting success:
sane_unset GIT_PAGER &&
rm -f core.pager_used &&
rm -fr sub &&
PAGER=wc &&
stampname=$(pwd)/core.pager_used &&
export PAGER stampname &&
test_config core.pager 'wc >"$stampname"' &&
mkdir sub &&
(
cd sub &&
test_terminal git -p aliasedlog
) &&
test -e core.pager_used
ok 63 - git -p aliasedlog - core.pager overrides PAGER from subdirectory
expecting success:
rm -f GIT_PAGER_used &&
test_config core.pager wc &&
GIT_PAGER='wc >GIT_PAGER_used' &&
export GIT_PAGER &&
test_terminal git -p aliasedlog &&
test -e GIT_PAGER_used
ok 64 - git -p aliasedlog - GIT_PAGER overrides core.pager
expecting success:
sane_unset PAGER GIT_PAGER &&
test_unconfig core.pager &&
rm -f default_pager_used &&
cat >$less <<-\EOF &&
#!/bin/sh
wc >default_pager_used
EOF
chmod +x $less &&
(
PATH=.:$PATH &&
export PATH &&
test_terminal git -p true
) &&
test -e default_pager_used
ok 65 - git -p true - default pager is used by default
expecting success:
sane_unset GIT_PAGER &&
test_unconfig core.pager &&
rm -f PAGER_used &&
PAGER='wc >PAGER_used' &&
export PAGER &&
test_terminal git -p true &&
test -e PAGER_used
ok 66 - git -p true - PAGER overrides default pager
expecting success:
sane_unset GIT_PAGER &&
rm -f core.pager_used &&
PAGER=wc &&
export PAGER &&
test_config core.pager 'wc >core.pager_used' &&
test_terminal git -p true &&
test -e core.pager_used
ok 67 - git -p true - repository-local core.pager setting overrides PAGER
expecting success:
sane_unset GIT_PAGER &&
rm -f core.pager_used &&
rm -fr sub &&
PAGER=wc &&
stampname=$(pwd)/core.pager_used &&
export PAGER stampname &&
test_config core.pager 'wc >"$stampname"' &&
mkdir sub &&
(
cd sub &&
test_terminal git -p true
) &&
test -e core.pager_used
ok 68 - git -p true - core.pager overrides PAGER from subdirectory
expecting success:
rm -f GIT_PAGER_used &&
test_config core.pager wc &&
GIT_PAGER='wc >GIT_PAGER_used' &&
export GIT_PAGER &&
test_terminal git -p true &&
test -e GIT_PAGER_used
ok 69 - git -p true - GIT_PAGER overrides core.pager
expecting success:
sane_unset PAGER GIT_PAGER &&
test_unconfig core.pager &&
rm -f default_pager_used &&
cat >$less <<-\EOF &&
#!/bin/sh
wc >default_pager_used
EOF
chmod +x $less &&
(
PATH=.:$PATH &&
export PATH &&
test_must_fail test_terminal git -p request-pull
) &&
test -e default_pager_used
ok 70 - git -p request-pull - default pager is used by default
expecting success:
sane_unset GIT_PAGER &&
test_unconfig core.pager &&
rm -f PAGER_used &&
PAGER='wc >PAGER_used' &&
export PAGER &&
test_must_fail test_terminal git -p request-pull &&
test -e PAGER_used
ok 71 - git -p request-pull - PAGER overrides default pager
expecting success:
sane_unset GIT_PAGER &&
rm -f core.pager_used &&
PAGER=wc &&
export PAGER &&
test_config core.pager 'wc >core.pager_used' &&
test_must_fail test_terminal git -p request-pull &&
test -e core.pager_used
ok 72 - git -p request-pull - repository-local core.pager setting overrides PAGER
expecting success:
sane_unset GIT_PAGER &&
rm -f core.pager_used &&
rm -fr sub &&
PAGER=wc &&
stampname=$(pwd)/core.pager_used &&
export PAGER stampname &&
test_config core.pager 'wc >"$stampname"' &&
mkdir sub &&
(
cd sub &&
test_must_fail test_terminal git -p request-pull
) &&
test -e core.pager_used
ok 73 - git -p request-pull - core.pager overrides PAGER from subdirectory
expecting success:
rm -f GIT_PAGER_used &&
test_config core.pager wc &&
GIT_PAGER='wc >GIT_PAGER_used' &&
export GIT_PAGER &&
test_must_fail test_terminal git -p request-pull &&
test -e GIT_PAGER_used
ok 74 - git -p request-pull - GIT_PAGER overrides core.pager
expecting success:
sane_unset PAGER GIT_PAGER &&
test_unconfig core.pager &&
rm -f default_pager_used &&
cat >$less <<-\EOF &&
#!/bin/sh
wc >default_pager_used
EOF
chmod +x $less &&
(
PATH=.:$PATH &&
export PATH &&
test_must_fail test_terminal git -p
) &&
test -e default_pager_used
ok 75 - git -p - default pager is used by default
expecting success:
sane_unset GIT_PAGER &&
test_unconfig core.pager &&
rm -f PAGER_used &&
PAGER='wc >PAGER_used' &&
export PAGER &&
test_must_fail test_terminal git -p &&
test -e PAGER_used
died of signal 15 at /<<PKGBUILDDIR>>/t/test-terminal.perl line 35.
ok 76 - git -p - PAGER overrides default pager
checking known breakage:
sane_unset GIT_PAGER &&
rm -f core.pager_used &&
PAGER=wc &&
export PAGER &&
test_config core.pager 'wc >core.pager_used' &&
test_must_fail test_terminal git -p &&
! test -e core.pager_used
not ok 77 - git -p - repository-local core.pager setting is not used # TODO known breakage
expecting success:
rm -f GIT_PAGER_used &&
test_config core.pager wc &&
GIT_PAGER='wc >GIT_PAGER_used' &&
export GIT_PAGER &&
test_must_fail test_terminal git -p &&
test -e GIT_PAGER_used
ok 78 - git -p - GIT_PAGER overrides core.pager
expecting success:
sane_unset GIT_PAGER &&
test_config core.pager "cat >cwd-retained" &&
(
cd sub &&
rm -f cwd-retained &&
test_terminal git -p rev-parse HEAD &&
test_path_is_file cwd-retained
)
ok 79 - core.pager in repo config works and retains cwd
expecting success:
sane_unset GIT_PAGER &&
test_config core.pager "cat >via-alias" &&
(
cd sub &&
rm -f via-alias &&
test_terminal git -c alias.r="-p rev-parse" r HEAD &&
test_path_is_file via-alias
)
ok 80 - core.pager is found via alias in subdirectory
checking known breakage:
rm -f GIT_PAGER_used &&
GIT_PAGER='wc >GIT_PAGER_used' &&
export GIT_PAGER &&
test_must_fail test_terminal git -p nonsense &&
! test -e GIT_PAGER_used
not ok 81 - no pager for 'git -p nonsense' # TODO known breakage
expecting success:
sane_unset PAGER GIT_PAGER &&
test_unconfig core.pager &&
rm -f default_pager_used &&
cat >$less <<-\EOF &&
#!/bin/sh
wc >default_pager_used
EOF
chmod +x $less &&
(
PATH=.:$PATH &&
export PATH &&
test_terminal git shortlog
) &&
test -e default_pager_used
ok 82 - git shortlog - default pager is used by default
expecting success:
sane_unset GIT_PAGER &&
test_unconfig core.pager &&
rm -f PAGER_used &&
PAGER='wc >PAGER_used' &&
export PAGER &&
test_terminal git shortlog &&
test -e PAGER_used
ok 83 - git shortlog - PAGER overrides default pager
expecting success:
sane_unset GIT_PAGER &&
rm -f core.pager_used &&
PAGER=wc &&
export PAGER &&
test_config core.pager 'wc >core.pager_used' &&
test_terminal git shortlog &&
test -e core.pager_used
ok 84 - git shortlog - repository-local core.pager setting overrides PAGER
expecting success:
sane_unset GIT_PAGER &&
rm -f core.pager_used &&
rm -fr sub &&
PAGER=wc &&
stampname=$(pwd)/core.pager_used &&
export PAGER stampname &&
test_config core.pager 'wc >"$stampname"' &&
mkdir sub &&
(
cd sub &&
test_terminal git shortlog
) &&
test -e core.pager_used
ok 85 - git shortlog - core.pager overrides PAGER from subdirectory
expecting success:
rm -f GIT_PAGER_used &&
test_config core.pager wc &&
GIT_PAGER='wc >GIT_PAGER_used' &&
export GIT_PAGER &&
test_terminal git shortlog &&
test -e GIT_PAGER_used
ok 86 - git shortlog - GIT_PAGER overrides core.pager
expecting success:
git config pager.shortlog false
ok 87 - setup: configure shortlog not to paginate
expecting success:
rm -f GIT_PAGER_used &&
GIT_PAGER='wc >GIT_PAGER_used' &&
export GIT_PAGER &&
test_terminal git shortlog &&
! test -e GIT_PAGER_used
A U Thor (1):
initial
died of signal 15 at /<<PKGBUILDDIR>>/t/test-terminal.perl line 35.
ok 88 - no pager for 'git shortlog'
expecting success:
sane_unset GIT_PAGER &&
rm -f core.pager_used &&
rm -fr sub &&
PAGER=wc &&
stampname=$(pwd)/core.pager_used &&
export PAGER stampname &&
test_config core.pager 'wc >"$stampname"' &&
mkdir sub &&
(
cd sub &&
test_terminal git shortlog
) &&
! test -e core.pager_used
ok 89 - git shortlog - core.pager is not used from subdirectory
expecting success:
sane_unset PAGER GIT_PAGER &&
test_unconfig core.pager &&
rm -f default_pager_used &&
cat >$less <<-\EOF &&
#!/bin/sh
wc >default_pager_used
EOF
chmod +x $less &&
(
PATH=.:$PATH &&
export PATH &&
test_terminal git -p shortlog
) &&
test -e default_pager_used
ok 90 - git -p shortlog - default pager is used by default
expecting success:
sane_unset GIT_PAGER &&
rm -f core.pager_used &&
rm -fr sub &&
PAGER=wc &&
stampname=$(pwd)/core.pager_used &&
export PAGER stampname &&
test_config core.pager 'wc >"$stampname"' &&
mkdir sub &&
(
cd sub &&
test_terminal git -p shortlog
) &&
test -e core.pager_used
ok 91 - git -p shortlog - core.pager overrides PAGER from subdirectory
expecting success:
sane_unset GIT_PAGER &&
rm -f core.pager_used &&
rm -fr sub &&
PAGER=wc &&
stampname=$(pwd)/core.pager_used &&
export PAGER stampname &&
test_config core.pager 'wc >"$stampname"' &&
mkdir sub &&
(
cd sub &&
test_must_fail test_terminal git -p apply </dev/null
) &&
test -e core.pager_used
ok 92 - git -p apply </dev/null - core.pager overrides PAGER from subdirectory
expecting success:
sane_unset PAGER GIT_PAGER &&
echo "foo:initial" >expect &&
>actual &&
test_unconfig core.pager &&
test_config pager.log "sed s/^/foo:/ >actual" &&
test_terminal git log --format=%s -1 &&
test_cmp expect actual
ok 93 - command-specific pager
expecting success:
sane_unset PAGER GIT_PAGER &&
echo "foo:initial" >expect &&
>actual &&
test_config core.pager "exit 1" &&
test_config pager.log "sed s/^/foo:/ >actual" &&
test_terminal git log --format=%s -1 &&
test_cmp expect actual
ok 94 - command-specific pager overrides core.pager
expecting success:
GIT_PAGER="sed s/^/foo:/ >actual" && export GIT_PAGER &&
>actual &&
echo "foo:initial" >expect &&
test_config pager.log "exit 1" &&
test_terminal git log --format=%s -1 &&
test_cmp expect actual
ok 95 - command-specific pager overridden by environment
expecting success:
cat >git-external <<-\EOF &&
#!/bin/sh
git "$@"
EOF
chmod +x git-external
ok 96 - setup external command
expecting success:
sane_unset PAGER GIT_PAGER &&
echo "foo:initial" >expect &&
>actual &&
test_config pager.external "sed s/^/foo:/ >actual" &&
test_terminal git --exec-path="$(pwd)" external log --format=%s -1 &&
test_cmp expect actual
ok 97 - command-specific pager works for external commands
expecting success:
sane_unset PAGER GIT_PAGER &&
echo "foo:initial" >expect &&
>actual &&
test_config pager.log "sed s/^/foo:/ >actual" &&
test_terminal git --exec-path=. external log --format=%s -1 &&
test_cmp expect actual
ok 98 - sub-commands of externals use their own pager
expecting success:
sane_unset PAGER GIT_PAGER &&
>actual &&
test_config pager.external false &&
test_config pager.log "sed s/^/log:/ >actual" &&
test_terminal git --exec-path=. external log --format=%s -1 &&
test_must_be_empty actual
initial
ok 99 - external command pagers override sub-commands
expecting success:
write_script git-under_score <<-\EOF &&
echo ok
EOF
git --exec-path=. under_score >actual 2>&1 &&
echo ok >expect &&
test_cmp expect actual
ok 100 - command with underscores does not complain
expecting success:
test_commit one &&
test_commit two &&
test_commit three &&
test_commit four &&
test_commit five &&
cat >expect <<-\EOF &&
initial one two three four five
EOF
test_terminal env PAGER="cat >actual" COLUMNS=80 \
git -c column.ui=auto tag --sort=authordate &&
test_cmp expect actual
[master bdf0f03] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
[master c613728] two
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 two.t
[master dbd092b] three
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 three.t
[master a0ce8ac] four
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 four.t
[master 03bd18b] five
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 five.t
ok 101 - git tag with auto-columns
# still have 3 known breakage(s)
# passed all remaining 98 test(s)
1..101
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7063-status-untracked-cache.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7063-status-untracked-cache/.git/
checking prerequisite: UNTRACKED_CACHE
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
{ git update-index --test-untracked-cache; ret=$?; } &&
test $ret -ne 1
)
Testing mtime in '/<<PKGBUILDDIR>>/t/trash directory.t7063-status-untracked-cache' ...... OK
prerequisite UNTRACKED_CACHE ok
expecting success:
test_must_fail git config --get core.untrackedCache
ok 1 - core.untrackedCache is unset
expecting success:
git init worktree &&
cd worktree &&
mkdir done dtwo dthree &&
touch one two three done/one dtwo/two dthree/three &&
git add one two done/one &&
: >.git/info/exclude &&
git update-index --untracked-cache
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7063-status-untracked-cache/worktree/.git/
ok 2 - setup
expecting success:
test-tool dump-untracked-cache >../actual &&
cat >../expect-empty <<EOF &&
info/exclude 0000000000000000000000000000000000000000
core.excludesfile 0000000000000000000000000000000000000000
exclude_per_dir .gitignore
flags 00000006
EOF
test_cmp ../expect-empty ../actual
ok 3 - untracked cache is empty
expecting success:
avoid_racy &&
: >../trace &&
GIT_TRACE_UNTRACKED_STATS="$TRASH_DIRECTORY/trace" \
git status --porcelain >../actual &&
test_cmp ../status.expect ../actual &&
cat >../trace.expect <<EOF &&
node creation: 3
gitignore invalidation: 1
directory invalidation: 0
opendir: 4
EOF
test_cmp ../trace.expect ../trace
ok 4 - status first time (empty cache)
expecting success:
test-tool dump-untracked-cache >../actual &&
test_cmp ../dump.expect ../actual
ok 5 - untracked cache after first status
expecting success:
avoid_racy &&
: >../trace &&
GIT_TRACE_UNTRACKED_STATS="$TRASH_DIRECTORY/trace" \
git status --porcelain >../actual &&
test_cmp ../status.expect ../actual &&
cat >../trace.expect <<EOF &&
node creation: 0
gitignore invalidation: 0
directory invalidation: 0
opendir: 0
EOF
test_cmp ../trace.expect ../trace
ok 6 - status second time (fully populated cache)
expecting success:
test-tool dump-untracked-cache >../actual &&
test_cmp ../dump.expect ../actual
ok 7 - untracked cache after second status
expecting success:
avoid_racy &&
: >four &&
: >../trace &&
GIT_TRACE_UNTRACKED_STATS="$TRASH_DIRECTORY/trace" \
git status --porcelain >../actual &&
cat >../status.expect <<EOF &&
A done/one
A one
A two
?? dthree/
?? dtwo/
?? four
?? three
EOF
test_cmp ../status.expect ../actual &&
cat >../trace.expect <<EOF &&
node creation: 0
gitignore invalidation: 0
directory invalidation: 1
opendir: 1
EOF
test_cmp ../trace.expect ../trace
ok 8 - modify in root directory, one dir invalidation
expecting success:
test-tool dump-untracked-cache >../actual &&
cat >../expect <<EOF &&
info/exclude $EMPTY_BLOB
core.excludesfile 0000000000000000000000000000000000000000
exclude_per_dir .gitignore
flags 00000006
/ 0000000000000000000000000000000000000000 recurse valid
dthree/
dtwo/
four
three
/done/ 0000000000000000000000000000000000000000 recurse valid
/dthree/ 0000000000000000000000000000000000000000 recurse check_only valid
three
/dtwo/ 0000000000000000000000000000000000000000 recurse check_only valid
two
EOF
test_cmp ../expect ../actual
ok 9 - verify untracked cache dump
expecting success:
avoid_racy &&
echo four >.gitignore &&
: >../trace &&
GIT_TRACE_UNTRACKED_STATS="$TRASH_DIRECTORY/trace" \
git status --porcelain >../actual &&
cat >../status.expect <<EOF &&
A done/one
A one
A two
?? .gitignore
?? dthree/
?? dtwo/
?? three
EOF
test_cmp ../status.expect ../actual &&
cat >../trace.expect <<EOF &&
node creation: 0
gitignore invalidation: 1
directory invalidation: 1
opendir: 4
EOF
test_cmp ../trace.expect ../trace
ok 10 - new .gitignore invalidates recursively
expecting success:
test-tool dump-untracked-cache >../actual &&
cat >../expect <<EOF &&
info/exclude $EMPTY_BLOB
core.excludesfile 0000000000000000000000000000000000000000
exclude_per_dir .gitignore
flags 00000006
/ e6fcc8f2ee31bae321d66afd183fcb7237afae6e recurse valid
.gitignore
dthree/
dtwo/
three
/done/ 0000000000000000000000000000000000000000 recurse valid
/dthree/ 0000000000000000000000000000000000000000 recurse check_only valid
three
/dtwo/ 0000000000000000000000000000000000000000 recurse check_only valid
two
EOF
test_cmp ../expect ../actual
ok 11 - verify untracked cache dump
expecting success:
avoid_racy &&
echo three >>.git/info/exclude &&
: >../trace &&
GIT_TRACE_UNTRACKED_STATS="$TRASH_DIRECTORY/trace" \
git status --porcelain >../actual &&
cat >../status.expect <<EOF &&
A done/one
A one
A two
?? .gitignore
?? dtwo/
EOF
test_cmp ../status.expect ../actual &&
cat >../trace.expect <<EOF &&
node creation: 0
gitignore invalidation: 1
directory invalidation: 0
opendir: 4
EOF
test_cmp ../trace.expect ../trace
ok 12 - new info/exclude invalidates everything
expecting success:
test-tool dump-untracked-cache >../actual &&
cat >../expect <<EOF &&
info/exclude 13263c0978fb9fad16b2d580fb800b6d811c3ff0
core.excludesfile 0000000000000000000000000000000000000000
exclude_per_dir .gitignore
flags 00000006
/ e6fcc8f2ee31bae321d66afd183fcb7237afae6e recurse valid
.gitignore
dtwo/
/done/ 0000000000000000000000000000000000000000 recurse valid
/dthree/ 0000000000000000000000000000000000000000 recurse check_only valid
/dtwo/ 0000000000000000000000000000000000000000 recurse check_only valid
two
EOF
test_cmp ../expect ../actual
ok 13 - verify untracked cache dump
expecting success:
git rm --cached two &&
test-tool dump-untracked-cache >../actual &&
cat >../expect <<EOF &&
info/exclude 13263c0978fb9fad16b2d580fb800b6d811c3ff0
core.excludesfile 0000000000000000000000000000000000000000
exclude_per_dir .gitignore
flags 00000006
/ e6fcc8f2ee31bae321d66afd183fcb7237afae6e recurse
/done/ 0000000000000000000000000000000000000000 recurse valid
/dthree/ 0000000000000000000000000000000000000000 recurse check_only valid
/dtwo/ 0000000000000000000000000000000000000000 recurse check_only valid
two
EOF
test_cmp ../expect ../actual
rm 'two'
ok 14 - move two from tracked to untracked
expecting success:
: >../trace &&
GIT_TRACE_UNTRACKED_STATS="$TRASH_DIRECTORY/trace" \
git status --porcelain >../actual &&
cat >../status.expect <<EOF &&
A done/one
A one
?? .gitignore
?? dtwo/
?? two
EOF
test_cmp ../status.expect ../actual &&
cat >../trace.expect <<EOF &&
node creation: 0
gitignore invalidation: 0
directory invalidation: 0
opendir: 1
EOF
test_cmp ../trace.expect ../trace
ok 15 - status after the move
expecting success:
test-tool dump-untracked-cache >../actual &&
cat >../expect <<EOF &&
info/exclude 13263c0978fb9fad16b2d580fb800b6d811c3ff0
core.excludesfile 0000000000000000000000000000000000000000
exclude_per_dir .gitignore
flags 00000006
/ e6fcc8f2ee31bae321d66afd183fcb7237afae6e recurse valid
.gitignore
dtwo/
two
/done/ 0000000000000000000000000000000000000000 recurse valid
/dthree/ 0000000000000000000000000000000000000000 recurse check_only valid
/dtwo/ 0000000000000000000000000000000000000000 recurse check_only valid
two
EOF
test_cmp ../expect ../actual
ok 16 - verify untracked cache dump
expecting success:
git add two &&
test-tool dump-untracked-cache >../actual &&
cat >../expect <<EOF &&
info/exclude 13263c0978fb9fad16b2d580fb800b6d811c3ff0
core.excludesfile 0000000000000000000000000000000000000000
exclude_per_dir .gitignore
flags 00000006
/ e6fcc8f2ee31bae321d66afd183fcb7237afae6e recurse
/done/ 0000000000000000000000000000000000000000 recurse valid
/dthree/ 0000000000000000000000000000000000000000 recurse check_only valid
/dtwo/ 0000000000000000000000000000000000000000 recurse check_only valid
two
EOF
test_cmp ../expect ../actual
ok 17 - move two from untracked to tracked
expecting success:
: >../trace &&
GIT_TRACE_UNTRACKED_STATS="$TRASH_DIRECTORY/trace" \
git status --porcelain >../actual &&
cat >../status.expect <<EOF &&
A done/one
A one
A two
?? .gitignore
?? dtwo/
EOF
test_cmp ../status.expect ../actual &&
cat >../trace.expect <<EOF &&
node creation: 0
gitignore invalidation: 0
directory invalidation: 0
opendir: 1
EOF
test_cmp ../trace.expect ../trace
ok 18 - status after the move
expecting success:
test-tool dump-untracked-cache >../actual &&
cat >../expect <<EOF &&
info/exclude 13263c0978fb9fad16b2d580fb800b6d811c3ff0
core.excludesfile 0000000000000000000000000000000000000000
exclude_per_dir .gitignore
flags 00000006
/ e6fcc8f2ee31bae321d66afd183fcb7237afae6e recurse valid
.gitignore
dtwo/
/done/ 0000000000000000000000000000000000000000 recurse valid
/dthree/ 0000000000000000000000000000000000000000 recurse check_only valid
/dtwo/ 0000000000000000000000000000000000000000 recurse check_only valid
two
EOF
test_cmp ../expect ../actual
ok 19 - verify untracked cache dump
expecting success:
echo two >done/.gitignore &&
echo three >>done/.gitignore &&
echo two >done/two &&
git add -f done/two done/.gitignore &&
git commit -m "first commit"
[master (root-commit) c4624bb] first commit
Author: A U Thor <author@example.com>
5 files changed, 3 insertions(+)
create mode 100644 done/.gitignore
create mode 100644 done/one
create mode 100644 done/two
create mode 100644 one
create mode 100644 two
ok 20 - set up for sparse checkout testing
expecting success:
: >../trace &&
GIT_TRACE_UNTRACKED_STATS="$TRASH_DIRECTORY/trace" \
git status --porcelain >../actual &&
cat >../status.expect <<EOF &&
?? .gitignore
?? dtwo/
EOF
test_cmp ../status.expect ../actual &&
cat >../trace.expect <<EOF &&
node creation: 0
gitignore invalidation: 0
directory invalidation: 0
opendir: 2
EOF
test_cmp ../trace.expect ../trace
ok 21 - status after commit
expecting success:
test-tool dump-untracked-cache >../actual &&
cat >../expect <<EOF &&
info/exclude 13263c0978fb9fad16b2d580fb800b6d811c3ff0
core.excludesfile 0000000000000000000000000000000000000000
exclude_per_dir .gitignore
flags 00000006
/ e6fcc8f2ee31bae321d66afd183fcb7237afae6e recurse valid
.gitignore
dtwo/
/done/ 0000000000000000000000000000000000000000 recurse valid
/dthree/ 0000000000000000000000000000000000000000 recurse check_only valid
/dtwo/ 0000000000000000000000000000000000000000 recurse check_only valid
two
EOF
test_cmp ../expect ../actual
ok 22 - untracked cache correct after commit
expecting success:
echo "done/[a-z]*" >.git/info/sparse-checkout &&
test_config core.sparsecheckout true &&
git checkout master &&
git update-index --force-untracked-cache &&
git status --porcelain >/dev/null && # prime the cache
test_path_is_missing done/.gitignore &&
test_path_is_file done/one
Already on 'master'
ok 23 - set up sparse checkout
expecting success:
echo two bis >done/two &&
echo three >done/three && # three is gitignored
echo four >done/four && # four is gitignored at a higher level
echo five >done/five && # five is not gitignored
echo test >base && #we need to ensure that the root dir is touched
rm base &&
sync_mtime
ok 24 - create/modify files, some of which are gitignored
expecting success:
: >../trace &&
avoid_racy &&
GIT_TRACE_UNTRACKED_STATS="$TRASH_DIRECTORY/trace" \
git status --porcelain >../status.actual &&
cat >../status.expect <<EOF &&
M done/two
?? .gitignore
?? done/five
?? dtwo/
EOF
test_cmp ../status.expect ../status.actual &&
cat >../trace.expect <<EOF &&
node creation: 0
gitignore invalidation: 1
directory invalidation: 2
opendir: 2
EOF
test_cmp ../trace.expect ../trace
ok 25 - test sparse status with untracked cache
expecting success:
test-tool dump-untracked-cache >../actual &&
cat >../expect <<EOF &&
info/exclude 13263c0978fb9fad16b2d580fb800b6d811c3ff0
core.excludesfile 0000000000000000000000000000000000000000
exclude_per_dir .gitignore
flags 00000006
/ e6fcc8f2ee31bae321d66afd183fcb7237afae6e recurse valid
.gitignore
dtwo/
/done/ 1946f0437f90c5005533cbe1736a6451ca301714 recurse valid
five
/dthree/ 0000000000000000000000000000000000000000 recurse check_only valid
/dtwo/ 0000000000000000000000000000000000000000 recurse check_only valid
two
EOF
test_cmp ../expect ../actual
ok 26 - untracked cache correct after status
expecting success:
avoid_racy &&
: >../trace &&
GIT_TRACE_UNTRACKED_STATS="$TRASH_DIRECTORY/trace" \
git status --porcelain >../status.actual &&
cat >../status.expect <<EOF &&
M done/two
?? .gitignore
?? done/five
?? dtwo/
EOF
test_cmp ../status.expect ../status.actual &&
cat >../trace.expect <<EOF &&
node creation: 0
gitignore invalidation: 0
directory invalidation: 0
opendir: 0
EOF
test_cmp ../trace.expect ../trace
ok 27 - test sparse status again with untracked cache
expecting success:
mkdir done/sub &&
mkdir done/sub/sub &&
echo "sub" > done/sub/sub/file
ok 28 - set up for test of subdir and sparse checkouts
expecting success:
avoid_racy &&
: >../trace &&
GIT_TRACE_UNTRACKED_STATS="$TRASH_DIRECTORY/trace" \
git status --porcelain >../status.actual &&
cat >../status.expect <<EOF &&
M done/two
?? .gitignore
?? done/five
?? done/sub/
?? dtwo/
EOF
test_cmp ../status.expect ../status.actual &&
cat >../trace.expect <<EOF &&
node creation: 2
gitignore invalidation: 0
directory invalidation: 1
opendir: 3
EOF
test_cmp ../trace.expect ../trace
ok 29 - test sparse status with untracked cache and subdir
expecting success:
test-tool dump-untracked-cache >../actual &&
cat >../expect-from-test-dump <<EOF &&
info/exclude 13263c0978fb9fad16b2d580fb800b6d811c3ff0
core.excludesfile 0000000000000000000000000000000000000000
exclude_per_dir .gitignore
flags 00000006
/ e6fcc8f2ee31bae321d66afd183fcb7237afae6e recurse valid
.gitignore
dtwo/
/done/ 1946f0437f90c5005533cbe1736a6451ca301714 recurse valid
five
sub/
/done/sub/ 0000000000000000000000000000000000000000 recurse check_only valid
sub/
/done/sub/sub/ 0000000000000000000000000000000000000000 recurse check_only valid
file
/dthree/ 0000000000000000000000000000000000000000 recurse check_only valid
/dtwo/ 0000000000000000000000000000000000000000 recurse check_only valid
two
EOF
test_cmp ../expect-from-test-dump ../actual
ok 30 - verify untracked cache dump (sparse/subdirs)
expecting success:
avoid_racy &&
: >../trace &&
GIT_TRACE_UNTRACKED_STATS="$TRASH_DIRECTORY/trace" \
git status --porcelain >../status.actual &&
test_cmp ../status.expect ../status.actual &&
cat >../trace.expect <<EOF &&
node creation: 0
gitignore invalidation: 0
directory invalidation: 0
opendir: 0
EOF
test_cmp ../trace.expect ../trace
ok 31 - test sparse status again with untracked cache and subdir
expecting success:
git add dtwo/two &&
git status --porcelain >../status.actual &&
cat >../status.expect <<EOF &&
M done/two
A dtwo/two
?? .gitignore
?? done/five
?? done/sub/
EOF
test_cmp ../status.expect ../status.actual
ok 32 - move entry in subdir from untracked to cached
expecting success:
git rm --cached dtwo/two &&
git status --porcelain >../status.actual &&
cat >../status.expect <<EOF &&
M done/two
?? .gitignore
?? done/five
?? done/sub/
?? dtwo/
EOF
test_cmp ../status.expect ../status.actual
rm 'dtwo/two'
ok 33 - move entry in subdir from cached to untracked
expecting success:
git update-index --no-untracked-cache &&
test-tool dump-untracked-cache >../actual &&
echo "no untracked cache" >../expect-no-uc &&
test_cmp ../expect-no-uc ../actual
ok 34 - --no-untracked-cache removes the cache
expecting success:
git status &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-no-uc ../actual
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: done/two
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
done/five
done/sub/
dtwo/
no changes added to commit (use "git add" and/or "git commit -a")
ok 35 - git status does not change anything
expecting success:
git config core.untrackedCache true &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-no-uc ../actual &&
git status &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-from-test-dump ../actual
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: done/two
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
done/five
done/sub/
dtwo/
no changes added to commit (use "git add" and/or "git commit -a")
ok 36 - setting core.untrackedCache to true and using git status creates the cache
expecting success:
git update-index --no-untracked-cache &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-no-uc ../actual &&
git update-index --untracked-cache &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-empty ../actual
warning: core.untrackedCache is set to true; remove or change it, if you really want to disable the untracked cache
ok 37 - using --no-untracked-cache does not fail when core.untrackedCache is true
expecting success:
git config core.untrackedCache false &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-empty ../actual &&
git status &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-no-uc ../actual
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: done/two
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
done/five
done/sub/
dtwo/
no changes added to commit (use "git add" and/or "git commit -a")
ok 38 - setting core.untrackedCache to false and using git status removes the cache
expecting success:
git update-index --untracked-cache &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-empty ../actual
warning: core.untrackedCache is set to false; remove or change it, if you really want to enable the untracked cache
ok 39 - using --untracked-cache does not fail when core.untrackedCache is false
expecting success:
git config core.untrackedCache keep &&
git update-index --untracked-cache &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-empty ../actual &&
git status &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-from-test-dump ../actual &&
git update-index --no-untracked-cache &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-no-uc ../actual &&
git update-index --force-untracked-cache &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-empty ../actual &&
git status &&
test-tool dump-untracked-cache >../actual &&
test_cmp ../expect-from-test-dump ../actual
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: done/two
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
done/five
done/sub/
dtwo/
no changes added to commit (use "git add" and/or "git commit -a")
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: done/two
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
done/five
done/sub/
dtwo/
no changes added to commit (use "git add" and/or "git commit -a")
ok 40 - setting core.untrackedCache to keep
expecting success:
mkdir ../other_worktree &&
cp -R done dthree dtwo four three ../other_worktree &&
GIT_WORK_TREE=../other_worktree git status 2>../err &&
echo "warning: untracked cache is disabled on this system or location" >../expect &&
test_i18ncmp ../expect ../err
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: done/two
Untracked files:
(use "git add <file>..." to include in what will be committed)
done/five
done/four
done/sub/
dtwo/
four
no changes added to commit (use "git add" and/or "git commit -a")
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 41 - test ident field is working
expecting success:
git commit --allow-empty -m empty &&
test-tool dump-untracked-cache >../before &&
test_when_finished "git checkout master" &&
git checkout -b other_branch &&
test-tool dump-untracked-cache >../after &&
test_cmp ../before ../after &&
test_commit test &&
test-tool dump-untracked-cache >../before &&
git checkout master &&
test-tool dump-untracked-cache >../after &&
test_cmp ../before ../after
[master 47c4e60] empty
Author: A U Thor <author@example.com>
Switched to a new branch 'other_branch'
M done/two
[other_branch 62f133b] test
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 test.t
Switched to branch 'master'
M done/two
Already on 'master'
M done/two
ok 42 - untracked cache survives a checkout
expecting success:
test-tool dump-untracked-cache >../before &&
git add done/two &&
git commit -m commit &&
test-tool dump-untracked-cache >../after &&
test_cmp ../before ../after
[master a8979a2] commit
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 43 - untracked cache survives a commit
expecting success:
cd ..
ok 44 - teardown worktree
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 init worktree-symlink &&
cd worktree-symlink &&
git config core.untrackedCache true &&
mkdir one two &&
touch one/file two/file &&
git add one/file two/file &&
git commit -m"first commit" &&
git rm -rf one &&
ln -s two one &&
git add one &&
git commit -m"second commit"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7063-status-untracked-cache/worktree-symlink/.git/
[master (root-commit) 294fddc] first commit
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 one/file
create mode 100644 two/file
rm 'one/file'
[master b7cd1f6] second commit
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+)
create mode 120000 one
delete mode 100644 one/file
ok 45 - setup worktree for symlink test
expecting success:
git checkout HEAD~ &&
status_is_clean &&
status_is_clean &&
git checkout master &&
avoid_racy &&
status_is_clean &&
status_is_clean
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 294fddc first commit
Previous HEAD position was 294fddc first commit
Switched to branch 'master'
ok 46 - "status" after symlink replacement should be clean with UC=true
expecting success:
git config core.untrackedCache false &&
git checkout HEAD~ &&
status_is_clean &&
status_is_clean &&
git checkout master &&
avoid_racy &&
status_is_clean &&
status_is_clean
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 294fddc first commit
Previous HEAD position was 294fddc first commit
Switched to branch 'master'
ok 47 - "status" after symlink replacement should be clean with UC=false
expecting success:
git init worktree-non-symlink &&
cd worktree-non-symlink &&
git config core.untrackedCache true &&
mkdir one two &&
touch one/file two/file &&
git add one/file two/file &&
git commit -m"first commit" &&
git rm -rf one &&
cp two/file one &&
git add one &&
git commit -m"second commit"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7063-status-untracked-cache/worktree-symlink/worktree-non-symlink/.git/
[master (root-commit) 294fddc] first commit
Author: A U Thor <author@example.com>
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 one/file
create mode 100644 two/file
rm 'one/file'
[master 0558445] second commit
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
rename one/file => one (100%)
ok 48 - setup worktree for non-symlink test
expecting success:
git checkout HEAD~ &&
status_is_clean &&
status_is_clean &&
git checkout master &&
avoid_racy &&
status_is_clean &&
test-tool dump-untracked-cache >../actual &&
grep -F "recurse valid" ../actual >../actual.grep &&
cat >../expect.grep <<EOF &&
/ 0000000000000000000000000000000000000000 recurse valid
/two/ 0000000000000000000000000000000000000000 recurse valid
EOF
status_is_clean &&
test_cmp ../expect.grep ../actual.grep
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 294fddc first commit
Previous HEAD position was 294fddc first commit
Switched to branch 'master'
ok 49 - "status" after file replacement should be clean with UC=true
expecting success:
git config core.untrackedCache false &&
git checkout HEAD~ &&
status_is_clean &&
status_is_clean &&
git checkout master &&
avoid_racy &&
status_is_clean &&
status_is_clean
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 294fddc first commit
Previous HEAD position was 294fddc first commit
Switched to branch 'master'
ok 50 - "status" after file replacement should be clean with UC=false
# passed all 50 test(s)
1..50
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7201-co.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7201-co/.git/
expecting success:
fill x y z > same &&
fill 1 2 3 4 5 6 7 8 >one &&
fill a b c d e >two &&
git add same one two &&
git commit -m "Initial A one, A two" &&
git checkout -b renamer &&
rm -f one &&
fill 1 3 4 5 6 7 8 >uno &&
git add uno &&
fill a b c d e f >two &&
git commit -a -m "Renamer R one->uno, M two" &&
git checkout -b side master &&
fill 1 2 3 4 5 6 7 >one &&
fill A B C D E >three &&
rm -f two &&
git update-index --add --remove one two three &&
git commit -m "Side M one, D two, A three" &&
git checkout -b simple master &&
rm -f one &&
fill a c e > two &&
git commit -a -m "Simple D one, M two" &&
git checkout master
[master (root-commit) 7329388] Initial A one, A two
Author: A U Thor <author@example.com>
3 files changed, 16 insertions(+)
create mode 100644 one
create mode 100644 same
create mode 100644 two
Switched to a new branch 'renamer'
[renamer 0420b41] Renamer R one->uno, M two
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
rename one => uno (87%)
Switched to a new branch 'side'
[side ab76817] Side M one, D two, A three
Author: A U Thor <author@example.com>
3 files changed, 5 insertions(+), 6 deletions(-)
create mode 100644 three
delete mode 100644 two
Switched to a new branch 'simple'
[simple 022ff9d] Simple D one, M two
Author: A U Thor <author@example.com>
2 files changed, 10 deletions(-)
delete mode 100644 one
Switched to branch 'master'
ok 1 - setup
expecting success:
git checkout -b delete-me master &&
git update-ref -d --no-deref refs/heads/delete-me &&
test refs/heads/delete-me = "$(git symbolic-ref HEAD)" &&
git checkout master &&
test refs/heads/master = "$(git symbolic-ref HEAD)"
Switched to a new branch 'delete-me'
Switched to branch 'master'
ok 2 - checkout from non-existing branch
expecting success:
fill 0 1 2 3 4 5 6 7 8 >one &&
if git checkout side
then
echo Not happy
false
else
echo "happy - failed correctly"
fi
error: Your local changes to the following files would be overwritten by checkout:
one
Please commit your changes or stash them before you switch branches.
Aborting
happy - failed correctly
ok 3 - checkout with dirty tree without -m
expecting success:
git checkout -f master &&
fill 0 1 2 3 4 5 6 7 8 >same &&
cp same kept &&
git checkout side >messages &&
test_cmp same kept &&
printf "M\t%s\n" same >messages.expect &&
test_cmp messages.expect messages
Already on 'master'
Switched to branch 'side'
ok 4 - checkout with unrelated dirty tree without -m
expecting success:
git checkout -f master &&
git clean -f &&
fill 0 1 2 3 4 5 6 7 8 >one &&
git checkout -m side > messages &&
test "$(git symbolic-ref HEAD)" = "refs/heads/side" &&
printf "M\t%s\n" one >expect.messages &&
test_cmp expect.messages messages &&
fill "M one" "A three" "D two" >expect.master &&
git diff --name-status master >current.master &&
test_cmp expect.master current.master &&
fill "M one" >expect.side &&
git diff --name-status side >current.side &&
test_cmp expect.side current.side &&
git diff --cached >current.index &&
test_must_be_empty current.index
Switched to branch 'master'
Removing kept
Removing messages
Removing messages.expect
Switched to branch 'side'
ok 5 - checkout -m with dirty tree
expecting success:
git checkout -f master && git clean -f &&
fill 1 2 3 4 5 7 8 >one &&
if git checkout renamer
then
echo Not happy
false
else
echo "happy - failed correctly"
fi &&
git checkout -m renamer &&
fill 1 3 4 5 7 8 >expect &&
test_cmp expect uno &&
! test -f one &&
git diff --cached >current &&
test_must_be_empty current
Switched to branch 'master'
Removing current.index
Removing current.master
Removing current.side
Removing expect.master
Removing expect.messages
Removing expect.side
Removing messages
error: Your local changes to the following files would be overwritten by checkout:
one
Please commit your changes or stash them before you switch branches.
Aborting
happy - failed correctly
Switched to branch 'renamer'
M uno
ok 6 - checkout -m with dirty tree, renamed
expecting success:
git checkout -f master && git clean -f &&
fill 1 T 3 4 5 6 S 8 >one &&
if git checkout renamer
then
echo Not happy
false
else
echo "happy - failed correctly"
fi &&
git checkout -m renamer &&
git diff master:one :3:uno |
sed -e "1,/^@@/d" -e "/^ /d" -e "s/^-/d/" -e "s/^+/a/" >current &&
fill d2 aT d7 aS >expect &&
test_cmp expect current &&
git diff --cached two >current &&
test_must_be_empty current
Switched to branch 'master'
Removing current
Removing expect
error: Your local changes to the following files would be overwritten by checkout:
one
Please commit your changes or stash them before you switch branches.
Aborting
happy - failed correctly
Switched to branch 'renamer'
M uno
ok 7 - checkout -m with merge conflict
expecting success:
git checkout -f master && git clean -f &&
fill b d > two &&
git checkout -m simple &&
git ls-files >current &&
fill same two two two >expect &&
test_cmp expect current &&
cat <<-EOF >expect &&
<<<<<<< simple
a
c
e
=======
b
d
>>>>>>> local
EOF
test_cmp expect two
Switched to branch 'master'
Removing current
Removing expect
Switched to branch 'simple'
M two
ok 8 - format of merge conflict from checkout -m
expecting success:
git checkout -f master && git reset --hard && git clean -f &&
fill b d > two &&
git checkout --merge --conflict=diff3 simple &&
cat <<-EOF >expect &&
<<<<<<< simple
a
c
e
||||||| master
a
b
c
d
e
=======
b
d
>>>>>>> local
EOF
test_cmp expect two
Switched to branch 'master'
HEAD is now at 7329388 Initial A one, A two
Removing current
Removing expect
Switched to branch 'simple'
M two
ok 9 - checkout --merge --conflict=diff3 <branch>
expecting success:
git checkout -f master && git reset --hard && git clean -f &&
git rm two &&
test_must_fail git checkout simple 2>errs &&
test_i18ngrep overwritten errs &&
test_must_fail git read-tree --quiet -m -u HEAD simple 2>errs &&
test_must_be_empty errs
Switched to branch 'master'
HEAD is now at 7329388 Initial A one, A two
Removing expect
rm 'two'
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: Your local changes to the following files would be overwritten by checkout:
ok 10 - switch to another branch while carrying a deletion
expecting success:
git config advice.detachedHead false &&
git checkout -f renamer && git clean -f &&
git checkout renamer^ 2>messages &&
test_i18ngrep "HEAD is now at 7329388" messages &&
test_line_count = 1 messages &&
H=$(git rev-parse --verify HEAD) &&
M=$(git show-ref -s --verify refs/heads/master) &&
test "z$H" = "z$M" &&
if git symbolic-ref HEAD >/dev/null 2>&1
then
echo "OOPS, HEAD is still symbolic???"
false
else
: happy
fi
Switched to branch 'renamer'
Removing errs
HEAD is now at 7329388 Initial A one, A two
ok 11 - checkout to detach HEAD (with advice declined)
expecting success:
git config advice.detachedHead true &&
git checkout -f renamer && git clean -f &&
GIT_TEST_GETTEXT_POISON=false git checkout renamer^ 2>messages &&
grep "HEAD is now at 7329388" messages &&
test_line_count -gt 1 messages &&
H=$(git rev-parse --verify HEAD) &&
M=$(git show-ref -s --verify refs/heads/master) &&
test "z$H" = "z$M" &&
if git symbolic-ref HEAD >/dev/null 2>&1
then
echo "OOPS, HEAD is still symbolic???"
false
else
: happy
fi
Previous HEAD position was 7329388 Initial A one, A two
Switched to branch 'renamer'
Removing messages
HEAD is now at 7329388 Initial A one, A two
ok 12 - checkout to detach HEAD
expecting success:
git checkout -f master && git clean -f &&
git checkout renamer^ &&
H=$(git rev-parse --verify HEAD) &&
M=$(git show-ref -s --verify refs/heads/master) &&
test "z$H" = "z$M" &&
if git symbolic-ref HEAD >/dev/null 2>&1
then
echo "OOPS, HEAD is still symbolic???"
false
else
: happy
fi
Switched to branch 'master'
Removing messages
Note: switching to 'renamer^'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 7329388 Initial A one, A two
ok 13 - checkout to detach HEAD with branchname^
expecting success:
git checkout -f master && git clean -f &&
git checkout ":/Initial" &&
H=$(git rev-parse --verify HEAD) &&
M=$(git show-ref -s --verify refs/heads/master) &&
test "z$H" = "z$M" &&
if git symbolic-ref HEAD >/dev/null 2>&1
then
echo "OOPS, HEAD is still symbolic???"
false
else
: happy
fi
Switched to branch 'master'
Note: switching to ':/Initial'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 7329388 Initial A one, A two
ok 14 - checkout to detach HEAD with :/message
expecting success:
git checkout -f master && git clean -f &&
git checkout HEAD^0 &&
H=$(git rev-parse --verify HEAD) &&
M=$(git show-ref -s --verify refs/heads/master) &&
test "z$H" = "z$M" &&
if git symbolic-ref HEAD >/dev/null 2>&1
then
echo "OOPS, HEAD is still symbolic???"
false
else
: happy
fi
Switched to branch 'master'
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 7329388 Initial A one, A two
ok 15 - checkout to detach HEAD with HEAD^0
expecting success:
git tag both side &&
git branch both master &&
git reset --hard &&
git checkout master &&
git checkout both &&
H=$(git rev-parse --verify HEAD) &&
M=$(git show-ref -s --verify refs/heads/master) &&
test "z$H" = "z$M" &&
name=$(git symbolic-ref HEAD 2>/dev/null) &&
test "z$name" = zrefs/heads/both
HEAD is now at 7329388 Initial A one, A two
Switched to branch 'master'
warning: refname 'both' is ambiguous.
Switched to branch 'both'
ok 16 - checkout with ambiguous tag/branch names
expecting success:
git reset --hard &&
git checkout master &&
git tag frotz side &&
git branch frotz master &&
git reset --hard &&
git checkout master &&
git checkout tags/frotz &&
H=$(git rev-parse --verify HEAD) &&
S=$(git show-ref -s --verify refs/heads/side) &&
test "z$H" = "z$S" &&
if name=$(git symbolic-ref HEAD 2>/dev/null)
then
echo "Bad -- should have detached"
false
else
: happy
fi
HEAD is now at 7329388 Initial A one, A two
Switched to branch 'master'
HEAD is now at 7329388 Initial A one, A two
Already on 'master'
Note: switching to 'tags/frotz'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at ab76817 Side M one, D two, A three
ok 17 - checkout with ambiguous tag/branch names
expecting success:
git reset --hard &&
git checkout master &&
mkdir subs &&
(
cd subs &&
git checkout side
) &&
! test -f subs/one &&
rm -fr subs
HEAD is now at ab76817 Side M one, D two, A three
Previous HEAD position was ab76817 Side M one, D two, A three
Switched to branch 'master'
Switched to branch 'side'
ok 18 - switch branches while in subdirectory
expecting success:
git reset --hard &&
git checkout side &&
mkdir subs &&
>subs/bero &&
git add subs/bero &&
git commit -m "add subs/bero" &&
git checkout master &&
mkdir -p subs &&
(
cd subs &&
git checkout side -- bero
) &&
test -f subs/bero
HEAD is now at ab76817 Side M one, D two, A three
Already on 'side'
[side bb04aa0] add subs/bero
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 subs/bero
Switched to branch 'master'
ok 19 - checkout specific path while in subdirectory
expecting success:
git config branch.autosetupmerge false &&
git checkout master &&
git checkout --track -b track1 &&
test "$(git config branch.track1.remote)" &&
test "$(git config branch.track1.merge)"
Already on 'master'
A subs/bero
Switched to a new branch 'track1'
A subs/bero
Branch 'track1' set up to track local branch 'master'.
ok 20 - checkout w/--track sets up tracking
expecting success:
test_when_finished git config branch.autosetupmerge false &&
git config branch.autosetupmerge always &&
git checkout master &&
git checkout -b track2 &&
test "$(git config branch.track2.remote)" &&
test "$(git config branch.track2.merge)"
Switched to branch 'master'
A subs/bero
Switched to a new branch 'track2'
A subs/bero
Branch 'track2' set up to track local branch 'master'.
ok 21 - checkout w/autosetupmerge=always sets up tracking
expecting success:
git checkout master^0 &&
test_must_fail git symbolic-ref HEAD &&
test_must_fail git checkout --track -b track &&
test_must_fail git rev-parse --verify track &&
test_must_fail git symbolic-ref HEAD &&
test "z$(git rev-parse master^0)" = "z$(git rev-parse HEAD)"
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 7329388 Initial A one, A two
A subs/bero
fatal: ref HEAD is not a symbolic ref
fatal: Cannot setup tracking information; starting point 'HEAD' is not a branch.
A subs/bero
fatal: Needed a single revision
fatal: ref HEAD is not a symbolic ref
ok 22 - checkout w/--track from non-branch HEAD fails
expecting success:
git checkout master^0 &&
test_must_fail git symbolic-ref HEAD &&
test_must_fail git checkout --track -b track frotz &&
test_must_fail git rev-parse --verify track &&
test_must_fail git symbolic-ref HEAD &&
test "z$(git rev-parse master^0)" = "z$(git rev-parse HEAD)"
HEAD is now at 7329388 Initial A one, A two
A subs/bero
fatal: ref HEAD is not a symbolic ref
warning: refname 'frotz' is ambiguous.
warning: refname 'frotz' is ambiguous.
fatal: Ambiguous object name: 'frotz'.
A subs/bero
fatal: Needed a single revision
fatal: ref HEAD is not a symbolic ref
ok 23 - checkout w/--track from tag fails
expecting success:
git checkout master &&
git config --bool core.prefersymlinkrefs yes &&
git checkout side &&
git checkout master &&
it=$(git symbolic-ref HEAD) &&
test "z$it" = zrefs/heads/master &&
here=$(git rev-parse --verify refs/heads/master) &&
git checkout side^ &&
test "z$(git rev-parse --verify refs/heads/master)" = "z$here"
Switched to branch 'master'
A subs/bero
Switched to branch 'side'
Switched to branch 'master'
Note: switching to 'side^'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at ab76817 Side M one, D two, A three
ok 24 - detach a symbolic link HEAD
expecting success:
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" &&
git update-ref refs/remotes/origin/koala/bear renamer &&
git checkout --track origin/koala/bear &&
test "refs/heads/koala/bear" = "$(git symbolic-ref HEAD)" &&
test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)" &&
git checkout master && git branch -D koala/bear &&
git checkout --track refs/remotes/origin/koala/bear &&
test "refs/heads/koala/bear" = "$(git symbolic-ref HEAD)" &&
test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)" &&
git checkout master && git branch -D koala/bear &&
git checkout --track remotes/origin/koala/bear &&
test "refs/heads/koala/bear" = "$(git symbolic-ref HEAD)" &&
test "$(git rev-parse HEAD)" = "$(git rev-parse renamer)"
Previous HEAD position was ab76817 Side M one, D two, A three
Switched to a new branch 'koala/bear'
Branch 'koala/bear' set up to track remote branch 'koala/bear' from 'origin'.
Switched to branch 'master'
Deleted branch koala/bear (was 0420b41).
Switched to a new branch 'koala/bear'
Branch 'koala/bear' set up to track remote branch 'koala/bear' from 'origin'.
Switched to branch 'master'
Deleted branch koala/bear (was 0420b41).
Switched to a new branch 'koala/bear'
Branch 'koala/bear' set up to track remote branch 'koala/bear' from 'origin'.
ok 25 - checkout with --track fakes a sensible -b <name>
expecting success:
test_must_fail git checkout --track renamer
fatal: missing branch name; try -b
ok 26 - checkout with --track, but without -b, fails with too short tracked name
expecting success:
setup_conflicting_index &&
echo "none of the above" >sample &&
cat sample >fild &&
cat sample >file &&
cat sample >filf &&
test_must_fail git checkout fild file filf &&
test_cmp sample fild &&
test_cmp sample filf &&
test_cmp sample file
error: path 'file' is unmerged
ok 27 - checkout an unmerged path should fail
expecting success:
setup_conflicting_index &&
echo "none of the above" >sample &&
echo ourside >expect &&
cat sample >fild &&
cat sample >file &&
cat sample >filf &&
git checkout -f fild file filf &&
test_cmp expect fild &&
test_cmp expect filf &&
test_cmp sample file
warning: path 'file' is unmerged
Updated 2 paths from the index
ok 28 - checkout with an unmerged path can be ignored
expecting success:
setup_conflicting_index &&
echo "none of the above" >sample &&
echo ourside >expect &&
cat sample >fild &&
cat sample >file &&
cat sample >filf &&
git checkout --ours . &&
test_cmp expect fild &&
test_cmp expect filf &&
test_cmp expect file &&
git checkout --theirs file &&
test ztheirside = "z$(cat file)"
Updated 3 paths from the index
Updated 1 path from the index
ok 29 - checkout unmerged stage
expecting success:
setup_conflicting_index &&
echo "none of the above" >sample &&
echo ourside >expect &&
cat sample >fild &&
cat sample >file &&
cat sample >filf &&
git checkout -m -- fild file filf &&
(
echo "<<<<<<< ours" &&
echo ourside &&
echo "=======" &&
echo theirside &&
echo ">>>>>>> theirs"
) >merged &&
test_cmp expect fild &&
test_cmp expect filf &&
test_cmp merged file
ok 30 - checkout with --merge
expecting success:
git config merge.conflictstyle diff3 &&
setup_conflicting_index &&
echo "none of the above" >sample &&
echo ourside >expect &&
cat sample >fild &&
cat sample >file &&
cat sample >filf &&
git checkout -m -- fild file filf &&
(
echo "<<<<<<< ours" &&
echo ourside &&
echo "||||||| base" &&
echo original &&
echo "=======" &&
echo theirside &&
echo ">>>>>>> theirs"
) >merged &&
test_cmp expect fild &&
test_cmp expect filf &&
test_cmp merged file
ok 31 - checkout with --merge, in diff3 -m style
expecting success:
git config merge.conflictstyle diff3 &&
setup_conflicting_index &&
echo "none of the above" >sample &&
echo ourside >expect &&
cat sample >fild &&
cat sample >file &&
cat sample >filf &&
git checkout --conflict=merge -- fild file filf &&
(
echo "<<<<<<< ours" &&
echo ourside &&
echo "=======" &&
echo theirside &&
echo ">>>>>>> theirs"
) >merged &&
test_cmp expect fild &&
test_cmp expect filf &&
test_cmp merged file
ok 32 - checkout --conflict=merge, overriding config
expecting success:
test_unconfig merge.conflictstyle &&
setup_conflicting_index &&
echo "none of the above" >sample &&
echo ourside >expect &&
cat sample >fild &&
cat sample >file &&
cat sample >filf &&
git checkout --conflict=diff3 -- fild file filf &&
(
echo "<<<<<<< ours" &&
echo ourside &&
echo "||||||| base" &&
echo original &&
echo "=======" &&
echo theirside &&
echo ">>>>>>> theirs"
) >merged &&
test_cmp expect fild &&
test_cmp expect filf &&
test_cmp merged file
ok 33 - checkout --conflict=diff3
expecting success:
git reset --hard master &&
git symbolic-ref HEAD refs/heads/master &&
test_must_fail git checkout -b renamer side^ &&
test $(git symbolic-ref HEAD) = refs/heads/master &&
git diff --exit-code &&
git diff --cached --exit-code
HEAD is now at 7329388 Initial A one, A two
fatal: A branch named 'renamer' already exists.
ok 34 - failing checkout -b should not break working tree
expecting success:
git reset --hard master &&
git checkout master^0 &&
echo modified >one &&
test_must_fail git checkout renamer 2>error.log &&
! grep "^Previous HEAD" error.log
HEAD is now at 7329388 Initial A one, A two
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 7329388 Initial A one, A two
ok 35 - switch out of non-branch
expecting success:
git reset --hard &&
git config merge.filfre.driver "./filfre.sh %O %A %B" &&
git config merge.filfre.name "Feel-free merge driver" &&
git config merge.filfre.recursive binary &&
echo "arm merge=filfre" >.gitattributes &&
git checkout -b left &&
echo neutral >arm &&
git add arm .gitattributes &&
test_tick &&
git commit -m neutral &&
git branch right &&
echo left >arm &&
test_tick &&
git commit -a -m left &&
git checkout right &&
echo right >arm &&
test_tick &&
git commit -a -m right &&
test_must_fail git merge left &&
(
for t in filfre-common left right
do
grep $t arm || exit 1
done
) &&
mv arm expect &&
git checkout -m arm &&
test_cmp expect arm
HEAD is now at 7329388 Initial A one, A two
Switched to a new branch 'left'
[left b257dc6] neutral
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+)
create mode 100644 .gitattributes
create mode 100644 arm
[left 2459c9d] left
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'right'
[right 6b476b9] right
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Merging:
6b476b9 right
virtual left
found 1 common ancestor:
b257dc6 neutral
Auto-merging arm
CONFLICT (content): Merge conflict in arm
Automatic merge failed; fix conflicts and then commit the result.
||||||| filfre-common
left
right
Recreated 1 merge conflict
ok 36 - custom merge driver with checkout -m
# passed all 36 test(s)
1..36
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7301-clean-interactive.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7301-clean-interactive/.git/
expecting success:
mkdir -p src &&
touch src/part1.c Makefile &&
echo build >.gitignore &&
echo \*.o >>.gitignore &&
git add . &&
git commit -m setup &&
touch src/part2.c README &&
git add .
[master (root-commit) f34247a] setup
Author: A U Thor <author@example.com>
3 files changed, 2 insertions(+)
create mode 100644 .gitignore
create mode 100644 Makefile
create mode 100644 src/part1.c
ok 1 - setup
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
echo c | git clean -i &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test -f docs/manual.txt &&
test ! -f src/part3.c &&
test ! -f src/part3.h &&
test ! -f src/part4.c &&
test ! -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
a.out src/part3.c src/part3.h src/part4.c src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Removing a.out
Removing src/part3.c
Removing src/part3.h
Removing src/part4.c
Removing src/part4.h
ok 2 - git clean -i (c: clean hotkey)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
echo cl | git clean -i &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test -f docs/manual.txt &&
test ! -f src/part3.c &&
test ! -f src/part3.h &&
test ! -f src/part4.c &&
test ! -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
a.out src/part3.c src/part3.h src/part4.c src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Removing a.out
Removing src/part3.c
Removing src/part3.h
Removing src/part4.c
Removing src/part4.h
ok 3 - git clean -i (cl: clean prefix)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
echo quit | git clean -i &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test -f docs/manual.txt &&
test -f src/part3.c &&
test -f src/part3.h &&
test -f src/part4.c &&
test -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
a.out src/part3.c src/part3.h src/part4.c src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Bye.
ok 4 - git clean -i (quit)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
echo "\04" | git clean -i &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test -f docs/manual.txt &&
test -f src/part3.c &&
test -f src/part3.h &&
test -f src/part4.c &&
test -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
a.out src/part3.c src/part3.h src/part4.c src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Huh ()?
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Bye.
ok 5 - git clean -i (Ctrl+D)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
test_write_lines f "*" "" c |
git clean -id &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test -f docs/manual.txt &&
test -f src/part3.c &&
test -f src/part3.h &&
test -f src/part4.c &&
test -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
a.out src/part3.c src/part4.c
docs/ src/part3.h src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> a.out src/part3.c src/part4.c
docs/ src/part3.h src/part4.h
Input ignore patterns>> No more files to clean, exiting.
ok 6 - git clean -id (filter all)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
test_write_lines f "part3.* *.out" "" c |
git clean -id &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test ! -f docs/manual.txt &&
test -f src/part3.c &&
test -f src/part3.h &&
test ! -f src/part4.c &&
test ! -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
a.out src/part3.c src/part4.c
docs/ src/part3.h src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> a.out src/part3.c src/part4.c
docs/ src/part3.h src/part4.h
Input ignore patterns>> docs/ src/part4.c src/part4.h
Input ignore patterns>> Would remove the following items:
docs/ src/part4.c src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Removing docs/
Removing src/part4.c
Removing src/part4.h
ok 7 - git clean -id (filter patterns)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
test_write_lines f "* !*.out" "" c |
git clean -id &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test -f docs/manual.txt &&
test -f src/part3.c &&
test -f src/part3.h &&
test -f src/part4.c &&
test -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
a.out src/part3.c src/part4.c
docs/ src/part3.h src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> a.out src/part3.c src/part4.c
docs/ src/part3.h src/part4.h
Input ignore patterns>> a.out
Input ignore patterns>> Would remove the following item:
a.out
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Removing a.out
ok 8 - git clean -id (filter patterns 2)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
test_write_lines s "*" "" c |
git clean -id &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test ! -f docs/manual.txt &&
test ! -f src/part3.c &&
test ! -f src/part3.h &&
test ! -f src/part4.c &&
test ! -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
a.out src/part3.c src/part4.c
docs/ src/part3.h src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> 1: a.out 2: docs/ 3: src/part3.c 4: src/part3.h
5: src/part4.c 6: src/part4.h
Select items to delete>> * 1: a.out * 2: docs/ * 3: src/part3.c * 4: src/part3.h
* 5: src/part4.c * 6: src/part4.h
Select items to delete>> Would remove the following items:
a.out src/part3.c src/part4.c
docs/ src/part3.h src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Removing a.out
Removing docs/
Removing src/part3.c
Removing src/part3.h
Removing src/part4.c
Removing src/part4.h
ok 9 - git clean -id (select - all)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
test_write_lines s "" c |
git clean -id &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test -f docs/manual.txt &&
test -f src/part3.c &&
test -f src/part3.h &&
test -f src/part4.c &&
test -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
a.out src/part3.c src/part4.c
docs/ src/part3.h src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> 1: a.out 2: docs/ 3: src/part3.c 4: src/part3.h
5: src/part4.c 6: src/part4.h
Select items to delete>> No more files to clean, exiting.
ok 10 - git clean -id (select - none)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
test_write_lines s 3 "" c |
git clean -id &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test -f docs/manual.txt &&
test ! -f src/part3.c &&
test -f src/part3.h &&
test -f src/part4.c &&
test -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
a.out src/part3.c src/part4.c
docs/ src/part3.h src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> 1: a.out 2: docs/ 3: src/part3.c 4: src/part3.h
5: src/part4.c 6: src/part4.h
Select items to delete>> 1: a.out 2: docs/ * 3: src/part3.c 4: src/part3.h
5: src/part4.c 6: src/part4.h
Select items to delete>> Would remove the following item:
src/part3.c
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Removing src/part3.c
ok 11 - git clean -id (select - number)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
test_write_lines s "2 3" 5 "" c |
git clean -id &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test ! -f docs/manual.txt &&
test ! -f src/part3.c &&
test -f src/part3.h &&
test ! -f src/part4.c &&
test -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
a.out src/part3.c src/part4.c
docs/ src/part3.h src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> 1: a.out 2: docs/ 3: src/part3.c 4: src/part3.h
5: src/part4.c 6: src/part4.h
Select items to delete>> 1: a.out * 2: docs/ * 3: src/part3.c 4: src/part3.h
5: src/part4.c 6: src/part4.h
Select items to delete>> 1: a.out * 2: docs/ * 3: src/part3.c 4: src/part3.h
* 5: src/part4.c 6: src/part4.h
Select items to delete>> Would remove the following items:
docs/ src/part3.c src/part4.c
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Removing docs/
Removing src/part3.c
Removing src/part4.c
ok 12 - git clean -id (select - number 2)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
test_write_lines s "3,4 5" "" c |
git clean -id &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test -f docs/manual.txt &&
test ! -f src/part3.c &&
test ! -f src/part3.h &&
test ! -f src/part4.c &&
test -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
a.out src/part3.c src/part4.c
docs/ src/part3.h src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> 1: a.out 2: docs/ 3: src/part3.c 4: src/part3.h
5: src/part4.c 6: src/part4.h
Select items to delete>> 1: a.out 2: docs/ * 3: src/part3.c * 4: src/part3.h
* 5: src/part4.c 6: src/part4.h
Select items to delete>> Would remove the following items:
src/part3.c src/part3.h src/part4.c
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Removing src/part3.c
Removing src/part3.h
Removing src/part4.c
ok 13 - git clean -id (select - number 3)
expecting success:
mkdir -p build docs &&
touch a.out foo.txt bar.txt baz.txt &&
test_write_lines s "a.out fo ba bar" "" c |
git clean -id &&
test -f Makefile &&
test ! -f a.out &&
test ! -f foo.txt &&
test ! -f bar.txt &&
test -f baz.txt &&
rm baz.txt
Would remove the following items:
a.out baz.txt foo.txt
bar.txt docs/ src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> 1: a.out 2: bar.txt 3: baz.txt 4: docs/
5: foo.txt 6: src/part4.h
Select items to delete>> Huh (ba)?
* 1: a.out * 2: bar.txt 3: baz.txt 4: docs/
* 5: foo.txt 6: src/part4.h
Select items to delete>> Would remove the following items:
a.out bar.txt foo.txt
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Removing a.out
Removing bar.txt
Removing foo.txt
ok 14 - git clean -id (select - filenames)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
test_write_lines s "1,3-4" 2 "" c |
git clean -id &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test ! -f src/part3.c &&
test ! -f src/part3.h &&
test -f src/part4.c &&
test -f src/part4.h &&
test ! -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
a.out src/part3.c src/part4.c
docs/ src/part3.h src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> 1: a.out 2: docs/ 3: src/part3.c 4: src/part3.h
5: src/part4.c 6: src/part4.h
Select items to delete>> * 1: a.out 2: docs/ * 3: src/part3.c * 4: src/part3.h
5: src/part4.c 6: src/part4.h
Select items to delete>> * 1: a.out * 2: docs/ * 3: src/part3.c * 4: src/part3.h
5: src/part4.c 6: src/part4.h
Select items to delete>> Would remove the following items:
a.out docs/ src/part3.c src/part3.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Removing a.out
Removing docs/
Removing src/part3.c
Removing src/part3.h
ok 15 - git clean -id (select - range)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
test_write_lines s "4- 1" "" c |
git clean -id &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test -f docs/manual.txt &&
test -f src/part3.c &&
test ! -f src/part3.h &&
test ! -f src/part4.c &&
test ! -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
a.out src/part3.c src/part4.c
docs/ src/part3.h src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> 1: a.out 2: docs/ 3: src/part3.c 4: src/part3.h
5: src/part4.c 6: src/part4.h
Select items to delete>> * 1: a.out 2: docs/ 3: src/part3.c * 4: src/part3.h
* 5: src/part4.c * 6: src/part4.h
Select items to delete>> Would remove the following items:
a.out src/part3.h src/part4.c src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Removing a.out
Removing src/part3.h
Removing src/part4.c
Removing src/part4.h
ok 16 - git clean -id (select - range 2)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
test_write_lines s "*" "-5- 1 -2" "" c |
git clean -id &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test -f docs/manual.txt &&
test ! -f src/part3.c &&
test ! -f src/part3.h &&
test -f src/part4.c &&
test -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
a.out src/part3.c src/part4.c
docs/ src/part3.h src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> 1: a.out 2: docs/ 3: src/part3.c 4: src/part3.h
5: src/part4.c 6: src/part4.h
Select items to delete>> * 1: a.out * 2: docs/ * 3: src/part3.c * 4: src/part3.h
* 5: src/part4.c * 6: src/part4.h
Select items to delete>> * 1: a.out 2: docs/ * 3: src/part3.c * 4: src/part3.h
5: src/part4.c 6: src/part4.h
Select items to delete>> Would remove the following items:
a.out src/part3.c src/part3.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Removing a.out
Removing src/part3.c
Removing src/part3.h
ok 17 - git clean -id (inverse select)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
test_write_lines a Y y no yes bad "" |
git clean -id &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test ! -f docs/manual.txt &&
test -f src/part3.c &&
test ! -f src/part3.h &&
test -f src/part4.c &&
test -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
a.out src/part3.c src/part4.c
docs/ src/part3.h src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Remove a.out [y/N]? Remove docs/ [y/N]? Remove src/part3.c [y/N]? Remove src/part3.h [y/N]? Remove src/part4.c [y/N]? Remove src/part4.h [y/N]? Removing a.out
Removing docs/
Removing src/part3.h
ok 18 - git clean -id (ask)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
test_write_lines a Y no yes "\04" |
git clean -id &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test -f docs/manual.txt &&
test ! -f src/part3.c &&
test -f src/part3.h &&
test -f src/part4.c &&
test -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
a.out src/part3.c src/part4.c
docs/ src/part3.h src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Remove a.out [y/N]? Remove docs/ [y/N]? Remove src/part3.c [y/N]? Remove src/part3.h [y/N]? Remove src/part4.c [y/N]?
Removing a.out
Removing src/part3.c
ok 19 - git clean -id (ask - Ctrl+D)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
(cd build/ &&
test_write_lines f docs "*.h" "" c |
git clean -id ..) &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test -f docs/manual.txt &&
test ! -f src/part3.c &&
test -f src/part3.h &&
test ! -f src/part4.c &&
test -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
../a.out ../src/part3.c ../src/part4.c
../docs/ ../src/part3.h ../src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> ../a.out ../src/part3.c ../src/part4.c
../docs/ ../src/part3.h ../src/part4.h
Input ignore patterns>> ../a.out ../src/part3.h ../src/part4.h
../src/part3.c ../src/part4.c
Input ignore patterns>> ../a.out ../src/part3.c ../src/part4.c
Input ignore patterns>> Would remove the following items:
../a.out ../src/part3.c ../src/part4.c
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Removing ../a.out
Removing ../src/part3.c
Removing ../src/part4.c
ok 20 - git clean -id with prefix and path (filter)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
(cd build/ &&
test_write_lines s ../docs/ ../src/part3.c ../src/part4.c "" c |
git clean -id ..) &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test ! -f docs/manual.txt &&
test ! -f src/part3.c &&
test -f src/part3.h &&
test ! -f src/part4.c &&
test -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
../a.out ../src/part3.c ../src/part4.c
../docs/ ../src/part3.h ../src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> 1: ../a.out 2: ../docs/ 3: ../src/part3.c
4: ../src/part3.h 5: ../src/part4.c 6: ../src/part4.h
Select items to delete>> 1: ../a.out * 2: ../docs/ 3: ../src/part3.c
4: ../src/part3.h 5: ../src/part4.c 6: ../src/part4.h
Select items to delete>> 1: ../a.out * 2: ../docs/ * 3: ../src/part3.c
4: ../src/part3.h 5: ../src/part4.c 6: ../src/part4.h
Select items to delete>> 1: ../a.out * 2: ../docs/ * 3: ../src/part3.c
4: ../src/part3.h * 5: ../src/part4.c 6: ../src/part4.h
Select items to delete>> Would remove the following items:
../docs/ ../src/part3.c ../src/part4.c
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Removing ../docs/
Removing ../src/part3.c
Removing ../src/part4.c
ok 21 - git clean -id with prefix and path (select by name)
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
docs/manual.txt obj.o build/lib.so &&
(cd build/ &&
test_write_lines a Y y no yes bad "" |
git clean -id ..) &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test ! -f docs/manual.txt &&
test -f src/part3.c &&
test ! -f src/part3.h &&
test -f src/part4.c &&
test -f src/part4.h &&
test -f obj.o &&
test -f build/lib.so
Would remove the following items:
../a.out ../src/part3.c ../src/part4.c
../docs/ ../src/part3.h ../src/part4.h
*** Commands ***
1: clean 2: filter by pattern 3: select by numbers
4: ask each 5: quit 6: help
What now> Remove ../a.out [y/N]? Remove ../docs/ [y/N]? Remove ../src/part3.c [y/N]? Remove ../src/part3.h [y/N]? Remove ../src/part4.c [y/N]? Remove ../src/part4.h [y/N]? Removing ../a.out
Removing ../docs/
Removing ../src/part3.h
ok 22 - git clean -id with prefix and path (ask)
checking prerequisite: TTY
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
test_have_prereq PERL &&
# Reading from the pty master seems to get stuck _sometimes_
# on Mac OS X 10.5.0, using Perl 5.10.0 or 5.8.9.
#
# Reproduction recipe: run
#
# i=0
# while ./test-terminal.perl echo hi $i
# do
# : $((i = $i + 1))
# done
#
# After 2000 iterations or so it hangs.
# https://rt.cpan.org/Ticket/Display.html?id=65692
#
test "$(uname -s)" != Darwin &&
perl "$TEST_DIRECTORY"/test-terminal.perl \
sh -c "test -t 1 && test -t 2"
)
prerequisite TTY ok
expecting success:
>a.out &&
echo q |
test_terminal git clean -i |
test_decode_color |
head -n 1 >header &&
# not i18ngrep
grep "^<BOLD>" header
<BOLD>Would remove the following items:
ok 23 - git clean -i paints the header in HEADER color
# passed all 23 test(s)
1..23
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7300-clean.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7300-clean/.git/
expecting success:
mkdir -p src &&
touch src/part1.c Makefile &&
echo build >.gitignore &&
echo \*.o >>.gitignore &&
git add . &&
git commit -m setup &&
touch src/part2.c README &&
git add .
[master (root-commit) f34247a] setup
Author: A U Thor <author@example.com>
3 files changed, 2 insertions(+)
create mode 100644 .gitignore
create mode 100644 Makefile
create mode 100644 src/part1.c
ok 1 - setup
expecting success:
git update-index --skip-worktree .gitignore &&
rm .gitignore &&
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git clean &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test ! -f src/part3.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so &&
git update-index --no-skip-worktree .gitignore &&
git checkout .gitignore
Removing a.out
Removing src/part3.c
Updated 1 path from the index
ok 2 - git clean with skip-worktree .gitignore
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git clean &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test ! -f src/part3.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Removing a.out
Removing src/part3.c
ok 3 - git clean
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git clean src/ &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test ! -f src/part3.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Removing src/part3.c
ok 4 - git clean src/
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git clean src/ src/ &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test ! -f src/part3.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Removing src/part3.c
ok 5 - git clean src/ src/
expecting success:
mkdir -p build docs src/test &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so src/test/1.c &&
(cd src/ && git clean) &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test ! -f src/part3.c &&
test -f src/test/1.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Removing part3.c
ok 6 - git clean with prefix
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
would_clean=$(
cd docs &&
git clean -n ../src |
sed -n -e "s|^Would remove ||p"
) &&
verbose test "$would_clean" = ../src/part3.c
ok 7 - git clean with relative prefix
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
would_clean=$(
cd docs &&
git clean -n "$(pwd)/../src" |
sed -n -e "s|^Would remove ||p"
) &&
verbose test "$would_clean" = ../src/part3.c
ok 8 - git clean with absolute path
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
(
cd docs &&
test_must_fail git clean -n ../..
)
fatal: ../..: '../..' is outside repository
ok 9 - git clean with out of work tree relative path
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
dd=$(cd .. && pwd) &&
(
cd docs &&
test_must_fail git clean -n $dd
)
fatal: /<<PKGBUILDDIR>>/t: '/<<PKGBUILDDIR>>/t' is outside repository
ok 10 - git clean with out of work tree absolute path
expecting success:
mkdir -p build docs src/feature &&
touch a.out src/part3.c src/feature/file.c docs/manual.txt obj.o build/lib.so &&
(cd src/ && git clean -d feature/) &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test -f src/part3.c &&
test ! -f src/feature/file.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Removing feature/file.c
ok 11 - git clean -d with prefix and path
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:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
ln -s docs/manual.txt src/part4.c &&
git clean &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test ! -f src/part3.c &&
test ! -f src/part4.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Removing a.out
Removing src/part3.c
Removing src/part4.c
ok 12 - git clean symbolic link
expecting success:
touch a.clean b.clean other.c &&
git clean "*.clean" &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.clean &&
test ! -f b.clean &&
test -f other.c
Removing a.clean
Removing b.clean
ok 13 - git clean with wildcard
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git clean -n &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test -f src/part3.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Would remove a.out
Would remove other.c
Would remove src/part3.c
ok 14 - git clean -n
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git clean -d &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test ! -f src/part3.c &&
test ! -d docs &&
test -f obj.o &&
test -f build/lib.so
Removing a.out
Removing docs/
Removing other.c
Removing src/feature/
Removing src/part3.c
Removing src/test/
ok 15 - git clean -d
expecting success:
mkdir -p build docs examples &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so examples/1.c &&
git clean -d src/ examples/ &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test ! -f src/part3.c &&
test ! -f examples/1.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Removing examples/
Removing src/part3.c
ok 16 - git clean -d src/ examples/
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git clean -x &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test ! -f src/part3.c &&
test -f docs/manual.txt &&
test ! -f obj.o &&
test -f build/lib.so
Removing a.out
Removing obj.o
Removing src/part3.c
ok 17 - git clean -x
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git clean -d -x &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test ! -f src/part3.c &&
test ! -d docs &&
test ! -f obj.o &&
test ! -d build
Removing a.out
Removing build/
Removing docs/
Removing obj.o
Removing src/part3.c
ok 18 - git clean -d -x
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git clean -d -x -e src &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test -f src/part3.c &&
test ! -d docs &&
test ! -f obj.o &&
test ! -d build
Removing a.out
Removing build/
Removing docs/
Removing obj.o
ok 19 - git clean -d -x with ignored tracked directory
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git clean -X &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test -f src/part3.c &&
test -f docs/manual.txt &&
test ! -f obj.o &&
test -f build/lib.so
Removing obj.o
ok 20 - git clean -X
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git clean -d -X &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test -f src/part3.c &&
test -f docs/manual.txt &&
test ! -f obj.o &&
test ! -d build
Removing build/
Removing obj.o
ok 21 - git clean -d -X
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git clean -d -X -e src &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test ! -f src/part3.c &&
test -f docs/manual.txt &&
test ! -f obj.o &&
test ! -d build
Removing build/
Removing obj.o
Removing src/part3.c
ok 22 - git clean -d -X with ignored tracked directory
expecting success:
git config --unset clean.requireForce &&
test_must_fail git clean
fatal: clean.requireForce defaults to true and neither -i, -n, nor -f given; refusing to clean
ok 23 - clean.requireForce defaults to true
expecting success:
git config clean.requireForce true &&
test_must_fail git clean
fatal: clean.requireForce set to true and neither -i, -n, nor -f given; refusing to clean
ok 24 - clean.requireForce
expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git clean -n &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test -f src/part3.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Would remove a.out
Would remove src/part3.c
ok 25 - clean.requireForce and -n
expecting success:
git clean -f &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test ! -f src/part3.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Removing a.out
Removing src/part3.c
ok 26 - clean.requireForce and -f
expecting success:
echo excludes >excludes &&
echo included >included &&
git config core.excludesfile excludes &&
output=$(git clean -n excludes included 2>&1) &&
expr "$output" : ".*included" >/dev/null &&
! expr "$output" : ".*excludes" >/dev/null
ok 27 - core.excludesfile
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 -r SANETESTD.1/x &&
chmod -rx SANETESTD.2 ||
BUG "cannot prepare SANETESTD"
! test -r SANETESTD.1/x &&
! rm SANETESTD.1/x && ! test -f SANETESTD.2/x
status=$?
chmod +rwx SANETESTD.1 SANETESTD.2 &&
rm -rf SANETESTD.1 SANETESTD.2 ||
BUG "cannot clean SANETESTD"
return $status
)
rm: cannot remove 'SANETESTD.1/x': Permission denied
prerequisite SANITY ok
expecting success:
mkdir foo &&
touch foo/bar &&
test_when_finished "chmod 755 foo" &&
(exec <foo/bar &&
chmod 0 foo &&
test_must_fail git clean -f -d)
warning: could not open directory 'foo/': Permission denied
warning: failed to remove foo/: Directory not empty
Removing docs/
Removing included
ok 28 - removal failure
expecting success:
rm -fr foo bar baz &&
mkdir -p foo bar baz/boo &&
(
cd foo &&
git init &&
test_commit nested hello.world
) &&
(
cd bar &&
>goodbye.people
) &&
(
cd baz/boo &&
git init &&
test_commit deeply.nested deeper.world
) &&
git clean -f -d &&
test -f foo/.git/index &&
test -f foo/hello.world &&
test -f baz/boo/.git/index &&
test -f baz/boo/deeper.world &&
! test -d bar
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7300-clean/foo/.git/
[master (root-commit) abd8674] nested
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 hello.world
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7300-clean/baz/boo/.git/
[master (root-commit) 3f7f1fc] deeply.nested
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 deeper.world
Removing bar/
Skipping repository baz/boo
Skipping repository foo/
ok 29 - nested git work tree
expecting success:
rm -fr almost_git almost_bare_git almost_submodule &&
mkdir -p almost_git/.git/objects &&
mkdir -p almost_git/.git/refs &&
cat >almost_git/.git/HEAD <<-\EOF &&
garbage
EOF
cp -r almost_git/.git/ almost_bare_git &&
mkdir almost_submodule/ &&
cat >almost_submodule/.git <<-\EOF &&
garbage
EOF
test_when_finished "rm -rf almost_*" &&
git clean -f -d &&
test_path_is_missing almost_git &&
test_path_is_missing almost_bare_git &&
test_path_is_missing almost_submodule
Removing almost_bare_git/
Removing almost_git/
Removing almost_submodule/
Skipping repository baz/boo
Skipping repository foo/
ok 30 - should clean things that almost look like git but are not
expecting success:
rm -fr repo to_clean sub1 sub2 &&
mkdir repo to_clean &&
(
cd repo &&
git init &&
test_commit msg hello.world
) &&
git submodule add ./repo/.git sub1 &&
git commit -m "sub1" &&
git branch before_sub2 &&
git submodule add ./repo/.git sub2 &&
git commit -m "sub2" &&
git checkout before_sub2 &&
>to_clean/should_clean.this &&
git clean -f -d &&
test_path_is_file repo/.git/index &&
test_path_is_file repo/hello.world &&
test_path_is_file sub1/.git &&
test_path_is_file sub1/hello.world &&
test_path_is_file sub2/.git &&
test_path_is_file sub2/hello.world &&
test_path_is_missing to_clean
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7300-clean/repo/.git/
[master (root-commit) 1af9d3b] msg
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 hello.world
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7300-clean/sub1'...
done.
[master 7c70b5e] sub1
Author: A U Thor <author@example.com>
4 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 100644 README
create mode 100644 src/part2.c
create mode 160000 sub1
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7300-clean/sub2'...
done.
[master 3292411] sub2
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 160000 sub2
warning: unable to rmdir 'sub2': Directory not empty
Switched to branch 'before_sub2'
Skipping repository baz/boo
Skipping repository foo/
Skipping repository repo/
Skipping repository sub2/
Removing to_clean/
ok 31 - should not clean submodules
expecting success:
rm -fr to_clean possible_sub1 &&
mkdir to_clean possible_sub1 &&
test_when_finished "rm -rf possible_sub*" &&
echo "gitdir: foo" >possible_sub1/.git &&
>possible_sub1/hello.world &&
chmod 0 possible_sub1/.git &&
>to_clean/should_clean.this &&
git clean -f -d &&
test_path_is_file possible_sub1/.git &&
test_path_is_file possible_sub1/hello.world &&
test_path_is_missing to_clean
Skipping repository baz/boo
Skipping repository foo/
Skipping repository possible_sub1/
Skipping repository repo/
Skipping repository sub2/
Removing to_clean/
ok 32 - should avoid cleaning possible submodules
expecting success:
rm -fr empty_repo to_clean &&
git init empty_repo &&
mkdir to_clean &&
>to_clean/should_clean.this &&
git clean -f -d &&
test_path_is_file empty_repo/.git/HEAD &&
test_path_is_missing to_clean
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7300-clean/empty_repo/.git/
Skipping repository baz/boo
Skipping repository empty_repo/
Skipping repository foo/
Skipping repository repo/
Skipping repository sub2/
Removing to_clean/
ok 33 - nested (empty) git should be kept
expecting success:
rm -fr bare1 bare2 subdir &&
git init --bare bare1 &&
git clone --local --bare . bare2 &&
mkdir subdir &&
cp -r bare2 subdir/bare3 &&
git clean -f -d &&
test_path_is_missing bare1 &&
test_path_is_missing bare2 &&
test_path_is_missing subdir
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7300-clean/bare1/
Cloning into bare repository 'bare2'...
done.
Removing bare1/
Removing bare2/
Skipping repository baz/boo
Skipping repository empty_repo/
Skipping repository foo/
Skipping repository repo/
Skipping repository sub2/
Removing subdir/
ok 34 - nested bare repositories should be cleaned
checking known breakage:
rm -fr strange_bare &&
mkdir strange_bare &&
git init --bare strange_bare/.git &&
git clean -f -d &&
test_path_is_missing strange_bare
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7300-clean/strange_bare/.git/
Skipping repository baz/boo
Skipping repository empty_repo/
Skipping repository foo/
Skipping repository repo/
Skipping repository strange_bare/
Skipping repository sub2/
Path exists:
drwxrwxr-x 1 buildd buildd 8 Aug 14 07:35 strange_bare
strange_bare
not ok 35 - nested (empty) bare repositories should be cleaned even when in .git # TODO known breakage
checking known breakage:
rm -fr strange_bare &&
mkdir strange_bare &&
git clone --local --bare . strange_bare/.git &&
git clean -f -d &&
test_path_is_missing strange_bare
Cloning into bare repository 'strange_bare/.git'...
done.
Skipping repository baz/boo
Skipping repository empty_repo/
Skipping repository foo/
Skipping repository repo/
Skipping repository strange_bare/
Skipping repository sub2/
Path exists:
drwxrwxr-x 1 buildd buildd 8 Aug 14 07:35 strange_bare
strange_bare
not ok 36 - nested (non-empty) bare repositories should be cleaned even when in .git # TODO known breakage
expecting success:
rm -fr repo &&
mkdir repo &&
(
cd repo &&
git init &&
mkdir -p bar/baz &&
test_commit msg bar/baz/hello.world
) &&
git clean -f -d repo/bar/baz &&
test_path_is_file repo/.git/HEAD &&
test_path_is_dir repo/bar/ &&
test_path_is_missing repo/bar/baz
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7300-clean/repo/.git/
[master (root-commit) 14dba50] msg
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 bar/baz/hello.world
Removing repo/bar/baz/
ok 37 - giving path in nested git work tree will remove it
expecting success:
rm -fr repo &&
mkdir repo untracked &&
(
cd repo &&
git init &&
test_commit msg hello.world
) &&
git clean -f -d repo/.git &&
test_path_is_file repo/.git/HEAD &&
test_path_is_dir repo/.git/refs &&
test_path_is_dir repo/.git/objects &&
test_path_is_dir untracked/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7300-clean/repo/.git/
[master (root-commit) 1af9d3b] msg
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 hello.world
ok 38 - giving path to nested .git will not remove it
expecting success:
rm -fr repo untracked &&
mkdir repo untracked &&
(
cd repo &&
git init &&
test_commit msg hello.world
) &&
git clean -f -d repo/.git/ &&
test_path_is_dir repo/.git &&
test_dir_is_empty repo/.git &&
test_path_is_dir untracked/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7300-clean/repo/.git/
[master (root-commit) 1af9d3b] msg
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 hello.world
Removing repo/.git/COMMIT_EDITMSG
Removing repo/.git/HEAD
Removing repo/.git/branches/
Removing repo/.git/config
Removing repo/.git/description
Removing repo/.git/hooks/
Removing repo/.git/index
Removing repo/.git/info/
Removing repo/.git/logs/
Removing repo/.git/objects/
Removing repo/.git/refs/
ok 39 - giving path to nested .git/ will remove contents
expecting success:
rm -fr foo bar baz &&
mkdir -p foo bar baz/boo &&
(
cd foo &&
git init &&
test_commit nested hello.world
) &&
(
cd bar &&
>goodbye.people
) &&
(
cd baz/boo &&
git init &&
test_commit deeply.nested deeper.world
) &&
git clean -f -f -d &&
! test -d foo &&
! test -d bar &&
! test -d baz
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7300-clean/foo/.git/
[master (root-commit) abd8674] nested
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 hello.world
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7300-clean/baz/boo/.git/
[master (root-commit) 3f7f1fc] deeply.nested
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 deeper.world
Removing bar/
Removing baz/
Removing empty_repo/
Removing foo/
Removing repo/
Removing strange_bare/
Removing sub2/
Removing untracked/
ok 40 - force removal of nested git work tree
expecting success:
rm -fr repo &&
mkdir repo &&
(
cd repo &&
git init &&
touch known 1 2 3 &&
git add known &&
git clean -f -e 1 -e 2 &&
test -e 1 &&
test -e 2 &&
! (test -e 3) &&
test -e known
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7300-clean/repo/.git/
Removing 3
ok 41 - git clean -e
expecting success:
mkdir foo &&
chmod a= foo &&
git clean -dfx foo &&
! test -d foo
warning: could not open directory 'foo/': Permission denied
Removing foo/
ok 42 - git clean -d with an unreadable empty directory
expecting success:
mkdir -p foo &&
mkdir -p foobar &&
git clean -df foobar &&
test_path_is_dir foo &&
test_path_is_missing foobar
Removing foobar/
ok 43 - git clean -d respects pathspecs (dir is prefix of pathspec)
expecting success:
mkdir -p foo &&
mkdir -p foobar &&
git clean -df foo &&
test_path_is_missing foo &&
test_path_is_dir foobar
Removing foo/
ok 44 - git clean -d respects pathspecs (pathspec is prefix of dir)
expecting success:
echo /foo/bar >.gitignore &&
echo ignoreme >>.gitignore &&
rm -rf foo &&
mkdir -p foo/a/aa/aaa foo/b/bb/bbb &&
touch foo/bar foo/baz foo/a/aa/ignoreme foo/b/ignoreme foo/b/bb/1 foo/b/bb/2 &&
git clean -df &&
test_path_is_dir foo &&
test_path_is_file foo/bar &&
test_path_is_missing foo/baz &&
test_path_is_file foo/a/aa/ignoreme &&
test_path_is_missing foo/a/aa/aaa &&
test_path_is_file foo/b/ignoreme &&
test_path_is_missing foo/b/bb
Removing build/
Removing foo/a/aa/aaa/
Removing foo/b/bb/
Removing foo/baz
Removing foobar/
Removing obj.o
Skipping repository repo/
ok 45 - git clean -d skips untracked dirs containing ignored files
skipping test: handle clean & core.longpaths = false nicely
test_config core.longpaths false &&
a50=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &&
mkdir -p $a50$a50/$a50$a50/$a50$a50 &&
: >"$a50$a50/test.txt" 2>"$a50$a50/$a50$a50/$a50$a50/test.txt" &&
# create a temporary outside the working tree to hide from "git clean"
test_must_fail git clean -xdf 2>.git/err &&
# grepping for a strerror string is unportable but it is OK here with
# MINGW prereq
test_i18ngrep "too long" .git/err
ok 46 # skip handle clean & core.longpaths = false nicely (missing MINGW)
# still have 2 known breakage(s)
# passed all remaining 44 test(s)
1..46
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7402-submodule-rebase.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7402-submodule-rebase/.git/
expecting success:
echo file > file &&
git add file &&
test_tick &&
git commit -m initial &&
git clone . submodule &&
git add submodule &&
test_tick &&
git commit -m submodule &&
echo second line >> file &&
(cd submodule && git pull) &&
test_tick &&
git commit -m file-and-submodule -a &&
git branch added-submodule
[master (root-commit) ffefb50] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Cloning into 'submodule'...
done.
warning: adding embedded git repository: submodule
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> submodule
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached submodule
hint:
hint: See "git help submodule" for more information.
[master 9bd10db] submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 160000 submodule
From /<<PKGBUILDDIR>>/t/trash directory.t7402-submodule-rebase/.
ffefb50..9bd10db master -> origin/master
Updating ffefb50..9bd10db
Fast-forward
submodule | 1 +
1 file changed, 1 insertion(+)
create mode 160000 submodule
[master 041f541] file-and-submodule
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 1 deletion(-)
ok 1 - setup
expecting success:
(cd submodule &&
echo 3rd line >> file &&
test_tick &&
git commit -m fork -a) &&
echo unrelated >> file2 &&
git add file2 &&
test_tick &&
git commit -m unrelated file2 &&
echo other line >> file &&
test_tick &&
git commit -m update file &&
CURRENT=$(cd submodule && git rev-parse HEAD) &&
EXPECTED=$(git rev-parse HEAD~2:submodule) &&
GIT_TRACE=1 git rebase --onto HEAD~2 HEAD^ &&
STORED=$(git rev-parse HEAD:submodule) &&
test $EXPECTED = $STORED &&
test $CURRENT = $(cd submodule && git rev-parse HEAD)
[master eb5e1a6] fork
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master b5e9d7b] unrelated
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
[master a65f80c] update
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
trace: built-in: git rebase --onto 'HEAD~2' HEAD^
trace: run_command: git format-patch -k --stdout --full-index --cherry-pick --right-only --src-prefix=a/ --dst-prefix=b/ --no-renames --no-cover-letter --pretty=mboxrd --topo-order b5e9d7b7db63bf27cc3ce457eb90630609309fb6...a65f80c7f0672c121207764dac7ccebf98cf44c8
First, rewinding head to replay your work on top of it...
trace: built-in: git format-patch -k --stdout --full-index --cherry-pick --right-only --src-prefix=a/ --dst-prefix=b/ --no-renames --no-cover-letter --pretty=mboxrd --topo-order b5e9d7b7db63bf27cc3ce457eb90630609309fb6...a65f80c7f0672c121207764dac7ccebf98cf44c8
trace: run_command: git am --rebasing '--resolvemsg=Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".' --patch-format=mboxrd
trace: built-in: git am --rebasing '--resolvemsg=Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".' --patch-format=mboxrd
trace: run_command: git mailsplit -d4 -o.git/rebase-apply -b --mboxrd --
trace: built-in: git mailsplit -d4 -o.git/rebase-apply -b --mboxrd --
Applying: update
trace: run_command: git gc --auto
trace: built-in: git gc --auto
ok 2 - rebase with a dirty submodule
expecting success:
test submodule = $(git diff --name-only) &&
HEAD=$(git rev-parse HEAD) &&
GIT_EDITOR="\"$(pwd)/fake-editor.sh\"" EDITOR_TEXT="pick $HEAD" \
git rebase -i HEAD^ &&
test submodule = $(git diff --name-only)
pick 81a011672801a6d53f73688ebde4d518274102e6
Successfully rebased and updated refs/heads/master.
ok 3 - interactive rebase with a dirty submodule
expecting success:
echo yet another line >> file &&
test_tick &&
git commit -m next file &&
echo rewrite > file &&
test_tick &&
git commit -m rewrite file &&
echo dirty > file &&
test_must_fail git rebase --onto HEAD~2 HEAD^
[master 260764e] next
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master 63179b5] rewrite
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 4 deletions(-)
error: cannot rebase: You have unstaged changes.
error: Please commit or stash them.
ok 4 - rebase with dirty file and submodule fails
expecting success:
echo new > file &&
CURRENT=$(cd submodule && git rev-parse HEAD) &&
git stash &&
test new != $(cat file) &&
test submodule = $(git diff --name-only) &&
test $CURRENT = $(cd submodule && git rev-parse HEAD) &&
git stash apply &&
test new = $(cat file) &&
test $CURRENT = $(cd submodule && git rev-parse HEAD)
Saved working directory and index state WIP on master: 63179b5 rewrite
Merging Version stash was based on with Stashed changes
Merging:
virtual Version stash was based on
virtual Stashed changes
found 1 common ancestor:
virtual 8b045485d7af7da389e60eb467551e426da98c59
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: file
modified: submodule (new commits)
Untracked files:
(use "git add <file>..." to include in what will be committed)
fake-editor.sh
no changes added to commit (use "git add" and/or "git commit -a")
ok 5 - stash with a dirty submodule
expecting success:
git reset --hard &&
git checkout added-submodule &&
git add submodule &&
test_tick &&
git commit -m third &&
(
cd submodule &&
git commit --allow-empty -m extra
) &&
git add submodule &&
test_tick &&
git commit -m fourth &&
test_must_fail git rebase --onto HEAD^^ HEAD^ HEAD^0 &&
git ls-files -s submodule >actual &&
(
cd submodule &&
echo "160000 $(git rev-parse HEAD^) 1 submodule" &&
echo "160000 $(git rev-parse HEAD^^) 2 submodule" &&
echo "160000 $(git rev-parse HEAD) 3 submodule"
) >expect &&
test_cmp expect actual
HEAD is now at 63179b5 rewrite
Switched to branch 'added-submodule'
M submodule
[added-submodule 3e80a7a] third
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 7d89a17] extra
Author: A U Thor <author@example.com>
[added-submodule b58fe73] fourth
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
First, rewinding head to replay your work on top of it...
Applying: fourth
Using index info to reconstruct a base tree...
M submodule
Falling back to patching base and 3-way merge...
Merging:
041f541 file-and-submodule
virtual fourth
found 1 common ancestor:
virtual 916d85feee86a894adc3398951af35ea093209b9
Failed to merge submodule submodule (commits don't follow merge-base)
Auto-merging submodule
CONFLICT (submodule): Merge conflict in submodule
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 fourth
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
ok 6 - rebasing submodule that should conflict
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7401-submodule-summary.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7401-submodule-summary/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7401-submodule-summary/sm1/.git/
expecting success:
git add sm1 &&
git submodule summary >actual &&
cat >expected <<-EOF &&
* sm1 0000000...a2c4dab (2):
> Add foo2
EOF
test_cmp expected actual
warning: adding embedded git repository: sm1
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sm1
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sm1
hint:
hint: See "git help submodule" for more information.
ok 1 - added submodule
expecting success:
mkdir sub &&
(
cd sub &&
git submodule summary >../actual
) &&
cat >expected <<-EOF &&
* ../sm1 0000000...a2c4dab (2):
> Add foo2
EOF
test_cmp expected actual
ok 2 - added submodule (subdirectory)
expecting success:
(
cd sub &&
git submodule summary . >../actual
) &&
test_must_be_empty actual
ok 3 - added submodule (subdirectory only)
expecting success:
(
cd sub &&
git submodule summary ../sm1 >../actual
) &&
cat >expected <<-EOF &&
* ../sm1 0000000...a2c4dab (2):
> Add foo2
EOF
test_cmp expected actual
ok 4 - added submodule (subdirectory with explicit path)
expecting success:
git submodule summary >actual &&
cat >expected <<-EOF &&
* sm1 a2c4dab...4c8d358 (1):
> Add foo3
EOF
test_cmp expected actual
ok 5 - modified submodule(forward)
expecting success:
git submodule summary --files >actual &&
cat >expected <<-EOF &&
* sm1 a2c4dab...4c8d358 (1):
> Add foo3
EOF
test_cmp expected actual
ok 6 - modified submodule(forward), --files
expecting success:
git config -f .gitmodules submodule.sm1.path sm1 &&
git config -f .gitmodules submodule.sm1.ignore all &&
git config submodule.sm1.ignore all &&
git config diff.ignoreSubmodules all &&
git submodule summary >actual &&
cat >expected <<-EOF &&
* sm1 a2c4dab...4c8d358 (1):
> Add foo3
EOF
test_cmp expected actual &&
git config --unset diff.ignoreSubmodules &&
git config --remove-section submodule.sm1 &&
git config -f .gitmodules --remove-section submodule.sm1
ok 7 - no ignore=all setting has any effect
expecting success:
git submodule summary >actual &&
cat >expected <<-EOF &&
* sm1 4c8d358...db425b6 (2):
< Add foo3
< Add foo2
EOF
test_cmp expected actual
ok 8 - modified submodule(backward)
expecting success:
git submodule summary >actual &&
cat >expected <<-EOF &&
* sm1 4c8d358...41fbea9 (4):
> Add foo5
> Add foo4
< Add foo3
< Add foo2
EOF
test_cmp expected actual
ok 9 - modified submodule(backward and forward)
expecting success:
git submodule summary -n 3 >actual &&
cat >expected <<-EOF &&
* sm1 4c8d358...41fbea9 (4):
> Add foo5
> Add foo4
< Add foo3
EOF
test_cmp expected actual
ok 10 - --summary-limit
expecting success:
git submodule summary --cached >actual &&
cat >expected <<-EOF &&
* sm1 41fbea9(submodule)->9da5fb8(blob) (3):
< Add foo5
EOF
test_i18ncmp actual expected
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 11 - typechanged submodule(submodule->blob), --cached
expecting success:
git submodule summary --files >actual &&
cat >expected <<-EOF &&
* sm1 9da5fb8(blob)->41fbea9(submodule) (3):
> Add foo5
EOF
test_i18ncmp actual expected
ok 12 - typechanged submodule(submodule->blob), --files
expecting success:
git submodule summary >actual &&
cat >expected <<-EOF &&
* sm1 41fbea9(submodule)->9da5fb8(blob):
EOF
test_i18ncmp actual expected
fatal: not a git repository: 'sm1/.git'
ok 13 - typechanged submodule(submodule->blob)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7401-submodule-summary/sm1/.git/
expecting success:
git submodule summary >actual &&
cat >expected <<-EOF &&
* sm1 41fbea9...6858906:
Warn: sm1 doesn't contain commit 41fbea99b81568012be3e9bcc31431971c1e5bc5
EOF
test_i18ncmp actual expected
ok 14 - nonexistent commit
expecting success:
git submodule summary >actual &&
cat >expected <<-EOF &&
* sm1 9da5fb8(blob)->6858906(submodule) (2):
> Add foo7
EOF
test_i18ncmp expected actual
ok 15 - typechanged submodule(blob->submodule)
expecting success:
git submodule summary >actual &&
cat >expected <<-EOF &&
* sm1 6858906...0000000:
EOF
test_cmp expected actual
fatal: not a git repository: 'sm1/.git'
ok 16 - deleted submodule
expecting success:
test_create_repo sm2 &&
head7=$(add_file sm2 foo8 foo9) &&
git add sm2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7401-submodule-summary/sm2/.git/
warning: adding embedded git repository: sm2
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sm2
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sm2
hint:
hint: See "git help submodule" for more information.
ok 17 - create second submodule
expecting success:
git submodule summary >actual &&
cat >expected <<-EOF &&
* sm1 6858906...0000000:
* sm2 0000000...fa9eeaf (2):
> Add foo9
EOF
test_cmp expected actual
fatal: not a git repository: 'sm1/.git'
ok 18 - multiple submodules
expecting success:
git submodule summary sm2 >actual &&
cat >expected <<-EOF &&
* sm2 0000000...fa9eeaf (2):
> Add foo9
EOF
test_cmp expected actual
ok 19 - path filter
expecting success:
git submodule summary HEAD^ >actual &&
cat >expected <<-EOF &&
* sm1 6858906...0000000:
* sm2 0000000...fa9eeaf (2):
> Add foo9
EOF
test_cmp expected actual
fatal: not a git repository: 'sm1/.git'
ok 20 - given commit
expecting success:
git submodule summary --for-status HEAD^ >actual &&
test_i18ncmp actual - <<EOF
* sm1 6858906...0000000:
* sm2 0000000...fa9eeaf (2):
> Add foo9
EOF
fatal: no submodule mapping found in .gitmodules for path 'sm2'
fatal: not a git repository: 'sm1/.git'
ok 21 - --for-status
expecting success:
test_must_fail git submodule summary --files --cached
The --cached option cannot be used with the --files option
ok 22 - fail when using --files together with --cached
expecting success:
git init xyzzy &&
cd xyzzy &&
git submodule summary >output 2>&1 &&
test_must_be_empty output
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7401-submodule-summary/xyzzy/.git/
ok 23 - should not fail in an empty repo
# passed all 23 test(s)
1..23
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7403-submodule-sync.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/.git/
expecting success:
echo file >file &&
git add file &&
test_tick &&
git commit -m upstream &&
git clone . super &&
git clone super submodule &&
(
cd submodule &&
git submodule add ../submodule sub-submodule &&
test_tick &&
git commit -m "sub-submodule"
) &&
(
cd super &&
git submodule add ../submodule submodule &&
test_tick &&
git commit -m "submodule"
) &&
git clone super super-clone &&
(
cd super-clone &&
git submodule update --init --recursive
) &&
git clone super empty-clone &&
(
cd empty-clone &&
git submodule init
) &&
git clone super top-only-clone &&
git clone super relative-clone &&
(
cd relative-clone &&
git submodule update --init --recursive
) &&
git clone super recursive-clone &&
(
cd recursive-clone &&
git submodule update --init --recursive
)
[master (root-commit) 0c90624] upstream
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Cloning into 'super'...
done.
Cloning into 'submodule'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/submodule/sub-submodule'...
done.
[master 5a446ba] sub-submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub-submodule
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/super/submodule'...
done.
[master 78df3af] submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 submodule
Cloning into 'super-clone'...
done.
Submodule 'submodule' (/<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/submodule) registered for path 'submodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/super-clone/submodule'...
done.
Submodule path 'submodule': checked out '5a446ba52b7cd49fd2fdd854f363e71780faa9a8'
Submodule 'sub-submodule' (/<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/submodule) registered for path 'submodule/sub-submodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/super-clone/submodule/sub-submodule'...
done.
Submodule path 'submodule/sub-submodule': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
Cloning into 'empty-clone'...
done.
Submodule 'submodule' (/<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/submodule) registered for path 'submodule'
Cloning into 'top-only-clone'...
done.
Cloning into 'relative-clone'...
done.
Submodule 'submodule' (/<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/submodule) registered for path 'submodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/relative-clone/submodule'...
done.
Submodule path 'submodule': checked out '5a446ba52b7cd49fd2fdd854f363e71780faa9a8'
Submodule 'sub-submodule' (/<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/submodule) registered for path 'submodule/sub-submodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/relative-clone/submodule/sub-submodule'...
done.
Submodule path 'submodule/sub-submodule': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
Cloning into 'recursive-clone'...
done.
Submodule 'submodule' (/<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/submodule) registered for path 'submodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/recursive-clone/submodule'...
done.
Submodule path 'submodule': checked out '5a446ba52b7cd49fd2fdd854f363e71780faa9a8'
Submodule 'sub-submodule' (/<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/submodule) registered for path 'submodule/sub-submodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/recursive-clone/submodule/sub-submodule'...
done.
Submodule path 'submodule/sub-submodule': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
ok 1 - setup
expecting success:
(
cd submodule &&
echo second line >>file &&
test_tick &&
git commit -a -m "change submodule"
)
[master c61fc01] change submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
ok 2 - change submodule
expecting success:
(
cd super &&
cd submodule &&
git checkout master &&
git pull
) &&
mv submodule moved-submodule &&
(
cd moved-submodule &&
git config -f .gitmodules submodule.sub-submodule.url ../moved-submodule &&
test_tick &&
git commit -a -m moved-sub-submodule
) &&
(
cd super &&
git config -f .gitmodules submodule.submodule.url ../moved-submodule &&
test_tick &&
git commit -a -m moved-submodule
)
Already on 'master'
Your branch is up to date with 'origin/master'.
From /<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/submodule
5a446ba..c61fc01 master -> origin/master
Updating 5a446ba..c61fc01
Fast-forward
file | 1 +
1 file changed, 1 insertion(+)
[master 9f583c0] moved-sub-submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master f2e88dd] moved-submodule
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
ok 3 - change submodule url
expecting success:
(
cd super-clone &&
git pull --no-recurse-submodules &&
git submodule sync
) &&
test -d "$(
cd super-clone/submodule &&
git config remote.origin.url
)" &&
test ! -d "$(
cd super-clone/submodule/sub-submodule &&
git config remote.origin.url
)" &&
(
cd super-clone/submodule &&
git checkout master &&
git pull
) &&
(
cd super-clone &&
test -d "$(git config submodule.submodule.url)"
)
From /<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/super
78df3af..f2e88dd master -> origin/master
Updating 78df3af..f2e88dd
Fast-forward
.gitmodules | 2 +-
submodule | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Synchronizing submodule url for 'submodule'
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
From /<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/moved-submodule
5a446ba..9f583c0 master -> origin/master
Updating 5a446ba..9f583c0
Fast-forward
.gitmodules | 2 +-
file | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
ok 4 - "git submodule sync" should update submodule URLs
expecting success:
(
cd super-clone &&
(
cd submodule &&
git pull --no-recurse-submodules
) &&
git submodule sync --recursive
) &&
test -d "$(
cd super-clone/submodule &&
git config remote.origin.url
)" &&
test -d "$(
cd super-clone/submodule/sub-submodule &&
git config remote.origin.url
)" &&
(
cd super-clone/submodule/sub-submodule &&
git checkout master &&
git pull
)
Already up to date.
Synchronizing submodule url for 'submodule'
Synchronizing submodule url for 'submodule/sub-submodule'
Previous HEAD position was 0c90624 upstream
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
From /<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/moved-submodule
5a446ba..9f583c0 master -> origin/master
Updating 5a446ba..9f583c0
Fast-forward
.gitmodules | 2 +-
file | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
ok 5 - "git submodule sync --recursive" should update all submodule URLs
expecting success:
reset_submodule_urls super-clone
ok 6 - reset submodule URLs
expecting success:
(
cd super-clone &&
git pull --no-recurse-submodules &&
mkdir -p sub &&
cd sub &&
git submodule sync >../../output
) &&
test_i18ngrep "\\.\\./submodule" output &&
test -d "$(
cd super-clone/submodule &&
git config remote.origin.url
)" &&
test ! -d "$(
cd super-clone/submodule/sub-submodule &&
git config remote.origin.url
)" &&
(
cd super-clone/submodule &&
git checkout master &&
git pull
) &&
(
cd super-clone &&
test -d "$(git config submodule.submodule.url)"
)
Already up to date.
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
Synchronizing submodule url for '../submodule'
Already on 'master'
M sub-submodule
Your branch is up to date with 'origin/master'.
Already up to date.
ok 7 - "git submodule sync" should update submodule URLs - subdirectory
expecting success:
(
cd super-clone &&
(
cd submodule &&
git pull --no-recurse-submodules
) &&
mkdir -p sub &&
cd sub &&
git submodule sync --recursive >../../output
) &&
test_i18ngrep "\\.\\./submodule/sub-submodule" output &&
test -d "$(
cd super-clone/submodule &&
git config remote.origin.url
)" &&
test -d "$(
cd super-clone/submodule/sub-submodule &&
git config remote.origin.url
)" &&
(
cd super-clone/submodule/sub-submodule &&
git checkout master &&
git pull
)
Already up to date.
Synchronizing submodule url for '../submodule/sub-submodule'
Already on 'master'
Your branch is up to date with 'origin/master'.
Already up to date.
ok 8 - "git submodule sync --recursive" should update all submodule URLs - subdirectory
expecting success:
(
cd empty-clone &&
git pull &&
git submodule sync &&
test -d "$(git config submodule.submodule.url)"
)
From /<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/super
78df3af..f2e88dd master -> origin/master
Updating 78df3af..f2e88dd
Fast-forward
.gitmodules | 2 +-
submodule | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Synchronizing submodule url for 'submodule'
ok 9 - "git submodule sync" should update known submodule URLs
expecting success:
(
cd top-only-clone &&
git pull &&
git submodule sync &&
test -z "$(git config submodule.submodule.url)" &&
git submodule sync submodule &&
test -z "$(git config submodule.submodule.url)"
)
From /<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/super
78df3af..f2e88dd master -> origin/master
Updating 78df3af..f2e88dd
Fast-forward
.gitmodules | 2 +-
submodule | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
ok 10 - "git submodule sync" should not vivify uninteresting submodule
expecting success:
(
cd relative-clone &&
git remote set-url origin foo &&
git submodule sync &&
(
cd submodule &&
#actual fails with: "cannot strip off url foo
test "$(git config remote.origin.url)" = "../submodule"
)
)
Synchronizing submodule url for 'submodule'
ok 11 - "git submodule sync" handles origin URL of the form foo
expecting success:
(
cd relative-clone &&
git remote set-url origin foo/bar &&
git submodule sync &&
(
cd submodule &&
#actual foo/submodule
test "$(git config remote.origin.url)" = "../foo/submodule"
) &&
(
cd submodule/sub-submodule &&
test "$(git config remote.origin.url)" != "../../foo/submodule"
)
)
Synchronizing submodule url for 'submodule'
ok 12 - "git submodule sync" handles origin URL of the form foo/bar
expecting success:
(
cd recursive-clone &&
git remote set-url origin foo/bar &&
git submodule sync --recursive &&
(
cd submodule &&
#actual foo/submodule
test "$(git config remote.origin.url)" = "../foo/submodule"
) &&
(
cd submodule/sub-submodule &&
test "$(git config remote.origin.url)" = "../../foo/submodule"
)
)
Synchronizing submodule url for 'submodule'
Synchronizing submodule url for 'submodule/sub-submodule'
ok 13 - "git submodule sync --recursive" propagates changes in origin
expecting success:
(
cd relative-clone &&
git remote set-url origin ./foo &&
git submodule sync &&
(
cd submodule &&
#actual ./submodule
test "$(git config remote.origin.url)" = "../submodule"
)
)
Synchronizing submodule url for 'submodule'
ok 14 - "git submodule sync" handles origin URL of the form ./foo
expecting success:
(
cd relative-clone &&
git remote set-url origin ./foo/bar &&
git submodule sync &&
(
cd submodule &&
#actual ./foo/submodule
test "$(git config remote.origin.url)" = "../foo/submodule"
)
)
Synchronizing submodule url for 'submodule'
ok 15 - "git submodule sync" handles origin URL of the form ./foo/bar
expecting success:
(
cd relative-clone &&
git remote set-url origin ../foo &&
git submodule sync &&
(
cd submodule &&
#actual ../submodule
test "$(git config remote.origin.url)" = "../../submodule"
)
)
Synchronizing submodule url for 'submodule'
ok 16 - "git submodule sync" handles origin URL of the form ../foo
expecting success:
(
cd relative-clone &&
git remote set-url origin ../foo/bar &&
git submodule sync &&
(
cd submodule &&
#actual ../foo/submodule
test "$(git config remote.origin.url)" = "../../foo/submodule"
)
)
Synchronizing submodule url for 'submodule'
ok 17 - "git submodule sync" handles origin URL of the form ../foo/bar
expecting success:
(
cd relative-clone &&
git remote set-url origin ../foo/bar &&
mkdir -p a/b/c &&
(
cd a/b/c &&
git init &&
>.gitignore &&
git add .gitignore &&
test_tick &&
git commit -m "initial commit"
) &&
git submodule add ../bar/a/b/c ./a/b/c &&
git submodule sync &&
(
cd a/b/c &&
#actual ../foo/bar/a/b/c
test "$(git config remote.origin.url)" = "../../../../foo/bar/a/b/c"
)
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7403-submodule-sync/relative-clone/a/b/c/.git/
[master (root-commit) 1f9e67a] initial commit
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 .gitignore
Adding existing repo at 'a/b/c' to the index
Synchronizing submodule url for 'a/b/c'
Synchronizing submodule url for 'submodule'
ok 18 - "git submodule sync" handles origin URL of the form ../foo/bar with deeply nested submodule
# passed all 18 test(s)
1..18
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7405-submodule-merge.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7405-submodule-merge/.git/
expecting success:
mkdir sub &&
(cd sub &&
git init &&
echo original > file &&
git add file &&
test_tick &&
git commit -m sub-root) &&
git add sub &&
test_tick &&
git commit -m root &&
git checkout -b a master &&
(cd sub &&
echo A > file &&
git add file &&
test_tick &&
git commit -m sub-a) &&
git add sub &&
test_tick &&
git commit -m a &&
git checkout -b b master &&
(cd sub &&
echo B > file &&
git add file &&
test_tick &&
git commit -m sub-b) &&
git add sub &&
test_tick &&
git commit -m b &&
git checkout -b c a &&
git merge -s ours b &&
git checkout -b d b &&
git merge -s ours a
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7405-submodule-merge/sub/.git/
[master (root-commit) 0998b33] sub-root
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
warning: adding embedded git repository: sub
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sub
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sub
hint:
hint: See "git help submodule" for more information.
[master (root-commit) 5c9ada4] root
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 160000 sub
Switched to a new branch 'a'
[master d98dfef] sub-a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[a 6102a2a] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'b'
M sub
[master ce35c37] sub-b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[b 0405d8c] b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'c'
M sub
Merge made by the 'ours' strategy.
Switched to a new branch 'd'
Merge made by the 'ours' strategy.
ok 1 - setup
expecting success:
mkdir merge-search &&
(cd merge-search &&
git init &&
mkdir sub &&
(cd sub &&
git init &&
echo "file-a" > file-a &&
git add file-a &&
git commit -m "sub-a" &&
git branch sub-a) &&
git commit --allow-empty -m init &&
git branch init &&
git add sub &&
git commit -m "a" &&
git branch a &&
git checkout -b b &&
(cd sub &&
git checkout -b sub-b &&
echo "file-b" > file-b &&
git add file-b &&
git commit -m "sub-b") &&
git commit -a -m "b" &&
git checkout -b c a &&
(cd sub &&
git checkout -b sub-c sub-a &&
echo "file-c" > file-c &&
git add file-c &&
git commit -m "sub-c") &&
git commit -a -m "c" &&
git checkout -b d a &&
(cd sub &&
git checkout -b sub-d sub-b &&
git merge sub-c) &&
git commit -a -m "d" &&
git branch test b &&
git checkout -b g init &&
(cd sub &&
git checkout -b sub-g sub-c) &&
git add sub &&
git commit -a -m "g")
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7405-submodule-merge/merge-search/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7405-submodule-merge/merge-search/sub/.git/
[master (root-commit) 9c64145] sub-a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file-a
[master (root-commit) edb5fba] init
Author: A U Thor <author@example.com>
warning: adding embedded git repository: sub
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sub
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sub
hint:
hint: See "git help submodule" for more information.
[master ea59e10] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 160000 sub
Switched to a new branch 'b'
Switched to a new branch 'sub-b'
[sub-b 1e4c5d4] sub-b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file-b
[b 65d3c25] b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'c'
M sub
Switched to a new branch 'sub-c'
[sub-c 18cac7c] sub-c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file-c
[c 00fd913] c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'd'
M sub
Switched to a new branch 'sub-d'
Merging:
1e4c5d4 sub-b
virtual sub-c
found 1 common ancestor:
9c64145 sub-a
Merge made by the 'recursive' strategy.
file-c | 1 +
1 file changed, 1 insertion(+)
create mode 100644 file-c
[d 40eded3] d
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
warning: unable to rmdir 'sub': Directory not empty
Switched to a new branch 'g'
Switched to a new branch 'sub-g'
warning: adding embedded git repository: sub
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sub
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sub
hint:
hint: See "git help submodule" for more information.
[g 61ce3a9] g
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 160000 sub
ok 2 - setup for merge search
expecting success:
(cd merge-search &&
git checkout -b test-forward b &&
git merge d &&
git ls-tree test-forward sub | cut -f1 | cut -f3 -d" " > actual &&
(cd sub &&
git rev-parse sub-d > ../expect) &&
test_cmp expect actual)
Switched to a new branch 'test-forward'
M sub
Merging:
65d3c25 b
virtual d
found 1 common ancestor:
ea59e10 a
Fast-forwarding submodule sub to the following commit:
aafcfa2 Merge branch 'sub-c' into sub-d
Auto-merging sub
Merge made by the 'recursive' strategy.
sub | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ok 3 - merge with one side as a fast-forward of the other
expecting success:
(cd merge-search &&
git checkout -b test-nonforward b &&
(cd sub &&
git rev-parse sub-d > ../expect) &&
test_must_fail git merge c 2> actual &&
grep $(cat expect) actual > /dev/null &&
git reset --hard)
Switched to a new branch 'test-nonforward'
M sub
Merging:
65d3c25 b
virtual c
found 1 common ancestor:
ea59e10 a
Failed to merge submodule sub (not fast-forward)
Found a possible merge resolution for the submodule:
If this is correct simply add it to the index for example
by using:
git update-index --cacheinfo 160000 aafcfa2a62764282ab848d5d6bea86ba217c1b24 "sub"
which will accept this suggestion.
Auto-merging sub
CONFLICT (submodule): Merge conflict in sub
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at 65d3c25 b
ok 4 - merging should conflict for non fast-forward
expecting success:
(cd merge-search &&
git checkout -b test-ambiguous b &&
(cd sub &&
git checkout -b ambiguous sub-b &&
git merge sub-c &&
git rev-parse sub-d > ../expect1 &&
git rev-parse ambiguous > ../expect2) &&
test_must_fail git merge c 2> actual &&
grep $(cat expect1) actual > /dev/null &&
grep $(cat expect2) actual > /dev/null &&
git reset --hard)
Switched to a new branch 'test-ambiguous'
M sub
Switched to a new branch 'ambiguous'
Merging:
1e4c5d4 sub-b
virtual sub-c
found 1 common ancestor:
9c64145 sub-a
Merge made by the 'recursive' strategy.
file-c | 1 +
1 file changed, 1 insertion(+)
create mode 100644 file-c
Merging:
65d3c25 b
virtual c
found 1 common ancestor:
ea59e10 a
Failed to merge submodule sub (multiple merges found)
Auto-merging sub
CONFLICT (submodule): Merge conflict in sub
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at 65d3c25 b
ok 5 - merging should fail for ambiguous common parent
expecting success:
(cd merge-search &&
git checkout -b bb a &&
(cd sub &&
git checkout sub-b) &&
git commit -a -m "bb" &&
git checkout -b e bb &&
(cd sub &&
git checkout sub-a) &&
git commit -a -m "e" &&
git checkout -b f bb &&
(cd sub &&
git checkout sub-d) &&
git commit -a -m "f" &&
git checkout -b test-backward e &&
test_must_fail git merge f)
Switched to a new branch 'bb'
M sub
Switched to branch 'sub-b'
[bb 41fd2a8] bb
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'e'
Switched to branch 'sub-a'
[e 49e8960] e
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'f'
M sub
Switched to branch 'sub-d'
[f ceec2f6] f
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'test-backward'
M sub
Merging:
49e8960 e
virtual f
found 1 common ancestor:
41fd2a8 bb
Failed to merge submodule sub (commits don't follow merge-base)
Auto-merging sub
CONFLICT (submodule): Merge conflict in sub
Automatic merge failed; fix conflicts and then commit the result.
ok 6 - merging should fail for changes that are backwards
expecting success:
(cd merge-search &&
cat >.gitmodules <<EOF &&
[submodule "sub"]
path = sub
url = $TRASH_DIRECTORY/sub
EOF
cat >expect <<EOF &&
U0000000000000000000000000000000000000000 sub
EOF
git submodule status > actual &&
test_cmp expect actual &&
git reset --hard)
HEAD is now at 49e8960 e
ok 7 - git submodule status should display the merge conflict properly with merge base
expecting success:
(cd merge-search &&
git checkout -b test-no-merge-base g &&
test_must_fail git merge b &&
cat >.gitmodules <<EOF &&
[submodule "sub"]
path = sub
url = $TRASH_DIRECTORY/sub
EOF
cat >expect <<EOF &&
U0000000000000000000000000000000000000000 sub
EOF
git submodule status > actual &&
test_cmp expect actual &&
git reset --hard)
Switched to a new branch 'test-no-merge-base'
M sub
Merging:
61ce3a9 g
virtual b
found 1 common ancestor:
edb5fba init
CONFLICT (add/add): Merge conflict in sub
Auto-merging sub
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at 61ce3a9 g
ok 8 - git submodule status should display the merge conflict properly without merge-base
expecting success:
git reset --hard HEAD &&
git checkout -b test2 c &&
git merge d
HEAD is now at f35b3af Merge branch 'a' into d
Switched to a new branch 'test2'
M sub
Merging:
74288c7 Merge branch 'b' into c
virtual d
found 2 common ancestors:
6102a2a a
0405d8c b
Merging:
6102a2a a
0405d8c b
found 1 common ancestor:
5c9ada4 root
Fast-forwarding submodule sub to the following commit:
ce35c37 sub-b
Auto-merging sub
Already up to date!
Merge made by the 'recursive' strategy.
ok 9 - merging with a modify/modify conflict between merge bases
expecting success:
mkdir merge-recursive &&
(cd merge-recursive &&
git init &&
mkdir sub &&
(cd sub &&
git init &&
test_commit a &&
git checkout -b sub-b master &&
test_commit b &&
git checkout -b sub-c master &&
test_commit c &&
git checkout -b sub-bc sub-b &&
git merge sub-c &&
git checkout -b sub-cb sub-c &&
git merge sub-b &&
git checkout master) &&
git add sub &&
git commit -m a &&
git checkout -b top-b master &&
(cd sub && git checkout sub-b) &&
git add sub &&
git commit -m b &&
git checkout -b top-c master &&
(cd sub && git checkout sub-c) &&
git add sub &&
git commit -m c &&
git checkout -b top-bc top-b &&
git merge -s ours --no-commit top-c &&
(cd sub && git checkout sub-bc) &&
git add sub &&
git commit -m bc &&
git checkout -b top-cb top-c &&
git merge -s ours --no-commit top-b &&
(cd sub && git checkout sub-cb) &&
git add sub &&
git commit -m cb)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7405-submodule-merge/merge-recursive/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7405-submodule-merge/merge-recursive/sub/.git/
[master (root-commit) 9d932ab] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a.t
Switched to a new branch 'sub-b'
[sub-b 8b32189] b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b.t
Switched to a new branch 'sub-c'
[sub-c 7d3d4d8] c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 c.t
Switched to a new branch 'sub-bc'
Merging:
8b32189 b
virtual sub-c
found 1 common ancestor:
9d932ab a
Merge made by the 'recursive' strategy.
c.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 c.t
Switched to a new branch 'sub-cb'
Merging:
7d3d4d8 c
virtual sub-b
found 1 common ancestor:
9d932ab a
Merge made by the 'recursive' strategy.
b.t | 1 +
1 file changed, 1 insertion(+)
create mode 100644 b.t
Switched to branch 'master'
warning: adding embedded git repository: sub
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sub
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sub
hint:
hint: See "git help submodule" for more information.
[master (root-commit) a2ff72f] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 160000 sub
Switched to a new branch 'top-b'
Switched to branch 'sub-b'
[top-b f6b4d5a] b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'top-c'
M sub
Switched to branch 'sub-c'
[top-c 4d9cfab] c
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to a new branch 'top-bc'
M sub
Automatic merge went well; stopped before committing as requested
Switched to branch 'sub-bc'
[top-bc ff9bd9b] bc
Author: A U Thor <author@example.com>
Switched to a new branch 'top-cb'
M sub
Automatic merge went well; stopped before committing as requested
Switched to branch 'sub-cb'
[top-cb a0ac63b] cb
Author: A U Thor <author@example.com>
ok 10 - setup for recursive merge with submodule
expecting success:
(cd merge-recursive &&
test_must_fail git merge top-bc &&
echo "160000 $(git rev-parse top-cb:sub) 2 sub" > expect2 &&
echo "160000 $(git rev-parse top-bc:sub) 3 sub" > expect3 &&
git ls-files -u > actual &&
grep "$(cat expect2)" actual > /dev/null &&
grep "$(cat expect3)" actual > /dev/null)
Merging:
a0ac63b cb
virtual top-bc
found 2 common ancestors:
f6b4d5a b
4d9cfab c
Merging:
f6b4d5a b
4d9cfab c
found 1 common ancestor:
a2ff72f a
Auto-merging sub
CONFLICT (submodule): Merge conflict in sub
Failed to merge submodule sub (merge following commits not found)
Auto-merging sub
CONFLICT (submodule): Merge conflict in sub
Automatic merge failed; fix conflicts and then commit the result.
ok 11 - recursive merge with submodule
expecting success:
test_create_repo file-submodule &&
(
cd file-submodule &&
git commit --allow-empty -m O &&
git branch A &&
git branch B &&
git checkout B &&
echo content >path &&
git add path &&
git commit -m B &&
git checkout A &&
test_create_repo path &&
test_commit -C path world &&
git submodule add ./path &&
git commit -m A
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7405-submodule-merge/file-submodule/.git/
[master (root-commit) f09f54e] O
Author: A U Thor <author@example.com>
Switched to branch 'B'
[B 208816f] B
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 path
Switched to branch 'A'
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7405-submodule-merge/file-submodule/path/.git/
[master (root-commit) 26692a7] world
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 world.t
Adding existing repo at 'path' to the index
[A 85fc078] A
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 path
ok 12 - setup file/submodule conflict
checking known breakage:
test_when_finished "git -C file-submodule reset --hard" &&
(
cd file-submodule &&
git checkout A^0 &&
test_must_fail git merge B^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 2 out &&
# path/ is still a submodule
test_path_is_dir path/.git &&
# There is a submodule at "path", so B:path cannot be written
# there. We expect it to be written somewhere in the same
# directory, though, so just grep for its content in all
# files, and ignore "grep: path: Is a directory" message
echo Checking if contents from B:path showed up anywhere &&
grep -q content * 2>/dev/null
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 85fc078 A
error: failed to create path 'path': perhaps a D/F conflict?
Merging:
85fc078 A
virtual B^0
found 1 common ancestor:
f09f54e O
CONFLICT (add/add): Merge conflict in path
Automatic merge failed; fix conflicts and then commit the result.
Checking if contents from B:path showed up anywhere
HEAD is now at 85fc078 A
not ok 13 - file/submodule conflict # TODO known breakage
expecting success:
test_when_finished "git -C file-submodule reset --hard" &&
(
cd file-submodule &&
git checkout A^0 &&
test_must_fail git merge B^0 >out 2>err &&
test_path_is_file .git/MERGE_HEAD &&
git merge --abort
)
HEAD is now at 85fc078 A
HEAD is now at 85fc078 A
ok 14 - file/submodule conflict; merge --abort works afterward
expecting success:
test_create_repo directory-submodule &&
(
cd directory-submodule &&
git commit --allow-empty -m O &&
git branch A &&
git branch B1 &&
git branch B2 &&
git checkout B1 &&
mkdir path &&
echo contents >path/file &&
git add path/file &&
git commit -m B1 &&
git checkout B2 &&
mkdir path &&
echo contents >path/world &&
git add path/world &&
git commit -m B2 &&
git checkout A &&
test_create_repo path &&
test_commit -C path hello world &&
git submodule add ./path &&
git commit -m A
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7405-submodule-merge/directory-submodule/.git/
[master (root-commit) f09f54e] O
Author: A U Thor <author@example.com>
Switched to branch 'B1'
[B1 8ab0f0c] B1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 path/file
Switched to branch 'B2'
[B2 db2a533] B2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 path/world
Switched to branch 'A'
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7405-submodule-merge/directory-submodule/path/.git/
[master (root-commit) 2605480] hello
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 world
Adding existing repo at 'path' to the index
[A 90b0bac] A
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 path
ok 15 - setup directory/submodule conflict
checking known breakage:
test_when_finished "git -C directory-submodule reset --hard" &&
(
cd directory-submodule &&
git checkout A^0 &&
test_must_fail git merge B1^0 &&
git ls-files -s >out &&
test_line_count = 3 out &&
git ls-files -u >out &&
test_line_count = 1 out &&
# path/ is still a submodule
test_path_is_dir path/.git &&
echo Checking if contents from B1:path/file showed up &&
# Would rather use grep -r, but that is GNU extension...
git ls-files -co | xargs grep -q contents 2>/dev/null &&
# However, B1:path/file should NOT have shown up at path/file,
# because we should not write into the submodule
test_path_is_missing path/file
)
Note: switching to 'A^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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 90b0bac A
Merging:
90b0bac A
virtual B1^0
found 1 common ancestor:
f09f54e O
Adding path/file
CONFLICT (file/directory): There is a directory with name path in B1^0. Adding path as path~HEAD
Automatic merge failed; fix conflicts and then commit the result.
Checking if contents from B1:path/file showed up
Path exists:
-rw-rw-r-- 1 buildd buildd 9 Aug 14 07:35 path/file
path/file
HEAD is now at 90b0bac A
not ok 16 - directory/submodule conflict; keep submodule clean # TODO known breakage
checking prerequisite: FAIL_PREREQS
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
git env--helper --type=bool --default=0 --exit-code GIT_TEST_FAIL_PREREQS
)
prerequisite FAIL_PREREQS not satisfied
checking known breakage:
test_when_finished "git -C directory-submodule/path reset --hard" &&
test_when_finished "git -C directory-submodule reset --hard" &&
(
cd directory-submodule &&
git checkout A^0 &&
test_must_fail git merge B2^0 >out 2>err &&
# We do not want files within the submodule to prevent the
# merge from starting; we should not be writing to such paths
# anyway.
test_i18ngrep ! "refusing to lose untracked file at" err
)
HEAD is now at 90b0bac A
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error: refusing to lose untracked file at 'path/world'
error: '! grep refusing to lose untracked file at err' did find a match in:
error: refusing to lose untracked file at 'path/world'
HEAD is now at 90b0bac A
HEAD is now at 2605480 hello
not ok 17 - directory/submodule conflict; should not treat submodule files as untracked or in the way # TODO known breakage
checking known breakage:
test_when_finished "git -C directory-submodule/path reset --hard" &&
test_when_finished "git -C directory-submodule reset --hard" &&
(
cd directory-submodule &&
git checkout A^0 &&
test_must_fail git merge B2^0 &&
test_path_is_file .git/MERGE_HEAD &&
# merge --abort should succeed, should clear .git/MERGE_HEAD,
# and should not leave behind any conflicted files
git merge --abort &&
test_path_is_missing .git/MERGE_HEAD &&
git ls-files -u >conflicts &&
test_must_be_empty conflicts
)
HEAD is now at 90b0bac A
error: refusing to lose untracked file at 'path/world'
Merging:
90b0bac A
virtual B2^0
found 1 common ancestor:
f09f54e O
Adding path/world
CONFLICT (file/directory): There is a directory with name path in B2^0. Adding path as path~HEAD
Automatic merge failed; fix conflicts and then commit the result.
error: Entry 'path/world' not uptodate. Cannot merge.
fatal: Could not reset index file to revision 'HEAD'.
HEAD is now at 90b0bac A
HEAD is now at 2605480 hello
not ok 18 - directory/submodule conflict; merge --abort works afterward # TODO known breakage
# still have 4 known breakage(s)
# passed all remaining 14 test(s)
1..18
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7407-submodule-foreach.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/.git/
expecting success:
echo file > file &&
git add file &&
test_tick &&
git commit -m upstream &&
git clone . super &&
git clone super submodule &&
(
cd super &&
git submodule add ../submodule sub1 &&
git submodule add ../submodule sub2 &&
git submodule add ../submodule sub3 &&
git config -f .gitmodules --rename-section \
submodule.sub1 submodule.foo1 &&
git config -f .gitmodules --rename-section \
submodule.sub2 submodule.foo2 &&
git config -f .gitmodules --rename-section \
submodule.sub3 submodule.foo3 &&
git add .gitmodules &&
test_tick &&
git commit -m "submodules" &&
git submodule init sub1 &&
git submodule init sub2 &&
git submodule init sub3
) &&
(
cd submodule &&
echo different > file &&
git add file &&
test_tick &&
git commit -m "different"
) &&
(
cd super &&
(
cd sub3 &&
git pull
) &&
git add sub3 &&
test_tick &&
git commit -m "update sub3"
)
[master (root-commit) 0c90624] upstream
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Cloning into 'super'...
done.
Cloning into 'submodule'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/super/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/super/sub2'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/super/sub3'...
done.
[master 33b977a] submodules
Author: A U Thor <author@example.com>
4 files changed, 12 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub1
create mode 160000 sub2
create mode 160000 sub3
Submodule 'foo1' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'sub1'
Submodule 'foo2' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'sub2'
Submodule 'foo3' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'sub3'
[master 509f622] different
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
From /<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule
0c90624..509f622 master -> origin/master
Updating 0c90624..509f622
Fast-forward
file | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[master ed2a820] update sub3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup a submodule tree
expecting success:
git clone super clone &&
(
cd clone &&
git submodule update --init -- sub1 sub3 &&
git submodule foreach "echo \$toplevel-\$name-\$path-\$sha1" > ../actual &&
git config foo.bar zar &&
git submodule foreach "git config --file \"\$toplevel/.git/config\" foo.bar"
) &&
test_i18ncmp expect actual
Cloning into 'clone'...
done.
Submodule 'foo1' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'sub1'
Submodule 'foo3' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'sub3'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone/sub3'...
done.
Submodule path 'sub1': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
Submodule path 'sub3': checked out '509f622a4f36a3e472affcf28fa959174f3dd5b5'
Entering 'sub1'
zar
Entering 'sub3'
zar
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 2 - test basic "submodule foreach" usage
expecting success:
mkdir clone/sub &&
(
cd clone/sub &&
git submodule foreach "echo \$toplevel-\$name-\$sm_path-\$displaypath-\$sha1" >../../actual
) &&
test_i18ncmp expect actual
ok 3 - test "submodule foreach" from subdirectory
expecting success:
git clone submodule nested1 &&
git clone submodule nested2 &&
git clone submodule nested3 &&
(
cd nested3 &&
git submodule add ../submodule submodule &&
test_tick &&
git commit -m "submodule" &&
git submodule init submodule
) &&
(
cd nested2 &&
git submodule add ../nested3 nested3 &&
test_tick &&
git commit -m "nested3" &&
git submodule init nested3
) &&
(
cd nested1 &&
git submodule add ../nested2 nested2 &&
test_tick &&
git commit -m "nested2" &&
git submodule init nested2
) &&
(
cd super &&
git submodule add ../nested1 nested1 &&
test_tick &&
git commit -m "nested1" &&
git submodule init nested1
)
Cloning into 'nested1'...
done.
Cloning into 'nested2'...
done.
Cloning into 'nested3'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/nested3/submodule'...
done.
[master 5ec8351] submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 submodule
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/nested2/nested3'...
done.
[master 2e69c85] nested3
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 nested3
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/nested1/nested2'...
done.
[master b23f134] nested2
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 nested2
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/super/nested1'...
done.
[master 427ccd0] nested1
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 160000 nested1
ok 4 - setup nested submodules
expecting success:
git clone super clone2 &&
(
cd clone2 &&
test_must_fail git rev-parse --resolve-git-dir sub1/.git &&
test_must_fail git rev-parse --resolve-git-dir sub2/.git &&
test_must_fail git rev-parse --resolve-git-dir sub3/.git &&
test_must_fail git rev-parse --resolve-git-dir nested1/.git &&
git submodule update --init &&
git rev-parse --resolve-git-dir sub1/.git &&
git rev-parse --resolve-git-dir sub2/.git &&
git rev-parse --resolve-git-dir sub3/.git &&
git rev-parse --resolve-git-dir nested1/.git &&
test_must_fail git rev-parse --resolve-git-dir nested1/nested2/.git &&
git submodule foreach "git submodule update --init" &&
git rev-parse --resolve-git-dir nested1/nested2/.git &&
test_must_fail git rev-parse --resolve-git-dir nested1/nested2/nested3/.git
)
Cloning into 'clone2'...
done.
fatal: not a gitdir 'sub1/.git'
fatal: not a gitdir 'sub2/.git'
fatal: not a gitdir 'sub3/.git'
fatal: not a gitdir 'nested1/.git'
Submodule 'nested1' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/nested1) registered for path 'nested1'
Submodule 'foo1' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'sub1'
Submodule 'foo2' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'sub2'
Submodule 'foo3' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'sub3'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone2/nested1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone2/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone2/sub2'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone2/sub3'...
done.
Submodule path 'nested1': checked out 'b23f134787d96fae589a6b76da41f4db112fc8db'
Submodule path 'sub1': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
Submodule path 'sub2': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
Submodule path 'sub3': checked out '509f622a4f36a3e472affcf28fa959174f3dd5b5'
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone2/.git/modules/foo1
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone2/.git/modules/foo2
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone2/.git/modules/foo3
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone2/.git/modules/nested1
fatal: not a gitdir 'nested1/nested2/.git'
Entering 'nested1'
Submodule 'nested2' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/nested2) registered for path 'nested2'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone2/nested1/nested2'...
done.
Submodule path 'nested2': checked out '2e69c85de92bf5f316f3c67b5e492f287f5a6542'
Entering 'sub1'
Entering 'sub2'
Entering 'sub3'
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone2/.git/modules/nested1/modules/nested2
fatal: not a gitdir 'nested1/nested2/nested3/.git'
ok 5 - use "submodule foreach" to checkout 2nd level submodule
expecting success:
(
cd clone2 &&
git submodule foreach --recursive "git submodule update --init" &&
git rev-parse --resolve-git-dir nested1/nested2/nested3/.git &&
git rev-parse --resolve-git-dir nested1/nested2/nested3/submodule/.git
)
Entering 'nested1'
Entering 'nested1/nested2'
Submodule 'nested3' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/nested3) registered for path 'nested3'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone2/nested1/nested2/nested3'...
done.
Submodule path 'nested3': checked out '5ec83512b76a0b8170b899f8e643913c3e9b72d9'
Entering 'nested1/nested2/nested3'
Submodule 'submodule' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'submodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone2/nested1/nested2/nested3/submodule'...
done.
Submodule path 'submodule': checked out '509f622a4f36a3e472affcf28fa959174f3dd5b5'
Entering 'nested1/nested2/nested3/submodule'
Entering 'sub1'
Entering 'sub2'
Entering 'sub3'
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone2/.git/modules/nested1/modules/nested2/modules/nested3
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone2/.git/modules/nested1/modules/nested2/modules/nested3/modules/submodule
ok 6 - use "foreach --recursive" to checkout all submodules
expecting success:
(
cd clone2 &&
git submodule foreach --recursive "true" > ../actual
) &&
test_i18ncmp expect actual
ok 7 - test messages from "foreach --recursive"
expecting success:
(
cd clone2 &&
mkdir untracked &&
cd untracked &&
git submodule foreach --recursive >../../actual
) &&
test_i18ncmp expect actual
ok 8 - test messages from "foreach --recursive" from subdirectory
expecting success:
(
cd clone2/untracked &&
git submodule foreach --recursive "echo toplevel: \$toplevel name: \$name path: \$sm_path displaypath: \$displaypath hash: \$sha1" >../../actual
) &&
test_i18ncmp expect actual
ok 9 - test "submodule foreach --recursive" from subdirectory
expecting success:
(
cd clone2 &&
git submodule foreach -q --recursive "echo \$name-\$path" > ../actual
) &&
test_cmp expect actual
ok 10 - test "foreach --quiet --recursive"
expecting success:
git clone super clone3 &&
(
cd clone3 &&
test_must_fail git rev-parse --resolve-git-dir sub1/.git &&
test_must_fail git rev-parse --resolve-git-dir sub2/.git &&
test_must_fail git rev-parse --resolve-git-dir sub3/.git &&
test_must_fail git rev-parse --resolve-git-dir nested1/.git &&
git submodule update --init --recursive &&
git rev-parse --resolve-git-dir sub1/.git &&
git rev-parse --resolve-git-dir sub2/.git &&
git rev-parse --resolve-git-dir sub3/.git &&
git rev-parse --resolve-git-dir nested1/.git &&
git rev-parse --resolve-git-dir nested1/nested2/.git &&
git rev-parse --resolve-git-dir nested1/nested2/nested3/.git &&
git rev-parse --resolve-git-dir nested1/nested2/nested3/submodule/.git
)
Cloning into 'clone3'...
done.
fatal: not a gitdir 'sub1/.git'
fatal: not a gitdir 'sub2/.git'
fatal: not a gitdir 'sub3/.git'
fatal: not a gitdir 'nested1/.git'
Submodule 'nested1' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/nested1) registered for path 'nested1'
Submodule 'foo1' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'sub1'
Submodule 'foo2' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'sub2'
Submodule 'foo3' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'sub3'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone3/nested1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone3/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone3/sub2'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone3/sub3'...
done.
Submodule path 'nested1': checked out 'b23f134787d96fae589a6b76da41f4db112fc8db'
Submodule 'nested2' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/nested2) registered for path 'nested1/nested2'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone3/nested1/nested2'...
done.
Submodule path 'nested1/nested2': checked out '2e69c85de92bf5f316f3c67b5e492f287f5a6542'
Submodule 'nested3' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/nested3) registered for path 'nested1/nested2/nested3'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone3/nested1/nested2/nested3'...
done.
Submodule path 'nested1/nested2/nested3': checked out '5ec83512b76a0b8170b899f8e643913c3e9b72d9'
Submodule 'submodule' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'nested1/nested2/nested3/submodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone3/nested1/nested2/nested3/submodule'...
done.
Submodule path 'nested1/nested2/nested3/submodule': checked out '509f622a4f36a3e472affcf28fa959174f3dd5b5'
Submodule path 'sub1': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
Submodule path 'sub2': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
Submodule path 'sub3': checked out '509f622a4f36a3e472affcf28fa959174f3dd5b5'
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone3/.git/modules/foo1
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone3/.git/modules/foo2
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone3/.git/modules/foo3
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone3/.git/modules/nested1
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone3/.git/modules/nested1/modules/nested2
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone3/.git/modules/nested1/modules/nested2/modules/nested3
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone3/.git/modules/nested1/modules/nested2/modules/nested3/modules/submodule
ok 11 - use "update --recursive" to checkout all submodules
expecting success:
(
cd clone3 &&
git submodule status --recursive > ../actual
) &&
test_cmp expect actual
ok 12 - test "status --recursive"
expecting success:
(
cd clone3 &&
(
cd nested1/nested2 &&
test_commit file2
) &&
git submodule status --cached --recursive -- nested1 > ../actual
) &&
test_cmp expect actual
[detached HEAD 25d56d1] file2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2.t
ok 13 - ensure "status --cached --recursive" preserves the --cached flag
expecting success:
(
cd clone3 &&
mkdir tmp && cd tmp &&
git submodule status --recursive > ../../actual
) &&
test_cmp expect actual
ok 14 - test "status --recursive" from sub directory
expecting success:
git clone --recursive super clone4 &&
(
cd clone4 &&
git rev-parse --resolve-git-dir .git &&
git rev-parse --resolve-git-dir sub1/.git &&
git rev-parse --resolve-git-dir sub2/.git &&
git rev-parse --resolve-git-dir sub3/.git &&
git rev-parse --resolve-git-dir nested1/.git &&
git rev-parse --resolve-git-dir nested1/nested2/.git &&
git rev-parse --resolve-git-dir nested1/nested2/nested3/.git &&
git rev-parse --resolve-git-dir nested1/nested2/nested3/submodule/.git
)
Cloning into 'clone4'...
done.
Submodule 'nested1' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/nested1) registered for path 'nested1'
Submodule 'foo1' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'sub1'
Submodule 'foo2' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'sub2'
Submodule 'foo3' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'sub3'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone4/nested1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone4/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone4/sub2'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone4/sub3'...
done.
Submodule path 'nested1': checked out 'b23f134787d96fae589a6b76da41f4db112fc8db'
Submodule 'nested2' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/nested2) registered for path 'nested1/nested2'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone4/nested1/nested2'...
done.
Submodule path 'nested1/nested2': checked out '2e69c85de92bf5f316f3c67b5e492f287f5a6542'
Submodule 'nested3' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/nested3) registered for path 'nested1/nested2/nested3'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone4/nested1/nested2/nested3'...
done.
Submodule path 'nested1/nested2/nested3': checked out '5ec83512b76a0b8170b899f8e643913c3e9b72d9'
Submodule 'submodule' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'nested1/nested2/nested3/submodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone4/nested1/nested2/nested3/submodule'...
done.
Submodule path 'nested1/nested2/nested3/submodule': checked out '509f622a4f36a3e472affcf28fa959174f3dd5b5'
Submodule path 'sub1': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
Submodule path 'sub2': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
Submodule path 'sub3': checked out '509f622a4f36a3e472affcf28fa959174f3dd5b5'
.git
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone4/.git/modules/foo1
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone4/.git/modules/foo2
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone4/.git/modules/foo3
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone4/.git/modules/nested1
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone4/.git/modules/nested1/modules/nested2
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone4/.git/modules/nested1/modules/nested2/modules/nested3
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone4/.git/modules/nested1/modules/nested2/modules/nested3/modules/submodule
ok 15 - use "git clone --recursive" to checkout all submodules
expecting success:
git clone super "common objects" &&
git clone super clone5 &&
(
cd clone5 &&
test_must_fail git rev-parse --resolve-git-dir d nested1/.git &&
git submodule update --init --recursive --reference="$(dirname "$PWD")/common objects" &&
git rev-parse --resolve-git-dir nested1/.git &&
git rev-parse --resolve-git-dir nested1/nested2/.git &&
git rev-parse --resolve-git-dir nested1/nested2/nested3/.git &&
test -f .git/modules/nested1/objects/info/alternates &&
test -f .git/modules/nested1/modules/nested2/objects/info/alternates &&
test -f .git/modules/nested1/modules/nested2/modules/nested3/objects/info/alternates
)
Cloning into 'common objects'...
done.
Cloning into 'clone5'...
done.
fatal: not a gitdir 'd'
Submodule 'nested1' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/nested1) registered for path 'nested1'
Submodule 'foo1' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'sub1'
Submodule 'foo2' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'sub2'
Submodule 'foo3' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'sub3'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone5/nested1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone5/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone5/sub2'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone5/sub3'...
done.
Submodule path 'nested1': checked out 'b23f134787d96fae589a6b76da41f4db112fc8db'
Submodule 'nested2' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/nested2) registered for path 'nested1/nested2'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone5/nested1/nested2'...
done.
Submodule path 'nested1/nested2': checked out '2e69c85de92bf5f316f3c67b5e492f287f5a6542'
Submodule 'nested3' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/nested3) registered for path 'nested1/nested2/nested3'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone5/nested1/nested2/nested3'...
done.
Submodule path 'nested1/nested2/nested3': checked out '5ec83512b76a0b8170b899f8e643913c3e9b72d9'
Submodule 'submodule' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'nested1/nested2/nested3/submodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone5/nested1/nested2/nested3/submodule'...
done.
Submodule path 'nested1/nested2/nested3/submodule': checked out '509f622a4f36a3e472affcf28fa959174f3dd5b5'
Submodule path 'sub1': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
Submodule path 'sub2': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
Submodule path 'sub3': checked out '509f622a4f36a3e472affcf28fa959174f3dd5b5'
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone5/.git/modules/nested1
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone5/.git/modules/nested1/modules/nested2
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone5/.git/modules/nested1/modules/nested2/modules/nested3
ok 16 - test "update --recursive" with a flag with spaces
expecting success:
git clone super clone6 &&
(
cd clone6 &&
test_must_fail git rev-parse --resolve-git-dir sub1/.git &&
test_must_fail git rev-parse --resolve-git-dir sub2/.git &&
test_must_fail git rev-parse --resolve-git-dir sub3/.git &&
test_must_fail git rev-parse --resolve-git-dir nested1/.git &&
git submodule update --init --recursive -- nested1 &&
test_must_fail git rev-parse --resolve-git-dir sub1/.git &&
test_must_fail git rev-parse --resolve-git-dir sub2/.git &&
test_must_fail git rev-parse --resolve-git-dir sub3/.git &&
git rev-parse --resolve-git-dir nested1/.git &&
git rev-parse --resolve-git-dir nested1/nested2/.git &&
git rev-parse --resolve-git-dir nested1/nested2/nested3/.git &&
git rev-parse --resolve-git-dir nested1/nested2/nested3/submodule/.git
)
Cloning into 'clone6'...
done.
fatal: not a gitdir 'sub1/.git'
fatal: not a gitdir 'sub2/.git'
fatal: not a gitdir 'sub3/.git'
fatal: not a gitdir 'nested1/.git'
Submodule 'nested1' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/nested1) registered for path 'nested1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone6/nested1'...
done.
Submodule path 'nested1': checked out 'b23f134787d96fae589a6b76da41f4db112fc8db'
Submodule 'nested2' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/nested2) registered for path 'nested1/nested2'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone6/nested1/nested2'...
done.
Submodule path 'nested1/nested2': checked out '2e69c85de92bf5f316f3c67b5e492f287f5a6542'
Submodule 'nested3' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/nested3) registered for path 'nested1/nested2/nested3'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone6/nested1/nested2/nested3'...
done.
Submodule path 'nested1/nested2/nested3': checked out '5ec83512b76a0b8170b899f8e643913c3e9b72d9'
Submodule 'submodule' (/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/submodule) registered for path 'nested1/nested2/nested3/submodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone6/nested1/nested2/nested3/submodule'...
done.
Submodule path 'nested1/nested2/nested3/submodule': checked out '509f622a4f36a3e472affcf28fa959174f3dd5b5'
fatal: not a gitdir 'sub1/.git'
fatal: not a gitdir 'sub2/.git'
fatal: not a gitdir 'sub3/.git'
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone6/.git/modules/nested1
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone6/.git/modules/nested1/modules/nested2
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone6/.git/modules/nested1/modules/nested2/modules/nested3
/<<PKGBUILDDIR>>/t/trash directory.t7407-submodule-foreach/clone6/.git/modules/nested1/modules/nested2/modules/nested3/modules/submodule
ok 17 - use "update --recursive nested1" to checkout all submodules rooted in nested1
expecting success:
(
cd super &&
git submodule foreach echo success >../expected &&
yes | git submodule foreach "read y && test \"x\$y\" = xy && echo success" >../actual
) &&
test_cmp expected actual
ok 18 - command passed to foreach retains notion of stdin
expecting success:
(
cd clone2 &&
git submodule foreach --recursive echo success >../expected &&
yes | git submodule foreach --recursive "read y && test \"x\$y\" = xy && echo success" >../actual
) &&
test_cmp expected actual
ok 19 - command passed to foreach --recursive retains notion of stdin
expecting success:
(
cd super &&
git submodule foreach "echo \\\"quoted\\\"" > ../expected &&
git submodule foreach echo \"quoted\" > ../actual
) &&
test_cmp expected actual
ok 20 - multi-argument command passed to foreach is not shell-evaluated twice
expecting success:
(
cd super &&
git submodule foreach "echo be --quiet" > ../expected &&
git submodule foreach echo be --quiet > ../actual
) &&
grep -sq -e "--quiet" expected &&
test_cmp expected actual
ok 21 - option-like arguments passed to foreach commands are not lost
expecting success:
git -C clone2 submodule foreach --recursive "echo be --an-option" >expect &&
git -C clone2 submodule foreach --recursive echo be --an-option >actual &&
grep -e "--an-option" expect &&
test_cmp expect actual
be --an-option
be --an-option
be --an-option
be --an-option
be --an-option
be --an-option
be --an-option
ok 22 - option-like arguments passed to foreach recurse correctly
# passed all 22 test(s)
1..22
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7408-submodule-reference.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/.git/
expecting success:
test_create_repo A &&
(
cd A &&
echo first >file1 &&
git add file1 &&
git commit -m A-initial
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A/.git/
[master (root-commit) 31e12cc] A-initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1
ok 1 - preparing first repository
expecting success:
git clone A B &&
(
cd B &&
echo second >file2 &&
git add file2 &&
git commit -m B-addition &&
git repack -a -d &&
git prune
)
Cloning into 'B'...
done.
[master e17620c] B-addition
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
ok 2 - preparing second repository
expecting success:
test_create_repo super &&
(
cd super &&
echo file >file &&
git add file &&
git commit -m B-super-initial
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super/.git/
[master (root-commit) 655e8a6] B-super-initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
ok 3 - preparing superproject
expecting success:
(
cd super &&
git submodule add --reference ../B "file://$base_dir/A" sub &&
git commit -m B-super-added &&
git repack -ad
) &&
test_alternate_is_used super/.git/modules/sub/objects/info/alternates super/sub
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super/sub'...
[master e91bbce] B-super-added
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub
ok 4 - submodule add --reference uses alternates
expecting success:
(
cd super &&
git submodule add --reference ../B --dissociate "file://$base_dir/A" sub-dissociate &&
git commit -m B-super-added &&
git repack -ad
) &&
test_path_is_missing super/.git/modules/sub-dissociate/objects/info/alternates
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super/sub-dissociate'...
[master fc58016] B-super-added
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 160000 sub-dissociate
ok 5 - submodule add --reference with --dissociate does not use alternates
expecting success:
(
cd super/sub &&
echo "0 objects, 0 kilobytes" >expected &&
git count-objects >current &&
diff expected current
)
ok 6 - that reference gets used with add
expecting success:
test_when_finished "rm -rf super-clone" &&
git clone super super-clone &&
git -C super-clone submodule update --init --reference ../B &&
test_alternate_is_used super-clone/.git/modules/sub/objects/info/alternates super-clone/sub
Cloning into 'super-clone'...
done.
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A) registered for path 'sub'
Submodule 'sub-dissociate' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A) registered for path 'sub-dissociate'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super-clone/sub'...
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super-clone/sub-dissociate'...
Submodule path 'sub': checked out '31e12cce52c084d298eb30b1c29409f48cfabc4a'
Submodule path 'sub-dissociate': checked out '31e12cce52c084d298eb30b1c29409f48cfabc4a'
ok 7 - updating superproject keeps alternates
expecting success:
test_when_finished "rm -rf super-clone" &&
git clone super super-clone &&
git -C super-clone submodule update --init --reference ../B --dissociate &&
test_path_is_missing super-clone/.git/modules/sub/objects/info/alternates
Cloning into 'super-clone'...
done.
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A) registered for path 'sub'
Submodule 'sub-dissociate' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A) registered for path 'sub-dissociate'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super-clone/sub'...
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super-clone/sub-dissociate'...
Submodule path 'sub': checked out '31e12cce52c084d298eb30b1c29409f48cfabc4a'
Submodule path 'sub-dissociate': checked out '31e12cce52c084d298eb30b1c29409f48cfabc4a'
ok 8 - updating superproject with --dissociate does not keep alternates
expecting success:
test_when_finished "rm -rf super-clone" &&
git clone --reference super --recursive super super-clone &&
(
cd super-clone &&
# test superproject has alternates setup correctly
test_alternate_is_used .git/objects/info/alternates . &&
# test submodule has correct setup
test_alternate_is_used .git/modules/sub/objects/info/alternates sub
)
Cloning into 'super-clone'...
done.
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A) registered for path 'sub'
Submodule 'sub-dissociate' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A) registered for path 'sub-dissociate'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super-clone/sub'...
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super-clone/sub-dissociate'...
Submodule path 'sub': checked out '31e12cce52c084d298eb30b1c29409f48cfabc4a'
Submodule path 'sub-dissociate': checked out '31e12cce52c084d298eb30b1c29409f48cfabc4a'
ok 9 - submodules use alternates when cloning a superproject
expecting success:
test_when_finished "rm -rf super-clone" &&
git clone super super2 &&
test_must_fail git clone --recursive --reference super2 super2 super-clone &&
(
cd super-clone &&
# test superproject has alternates setup correctly
test_alternate_is_used .git/objects/info/alternates . &&
# update of the submodule succeeds
test_must_fail git submodule update --init &&
# and we have no alternates:
test_must_fail test_alternate_is_used .git/modules/sub/objects/info/alternates sub &&
test_must_fail test_path_is_file sub/file1
)
Cloning into 'super2'...
done.
Cloning into 'super-clone'...
done.
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A) registered for path 'sub'
Submodule 'sub-dissociate' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A) registered for path 'sub-dissociate'
fatal: submodule 'sub' cannot add alternate: path '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super2/.git/modules/sub/' does not exist
Failed to clone 'sub'. Retry scheduled
fatal: submodule 'sub-dissociate' cannot add alternate: path '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super2/.git/modules/sub-dissociate/' does not exist
Failed to clone 'sub-dissociate'. Retry scheduled
fatal: submodule 'sub' cannot add alternate: path '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super2/.git/modules/sub/' does not exist
Failed to clone 'sub' a second time, aborting
fatal: submodule 'sub' cannot add alternate: path '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super2/.git/modules/sub/' does not exist
Failed to clone 'sub'. Retry scheduled
fatal: submodule 'sub-dissociate' cannot add alternate: path '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super2/.git/modules/sub-dissociate/' does not exist
Failed to clone 'sub-dissociate'. Retry scheduled
fatal: submodule 'sub' cannot add alternate: path '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super2/.git/modules/sub/' does not exist
Failed to clone 'sub' a second time, aborting
t7408-submodule-reference.sh: 776: eval: cannot open .git/modules/sub/objects/info/alternates: No such file
t7408-submodule-reference.sh: 776: test: =: unexpected operator
test_line_count: line count for .git/modules/sub/objects/info/alternates != 1
cat: .git/modules/sub/objects/info/alternates: No such file or directory
File sub/file1 doesn't exist.
ok 10 - missing submodule alternate fails clone and submodule update
expecting success:
test_when_finished "rm -rf super-clone" &&
git clone --reference-if-able super2 --recursive super2 super-clone &&
(
cd super-clone &&
# test superproject has alternates setup correctly
test_alternate_is_used .git/objects/info/alternates . &&
# update of the submodule succeeds
git submodule update --init &&
# and we have no alternates:
test_must_fail test_alternate_is_used .git/modules/sub/objects/info/alternates sub &&
test_path_is_file sub/file1
)
Cloning into 'super-clone'...
done.
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A) registered for path 'sub'
Submodule 'sub-dissociate' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A) registered for path 'sub-dissociate'
submodule 'sub' cannot add alternate: path '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super2/.git/modules/sub/' does not exist
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super-clone/sub'...
submodule 'sub-dissociate' cannot add alternate: path '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super2/.git/modules/sub-dissociate/' does not exist
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super-clone/sub-dissociate'...
Submodule path 'sub': checked out '31e12cce52c084d298eb30b1c29409f48cfabc4a'
Submodule path 'sub-dissociate': checked out '31e12cce52c084d298eb30b1c29409f48cfabc4a'
t7408-submodule-reference.sh: 776: eval: cannot open .git/modules/sub/objects/info/alternates: No such file
t7408-submodule-reference.sh: 776: test: =: unexpected operator
test_line_count: line count for .git/modules/sub/objects/info/alternates != 1
cat: .git/modules/sub/objects/info/alternates: No such file or directory
ok 11 - ignoring missing submodule alternates passes clone and submodule update
expecting success:
test_create_repo supersuper &&
(
cd supersuper &&
echo "I am super super." >file &&
git add file &&
git commit -m B-super-super-initial &&
git submodule add "file://$base_dir/super" subwithsub &&
git commit -m B-super-super-added &&
git submodule update --init --recursive &&
git repack -ad
) &&
git clone supersuper supersuper2 &&
(
cd supersuper2 &&
git submodule update --init
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper/.git/
[master (root-commit) 53612b0] B-super-super-initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper/subwithsub'...
[master a17bb0f] B-super-super-added
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 subwithsub
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A) registered for path 'subwithsub/sub'
Submodule 'sub-dissociate' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A) registered for path 'subwithsub/sub-dissociate'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper/subwithsub/sub'...
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper/subwithsub/sub-dissociate'...
Submodule path 'subwithsub/sub': checked out '31e12cce52c084d298eb30b1c29409f48cfabc4a'
Submodule path 'subwithsub/sub-dissociate': checked out '31e12cce52c084d298eb30b1c29409f48cfabc4a'
Cloning into 'supersuper2'...
done.
Submodule 'subwithsub' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super) registered for path 'subwithsub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper2/subwithsub'...
Submodule path 'subwithsub': checked out 'fc5801626b8de2a0747639211613a4aad56b3673'
ok 12 - preparing second superproject with a nested submodule plus partial clone
expecting success:
test_when_finished "rm -rf supersuper-clone" &&
git clone --recursive --reference supersuper supersuper supersuper-clone &&
(
cd supersuper-clone &&
# test superproject has alternates setup correctly
test_alternate_is_used .git/objects/info/alternates . &&
# immediate submodule has alternate:
test_alternate_is_used .git/modules/subwithsub/objects/info/alternates subwithsub &&
# nested submodule also has alternate:
test_alternate_is_used .git/modules/subwithsub/modules/sub/objects/info/alternates subwithsub/sub
)
Cloning into 'supersuper-clone'...
done.
Submodule 'subwithsub' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super) registered for path 'subwithsub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper-clone/subwithsub'...
Submodule path 'subwithsub': checked out 'fc5801626b8de2a0747639211613a4aad56b3673'
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A) registered for path 'subwithsub/sub'
Submodule 'sub-dissociate' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A) registered for path 'subwithsub/sub-dissociate'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper-clone/subwithsub/sub'...
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper-clone/subwithsub/sub-dissociate'...
Submodule path 'subwithsub/sub': checked out '31e12cce52c084d298eb30b1c29409f48cfabc4a'
Submodule path 'subwithsub/sub-dissociate': checked out '31e12cce52c084d298eb30b1c29409f48cfabc4a'
ok 13 - nested submodule alternate in works and is actually used
expecting success:
test_when_finished "rm -rf supersuper-clone" &&
test_must_fail git clone --recursive --reference supersuper2 supersuper2 supersuper-clone &&
(
cd supersuper-clone &&
check_that_two_of_three_alternates_are_used &&
# update of the submodule fails
test_must_fail git submodule update --init --recursive
)
Cloning into 'supersuper-clone'...
done.
Submodule 'subwithsub' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super) registered for path 'subwithsub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper-clone/subwithsub'...
Submodule path 'subwithsub': checked out 'fc5801626b8de2a0747639211613a4aad56b3673'
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A) registered for path 'subwithsub/sub'
Submodule 'sub-dissociate' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A) registered for path 'subwithsub/sub-dissociate'
fatal: submodule 'sub' cannot add alternate: path '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper2/.git/modules/subwithsub/modules/sub/' does not exist
Failed to clone 'sub'. Retry scheduled
fatal: submodule 'sub-dissociate' cannot add alternate: path '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper2/.git/modules/subwithsub/modules/sub-dissociate/' does not exist
Failed to clone 'sub-dissociate'. Retry scheduled
fatal: submodule 'sub' cannot add alternate: path '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper2/.git/modules/subwithsub/modules/sub/' does not exist
Failed to clone 'sub' a second time, aborting
Failed to recurse into submodule path 'subwithsub'
t7408-submodule-reference.sh: 776: eval: cannot open .git/modules/subwithsub/modules/sub/objects/info/alternates: No such file
t7408-submodule-reference.sh: 776: test: =: unexpected operator
test_line_count: line count for .git/modules/subwithsub/modules/sub/objects/info/alternates != 1
cat: .git/modules/subwithsub/modules/sub/objects/info/alternates: No such file or directory
fatal: submodule 'sub' cannot add alternate: path '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper2/.git/modules/subwithsub/modules/sub/' does not exist
Failed to clone 'sub'. Retry scheduled
fatal: submodule 'sub-dissociate' cannot add alternate: path '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper2/.git/modules/subwithsub/modules/sub-dissociate/' does not exist
Failed to clone 'sub-dissociate'. Retry scheduled
fatal: submodule 'sub' cannot add alternate: path '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper2/.git/modules/subwithsub/modules/sub/' does not exist
Failed to clone 'sub' a second time, aborting
Failed to recurse into submodule path 'subwithsub'
ok 14 - missing nested submodule alternate fails clone and submodule update
expecting success:
test_when_finished "rm -rf supersuper-clone" &&
git clone --recursive --reference-if-able supersuper2 supersuper2 supersuper-clone &&
(
cd supersuper-clone &&
check_that_two_of_three_alternates_are_used &&
# update of the submodule succeeds
git submodule update --init --recursive
)
Cloning into 'supersuper-clone'...
done.
Submodule 'subwithsub' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/super) registered for path 'subwithsub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper-clone/subwithsub'...
Submodule path 'subwithsub': checked out 'fc5801626b8de2a0747639211613a4aad56b3673'
Submodule 'sub' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A) registered for path 'subwithsub/sub'
Submodule 'sub-dissociate' (file:///<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/A) registered for path 'subwithsub/sub-dissociate'
submodule 'sub' cannot add alternate: path '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper2/.git/modules/subwithsub/modules/sub/' does not exist
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper-clone/subwithsub/sub'...
submodule 'sub-dissociate' cannot add alternate: path '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper2/.git/modules/subwithsub/modules/sub-dissociate/' does not exist
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7408-submodule-reference/supersuper-clone/subwithsub/sub-dissociate'...
Submodule path 'subwithsub/sub': checked out '31e12cce52c084d298eb30b1c29409f48cfabc4a'
Submodule path 'subwithsub/sub-dissociate': checked out '31e12cce52c084d298eb30b1c29409f48cfabc4a'
t7408-submodule-reference.sh: 776: eval: cannot open .git/modules/subwithsub/modules/sub/objects/info/alternates: No such file
t7408-submodule-reference.sh: 776: test: =: unexpected operator
test_line_count: line count for .git/modules/subwithsub/modules/sub/objects/info/alternates != 1
cat: .git/modules/subwithsub/modules/sub/objects/info/alternates: No such file or directory
ok 15 - missing nested submodule alternate in --reference-if-able mode
# passed all 15 test(s)
1..15
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7409-submodule-detached-work-tree.sh ***
expecting success:
git init --bare remote &&
test_create_repo bundle1 &&
(
cd bundle1 &&
test_commit "shoot" &&
git rev-parse --verify HEAD >../expect
) &&
mkdir home &&
(
cd home &&
GIT_WORK_TREE="$(pwd)" &&
GIT_DIR="$(pwd)/.dotfiles" &&
export GIT_WORK_TREE GIT_DIR &&
git clone --bare ../remote .dotfiles &&
git submodule add ../bundle1 .vim/bundle/sogood &&
test_commit "sogood" &&
(
unset GIT_WORK_TREE GIT_DIR &&
cd .vim/bundle/sogood &&
git rev-parse --verify HEAD >actual &&
test_cmp ../../../../expect actual
) &&
git push origin master
) &&
mkdir home2 &&
(
cd home2 &&
git clone --bare ../remote .dotfiles &&
GIT_WORK_TREE="$(pwd)" &&
GIT_DIR="$(pwd)/.dotfiles" &&
export GIT_WORK_TREE GIT_DIR &&
git checkout master &&
git submodule update --init &&
(
unset GIT_WORK_TREE GIT_DIR &&
cd .vim/bundle/sogood &&
git rev-parse --verify HEAD >actual &&
test_cmp ../../../../expect actual
)
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7409-submodule-detached-work-tree/remote/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7409-submodule-detached-work-tree/bundle1/.git/
[master (root-commit) d074fcf] shoot
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 shoot.t
Cloning into bare repository '.dotfiles'...
warning: You appear to have cloned an empty repository.
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7409-submodule-detached-work-tree/home/.vim/bundle/sogood'...
done.
[master (root-commit) 2f89248] sogood
Author: A U Thor <author@example.com>
3 files changed, 5 insertions(+)
create mode 100644 .gitmodules
create mode 160000 .vim/bundle/sogood
create mode 100644 sogood.t
To /<<PKGBUILDDIR>>/t/trash directory.t7409-submodule-detached-work-tree/home/../remote
* [new branch] master -> master
Cloning into bare repository '.dotfiles'...
done.
Already on 'master'
Submodule '.vim/bundle/sogood' (/<<PKGBUILDDIR>>/t/trash directory.t7409-submodule-detached-work-tree/home2/../bundle1) registered for path '.vim/bundle/sogood'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7409-submodule-detached-work-tree/home2/.vim/bundle/sogood'...
done.
Submodule path '.vim/bundle/sogood': checked out 'd074fcf17f7c15e9e139fe2d6e7ca796a5e616e7'
ok 1 - submodule on detached working tree
expecting success:
mkdir home3 &&
(
cd home3 &&
GIT_DIR="$(pwd)/.dotfiles" &&
export GIT_DIR &&
git clone --bare ../remote "$GIT_DIR" &&
git config core.bare false &&
git config core.worktree .. &&
git checkout master &&
git submodule add ../bundle1 .vim/bundle/dupe &&
test_commit "dupe" &&
git push origin master
) &&
(
cd home &&
GIT_DIR="$(pwd)/.dotfiles" &&
export GIT_DIR &&
git config core.bare false &&
git config core.worktree .. &&
git pull &&
git submodule update --init &&
test -f .vim/bundle/dupe/shoot.t
)
Cloning into bare repository '/<<PKGBUILDDIR>>/t/trash directory.t7409-submodule-detached-work-tree/home3/.dotfiles'...
done.
Already on 'master'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7409-submodule-detached-work-tree/home3/.vim/bundle/dupe'...
done.
[master e996493] dupe
Author: A U Thor <author@example.com>
3 files changed, 5 insertions(+)
create mode 160000 .vim/bundle/dupe
create mode 100644 dupe.t
To /<<PKGBUILDDIR>>/t/trash directory.t7409-submodule-detached-work-tree/home3/../remote
2f89248..e996493 master -> master
From /<<PKGBUILDDIR>>/t/trash directory.t7409-submodule-detached-work-tree/home/../remote
* branch HEAD -> FETCH_HEAD
Updating 2f89248..e996493
Fast-forward
.gitmodules | 3 +++
.vim/bundle/dupe | 1 +
dupe.t | 1 +
3 files changed, 5 insertions(+)
create mode 160000 .vim/bundle/dupe
create mode 100644 dupe.t
Submodule '.vim/bundle/dupe' (/<<PKGBUILDDIR>>/t/trash directory.t7409-submodule-detached-work-tree/home/../bundle1) registered for path '.vim/bundle/dupe'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7409-submodule-detached-work-tree/home/.vim/bundle/dupe'...
done.
Submodule path '.vim/bundle/dupe': checked out 'd074fcf17f7c15e9e139fe2d6e7ca796a5e616e7'
ok 2 - submodule on detached working pointed by core.worktree
# passed all 2 test(s)
1..2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7410-submodule-checkout-to.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7410-submodule-checkout-to/.git/
expecting success:
mkdir -p origin/sub &&
(
cd origin/sub && git init &&
echo file1 >file1 &&
git add file1 &&
git commit -m file1
) &&
mkdir -p origin/main &&
(
cd origin/main && git init &&
git submodule add ../sub &&
git commit -m "add sub"
) &&
(
cd origin/sub &&
echo file1updated >file1 &&
git add file1 &&
git commit -m "file1 updated"
) &&
git -C origin/main/sub pull &&
(
cd origin/main &&
git add sub &&
git commit -m "sub updated"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7410-submodule-checkout-to/origin/sub/.git/
[master (root-commit) ff4d57b] file1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file1
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7410-submodule-checkout-to/origin/main/.git/
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7410-submodule-checkout-to/origin/main/sub'...
done.
[master (root-commit) 034dd87] add sub
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub
[master 9893d9b] file1 updated
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
From /<<PKGBUILDDIR>>/t/trash directory.t7410-submodule-checkout-to/origin/sub
ff4d57b..9893d9b master -> origin/master
Updating ff4d57b..9893d9b
Fast-forward
file1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[master 3a2cc11] sub updated
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 1 - setup: make origin
expecting success:
mkdir clone &&
git -C clone clone --recursive "$base_path/origin/main"
Cloning into 'main'...
done.
Submodule 'sub' (/<<PKGBUILDDIR>>/t/trash directory.t7410-submodule-checkout-to/origin/sub) registered for path 'sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7410-submodule-checkout-to/clone/main/sub'...
done.
Submodule path 'sub': checked out '9893d9be19a967333826d927833d17e1df64909c'
ok 2 - setup: clone
expecting success:
mkdir default_checkout &&
git -C clone/main worktree add "$base_path/default_checkout/main" "$rev1_hash_main"
Preparing worktree (detached HEAD 034dd87)
HEAD is now at 034dd87 add sub
ok 3 - checkout main
checking known breakage:
git -C default_checkout/main diff --submodule master"^!" >out &&
grep "file1 updated" out
not ok 4 - can see submodule diffs just after checkout # TODO known breakage
expecting success:
mkdir fully_cloned_submodule &&
git -C clone/main worktree add "$base_path/fully_cloned_submodule/main" "$rev1_hash_main" &&
git -C fully_cloned_submodule/main submodule update
Preparing worktree (detached HEAD 034dd87)
HEAD is now at 034dd87 add sub
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7410-submodule-checkout-to/fully_cloned_submodule/main/sub'...
done.
Submodule path 'sub': checked out 'ff4d57b751051448c3e2dd359d00131bef2eea3b'
ok 5 - checkout main and initialize independent clones
expecting success:
git -C fully_cloned_submodule/main diff --submodule master"^!" >out &&
grep "file1 updated" out
> file1 updated
ok 6 - can see submodule diffs after independent cloning
expecting success:
mkdir linked_submodule &&
git -C clone/main worktree add "$base_path/linked_submodule/main" "$rev1_hash_main" &&
git -C clone/main/sub worktree add "$base_path/linked_submodule/main/sub" "$rev1_hash_sub"
Preparing worktree (detached HEAD 034dd87)
HEAD is now at 034dd87 add sub
Preparing worktree (detached HEAD ff4d57b)
HEAD is now at ff4d57b file1
ok 7 - checkout sub manually
expecting success:
git -C linked_submodule/main diff --submodule master"^!" >out &&
grep "file1 updated" out
> file1 updated
ok 8 - can see submodule diffs after manual checkout of linked submodule
# still have 1 known breakage(s)
# passed all remaining 7 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7400-submodule-basic.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/.git/
expecting success:
git submodule deinit --all
ok 1 - submodule deinit works on empty repository
expecting success:
>t &&
git add t &&
git commit -m "initial commit" &&
git branch initial
[master (root-commit) d91c556] initial commit
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 t
ok 2 - setup - initial commit
expecting success:
test_when_finished "git update-index --remove sub" &&
git update-index --add --cacheinfo 160000,$(git rev-parse HEAD),sub &&
# missing the .gitmodules file here
test_must_fail git submodule init 2>actual &&
test_i18ngrep "No url found for submodule path" actual
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: No url found for submodule path 'sub' in .gitmodules
ok 3 - submodule init aborts on missing .gitmodules file
expecting success:
test_when_finished "git update-index --remove sub" &&
git update-index --add --cacheinfo 160000,$(git rev-parse HEAD),sub &&
# missing the .gitmodules file here
git submodule update sub 2>actual &&
test_i18ngrep "Submodule path .sub. not initialized" actual
Submodule path 'sub' not initialized
ok 4 - submodule update aborts on missing .gitmodules file
expecting success:
test_when_finished "git update-index --remove sub" &&
git update-index --add --cacheinfo 160000,$(git rev-parse HEAD),sub &&
test_when_finished "rm -f .gitmodules" &&
git config -f .gitmodules submodule.s.path sub &&
test_must_fail git submodule init
fatal: No url found for submodule path 'sub' in .gitmodules
ok 5 - submodule update aborts on missing gitmodules url
expecting success:
cat >expect <<-\EOF &&
'repo-no-commits' does not have a commit checked out
EOF
git init repo-no-commits &&
test_must_fail git submodule add ../a ./repo-no-commits 2>actual &&
test_i18ncmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/repo-no-commits/.git/
ok 6 - add aborts on repository with no commits
expecting success:
mkdir init &&
(
cd init &&
git init &&
echo a >a &&
git add a &&
git commit -m "submodule commit 1" &&
git tag -a -m "rev-1" rev-1
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init/.git/
[master (root-commit) 2eedd87] submodule commit 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
ok 7 - setup - repository in init subdirectory
expecting success:
echo a >a &&
echo z >z &&
git add a init z &&
git commit -m "super commit 1"
warning: adding embedded git repository: init
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> init
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached init
hint:
hint: See "git help submodule" for more information.
[master 2dd19da] super commit 1
Author: A U Thor <author@example.com>
3 files changed, 3 insertions(+)
create mode 100644 a
create mode 160000 init
create mode 100644 z
ok 8 - setup - commit with gitlink
expecting success:
mv init .subrepo
ok 9 - setup - hide init subdirectory
expecting success:
git init addtest &&
git init addtest-ignore
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/addtest/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/addtest-ignore/.git/
ok 10 - setup - repository to add submodules to
expecting success:
echo "refs/heads/master" >expect &&
(
cd addtest &&
git submodule add -q "$submodurl" submod >actual &&
test_must_be_empty actual &&
echo "gitdir: ../.git/modules/submod" >expect &&
test_cmp expect submod/.git &&
(
cd submod &&
git config core.worktree >actual &&
echo "../../../submod" >expect &&
test_cmp expect actual &&
rm -f actual expect
) &&
git submodule init
) &&
rm -f heads head untracked &&
inspect addtest/submod ../.. &&
test_cmp expect heads &&
test_cmp expect head &&
test_must_be_empty untracked
ok 11 - submodule add
expecting success:
test_create_repo parent &&
test_commit -C parent one
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/parent/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 12 - setup parent and one repository
expecting success:
git -C addtest submodule add "file://$submodurl/parent" submod-redirected \
2>err &&
! grep % err &&
test_i18ngrep ! "Checking connectivity" err
ok 13 - redirected submodule add does not show progress
expecting success:
git -C addtest submodule add --progress "file://$submodurl/parent" \
submod-redirected-progress 2>err && \
grep % err
remote:
remote:
remote: Counting objects: 33% (1/3)
remote:
remote:
remote: Counting objects: 66% (2/3)
remote:
remote:
remote: Counting objects: 100% (3/3)
remote:
remote:
remote: Counting objects: 100% (3/3), done.
Receiving objects: 33% (1/3)
Receiving objects: 66% (2/3)
Receiving objects: 100% (3/3)
Receiving objects: 100% (3/3), 214 bytes | 214.00 KiB/s, done.
ok 14 - redirected submodule add --progress does show progress
expecting success:
(
cd addtest-ignore &&
cat <<-\EOF >expect &&
The following path is ignored by one of your .gitignore files:
submod
Use -f if you really want to add it.
EOF
# Does not use test_commit due to the ignore
echo "*" > .gitignore &&
git add --force .gitignore &&
git commit -m"Ignore everything" &&
! git submodule add "$submodurl" submod >actual 2>&1 &&
test_i18ncmp expect actual
)
[master (root-commit) 29c0beb] Ignore everything
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 .gitignore
ok 15 - submodule add to .gitignored path fails
expecting success:
(
cd addtest-ignore &&
git submodule add --force "$submodurl" submod
)
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/addtest-ignore/submod'...
done.
ok 16 - submodule add to .gitignored path with --force
expecting success:
(
cd addtest-ignore &&
bogus_url="$(pwd)/bogus-url" &&
git submodule add --force "$bogus_url" submod &&
git submodule add --force -b initial "$submodurl" submod-branch &&
test "$bogus_url" = "$(git config -f .gitmodules submodule.submod.url)" &&
test "$bogus_url" = "$(git config submodule.submod.url)" &&
# Restore the url
git submodule add --force "$submodurl" submod &&
test "$submodurl" = "$(git config -f .gitmodules submodule.submod.url)" &&
test "$submodurl" = "$(git config submodule.submod.url)"
)
Adding existing repo at 'submod' to the index
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/addtest-ignore/submod-branch'...
done.
Adding existing repo at 'submod' to the index
ok 17 - submodule add to reconfigure existing submodule with --force
expecting success:
echo "refs/heads/initial" >expect-head &&
cat <<-\EOF >expect-heads &&
refs/heads/initial
refs/heads/master
EOF
(
cd addtest &&
git submodule add -b initial "$submodurl" submod-branch &&
test "initial" = "$(git config -f .gitmodules submodule.submod-branch.branch)" &&
git submodule init
) &&
rm -f heads head untracked &&
inspect addtest/submod-branch ../.. &&
test_cmp expect-heads heads &&
test_cmp expect-head head &&
test_must_be_empty untracked
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/addtest/submod-branch'...
done.
ok 18 - submodule add --branch
expecting success:
echo "refs/heads/master" >expect &&
(
cd addtest &&
git submodule add "$submodurl" ././dotsubmod/./frotz/./ &&
git submodule init
) &&
rm -f heads head untracked &&
inspect addtest/dotsubmod/frotz ../../.. &&
test_cmp expect heads &&
test_cmp expect head &&
test_must_be_empty untracked
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/addtest/dotsubmod/frotz'...
done.
ok 19 - submodule add with ./ in path
expecting success:
echo "refs/heads/master" >expect &&
(
cd addtest &&
git submodule add "$submodurl" dotslashdotsubmod/././frotz/./ &&
git submodule init
) &&
rm -f heads head untracked &&
inspect addtest/dotslashdotsubmod/frotz ../../.. &&
test_cmp expect heads &&
test_cmp expect head &&
test_must_be_empty untracked
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/addtest/dotslashdotsubmod/frotz'...
done.
ok 20 - submodule add with /././ in path
expecting success:
echo "refs/heads/master" >expect &&
(
cd addtest &&
git submodule add "$submodurl" slashslashsubmod///frotz// &&
git submodule init
) &&
rm -f heads head untracked &&
inspect addtest/slashslashsubmod/frotz ../../.. &&
test_cmp expect heads &&
test_cmp expect head &&
test_must_be_empty untracked
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/addtest/slashslashsubmod/frotz'...
done.
ok 21 - submodule add with // in path
expecting success:
echo "refs/heads/master" >expect &&
(
cd addtest &&
git submodule add "$submodurl" dotdotsubmod/../realsubmod/frotz/.. &&
git submodule init
) &&
rm -f heads head untracked &&
inspect addtest/realsubmod ../.. &&
test_cmp expect heads &&
test_cmp expect head &&
test_must_be_empty untracked
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/addtest/realsubmod'...
done.
ok 22 - submodule add with /.. in path
expecting success:
echo "refs/heads/master" >expect &&
(
cd addtest &&
git submodule add "$submodurl" dot/dotslashsubmod/./../..////realsubmod2/a/b/c/d/../../../../frotz//.. &&
git submodule init
) &&
rm -f heads head untracked &&
inspect addtest/realsubmod2 ../.. &&
test_cmp expect heads &&
test_cmp expect head &&
test_must_be_empty untracked
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/addtest/realsubmod2'...
done.
ok 23 - submodule add with ./, /.. and // in path
expecting success:
test_when_finished "rm -rf parent sub\\with\\backslash" &&
# Initialize a repo with a backslash in its name
git init sub\\with\\backslash &&
touch sub\\with\\backslash/empty.file &&
git -C sub\\with\\backslash add empty.file &&
git -C sub\\with\\backslash commit -m "Added empty.file" &&
# Add that repository as a submodule
git init parent &&
git -C parent submodule add ../sub\\with\\backslash
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub\with\backslash/.git/
[master (root-commit) a129325] Added empty.file
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 empty.file
Reinitialized existing Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/parent/.git/
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/parent/sub\with\backslash'...
done.
ok 24 - submodule add with \\ in path
expecting success:
echo "refs/heads/master" >expect &&
mkdir addtest/sub &&
(
cd addtest/sub &&
git submodule add "$submodurl" ../realsubmod3 &&
git submodule init
) &&
rm -f heads head untracked &&
inspect addtest/realsubmod3 ../.. &&
test_cmp expect heads &&
test_cmp expect head &&
test_must_be_empty untracked
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/addtest/realsubmod3'...
done.
ok 25 - submodule add in subdirectory
expecting success:
(
cd addtest/sub &&
test_must_fail git submodule add ../../ submod3 2>../../output.err
) &&
test_i18ngrep toplevel output.err
Relative path can only be used from the toplevel of the working tree
ok 26 - submodule add in subdirectory with relative path should fail
expecting success:
git config --file=.gitmodules submodule.example.url git://example.com/init.git
ok 27 - setup - add an example entry to .gitmodules
expecting success:
test_must_fail git submodule status
fatal: no submodule mapping found in .gitmodules for path 'init'
ok 28 - status should fail for unmapped paths
expecting success:
cat <<\EOF >expect &&
[submodule "example"]
url = git://example.com/init.git
path = init
EOF
git config --file=.gitmodules submodule.example.path init &&
test_cmp expect .gitmodules
ok 29 - setup - map path in .gitmodules
expecting success:
git submodule status >lines &&
test_line_count = 1 lines
ok 30 - status should only print one line
expecting success:
rev1=$(cd .subrepo && git rev-parse HEAD) &&
printf "rev1: %s\n" "$rev1" &&
test -n "$rev1"
rev1: 2eedd87afc93c6b6fe1f4450cf5ea4f3070c7232
ok 31 - setup - fetch commit name from submodule
expecting success:
git submodule status >lines &&
grep "^-$rev1" lines
-2eedd87afc93c6b6fe1f4450cf5ea4f3070c7232 init
ok 32 - status should initially be "missing"
expecting success:
echo git://example.com/init.git >expect &&
git submodule init &&
git config submodule.example.url >url &&
git config submodule.example.url ./.subrepo &&
test_cmp expect url
Submodule 'example' (git://example.com/init.git) registered for path 'init'
ok 33 - init should register submodule url in .git/config
expecting success:
test_failure_with_unknown_submodule init
error: pathspec 'no-such-submodule' did not match any file(s) known to git
ok 34 - init should fail with unknown submodule
expecting success:
test_failure_with_unknown_submodule update
error: pathspec 'no-such-submodule' did not match any file(s) known to git
ok 35 - update should fail with unknown submodule
expecting success:
test_failure_with_unknown_submodule status
error: pathspec 'no-such-submodule' did not match any file(s) known to git
ok 36 - status should fail with unknown submodule
expecting success:
test_failure_with_unknown_submodule sync
error: pathspec 'no-such-submodule' did not match any file(s) known to git
ok 37 - sync should fail with unknown submodule
expecting success:
echo hello >expect &&
echo "hello" >init &&
test_must_fail git submodule update &&
test_cmp expect init
fatal: destination path '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init' already exists and is not an empty directory.
fatal: clone of './.subrepo' into submodule path '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init' failed
Failed to clone 'init'. Retry scheduled
fatal: destination path '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init' already exists and is not an empty directory.
fatal: clone of './.subrepo' into submodule path '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init' failed
Failed to clone 'init' a second time, aborting
ok 38 - update should fail when path is used by a file
expecting success:
echo hello >expect &&
rm -fr init &&
mkdir init &&
echo "hello" >init/a &&
test_must_fail git submodule update &&
test_cmp expect init/a
fatal: destination path '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init' already exists and is not an empty directory.
fatal: clone of './.subrepo' into submodule path '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init' failed
Failed to clone 'init'. Retry scheduled
fatal: destination path '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init' already exists and is not an empty directory.
fatal: clone of './.subrepo' into submodule path '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init' failed
Failed to clone 'init' a second time, aborting
ok 39 - update should fail when path is used by a nonempty directory
expecting success:
rm -fr init &&
rm -f head-sha1 &&
echo "$rev1" >expect &&
mkdir init &&
git submodule update -q >update.out &&
test_must_be_empty update.out &&
inspect init &&
test_cmp expect head-sha1
fatal: ref HEAD is not a symbolic ref
ok 40 - update should work when path is an empty dir
expecting success:
git submodule status >list &&
grep "^ $rev1" list
2eedd87afc93c6b6fe1f4450cf5ea4f3070c7232 init (rev-1)
ok 41 - status should be "up-to-date" after update
expecting success:
mkdir -p sub &&
(
cd sub &&
git submodule status >../list
) &&
grep "^ $rev1" list &&
grep "\\.\\./init" list
2eedd87afc93c6b6fe1f4450cf5ea4f3070c7232 ../init (rev-1)
2eedd87afc93c6b6fe1f4450cf5ea4f3070c7232 ../init (rev-1)
ok 42 - status "up-to-date" from subdirectory
expecting success:
mkdir -p sub &&
(
cd sub &&
git submodule status ../init >../list
) &&
grep "^ $rev1" list &&
grep "\\.\\./init" list
2eedd87afc93c6b6fe1f4450cf5ea4f3070c7232 ../init (rev-1)
2eedd87afc93c6b6fe1f4450cf5ea4f3070c7232 ../init (rev-1)
ok 43 - status "up-to-date" from subdirectory with path
expecting success:
(
cd init &&
echo b >b &&
git add b &&
git commit -m "submodule commit 2"
) &&
rev2=$(cd init && git rev-parse HEAD) &&
test -n "$rev2" &&
git submodule status >list &&
grep "^+$rev2" list
[detached HEAD bdbc170] submodule commit 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 b
+bdbc170d9bc74081ccdf3f3f524facfce0d62db6 init (rev-1-1-gbdbc170)
ok 44 - status should be "modified" after submodule commit
expecting success:
git submodule --cached status >list &&
grep "^+$rev1" list
+2eedd87afc93c6b6fe1f4450cf5ea4f3070c7232 init (rev-1)
ok 45 - the --cached sha1 should be rev1
expecting success:
git diff >diff &&
grep "^+Subproject commit $rev2" diff
+Subproject commit bdbc170d9bc74081ccdf3f3f524facfce0d62db6
ok 46 - git diff should report the SHA1 of the new submodule commit
expecting success:
rm -f head-sha1 &&
echo "$rev1" >expect &&
git submodule update init &&
inspect init &&
test_cmp expect head-sha1
Submodule path 'init': checked out '2eedd87afc93c6b6fe1f4450cf5ea4f3070c7232'
fatal: ref HEAD is not a symbolic ref
ok 47 - update should checkout rev1
expecting success:
git submodule status >list &&
grep "^ $rev1" list
2eedd87afc93c6b6fe1f4450cf5ea4f3070c7232 init (rev-1)
ok 48 - status should be "up-to-date" after update
expecting success:
git checkout initial &&
git checkout master
warning: unable to rmdir 'init': Directory not empty
Switched to branch 'initial'
Switched to branch 'master'
ok 49 - checkout superproject with subproject already present
expecting success:
git branch second &&
(
cd init &&
echo s >s &&
git add s &&
git commit -m "change subproject"
) &&
git update-index --add init &&
git commit -m "change init" &&
git format-patch -1 --stdout >P.diff &&
git checkout second &&
git apply --index P.diff &&
git diff --cached master >staged &&
test_must_be_empty staged
[detached HEAD f2ae5cc] change subproject
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 s
[master 03cd6f9] change init
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Switched to branch 'second'
M init
warning: unable to rmdir 'init': Directory not empty
ok 50 - apply submodule diff
expecting success:
mv init init2 &&
git config -f .gitmodules submodule.example.url "$(pwd)/init2" &&
git config --remove-section submodule.example &&
test_must_fail git config submodule.example.url &&
git submodule update init 2> update.out &&
cat update.out &&
test_i18ngrep "not initialized" update.out &&
test_must_fail git rev-parse --resolve-git-dir init/.git &&
git submodule update --init init &&
git rev-parse --resolve-git-dir init/.git
Submodule path 'init' not initialized
Maybe you want to use 'update --init'?
Submodule path 'init' not initialized
fatal: not a gitdir 'init/.git'
Submodule 'example' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init2) registered for path 'init'
Submodule path 'init': checked out 'f2ae5cce6a5da5cb87496286c6e57ea56cdf006b'
/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/.git/modules/example
ok 51 - update --init
expecting success:
mv init init2 &&
git config -f .gitmodules submodule.example.url "$(pwd)/init2" &&
git config --remove-section submodule.example &&
test_must_fail git config submodule.example.url &&
mkdir -p sub &&
(
cd sub &&
git submodule update ../init 2>update.out &&
cat update.out &&
test_i18ngrep "not initialized" update.out &&
test_must_fail git rev-parse --resolve-git-dir ../init/.git &&
git submodule update --init ../init
) &&
git rev-parse --resolve-git-dir init/.git
Submodule path 'init' not initialized
Maybe you want to use 'update --init'?
Submodule path 'init' not initialized
fatal: not a gitdir '../init/.git'
Submodule 'example' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init2) registered for path '../init'
Submodule path '../init': checked out 'f2ae5cce6a5da5cb87496286c6e57ea56cdf006b'
/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/.git/modules/example
ok 52 - update --init from subdirectory
expecting success:
git reset --hard &&
test_must_fail git add init/a
HEAD is now at 2dd19da super commit 1
fatal: Pathspec 'init/a' is in submodule 'init'
ok 53 - do not add files from a submodule
expecting success:
git reset --hard &&
git commit -m "commit subproject" init &&
(cd init &&
echo b > a) &&
git add init/ &&
git diff --exit-code --cached init &&
commit=$(cd init &&
git commit -m update a >/dev/null &&
git rev-parse HEAD) &&
git add init/ &&
test_must_fail git diff --exit-code --cached init &&
test $commit = $(git ls-files --stage |
sed -n "s/^160000 \([^ ]*\).*/\1/p") &&
git reset init/ &&
git diff --exit-code --cached init
HEAD is now at 2dd19da super commit 1
[second 8042117] commit subproject
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/init b/init
index f2ae5cc..42b4e31 160000
--- a/init
+++ b/init
@@ -1 +1 @@
-Subproject commit f2ae5cce6a5da5cb87496286c6e57ea56cdf006b
+Subproject commit 42b4e317926b0221444ccb52de1cc24aea1164f5
Unstaged changes after reset:
M init
ok 54 - gracefully add/reset submodule with a trailing slash
expecting success:
test "init" = "$(git ls-files init/)"
ok 55 - ls-files gracefully handles trailing slash
expecting success:
rm -rf init &&
mkdir init &&
git reset --hard &&
git checkout initial &&
test ! -d init &&
git checkout second
HEAD is now at 8042117 commit subproject
Switched to branch 'initial'
Switched to branch 'second'
ok 56 - moving to a commit without submodule does not leave empty dir
expecting success:
test_must_fail git submodule no-such-subcommand
usage: git submodule [--quiet] [--cached]
or: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
or: git submodule [--quiet] init [--] [<path>...]
or: git submodule [--quiet] deinit [-f|--force] (--all| [--] <path>...)
or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--[no-]recommend-shallow] [--reference <repository>] [--recursive] [--] [<path>...]
or: git submodule [--quiet] set-branch (--default|--branch <branch>) [--] <path>
or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
or: git submodule [--quiet] foreach [--recursive] <command>
or: git submodule [--quiet] sync [--recursive] [--] [<path>...]
or: git submodule [--quiet] absorbgitdirs [--] [<path>...]
ok 57 - submodule <invalid-subcommand> fails
expecting success:
mkdir repo &&
(
cd repo &&
git init &&
echo r >r &&
git add r &&
git commit -m "repo commit 1"
) &&
git clone --bare repo/ bare.git &&
(
cd addtest &&
git submodule add "$submodurl/repo" &&
git config -f .gitmodules submodule.repo.path repo &&
git submodule add "$submodurl/bare.git" &&
git config -f .gitmodules submodule.bare.path bare
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/repo/.git/
[master (root-commit) 0244caa] repo commit 1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 r
Cloning into bare repository 'bare.git'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/addtest/repo'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/addtest/bare'...
done.
ok 58 - add submodules without specifying an explicit path
expecting success:
(
cd addtest &&
touch file &&
test_must_fail git submodule add "$submodurl/repo" file
)
'file' already exists and is not a valid git repo
ok 59 - add should fail when path is used by a file
expecting success:
(
cd addtest &&
mkdir empty-dir &&
test_must_fail git submodule add "$submodurl/repo" empty-dir
)
'empty-dir' already exists and is not a valid git repo
ok 60 - add should fail when path is used by an existing directory
expecting success:
(
cd addtest &&
git submodule add ../repo relative &&
test "$(git config -f .gitmodules submodule.relative.url)" = ../repo &&
git submodule sync relative &&
test "$(git config submodule.relative.url)" = "$submodurl/repo"
)
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/addtest/relative'...
done.
Synchronizing submodule url for 'relative'
ok 61 - use superproject as upstream when path is relative and no url is set there
expecting success:
mkdir reltest &&
(
cd reltest &&
git init &&
mkdir sub &&
(
cd sub &&
git init &&
test_commit foo
) &&
git add sub &&
git config -f .gitmodules submodule.sub.path sub &&
git config -f .gitmodules submodule.sub.url ../subrepo &&
cp .git/config pristine-.git-config &&
cp .gitmodules pristine-.gitmodules
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/reltest/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/reltest/sub/.git/
[master (root-commit) 946e985] foo
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 foo.t
warning: adding embedded git repository: sub
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sub
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sub
hint:
hint: See "git help submodule" for more information.
ok 62 - set up for relative path tests
expecting success:
(
cd reltest &&
cp pristine-.git-config .git/config &&
cp pristine-.gitmodules .gitmodules &&
git config remote.origin.url ssh://hostname/repo &&
git submodule init &&
test "$(git config submodule.sub.url)" = ssh://hostname/subrepo
)
Submodule 'sub' (ssh://hostname/subrepo) registered for path 'sub'
ok 63 - ../subrepo works with URL - ssh://hostname/repo
expecting success:
(
cd reltest &&
cp pristine-.git-config .git/config &&
cp pristine-.gitmodules .gitmodules &&
git config remote.origin.url ssh://hostname:22/repo &&
git submodule init &&
test "$(git config submodule.sub.url)" = ssh://hostname:22/subrepo
)
Submodule 'sub' (ssh://hostname:22/subrepo) registered for path 'sub'
ok 64 - ../subrepo works with port-qualified URL - ssh://hostname:22/repo
expecting success:
(
cd reltest &&
cp pristine-.git-config .git/config &&
cp pristine-.gitmodules .gitmodules &&
git config remote.origin.url "//somewhere else/repo" &&
git submodule init &&
test "$(git config submodule.sub.url)" = "//somewhere else/subrepo"
)
Submodule 'sub' (//somewhere else/subrepo) registered for path 'sub'
ok 65 - ../subrepo path works with local path - //somewhere else/repo
expecting success:
(
cd reltest &&
cp pristine-.git-config .git/config &&
cp pristine-.gitmodules .gitmodules &&
git config remote.origin.url file:///tmp/repo &&
git submodule init &&
test "$(git config submodule.sub.url)" = file:///tmp/subrepo
)
Submodule 'sub' (file:///tmp/subrepo) registered for path 'sub'
ok 66 - ../subrepo works with file URL - file:///tmp/repo
expecting success:
(
cd reltest &&
cp pristine-.git-config .git/config &&
cp pristine-.gitmodules .gitmodules &&
git config remote.origin.url helper:://hostname/repo &&
git submodule init &&
test "$(git config submodule.sub.url)" = helper:://hostname/subrepo
)
Submodule 'sub' (helper:://hostname/subrepo) registered for path 'sub'
ok 67 - ../subrepo works with helper URL- helper:://hostname/repo
expecting success:
(
cd reltest &&
cp pristine-.git-config .git/config &&
git config remote.origin.url user@host:repo &&
git submodule init &&
test "$(git config submodule.sub.url)" = user@host:subrepo
)
Submodule 'sub' (user@host:subrepo) registered for path 'sub'
ok 68 - ../subrepo works with scp-style URL - user@host:repo
expecting success:
(
cd reltest &&
cp pristine-.git-config .git/config &&
cp pristine-.gitmodules .gitmodules &&
git config remote.origin.url user@host:path/to/repo &&
git submodule init &&
test "$(git config submodule.sub.url)" = user@host:path/to/subrepo
)
Submodule 'sub' (user@host:path/to/subrepo) registered for path 'sub'
ok 69 - ../subrepo works with scp-style URL - user@host:path/to/repo
expecting success:
(
cd reltest &&
cp pristine-.git-config .git/config &&
cp pristine-.gitmodules .gitmodules &&
git config remote.origin.url foo &&
# actual: fails with an error
git submodule init &&
test "$(git config submodule.sub.url)" = subrepo
)
Submodule 'sub' (subrepo) registered for path 'sub'
ok 70 - ../subrepo works with relative local path - foo
expecting success:
(
cd reltest &&
cp pristine-.git-config .git/config &&
cp pristine-.gitmodules .gitmodules &&
git config remote.origin.url foo/bar &&
git submodule init &&
test "$(git config submodule.sub.url)" = foo/subrepo
)
Submodule 'sub' (foo/subrepo) registered for path 'sub'
ok 71 - ../subrepo works with relative local path - foo/bar
expecting success:
(
cd reltest &&
cp pristine-.git-config .git/config &&
cp pristine-.gitmodules .gitmodules &&
git config remote.origin.url ./foo &&
git submodule init &&
test "$(git config submodule.sub.url)" = subrepo
)
Submodule 'sub' (subrepo) registered for path 'sub'
ok 72 - ../subrepo works with relative local path - ./foo
expecting success:
(
cd reltest &&
cp pristine-.git-config .git/config &&
cp pristine-.gitmodules .gitmodules &&
git config remote.origin.url ./foo/bar &&
git submodule init &&
test "$(git config submodule.sub.url)" = foo/subrepo
)
Submodule 'sub' (foo/subrepo) registered for path 'sub'
ok 73 - ../subrepo works with relative local path - ./foo/bar
expecting success:
(
cd reltest &&
cp pristine-.git-config .git/config &&
cp pristine-.gitmodules .gitmodules &&
git config remote.origin.url ../foo &&
git submodule init &&
test "$(git config submodule.sub.url)" = ../subrepo
)
Submodule 'sub' (../subrepo) registered for path 'sub'
ok 74 - ../subrepo works with relative local path - ../foo
expecting success:
(
cd reltest &&
cp pristine-.git-config .git/config &&
cp pristine-.gitmodules .gitmodules &&
git config remote.origin.url ../foo/bar &&
git submodule init &&
test "$(git config submodule.sub.url)" = ../foo/subrepo
)
Submodule 'sub' (../foo/subrepo) registered for path 'sub'
ok 75 - ../subrepo works with relative local path - ../foo/bar
expecting success:
(
cd reltest &&
cp pristine-.git-config .git/config &&
cp pristine-.gitmodules .gitmodules &&
mkdir -p a/b/c &&
(cd a/b/c && git init && test_commit msg) &&
git config remote.origin.url ../foo/bar.git &&
git submodule add ../bar/a/b/c ./a/b/c &&
git submodule init &&
test "$(git config submodule.a/b/c.url)" = ../foo/bar/a/b/c
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/reltest/a/b/c/.git/
[master (root-commit) 11e1cd7] msg
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 msg.t
Adding existing repo at 'a/b/c' to the index
Submodule 'sub' (../foo/subrepo) registered for path 'sub'
ok 76 - ../bar/a/b/c works with relative local path - ../foo/bar.git
expecting success:
(
cd addtest &&
git submodule status >expect
) &&
mv addtest addtest2 &&
(
cd addtest2 &&
git submodule status >actual &&
test_cmp expect actual
)
ok 77 - moving the superproject does not break submodules
expecting success:
(
cd addtest2 &&
git submodule status
) >actual &&
sed -e "s/^ \([^ ]* repo\) .*/-\1/" <actual >expect &&
mv addtest2/repo addtest2/repo.bak &&
test_when_finished "mv addtest2/repo.bak addtest2/repo" &&
(
cd addtest2 &&
git submodule status
) >actual &&
test_cmp expect actual
ok 78 - moving the submodule does not break the superproject
expecting success:
(
cd addtest2 &&
(
cd repo &&
echo "$submodurl/repo" >expect &&
git config remote.origin.url >actual &&
test_cmp expect actual &&
echo "gitdir: ../.git/modules/repo" >expect &&
test_cmp expect .git
) &&
rm -rf repo &&
git rm repo &&
git submodule add -q --name repo_new "$submodurl/bare.git" repo >actual &&
test_must_be_empty actual &&
echo "gitdir: ../.git/modules/submod" >expect &&
test_cmp expect submod/.git &&
(
cd repo &&
echo "$submodurl/bare.git" >expect &&
git config remote.origin.url >actual &&
test_cmp expect actual &&
echo "gitdir: ../.git/modules/repo_new" >expect &&
test_cmp expect .git
) &&
echo "repo" >expect &&
test_must_fail git config -f .gitmodules submodule.repo.path &&
git config -f .gitmodules submodule.repo_new.path >actual &&
test_cmp expect actual&&
echo "$submodurl/repo" >expect &&
test_must_fail git config -f .gitmodules submodule.repo.url &&
echo "$submodurl/bare.git" >expect &&
git config -f .gitmodules submodule.repo_new.url >actual &&
test_cmp expect actual &&
echo "$submodurl/repo" >expect &&
git config submodule.repo.url >actual &&
test_cmp expect actual &&
echo "$submodurl/bare.git" >expect &&
git config submodule.repo_new.url >actual &&
test_cmp expect actual
)
rm 'repo'
ok 79 - submodule add --name allows to replace a submodule with another at the same path
expecting success:
test_when_finished "rm -rf super clone2 subsub sub3" &&
mkdir subsub &&
(
cd subsub &&
git init &&
>t &&
git add t &&
git commit -m "initial commit"
) &&
mkdir sub3 &&
(
cd sub3 &&
git init &&
>t &&
git add t &&
git commit -m "initial commit" &&
git submodule add ../subsub dirdir/subsub &&
git commit -m "add submodule subsub"
) &&
mkdir super &&
(
cd super &&
git init &&
>t &&
git add t &&
git commit -m "initial commit" &&
git submodule add ../sub3 &&
git commit -m "add submodule sub"
) &&
git clone super clone2 &&
(
cd clone2 &&
git submodule update --init --recursive &&
echo "gitdir: ../.git/modules/sub3" >./sub3/.git_expect &&
echo "gitdir: ../../../.git/modules/sub3/modules/dirdir/subsub" >./sub3/dirdir/subsub/.git_expect
) &&
test_cmp clone2/sub3/.git_expect clone2/sub3/.git &&
test_cmp clone2/sub3/dirdir/subsub/.git_expect clone2/sub3/dirdir/subsub/.git
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/subsub/.git/
[master (root-commit) b53efa3] initial commit
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub3/.git/
[master (root-commit) b53efa3] initial commit
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 t
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub3/dirdir/subsub'...
done.
[master e6f2fcc] add submodule subsub
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 dirdir/subsub
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/super/.git/
[master (root-commit) b53efa3] initial commit
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 t
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/super/sub3'...
done.
[master a307821] add submodule sub
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub3
Cloning into 'clone2'...
done.
Submodule 'sub3' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub3) registered for path 'sub3'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/clone2/sub3'...
done.
Submodule path 'sub3': checked out 'e6f2fcc279299766e5fd82861e01a38b63aaaf3b'
Submodule 'dirdir/subsub' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/subsub) registered for path 'sub3/dirdir/subsub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/clone2/sub3/dirdir/subsub'...
done.
Submodule path 'sub3/dirdir/subsub': checked out 'b53efa3ba7e36ac5829f9621027fbe0575deb58e'
ok 80 - recursive relative submodules stay relative
expecting success:
(
cd addtest2 &&
rm -rf repo &&
git rm repo &&
test_must_fail git submodule add -q --name repo_new "$submodurl/repo.git" repo &&
test ! -d repo &&
test_must_fail git config -f .gitmodules submodule.repo_new.path &&
test_must_fail git config -f .gitmodules submodule.repo_new.url &&
echo "$submodurl/bare.git" >expect &&
git config submodule.repo_new.url >actual &&
test_cmp expect actual &&
git submodule add -f -q --name repo_new "$submodurl/repo.git" repo &&
test -d repo &&
echo "repo" >expect &&
git config -f .gitmodules submodule.repo_new.path >actual &&
test_cmp expect actual&&
echo "$submodurl/repo.git" >expect &&
git config -f .gitmodules submodule.repo_new.url >actual &&
test_cmp expect actual &&
echo "$submodurl/repo.git" >expect &&
git config submodule.repo_new.url >actual &&
test_cmp expect actual
)
rm 'repo'
A git directory for 'repo_new' is found locally with remote(s):
origin /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/bare.git
If you want to reuse this local git directory instead of cloning again from
/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/repo.git
use the '--force' option. If the local git directory is not the correct repo
or you are unsure what this means choose another name with the '--name' option.
Reactivating local git directory for submodule 'repo_new'.
ok 81 - submodule add with an existing name fails unless forced
expecting success:
git submodule add ./init2 example2 &&
git commit -m "submodule example2 added"
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/example2'...
done.
[second 806a4fa] submodule example2 added
Author: A U Thor <author@example.com>
2 files changed, 7 insertions(+)
create mode 100644 .gitmodules
create mode 160000 example2
ok 82 - set up a second submodule
expecting success:
test_when_finished "rm -rf newdirectory" &&
mkdir newdirectory &&
(
cd newdirectory &&
git init &&
>file &&
git add file &&
git commit -m "repo should not be empty" &&
git submodule deinit . &&
git submodule deinit --all
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/newdirectory/.git/
[master (root-commit) 9bf0f79] repo should not be empty
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
ok 83 - submodule deinit works on repository without submodules
expecting success:
git config submodule.example.foo bar &&
git config submodule.example2.frotz nitfol &&
git submodule deinit init &&
test -z "$(git config --get-regexp "submodule\.example\.")" &&
test -n "$(git config --get-regexp "submodule\.example2\.")" &&
test -f example2/.git &&
rmdir init
Cleared directory 'init'
Submodule 'example' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init2) unregistered for path 'init'
ok 84 - submodule deinit should remove the whole submodule section from .git/config
expecting success:
test_path_is_file .git/modules/example/config &&
test_must_fail git config -f .git/modules/example/config core.worktree
ok 85 - submodule deinit should unset core.worktree
expecting success:
git submodule update --init &&
git config submodule.example.foo bar &&
mkdir -p sub &&
(
cd sub &&
git submodule deinit ../init >../output
) &&
test_i18ngrep "\\.\\./init" output &&
test -z "$(git config --get-regexp "submodule\.example\.")" &&
test -n "$(git config --get-regexp "submodule\.example2\.")" &&
test -f example2/.git &&
rmdir init
Submodule 'example' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init2) registered for path 'init'
Submodule path 'init': checked out 'f2ae5cce6a5da5cb87496286c6e57ea56cdf006b'
Cleared directory '../init'
Submodule 'example' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init2) unregistered for path '../init'
ok 86 - submodule deinit from subdirectory
expecting success:
git submodule update --init &&
git config submodule.example.foo bar &&
git config submodule.example2.frotz nitfol &&
test_must_fail git submodule deinit &&
git submodule deinit . >actual &&
test -z "$(git config --get-regexp "submodule\.example\.")" &&
test -z "$(git config --get-regexp "submodule\.example2\.")" &&
test_i18ngrep "Cleared directory .init" actual &&
test_i18ngrep "Cleared directory .example2" actual &&
rmdir init example2
Submodule 'example' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init2) registered for path 'init'
Submodule path 'init': checked out 'f2ae5cce6a5da5cb87496286c6e57ea56cdf006b'
fatal: Use '--all' if you really want to deinitialize all submodules
Cleared directory 'init'
Cleared directory 'example2'
ok 87 - submodule deinit . deinits all initialized submodules
expecting success:
git submodule update --init &&
git config submodule.example.foo bar &&
git config submodule.example2.frotz nitfol &&
test_must_fail git submodule deinit &&
git submodule deinit --all >actual &&
test -z "$(git config --get-regexp "submodule\.example\.")" &&
test -z "$(git config --get-regexp "submodule\.example2\.")" &&
test_i18ngrep "Cleared directory .init" actual &&
test_i18ngrep "Cleared directory .example2" actual &&
rmdir init example2
warning: could not look up configuration 'remote.origin.url'. Assuming this repository is its own authoritative upstream.
Submodule 'example2' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init2) registered for path 'example2'
Submodule 'example' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init2) registered for path 'init'
Submodule path 'example2': checked out '42b4e317926b0221444ccb52de1cc24aea1164f5'
Submodule path 'init': checked out 'f2ae5cce6a5da5cb87496286c6e57ea56cdf006b'
fatal: Use '--all' if you really want to deinitialize all submodules
Cleared directory 'init'
Cleared directory 'example2'
ok 88 - submodule deinit --all deinits all initialized submodules
expecting success:
git submodule update --init &&
rm -rf init example2/* example2/.git &&
git submodule deinit init example2 >actual &&
test -z "$(git config --get-regexp "submodule\.example\.")" &&
test -z "$(git config --get-regexp "submodule\.example2\.")" &&
test_i18ngrep ! "Cleared directory .init" actual &&
test_i18ngrep "Cleared directory .example2" actual &&
rmdir init
warning: could not look up configuration 'remote.origin.url'. Assuming this repository is its own authoritative upstream.
Submodule 'example2' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init2) registered for path 'example2'
Submodule 'example' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init2) registered for path 'init'
Submodule path 'example2': checked out '42b4e317926b0221444ccb52de1cc24aea1164f5'
Submodule path 'init': checked out 'f2ae5cce6a5da5cb87496286c6e57ea56cdf006b'
Cleared directory 'example2'
ok 89 - submodule deinit deinits a submodule when its work tree is missing or empty
expecting success:
git submodule update --init &&
echo X >>init/s &&
test_must_fail git submodule deinit init &&
test -n "$(git config --get-regexp "submodule\.example\.")" &&
test -f example2/.git &&
git submodule deinit -f init >actual &&
test -z "$(git config --get-regexp "submodule\.example\.")" &&
test_i18ngrep "Cleared directory .init" actual &&
rmdir init
warning: could not look up configuration 'remote.origin.url'. Assuming this repository is its own authoritative upstream.
Submodule 'example2' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init2) registered for path 'example2'
Submodule 'example' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init2) registered for path 'init'
Submodule path 'example2': checked out '42b4e317926b0221444ccb52de1cc24aea1164f5'
Submodule path 'init': checked out 'f2ae5cce6a5da5cb87496286c6e57ea56cdf006b'
error: the following file has local modifications:
init
(use --cached to keep the file, or -f to force removal)
fatal: Submodule work tree 'init' contains local modifications; use '-f' to discard them
Cleared directory 'init'
ok 90 - submodule deinit fails when the submodule contains modifications unless forced
expecting success:
git submodule update --init &&
echo X >>init/untracked &&
test_must_fail git submodule deinit init &&
test -n "$(git config --get-regexp "submodule\.example\.")" &&
test -f example2/.git &&
git submodule deinit -f init >actual &&
test -z "$(git config --get-regexp "submodule\.example\.")" &&
test_i18ngrep "Cleared directory .init" actual &&
rmdir init
Submodule 'example' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init2) registered for path 'init'
Submodule path 'init': checked out 'f2ae5cce6a5da5cb87496286c6e57ea56cdf006b'
error: the following file has local modifications:
init
(use --cached to keep the file, or -f to force removal)
fatal: Submodule work tree 'init' contains local modifications; use '-f' to discard them
Cleared directory 'init'
ok 91 - submodule deinit fails when the submodule contains untracked files unless forced
expecting success:
git submodule update --init &&
(
cd init &&
git checkout HEAD^
) &&
test_must_fail git submodule deinit init &&
test -n "$(git config --get-regexp "submodule\.example\.")" &&
test -f example2/.git &&
git submodule deinit -f init >actual &&
test -z "$(git config --get-regexp "submodule\.example\.")" &&
test_i18ngrep "Cleared directory .init" actual &&
rmdir init
Submodule 'example' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init2) registered for path 'init'
Submodule path 'init': checked out 'f2ae5cce6a5da5cb87496286c6e57ea56cdf006b'
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
f2ae5cc change subproject
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> f2ae5cc
HEAD is now at 2eedd87 submodule commit 1
error: the following file has local modifications:
init
(use --cached to keep the file, or -f to force removal)
fatal: Submodule work tree 'init' contains local modifications; use '-f' to discard them
Cleared directory 'init'
ok 92 - submodule deinit fails when the submodule HEAD does not match unless forced
expecting success:
git submodule update --init &&
git submodule deinit init >actual &&
test_i18ngrep "Submodule .example. (.*) unregistered for path .init" actual &&
test_i18ngrep "Cleared directory .init" actual &&
git submodule deinit init >actual &&
test_i18ngrep ! "Submodule .example. (.*) unregistered for path .init" actual &&
test_i18ngrep "Cleared directory .init" actual &&
git submodule deinit . >actual &&
test_i18ngrep ! "Submodule .example. (.*) unregistered for path .init" actual &&
test_i18ngrep "Submodule .example2. (.*) unregistered for path .example2" actual &&
test_i18ngrep "Cleared directory .init" actual &&
git submodule deinit . >actual &&
test_i18ngrep ! "Submodule .example. (.*) unregistered for path .init" actual &&
test_i18ngrep ! "Submodule .example2. (.*) unregistered for path .example2" actual &&
test_i18ngrep "Cleared directory .init" actual &&
git submodule deinit --all >actual &&
test_i18ngrep ! "Submodule .example. (.*) unregistered for path .init" actual &&
test_i18ngrep ! "Submodule .example2. (.*) unregistered for path .example2" actual &&
test_i18ngrep "Cleared directory .init" actual &&
rmdir init example2
Submodule 'example' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init2) registered for path 'init'
From /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/./.subrepo
* branch f2ae5cce6a5da5cb87496286c6e57ea56cdf006b -> FETCH_HEAD
Submodule path 'init': checked out 'f2ae5cce6a5da5cb87496286c6e57ea56cdf006b'
Submodule 'example' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init2) unregistered for path 'init'
Cleared directory 'init'
warning: Could not unset core.worktree setting in submodule 'init'
Cleared directory 'init'
warning: Could not unset core.worktree setting in submodule 'init'
Submodule 'example2' (./init2) unregistered for path 'example2'
Cleared directory 'init'
warning: Could not unset core.worktree setting in submodule 'example2'
warning: Could not unset core.worktree setting in submodule 'init'
Cleared directory 'init'
warning: Could not unset core.worktree setting in submodule 'example2'
warning: Could not unset core.worktree setting in submodule 'init'
Cleared directory 'init'
ok 93 - submodule deinit is silent when used on an uninitialized submodule
expecting success:
git submodule update --init &&
(
cd init &&
rm .git &&
cp -R ../.git/modules/example .git &&
GIT_WORK_TREE=. git config --unset core.worktree
) &&
test_must_fail git submodule deinit init &&
test_must_fail git submodule deinit -f init &&
test -d init/.git &&
test -n "$(git config --get-regexp "submodule\.example\.")"
warning: could not look up configuration 'remote.origin.url'. Assuming this repository is its own authoritative upstream.
Submodule 'example2' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init2) registered for path 'example2'
Submodule 'example' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/init2) registered for path 'init'
Submodule path 'example2': checked out '42b4e317926b0221444ccb52de1cc24aea1164f5'
Submodule path 'init': checked out 'f2ae5cce6a5da5cb87496286c6e57ea56cdf006b'
fatal: Submodule work tree 'init' contains a .git directory (use 'rm -rf' if you really want to remove it including all of its history)
fatal: Submodule work tree 'init' contains a .git directory (use 'rm -rf' if you really want to remove it including all of its history)
ok 94 - submodule deinit fails when submodule has a .git directory even when forced
expecting success:
svname=$(printf "\303\245 \303\244\303\266") &&
mkdir "$svname" &&
(
cd "$svname" &&
git init &&
>sub &&
git add sub &&
git commit -m "init sub"
) &&
git submodule add ./"$svname" &&
git submodule >&2 &&
test -n "$(git submodule | grep "$svname")"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/å äö/.git/
[master (root-commit) ea6909a] init sub
Author: A U Thor <author@example.com>
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 sub
Adding existing repo at 'å äö' to the index
42b4e317926b0221444ccb52de1cc24aea1164f5 example2 (rev-1-2-g42b4e31)
f2ae5cce6a5da5cb87496286c6e57ea56cdf006b init (rev-1-1-gf2ae5cc)
ea6909a6ccbadc034edc8c42d9d2b85a69afe610 å äö (heads/master)
ok 95 - submodule with UTF-8 name
expecting success:
mkdir super &&
pwd=$(pwd) &&
(
cd super &&
git init &&
git submodule add --depth=1 file://"$pwd"/example2 submodule &&
(
cd submodule &&
test 1 = $(git log --oneline | wc -l)
)
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/super/.git/
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/super/submodule'...
ok 96 - submodule add clone shallow submodule
expecting success:
mkdir -p dir1/b &&
(
cd dir1/b &&
git init &&
echo hi >testfile2 &&
git add . &&
git commit -m "test1"
) &&
mkdir -p dir2/b &&
(
cd dir2/b &&
git init &&
echo hello >testfile1 &&
git add . &&
git commit -m "test2"
) &&
git submodule add /dir1/b dir1/b &&
git submodule add /dir2/b dir2/b &&
git commit -m "first submodule commit" &&
git submodule--helper list dir1/b |cut -c51- >actual &&
echo "dir1/b" >expect &&
test_cmp expect actual
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/dir1/b/.git/
[master (root-commit) 9e1c8ff] test1
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 testfile2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/dir2/b/.git/
[master (root-commit) 0321a28] test2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 testfile1
Adding existing repo at 'dir1/b' to the index
Adding existing repo at 'dir2/b' to the index
[second fa22f79] first submodule commit
Author: A U Thor <author@example.com>
4 files changed, 12 insertions(+)
create mode 160000 dir1/b
create mode 160000 dir2/b
create mode 160000 "\303\245 \303\244\303\266"
ok 97 - submodule helper list is not confused by common prefixes
expecting success:
git init sub1 &&
test_commit -C sub1 test &&
test_commit -C sub1 test2 &&
git init multisuper &&
git -C multisuper submodule add ../sub1 sub0 &&
git -C multisuper submodule add ../sub1 sub1 &&
git -C multisuper submodule add ../sub1 sub2 &&
git -C multisuper submodule add ../sub1 sub3 &&
git -C multisuper commit -m "add some submodules"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1/.git/
[master (root-commit) f9e7a82] test
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 test.t
[master 71cddcb] test2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 test2.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper/.git/
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper/sub0'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper/sub2'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper/sub3'...
done.
[master (root-commit) a188ac0] add some submodules
Author: A U Thor <author@example.com>
5 files changed, 16 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub0
create mode 160000 sub1
create mode 160000 sub2
create mode 160000 sub3
ok 98 - setup superproject with submodules
expecting success:
test_when_finished "rm -rf multisuper_clone" &&
pwd=$(pwd) &&
git clone file://"$pwd"/multisuper multisuper_clone &&
git -C multisuper_clone submodule update --init . ":(exclude)sub0" &&
git -C multisuper_clone submodule status |cut -c 1,43- >actual &&
test_cmp expect actual
Cloning into 'multisuper_clone'...
Submodule 'sub1' (file:///<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1) registered for path 'sub1'
Submodule 'sub2' (file:///<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1) registered for path 'sub2'
Submodule 'sub3' (file:///<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1) registered for path 'sub3'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub1'...
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub2'...
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub3'...
Submodule path 'sub1': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
Submodule path 'sub2': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
Submodule path 'sub3': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
ok 99 - submodule update --init with a specification
expecting success:
test_when_finished "rm -rf multisuper_clone" &&
pwd=$(pwd) &&
git clone file://"$pwd"/multisuper multisuper_clone &&
git -C multisuper_clone config submodule.active "." &&
git -C multisuper_clone config --add submodule.active ":(exclude)sub0" &&
git -C multisuper_clone submodule update --init &&
git -C multisuper_clone submodule status |cut -c 1,43- >actual &&
test_cmp expect actual
Cloning into 'multisuper_clone'...
Submodule 'sub1' (file:///<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1) registered for path 'sub1'
Submodule 'sub2' (file:///<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1) registered for path 'sub2'
Submodule 'sub3' (file:///<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1) registered for path 'sub3'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub1'...
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub2'...
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub3'...
Submodule path 'sub1': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
Submodule path 'sub2': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
Submodule path 'sub3': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
ok 100 - submodule update --init with submodule.active set
expecting success:
test_when_finished "rm -rf multisuper_clone" &&
pwd=$(pwd) &&
git clone file://"$pwd"/multisuper multisuper_clone &&
git -C multisuper_clone config --bool submodule.sub0.active "true" &&
git -C multisuper_clone config --bool submodule.sub1.active "false" &&
git -C multisuper_clone config --bool submodule.sub2.active "true" &&
cat >expect <<-\EOF &&
sub0 (test2)
-sub1
sub2 (test2)
-sub3
EOF
git -C multisuper_clone submodule update &&
git -C multisuper_clone submodule status |cut -c 1,43- >actual &&
test_cmp expect actual
Cloning into 'multisuper_clone'...
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub0'...
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub2'...
Submodule path 'sub0': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
Submodule path 'sub2': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
ok 101 - submodule update and setting submodule.<name>.active
expecting success:
test_when_finished "rm -rf test/test" &&
mkdir test &&
# another dir breaks accidental relative paths still being correct
git clone file://"$pwd"/multisuper test/test &&
(
cd test/test &&
git config submodule.active "." &&
# do not pass --init flag, as the submodule is already active:
git submodule update &&
git submodule status >actual_raw &&
cut -c 1,43- actual_raw >actual &&
cat >expect <<-\EOF &&
sub0 (test2)
sub1 (test2)
sub2 (test2)
sub3 (test2)
EOF
test_cmp expect actual
)
Cloning into 'test/test'...
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/test/test/sub0'...
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/test/test/sub1'...
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/test/test/sub2'...
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/test/test/sub3'...
Submodule path 'sub0': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
Submodule path 'sub1': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
Submodule path 'sub2': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
Submodule path 'sub3': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
ok 102 - clone active submodule without submodule url set
expecting success:
test_when_finished "rm -rf multisuper_clone" &&
cat >expected <<-\EOF &&
sub0 (test2)
-sub1
-sub2
-sub3
EOF
git clone --recurse-submodules="sub0" multisuper multisuper_clone &&
git -C multisuper_clone submodule status |cut -c1,43- >actual &&
test_cmp expected actual
Cloning into 'multisuper_clone'...
done.
Submodule 'sub0' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1) registered for path 'sub0'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub0'...
done.
Submodule path 'sub0': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
ok 103 - clone --recurse-submodules with a pathspec works
expecting success:
test_when_finished "rm -rf multisuper_clone" &&
cat >expect <<-\EOF &&
-sub0
sub1 (test2)
-sub2
sub3 (test2)
EOF
git clone --recurse-submodules="." \
--recurse-submodules=":(exclude)sub0" \
--recurse-submodules=":(exclude)sub2" \
multisuper multisuper_clone &&
git -C multisuper_clone submodule status |cut -c1,43- >actual &&
test_cmp expect actual
Cloning into 'multisuper_clone'...
done.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1) registered for path 'sub1'
Submodule 'sub3' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1) registered for path 'sub3'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub3'...
done.
Submodule path 'sub1': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
Submodule path 'sub3': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
ok 104 - clone with multiple --recurse-submodules options
expecting success:
test_when_finished "rm -rf multisuper_clone" &&
cat <<-\EOF >expect &&
-sub0
sub1 (test2)
-sub2
sub3 (test2)
EOF
cat <<-\EOF >expect2 &&
-sub0
sub1 (test2)
-sub2
sub3 (test2)
-sub4
sub5 (test2)
EOF
git clone --recurse-submodules="." \
--recurse-submodules=":(exclude)sub0" \
--recurse-submodules=":(exclude)sub2" \
--recurse-submodules=":(exclude)sub4" \
multisuper multisuper_clone &&
git -C multisuper_clone submodule status |cut -c1,43- >actual &&
test_cmp expect actual &&
git -C multisuper submodule add ../sub1 sub4 &&
git -C multisuper submodule add ../sub1 sub5 &&
git -C multisuper commit -m "add more submodules" &&
# obtain the new superproject
git -C multisuper_clone pull &&
git -C multisuper_clone submodule update --init &&
git -C multisuper_clone submodule status |cut -c1,43- >actual &&
test_cmp expect2 actual
Cloning into 'multisuper_clone'...
done.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1) registered for path 'sub1'
Submodule 'sub3' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1) registered for path 'sub3'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub3'...
done.
Submodule path 'sub1': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
Submodule path 'sub3': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper/sub4'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper/sub5'...
done.
[master 084f781] add more submodules
Author: A U Thor <author@example.com>
3 files changed, 8 insertions(+)
create mode 160000 sub4
create mode 160000 sub5
From /<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper
a188ac0..084f781 master -> origin/master
Updating a188ac0..084f781
Fast-forward
.gitmodules | 6 ++++++
sub4 | 1 +
sub5 | 1 +
3 files changed, 8 insertions(+)
create mode 160000 sub4
create mode 160000 sub5
Submodule 'sub5' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1) registered for path 'sub5'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub5'...
done.
Submodule path 'sub5': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
ok 105 - clone and subsequent updates correctly auto-initialize submodules
expecting success:
test_when_finished "rm -rf multisuper_clone" &&
git clone --recurse-submodules="." \
--recurse-submodules=":(exclude)sub0" \
multisuper multisuper_clone &&
git -C multisuper_clone submodule init -- sub0 sub1 &&
git -C multisuper_clone config --get submodule.sub0.active &&
test_must_fail git -C multisuper_clone config --get submodule.sub1.active
Cloning into 'multisuper_clone'...
done.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1) registered for path 'sub1'
Submodule 'sub2' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1) registered for path 'sub2'
Submodule 'sub3' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1) registered for path 'sub3'
Submodule 'sub4' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1) registered for path 'sub4'
Submodule 'sub5' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1) registered for path 'sub5'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub2'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub3'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub4'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/multisuper_clone/sub5'...
done.
Submodule path 'sub1': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
Submodule path 'sub2': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
Submodule path 'sub3': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
Submodule path 'sub4': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
Submodule path 'sub5': checked out '71cddcbcdbe5634f8172f69e2745e3c01ba0d1bb'
Submodule 'sub0' (/<<PKGBUILDDIR>>/t/trash directory.t7400-submodule-basic/sub1) registered for path 'sub0'
true
ok 106 - init properly sets the config
expecting success:
test_when_finished "rm -rf multisuper_clone" &&
git clone -q --recurse-submodules multisuper multisuper_clone >actual &&
test_must_be_empty actual
ok 107 - recursive clone respects -q
# passed all 107 test(s)
1..107
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7406-submodule-update.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/.git/
expecting success:
echo file > file &&
git add file &&
test_tick &&
git commit -m upstream &&
git clone . super &&
git clone super submodule &&
git clone super rebasing &&
git clone super merging &&
git clone super none &&
(cd super &&
git submodule add ../submodule submodule &&
test_tick &&
git commit -m "submodule" &&
git submodule init submodule
) &&
(cd submodule &&
echo "line2" > file &&
git add file &&
git commit -m "Commit 2"
) &&
(cd super &&
(cd submodule &&
git pull --rebase origin
) &&
git add submodule &&
git commit -m "submodule update"
) &&
(cd super &&
git submodule add ../rebasing rebasing &&
test_tick &&
git commit -m "rebasing"
) &&
(cd super &&
git submodule add ../merging merging &&
test_tick &&
git commit -m "rebasing"
) &&
(cd super &&
git submodule add ../none none &&
test_tick &&
git commit -m "none"
) &&
git clone . recursivesuper &&
( cd recursivesuper &&
git submodule add ../super super
)
[master (root-commit) 0c90624] upstream
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Cloning into 'super'...
done.
Cloning into 'submodule'...
done.
Cloning into 'rebasing'...
done.
Cloning into 'merging'...
done.
Cloning into 'none'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super/submodule'...
done.
[master 3ae95bc] submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 submodule
[master 4301fd3] Commit 2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
From /<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/submodule
0c90624..4301fd3 master -> origin/master
Updating 0c90624..4301fd3
Fast-forward
file | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Current branch master is up to date.
[master fed7cea] submodule update
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super/rebasing'...
done.
[master 5366fa1] rebasing
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 160000 rebasing
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super/merging'...
done.
[master 7cb8417] rebasing
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 160000 merging
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super/none'...
done.
[master e1c6586] none
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 160000 none
Cloning into 'recursivesuper'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/recursivesuper/super'...
done.
ok 1 - setup a submodule tree
expecting success:
(cd super/submodule &&
git reset --hard HEAD~1
) &&
(cd super &&
(cd submodule &&
compare_head
) &&
git submodule update submodule &&
cd submodule &&
! compare_head
)
HEAD is now at 0c90624 upstream
Submodule path 'submodule': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 2 - submodule update detaching the HEAD
expecting success:
(cd super/submodule &&
git reset --hard HEAD~1
) &&
mkdir super/sub &&
(cd super/sub &&
(cd ../submodule &&
compare_head
) &&
git submodule update ../submodule &&
cd ../submodule &&
! compare_head
)
HEAD is now at 0c90624 upstream
Submodule path '../submodule': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 3 - submodule update from subdirectory
expecting success:
git -C recursivesuper/super reset --hard HEAD^ &&
(cd recursivesuper &&
mkdir tmp &&
cd tmp &&
git submodule update --init --recursive ../super >../../actual 2>../../actual2
) &&
test_i18ncmp expect actual &&
sort actual2 >actual2.sorted &&
test_i18ncmp expect2 actual2.sorted
HEAD is now at 7cb8417 rebasing
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
ok 4 - submodule update --init --recursive from subdirectory
expecting success:
git init withsubs &&
(cd withsubs &&
mkdir foo &&
git submodule add "$(pwd)/../rebasing" foo/sub &&
(cd foo &&
git submodule deinit -f sub &&
git submodule update --init sub 2>../../actual2
)
) &&
test_i18ncmp expect2 actual2
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/withsubs/.git/
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/withsubs/foo/sub'...
done.
Cleared directory 'sub'
Submodule 'foo/sub' (/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/withsubs/../rebasing) unregistered for path 'sub'
Submodule path 'sub': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
ok 5 - submodule update --init from and of subdirectory
expecting success:
(cd submodule &&
echo line3 >> file &&
git add file &&
test_tick &&
git commit -m "upstream line3"
) &&
(cd super/submodule &&
head=$(git rev-parse --verify HEAD) &&
echo "Submodule path ${apos}submodule$apos: checked out $apos$head$apos" > ../../expected &&
git reset --hard HEAD~1
) &&
(cd super &&
git submodule update > ../actual 2> ../actual.err
) &&
test_i18ncmp expected actual &&
test_must_be_empty actual.err
[master 820877d] upstream line3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
HEAD is now at 0c90624 upstream
ok 6 - submodule update does not fetch already present commits
expecting success:
(cd super/submodule &&
git reset --hard HEAD~1 &&
echo "local change" > file
) &&
(cd super &&
(cd submodule &&
compare_head
) &&
test_must_fail git submodule update submodule
)
HEAD is now at 0c90624 upstream
error: Your local changes to the following files would be overwritten by checkout:
file
Please commit your changes or stash them before you switch branches.
Aborting
Unable to checkout '4301fd3e4110d3b6212c19aed3094150392545b9' in submodule path 'submodule'
ok 7 - submodule update should fail due to local changes
expecting success:
(cd super &&
(cd submodule &&
compare_head
) &&
git submodule update --force submodule &&
cd submodule &&
! compare_head
)
Submodule path 'submodule': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 8 - submodule update should throw away changes with --force
expecting success:
(cd super &&
(cd submodule &&
rm -f file
) &&
git submodule update --force submodule &&
(cd submodule &&
test "$(git status -s file)" = ""
)
)
Submodule path 'submodule': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 9 - submodule update --force forcibly checks out submodules
expecting success:
(cd submodule &&
echo line4 >> file &&
git add file &&
test_tick &&
git commit -m "upstream line4"
) &&
(cd super &&
git submodule update --remote --force submodule &&
cd submodule &&
test "$(git log -1 --oneline)" = "$(GIT_DIR=../../submodule/.git git log -1 --oneline)"
)
[master 6355002] upstream line4
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
From /<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/submodule
4301fd3..6355002 master -> origin/master
Submodule path 'submodule': checked out '63550025de24fe5dc1a12e7b0c6d73ec59137ab7'
ok 10 - submodule update --remote should fetch upstream changes
expecting success:
(
cd super &&
git config -f .gitmodules submodule."submodule".branch "." &&
git add .gitmodules &&
git commit -m "submodules: update from the respective superproject branch"
) &&
(
cd submodule &&
echo line4a >> file &&
git add file &&
test_tick &&
git commit -m "upstream line4a" &&
git checkout -b test-branch &&
test_commit on-test-branch
) &&
(
cd super &&
git submodule update --remote --force submodule &&
git -C submodule log -1 --oneline >actual &&
git -C ../submodule log -1 --oneline master >expect &&
test_cmp expect actual &&
git checkout -b test-branch &&
git submodule update --remote --force submodule &&
git -C submodule log -1 --oneline >actual &&
git -C ../submodule log -1 --oneline test-branch >expect &&
test_cmp expect actual &&
git checkout master &&
git branch -d test-branch &&
git reset --hard HEAD^
)
[master 3ce6992] submodules: update from the respective superproject branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
[master b0b6cde] upstream line4a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to a new branch 'test-branch'
[test-branch c326505] on-test-branch
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 on-test-branch.t
From /<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/submodule
6355002..b0b6cde master -> origin/master
* [new branch] test-branch -> origin/test-branch
* [new tag] on-test-branch -> on-test-branch
Submodule path 'submodule': checked out 'b0b6cdeaf939e317dabcdecfa7ee099e17b520e8'
Switched to a new branch 'test-branch'
M submodule
Submodule path 'submodule': checked out 'c3265059a95726b1f19f9ee98d3c9f4835e09e8f'
Switched to branch 'master'
M submodule
Your branch is ahead of 'origin/master' by 6 commits.
(use "git push" to publish your local commits)
Deleted branch test-branch (was 3ce6992).
HEAD is now at e1c6586 none
ok 11 - submodule update --remote should fetch upstream changes with .
expecting success:
(cd submodule &&
git checkout test-branch &&
echo line5 >> file &&
git add file &&
test_tick &&
git commit -m "upstream line5" &&
git checkout master
) &&
(cd super &&
git config submodule.submodule.branch test-branch &&
git submodule update --remote --force submodule &&
cd submodule &&
test "$(git log -1 --oneline)" = "$(GIT_DIR=../../submodule/.git git log -1 --oneline test-branch)"
)
Already on 'test-branch'
[test-branch e396f16] upstream line5
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 4 commits.
(use "git push" to publish your local commits)
From /<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/submodule
c326505..e396f16 test-branch -> origin/test-branch
Submodule path 'submodule': checked out 'e396f163e62f5fbe39de2f6bd37bf79618268b5c'
ok 12 - local config should override .gitmodules branch
expecting success:
(cd super/submodule &&
git checkout master
) &&
(cd super &&
(cd submodule &&
compare_head
) &&
git submodule update --rebase submodule &&
cd submodule &&
compare_head
)
Previous HEAD position was e396f16 upstream line5
Switched to branch 'master'
Your branch is behind 'origin/master' by 4 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
First, rewinding head to replay your work on top of it...
Fast-forwarded master to 4301fd3e4110d3b6212c19aed3094150392545b9.
Submodule path 'submodule': rebased into '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 13 - submodule update --rebase staying on master
expecting success:
(cd super/submodule &&
git reset --hard HEAD~1
) &&
(cd super &&
(cd submodule &&
compare_head
) &&
git submodule update --merge submodule &&
cd submodule &&
compare_head
)
HEAD is now at 0c90624 upstream
Updating 0c90624..4301fd3
Fast-forward
file | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Submodule path 'submodule': merged in '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 14 - submodule update --merge staying on master
expecting success:
(cd super &&
git config submodule.submodule.update rebase
) &&
(cd super/submodule &&
git reset --hard HEAD~1
) &&
(cd super &&
(cd submodule &&
compare_head
) &&
git submodule update submodule &&
cd submodule &&
compare_head
)
HEAD is now at 0c90624 upstream
First, rewinding head to replay your work on top of it...
Fast-forwarded master to 4301fd3e4110d3b6212c19aed3094150392545b9.
Submodule path 'submodule': rebased into '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 15 - submodule update - rebase in .git/config
expecting success:
(cd super &&
git config submodule.submodule.update checkout
) &&
(cd super/submodule &&
git reset --hard HEAD~1
) &&
(cd super &&
(cd submodule &&
compare_head
) &&
git submodule update --rebase submodule &&
cd submodule &&
compare_head
)
HEAD is now at 0c90624 upstream
First, rewinding head to replay your work on top of it...
Fast-forwarded master to 4301fd3e4110d3b6212c19aed3094150392545b9.
Submodule path 'submodule': rebased into '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 16 - submodule update - checkout in .git/config but --rebase given
expecting success:
(cd super &&
git config submodule.submodule.update merge
) &&
(cd super/submodule &&
git reset --hard HEAD~1
) &&
(cd super &&
(cd submodule &&
compare_head
) &&
git submodule update submodule &&
cd submodule &&
compare_head
)
HEAD is now at 0c90624 upstream
Updating 0c90624..4301fd3
Fast-forward
file | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Submodule path 'submodule': merged in '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 17 - submodule update - merge in .git/config
expecting success:
(cd super &&
git config submodule.submodule.update checkout
) &&
(cd super/submodule &&
git reset --hard HEAD~1
) &&
(cd super &&
(cd submodule &&
compare_head
) &&
git submodule update --merge submodule &&
cd submodule &&
compare_head
)
HEAD is now at 0c90624 upstream
Updating 0c90624..4301fd3
Fast-forward
file | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Submodule path 'submodule': merged in '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 18 - submodule update - checkout in .git/config but --merge given
expecting success:
(cd super &&
git config submodule.submodule.update checkout
) &&
(cd super/submodule &&
git reset --hard HEAD^
) &&
(cd super &&
(cd submodule &&
compare_head
) &&
git submodule update submodule &&
cd submodule &&
! compare_head
)
HEAD is now at 0c90624 upstream
Submodule path 'submodule': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 19 - submodule update - checkout in .git/config
expecting success:
(cd super &&
git config submodule.submodule.update "!git checkout"
) &&
(cd super/submodule &&
git reset --hard HEAD^
) &&
(cd super &&
(cd submodule &&
compare_head
) &&
git submodule update submodule &&
cd submodule &&
! compare_head
)
HEAD is now at 0c90624 upstream
Previous HEAD position was 0c90624 upstream
HEAD is now at 4301fd3 Commit 2
Submodule path 'submodule': 'git checkout 4301fd3e4110d3b6212c19aed3094150392545b9'
ok 20 - submodule update - command in .git/config
expecting success:
test_when_finished "git -C super reset --hard HEAD^" &&
git -C super config -f .gitmodules submodule.submodule.update "!false" &&
git -C super commit -a -m "add command to .gitmodules file" &&
git -C super/submodule reset --hard $submodulesha1^ &&
git -C super submodule update submodule
[master 943703a] add command to .gitmodules file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
HEAD is now at 0c90624 upstream
Previous HEAD position was 0c90624 upstream
HEAD is now at 4301fd3 Commit 2
Submodule path 'submodule': 'git checkout 4301fd3e4110d3b6212c19aed3094150392545b9'
HEAD is now at e1c6586 none
ok 21 - submodule update - command in .gitmodules is ignored
expecting success:
(cd super &&
git config submodule.submodule.update "!false"
) &&
(cd super/submodule &&
git reset --hard $submodulesha1^
) &&
(cd super &&
test_must_fail git submodule update submodule 2>../actual
) &&
test_i18ncmp actual expect
HEAD is now at 0c90624 upstream
ok 22 - submodule update - command in .git/config catches failure
expecting success:
(cd super &&
git config submodule.submodule.update "!false"
) &&
(cd super/submodule &&
git reset --hard $submodulesha1^
) &&
(cd super &&
mkdir tmp && cd tmp &&
test_must_fail git submodule update ../submodule 2>../../actual
) &&
test_i18ncmp actual expect
HEAD is now at 0c90624 upstream
ok 23 - submodule update - command in .git/config catches failure -- subdirectory
expecting success:
cat >expect <<-EOF &&
Execution of 'false $submodulesha1' failed in submodule path 'submodule'
EOF
rm -rf super/submodule &&
test_must_fail git -C super submodule update 2>actual &&
test_i18ncmp expect actual &&
git -C super submodule update --checkout
Submodule path 'submodule': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 24 - submodule update - command run for initial population of submodule
expecting success:
(cd recursivesuper &&
git submodule update --remote super &&
git add super &&
git commit -m "update to latest to have more than one commit in submodules"
) &&
git -C recursivesuper/super config submodule.submodule.update "!false" &&
git -C recursivesuper/super/submodule reset --hard $submodulesha1^ &&
(cd recursivesuper &&
mkdir -p tmp && cd tmp &&
test_must_fail git submodule update --recursive ../super 2>../../actual
) &&
test_i18ncmp actual expect
[master a3db8ed] update to latest to have more than one commit in submodules
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 super
HEAD is now at 0c90624 upstream
ok 25 - recursive submodule update - command in .git/config catches failure -- subdirectory
expecting success:
(cd super &&
git ls-files -s submodule >out &&
H=$(cut -d" " -f2 out) &&
mkdir submodule1 &&
git update-index --add --cacheinfo 160000 $H submodule1 &&
git config -f .gitmodules submodule.submodule1.path submodule1 &&
git config -f .gitmodules submodule.submodule1.url ../submodule &&
git config -f .gitmodules submodule.submodule1.update !false &&
git submodule init submodule1 &&
echo "none" >expect &&
git config submodule.submodule1.update >actual &&
test_cmp expect actual
)
Submodule 'submodule1' (/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/submodule) registered for path 'submodule1'
warning: command update mode suggested for submodule 'submodule1'
ok 26 - submodule init does not copy command into .git/config
expecting success:
(cd super &&
git config -f .gitmodules submodule.rebasing.update rebase &&
git submodule init rebasing &&
test "rebase" = "$(git config submodule.rebasing.update)"
)
ok 27 - submodule init picks up rebase
expecting success:
(cd super &&
git config -f .gitmodules submodule.merging.update merge &&
git submodule init merging &&
test "merge" = "$(git config submodule.merging.update)"
)
ok 28 - submodule init picks up merge
expecting success:
test_config -C super submodule.submodule.update checkout &&
(cd super &&
rm -rf submodule &&
git submodule update submodule &&
git status -s submodule >expect &&
rm -rf submodule &&
git submodule update --merge submodule &&
git status -s submodule >actual &&
test_cmp expect actual
)
Submodule path 'submodule': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
Submodule path 'submodule': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 29 - submodule update --merge - ignores --merge for new submodules
expecting success:
test_config -C super submodule.submodule.update checkout &&
(cd super &&
rm -rf submodule &&
git submodule update submodule &&
git status -s submodule >expect &&
rm -rf submodule &&
git submodule update --rebase submodule &&
git status -s submodule >actual &&
test_cmp expect actual
)
Submodule path 'submodule': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
Submodule path 'submodule': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 30 - submodule update --rebase - ignores --rebase for new submodules
expecting success:
(cd super &&
rm -rf submodule &&
git submodule update submodule &&
git status -s submodule >expect &&
rm -rf submodule &&
git config submodule.submodule.update merge &&
git submodule update submodule &&
git status -s submodule >actual &&
git config --unset submodule.submodule.update &&
test_cmp expect actual
)
Submodule path 'submodule': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
Submodule path 'submodule': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 31 - submodule update ignores update=merge config for new submodules
expecting success:
(cd super &&
rm -rf submodule &&
git submodule update submodule &&
git status -s submodule >expect &&
rm -rf submodule &&
git config submodule.submodule.update rebase &&
git submodule update submodule &&
git status -s submodule >actual &&
git config --unset submodule.submodule.update &&
test_cmp expect actual
)
Submodule path 'submodule': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
Submodule path 'submodule': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 32 - submodule update ignores update=rebase config for new submodules
expecting success:
(cd super &&
git config -f .gitmodules submodule.none.update none &&
git submodule init none &&
test "none" = "$(git config submodule.none.update)"
)
ok 33 - submodule init picks up update=none
expecting success:
(cd super &&
git config submodule.submodule.update none &&
(cd submodule &&
git checkout master &&
compare_head
) &&
git diff --name-only >out &&
grep ^submodule$ out &&
git submodule update &&
git diff --name-only >out &&
grep ^submodule$ out &&
(cd submodule &&
compare_head
) &&
git config --unset submodule.submodule.update &&
git submodule update submodule
)
Previous HEAD position was 4301fd3 Commit 2
Switched to branch 'master'
Your branch is behind 'origin/master' by 4 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
submodule
Skipping submodule 'none'
Skipping submodule 'submodule'
Skipping submodule 'submodule1'
submodule
Submodule path 'submodule': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 34 - submodule update - update=none in .git/config
expecting success:
(cd super &&
git config submodule.submodule.update none &&
(cd submodule &&
git checkout master &&
compare_head
) &&
git diff --name-only >out &&
grep ^submodule$ out &&
git submodule update --checkout &&
git diff --name-only >out &&
! grep ^submodule$ out &&
(cd submodule &&
! compare_head
) &&
git config --unset submodule.submodule.update
)
Previous HEAD position was 4301fd3 Commit 2
Switched to branch 'master'
Your branch is behind 'origin/master' by 4 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
submodule
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super/submodule1'...
done.
Submodule path 'submodule': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
Submodule path 'submodule1': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 35 - submodule update - update=none in .git/config but --checkout given
expecting success:
(cd super &&
git add .gitmodules &&
git commit -m ".gitmodules"
) &&
git clone super cloned &&
(cd cloned &&
git submodule update --init &&
test_path_exists submodule/.git &&
test_path_is_missing none/.git
)
[master 2a18bde] .gitmodules
Author: A U Thor <author@example.com>
2 files changed, 8 insertions(+)
create mode 160000 submodule1
Cloning into 'cloned'...
done.
Submodule 'merging' (/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/merging) registered for path 'merging'
Submodule 'none' (/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/none) registered for path 'none'
Submodule 'rebasing' (/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/rebasing) registered for path 'rebasing'
Submodule 'submodule' (/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/submodule) registered for path 'submodule'
Submodule 'submodule1' (/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/submodule) registered for path 'submodule1'
warning: command update mode suggested for submodule 'submodule1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/cloned/merging'...
done.
Skipping submodule 'none'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/cloned/rebasing'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/cloned/submodule'...
done.
Skipping submodule 'submodule1'
Submodule path 'merging': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
Submodule path 'rebasing': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
Submodule path 'submodule': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 36 - submodule update --init skips submodule with update=none
expecting success:
(cd super &&
git reset --hard HEAD &&
git submodule add ../submodule submodule2 &&
git submodule init &&
git commit -am "new_submodule" &&
(cd submodule2 &&
git rev-parse --verify HEAD >../expect
) &&
(cd submodule &&
test_commit "update_submodule" file
) &&
(cd submodule2 &&
test_commit "update_submodule2" file
) &&
git add submodule &&
git add submodule2 &&
git commit -m "two_new_submodule_commits" &&
(cd submodule &&
echo "" > file
) &&
git checkout HEAD^ &&
test_must_fail git submodule update &&
(cd submodule2 &&
git rev-parse --verify HEAD >../actual
) &&
test_cmp expect actual
)
HEAD is now at 2a18bde .gitmodules
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super/submodule2'...
done.
[master 489ebc3] new_submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 160000 submodule2
[detached HEAD 83199b0] update_submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 8dc4de1] update_submodule2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 4 deletions(-)
[master 28d6b6e] two_new_submodule_commits
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 489ebc3 new_submodule
M submodule
M submodule2
Skipping submodule 'none'
Skipping submodule 'submodule1'
error: Your local changes to the following files would be overwritten by checkout:
file
Please commit your changes or stash them before you switch branches.
Aborting
Submodule path 'submodule2': checked out 'b0b6cdeaf939e317dabcdecfa7ee099e17b520e8'
Unable to checkout '4301fd3e4110d3b6212c19aed3094150392545b9' in submodule path 'submodule'
ok 37 - submodule update continues after checkout error
expecting success:
(cd super &&
git reset --hard HEAD &&
git checkout master &&
git submodule update &&
(cd submodule &&
git submodule add ../submodule subsubmodule &&
git submodule init &&
git commit -m "new_subsubmodule"
) &&
git add submodule &&
git commit -m "update_submodule" &&
(cd submodule &&
(cd subsubmodule &&
test_commit "update_subsubmodule" file
) &&
git add subsubmodule &&
test_commit "update_submodule_again" file &&
(cd subsubmodule &&
test_commit "update_subsubmodule_again" file
) &&
test_commit "update_submodule_again_again" file
) &&
(cd submodule2 &&
git rev-parse --verify HEAD >../expect &&
test_commit "update_submodule2_again" file
) &&
git add submodule &&
git add submodule2 &&
git commit -m "new_commits" &&
git checkout HEAD^ &&
(cd submodule &&
git checkout HEAD^ &&
(cd subsubmodule &&
echo "" > file
)
) &&
test_must_fail git submodule update --recursive &&
(cd submodule2 &&
git rev-parse --verify HEAD >../actual
) &&
test_cmp expect actual
)
HEAD is now at 489ebc3 new_submodule
Previous HEAD position was 489ebc3 new_submodule
Switched to branch 'master'
M submodule
M submodule2
Your branch is ahead of 'origin/master' by 8 commits.
(use "git push" to publish your local commits)
Skipping submodule 'none'
Skipping submodule 'submodule1'
Submodule path 'submodule2': checked out '8dc4de1dc365211781d03828f944165cc86d7a98'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super/submodule/subsubmodule'...
done.
[detached HEAD 043bc58] new_subsubmodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 subsubmodule
[master 7ea596e] update_submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master c3ee4ca] update_subsubmodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 4 deletions(-)
[detached HEAD f306cbe] update_submodule_again
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
[master 8e13b9e] update_subsubmodule_again
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD c412560] update_submodule_again_again
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD 49d2396] update_submodule2_again
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master e266925] new_commits
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 7ea596e update_submodule
M submodule
M submodule2
Previous HEAD position was c412560 update_submodule_again_again
HEAD is now at f306cbe update_submodule_again
M subsubmodule
Skipping submodule 'none'
Skipping submodule 'submodule1'
Submodule path 'submodule': checked out '043bc58326b64f6ed86c060b72707767701d8437'
error: Your local changes to the following files would be overwritten by checkout:
file
Please commit your changes or stash them before you switch branches.
Aborting
Unable to checkout 'b0b6cdeaf939e317dabcdecfa7ee099e17b520e8' in submodule path 'submodule/subsubmodule'
Submodule path 'submodule2': checked out '8dc4de1dc365211781d03828f944165cc86d7a98'
Failed to recurse into submodule path 'submodule'
ok 38 - submodule update continues after recursive checkout error
expecting success:
(cd super &&
git checkout master &&
git reset --hard HEAD &&
(cd submodule &&
(cd subsubmodule &&
git reset --hard HEAD
)
) &&
git submodule update --recursive &&
(cd submodule &&
test_commit "update_submodule_2" file
) &&
(cd submodule2 &&
test_commit "update_submodule2_2" file
) &&
git add submodule &&
git add submodule2 &&
git commit -m "two_new_submodule_commits" &&
(cd submodule &&
git checkout master &&
test_commit "conflict" file &&
echo "conflict" > file
) &&
git checkout HEAD^ &&
(cd submodule2 &&
git rev-parse --verify HEAD >../expect
) &&
git config submodule.submodule.update merge &&
test_must_fail git submodule update &&
(cd submodule2 &&
git rev-parse --verify HEAD >../actual
) &&
test_cmp expect actual
)
Previous HEAD position was 7ea596e update_submodule
Switched to branch 'master'
M submodule
M submodule2
Your branch is ahead of 'origin/master' by 10 commits.
(use "git push" to publish your local commits)
HEAD is now at e266925 new_commits
HEAD is now at 8e13b9e update_subsubmodule_again
Skipping submodule 'none'
Skipping submodule 'submodule1'
Submodule path 'submodule': checked out 'c412560ec4b0712c06d4a914c8e3483f5650d569'
Submodule path 'submodule/subsubmodule': checked out 'c3ee4ca43a6bcb7b5233ba2ca7e2c8adf5ffdfbd'
Submodule path 'submodule2': checked out '49d2396b9c5ba1bfa95b0db5a1e98a4b8dd73b7c'
[detached HEAD 72dc65f] update_submodule_2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD 2e0306e] update_submodule2_2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 9536e03] two_new_submodule_commits
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
warning: unable to rmdir 'subsubmodule': Directory not empty
Previous HEAD position was 72dc65f update_submodule_2
Switched to branch 'master'
Your branch is behind 'origin/master' by 4 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
[master 08cc343] conflict
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at e266925 new_commits
M submodule
M submodule2
Skipping submodule 'none'
Skipping submodule 'submodule1'
Merging:
08cc343 conflict
virtual c412560ec4b0712c06d4a914c8e3483f5650d569
found 1 common ancestor:
0c90624 upstream
Auto-merging file
CONFLICT (content): Merge conflict in file
Automatic merge failed; fix conflicts and then commit the result.
Unable to merge 'c412560ec4b0712c06d4a914c8e3483f5650d569' in submodule path 'submodule'
ok 39 - submodule update exit immediately in case of merge conflict
expecting success:
(cd super &&
git checkout master &&
git reset --hard HEAD &&
(cd submodule &&
git reset --hard HEAD &&
git submodule update --recursive
) &&
(cd submodule &&
test_commit "update_submodule_3" file
) &&
(cd submodule2 &&
test_commit "update_submodule2_3" file
) &&
git add submodule &&
git add submodule2 &&
git commit -m "two_new_submodule_commits" &&
(cd submodule &&
git checkout master &&
test_commit "conflict2" file &&
echo "conflict" > file
) &&
git checkout HEAD^ &&
(cd submodule2 &&
git rev-parse --verify HEAD >../expect
) &&
git config submodule.submodule.update rebase &&
test_must_fail git submodule update &&
(cd submodule2 &&
git rev-parse --verify HEAD >../actual
) &&
test_cmp expect actual
)
Previous HEAD position was e266925 new_commits
Switched to branch 'master'
M submodule
Your branch is ahead of 'origin/master' by 11 commits.
(use "git push" to publish your local commits)
HEAD is now at 9536e03 two_new_submodule_commits
warning: unable to rmdir 'subsubmodule': Directory not empty
HEAD is now at 08cc343 conflict
[master 85c1732] update_submodule_3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[detached HEAD 88bf62e] update_submodule2_3
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
[master 328eeb2] two_new_submodule_commits
Author: A U Thor <author@example.com>
2 files changed, 2 insertions(+), 2 deletions(-)
Already on 'master'
Your branch and 'origin/master' have diverged,
and have 2 and 4 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
[master 10845e8] conflict2
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 9536e03 two_new_submodule_commits
M submodule
M submodule2
Skipping submodule 'none'
Skipping submodule 'submodule1'
error: cannot rebase: You have unstaged changes.
error: Please commit or stash them.
Unable to rebase '72dc65ffc818dbfc1fc7a18b36ab97538db4c5f8' in submodule path 'submodule'
ok 40 - submodule update exit immediately after recursive rebase error
expecting success:
(cd super &&
git submodule add ../submodule s1 &&
test_must_fail git submodule add ../merging s1
)
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super/s1'...
done.
's1' already exists in the index
ok 41 - add different submodules to the same path
expecting success:
(cd super &&
mkdir deeper &&
git submodule add ../submodule deeper/submodule &&
(cd deeper/submodule &&
git log > ../../expected
) &&
(cd .git/modules/deeper/submodule &&
git log > ../../../../actual
) &&
test_cmp expected actual
)
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super/deeper/submodule'...
done.
ok 42 - submodule add places git-dir in superprojects git-dir
expecting success:
(cd super &&
git commit -m "added submodule"
) &&
git clone super super2 &&
(cd super2 &&
git submodule init deeper/submodule &&
git submodule update &&
(cd deeper/submodule &&
git log > ../../expected
) &&
(cd .git/modules/deeper/submodule &&
git log > ../../../../actual
) &&
test_cmp expected actual
)
[detached HEAD 9917d0e] added submodule
Author: A U Thor <author@example.com>
3 files changed, 8 insertions(+)
create mode 160000 deeper/submodule
create mode 160000 s1
Cloning into 'super2'...
done.
Note: switching to '9917d0ef38ded0c0eb5093e37812ba9ed9d0ae9d'.
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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
Submodule 'deeper/submodule' (/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/submodule) registered for path 'deeper/submodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super2/deeper/submodule'...
done.
Skipping submodule 'none'
Submodule path 'deeper/submodule': checked out 'b0b6cdeaf939e317dabcdecfa7ee099e17b520e8'
ok 43 - submodule update places git-dir in superprojects git-dir
expecting success:
(cd super2 &&
(cd deeper/submodule &&
git submodule add ../submodule subsubmodule &&
(cd subsubmodule &&
git log > ../../../expected
) &&
git commit -m "added subsubmodule" &&
git push origin :
) &&
(cd .git/modules/deeper/submodule/modules/subsubmodule &&
git log > ../../../../../actual
) &&
git add deeper/submodule &&
git commit -m "update submodule" &&
git push origin : &&
test_cmp expected actual
)
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super2/deeper/submodule/subsubmodule'...
done.
[detached HEAD c234cdc] added subsubmodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 subsubmodule
Everything up-to-date
[detached HEAD b99939b] update submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Everything up-to-date
ok 44 - submodule add places git-dir in superprojects git-dir recursive
expecting success:
mkdir super_update_r &&
(cd super_update_r &&
git init --bare
) &&
mkdir subsuper_update_r &&
(cd subsuper_update_r &&
git init --bare
) &&
mkdir subsubsuper_update_r &&
(cd subsubsuper_update_r &&
git init --bare
) &&
git clone subsubsuper_update_r subsubsuper_update_r2 &&
(cd subsubsuper_update_r2 &&
test_commit "update_subsubsuper" file &&
git push origin master
) &&
git clone subsuper_update_r subsuper_update_r2 &&
(cd subsuper_update_r2 &&
test_commit "update_subsuper" file &&
git submodule add ../subsubsuper_update_r subsubmodule &&
git commit -am "subsubmodule" &&
git push origin master
) &&
git clone super_update_r super_update_r2 &&
(cd super_update_r2 &&
test_commit "update_super" file &&
git submodule add ../subsuper_update_r submodule &&
git commit -am "submodule" &&
git push origin master
) &&
rm -rf super_update_r2 &&
git clone super_update_r super_update_r2 &&
(cd super_update_r2 &&
git submodule update --init --recursive >actual &&
test_i18ngrep "Submodule path .submodule/subsubmodule.: checked out" actual &&
(cd submodule/subsubmodule &&
git log > ../../expected
) &&
(cd .git/modules/submodule/modules/subsubmodule &&
git log > ../../../../../actual
) &&
test_cmp expected actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super_update_r/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/subsuper_update_r/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/subsubsuper_update_r/
Cloning into 'subsubsuper_update_r2'...
warning: You appear to have cloned an empty repository.
done.
[master (root-commit) e13bbd9] update_subsubsuper
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
To /<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/subsubsuper_update_r
* [new branch] master -> master
Cloning into 'subsuper_update_r2'...
warning: You appear to have cloned an empty repository.
done.
[master (root-commit) 7cab57e] update_subsuper
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/subsuper_update_r2/subsubmodule'...
done.
[master 796fb1a] subsubmodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 subsubmodule
To /<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/subsuper_update_r
* [new branch] master -> master
Cloning into 'super_update_r2'...
warning: You appear to have cloned an empty repository.
done.
[master (root-commit) 489f12d] update_super
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super_update_r2/submodule'...
done.
[master 8dc9f2e] submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 submodule
To /<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super_update_r
* [new branch] master -> master
Cloning into 'super_update_r2'...
done.
Submodule 'submodule' (/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/subsuper_update_r) registered for path 'submodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super_update_r2/submodule'...
done.
Submodule 'subsubmodule' (/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/subsubsuper_update_r) registered for path 'submodule/subsubmodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super_update_r2/submodule/subsubmodule'...
done.
Submodule path 'submodule/subsubmodule': checked out 'e13bbd9c3df4762b3c846e1fb977b29be7746269'
ok 45 - submodule update places git-dir in superprojects git-dir recursive
expecting success:
(cd super &&
git reset --hard master &&
rm -rf deeper/ &&
git submodule add --force ../submodule deeper/submodule
)
warning: unable to rmdir 'deeper/submodule': Directory not empty
warning: unable to rmdir 's1': Directory not empty
HEAD is now at 328eeb2 two_new_submodule_commits
Reactivating local git directory for submodule 'deeper/submodule'.
ok 46 - submodule add properly re-creates deeper level submodules
expecting success:
(cd super &&
H=$(git rev-parse --short HEAD) &&
git commit -am "pre move" &&
H2=$(git rev-parse --short HEAD) &&
git status >out &&
sed "s/$H/XXX/" out >expect &&
H=$(cd submodule2 && git rev-parse HEAD) &&
git rm --cached submodule2 &&
rm -rf submodule2 &&
mkdir -p "moved/sub module" &&
git update-index --add --cacheinfo 160000 $H "moved/sub module" &&
git config -f .gitmodules submodule.submodule2.path "moved/sub module" &&
git commit -am "post move" &&
git submodule update &&
git status > out &&
sed "s/$H2/XXX/" out >actual &&
test_cmp expect actual
)
[detached HEAD 5810b28] pre move
Author: A U Thor <author@example.com>
3 files changed, 5 insertions(+), 1 deletion(-)
create mode 160000 deeper/submodule
rm 'submodule2'
[detached HEAD fdd937e] post move
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
rename submodule2 => moved/sub module (100%)
Skipping submodule 'none'
Skipping submodule 'submodule1'
Submodule path 'moved/sub module': checked out '88bf62ef75633c13999647494b82e33847ce431f'
ok 47 - submodule update properly revives a moved submodule
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:
mkdir -p linked/dir &&
ln -s linked/dir linkto &&
(cd linkto &&
git clone "$TRASH_DIRECTORY"/super_update_r2 super &&
(cd super &&
git submodule update --init --recursive
)
)
Cloning into 'super'...
done.
Submodule 'submodule' (/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/subsuper_update_r) registered for path 'submodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/linked/dir/super/submodule'...
done.
Submodule path 'submodule': checked out '796fb1a6484f5f6c560d10b7517c12bee8a9388a'
Submodule 'subsubmodule' (/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/subsubsuper_update_r) registered for path 'submodule/subsubmodule'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/linked/dir/super/submodule/subsubmodule'...
done.
Submodule path 'submodule/subsubmodule': checked out 'e13bbd9c3df4762b3c846e1fb977b29be7746269'
ok 48 - submodule update can handle symbolic links in pwd
expecting success:
test_when_finished "rm -rf super3" &&
first=$(git -C cloned rev-parse HEAD:submodule) &&
second=$(git -C submodule rev-parse HEAD) &&
commit_count=$(git -C submodule rev-list --count $first^..$second) &&
git clone cloned super3 &&
pwd=$(pwd) &&
(
cd super3 &&
sed -e "s#url = ../#url = file://$pwd/#" <.gitmodules >.gitmodules.tmp &&
mv -f .gitmodules.tmp .gitmodules &&
git submodule update --init --depth=$commit_count &&
git -C submodule log --oneline >out &&
test_line_count = 1 out
)
Cloning into 'super3'...
done.
Submodule 'merging' (file:///<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/merging) registered for path 'merging'
Submodule 'none' (file:///<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/none) registered for path 'none'
Submodule 'rebasing' (file:///<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/rebasing) registered for path 'rebasing'
Submodule 'submodule' (file:///<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/submodule) registered for path 'submodule'
Submodule 'submodule1' (file:///<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/submodule) registered for path 'submodule1'
warning: command update mode suggested for submodule 'submodule1'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super3/merging'...
Skipping submodule 'none'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super3/rebasing'...
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/super3/submodule'...
Skipping submodule 'submodule1'
Submodule path 'merging': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
Submodule path 'rebasing': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
Submodule path 'submodule': checked out '4301fd3e4110d3b6212c19aed3094150392545b9'
ok 49 - submodule update clone shallow submodule
expecting success:
test_when_finished "rm -rf super3" &&
git clone cloned super3 &&
pwd=$(pwd) &&
(
cd super3 &&
sed -e "s#url = ../#url = file://$pwd/#" <.gitmodules >.gitmodules.tmp &&
mv -f .gitmodules.tmp .gitmodules &&
# Some protocol versions (e.g. 2) support fetching
# unadvertised objects, so restrict this test to v0.
test_must_fail env GIT_TEST_PROTOCOL_VERSION= \
git submodule update --init --depth=1 2>actual &&
test_i18ngrep "Direct fetching of that commit failed." actual &&
git -C ../submodule config uploadpack.allowReachableSHA1InWant true &&
git submodule update --init --depth=1 >actual &&
git -C submodule log --oneline >out &&
test_line_count = 1 out
)
Cloning into 'super3'...
done.
Submodule path 'merging': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
Submodule path 'rebasing': checked out '0c90624ab7f1aaa301d3bb79f60dcfed1ec4897f'
Fetched in submodule path 'submodule', but it did not contain 4301fd3e4110d3b6212c19aed3094150392545b9. Direct fetching of that commit failed.
Skipping submodule 'none'
Skipping submodule 'submodule1'
From file:///<<PKGBUILDDIR>>/t/trash directory.t7406-submodule-update/submodule
* branch 4301fd3e4110d3b6212c19aed3094150392545b9 -> FETCH_HEAD
ok 50 - submodule update clone shallow submodule outside of depth
expecting success:
(cd super2 &&
(cd deeper/submodule/subsubmodule &&
git checkout HEAD^
) &&
git submodule update --recursive deeper/submodule >actual &&
test_i18ngrep "Submodule path .deeper/submodule/subsubmodule.: checked out" actual
)
Note: switching to '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 switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 6355002 upstream line4
Submodule path 'deeper/submodule/subsubmodule': checked out 'b0b6cdeaf939e317dabcdecfa7ee099e17b520e8'
ok 51 - submodule update --recursive drops module name before recursing
expecting success:
(cd super2 &&
GIT_TRACE=$(pwd)/trace.out git submodule update --jobs 7 &&
grep "7 tasks" trace.out &&
git config submodule.fetchJobs 8 &&
GIT_TRACE=$(pwd)/trace.out git submodule update &&
grep "8 tasks" trace.out &&
GIT_TRACE=$(pwd)/trace.out git submodule update --jobs 9 &&
grep "9 tasks" trace.out
)
Skipping submodule 'none'
run_processes_parallel: preparing to run up to 7 tasks
Skipping submodule 'none'
run_processes_parallel: preparing to run up to 8 tasks
Skipping submodule 'none'
run_processes_parallel: preparing to run up to 9 tasks
ok 52 - submodule update can be run in parallel
expecting success:
test_when_finished "rm -rf super4" &&
GIT_TRACE=$(pwd)/trace.out git clone --recurse-submodules --jobs 7 . super4 &&
grep "7 tasks" trace.out &&
rm -rf super4 &&
git config --global submodule.fetchJobs 8 &&
GIT_TRACE=$(pwd)/trace.out git clone --recurse-submodules . super4 &&
grep "8 tasks" trace.out &&
rm -rf super4 &&
GIT_TRACE=$(pwd)/trace.out git clone --recurse-submodules --jobs 9 . super4 &&
grep "9 tasks" trace.out &&
rm -rf super4
Cloning into 'super4'...
done.
run_processes_parallel: preparing to run up to 7 tasks
Cloning into 'super4'...
done.
run_processes_parallel: preparing to run up to 8 tasks
Cloning into 'super4'...
done.
run_processes_parallel: preparing to run up to 9 tasks
ok 53 - git clone passes the parallel jobs config on to submodules
# passed all 53 test(s)
1..53
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7411-submodule-config.sh ***
expecting success:
mkdir submodule &&
(cd submodule &&
git init &&
echo a >a &&
git add . &&
git commit -ma
) &&
mkdir super &&
(cd super &&
git init &&
git submodule add ../submodule &&
git submodule add ../submodule a &&
git commit -m "add as submodule and as a" &&
git mv a b &&
git commit -m "move a to b"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7411-submodule-config/submodule/.git/
[master (root-commit) 86bf657] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7411-submodule-config/super/.git/
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7411-submodule-config/super/submodule'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7411-submodule-config/super/a'...
done.
[master (root-commit) 76597ac] add as submodule and as a
Author: A U Thor <author@example.com>
3 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 a
create mode 160000 submodule
[master f6b5ba4] move a to b
Author: A U Thor <author@example.com>
2 files changed, 1 insertion(+), 1 deletion(-)
rename a => b (100%)
ok 1 - submodule config cache setup
expecting success:
test_when_finished "rm -rf repo" &&
test_create_repo repo &&
cat >repo/.gitmodules <<-\EOF &&
[submodule "s"]
path
ignore
EOF
(
cd repo &&
test_must_fail test-tool submodule-config "" s 2>actual &&
test_i18ngrep "bad config" actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7411-submodule-config/repo/.git/
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: bad config line 2 in file /<<PKGBUILDDIR>>/t/trash directory.t7411-submodule-config/repo/.gitmodules
ok 2 - configuration parsing with error
expecting success:
(cd super &&
test-tool submodule-config \
HEAD^ a \
HEAD b \
HEAD^ submodule \
HEAD submodule \
>actual &&
test_cmp expect actual
)
ok 3 - test parsing and lookup of submodule config by path
expecting success:
(cd super &&
test-tool submodule-config --name \
HEAD^ a \
HEAD a \
HEAD^ submodule \
HEAD submodule \
>actual &&
test_cmp expect actual
)
ok 4 - test parsing and lookup of submodule config by name
expecting success:
ORIG=$(git -C super rev-parse HEAD) &&
test_when_finished "git -C super reset --hard $ORIG" &&
(cd super &&
cp .gitmodules .gitmodules.bak &&
echo " value = \"" >>.gitmodules &&
git add .gitmodules &&
mv .gitmodules.bak .gitmodules &&
git commit -m "add error" &&
sha1=$(git rev-parse HEAD) &&
test-tool submodule-config \
HEAD b \
HEAD submodule \
>actual \
2>actual_stderr &&
test_cmp expect_error actual &&
test_i18ngrep "submodule-blob $sha1:.gitmodules" actual_stderr >/dev/null
)
[master c2bcc11] add error
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
HEAD is now at f6b5ba4 move a to b
ok 5 - error in history of one submodule config lets continue, stderr message contains blob ref
expecting success:
(
cd super &&
git tag new_tag &&
tree=$(git rev-parse HEAD^{tree}) &&
commit=$(git rev-parse HEAD^{commit}) &&
test-tool submodule-config $commit b >expect &&
test-tool submodule-config $tree b >actual.1 &&
test-tool submodule-config new_tag b >actual.2 &&
test_cmp expect actual.1 &&
test_cmp expect actual.2
)
ok 6 - using different treeishs works
expecting success:
ORIG=$(git -C super rev-parse HEAD) &&
test_when_finished "git -C super reset --hard $ORIG" &&
(cd super &&
git config -f .gitmodules \
submodule.submodule.fetchrecursesubmodules blabla &&
git add .gitmodules &&
git config --unset -f .gitmodules \
submodule.submodule.fetchrecursesubmodules &&
git commit -m "add error in fetchrecursesubmodules" &&
test-tool submodule-config \
HEAD b \
HEAD submodule \
>actual &&
test_cmp expect_error actual
)
[master 782ea18] add error in fetchrecursesubmodules
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
HEAD is now at f6b5ba4 move a to b
ok 7 - error in history in fetchrecursesubmodule lets continue
expecting success:
(cd super &&
echo "../submodule" >expect &&
git submodule--helper config submodule.submodule.url >actual &&
test_cmp expect actual
)
ok 8 - reading submodules config from the working tree with "submodule--helper config"
expecting success:
(cd super &&
git submodule--helper config --unset submodule.submodule.url &&
git submodule--helper config submodule.submodule.url >actual &&
test_must_be_empty actual
)
ok 9 - unsetting submodules config from the working tree with "submodule--helper config --unset"
expecting success:
(cd super &&
echo "new_url" >expect &&
git submodule--helper config submodule.submodule.url "new_url" &&
git submodule--helper config submodule.submodule.url >actual &&
test_cmp expect actual
)
ok 10 - writing submodules config with "submodule--helper config"
expecting success:
test_when_finished "git -C super checkout .gitmodules" &&
(cd super &&
echo "newer_url" >expect &&
git submodule--helper config submodule.submodule.url "newer_url" &&
git submodule--helper config submodule.submodule.url >actual &&
test_cmp expect actual
)
Updated 1 path from the index
ok 11 - overwriting unstaged submodules config with "submodule--helper config"
expecting success:
git -C super submodule--helper config --check-writeable
ok 12 - writeable .gitmodules when it is in the working tree
expecting success:
ORIG=$(git -C super rev-parse HEAD) &&
test_when_finished "git -C super reset --hard $ORIG" &&
(cd super &&
git rm .gitmodules &&
git commit -m "remove .gitmodules from the current branch" &&
git submodule--helper config --check-writeable
)
rm '.gitmodules'
[master 0e0fb6d] remove .gitmodules from the current branch
Author: A U Thor <author@example.com>
1 file changed, 6 deletions(-)
delete mode 100644 .gitmodules
HEAD is now at f6b5ba4 move a to b
ok 13 - writeable .gitmodules when it is nowhere in the repository
expecting success:
test_when_finished "git -C super checkout .gitmodules" &&
(cd super &&
rm -f .gitmodules &&
test_must_fail git submodule--helper config --check-writeable
)
Updated 1 path from the index
ok 14 - non-writeable .gitmodules when it is in the index but not in the working tree
expecting success:
ORIG=$(git -C super rev-parse HEAD) &&
test_when_finished "git -C super reset --hard $ORIG" &&
(cd super &&
git rm .gitmodules &&
test_must_fail git submodule--helper config --check-writeable
)
rm '.gitmodules'
HEAD is now at f6b5ba4 move a to b
ok 15 - non-writeable .gitmodules when it is in the current branch but not in the index
expecting success:
ORIG=$(git -C super rev-parse HEAD) &&
test_when_finished "git -C super reset --hard $ORIG" &&
(cd super &&
git submodule--helper config submodule.submodule.url "staged_url" &&
git add .gitmodules &&
rm -f .gitmodules &&
echo "staged_url" >expect &&
git submodule--helper config submodule.submodule.url >actual &&
test_cmp expect actual
)
HEAD is now at f6b5ba4 move a to b
ok 16 - reading submodules config from the index when .gitmodules is not in the working tree
expecting success:
ORIG=$(git -C super rev-parse HEAD) &&
test_when_finished "git -C super reset --hard $ORIG" &&
(cd super &&
git rm .gitmodules &&
echo "../submodule" >expect &&
git submodule--helper config submodule.submodule.url >actual &&
test_cmp expect actual
)
rm '.gitmodules'
HEAD is now at f6b5ba4 move a to b
ok 17 - reading submodules config from the current branch when .gitmodules is not in the index
expecting success:
(cd super &&
git init submodule/nested_submodule &&
echo "a" >submodule/nested_submodule/a &&
git -C submodule/nested_submodule add a &&
git -C submodule/nested_submodule commit -m "add a" &&
git -C submodule submodule add ./nested_submodule &&
git -C submodule add nested_submodule &&
git -C submodule commit -m "added nested_submodule" &&
git add submodule &&
git commit -m "updated submodule" &&
echo "./nested_submodule" >expect &&
test-tool submodule-nested-repo-config \
submodule submodule.nested_submodule.url >actual &&
test_cmp expect actual
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7411-submodule-config/super/submodule/nested_submodule/.git/
[master (root-commit) 91479cd] add a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
Adding existing repo at 'nested_submodule' to the index
[master e9c7588] added nested_submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 nested_submodule
[master 6e87fe9] updated submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 18 - reading nested submodules config
expecting success:
test_when_finished "git -C super/submodule checkout .gitmodules" &&
(cd super &&
echo "./nested_submodule" >expect &&
rm submodule/.gitmodules &&
test-tool submodule-nested-repo-config \
submodule submodule.nested_submodule.url >actual 2>warning &&
test_must_be_empty warning &&
test_cmp expect actual
)
Updated 1 path from the index
ok 19 - reading nested submodules config when .gitmodules is not in the working tree
# passed all 19 test(s)
1..19
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7414-submodule-mistakes.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7414-submodule-mistakes/.git/
expecting success:
git init embed &&
test_commit -C embed one
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7414-submodule-mistakes/embed/.git/
[master (root-commit) d79ce16] one
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 one.t
ok 1 - create embedded repository
expecting success:
test_when_finished "git rm --cached -f embed" &&
git add embed 2>stderr &&
test_i18ngrep warning stderr
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
warning: adding embedded git repository: embed
rm 'embed'
ok 2 - git-add on embedded repository warns
expecting success:
test_when_finished "git rm --cached -f embed" &&
git add --no-warn-embedded-repo embed 2>stderr &&
test_i18ngrep ! warning stderr
rm 'embed'
ok 3 - --no-warn-embedded-repo suppresses warning
expecting success:
test_when_finished "git rm --cached -f embed" &&
git add embed &&
git -C embed commit --allow-empty -m two &&
git add embed 2>stderr &&
test_i18ngrep ! warning stderr
warning: adding embedded git repository: embed
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> embed
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached embed
hint:
hint: See "git help submodule" for more information.
[master b0129aa] two
Author: A U Thor <author@example.com>
rm 'embed'
ok 4 - no warning when updating entry
expecting success:
test_when_finished "git rm -rf submodule .gitmodules" &&
git submodule add ./embed submodule 2>stderr &&
test_i18ngrep ! warning stderr
rm '.gitmodules'
rm 'submodule'
ok 5 - submodule add does not warn
# passed all 5 test(s)
1..5
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7413-submodule-is-active.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7413-submodule-is-active/.git/
expecting success:
git init sub &&
test_commit -C sub initial &&
git init super &&
test_commit -C super initial &&
git -C super submodule add ../sub sub1 &&
git -C super submodule add ../sub sub2 &&
# Remove submodule.<name>.active entries in order to test in an
# environment where only URLs are present in the conifg
git -C super config --unset submodule.sub1.active &&
git -C super config --unset submodule.sub2.active &&
git -C super commit -a -m "add 2 submodules at sub{1,2}"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7413-submodule-is-active/sub/.git/
[master (root-commit) 24b24cf] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7413-submodule-is-active/super/.git/
[master (root-commit) 5e30013] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7413-submodule-is-active/super/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7413-submodule-is-active/super/sub2'...
done.
[master b6e0cac] add 2 submodules at sub{1,2}
Author: A U Thor <author@example.com>
3 files changed, 8 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub1
create mode 160000 sub2
ok 1 - setup
expecting success:
git -C super submodule--helper is-active sub1 &&
git -C super submodule--helper is-active sub2 &&
git -C super config --unset submodule.sub1.URL &&
test_must_fail git -C super submodule--helper is-active sub1 &&
git -C super config submodule.sub1.URL ../sub &&
git -C super submodule--helper is-active sub1
ok 2 - is-active works with urls
expecting success:
test_when_finished "git -C super config --unset submodule.sub1.active" &&
test_when_finished "git -C super config submodule.sub1.URL ../sub" &&
git -C super config --bool submodule.sub1.active "false" &&
test_must_fail git -C super submodule--helper is-active sub1 &&
git -C super config --bool submodule.sub1.active "true" &&
git -C super config --unset submodule.sub1.URL &&
git -C super submodule--helper is-active sub1
ok 3 - is-active works with submodule.<name>.active config
expecting success:
test_when_finished "git -C super config submodule.sub1.URL ../sub" &&
test_when_finished "git -C super config --unset-all submodule.active" &&
git -C super config --add submodule.active "." &&
git -C super config --unset submodule.sub1.URL &&
git -C super submodule--helper is-active sub1 &&
git -C super submodule--helper is-active sub2
ok 4 - is-active works with basic submodule.active config
expecting success:
test_when_finished "git -C super config --unset-all submodule.active" &&
test_must_fail git -C super submodule--helper is-active not-a-submodule &&
git -C super config --add submodule.active "." &&
test_must_fail git -C super submodule--helper is-active not-a-submodule
ok 5 - is-active correctly works with paths that are not submodules
expecting success:
test_when_finished "git -C super config --unset-all submodule.active" &&
git -C super config --add submodule.active "." &&
git -C super config --add submodule.active ":(exclude)sub1" &&
test_must_fail git -C super submodule--helper is-active sub1 &&
git -C super submodule--helper is-active sub2
ok 6 - is-active works with exclusions in submodule.active config
expecting success:
test_when_finished "git -C super config --unset-all submodule.active" &&
test_when_finished "git -C super config --unset submodule.sub1.active" &&
test_when_finished "git -C super config --unset submodule.sub2.active" &&
git -C super config --add submodule.active "sub1" &&
git -C super config --bool submodule.sub1.active "false" &&
git -C super config --bool submodule.sub2.active "true" &&
test_must_fail git -C super submodule--helper is-active sub1 &&
git -C super submodule--helper is-active sub2
ok 7 - is-active with submodule.active and submodule.<name>.active
expecting success:
test_when_finished "rm -rf super2" &&
git init super2 &&
test_commit -C super2 initial &&
git -C super2 config --add submodule.active "sub*" &&
# submodule add should only add submodule.<name>.active
# to the config if not matched by the pathspec
git -C super2 submodule add ../sub sub1 &&
test_must_fail git -C super2 config --get submodule.sub1.active &&
git -C super2 submodule add ../sub mod &&
git -C super2 config --get submodule.mod.active
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7413-submodule-is-active/super2/.git/
[master (root-commit) d39e3de] initial
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 initial.t
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7413-submodule-is-active/super2/sub1'...
done.
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7413-submodule-is-active/super2/mod'...
done.
true
ok 8 - is-active, submodule.active and submodule add
# passed all 8 test(s)
1..8
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7412-submodule-absorbgitdirs.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7412-submodule-absorbgitdirs/.git/
expecting success:
git init sub1 &&
test_commit -C sub1 first &&
git submodule add ./sub1 &&
test_tick &&
git commit -m superproject
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7412-submodule-absorbgitdirs/sub1/.git/
[master (root-commit) 50e526b] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 first.t
Adding existing repo at 'sub1' to the index
[master (root-commit) 807c578] superproject
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub1
ok 1 - setup a real submodule
expecting success:
>expect.1 &&
>expect.2 &&
>actual.1 &&
>actual.2 &&
git status >expect.1 &&
git -C sub1 rev-parse HEAD >expect.2 &&
git submodule absorbgitdirs &&
git fsck &&
test -f sub1/.git &&
test -d .git/modules/sub1 &&
git status >actual.1 &&
git -C sub1 rev-parse HEAD >actual.2 &&
test_cmp expect.1 actual.1 &&
test_cmp expect.2 actual.2
Migrating git directory of 'sub1' from
'/<<PKGBUILDDIR>>/t/trash directory.t7412-submodule-absorbgitdirs/sub1/.git' to
'/<<PKGBUILDDIR>>/t/trash directory.t7412-submodule-absorbgitdirs/.git/modules/sub1'
ok 2 - absorb the git dir
expecting success:
test_when_finished "git submodule update --init" &&
git submodule deinit --all &&
git submodule absorbgitdirs &&
test -d .git/modules/sub1 &&
test -d sub1 &&
! test -e sub1/.git
Cleared directory 'sub1'
Submodule 'sub1' (./sub1) unregistered for path 'sub1'
warning: could not look up configuration 'remote.origin.url'. Assuming this repository is its own authoritative upstream.
Submodule 'sub1' (/<<PKGBUILDDIR>>/t/trash directory.t7412-submodule-absorbgitdirs/sub1) registered for path 'sub1'
Submodule path 'sub1': checked out '50e526bb426771f6036ad3a8b0c81d511d91fc2a'
ok 3 - absorbing does not fail for deinitialized submodules
expecting success:
git init sub1/nested &&
test_commit -C sub1/nested first_nested &&
git -C sub1 submodule add ./nested &&
test_tick &&
git -C sub1 commit -m "add nested" &&
git add sub1 &&
git commit -m "sub1 to include nested submodule"
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7412-submodule-absorbgitdirs/sub1/nested/.git/
[master (root-commit) 2139925] first_nested
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 first_nested.t
Adding existing repo at 'nested' to the index
[detached HEAD 838ca49] add nested
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 nested
[master 4a7bb23] sub1 to include nested submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 4 - setup nested submodule
expecting success:
git status >expect.1 &&
git -C sub1/nested rev-parse HEAD >expect.2 &&
git submodule absorbgitdirs &&
test -f sub1/nested/.git &&
test -d .git/modules/sub1/modules/nested &&
git status >actual.1 &&
git -C sub1/nested rev-parse HEAD >actual.2 &&
test_cmp expect.1 actual.1 &&
test_cmp expect.2 actual.2
Migrating git directory of 'sub1/nested' from
'/<<PKGBUILDDIR>>/t/trash directory.t7412-submodule-absorbgitdirs/sub1/nested/.git' to
'/<<PKGBUILDDIR>>/t/trash directory.t7412-submodule-absorbgitdirs/.git/modules/sub1/modules/nested'
ok 5 - absorb the git dir in a nested submodule
expecting success:
# un-absorb the direct submodule, to test if the nested submodule
# is still correct (needs a rewrite of the gitfile only)
rm -rf sub1/.git &&
mv .git/modules/sub1 sub1/.git &&
GIT_WORK_TREE=. git -C sub1 config --unset core.worktree &&
# fixup the nested submodule
echo "gitdir: ../.git/modules/nested" >sub1/nested/.git &&
GIT_WORK_TREE=../../../nested git -C sub1/.git/modules/nested config \
core.worktree "../../../nested" &&
# make sure this re-setup is correct
git status --ignore-submodules=none &&
# also make sure this old setup does not regress
git submodule update --init --recursive >out 2>err &&
test_must_be_empty out &&
test_must_be_empty err
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
actual.1
actual.2
expect.1
expect.2
nothing added to commit but untracked files present (use "git add" to track)
ok 6 - re-setup nested submodule
expecting success:
git status >expect.1 &&
git -C sub1/nested rev-parse HEAD >expect.2 &&
git submodule absorbgitdirs &&
test -f sub1/.git &&
test -f sub1/nested/.git &&
test -d .git/modules/sub1/modules/nested &&
git status >actual.1 &&
git -C sub1/nested rev-parse HEAD >actual.2 &&
test_cmp expect.1 actual.1 &&
test_cmp expect.2 actual.2
Migrating git directory of 'sub1' from
'/<<PKGBUILDDIR>>/t/trash directory.t7412-submodule-absorbgitdirs/sub1/.git' to
'/<<PKGBUILDDIR>>/t/trash directory.t7412-submodule-absorbgitdirs/.git/modules/sub1'
ok 7 - absorb the git dir in a nested submodule
expecting success:
git init sub2 &&
test_commit -C sub2 first &&
git add sub2 &&
git commit -m superproject
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7412-submodule-absorbgitdirs/sub2/.git/
[master (root-commit) 33e7427] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 first.t
warning: adding embedded git repository: sub2
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> sub2
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached sub2
hint:
hint: See "git help submodule" for more information.
[master 23d83a4] superproject
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 160000 sub2
ok 8 - setup a gitlink with missing .gitmodules entry
expecting success:
git status >expect.1 &&
git -C sub2 rev-parse HEAD >expect.2 &&
test_must_fail git submodule absorbgitdirs &&
git -C sub2 fsck &&
test -d sub2/.git &&
git status >actual &&
git -C sub2 rev-parse HEAD >actual.2 &&
test_cmp expect.1 actual.1 &&
test_cmp expect.2 actual.2
fatal: could not lookup name for submodule 'sub2'
ok 9 - absorbing the git dir fails for incomplete submodules
expecting success:
# first create another unembedded git dir in a new submodule
git init sub3 &&
test_commit -C sub3 first &&
git submodule add ./sub3 &&
test_tick &&
git commit -m "add another submodule" &&
git -C sub3 worktree add ../sub3_second_work_tree
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7412-submodule-absorbgitdirs/sub3/.git/
[master (root-commit) b9419e0] first
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 first.t
Adding existing repo at 'sub3' to the index
[master 8b0ea5c] add another submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 160000 sub3
Preparing worktree (new branch 'sub3_second_work_tree')
HEAD is now at b9419e0 first
ok 10 - setup a submodule with multiple worktrees
expecting success:
test_must_fail git submodule absorbgitdirs sub3 2>error &&
test_i18ngrep "not supported" error
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
fatal: relocate_gitdir for submodule 'sub3' with more than one worktree not supported
ok 11 - absorbing fails for a submodule with multiple worktrees
# passed all 11 test(s)
1..11
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7416-submodule-dash-url.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7416-submodule-dash-url/.git/
expecting success:
git init upstream &&
git -C upstream commit --allow-empty -m base &&
mv upstream ./-upstream &&
git submodule add ./-upstream sub &&
git add sub .gitmodules &&
git commit -m submodule
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7416-submodule-dash-url/upstream/.git/
[master (root-commit) c7a7beb] base
Author: A U Thor <author@example.com>
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7416-submodule-dash-url/sub'...
done.
[master (root-commit) 87895f2] submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 sub
ok 1 - create submodule with protected dash in url
expecting success:
test_when_finished "rm -rf dst" &&
git clone --recurse-submodules . dst &&
echo base >expect &&
git -C dst/sub log -1 --format=%s >actual &&
test_cmp expect actual
Cloning into 'dst'...
done.
Submodule 'sub' (/<<PKGBUILDDIR>>/t/trash directory.t7416-submodule-dash-url/./-upstream) registered for path 'sub'
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7416-submodule-dash-url/dst/sub'...
done.
Submodule path 'sub': checked out 'c7a7beb9d6cbe0f9959e0b4c46197ded30331e80'
ok 2 - clone can recurse submodule
expecting success:
test_when_finished "rm -rf dst" &&
git init --bare dst &&
git -C dst config transfer.fsckObjects true &&
git push dst HEAD
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7416-submodule-dash-url/dst/
To dst
* [new branch] HEAD -> master
ok 3 - fsck accepts protected dash
expecting success:
perl -i -pe "s{\./}{}" .gitmodules &&
git commit -am "drop protection"
[master df1c697] drop protection
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
ok 4 - remove ./ protection from .gitmodules url
expecting success:
test_when_finished "rm -rf dst" &&
test_must_fail git clone --recurse-submodules . dst 2>err &&
test_i18ngrep ignoring err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
warning: ignoring 'submodule.sub.url' which may be interpreted as a command-line option: -upstream
ok 5 - clone rejects unprotected dash
expecting success:
test_when_finished "rm -rf dst" &&
git init --bare dst &&
git -C dst config transfer.fsckObjects true &&
test_must_fail git push dst HEAD 2>err &&
grep gitmodulesUrl err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7416-submodule-dash-url/dst/
remote: error: object 3203a2d7fb3e9335b43e66a0c95b96887ed3670f: gitmodulesUrl: disallowed submodule url: -upstream
ok 6 - fsck rejects unprotected dash
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7417-submodule-path-url.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7417-submodule-path-url/.git/
expecting success:
git init upstream &&
git -C upstream commit --allow-empty -m base &&
git submodule add ./upstream sub &&
git mv sub ./-sub &&
git commit -m submodule
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7417-submodule-path-url/upstream/.git/
[master (root-commit) 6393ba0] base
Author: A U Thor <author@example.com>
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7417-submodule-path-url/sub'...
done.
warning: ignoring 'submodule.sub.path' which may be interpreted as a command-line option: -sub
[master (root-commit) d67a9e1] submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 160000 -sub
create mode 100644 .gitmodules
ok 1 - create submodule with dash in path
expecting success:
test_when_finished "rm -rf dst" &&
git clone --recurse-submodules . dst 2>err &&
test_i18ngrep ignoring err
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
warning: ignoring 'submodule.sub.path' which may be interpreted as a command-line option: -sub
warning: ignoring 'submodule.sub.path' which may be interpreted as a command-line option: -sub
ok 2 - clone rejects unprotected dash
expecting success:
test_when_finished "rm -rf dst" &&
git init --bare dst &&
git -C dst config transfer.fsckObjects true &&
test_must_fail git push dst HEAD 2>err &&
grep gitmodulesPath err
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7417-submodule-path-url/dst/
remote: error: object 7e03af04dae731f9aa8e2febaf8b530bdafd3aa1: gitmodulesPath: disallowed submodule path: -sub
ok 3 - fsck rejects unprotected dash
# passed all 3 test(s)
1..3
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7415-submodule-names.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7415-submodule-names/.git/
expecting success:
cat >expect <<-\EOF &&
valid
valid/with/paths
EOF
git submodule--helper check-name >actual <<-\EOF &&
valid
valid/with/paths
../foo
/../foo
..\foo
\..\foo
foo/..
foo/../
foo\..
foo\..\
foo/../bar
EOF
test_cmp expect actual
ok 1 - check names
expecting success:
git init innocent &&
git -C innocent commit --allow-empty -m foo
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7415-submodule-names/innocent/.git/
[master (root-commit) 7918269] foo
Author: A U Thor <author@example.com>
ok 2 - create innocent subrepo
expecting success:
test_must_fail \
git submodule add --name ../../modules/evil "$PWD/innocent" evil
'../../modules/evil' is not a valid submodule name
ok 3 - submodule add refuses invalid names
expecting success:
git submodule add "$PWD/innocent" evil &&
mkdir modules &&
cp -r .git/modules/evil modules &&
write_script modules/evil/hooks/post-checkout <<-\EOF &&
echo >&2 "RUNNING POST CHECKOUT"
EOF
git config -f .gitmodules submodule.evil.update checkout &&
git config -f .gitmodules --rename-section \
submodule.evil submodule.../../modules/evil &&
git add modules &&
git commit -am evil
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7415-submodule-names/evil'...
done.
warning: ignoring suspicious submodule name: ../../modules/evil
warning: ignoring suspicious submodule name: ../../modules/evil
warning: ignoring suspicious submodule name: ../../modules/evil
[master (root-commit) fe6800a] evil
Author: A U Thor <author@example.com>
27 files changed, 678 insertions(+)
create mode 100644 .gitmodules
create mode 160000 evil
create mode 100644 modules/evil/HEAD
create mode 100644 modules/evil/config
create mode 100644 modules/evil/description
create mode 100755 modules/evil/hooks/applypatch-msg.sample
create mode 100755 modules/evil/hooks/commit-msg.sample
create mode 100755 modules/evil/hooks/fsmonitor-watchman.sample
create mode 100755 modules/evil/hooks/post-checkout
create mode 100755 modules/evil/hooks/post-update.sample
create mode 100755 modules/evil/hooks/pre-applypatch.sample
create mode 100755 modules/evil/hooks/pre-commit.sample
create mode 100755 modules/evil/hooks/pre-push.sample
create mode 100755 modules/evil/hooks/pre-rebase.sample
create mode 100755 modules/evil/hooks/pre-receive.sample
create mode 100755 modules/evil/hooks/prepare-commit-msg.sample
create mode 100755 modules/evil/hooks/update.sample
create mode 100644 modules/evil/index
create mode 100644 modules/evil/info/exclude
create mode 100644 modules/evil/logs/HEAD
create mode 100644 modules/evil/logs/refs/heads/master
create mode 100644 modules/evil/logs/refs/remotes/origin/HEAD
create mode 100644 modules/evil/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904
create mode 100644 modules/evil/objects/79/18269b663906fe74071357bdfe271baa659a05
create mode 100644 modules/evil/packed-refs
create mode 100644 modules/evil/refs/heads/master
create mode 100644 modules/evil/refs/remotes/origin/HEAD
ok 4 - add evil submodule
expecting success:
git submodule add "$PWD/innocent" another-module &&
git add another-module &&
git commit -am another
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7415-submodule-names/another-module'...
done.
warning: ignoring suspicious submodule name: ../../modules/evil
warning: ignoring suspicious submodule name: ../../modules/evil
warning: ignoring suspicious submodule name: ../../modules/evil
[master d0c018c] another
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 160000 another-module
ok 5 - add other submodule
expecting success:
git clone --recurse-submodules . victim >output 2>&1 &&
! grep "RUNNING POST CHECKOUT" output
ok 6 - clone evil superproject
expecting success:
test_must_fail git fsck
error in blob 9a5dd5b5f7b6cece2b617bc5560ebd4b5b3a1fb0: gitmodulesName: disallowed submodule name: ../../modules/evil
error in blob 9a5dd5b5f7b6cece2b617bc5560ebd4b5b3a1fb0: gitmodulesName: disallowed submodule name: ../../modules/evil
error in blob 9a5dd5b5f7b6cece2b617bc5560ebd4b5b3a1fb0: gitmodulesName: disallowed submodule name: ../../modules/evil
error in blob b2502165cb150fa0742169f8f889a481bd1bb120: gitmodulesName: disallowed submodule name: ../../modules/evil
error in blob b2502165cb150fa0742169f8f889a481bd1bb120: gitmodulesName: disallowed submodule name: ../../modules/evil
error in blob b2502165cb150fa0742169f8f889a481bd1bb120: gitmodulesName: disallowed submodule name: ../../modules/evil
dangling blob 6a8aeea171dfaa7f4d9540eb57bf0bcbce080a43
ok 7 - fsck detects evil superproject
expecting success:
rm -rf dst.git &&
git init --bare dst.git &&
git -C dst.git config transfer.fsckObjects true &&
test_must_fail git push dst.git HEAD
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7415-submodule-names/dst.git/
remote: error: object 9a5dd5b5f7b6cece2b617bc5560ebd4b5b3a1fb0: gitmodulesName: disallowed submodule name: ../../modules/evil
remote: error: object 9a5dd5b5f7b6cece2b617bc5560ebd4b5b3a1fb0: gitmodulesName: disallowed submodule name: ../../modules/evil
remote: error: object 9a5dd5b5f7b6cece2b617bc5560ebd4b5b3a1fb0: gitmodulesName: disallowed submodule name: ../../modules/evil
remote: error: object b2502165cb150fa0742169f8f889a481bd1bb120: gitmodulesName: disallowed submodule name: ../../modules/evil
remote: error: object b2502165cb150fa0742169f8f889a481bd1bb120: gitmodulesName: disallowed submodule name: ../../modules/evil
remote: error: object b2502165cb150fa0742169f8f889a481bd1bb120: gitmodulesName: disallowed submodule name: ../../modules/evil
remote: fatal: fsck error in pack objects
error: remote unpack failed: unpack-objects abnormal exit
To dst.git
! [remote rejected] HEAD -> master (unpacker error)
error: failed to push some refs to 'dst.git'
ok 8 - transfer.fsckObjects detects evil superproject (unpack)
expecting success:
rm -rf dst.git &&
git init --bare dst.git &&
git -C dst.git config transfer.fsckObjects true &&
git -C dst.git config transfer.unpackLimit 1 &&
test_must_fail git push dst.git HEAD
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7415-submodule-names/dst.git/
remote: error: object 9a5dd5b5f7b6cece2b617bc5560ebd4b5b3a1fb0: gitmodulesName: disallowed submodule name: ../../modules/evil
remote: error: object 9a5dd5b5f7b6cece2b617bc5560ebd4b5b3a1fb0: gitmodulesName: disallowed submodule name: ../../modules/evil
remote: error: object 9a5dd5b5f7b6cece2b617bc5560ebd4b5b3a1fb0: gitmodulesName: disallowed submodule name: ../../modules/evil
remote: fatal: fsck error in packed object
error: remote unpack failed: index-pack abnormal exit
To dst.git
! [remote rejected] HEAD -> master (unpacker error)
error: failed to push some refs to 'dst.git'
ok 9 - transfer.fsckObjects detects evil superproject (index)
expecting success:
git checkout --orphan odd &&
git rm -rf --cached . &&
git add .gitmodules &&
git commit -m odd &&
{
pack_header 3 &&
pack_obj $(git rev-parse HEAD:.gitmodules) &&
pack_obj $(git rev-parse HEAD^{tree}) &&
pack_obj $(git rev-parse HEAD)
} >odd.pack &&
pack_trailer odd.pack
warning: ignoring suspicious submodule name: ../../modules/evil
warning: ignoring suspicious submodule name: ../../modules/evil
warning: ignoring suspicious submodule name: ../../modules/evil
Switched to a new branch 'odd'
rm '.gitmodules'
rm 'another-module'
rm 'evil'
rm 'modules/evil/HEAD'
rm 'modules/evil/config'
rm 'modules/evil/description'
rm 'modules/evil/hooks/applypatch-msg.sample'
rm 'modules/evil/hooks/commit-msg.sample'
rm 'modules/evil/hooks/fsmonitor-watchman.sample'
rm 'modules/evil/hooks/post-checkout'
rm 'modules/evil/hooks/post-update.sample'
rm 'modules/evil/hooks/pre-applypatch.sample'
rm 'modules/evil/hooks/pre-commit.sample'
rm 'modules/evil/hooks/pre-push.sample'
rm 'modules/evil/hooks/pre-rebase.sample'
rm 'modules/evil/hooks/pre-receive.sample'
rm 'modules/evil/hooks/prepare-commit-msg.sample'
rm 'modules/evil/hooks/update.sample'
rm 'modules/evil/index'
rm 'modules/evil/info/exclude'
rm 'modules/evil/logs/HEAD'
rm 'modules/evil/logs/refs/heads/master'
rm 'modules/evil/logs/refs/remotes/origin/HEAD'
rm 'modules/evil/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904'
rm 'modules/evil/objects/79/18269b663906fe74071357bdfe271baa659a05'
rm 'modules/evil/packed-refs'
rm 'modules/evil/refs/heads/master'
rm 'modules/evil/refs/remotes/origin/HEAD'
[odd (root-commit) 9b57828] odd
Author: A U Thor <author@example.com>
1 file changed, 7 insertions(+)
create mode 100644 .gitmodules
159+0 records in
159+0 records out
159 bytes copied, 0.00115537 s, 138 kB/s
50+0 records in
50+0 records out
50 bytes copied, 0.000427906 s, 117 kB/s
127+0 records in
127+0 records out
127 bytes copied, 0.000937752 s, 135 kB/s
ok 10 - create oddly ordered pack
expecting success:
rm -rf dst.git &&
git init --bare dst.git &&
test_must_fail git -C dst.git unpack-objects --strict <odd.pack
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7415-submodule-names/dst.git/
error: object 9a5dd5b5f7b6cece2b617bc5560ebd4b5b3a1fb0: gitmodulesName: disallowed submodule name: ../../modules/evil
error: object 9a5dd5b5f7b6cece2b617bc5560ebd4b5b3a1fb0: gitmodulesName: disallowed submodule name: ../../modules/evil
error: object 9a5dd5b5f7b6cece2b617bc5560ebd4b5b3a1fb0: gitmodulesName: disallowed submodule name: ../../modules/evil
fatal: fsck error in pack objects
ok 11 - transfer.fsckObjects handles odd pack (unpack)
expecting success:
rm -rf dst.git &&
git init --bare dst.git &&
test_must_fail git -C dst.git index-pack --strict --stdin <odd.pack
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7415-submodule-names/dst.git/
pack 75d2d8a4e3ba159d2fc3edb390d0e52f3967bca0
error: object 9a5dd5b5f7b6cece2b617bc5560ebd4b5b3a1fb0: gitmodulesName: disallowed submodule name: ../../modules/evil
error: object 9a5dd5b5f7b6cece2b617bc5560ebd4b5b3a1fb0: gitmodulesName: disallowed submodule name: ../../modules/evil
error: object 9a5dd5b5f7b6cece2b617bc5560ebd4b5b3a1fb0: gitmodulesName: disallowed submodule name: ../../modules/evil
fatal: fsck error in pack objects
ok 12 - transfer.fsckObjects handles odd pack (index)
expecting success:
rm -rf dst.git &&
git init --bare dst.git &&
cp odd.pack dst.git &&
test_must_fail git -C dst.git index-pack --strict odd.pack 2>output &&
# Make sure we fail due to bad gitmodules content, not because we
# could not read the blob in the first place.
grep gitmodulesName output
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7415-submodule-names/dst.git/
75d2d8a4e3ba159d2fc3edb390d0e52f3967bca0
error: object 9a5dd5b5f7b6cece2b617bc5560ebd4b5b3a1fb0: gitmodulesName: disallowed submodule name: ../../modules/evil
error: object 9a5dd5b5f7b6cece2b617bc5560ebd4b5b3a1fb0: gitmodulesName: disallowed submodule name: ../../modules/evil
error: object 9a5dd5b5f7b6cece2b617bc5560ebd4b5b3a1fb0: gitmodulesName: disallowed submodule name: ../../modules/evil
ok 13 - index-pack --strict works for non-repo pack
expecting success:
git init symlink &&
(
cd symlink &&
# Make the tree directly to avoid index restrictions.
#
# Because symlinks store the target as a blob, choose
# a pathname that could be parsed as a .gitmodules file
# to trick naive non-symlink-aware checking.
tricky="[foo]bar=true" &&
content=$(git hash-object -w ../.gitmodules) &&
target=$(printf "$tricky" | git hash-object -w --stdin) &&
{
printf "100644 blob $content\t$tricky\n" &&
printf "120000 blob $target\t.gitmodules\n"
} | git mktree &&
# Check not only that we fail, but that it is due to the
# symlink detector; this grep string comes from the config
# variable name and will not be translated.
test_must_fail git fsck 2>output &&
test_i18ngrep gitmodulesSymlink output
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7415-submodule-names/symlink/.git/
a1686ded701146b999a87b510962ef27ac092c3f
dangling tree a1686ded701146b999a87b510962ef27ac092c3f
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error in tree a1686ded701146b999a87b510962ef27ac092c3f: gitmodulesSymlink: .gitmodules is a symbolic link
ok 14 - fsck detects symlinked .gitmodules file
expecting success:
git init non-blob &&
(
cd non-blob &&
# As above, make the funny tree directly to avoid index
# restrictions.
mkdir subdir &&
cp ../.gitmodules subdir/file &&
git add subdir/file &&
git commit -m ok &&
git ls-tree HEAD | sed s/subdir/.gitmodules/ | git mktree &&
test_must_fail git fsck 2>output &&
test_i18ngrep gitmodulesBlob output
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7415-submodule-names/non-blob/.git/
[master (root-commit) ee56937] ok
Author: A U Thor <author@example.com>
1 file changed, 7 insertions(+)
create mode 100644 subdir/file
6285bc8ab66f7cf6c5f99ff4e215a0759b97fd0f
dangling tree 6285bc8ab66f7cf6c5f99ff4e215a0759b97fd0f
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
error in tree d4da8736a73c6052c97cb54ac75f5656eb353b9a: gitmodulesBlob: non-blob found at .gitmodules
ok 15 - fsck detects non-blob .gitmodules
expecting success:
git init corrupt &&
(
cd corrupt &&
echo "[broken" >.gitmodules &&
git add .gitmodules &&
git commit -m "broken gitmodules" &&
git fsck 2>output &&
test_i18ngrep gitmodulesParse output &&
test_i18ngrep ! "bad config" output
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7415-submodule-names/corrupt/.git/
[master (root-commit) 8028fa9] broken gitmodules
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 .gitmodules
checking prerequisite: C_LOCALE_OUTPUT
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" &&
(
cd "$TRASH_DIRECTORY/prereq-test-dir" &&
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON
)
prerequisite C_LOCALE_OUTPUT ok
warning in blob e39defa11acf1626d747f0b70076b6be5c0fd4c9: gitmodulesParse: could not parse gitmodules blob
ok 16 - fsck detects corrupt .gitmodules
# passed all 16 test(s)
1..16
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7419-submodule-set-branch.sh ***
expecting success:
mkdir submodule &&
(cd submodule &&
git init &&
echo a >a &&
git add . &&
git commit -ma &&
git checkout -b topic &&
echo b >a &&
git add . &&
git commit -mb
) &&
mkdir super &&
(cd super &&
git init &&
git submodule add ../submodule &&
git commit -m "add submodule"
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7419-submodule-set-branch/submodule/.git/
[master (root-commit) 613b58f] a
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 a
Switched to a new branch 'topic'
[topic b25faeb] b
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+), 1 deletion(-)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7419-submodule-set-branch/super/.git/
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7419-submodule-set-branch/super/submodule'...
done.
[master (root-commit) 4be7aac] add submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 submodule
ok 1 - submodule config cache setup
expecting success:
(cd super &&
test_must_fail grep branch .gitmodules
)
ok 2 - ensure submodule branch is unset
expecting success:
(cd super &&
git submodule set-branch --branch topic submodule &&
grep "branch = topic" .gitmodules &&
git submodule update --remote &&
cat <<-\EOF >expect &&
b
EOF
git -C submodule show -s --pretty=%s >actual &&
test_cmp expect actual
)
branch = topic
ok 3 - test submodule set-branch --branch
expecting success:
(cd super &&
git submodule set-branch --default submodule &&
test_must_fail grep branch .gitmodules &&
git submodule update --remote &&
cat <<-\EOF >expect &&
a
EOF
git -C submodule show -s --pretty=%s >actual &&
test_cmp expect actual
)
Submodule path 'submodule': checked out '613b58f6b50cd2403f6733b5195fcd685d6c495c'
ok 4 - test submodule set-branch --default
expecting success:
(cd super &&
git submodule set-branch -b topic submodule &&
grep "branch = topic" .gitmodules &&
git submodule update --remote &&
cat <<-\EOF >expect &&
b
EOF
git -C submodule show -s --pretty=%s >actual &&
test_cmp expect actual
)
branch = topic
Submodule path 'submodule': checked out 'b25faebf7394c08898e3146f732e5c4bb68e93a9'
ok 5 - test submodule set-branch -b
expecting success:
(cd super &&
git submodule set-branch -d submodule &&
test_must_fail grep branch .gitmodules &&
git submodule update --remote &&
cat <<-\EOF >expect &&
a
EOF
git -C submodule show -s --pretty=%s >actual &&
test_cmp expect actual
)
Submodule path 'submodule': checked out '613b58f6b50cd2403f6733b5195fcd685d6c495c'
ok 6 - test submodule set-branch -d
# passed all 6 test(s)
1..6
make[4]: Leaving directory '/<<PKGBUILDDIR>>/t'
make[4]: Entering directory '/<<PKGBUILDDIR>>/t'
*** t7418-submodule-sparse-gitmodules.sh ***
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7418-submodule-sparse-gitmodules/.git/
expecting success:
git init upstream &&
git init submodule &&
(cd submodule &&
echo file >file &&
git add file &&
test_tick &&
git commit -m "Add file"
) &&
(cd upstream &&
git submodule add ../submodule &&
test_tick &&
git commit -m "Add submodule"
) &&
git clone upstream super &&
(cd super &&
cat >.git/info/sparse-checkout <<-\EOF &&
/*
!/.gitmodules
EOF
git config core.sparsecheckout true &&
git read-tree -m -u HEAD &&
test_path_is_missing .gitmodules
)
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7418-submodule-sparse-gitmodules/upstream/.git/
Initialized empty Git repository in /<<PKGBUILDDIR>>/t/trash directory.t7418-submodule-sparse-gitmodules/submodule/.git/
[master (root-commit) a939200] Add file
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7418-submodule-sparse-gitmodules/upstream/submodule'...
done.
[master (root-commit) caa93e1] Add submodule
Author: A U Thor <author@example.com>
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 submodule
Cloning into 'super'...
done.
ok 1 - sparse checkout setup which hides .gitmodules
expecting success:
echo "../submodule" >expect &&
git -C super submodule--helper config submodule.submodule.url >actual &&
test_cmp expect actual
ok 2 - reading gitmodules config file when it is not checked out
expecting success:
test_must_fail git -C super submodule--helper config submodule.submodule.url newurl &&
test_path_is_missing super/.gitmodules
fatal: please make sure that the .gitmodules file is in the working tree
ok 3 - not writing gitmodules config file when it is not checked out
expecting success:
test_must_fail git -C super config submodule.submodule.url &&
git -C super submodule init &&
git -C super config submodule.submodule.url >actual &&
echo "$(pwd)/submodule" >expect &&
test_cmp expect actual
Submodule 'submodule' (/<<PKGBUILDDIR>>/t/trash directory.t7418-submodule-sparse-gitmodules/submodule) registered for path 'submodule'
ok 4 - initialising submodule when the gitmodules config is not checked out
expecting success:
test_path_is_missing super/submodule/file &&
git -C super submodule update &&
test_cmp submodule/file super/submodule/file
Cloning into '/<<PKGBUILDDIR>>/t/trash directory.t7418-submodule-sparse-gitmodules/super/submodule'...
done.
Submodule path 'submodule': checked out 'a939200cdece6d977c80e37469830b5cb29fd586'
ok 5 - updating submodule when the gitmodules config is not checked out
expecting success:
test_when_finished "git -C submodule reset --hard $ORIG_SUBMODULE;
git -C upstream reset --hard $ORIG_UPSTREAM;
git -C super reset --hard $ORIG_SUPER;
git -C upstream submodule update --remote;
git -C super pull;
git -C super submodule update --remote" &&
(cd submodule &&
echo file2 >file2 &&
git add file2 &&
test_tick &&
git commit -m "Add file2 to submodule"
) &&
(cd upstream &&
git submodule update --remote &&
git add submodule &&
test_tick &&
git commit -m "Update submodule"
) &&
git -C super pull &&
# The --for-status options reads the gitmodules config
git -C super submodule summary --for-status >actual &&
rev1=$(git -C submodule rev-parse --short HEAD) &&
rev2=$(git -C submodule rev-parse --short HEAD^) &&
cat >expect <<-EOF &&
* submodule ${rev1}...${rev2} (1):
< Add file2 to submodule
EOF
test_cmp expect actual &&
# Test that the update actually succeeds
test_path_is_missing super/submodule/file2 &&
git -C super submodule update &&
test_cmp submodule/file2 super/submodule/file2 &&
git -C super status --short >output &&
test_must_be_empty output
[master 83d36b8] Add file2 to submodule
Author: A U Thor <author@example.com>
1 file changed, 1 insertion(+)
create mode 100644 file2
From /<<PKGBUILDDIR>>/t/trash directory.t7418-submodule-sparse-gitmodules/submodule
a939200..83d36b8 master ->